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

#include "protonplus_core.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <glib-object.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <pango/pango.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_BOX_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_BOX_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_box_properties[PROTON_PLUS_WIDGETS_GAMES_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block25Data Block25Data;
typedef struct _Block26Data Block26Data;

struct _ProtonPlusWidgetsGamesBoxPrivate {
	gboolean _error;
	gboolean _invalid;
	ProtonPlusModelsLauncher* launcher;
	GtkImage* image;
	AdwStatusPage* status_page;
	ProtonPlusWidgetsGamesMassEditButton* mass_edit_button;
	GtkSearchEntry* search_entry;
	GtkCheckButton* check_button;
	GtkLabel* prefix_label;
	GtkLabel* compatibility_tool_label;
	GtkLabel* other_label;
	GtkSizeGroup* prefix_column_size_group;
	GtkSizeGroup* tool_column_size_group;
	GtkSizeGroup* actions_column_size_group;
	GtkSizeGroup* filter_column_size_group;
	GtkBox* header_box;
	GtkBox* headered_list_box;
	GtkBox* games_page_box;
	AdwNavigationView* navigation_view;
	AdwNavigationPage* list_page;
	AdwNavigationPage* mass_edit_page;
	GtkStack* list_stack;
	AdwStatusPage* empty_status_page;
	GtkScrolledWindow* scrolled_window;
	GtkListBox* game_list_box;
	GtkMenuButton* filter_button;
	GtkCheckButton* all_filter_check;
	GtkCheckButton* non_steam_filter_check;
	GtkCheckButton* native_filter_check;
	AdwSpinner* spinner;
	GtkOverlay* overlay;
	ProtonPlusWidgetsGamesMassEditView* mass_edit_view;
	GListStore* model;
	GtkPropertyExpression* expression;
	GtkMenuButton* selection_button;
	GtkListBox* selection_list_box;
	GtkPopover* selection_popover;
	GtkLabel* selection_popover_title;
	gchar* search_query;
	guint search_timeout_id;
	gboolean updating_selection_toggle;
	gboolean mass_edit_cleanup_pending;
};

struct _Block25Data {
	int _ref_count_;
	ProtonPlusWidgetsGamesBox* self;
	ProtonPlusWidgetsGamesGameRow* game_row;
};

struct _Block26Data {
	int _ref_count_;
	ProtonPlusWidgetsGamesBox* self;
	GtkPopover* filter_popover;
};

static gint ProtonPlusWidgetsGamesBox_private_offset;
static gpointer proton_plus_widgets_games_box_parent_class = NULL;
static ProtonPlusUtilsControllerNavigationHostIface * proton_plus_widgets_games_box_proton_plus_utils_controller_navigation_host_parent_iface = NULL;
static ProtonPlusUtilsControllerPageShortcutsIface * proton_plus_widgets_games_box_proton_plus_utils_controller_page_shortcuts_parent_iface = NULL;

static gboolean proton_plus_widgets_games_box_get_invalid (ProtonPlusWidgetsGamesBox* self);
static gboolean proton_plus_widgets_games_box_get_error (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_show_normal (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_set_invalid (ProtonPlusWidgetsGamesBox* self,
                                                gboolean value);
static void proton_plus_widgets_games_box_set_error (ProtonPlusWidgetsGamesBox* self,
                                              gboolean value);
static void proton_plus_widgets_games_box_show_status_box (ProtonPlusWidgetsGamesBox* self,
                                                    const gchar* icon,
                                                    const gchar* title,
                                                    const gchar* description,
                                                    gboolean is_image);
static void proton_plus_widgets_games_box_update_selection_controls (ProtonPlusWidgetsGamesBox* self);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static void ____lambda169_ (ProtonPlusWidgetsGamesBox* self,
                     ProtonPlusWidgetsGamesGameRow* row);
static void proton_plus_widgets_games_box_open_mass_edit (ProtonPlusWidgetsGamesBox* self,
                                                   ProtonPlusWidgetsGamesGameRow** rows,
                                                   gint rows_length1);
static void _____lambda169__proton_plus_widgets_games_game_row_mass_edit_requested (ProtonPlusWidgetsGamesGameRow* _sender,
                                                                             ProtonPlusWidgetsGamesGameRow* row,
                                                                             gpointer self);
static void ____lambda170_ (Block25Data* _data25_);
static void _____lambda170__g_object_notify (GObject* _sender,
                                      GParamSpec* pspec,
                                      gpointer self);
static void proton_plus_widgets_games_box_update_empty_state (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_schedule_search_filter (ProtonPlusWidgetsGamesBox* self);
static gboolean __lambda171_ (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_refilter_games (ProtonPlusWidgetsGamesBox* self);
static gboolean ___lambda171__gsource_func (gpointer self);
static void proton_plus_widgets_games_box_update_filter_button_state (ProtonPlusWidgetsGamesBox* self);
static gboolean proton_plus_widgets_games_box_filter_game_row (ProtonPlusWidgetsGamesBox* self,
                                                        GtkListBoxRow* row);
static void proton_plus_widgets_games_box_push_mass_edit_page (ProtonPlusWidgetsGamesBox* self);
static gboolean proton_plus_widgets_games_box_pop_page (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_cleanup_mass_edit_exit (ProtonPlusWidgetsGamesBox* self);
static void proton_plus_widgets_games_box_reset_games_list_state (ProtonPlusWidgetsGamesBox* self);
static gchar* proton_plus_widgets_games_box_real_get_controller_page_id (ProtonPlusUtilsControllerNavigationHost* base);
static GObject* proton_plus_widgets_games_box_real_get_controller_page_root (ProtonPlusUtilsControllerNavigationHost* base);
static GObject* proton_plus_widgets_games_box_real_get_controller_initial_focus (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_games_box_real_controller_navigate_back (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_games_box_real_controller_can_navigate_back (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_games_box_real_controller_can_switch_page (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_games_box_real_controller_prefers_initial_focus_after_switch (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_games_box_real_controller_switch_page (ProtonPlusUtilsControllerNavigationHost* base,
                                                                    gint delta);
static gboolean proton_plus_widgets_games_box_real_controller_can_open_search (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_games_box_real_controller_can_open_filter (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_games_box_real_controller_open_search (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_games_box_real_controller_open_filter (ProtonPlusUtilsControllerPageShortcuts* base);
static GObject * proton_plus_widgets_games_box_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static gboolean _proton_plus_widgets_games_box_filter_game_row_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                                  gpointer self);
static gint _proton_plus_widgets_games_box___lambda172_ (ProtonPlusWidgetsGamesBox* self,
                                                  GtkListBoxRow* row1,
                                                  GtkListBoxRow* row2);
static gint __proton_plus_widgets_games_box___lambda172__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                          GtkListBoxRow* row2,
                                                                          gpointer self);
static void _proton_plus_widgets_games_box_open_mass_edit_proton_plus_widgets_games_mass_edit_button_mass_edit_requested (ProtonPlusWidgetsGamesMassEditButton* _sender,
                                                                                                                   ProtonPlusWidgetsGamesGameRow** rows,
                                                                                                                   gint rows_length1,
                                                                                                                   gpointer self);
static void _proton_plus_widgets_games_box___lambda173_ (Block26Data* _data26_);
static void __proton_plus_widgets_games_box___lambda173__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                            gpointer self);
static void _proton_plus_widgets_games_box___lambda174_ (Block26Data* _data26_);
static void __proton_plus_widgets_games_box___lambda174__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                            gpointer self);
static void _proton_plus_widgets_games_box___lambda175_ (Block26Data* _data26_);
static void __proton_plus_widgets_games_box___lambda175__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                            gpointer self);
static void _proton_plus_widgets_games_box_schedule_search_filter_gtk_editable_changed (GtkEditable* _sender,
                                                                                 gpointer self);
static void _proton_plus_widgets_games_box___lambda176_ (ProtonPlusWidgetsGamesBox* self);
static void __proton_plus_widgets_games_box___lambda176__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                            gpointer self);
static void _proton_plus_widgets_games_box___lambda177_ (ProtonPlusWidgetsGamesBox* self);
static void __proton_plus_widgets_games_box___lambda177__proton_plus_widgets_games_mass_edit_view_back_requested (ProtonPlusWidgetsGamesMassEditView* _sender,
                                                                                                           gpointer self);
static void _proton_plus_widgets_games_box___lambda178_ (ProtonPlusWidgetsGamesBox* self,
                                                  AdwNavigationPage* page);
static void __proton_plus_widgets_games_box___lambda178__adw_navigation_view_popped (AdwNavigationView* _sender,
                                                                              AdwNavigationPage* page,
                                                                              gpointer self);
static void proton_plus_widgets_games_box_finalize (GObject * obj);
static GType proton_plus_widgets_games_box_get_type_once (void);
static void _vala_proton_plus_widgets_games_box_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_box_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
proton_plus_widgets_games_box_get_instance_private (ProtonPlusWidgetsGamesBox* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesBox_private_offset);
}

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

void
proton_plus_widgets_games_box_set_selected_launcher (ProtonPlusWidgetsGamesBox* self,
                                                     ProtonPlusModelsLauncher* launcher)
{
	ProtonPlusModelsLauncher* _tmp0_;
	GtkMenuButton* _tmp1_;
	GtkCheckButton* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	_tmp0_ = _g_object_ref0 (launcher);
	_g_object_unref0 (self->priv->launcher);
	self->priv->launcher = _tmp0_;
	_tmp1_ = self->priv->filter_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, launcher->has_library_support);
	_tmp2_ = self->priv->non_steam_filter_check;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (launcher));
	if (launcher->has_library_support) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_;
		_tmp4_ = self->priv->_invalid;
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			gboolean _tmp5_;
			_tmp5_ = self->priv->_error;
			_tmp3_ = _tmp5_;
		}
		if (_tmp3_) {
			proton_plus_widgets_games_box_show_normal (self);
			proton_plus_widgets_games_box_set_invalid (self, FALSE);
		}
		if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (launcher)) {
			ProtonPlusModelsLaunchersSteam* steam_launcher = NULL;
			ProtonPlusModelsLaunchersSteam* _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_;
			gboolean _tmp9_;
			_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (launcher, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam));
			steam_launcher = _tmp6_;
			_tmp8_ = proton_plus_models_launcher_get_game_library_available (launcher);
			_tmp9_ = _tmp8_;
			if (!_tmp9_) {
				_tmp7_ = TRUE;
			} else {
				ProtonPlusModelsLaunchersSteam* _tmp10_;
				GList* _tmp11_;
				_tmp10_ = steam_launcher;
				_tmp11_ = _tmp10_->profiles;
				_tmp7_ = g_list_length (_tmp11_) == ((guint) 0);
			}
			if (_tmp7_) {
				proton_plus_widgets_games_box_set_error (self, TRUE);
				proton_plus_widgets_games_box_show_status_box (self, "bug-symbolic", _ ("Steam games couldn’t be loaded"), _ ("Steam’s library or profile data is missing or invalid. Finish setting " \
"up Steam, then restart ProtonPlus. Tools and other launchers remain av" \
"ailable."), FALSE);
			} else {
				proton_plus_widgets_games_box_load_games (self);
			}
			_g_object_unref0 (steam_launcher);
		}
	} else {
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		proton_plus_widgets_games_box_set_invalid (self, TRUE);
		_tmp12_ = launcher->icon_path;
		_tmp13_ = launcher->title;
		_tmp14_ = g_strdup_printf (_ ("%s is currently not supported."), _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strdup_printf ("%s\n%s", _tmp15_, _ ("If you want me to speed up the development make sure to show your supp" \
"ort!"));
		_tmp17_ = _tmp16_;
		proton_plus_widgets_games_box_show_status_box (self, _tmp12_, _ ("Unsupported launcher"), _tmp17_, TRUE);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp15_);
	}
}

static void
proton_plus_widgets_games_box_show_normal (ProtonPlusWidgetsGamesBox* self)
{
	GtkBox* _tmp0_;
	AdwStatusPage* _tmp1_;
	g_return_if_fail (self != NULL);
	proton_plus_widgets_games_box_set_error (self, FALSE);
	_tmp0_ = self->priv->headered_list_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	proton_plus_widgets_games_box_update_selection_controls (self);
	_tmp1_ = self->priv->status_page;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
}

static void
proton_plus_widgets_games_box_show_status_box (ProtonPlusWidgetsGamesBox* self,
                                               const gchar* icon,
                                               const gchar* title,
                                               const gchar* description,
                                               gboolean is_image)
{
	GtkBox* _tmp0_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp1_;
	AdwStatusPage* _tmp4_;
	AdwStatusPage* _tmp5_;
	AdwStatusPage* _tmp6_;
	AdwStatusPage* _tmp7_;
	AdwStatusPage* _tmp8_;
	GtkImage* _tmp9_;
	GdkPaintable* _tmp10_;
	AdwStatusPage* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (icon != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (description != NULL);
	_tmp0_ = self->priv->headered_list_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = self->priv->mass_edit_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	if (is_image) {
		GtkImage* _tmp2_;
		_tmp2_ = self->priv->image;
		gtk_image_set_from_resource (_tmp2_, icon);
	} else {
		GtkImage* _tmp3_;
		_tmp3_ = self->priv->image;
		gtk_image_set_from_icon_name (_tmp3_, icon);
	}
	_tmp4_ = self->priv->status_page;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = self->priv->status_page;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = self->priv->status_page;
	adw_status_page_set_title (_tmp6_, title);
	_tmp7_ = self->priv->status_page;
	adw_status_page_set_description (_tmp7_, description);
	_tmp8_ = self->priv->status_page;
	_tmp9_ = self->priv->image;
	_tmp10_ = gtk_image_get_paintable (_tmp9_);
	adw_status_page_set_paintable (_tmp8_, _tmp10_);
	_tmp11_ = self->priv->status_page;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE);
}

static Block25Data*
block25_data_ref (Block25Data* _data25_)
{
	g_atomic_int_inc (&_data25_->_ref_count_);
	return _data25_;
}

static void
block25_data_unref (void * _userdata_)
{
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		ProtonPlusWidgetsGamesBox* self;
		self = _data25_->self;
		_g_object_unref0 (_data25_->game_row);
		_g_object_unref0 (self);
		g_slice_free (Block25Data, _data25_);
	}
}

static void
____lambda169_ (ProtonPlusWidgetsGamesBox* self,
                ProtonPlusWidgetsGamesGameRow* row)
{
	ProtonPlusWidgetsGamesGameRow* _tmp0_;
	ProtonPlusWidgetsGamesGameRow** _tmp1_;
	ProtonPlusWidgetsGamesGameRow** _tmp2_;
	gint _tmp2__length1;
	g_return_if_fail (row != NULL);
	_tmp0_ = _g_object_ref0 (row);
	_tmp1_ = g_new0 (ProtonPlusWidgetsGamesGameRow*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp2__length1 = 1;
	proton_plus_widgets_games_box_open_mass_edit (self, _tmp2_, (gint) 1);
	_tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_object_unref), NULL);
}

static void
_____lambda169__proton_plus_widgets_games_game_row_mass_edit_requested (ProtonPlusWidgetsGamesGameRow* _sender,
                                                                        ProtonPlusWidgetsGamesGameRow* row,
                                                                        gpointer self)
{
	____lambda169_ ((ProtonPlusWidgetsGamesBox*) self, row);
}

static void
____lambda170_ (Block25Data* _data25_)
{
	ProtonPlusWidgetsGamesBox* self;
	ProtonPlusWidgetsGamesGameRow* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data25_->self;
	_tmp0_ = _data25_->game_row;
	_tmp1_ = proton_plus_widgets_games_game_row_get_selected (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkListBox* _tmp3_;
		ProtonPlusWidgetsGamesGameRow* _tmp4_;
		_tmp3_ = self->priv->game_list_box;
		_tmp4_ = _data25_->game_row;
		gtk_list_box_select_row (_tmp3_, (GtkListBoxRow*) _tmp4_);
	} else {
		GtkListBox* _tmp5_;
		ProtonPlusWidgetsGamesGameRow* _tmp6_;
		_tmp5_ = self->priv->game_list_box;
		_tmp6_ = _data25_->game_row;
		gtk_list_box_unselect_row (_tmp5_, (GtkListBoxRow*) _tmp6_);
	}
	proton_plus_widgets_games_box_update_selection_controls (self);
}

static void
_____lambda170__g_object_notify (GObject* _sender,
                                 GParamSpec* pspec,
                                 gpointer self)
{
	____lambda170_ (self);
}

void
proton_plus_widgets_games_box_load_games (ProtonPlusWidgetsGamesBox* self)
{
	AdwSpinner* _tmp0_;
	GtkSearchEntry* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GtkListBox* _tmp4_;
	GtkOverlay* _tmp5_;
	AdwSpinner* _tmp6_;
	GListStore* _tmp7_;
	GListStore* _tmp8_;
	ProtonPlusModelsCompatibilityTool* _tmp9_;
	ProtonPlusModelsCompatibilityTool* _tmp10_;
	ProtonPlusModelsLaunchersSteam* steam = NULL;
	ProtonPlusModelsLauncher* _tmp11_;
	ProtonPlusModelsLaunchersSteam* _tmp12_;
	ProtonPlusModelsLaunchersSteam* _tmp13_;
	ProtonPlusModelsLauncher* _tmp36_;
	GList* _tmp37_;
	GtkOverlay* _tmp52_;
	AdwSpinner* _tmp53_;
	AdwSpinner* _tmp54_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->spinner;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	if (self->priv->search_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->search_timeout_id);
		self->priv->search_timeout_id = (guint) 0;
	}
	_tmp1_ = self->priv->search_entry;
	_tmp2_ = gtk_editable_get_text ((GtkEditable*) _tmp1_);
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	_g_free0 (self->priv->search_query);
	self->priv->search_query = _tmp3_;
	_tmp4_ = self->priv->game_list_box;
	gtk_list_box_remove_all (_tmp4_);
	_tmp5_ = self->priv->overlay;
	_tmp6_ = self->priv->spinner;
	gtk_overlay_add_overlay (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = g_list_store_new (PROTON_PLUS_MODELS_TYPE_COMPATIBILITY_TOOL);
	_g_object_unref0 (self->priv->model);
	self->priv->model = _tmp7_;
	_tmp8_ = self->priv->model;
	_tmp9_ = proton_plus_models_compatibility_tool_new (_ ("Default"), "Default", "", PROTON_PLUS_MODELS_COMPATIBILITY_TOOL_RUNTIME_KIND_PROTON, "", FALSE);
	_tmp10_ = _tmp9_;
	g_list_store_append (_tmp8_, (GObject*) _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = self->priv->launcher;
	_tmp12_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp11_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp11_) : NULL);
	steam = _tmp12_;
	_tmp13_ = steam;
	if (_tmp13_ != NULL) {
		{
			GeeList* _ct_list = NULL;
			ProtonPlusModelsLaunchersSteam* _tmp14_;
			GeeList* _tmp15_;
			gint _ct_size = 0;
			GeeList* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			gint _ct_index = 0;
			_tmp14_ = steam;
			_tmp15_ = proton_plus_models_launchers_steam_get_assignable_compatibility_tools (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam));
			_ct_list = _tmp15_;
			_tmp16_ = _ct_list;
			_tmp17_ = gee_collection_get_size ((GeeCollection*) _tmp16_);
			_tmp18_ = _tmp17_;
			_ct_size = _tmp18_;
			_ct_index = -1;
			while (TRUE) {
				gint _tmp19_;
				gint _tmp20_;
				ProtonPlusModelsCompatibilityTool* ct = NULL;
				GeeList* _tmp21_;
				gpointer _tmp22_;
				GListStore* _tmp23_;
				ProtonPlusModelsCompatibilityTool* _tmp24_;
				_ct_index = _ct_index + 1;
				_tmp19_ = _ct_index;
				_tmp20_ = _ct_size;
				if (!(_tmp19_ < _tmp20_)) {
					break;
				}
				_tmp21_ = _ct_list;
				_tmp22_ = gee_list_get (_tmp21_, _ct_index);
				ct = (ProtonPlusModelsCompatibilityTool*) _tmp22_;
				_tmp23_ = self->priv->model;
				_tmp24_ = ct;
				g_list_store_append (_tmp23_, (GObject*) _tmp24_);
				_g_object_unref0 (ct);
			}
			_g_object_unref0 (_ct_list);
		}
	} else {
		{
			GeeLinkedList* _ct_list = NULL;
			ProtonPlusModelsLauncher* _tmp25_;
			GeeLinkedList* _tmp26_;
			gint _ct_size = 0;
			GeeLinkedList* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			gint _ct_index = 0;
			_tmp25_ = self->priv->launcher;
			_tmp26_ = _tmp25_->compatibility_tools;
			_ct_list = _tmp26_;
			_tmp27_ = _ct_list;
			_tmp28_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp27_);
			_tmp29_ = _tmp28_;
			_ct_size = _tmp29_;
			_ct_index = -1;
			while (TRUE) {
				gint _tmp30_;
				gint _tmp31_;
				ProtonPlusModelsCompatibilityTool* ct = NULL;
				GeeLinkedList* _tmp32_;
				gpointer _tmp33_;
				GListStore* _tmp34_;
				ProtonPlusModelsCompatibilityTool* _tmp35_;
				_ct_index = _ct_index + 1;
				_tmp30_ = _ct_index;
				_tmp31_ = _ct_size;
				if (!(_tmp30_ < _tmp31_)) {
					break;
				}
				_tmp32_ = _ct_list;
				_tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, _ct_index);
				ct = (ProtonPlusModelsCompatibilityTool*) _tmp33_;
				_tmp34_ = self->priv->model;
				_tmp35_ = ct;
				g_list_store_append (_tmp34_, (GObject*) _tmp35_);
				_g_object_unref0 (ct);
			}
		}
	}
	_tmp36_ = self->priv->launcher;
	_tmp37_ = _tmp36_->games;
	{
		GList* game_collection = NULL;
		GList* game_it = NULL;
		game_collection = _tmp37_;
		for (game_it = game_collection; game_it != NULL; game_it = game_it->next) {
			ProtonPlusModelsGame* _tmp38_;
			ProtonPlusModelsGame* game = NULL;
			_tmp38_ = _g_object_ref0 ((ProtonPlusModelsGame*) game_it->data);
			game = _tmp38_;
			{
				Block25Data* _data25_;
				ProtonPlusModelsGame* _tmp39_;
				ProtonPlusModelsLauncher* _tmp40_;
				GtkSizeGroup* _tmp41_;
				GtkSizeGroup* _tmp42_;
				GtkSizeGroup* _tmp43_;
				GtkSizeGroup* _tmp44_;
				GtkSearchEntry* _tmp45_;
				ProtonPlusWidgetsGamesMassEditButton* _tmp46_;
				ProtonPlusWidgetsGamesGameRow* _tmp47_;
				ProtonPlusWidgetsGamesGameRow* _tmp48_;
				ProtonPlusWidgetsGamesGameRow* _tmp49_;
				GtkListBox* _tmp50_;
				ProtonPlusWidgetsGamesGameRow* _tmp51_;
				_data25_ = g_slice_new0 (Block25Data);
				_data25_->_ref_count_ = 1;
				_data25_->self = g_object_ref (self);
				_tmp39_ = game;
				_tmp40_ = self->priv->launcher;
				_tmp41_ = self->priv->prefix_column_size_group;
				_tmp42_ = self->priv->tool_column_size_group;
				_tmp43_ = self->priv->actions_column_size_group;
				_tmp44_ = self->priv->filter_column_size_group;
				_tmp45_ = self->priv->search_entry;
				_tmp46_ = self->priv->mass_edit_button;
				_tmp47_ = proton_plus_widgets_games_game_row_new (_tmp39_, _tmp40_->has_library_support, _tmp41_, _tmp42_, _tmp43_, _tmp44_, (GtkWidget*) _tmp45_, (GtkWidget*) _tmp46_);
				g_object_ref_sink (_tmp47_);
				_data25_->game_row = _tmp47_;
				_tmp48_ = _data25_->game_row;
				g_signal_connect_object (_tmp48_, "mass-edit-requested", (GCallback) _____lambda169__proton_plus_widgets_games_game_row_mass_edit_requested, self, 0);
				_tmp49_ = _data25_->game_row;
				g_signal_connect_data ((GObject*) _tmp49_, "notify::selected", (GCallback) _____lambda170__g_object_notify, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
				_tmp50_ = self->priv->game_list_box;
				_tmp51_ = _data25_->game_row;
				gtk_list_box_append (_tmp50_, (GtkWidget*) _tmp51_);
				_g_object_unref0 (game);
				block25_data_unref (_data25_);
				_data25_ = NULL;
			}
		}
	}
	proton_plus_widgets_games_box_update_empty_state (self);
	proton_plus_widgets_games_box_update_selection_controls (self);
	_tmp52_ = self->priv->overlay;
	_tmp53_ = self->priv->spinner;
	gtk_overlay_remove_overlay (_tmp52_, (GtkWidget*) _tmp53_);
	_tmp54_ = self->priv->spinner;
	gtk_widget_set_visible ((GtkWidget*) _tmp54_, FALSE);
	_g_object_unref0 (steam);
}

static gboolean
__lambda171_ (ProtonPlusWidgetsGamesBox* self)
{
	gboolean result;
	self->priv->search_timeout_id = (guint) 0;
	proton_plus_widgets_games_box_refilter_games (self);
	result = FALSE;
	return result;
}

static gboolean
___lambda171__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda171_ ((ProtonPlusWidgetsGamesBox*) self);
	return result;
}

static void
proton_plus_widgets_games_box_schedule_search_filter (ProtonPlusWidgetsGamesBox* self)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_utf8_strdown (_tmp1_, (gssize) -1);
	_g_free0 (self->priv->search_query);
	self->priv->search_query = _tmp2_;
	if (self->priv->search_timeout_id != ((guint) 0)) {
		g_source_remove (self->priv->search_timeout_id);
	}
	self->priv->search_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 150, ___lambda171__gsource_func, g_object_ref (self), g_object_unref);
}

static void
proton_plus_widgets_games_box_refilter_games (ProtonPlusWidgetsGamesBox* self)
{
	GtkListBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game_list_box;
	gtk_list_box_invalidate_filter (_tmp0_);
	proton_plus_widgets_games_box_update_empty_state (self);
	proton_plus_widgets_games_box_update_selection_controls (self);
}

static void
proton_plus_widgets_games_box_update_filter_button_state (ProtonPlusWidgetsGamesBox* self)
{
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkCheckButton* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->all_filter_check;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		GtkMenuButton* _tmp3_;
		_tmp3_ = self->priv->filter_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp3_, "games-filter-active");
	} else {
		GtkMenuButton* _tmp4_;
		_tmp4_ = self->priv->filter_button;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp4_, "games-filter-active");
	}
	_tmp5_ = self->priv->native_filter_check;
	_tmp6_ = gtk_check_button_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_) {
		GtkMenuButton* _tmp8_;
		_tmp8_ = self->priv->filter_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _ ("Filter: Native"));
	} else {
		GtkCheckButton* _tmp9_;
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp9_ = self->priv->non_steam_filter_check;
		_tmp10_ = gtk_check_button_get_active (_tmp9_);
		_tmp11_ = _tmp10_;
		if (_tmp11_) {
			GtkMenuButton* _tmp12_;
			_tmp12_ = self->priv->filter_button;
			gtk_widget_set_tooltip_text ((GtkWidget*) _tmp12_, _ ("Filter: Non-Steam"));
		} else {
			GtkMenuButton* _tmp13_;
			_tmp13_ = self->priv->filter_button;
			gtk_widget_set_tooltip_text ((GtkWidget*) _tmp13_, _ ("Filter: All games"));
		}
	}
}

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

static void
proton_plus_widgets_games_box_update_empty_state (ProtonPlusWidgetsGamesBox* self)
{
	gboolean has_visible = FALSE;
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gboolean _tmp14_;
	GtkStack* _tmp27_;
	g_return_if_fail (self != NULL);
	has_visible = FALSE;
	_tmp0_ = self->priv->game_list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		gboolean _tmp4_ = FALSE;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp5_ = child;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp5_)) {
			GtkWidget* _tmp6_;
			_tmp6_ = child;
			_tmp4_ = proton_plus_widgets_games_box_filter_game_row (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_list_box_row_get_type (), GtkListBoxRow));
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			has_visible = TRUE;
			break;
		}
		_tmp7_ = child;
		_tmp8_ = gtk_widget_get_next_sibling (_tmp7_);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (child);
		child = _tmp9_;
	}
	if (has_visible) {
		GtkStack* _tmp10_;
		_tmp10_ = self->priv->list_stack;
		gtk_stack_set_visible_child_name (_tmp10_, "list");
		_g_object_unref0 (child);
		return;
	}
	_tmp11_ = self->priv->search_query;
	_tmp12_ = string_strip (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strcmp0 (_tmp13_, "") != 0;
	_g_free0 (_tmp13_);
	if (_tmp14_) {
		AdwStatusPage* _tmp15_;
		AdwStatusPage* _tmp16_;
		AdwStatusPage* _tmp17_;
		_tmp15_ = self->priv->empty_status_page;
		adw_status_page_set_title (_tmp15_, _ ("No matching games"));
		_tmp16_ = self->priv->empty_status_page;
		adw_status_page_set_description (_tmp16_, _ ("Try a different search term or clear the search."));
		_tmp17_ = self->priv->empty_status_page;
		adw_status_page_set_icon_name (_tmp17_, "magnifying-glass-symbolic");
	} else {
		GtkCheckButton* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
		_tmp18_ = self->priv->all_filter_check;
		_tmp19_ = gtk_check_button_get_active (_tmp18_);
		_tmp20_ = _tmp19_;
		if (!_tmp20_) {
			AdwStatusPage* _tmp21_;
			AdwStatusPage* _tmp22_;
			AdwStatusPage* _tmp23_;
			_tmp21_ = self->priv->empty_status_page;
			adw_status_page_set_title (_tmp21_, _ ("No games match this filter"));
			_tmp22_ = self->priv->empty_status_page;
			adw_status_page_set_description (_tmp22_, _ ("Choose All games to see your complete library."));
			_tmp23_ = self->priv->empty_status_page;
			adw_status_page_set_icon_name (_tmp23_, "filter-2-symbolic");
		} else {
			AdwStatusPage* _tmp24_;
			AdwStatusPage* _tmp25_;
			AdwStatusPage* _tmp26_;
			_tmp24_ = self->priv->empty_status_page;
			adw_status_page_set_title (_tmp24_, _ ("No games found"));
			_tmp25_ = self->priv->empty_status_page;
			adw_status_page_set_description (_tmp25_, _ ("No games are available for this launcher."));
			_tmp26_ = self->priv->empty_status_page;
			adw_status_page_set_icon_name (_tmp26_, "gamepad-symbolic");
		}
	}
	_tmp27_ = self->priv->list_stack;
	gtk_stack_set_visible_child_name (_tmp27_, "empty");
	_g_object_unref0 (child);
}

static gboolean
proton_plus_widgets_games_box_filter_game_row (ProtonPlusWidgetsGamesBox* self,
                                               GtkListBoxRow* row)
{
	ProtonPlusWidgetsGamesGameRow* game_row = NULL;
	ProtonPlusWidgetsGamesGameRow* _tmp0_;
	ProtonPlusModelsGame* game = NULL;
	ProtonPlusWidgetsGamesGameRow* _tmp1_;
	ProtonPlusModelsGame* _tmp2_;
	ProtonPlusModelsGame* _tmp3_;
	ProtonPlusModelsGame* _tmp4_;
	ProtonPlusWidgetsGamesGameRow* _tmp5_;
	const gchar* _tmp6_;
	GtkCheckButton* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	GtkCheckButton* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (row != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (row, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
	game_row = _tmp0_;
	_tmp1_ = game_row;
	_tmp2_ = proton_plus_widgets_games_game_row_get_game (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	game = _tmp4_;
	_tmp5_ = game_row;
	_tmp6_ = self->priv->search_query;
	if (!proton_plus_widgets_games_game_row_matches_search (_tmp5_, _tmp6_)) {
		result = FALSE;
		_g_object_unref0 (game);
		_g_object_unref0 (game_row);
		return result;
	}
	_tmp7_ = self->priv->non_steam_filter_check;
	_tmp8_ = gtk_check_button_get_active (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		gboolean _tmp10_ = FALSE;
		ProtonPlusModelsGame* _tmp11_;
		_tmp11_ = game;
		if (PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp11_)) {
			ProtonPlusModelsGame* _tmp12_;
			gboolean _tmp13_;
			gboolean _tmp14_;
			_tmp12_ = game;
			_tmp13_ = proton_plus_models_games_steam_get_is_non_steam (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam));
			_tmp14_ = _tmp13_;
			_tmp10_ = _tmp14_;
		} else {
			_tmp10_ = FALSE;
		}
		result = _tmp10_;
		_g_object_unref0 (game);
		_g_object_unref0 (game_row);
		return result;
	}
	_tmp15_ = self->priv->native_filter_check;
	_tmp16_ = gtk_check_button_get_active (_tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_) {
		ProtonPlusModelsGame* _tmp18_;
		gboolean _tmp19_;
		gboolean _tmp20_;
		_tmp18_ = game;
		_tmp19_ = proton_plus_models_game_get_is_native (_tmp18_);
		_tmp20_ = _tmp19_;
		result = _tmp20_;
		_g_object_unref0 (game);
		_g_object_unref0 (game_row);
		return result;
	}
	result = TRUE;
	_g_object_unref0 (game);
	_g_object_unref0 (game_row);
	return result;
}

static void
proton_plus_widgets_games_box_update_selection_controls (ProtonPlusWidgetsGamesBox* self)
{
	gint selected_count = 0;
	gint visible_count = 0;
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean _tmp15_ = FALSE;
	GtkCheckButton* _tmp16_;
	gboolean _tmp17_ = FALSE;
	GtkCheckButton* _tmp18_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp19_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp20_;
	g_return_if_fail (self != NULL);
	selected_count = 0;
	visible_count = 0;
	_tmp0_ = self->priv->game_list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		gboolean _tmp4_ = FALSE;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp5_ = child;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp5_)) {
			GtkWidget* _tmp6_;
			_tmp6_ = child;
			_tmp4_ = gtk_widget_get_visible (_tmp6_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			gint _tmp7_;
			GtkWidget* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp7_ = visible_count;
			visible_count = _tmp7_ + 1;
			_tmp8_ = child;
			_tmp9_ = proton_plus_widgets_games_game_row_get_selected (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
			_tmp10_ = _tmp9_;
			if (_tmp10_) {
				gint _tmp11_;
				_tmp11_ = selected_count;
				selected_count = _tmp11_ + 1;
			}
		}
		_tmp12_ = child;
		_tmp13_ = gtk_widget_get_next_sibling (_tmp12_);
		_tmp14_ = _g_object_ref0 (_tmp13_);
		_g_object_unref0 (child);
		child = _tmp14_;
	}
	self->priv->updating_selection_toggle = TRUE;
	if (selected_count > 0) {
		_tmp15_ = selected_count < visible_count;
	} else {
		_tmp15_ = FALSE;
	}
	_tmp16_ = self->priv->check_button;
	gtk_check_button_set_inconsistent (_tmp16_, _tmp15_);
	if (visible_count > 0) {
		_tmp17_ = selected_count == visible_count;
	} else {
		_tmp17_ = FALSE;
	}
	_tmp18_ = self->priv->check_button;
	gtk_check_button_set_active (_tmp18_, _tmp17_);
	self->priv->updating_selection_toggle = FALSE;
	_tmp19_ = self->priv->mass_edit_button;
	proton_plus_widgets_games_mass_edit_button_set_selected_count (_tmp19_, selected_count);
	_tmp20_ = self->priv->mass_edit_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp20_, selected_count >= 2);
	_g_object_unref0 (child);
}

static void
proton_plus_widgets_games_box_open_mass_edit (ProtonPlusWidgetsGamesBox* self,
                                              ProtonPlusWidgetsGamesGameRow** rows,
                                              gint rows_length1)
{
	ProtonPlusWidgetsGamesMassEditView* _tmp0_;
	GListStore* _tmp1_;
	GtkPropertyExpression* _tmp2_;
	GtkMenuButton* _tmp3_;
	ProtonPlusWidgetsGamesMassEditView* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkMenuButton* _tmp7_;
	GtkLabel* _tmp8_;
	ProtonPlusWidgetsGamesMassEditView* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GtkListBox* _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->mass_edit_view;
	_tmp1_ = self->priv->model;
	_tmp2_ = self->priv->expression;
	proton_plus_widgets_games_mass_edit_view_load (_tmp0_, rows, (gint) rows_length1, _tmp1_, _tmp2_);
	_tmp3_ = self->priv->selection_button;
	_tmp4_ = self->priv->mass_edit_view;
	_tmp5_ = proton_plus_widgets_games_mass_edit_view_get_selection_text (_tmp4_);
	_tmp6_ = _tmp5_;
	gtk_menu_button_set_label (_tmp3_, _tmp6_);
	_g_free0 (_tmp6_);
	_tmp7_ = self->priv->selection_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp7_, TRUE);
	_tmp8_ = self->priv->selection_popover_title;
	_tmp9_ = self->priv->mass_edit_view;
	_tmp10_ = proton_plus_widgets_games_mass_edit_view_get_selection_text (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_label_set_label (_tmp8_, _tmp11_);
	_g_free0 (_tmp11_);
	_tmp12_ = self->priv->selection_list_box;
	gtk_list_box_remove_all (_tmp12_);
	{
		ProtonPlusWidgetsGamesGameRow** row_collection = NULL;
		gint row_collection_length1 = 0;
		gint _row_collection_size_ = 0;
		gint row_it = 0;
		row_collection = rows;
		row_collection_length1 = rows_length1;
		for (row_it = 0; row_it < row_collection_length1; row_it = row_it + 1) {
			ProtonPlusWidgetsGamesGameRow* _tmp13_;
			ProtonPlusWidgetsGamesGameRow* row = NULL;
			_tmp13_ = _g_object_ref0 (row_collection[row_it]);
			row = _tmp13_;
			{
				GtkLabel* title = NULL;
				ProtonPlusWidgetsGamesGameRow* _tmp14_;
				ProtonPlusModelsGame* _tmp15_;
				ProtonPlusModelsGame* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				GtkLabel* _tmp19_ = NULL;
				GtkBox* selection_row_content = NULL;
				GtkBox* _tmp20_;
				GtkBox* _tmp21_;
				GtkBox* _tmp22_;
				GtkImage* _tmp23_;
				GtkImage* _tmp24_;
				GtkBox* _tmp25_;
				GtkLabel* _tmp26_;
				GtkListBoxRow* selection_row = NULL;
				GtkBox* _tmp27_;
				GtkWidget* _tmp28_;
				GtkListBoxRow* _tmp29_ = NULL;
				GtkListBox* _tmp30_;
				GtkListBoxRow* _tmp31_;
				_tmp14_ = row;
				_tmp15_ = proton_plus_widgets_games_game_row_get_game (_tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = proton_plus_models_game_get_name (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = (GtkLabel*) gtk_label_new (_tmp18_);
				gtk_widget_set_halign ((GtkWidget*) _tmp19_, GTK_ALIGN_START);
				gtk_widget_set_hexpand ((GtkWidget*) _tmp19_, TRUE);
				gtk_label_set_xalign (_tmp19_, (gfloat) 0);
				gtk_label_set_ellipsize (_tmp19_, PANGO_ELLIPSIZE_END);
				g_object_ref_sink (_tmp19_);
				title = _tmp19_;
				_tmp20_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
				g_object_ref_sink (_tmp20_);
				selection_row_content = _tmp20_;
				_tmp21_ = selection_row_content;
				gtk_widget_add_css_class ((GtkWidget*) _tmp21_, "selection-popover-row");
				_tmp22_ = selection_row_content;
				_tmp23_ = (GtkImage*) gtk_image_new_from_icon_name ("gamepad-symbolic");
				g_object_ref_sink (_tmp23_);
				_tmp24_ = _tmp23_;
				gtk_box_append (_tmp22_, (GtkWidget*) _tmp24_);
				_g_object_unref0 (_tmp24_);
				_tmp25_ = selection_row_content;
				_tmp26_ = title;
				gtk_box_append (_tmp25_, (GtkWidget*) _tmp26_);
				_tmp27_ = selection_row_content;
				_tmp28_ = _g_object_ref0 ((GtkWidget*) _tmp27_);
				_tmp29_ = (GtkListBoxRow*) gtk_list_box_row_new ();
				gtk_list_box_row_set_activatable (_tmp29_, FALSE);
				gtk_list_box_row_set_selectable (_tmp29_, FALSE);
				gtk_widget_set_focusable ((GtkWidget*) _tmp29_, FALSE);
				gtk_list_box_row_set_child (_tmp29_, _tmp28_);
				_g_object_unref0 (_tmp28_);
				g_object_ref_sink (_tmp29_);
				selection_row = _tmp29_;
				_tmp30_ = self->priv->selection_list_box;
				_tmp31_ = selection_row;
				gtk_list_box_append (_tmp30_, (GtkWidget*) _tmp31_);
				_g_object_unref0 (selection_row);
				_g_object_unref0 (selection_row_content);
				_g_object_unref0 (title);
				_g_object_unref0 (row);
			}
		}
	}
	self->priv->mass_edit_cleanup_pending = TRUE;
	proton_plus_widgets_games_box_push_mass_edit_page (self);
}

void
proton_plus_widgets_games_box_show_games_list_page (ProtonPlusWidgetsGamesBox* self)
{
	gboolean cleanup_was_pending = FALSE;
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationPage* _tmp2_;
	g_return_if_fail (self != NULL);
	cleanup_was_pending = self->priv->mass_edit_cleanup_pending;
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	_tmp2_ = self->priv->mass_edit_page;
	if (_tmp1_ == _tmp2_) {
		if (!proton_plus_widgets_games_box_pop_page (self)) {
			AdwNavigationView* _tmp3_;
			AdwNavigationPage* _tmp4_;
			AdwNavigationPage* _tmp5_;
			AdwNavigationPage** _tmp6_;
			AdwNavigationPage** _tmp7_;
			gint _tmp7__length1;
			_tmp3_ = self->priv->navigation_view;
			_tmp4_ = self->priv->list_page;
			_tmp5_ = _g_object_ref0 (_tmp4_);
			_tmp6_ = g_new0 (AdwNavigationPage*, 1 + 1);
			_tmp6_[0] = _tmp5_;
			_tmp7_ = _tmp6_;
			_tmp7__length1 = 1;
			adw_navigation_view_replace (_tmp3_, _tmp7_, (gint) 1);
			_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_object_unref), NULL);
		}
	} else {
		AdwNavigationView* _tmp8_;
		AdwNavigationPage* _tmp9_;
		AdwNavigationPage* _tmp10_;
		AdwNavigationPage** _tmp11_;
		AdwNavigationPage** _tmp12_;
		gint _tmp12__length1;
		_tmp8_ = self->priv->navigation_view;
		_tmp9_ = self->priv->list_page;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_tmp11_ = g_new0 (AdwNavigationPage*, 1 + 1);
		_tmp11_[0] = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp12__length1 = 1;
		adw_navigation_view_replace (_tmp8_, _tmp12_, (gint) 1);
		_tmp12_ = (_vala_array_free (_tmp12_, _tmp12__length1, (GDestroyNotify) g_object_unref), NULL);
	}
	if (cleanup_was_pending) {
		proton_plus_widgets_games_box_cleanup_mass_edit_exit (self);
	} else {
		proton_plus_widgets_games_box_reset_games_list_state (self);
	}
}

static void
proton_plus_widgets_games_box_push_mass_edit_page (ProtonPlusWidgetsGamesBox* self)
{
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationPage* _tmp2_;
	GListModel* navigation_stack = NULL;
	AdwNavigationView* _tmp3_;
	GListModel* _tmp4_;
	AdwNavigationView* _tmp15_;
	AdwNavigationPage* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	_tmp2_ = self->priv->mass_edit_page;
	if (_tmp1_ == _tmp2_) {
		return;
	}
	_tmp3_ = self->priv->navigation_view;
	_tmp4_ = adw_navigation_view_get_navigation_stack (_tmp3_);
	navigation_stack = _tmp4_;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GListModel* _tmp7_;
				GListModel* _tmp8_;
				GObject* _tmp9_;
				GObject* _tmp10_;
				AdwNavigationPage* _tmp11_;
				gboolean _tmp12_;
				if (!_tmp5_) {
					guint _tmp6_;
					_tmp6_ = i;
					i = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = navigation_stack;
				if (!(i < g_list_model_get_n_items (_tmp7_))) {
					break;
				}
				_tmp8_ = navigation_stack;
				_tmp9_ = g_list_model_get_item (_tmp8_, i);
				_tmp10_ = _tmp9_;
				_tmp11_ = self->priv->mass_edit_page;
				_tmp12_ = _tmp10_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, G_TYPE_OBJECT, GObject);
				_g_object_unref0 (_tmp10_);
				if (_tmp12_) {
					AdwNavigationView* _tmp13_;
					AdwNavigationPage* _tmp14_;
					_tmp13_ = self->priv->navigation_view;
					_tmp14_ = self->priv->mass_edit_page;
					adw_navigation_view_pop_to_page (_tmp13_, _tmp14_);
					_g_object_unref0 (navigation_stack);
					return;
				}
			}
		}
	}
	_tmp15_ = self->priv->navigation_view;
	_tmp16_ = self->priv->mass_edit_page;
	adw_navigation_view_push (_tmp15_, _tmp16_);
	_g_object_unref0 (navigation_stack);
}

static gboolean
proton_plus_widgets_games_box_pop_page (ProtonPlusWidgetsGamesBox* self)
{
	AdwNavigationView* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->navigation_view;
	result = adw_navigation_view_pop (_tmp0_);
	return result;
}

static void
proton_plus_widgets_games_box_cleanup_mass_edit_exit (ProtonPlusWidgetsGamesBox* self)
{
	g_return_if_fail (self != NULL);
	if (!self->priv->mass_edit_cleanup_pending) {
		return;
	}
	self->priv->mass_edit_cleanup_pending = FALSE;
	proton_plus_widgets_games_box_reset_games_list_state (self);
}

static void
proton_plus_widgets_games_box_reset_games_list_state (ProtonPlusWidgetsGamesBox* self)
{
	GtkPopover* _tmp0_;
	GtkMenuButton* _tmp1_;
	GtkSearchEntry* _tmp2_;
	GtkCheckButton* _tmp3_;
	GtkCheckButton* _tmp4_;
	GtkWidget* child = NULL;
	GtkListBox* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selection_popover;
	gtk_popover_popdown (_tmp0_);
	_tmp1_ = self->priv->selection_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp2_, "");
	_tmp3_ = self->priv->all_filter_check;
	gtk_check_button_set_active (_tmp3_, TRUE);
	_tmp4_ = self->priv->check_button;
	gtk_check_button_set_active (_tmp4_, FALSE);
	_tmp5_ = self->priv->game_list_box;
	_tmp6_ = gtk_widget_get_first_child ((GtkWidget*) _tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	child = _tmp7_;
	while (TRUE) {
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp11_;
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		_tmp8_ = child;
		if (!(_tmp8_ != NULL)) {
			break;
		}
		_tmp9_ = child;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp9_)) {
			GtkWidget* _tmp10_;
			_tmp10_ = child;
			proton_plus_widgets_games_game_row_set_selected (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow), FALSE);
		}
		_tmp11_ = child;
		_tmp12_ = gtk_widget_get_next_sibling (_tmp11_);
		_tmp13_ = _g_object_ref0 (_tmp12_);
		_g_object_unref0 (child);
		child = _tmp13_;
	}
	proton_plus_widgets_games_box_update_selection_controls (self);
	_g_object_unref0 (child);
}

static gchar*
proton_plus_widgets_games_box_real_get_controller_page_id (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	const gchar* _tmp0_ = NULL;
	AdwNavigationView* _tmp1_;
	AdwNavigationPage* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp1_ = self->priv->navigation_view;
	_tmp2_ = adw_navigation_view_get_visible_page (_tmp1_);
	_tmp3_ = adw_navigation_page_get_tag (_tmp2_);
	_tmp0_ = _tmp3_;
	if (_tmp0_ == NULL) {
		_tmp0_ = "list";
	}
	_tmp4_ = g_strdup_printf ("games:%s", _tmp0_);
	result = _tmp4_;
	return result;
}

static GObject*
proton_plus_widgets_games_box_real_get_controller_page_root (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	GtkWidget* _tmp2_;
	GObject* _tmp3_;
	GObject* result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	_tmp2_ = adw_navigation_page_get_child (_tmp1_);
	_tmp3_ = _g_object_ref0 ((GObject*) _tmp2_);
	result = _tmp3_;
	return result;
}

static GObject*
proton_plus_widgets_games_box_real_get_controller_initial_focus (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationPage* _tmp2_;
	GtkWidget* child = NULL;
	GtkListBox* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	GObject* result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	_tmp2_ = self->priv->mass_edit_page;
	if (_tmp1_ == _tmp2_) {
		ProtonPlusWidgetsGamesMassEditView* _tmp3_;
		GtkWidget* _tmp4_;
		_tmp3_ = self->priv->mass_edit_view;
		_tmp4_ = proton_plus_widgets_games_mass_edit_view_get_controller_initial_focus (_tmp3_);
		result = (GObject*) _tmp4_;
		return result;
	}
	_tmp5_ = self->priv->game_list_box;
	_tmp6_ = gtk_widget_get_first_child ((GtkWidget*) _tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	child = _tmp7_;
	while (TRUE) {
		GtkWidget* _tmp8_;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp20_;
		GtkWidget* _tmp21_;
		GtkWidget* _tmp22_;
		_tmp8_ = child;
		if (!(_tmp8_ != NULL)) {
			break;
		}
		_tmp14_ = child;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp14_)) {
			GtkWidget* _tmp15_;
			_tmp15_ = child;
			_tmp13_ = gtk_widget_get_mapped (_tmp15_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			GtkWidget* _tmp16_;
			_tmp16_ = child;
			_tmp12_ = gtk_widget_is_visible (_tmp16_);
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			GtkWidget* _tmp17_;
			_tmp17_ = child;
			_tmp11_ = gtk_widget_get_child_visible (_tmp17_);
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			GtkWidget* _tmp18_;
			_tmp18_ = child;
			_tmp10_ = gtk_widget_is_sensitive (_tmp18_);
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			GtkWidget* _tmp19_;
			_tmp19_ = child;
			_tmp9_ = gtk_widget_get_focusable (_tmp19_);
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			result = (GObject*) child;
			return result;
		}
		_tmp20_ = child;
		_tmp21_ = gtk_widget_get_next_sibling (_tmp20_);
		_tmp22_ = _g_object_ref0 (_tmp21_);
		_g_object_unref0 (child);
		child = _tmp22_;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_navigate_back (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	result = proton_plus_widgets_games_box_pop_page (self);
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_can_navigate_back (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationPage* _tmp2_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	_tmp2_ = self->priv->mass_edit_page;
	result = _tmp1_ == _tmp2_;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_can_switch_page (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_prefers_initial_focus_after_switch (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_switch_page (ProtonPlusUtilsControllerNavigationHost* base,
                                                           gint delta)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_can_open_search (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	AdwNavigationView* _tmp3_;
	AdwNavigationPage* _tmp4_;
	AdwNavigationPage* _tmp5_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp3_ = self->priv->navigation_view;
	_tmp4_ = adw_navigation_view_get_visible_page (_tmp3_);
	_tmp5_ = self->priv->list_page;
	if (_tmp4_ == _tmp5_) {
		GtkSearchEntry* _tmp6_;
		_tmp6_ = self->priv->search_entry;
		_tmp2_ = gtk_widget_get_mapped ((GtkWidget*) _tmp6_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkSearchEntry* _tmp7_;
		_tmp7_ = self->priv->search_entry;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp7_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkSearchEntry* _tmp8_;
		_tmp8_ = self->priv->search_entry;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp8_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_can_open_filter (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsGamesBox * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	AdwNavigationView* _tmp3_;
	AdwNavigationPage* _tmp4_;
	AdwNavigationPage* _tmp5_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	_tmp3_ = self->priv->navigation_view;
	_tmp4_ = adw_navigation_view_get_visible_page (_tmp3_);
	_tmp5_ = self->priv->list_page;
	if (_tmp4_ == _tmp5_) {
		GtkMenuButton* _tmp6_;
		_tmp6_ = self->priv->filter_button;
		_tmp2_ = gtk_widget_get_mapped ((GtkWidget*) _tmp6_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkMenuButton* _tmp7_;
		_tmp7_ = self->priv->filter_button;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp7_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp8_;
		_tmp8_ = self->priv->filter_button;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp8_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_open_search (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsGamesBox * self;
	GtkSearchEntry* _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	if (!proton_plus_utils_controller_page_shortcuts_controller_can_open_search ((ProtonPlusUtilsControllerPageShortcuts*) self)) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->search_entry;
	result = gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	return result;
}

static gboolean
proton_plus_widgets_games_box_real_controller_open_filter (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsGamesBox * self;
	GtkMenuButton* _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsGamesBox*) base;
	if (!proton_plus_utils_controller_page_shortcuts_controller_can_open_filter ((ProtonPlusUtilsControllerPageShortcuts*) self)) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->filter_button;
	gtk_menu_button_popup (_tmp0_);
	result = TRUE;
	return result;
}

ProtonPlusWidgetsGamesBox*
proton_plus_widgets_games_box_construct (GType object_type)
{
	ProtonPlusWidgetsGamesBox * self = NULL;
	self = (ProtonPlusWidgetsGamesBox*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsGamesBox*
proton_plus_widgets_games_box_new (void)
{
	return proton_plus_widgets_games_box_construct (PROTON_PLUS_WIDGETS_GAMES_TYPE_BOX);
}

static gboolean
proton_plus_widgets_games_box_get_error (ProtonPlusWidgetsGamesBox* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_error;
	return result;
}

static void
proton_plus_widgets_games_box_set_error (ProtonPlusWidgetsGamesBox* self,
                                         gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_error = value;
}

static gboolean
proton_plus_widgets_games_box_get_invalid (ProtonPlusWidgetsGamesBox* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_invalid;
	return result;
}

static void
proton_plus_widgets_games_box_set_invalid (ProtonPlusWidgetsGamesBox* self,
                                           gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_invalid = value;
}

static Block26Data*
block26_data_ref (Block26Data* _data26_)
{
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}

static void
block26_data_unref (void * _userdata_)
{
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		ProtonPlusWidgetsGamesBox* self;
		self = _data26_->self;
		_g_object_unref0 (_data26_->filter_popover);
		_g_object_unref0 (self);
		g_slice_free (Block26Data, _data26_);
	}
}

static gboolean
_proton_plus_widgets_games_box_filter_game_row_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                         gpointer self)
{
	gboolean result;
	result = proton_plus_widgets_games_box_filter_game_row ((ProtonPlusWidgetsGamesBox*) self, row);
	return result;
}

static gint
_proton_plus_widgets_games_box___lambda172_ (ProtonPlusWidgetsGamesBox* self,
                                             GtkListBoxRow* row1,
                                             GtkListBoxRow* row2)
{
	gchar* name1 = NULL;
	ProtonPlusModelsGame* _tmp0_;
	ProtonPlusModelsGame* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* name2 = NULL;
	ProtonPlusModelsGame* _tmp5_;
	ProtonPlusModelsGame* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	GCompareFunc _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gint result;
	g_return_val_if_fail (row1 != NULL, -1);
	g_return_val_if_fail (row2 != NULL, -1);
	_tmp0_ = proton_plus_widgets_games_game_row_get_game (G_TYPE_CHECK_INSTANCE_CAST (row1, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_game_get_name (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	name1 = _tmp4_;
	_tmp5_ = proton_plus_widgets_games_game_row_get_game (G_TYPE_CHECK_INSTANCE_CAST (row2, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow));
	_tmp6_ = _tmp5_;
	_tmp7_ = proton_plus_models_game_get_name (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup (_tmp8_);
	name2 = _tmp9_;
	_tmp10_ = ((GCompareFunc) g_strcmp0);
	_tmp11_ = name1;
	_tmp12_ = name2;
	result = _tmp10_ (_tmp11_, _tmp12_);
	_g_free0 (name2);
	_g_free0 (name1);
	return result;
}

static gint
__proton_plus_widgets_games_box___lambda172__gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                     GtkListBoxRow* row2,
                                                                     gpointer self)
{
	gint result;
	result = _proton_plus_widgets_games_box___lambda172_ ((ProtonPlusWidgetsGamesBox*) self, row1, row2);
	return result;
}

static void
_proton_plus_widgets_games_box_open_mass_edit_proton_plus_widgets_games_mass_edit_button_mass_edit_requested (ProtonPlusWidgetsGamesMassEditButton* _sender,
                                                                                                              ProtonPlusWidgetsGamesGameRow** rows,
                                                                                                              gint rows_length1,
                                                                                                              gpointer self)
{
	proton_plus_widgets_games_box_open_mass_edit ((ProtonPlusWidgetsGamesBox*) self, rows, rows_length1);
}

static void
_proton_plus_widgets_games_box___lambda173_ (Block26Data* _data26_)
{
	ProtonPlusWidgetsGamesBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data26_->self;
	_tmp0_ = self->priv->all_filter_check;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_games_box_refilter_games (self);
		proton_plus_widgets_games_box_update_filter_button_state (self);
		_tmp3_ = _data26_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
__proton_plus_widgets_games_box___lambda173__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                       gpointer self)
{
	_proton_plus_widgets_games_box___lambda173_ (self);
}

static void
_proton_plus_widgets_games_box___lambda174_ (Block26Data* _data26_)
{
	ProtonPlusWidgetsGamesBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data26_->self;
	_tmp0_ = self->priv->native_filter_check;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_games_box_refilter_games (self);
		proton_plus_widgets_games_box_update_filter_button_state (self);
		_tmp3_ = _data26_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
__proton_plus_widgets_games_box___lambda174__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                       gpointer self)
{
	_proton_plus_widgets_games_box___lambda174_ (self);
}

static void
_proton_plus_widgets_games_box___lambda175_ (Block26Data* _data26_)
{
	ProtonPlusWidgetsGamesBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data26_->self;
	_tmp0_ = self->priv->non_steam_filter_check;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_games_box_refilter_games (self);
		proton_plus_widgets_games_box_update_filter_button_state (self);
		_tmp3_ = _data26_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
__proton_plus_widgets_games_box___lambda175__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                       gpointer self)
{
	_proton_plus_widgets_games_box___lambda175_ (self);
}

static void
_proton_plus_widgets_games_box_schedule_search_filter_gtk_editable_changed (GtkEditable* _sender,
                                                                            gpointer self)
{
	proton_plus_widgets_games_box_schedule_search_filter ((ProtonPlusWidgetsGamesBox*) self);
}

static void
_proton_plus_widgets_games_box___lambda176_ (ProtonPlusWidgetsGamesBox* self)
{
	gboolean is_active = FALSE;
	GtkCheckButton* _tmp0_;
	GtkWidget* child = NULL;
	GtkListBox* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	if (self->priv->updating_selection_toggle) {
		return;
	}
	_tmp0_ = self->priv->check_button;
	is_active = gtk_check_button_get_active (_tmp0_);
	_tmp1_ = self->priv->game_list_box;
	_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	child = _tmp3_;
	while (TRUE) {
		GtkWidget* _tmp4_;
		gboolean _tmp5_ = FALSE;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp4_ = child;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp6_ = child;
		if (PROTON_PLUS_WIDGETS_GAMES_IS_GAME_ROW (_tmp6_)) {
			GtkWidget* _tmp7_;
			_tmp7_ = child;
			_tmp5_ = gtk_widget_get_visible (_tmp7_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp8_;
			_tmp8_ = child;
			proton_plus_widgets_games_game_row_set_selected (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_GAMES_TYPE_GAME_ROW, ProtonPlusWidgetsGamesGameRow), is_active);
		}
		_tmp9_ = child;
		_tmp10_ = gtk_widget_get_next_sibling (_tmp9_);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_g_object_unref0 (child);
		child = _tmp11_;
	}
	proton_plus_widgets_games_box_update_selection_controls (self);
	_g_object_unref0 (child);
}

static void
__proton_plus_widgets_games_box___lambda176__gtk_check_button_toggled (GtkCheckButton* _sender,
                                                                       gpointer self)
{
	_proton_plus_widgets_games_box___lambda176_ ((ProtonPlusWidgetsGamesBox*) self);
}

static void
_proton_plus_widgets_games_box___lambda177_ (ProtonPlusWidgetsGamesBox* self)
{
	proton_plus_widgets_games_box_pop_page (self);
}

static void
__proton_plus_widgets_games_box___lambda177__proton_plus_widgets_games_mass_edit_view_back_requested (ProtonPlusWidgetsGamesMassEditView* _sender,
                                                                                                      gpointer self)
{
	_proton_plus_widgets_games_box___lambda177_ ((ProtonPlusWidgetsGamesBox*) self);
}

static void
_proton_plus_widgets_games_box___lambda178_ (ProtonPlusWidgetsGamesBox* self,
                                             AdwNavigationPage* page)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (page != NULL);
	_tmp0_ = self->priv->mass_edit_page;
	if (page == _tmp0_) {
		proton_plus_widgets_games_box_cleanup_mass_edit_exit (self);
	}
}

static void
__proton_plus_widgets_games_box___lambda178__adw_navigation_view_popped (AdwNavigationView* _sender,
                                                                         AdwNavigationPage* page,
                                                                         gpointer self)
{
	_proton_plus_widgets_games_box___lambda178_ ((ProtonPlusWidgetsGamesBox*) self, page);
}

static GObject *
proton_plus_widgets_games_box_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ProtonPlusWidgetsGamesBox * self;
	Block26Data* _data26_;
	GtkImage* _tmp0_;
	AdwStatusPage* _tmp1_;
	AdwStatusPage* _tmp2_;
	GtkListBox* _tmp3_;
	GtkListBox* _tmp4_;
	GtkListBox* _tmp5_;
	GtkListBox* _tmp6_;
	GtkListBox* _tmp7_;
	GtkListBox* _tmp8_;
	GtkListBox* _tmp9_;
	AdwSpinner* _tmp10_;
	AdwSpinner* _tmp11_;
	AdwSpinner* _tmp12_;
	AdwSpinner* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	AdwStatusPage* _tmp17_ = NULL;
	GtkStack* _tmp18_;
	GtkStack* _tmp19_;
	GtkStack* _tmp20_;
	GtkStack* _tmp21_;
	GtkListBox* _tmp22_;
	GtkStack* _tmp23_;
	AdwStatusPage* _tmp24_;
	GtkOverlay* _tmp25_;
	GtkOverlay* _tmp26_;
	GtkOverlay* _tmp27_;
	GtkStack* _tmp28_;
	GtkScrolledWindow* _tmp29_;
	GtkScrolledWindow* _tmp30_;
	GtkScrolledWindow* _tmp31_;
	GtkScrolledWindow* _tmp32_;
	GtkOverlay* _tmp33_;
	GtkScrolledWindow* _tmp34_;
	GtkListBox* _tmp35_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp36_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp37_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp38_;
	GtkListBox* _tmp39_;
	GtkListBox* _tmp40_;
	GtkListBox* _tmp41_;
	GtkListBox* _tmp42_;
	GtkScrolledWindow* selection_scrolled_window = NULL;
	GtkScrolledWindow* _tmp43_;
	GtkScrolledWindow* _tmp44_;
	GtkScrolledWindow* _tmp45_;
	GtkScrolledWindow* _tmp46_;
	GtkScrolledWindow* _tmp47_;
	GtkListBox* _tmp48_;
	GtkLabel* _tmp49_ = NULL;
	GtkLabel* _tmp50_;
	GtkBox* selection_popover_content = NULL;
	GtkBox* _tmp51_;
	GtkBox* _tmp52_;
	GtkBox* _tmp53_;
	GtkLabel* _tmp54_;
	GtkBox* _tmp55_;
	GtkScrolledWindow* _tmp56_;
	GtkPopover* _tmp57_;
	GtkPopover* _tmp58_;
	GtkBox* _tmp59_;
	GtkMenuButton* _tmp60_;
	GtkMenuButton* _tmp61_;
	GtkPopover* _tmp62_;
	GtkPopover* _tmp63_;
	GtkMenuButton* _tmp64_;
	GtkMenuButton* _tmp65_;
	GtkMenuButton* _tmp66_;
	GtkMenuButton* _tmp67_;
	GtkCheckButton* _tmp68_;
	GtkCheckButton* _tmp69_;
	GtkCheckButton* _tmp70_;
	GtkCheckButton* _tmp71_;
	GtkCheckButton* _tmp72_;
	GtkCheckButton* _tmp73_;
	GtkCheckButton* _tmp74_;
	GtkCheckButton* _tmp75_;
	GtkCheckButton* _tmp76_;
	GtkCheckButton* _tmp77_;
	GtkCheckButton* _tmp78_;
	ProtonPlusWidgetsControllerChoiceBox* filter_popover_box = NULL;
	ProtonPlusWidgetsControllerChoiceBox* _tmp79_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp80_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp81_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp82_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp83_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp84_;
	GtkCheckButton* _tmp85_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp86_;
	GtkCheckButton* _tmp87_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp88_;
	GtkCheckButton* _tmp89_;
	GtkPopover* _tmp90_;
	GtkPopover* _tmp91_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp92_;
	GtkCheckButton* _tmp93_;
	GtkCheckButton* _tmp94_;
	GtkCheckButton* _tmp95_;
	gchar* _tmp96_;
	GtkPopover* _tmp97_;
	GtkPopover* _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar** _tmp101_;
	GtkMenuButton* _tmp102_ = NULL;
	GtkPopover* _tmp103_;
	GtkMenuButton* _tmp104_;
	GtkCheckButton* _tmp105_;
	GtkSizeGroup* _tmp106_;
	GtkSizeGroup* _tmp107_;
	GtkMenuButton* _tmp108_;
	gchar* _tmp109_;
	GtkSearchEntry* _tmp110_ = NULL;
	GtkSearchEntry* _tmp111_;
	GtkSearchEntry* _tmp112_;
	GtkSearchEntry* _tmp113_;
	GtkCheckButton* _tmp114_;
	GtkCheckButton* _tmp115_;
	GtkCheckButton* _tmp116_;
	GtkCheckButton* _tmp117_;
	GtkLabel* _tmp118_;
	GtkLabel* _tmp119_;
	GtkLabel* _tmp120_;
	GtkLabel* _tmp121_;
	GtkLabel* _tmp122_;
	GtkLabel* _tmp123_;
	GtkLabel* _tmp124_;
	GtkLabel* _tmp125_;
	GtkLabel* _tmp126_;
	GtkSizeGroup* _tmp127_;
	GtkSizeGroup* _tmp128_;
	GtkLabel* _tmp129_;
	GtkSizeGroup* _tmp130_;
	GtkSizeGroup* _tmp131_;
	GtkLabel* _tmp132_;
	GtkSizeGroup* _tmp133_;
	GtkSizeGroup* _tmp134_;
	GtkLabel* _tmp135_;
	GtkBox* _tmp136_;
	GtkBox* _tmp137_;
	GtkBox* _tmp138_;
	GtkBox* _tmp139_;
	GtkBox* _tmp140_;
	GtkCheckButton* _tmp141_;
	GtkBox* _tmp142_;
	GtkSearchEntry* _tmp143_;
	GtkBox* _tmp144_;
	GtkMenuButton* _tmp145_;
	GtkBox* _tmp146_;
	GtkLabel* _tmp147_;
	GtkBox* _tmp148_;
	GtkLabel* _tmp149_;
	GtkBox* _tmp150_;
	GtkLabel* _tmp151_;
	GtkBox* _tmp152_;
	GtkBox* _tmp153_;
	GtkBox* _tmp154_;
	GtkBox* _tmp155_;
	GtkBox* _tmp156_;
	GtkBox* _tmp157_;
	GtkBox* _tmp158_;
	GtkBox* _tmp159_;
	GtkScrolledWindow* _tmp160_;
	GtkBox* _tmp161_;
	GtkBox* _tmp162_;
	GtkBox* _tmp163_;
	GtkBox* _tmp164_;
	GtkBox* _tmp165_;
	GtkBox* _tmp166_;
	ProtonPlusWidgetsGamesMassEditButton* _tmp167_;
	GtkBox* _tmp168_;
	AdwStatusPage* _tmp169_;
	AdwClamp* games_page_clamp = NULL;
	AdwClamp* _tmp170_;
	AdwClamp* _tmp171_;
	AdwClamp* _tmp172_;
	AdwClamp* _tmp173_;
	AdwClamp* _tmp174_;
	AdwClamp* _tmp175_;
	AdwClamp* _tmp176_;
	AdwClamp* _tmp177_;
	GtkBox* _tmp178_;
	GtkMenuButton* _tmp179_;
	ProtonPlusWidgetsGamesMassEditView* _tmp180_;
	ProtonPlusWidgetsGamesMassEditView* _tmp181_;
	AdwClamp* _tmp182_;
	AdwNavigationPage* _tmp183_;
	ProtonPlusWidgetsGamesMassEditView* _tmp184_;
	AdwNavigationPage* _tmp185_;
	AdwNavigationView* _tmp186_ = NULL;
	AdwNavigationView* _tmp187_;
	AdwNavigationPage* _tmp188_;
	AdwNavigationView* _tmp189_;
	AdwNavigationPage* _tmp190_;
	AdwNavigationView* _tmp191_;
	GtkPropertyExpression* _tmp192_;
	AdwNavigationView* _tmp193_;
	parent_class = G_OBJECT_CLASS (proton_plus_widgets_games_box_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_TYPE_BOX, ProtonPlusWidgetsGamesBox);
	_data26_ = g_slice_new0 (Block26Data);
	_data26_->_ref_count_ = 1;
	_data26_->self = g_object_ref (self);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->image);
	self->priv->image = _tmp0_;
	_tmp1_ = (AdwStatusPage*) adw_status_page_new ();
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->status_page);
	self->priv->status_page = _tmp1_;
	_tmp2_ = self->priv->status_page;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	_tmp3_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->game_list_box);
	self->priv->game_list_box = _tmp3_;
	_tmp4_ = self->priv->game_list_box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = self->priv->game_list_box;
	gtk_list_box_set_selection_mode (_tmp5_, GTK_SELECTION_MULTIPLE);
	_tmp6_ = self->priv->game_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp6_, "boxed-list");
	_tmp7_ = self->priv->game_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp7_, "list-content");
	_tmp8_ = self->priv->game_list_box;
	gtk_list_box_set_filter_func (_tmp8_, _proton_plus_widgets_games_box_filter_game_row_gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	_tmp9_ = self->priv->game_list_box;
	gtk_list_box_set_sort_func (_tmp9_, __proton_plus_widgets_games_box___lambda172__gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	_tmp10_ = (AdwSpinner*) adw_spinner_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->spinner);
	self->priv->spinner = _tmp10_;
	_tmp11_ = self->priv->spinner;
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	_tmp12_ = self->priv->spinner;
	gtk_widget_set_valign ((GtkWidget*) _tmp12_, GTK_ALIGN_CENTER);
	_tmp13_ = self->priv->spinner;
	gtk_widget_set_size_request ((GtkWidget*) _tmp13_, 32, 32);
	_tmp14_ = g_strdup (_ ("No games found"));
	_tmp15_ = g_strdup (_ ("Try a different search term or filter."));
	_tmp16_ = g_strdup ("magnifying-glass-symbolic");
	_tmp17_ = (AdwStatusPage*) adw_status_page_new ();
	adw_status_page_set_title (_tmp17_, _tmp14_);
	_g_free0 (_tmp14_);
	adw_status_page_set_description (_tmp17_, _tmp15_);
	_g_free0 (_tmp15_);
	adw_status_page_set_icon_name (_tmp17_, _tmp16_);
	_g_free0 (_tmp16_);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->empty_status_page);
	self->priv->empty_status_page = _tmp17_;
	_tmp18_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->list_stack);
	self->priv->list_stack = _tmp18_;
	_tmp19_ = self->priv->list_stack;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp19_, TRUE);
	_tmp20_ = self->priv->list_stack;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp20_, TRUE);
	_tmp21_ = self->priv->list_stack;
	_tmp22_ = self->priv->game_list_box;
	gtk_stack_add_named (_tmp21_, (GtkWidget*) _tmp22_, "list");
	_tmp23_ = self->priv->list_stack;
	_tmp24_ = self->priv->empty_status_page;
	gtk_stack_add_named (_tmp23_, (GtkWidget*) _tmp24_, "empty");
	_tmp25_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp25_);
	_g_object_unref0 (self->priv->overlay);
	self->priv->overlay = _tmp25_;
	_tmp26_ = self->priv->overlay;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp26_, TRUE);
	_tmp27_ = self->priv->overlay;
	_tmp28_ = self->priv->list_stack;
	gtk_overlay_set_child (_tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->scrolled_window);
	self->priv->scrolled_window = _tmp29_;
	_tmp30_ = self->priv->scrolled_window;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp30_, TRUE);
	_tmp31_ = self->priv->scrolled_window;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp31_, TRUE);
	_tmp32_ = self->priv->scrolled_window;
	_tmp33_ = self->priv->overlay;
	gtk_scrolled_window_set_child (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = self->priv->scrolled_window;
	gtk_scrolled_window_set_policy (_tmp34_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp35_ = self->priv->game_list_box;
	_tmp36_ = proton_plus_widgets_games_mass_edit_button_new (_tmp35_);
	g_object_ref_sink (_tmp36_);
	_g_object_unref0 (self->priv->mass_edit_button);
	self->priv->mass_edit_button = _tmp36_;
	_tmp37_ = self->priv->mass_edit_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp37_, FALSE);
	_tmp38_ = self->priv->mass_edit_button;
	g_signal_connect_object (_tmp38_, "mass-edit-requested", (GCallback) _proton_plus_widgets_games_box_open_mass_edit_proton_plus_widgets_games_mass_edit_button_mass_edit_requested, self, 0);
	_tmp39_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp39_);
	_g_object_unref0 (self->priv->selection_list_box);
	self->priv->selection_list_box = _tmp39_;
	_tmp40_ = self->priv->selection_list_box;
	gtk_list_box_set_selection_mode (_tmp40_, GTK_SELECTION_NONE);
	_tmp41_ = self->priv->selection_list_box;
	gtk_widget_set_focusable ((GtkWidget*) _tmp41_, FALSE);
	_tmp42_ = self->priv->selection_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp42_, "selection-popover-list");
	_tmp43_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_ref_sink (_tmp43_);
	selection_scrolled_window = _tmp43_;
	_tmp44_ = selection_scrolled_window;
	gtk_scrolled_window_set_policy (_tmp44_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp45_ = selection_scrolled_window;
	gtk_scrolled_window_set_max_content_height (_tmp45_, 300);
	_tmp46_ = selection_scrolled_window;
	gtk_scrolled_window_set_propagate_natural_height (_tmp46_, TRUE);
	_tmp47_ = selection_scrolled_window;
	_tmp48_ = self->priv->selection_list_box;
	gtk_scrolled_window_set_child (_tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_halign ((GtkWidget*) _tmp49_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp49_, (gfloat) 0);
	gtk_label_set_ellipsize (_tmp49_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp49_);
	_g_object_unref0 (self->priv->selection_popover_title);
	self->priv->selection_popover_title = _tmp49_;
	_tmp50_ = self->priv->selection_popover_title;
	gtk_widget_add_css_class ((GtkWidget*) _tmp50_, "heading");
	_tmp51_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
	g_object_ref_sink (_tmp51_);
	selection_popover_content = _tmp51_;
	_tmp52_ = selection_popover_content;
	gtk_widget_add_css_class ((GtkWidget*) _tmp52_, "selection-popover-content");
	_tmp53_ = selection_popover_content;
	_tmp54_ = self->priv->selection_popover_title;
	gtk_box_append (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = selection_popover_content;
	_tmp56_ = selection_scrolled_window;
	gtk_box_append (_tmp55_, (GtkWidget*) _tmp56_);
	_tmp57_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp57_);
	_g_object_unref0 (self->priv->selection_popover);
	self->priv->selection_popover = _tmp57_;
	_tmp58_ = self->priv->selection_popover;
	_tmp59_ = selection_popover_content;
	gtk_popover_set_child (_tmp58_, (GtkWidget*) _tmp59_);
	_tmp60_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp60_);
	_g_object_unref0 (self->priv->selection_button);
	self->priv->selection_button = _tmp60_;
	_tmp61_ = self->priv->selection_button;
	_tmp62_ = self->priv->selection_popover;
	gtk_menu_button_set_popover (_tmp61_, _tmp62_);
	_tmp63_ = self->priv->selection_popover;
	_tmp64_ = self->priv->selection_button;
	proton_plus_widgets_window_register_popover_for_controller (_tmp63_, (GtkWidget*) _tmp64_, NULL);
	_tmp65_ = self->priv->selection_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp65_, FALSE);
	_tmp66_ = self->priv->selection_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp66_, "flat");
	_tmp67_ = self->priv->selection_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp67_, "bold");
	_tmp68_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp68_);
	_g_object_unref0 (self->priv->all_filter_check);
	self->priv->all_filter_check = _tmp68_;
	_tmp69_ = self->priv->all_filter_check;
	gtk_check_button_set_label (_tmp69_, _ ("All"));
	_tmp70_ = self->priv->all_filter_check;
	gtk_check_button_set_active (_tmp70_, TRUE);
	_tmp71_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp71_);
	_g_object_unref0 (self->priv->native_filter_check);
	self->priv->native_filter_check = _tmp71_;
	_tmp72_ = self->priv->native_filter_check;
	gtk_check_button_set_label (_tmp72_, _ ("Native"));
	_tmp73_ = self->priv->native_filter_check;
	_tmp74_ = self->priv->all_filter_check;
	gtk_check_button_set_group (_tmp73_, _tmp74_);
	_tmp75_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->non_steam_filter_check);
	self->priv->non_steam_filter_check = _tmp75_;
	_tmp76_ = self->priv->non_steam_filter_check;
	gtk_check_button_set_label (_tmp76_, _ ("Non-Steam"));
	_tmp77_ = self->priv->non_steam_filter_check;
	_tmp78_ = self->priv->all_filter_check;
	gtk_check_button_set_group (_tmp77_, _tmp78_);
	_tmp79_ = proton_plus_widgets_controller_choice_box_new ();
	g_object_ref_sink (_tmp79_);
	filter_popover_box = _tmp79_;
	_tmp80_ = filter_popover_box;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp80_, 12);
	_tmp81_ = filter_popover_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp81_, 12);
	_tmp82_ = filter_popover_box;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp82_, 12);
	_tmp83_ = filter_popover_box;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp83_, 12);
	_tmp84_ = filter_popover_box;
	_tmp85_ = self->priv->all_filter_check;
	gtk_box_append ((GtkBox*) _tmp84_, (GtkWidget*) _tmp85_);
	_tmp86_ = filter_popover_box;
	_tmp87_ = self->priv->native_filter_check;
	gtk_box_append ((GtkBox*) _tmp86_, (GtkWidget*) _tmp87_);
	_tmp88_ = filter_popover_box;
	_tmp89_ = self->priv->non_steam_filter_check;
	gtk_box_append ((GtkBox*) _tmp88_, (GtkWidget*) _tmp89_);
	_tmp90_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp90_);
	_data26_->filter_popover = _tmp90_;
	_tmp91_ = _data26_->filter_popover;
	_tmp92_ = filter_popover_box;
	gtk_popover_set_child (_tmp91_, (GtkWidget*) _tmp92_);
	_tmp93_ = self->priv->all_filter_check;
	g_signal_connect_data (_tmp93_, "toggled", (GCallback) __proton_plus_widgets_games_box___lambda173__gtk_check_button_toggled, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
	_tmp94_ = self->priv->native_filter_check;
	g_signal_connect_data (_tmp94_, "toggled", (GCallback) __proton_plus_widgets_games_box___lambda174__gtk_check_button_toggled, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
	_tmp95_ = self->priv->non_steam_filter_check;
	g_signal_connect_data (_tmp95_, "toggled", (GCallback) __proton_plus_widgets_games_box___lambda175__gtk_check_button_toggled, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
	_tmp96_ = g_strdup ("filter-2-symbolic");
	_tmp97_ = _data26_->filter_popover;
	_tmp98_ = _g_object_ref0 (_tmp97_);
	_tmp99_ = g_strdup (_ ("Filter"));
	_tmp100_ = g_strdup ("flat");
	_tmp101_ = g_new0 (gchar*, 1 + 1);
	_tmp101_[0] = _tmp100_;
	_tmp102_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp102_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp102_, _tmp96_);
	_g_free0 (_tmp96_);
	gtk_menu_button_set_popover (_tmp102_, _tmp98_);
	_g_object_unref0 (_tmp98_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp102_, _tmp99_);
	_g_free0 (_tmp99_);
	gtk_widget_set_visible ((GtkWidget*) _tmp102_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp102_, _tmp101_);
	_tmp101_ = (_vala_array_free (_tmp101_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp102_);
	_g_object_unref0 (self->priv->filter_button);
	self->priv->filter_button = _tmp102_;
	_tmp103_ = _data26_->filter_popover;
	_tmp104_ = self->priv->filter_button;
	_tmp105_ = self->priv->all_filter_check;
	proton_plus_widgets_window_register_popover_for_controller (_tmp103_, (GtkWidget*) _tmp104_, (GtkWidget*) _tmp105_);
	proton_plus_widgets_games_box_update_filter_button_state (self);
	_tmp106_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	_g_object_unref0 (self->priv->filter_column_size_group);
	self->priv->filter_column_size_group = _tmp106_;
	_tmp107_ = self->priv->filter_column_size_group;
	_tmp108_ = self->priv->filter_button;
	gtk_size_group_add_widget (_tmp107_, (GtkWidget*) _tmp108_);
	_tmp109_ = g_strdup (_ ("Search games"));
	_tmp110_ = (GtkSearchEntry*) gtk_search_entry_new ();
	g_object_set (_tmp110_, "placeholder-text", _tmp109_, NULL);
	_g_free0 (_tmp109_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp110_, TRUE);
	g_object_ref_sink (_tmp110_);
	_g_object_unref0 (self->priv->search_entry);
	self->priv->search_entry = _tmp110_;
	_tmp111_ = self->priv->search_entry;
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) _tmp111_, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_SEARCH);
	_tmp112_ = self->priv->search_entry;
	gtk_widget_add_css_class ((GtkWidget*) _tmp112_, "flat");
	_tmp113_ = self->priv->search_entry;
	g_signal_connect_object ((GtkEditable*) _tmp113_, "changed", (GCallback) _proton_plus_widgets_games_box_schedule_search_filter_gtk_editable_changed, self, 0);
	_tmp114_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp114_);
	_g_object_unref0 (self->priv->check_button);
	self->priv->check_button = _tmp114_;
	_tmp115_ = self->priv->check_button;
	gtk_widget_set_size_request ((GtkWidget*) _tmp115_, 30, 26);
	_tmp116_ = self->priv->check_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp116_, _ ("Select all visible games"));
	_tmp117_ = self->priv->check_button;
	g_signal_connect_object (_tmp117_, "toggled", (GCallback) __proton_plus_widgets_games_box___lambda176__gtk_check_button_toggled, self, 0);
	_tmp118_ = (GtkLabel*) gtk_label_new (_ ("Prefix"));
	g_object_ref_sink (_tmp118_);
	_g_object_unref0 (self->priv->prefix_label);
	self->priv->prefix_label = _tmp118_;
	_tmp119_ = self->priv->prefix_label;
	gtk_label_set_xalign (_tmp119_, (gfloat) 0);
	_tmp120_ = self->priv->prefix_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp120_, 110, 0);
	_tmp121_ = (GtkLabel*) gtk_label_new (_ ("Tool"));
	g_object_ref_sink (_tmp121_);
	_g_object_unref0 (self->priv->compatibility_tool_label);
	self->priv->compatibility_tool_label = _tmp121_;
	_tmp122_ = self->priv->compatibility_tool_label;
	gtk_label_set_xalign (_tmp122_, (gfloat) 0);
	_tmp123_ = self->priv->compatibility_tool_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp123_, 254, 0);
	_tmp124_ = (GtkLabel*) gtk_label_new (_ ("Actions"));
	g_object_ref_sink (_tmp124_);
	_g_object_unref0 (self->priv->other_label);
	self->priv->other_label = _tmp124_;
	_tmp125_ = self->priv->other_label;
	gtk_label_set_xalign (_tmp125_, (gfloat) 0);
	_tmp126_ = self->priv->other_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp126_, 122, 0);
	_tmp127_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	_g_object_unref0 (self->priv->prefix_column_size_group);
	self->priv->prefix_column_size_group = _tmp127_;
	_tmp128_ = self->priv->prefix_column_size_group;
	_tmp129_ = self->priv->prefix_label;
	gtk_size_group_add_widget (_tmp128_, (GtkWidget*) _tmp129_);
	_tmp130_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	_g_object_unref0 (self->priv->tool_column_size_group);
	self->priv->tool_column_size_group = _tmp130_;
	_tmp131_ = self->priv->tool_column_size_group;
	_tmp132_ = self->priv->compatibility_tool_label;
	gtk_size_group_add_widget (_tmp131_, (GtkWidget*) _tmp132_);
	_tmp133_ = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
	_g_object_unref0 (self->priv->actions_column_size_group);
	self->priv->actions_column_size_group = _tmp133_;
	_tmp134_ = self->priv->actions_column_size_group;
	_tmp135_ = self->priv->other_label;
	gtk_size_group_add_widget (_tmp134_, (GtkWidget*) _tmp135_);
	_tmp136_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	g_object_ref_sink (_tmp136_);
	_g_object_unref0 (self->priv->header_box);
	self->priv->header_box = _tmp136_;
	_tmp137_ = self->priv->header_box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp137_, TRUE);
	_tmp138_ = self->priv->header_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp138_, "list-header");
	_tmp139_ = self->priv->header_box;
	gtk_widget_set_overflow ((GtkWidget*) _tmp139_, GTK_OVERFLOW_HIDDEN);
	_tmp140_ = self->priv->header_box;
	_tmp141_ = self->priv->check_button;
	gtk_box_append (_tmp140_, (GtkWidget*) _tmp141_);
	_tmp142_ = self->priv->header_box;
	_tmp143_ = self->priv->search_entry;
	gtk_box_append (_tmp142_, (GtkWidget*) _tmp143_);
	_tmp144_ = self->priv->header_box;
	_tmp145_ = self->priv->filter_button;
	gtk_box_append (_tmp144_, (GtkWidget*) _tmp145_);
	_tmp146_ = self->priv->header_box;
	_tmp147_ = self->priv->prefix_label;
	gtk_box_append (_tmp146_, (GtkWidget*) _tmp147_);
	_tmp148_ = self->priv->header_box;
	_tmp149_ = self->priv->compatibility_tool_label;
	gtk_box_append (_tmp148_, (GtkWidget*) _tmp149_);
	_tmp150_ = self->priv->header_box;
	_tmp151_ = self->priv->other_label;
	gtk_box_append (_tmp150_, (GtkWidget*) _tmp151_);
	_tmp152_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp152_);
	_g_object_unref0 (self->priv->headered_list_box);
	self->priv->headered_list_box = _tmp152_;
	_tmp153_ = self->priv->headered_list_box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp153_, TRUE);
	_tmp154_ = self->priv->headered_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp154_, "card");
	_tmp155_ = self->priv->headered_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp155_, "transparent-card");
	_tmp156_ = self->priv->headered_list_box;
	gtk_widget_set_overflow ((GtkWidget*) _tmp156_, GTK_OVERFLOW_HIDDEN);
	_tmp157_ = self->priv->headered_list_box;
	_tmp158_ = self->priv->header_box;
	gtk_box_append (_tmp157_, (GtkWidget*) _tmp158_);
	_tmp159_ = self->priv->headered_list_box;
	_tmp160_ = self->priv->scrolled_window;
	gtk_box_append (_tmp159_, (GtkWidget*) _tmp160_);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	gtk_box_set_spacing ((GtkBox*) self, 0);
	_tmp161_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	g_object_ref_sink (_tmp161_);
	_g_object_unref0 (self->priv->games_page_box);
	self->priv->games_page_box = _tmp161_;
	_tmp162_ = self->priv->games_page_box;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp162_, TRUE);
	_tmp163_ = self->priv->games_page_box;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp163_, TRUE);
	_tmp164_ = self->priv->games_page_box;
	_tmp165_ = self->priv->headered_list_box;
	gtk_box_append (_tmp164_, (GtkWidget*) _tmp165_);
	_tmp166_ = self->priv->games_page_box;
	_tmp167_ = self->priv->mass_edit_button;
	gtk_box_append (_tmp166_, (GtkWidget*) _tmp167_);
	_tmp168_ = self->priv->games_page_box;
	_tmp169_ = self->priv->status_page;
	gtk_box_append (_tmp168_, (GtkWidget*) _tmp169_);
	_tmp170_ = (AdwClamp*) adw_clamp_new ();
	g_object_ref_sink (_tmp170_);
	games_page_clamp = _tmp170_;
	_tmp171_ = games_page_clamp;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp171_, TRUE);
	_tmp172_ = games_page_clamp;
	adw_clamp_set_maximum_size (_tmp172_, 975);
	_tmp173_ = games_page_clamp;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp173_, 12);
	_tmp174_ = games_page_clamp;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp174_, 12);
	_tmp175_ = games_page_clamp;
	gtk_widget_set_margin_start ((GtkWidget*) _tmp175_, 12);
	_tmp176_ = games_page_clamp;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp176_, 12);
	_tmp177_ = games_page_clamp;
	_tmp178_ = self->priv->games_page_box;
	adw_clamp_set_child (_tmp177_, (GtkWidget*) _tmp178_);
	_tmp179_ = self->priv->selection_button;
	_tmp180_ = proton_plus_widgets_games_mass_edit_view_new (_tmp179_);
	g_object_ref_sink (_tmp180_);
	_g_object_unref0 (self->priv->mass_edit_view);
	self->priv->mass_edit_view = _tmp180_;
	_tmp181_ = self->priv->mass_edit_view;
	g_signal_connect_object (_tmp181_, "back-requested", (GCallback) __proton_plus_widgets_games_box___lambda177__proton_plus_widgets_games_mass_edit_view_back_requested, self, 0);
	_tmp182_ = games_page_clamp;
	_tmp183_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp182_, _ ("Games"), "list");
	g_object_ref_sink (_tmp183_);
	_g_object_unref0 (self->priv->list_page);
	self->priv->list_page = _tmp183_;
	_tmp184_ = self->priv->mass_edit_view;
	_tmp185_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp184_, _ ("Games"), "mass-edit");
	g_object_ref_sink (_tmp185_);
	_g_object_unref0 (self->priv->mass_edit_page);
	self->priv->mass_edit_page = _tmp185_;
	_tmp186_ = (AdwNavigationView*) adw_navigation_view_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp186_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp186_, TRUE);
	g_object_ref_sink (_tmp186_);
	_g_object_unref0 (self->priv->navigation_view);
	self->priv->navigation_view = _tmp186_;
	_tmp187_ = self->priv->navigation_view;
	_tmp188_ = self->priv->list_page;
	adw_navigation_view_add (_tmp187_, _tmp188_);
	_tmp189_ = self->priv->navigation_view;
	_tmp190_ = self->priv->mass_edit_page;
	adw_navigation_view_add (_tmp189_, _tmp190_);
	_tmp191_ = self->priv->navigation_view;
	g_signal_connect_object (_tmp191_, "popped", (GCallback) __proton_plus_widgets_games_box___lambda178__adw_navigation_view_popped, self, 0);
	_tmp192_ = (GtkPropertyExpression*) gtk_property_expression_new (PROTON_PLUS_MODELS_TYPE_COMPATIBILITY_TOOL, NULL, "display_title");
	_gtk_expression_unref0 (self->priv->expression);
	self->priv->expression = _tmp192_;
	_tmp193_ = self->priv->navigation_view;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp193_);
	_g_object_unref0 (games_page_clamp);
	_g_object_unref0 (filter_popover_box);
	_g_object_unref0 (selection_popover_content);
	_g_object_unref0 (selection_scrolled_window);
	block26_data_unref (_data26_);
	_data26_ = NULL;
	return obj;
}

static void
proton_plus_widgets_games_box_class_init (ProtonPlusWidgetsGamesBoxClass * klass,
                                          gpointer klass_data)
{
	proton_plus_widgets_games_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_box_set_property;
	G_OBJECT_CLASS (klass)->constructor = proton_plus_widgets_games_box_constructor;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_box_finalize;
}

static void
proton_plus_widgets_games_box_proton_plus_utils_controller_navigation_host_interface_init (ProtonPlusUtilsControllerNavigationHostIface * iface,
                                                                                           gpointer iface_data)
{
	proton_plus_widgets_games_box_proton_plus_utils_controller_navigation_host_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_controller_page_id = (gchar* (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_get_controller_page_id;
	iface->get_controller_page_root = (GObject* (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_get_controller_page_root;
	iface->get_controller_initial_focus = (GObject* (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_get_controller_initial_focus;
	iface->controller_navigate_back = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_controller_navigate_back;
	iface->controller_can_navigate_back = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_controller_can_navigate_back;
	iface->controller_can_switch_page = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_controller_can_switch_page;
	iface->controller_prefers_initial_focus_after_switch = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_games_box_real_controller_prefers_initial_focus_after_switch;
	iface->controller_switch_page = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*, gint)) proton_plus_widgets_games_box_real_controller_switch_page;
}

static void
proton_plus_widgets_games_box_proton_plus_utils_controller_page_shortcuts_interface_init (ProtonPlusUtilsControllerPageShortcutsIface * iface,
                                                                                          gpointer iface_data)
{
	proton_plus_widgets_games_box_proton_plus_utils_controller_page_shortcuts_parent_iface = g_type_interface_peek_parent (iface);
	iface->controller_can_open_search = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_games_box_real_controller_can_open_search;
	iface->controller_can_open_filter = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_games_box_real_controller_can_open_filter;
	iface->controller_open_search = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_games_box_real_controller_open_search;
	iface->controller_open_filter = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_games_box_real_controller_open_filter;
}

static void
proton_plus_widgets_games_box_instance_init (ProtonPlusWidgetsGamesBox * self,
                                             gpointer klass)
{
	gchar* _tmp0_;
	self->priv = proton_plus_widgets_games_box_get_instance_private (self);
	_tmp0_ = g_strdup ("");
	self->priv->search_query = _tmp0_;
	self->priv->search_timeout_id = (guint) 0;
	self->priv->updating_selection_toggle = FALSE;
	self->priv->mass_edit_cleanup_pending = FALSE;
}

static void
proton_plus_widgets_games_box_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_TYPE_BOX, ProtonPlusWidgetsGamesBox);
	_g_object_unref0 (self->priv->launcher);
	_g_object_unref0 (self->priv->image);
	_g_object_unref0 (self->priv->status_page);
	_g_object_unref0 (self->priv->mass_edit_button);
	_g_object_unref0 (self->priv->search_entry);
	_g_object_unref0 (self->priv->check_button);
	_g_object_unref0 (self->priv->prefix_label);
	_g_object_unref0 (self->priv->compatibility_tool_label);
	_g_object_unref0 (self->priv->other_label);
	_g_object_unref0 (self->priv->prefix_column_size_group);
	_g_object_unref0 (self->priv->tool_column_size_group);
	_g_object_unref0 (self->priv->actions_column_size_group);
	_g_object_unref0 (self->priv->filter_column_size_group);
	_g_object_unref0 (self->priv->header_box);
	_g_object_unref0 (self->priv->headered_list_box);
	_g_object_unref0 (self->priv->games_page_box);
	_g_object_unref0 (self->priv->navigation_view);
	_g_object_unref0 (self->priv->list_page);
	_g_object_unref0 (self->priv->mass_edit_page);
	_g_object_unref0 (self->priv->list_stack);
	_g_object_unref0 (self->priv->empty_status_page);
	_g_object_unref0 (self->priv->scrolled_window);
	_g_object_unref0 (self->priv->game_list_box);
	_g_object_unref0 (self->priv->filter_button);
	_g_object_unref0 (self->priv->all_filter_check);
	_g_object_unref0 (self->priv->non_steam_filter_check);
	_g_object_unref0 (self->priv->native_filter_check);
	_g_object_unref0 (self->priv->spinner);
	_g_object_unref0 (self->priv->overlay);
	_g_object_unref0 (self->priv->mass_edit_view);
	_g_object_unref0 (self->priv->model);
	_gtk_expression_unref0 (self->priv->expression);
	_g_object_unref0 (self->priv->selection_button);
	_g_object_unref0 (self->priv->selection_list_box);
	_g_object_unref0 (self->priv->selection_popover);
	_g_object_unref0 (self->priv->selection_popover_title);
	_g_free0 (self->priv->search_query);
	G_OBJECT_CLASS (proton_plus_widgets_games_box_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesBox), 0, (GInstanceInitFunc) proton_plus_widgets_games_box_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_navigation_host_info = { (GInterfaceInitFunc) proton_plus_widgets_games_box_proton_plus_utils_controller_navigation_host_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo proton_plus_utils_controller_page_shortcuts_info = { (GInterfaceInitFunc) proton_plus_widgets_games_box_proton_plus_utils_controller_page_shortcuts_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_games_box_type_id;
	proton_plus_widgets_games_box_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsGamesBox", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_games_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_NAVIGATION_HOST, &proton_plus_utils_controller_navigation_host_info);
	g_type_add_interface_static (proton_plus_widgets_games_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_PAGE_SHORTCUTS, &proton_plus_utils_controller_page_shortcuts_info);
	ProtonPlusWidgetsGamesBox_private_offset = g_type_add_instance_private (proton_plus_widgets_games_box_type_id, sizeof (ProtonPlusWidgetsGamesBoxPrivate));
	return proton_plus_widgets_games_box_type_id;
}

GType
proton_plus_widgets_games_box_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_box_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_box_type_id__once)) {
		GType proton_plus_widgets_games_box_type_id;
		proton_plus_widgets_games_box_type_id = proton_plus_widgets_games_box_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_box_type_id__once, proton_plus_widgets_games_box_type_id);
	}
	return proton_plus_widgets_games_box_type_id__once;
}

static void
_vala_proton_plus_widgets_games_box_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_BOX, ProtonPlusWidgetsGamesBox);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_box_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_TYPE_BOX, ProtonPlusWidgetsGamesBox);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

