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

#include "protonplus_core.h"
#include <adwaita.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gee.h>
#include <gio/gio.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_TOOLS_BOX_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_BOX_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_box_properties[PROTON_PLUS_WIDGETS_TOOLS_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block16Data Block16Data;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ProtonPlusWidgetsToolsBoxCheckForUpdatesData ProtonPlusWidgetsToolsBoxCheckForUpdatesData;
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_BOX_NUM_SIGNALS
};
static guint proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsToolsBoxPrivate {
	ProtonPlusModelsLauncher* _current_launcher;
	ProtonPlusServicesInstallJob* current_job;
	AdwNavigationView* _navigation_view;
	AdwNavigationPage* _groups_page;
	AdwNavigationPage* _releases_page;
	AdwNavigationPage* _release_page;
	AdwNavigationPage* _migrate_page;
	GtkButton* _back_button;
	GtkButton* _refresh_button;
	GtkButton* _open_button;
	GtkButton* _migrate_button;
	GtkSearchEntry* _search_entry;
	GtkMenuButton* _search_button;
	GtkMenuButton* _filter_button;
	AdwHeaderBar* _header_bar;
	GtkActionBar* _action_bar;
	GtkCheckButton* _all_filter_button;
	AdwViewStack* _groups_stack;
	ProtonPlusWidgetsToolsReleasesBox* _releases_box;
	ProtonPlusWidgetsToolsReleaseBox* _release_box;
	ProtonPlusWidgetsToolsMigrateBox* _migrate_box;
	AdwViewSwitcher* _switcher;
	AdwViewStack* _center_stack;
	gulong background_updates_changed_handler;
	gulong show_legacy_tools_changed_handler;
	ProtonPlusWidgetsToolsFilter _current_filter;
};

struct _Block16Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* installed_filter_button;
	GtkCheckButton* used_filter_button;
	GtkCheckButton* unused_filter_button;
	GtkPopover* filter_popover;
};

struct _ProtonPlusWidgetsToolsBoxCheckForUpdatesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusWidgetsToolsBox* self;
	GtkButton* _tmp0_;
	GList* launchers;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusReturnCode code;
	ProtonPlusServicesInstallationService* _tmp3_;
	ProtonPlusServicesInstallationService* _tmp4_;
	GList* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GtkButton* _tmp10_;
};

static gint ProtonPlusWidgetsToolsBox_private_offset;
static gpointer proton_plus_widgets_tools_box_parent_class = NULL;
static ProtonPlusUtilsControllerNavigationHostIface * proton_plus_widgets_tools_box_proton_plus_utils_controller_navigation_host_parent_iface = NULL;
static ProtonPlusUtilsControllerPageShortcutsIface * proton_plus_widgets_tools_box_proton_plus_utils_controller_page_shortcuts_parent_iface = NULL;

static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static void proton_plus_widgets_tools_box_set_groups_stack (ProtonPlusWidgetsToolsBox* self,
                                                     AdwViewStack* value);
static void proton_plus_widgets_tools_box_set_releases_box (ProtonPlusWidgetsToolsBox* self,
                                                     ProtonPlusWidgetsToolsReleasesBox* value);
static ProtonPlusWidgetsToolsReleasesBox* proton_plus_widgets_tools_box_get_releases_box (ProtonPlusWidgetsToolsBox* self);
static void __lambda73_ (ProtonPlusWidgetsToolsBox* self,
                  ProtonPlusServicesInstallJob* job);
static void proton_plus_widgets_tools_box_set_selected_job (ProtonPlusWidgetsToolsBox* self,
                                                     ProtonPlusServicesInstallJob* job,
                                                     gboolean show_games);
static void ___lambda73__proton_plus_widgets_tools_releases_box_job_selected (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                       ProtonPlusServicesInstallJob* job,
                                                                       gpointer self);
static void proton_plus_widgets_tools_box_set_release_box (ProtonPlusWidgetsToolsBox* self,
                                                    ProtonPlusWidgetsToolsReleaseBox* value);
static void proton_plus_widgets_tools_box_set_migrate_box (ProtonPlusWidgetsToolsBox* self,
                                                    ProtonPlusWidgetsToolsMigrateBox* value);
static ProtonPlusWidgetsToolsMigrateBox* proton_plus_widgets_tools_box_get_migrate_box (ProtonPlusWidgetsToolsBox* self);
static void __lambda74_ (ProtonPlusWidgetsToolsBox* self);
static ProtonPlusWidgetsToolsReleaseBox* proton_plus_widgets_tools_box_get_release_box (ProtonPlusWidgetsToolsBox* self);
static gchar* proton_plus_widgets_tools_box_get_visible_page_tag (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationView* proton_plus_widgets_tools_box_get_navigation_view (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_migrate_page (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_release_page (ProtonPlusWidgetsToolsBox* self);
static gboolean proton_plus_widgets_tools_box_pop_page (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_navigate_to_canonical_page (ProtonPlusWidgetsToolsBox* self,
                                                               const gchar* tag);
static AdwViewStack* proton_plus_widgets_tools_box_get_groups_stack (ProtonPlusWidgetsToolsBox* self);
static void ___lambda74__proton_plus_widgets_tools_migrate_box_finished (ProtonPlusWidgetsToolsMigrateBox* _sender,
                                                                  gpointer self);
static void proton_plus_widgets_tools_box_set_groups_page (ProtonPlusWidgetsToolsBox* self,
                                                    AdwNavigationPage* value);
static void proton_plus_widgets_tools_box_set_releases_page (ProtonPlusWidgetsToolsBox* self,
                                                      AdwNavigationPage* value);
static void proton_plus_widgets_tools_box_set_release_page (ProtonPlusWidgetsToolsBox* self,
                                                     AdwNavigationPage* value);
static void proton_plus_widgets_tools_box_set_migrate_page (ProtonPlusWidgetsToolsBox* self,
                                                     AdwNavigationPage* value);
static void proton_plus_widgets_tools_box_set_navigation_view (ProtonPlusWidgetsToolsBox* self,
                                                        AdwNavigationView* value);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_groups_page (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_releases_page (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_set_back_button (ProtonPlusWidgetsToolsBox* self,
                                                    GtkButton* value);
static GtkButton* proton_plus_widgets_tools_box_get_back_button (ProtonPlusWidgetsToolsBox* self);
static void __lambda78_ (ProtonPlusWidgetsToolsBox* self);
static void ___lambda78__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_box_set_open_button (ProtonPlusWidgetsToolsBox* self,
                                                    GtkButton* value);
static GtkButton* proton_plus_widgets_tools_box_get_open_button (ProtonPlusWidgetsToolsBox* self);
static void __lambda79_ (ProtonPlusWidgetsToolsBox* self);
static void ___lambda79__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_box_set_migrate_button (ProtonPlusWidgetsToolsBox* self,
                                                       GtkButton* value);
static GtkButton* proton_plus_widgets_tools_box_get_migrate_button (ProtonPlusWidgetsToolsBox* self);
static void __lambda80_ (ProtonPlusWidgetsToolsBox* self);
static ProtonPlusModelsLauncher* proton_plus_widgets_tools_box_get_current_launcher (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_push_page (ProtonPlusWidgetsToolsBox* self,
                                              AdwNavigationPage* page);
static void ___lambda80__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_box_set_switcher (ProtonPlusWidgetsToolsBox* self,
                                                 AdwViewSwitcher* value);
static void proton_plus_widgets_tools_box_set_refresh_button (ProtonPlusWidgetsToolsBox* self,
                                                       GtkButton* value);
static GtkButton* proton_plus_widgets_tools_box_get_refresh_button (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_on_refresh_clicked (ProtonPlusWidgetsToolsBox* self);
static void _proton_plus_widgets_tools_box_on_refresh_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void proton_plus_widgets_tools_box_set_search_entry (ProtonPlusWidgetsToolsBox* self,
                                                     GtkSearchEntry* value);
static GtkSearchEntry* proton_plus_widgets_tools_box_get_search_entry (ProtonPlusWidgetsToolsBox* self);
static void __lambda81_ (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_update_search_button_state (ProtonPlusWidgetsToolsBox* self);
static void ___lambda81__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                   gpointer self);
static void proton_plus_widgets_tools_box_set_search_button (ProtonPlusWidgetsToolsBox* self,
                                                      GtkMenuButton* value);
static GtkMenuButton* proton_plus_widgets_tools_box_get_search_button (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_set_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                      GtkMenuButton* value);
static GtkMenuButton* proton_plus_widgets_tools_box_get_filter_button (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_set_all_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                          GtkCheckButton* value);
static GtkCheckButton* proton_plus_widgets_tools_box_get_all_filter_button (ProtonPlusWidgetsToolsBox* self);
static void __lambda82_ (Block16Data* _data16_);
static void ___lambda82__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda83_ (Block16Data* _data16_);
static void ___lambda83__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda84_ (Block16Data* _data16_);
static void ___lambda84__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda85_ (Block16Data* _data16_);
static void ___lambda85__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void proton_plus_widgets_tools_box_set_center_stack (ProtonPlusWidgetsToolsBox* self,
                                                     AdwViewStack* value);
static AdwViewStack* proton_plus_widgets_tools_box_get_center_stack (ProtonPlusWidgetsToolsBox* self);
static AdwViewSwitcher* proton_plus_widgets_tools_box_get_switcher (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_set_header_bar (ProtonPlusWidgetsToolsBox* self,
                                                   AdwHeaderBar* value);
static AdwHeaderBar* proton_plus_widgets_tools_box_get_header_bar (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_set_action_bar (ProtonPlusWidgetsToolsBox* self,
                                                   GtkActionBar* value);
static GtkActionBar* proton_plus_widgets_tools_box_get_action_bar (ProtonPlusWidgetsToolsBox* self);
static void __lambda86_ (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_update_header_title (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_update_open_button_visibility (ProtonPlusWidgetsToolsBox* self);
static void ___lambda86__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda87_ (ProtonPlusWidgetsToolsBox* self,
                  AdwNavigationPage* page);
static void proton_plus_widgets_tools_box_refresh_group_boxes (ProtonPlusWidgetsToolsBox* self);
static void ___lambda87__adw_navigation_view_popped (AdwNavigationView* _sender,
                                              AdwNavigationPage* page,
                                              gpointer self);
static void _proton_plus_widgets_tools_box_update_header_title_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void __lambda88_ (ProtonPlusWidgetsToolsBox* self);
static void ___lambda88__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda89_ (ProtonPlusWidgetsToolsBox* self);
static void ___lambda89__proton_plus_widgets_tools_release_box_selection_changed (ProtonPlusWidgetsToolsReleaseBox* _sender,
                                                                           gpointer self);
static void proton_plus_widgets_tools_box_update_refresh_button_visibility (ProtonPlusWidgetsToolsBox* self);
static void _proton_plus_widgets_tools_box_update_refresh_button_visibility_g_settings_changed (GSettings* _sender,
                                                                                         const gchar* key,
                                                                                         gpointer self);
static void proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools (ProtonPlusWidgetsToolsBox* self);
static void _proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools_g_settings_changed (GSettings* _sender,
                                                                                        const gchar* key,
                                                                                        gpointer self);
static void proton_plus_widgets_tools_box_real_dispose (GObject* base);
static void proton_plus_widgets_tools_box_update_filter_button_state (ProtonPlusWidgetsToolsBox* self);
static gboolean proton_plus_widgets_tools_box_navigation_stack_contains (ProtonPlusWidgetsToolsBox* self,
                                                                  AdwNavigationPage* page);
static void proton_plus_widgets_tools_box_reset_to_root (ProtonPlusWidgetsToolsBox* self);
static gchar* proton_plus_widgets_tools_box_real_get_controller_page_id (ProtonPlusUtilsControllerNavigationHost* base);
static GObject* proton_plus_widgets_tools_box_real_get_controller_page_root (ProtonPlusUtilsControllerNavigationHost* base);
static GObject* proton_plus_widgets_tools_box_real_get_controller_initial_focus (ProtonPlusUtilsControllerNavigationHost* base);
static GtkWidget* proton_plus_widgets_tools_box_find_first_focusable (ProtonPlusWidgetsToolsBox* self,
                                                               GtkWidget* root);
static gboolean proton_plus_widgets_tools_box_real_controller_navigate_back (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_tools_box_real_controller_can_navigate_back (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_tools_box_real_controller_can_switch_page (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_tools_box_real_controller_prefers_initial_focus_after_switch (ProtonPlusUtilsControllerNavigationHost* base);
static gboolean proton_plus_widgets_tools_box_real_controller_switch_page (ProtonPlusUtilsControllerNavigationHost* base,
                                                                    gint delta);
static gboolean proton_plus_widgets_tools_box_real_controller_can_open_search (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_tools_box_real_controller_can_open_filter (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_tools_box_real_controller_open_search (ProtonPlusUtilsControllerPageShortcuts* base);
static gboolean proton_plus_widgets_tools_box_real_controller_open_filter (ProtonPlusUtilsControllerPageShortcuts* base);
static void proton_plus_widgets_tools_box_set_current_launcher (ProtonPlusWidgetsToolsBox* self,
                                                         ProtonPlusModelsLauncher* value);
static void proton_plus_widgets_tools_box_set_selected_tool (ProtonPlusWidgetsToolsBox* self,
                                                      ProtonPlusModelsTool* tool);
static void _proton_plus_widgets_tools_box_set_selected_tool_proton_plus_widgets_tools_group_box_tool_selected (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                                                         ProtonPlusModelsTool* tool,
                                                                                                         gpointer self);
static void __lambda90_ (ProtonPlusWidgetsToolsBox* self,
                  GObject* obj,
                  GAsyncResult* _result_);
static void ___lambda90__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_tools_box_check_for_updates (ProtonPlusWidgetsToolsBox* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static void proton_plus_widgets_tools_box_check_for_updates_finish (ProtonPlusWidgetsToolsBox* self,
                                                             GAsyncResult* _res_);
static void proton_plus_widgets_tools_box_check_for_updates_data_free (gpointer _data);
static gboolean proton_plus_widgets_tools_box_check_for_updates_co (ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_);
static void proton_plus_widgets_tools_box_check_for_updates_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void proton_plus_widgets_tools_box_finalize (GObject * obj);
static GType proton_plus_widgets_tools_box_get_type_once (void);
static void _vala_proton_plus_widgets_tools_box_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_proton_plus_widgets_tools_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 GType
proton_plus_widgets_tools_filter_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL, "PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL", "all"}, {PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED, "PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED", "installed"}, {PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED, "PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED", "used"}, {PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED, "PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED", "unused"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_filter_type_id;
	proton_plus_widgets_tools_filter_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsFilter", values);
	return proton_plus_widgets_tools_filter_type_id;
}

GType
proton_plus_widgets_tools_filter_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_filter_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_filter_type_id__once)) {
		GType proton_plus_widgets_tools_filter_type_id;
		proton_plus_widgets_tools_filter_type_id = proton_plus_widgets_tools_filter_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_filter_type_id__once, proton_plus_widgets_tools_filter_type_id);
	}
	return proton_plus_widgets_tools_filter_type_id__once;
}

static inline gpointer
proton_plus_widgets_tools_box_get_instance_private (ProtonPlusWidgetsToolsBox* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsBox_private_offset);
}

static Block16Data*
block16_data_ref (Block16Data* _data16_)
{
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}

static void
block16_data_unref (void * _userdata_)
{
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data16_->self;
		_g_object_unref0 (_data16_->filter_popover);
		_g_object_unref0 (_data16_->unused_filter_button);
		_g_object_unref0 (_data16_->used_filter_button);
		_g_object_unref0 (_data16_->installed_filter_button);
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}

static void
__lambda73_ (ProtonPlusWidgetsToolsBox* self,
             ProtonPlusServicesInstallJob* job)
{
	g_return_if_fail (job != NULL);
	proton_plus_widgets_tools_box_set_selected_job (self, job, FALSE);
}

static void
___lambda73__proton_plus_widgets_tools_releases_box_job_selected (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                  ProtonPlusServicesInstallJob* job,
                                                                  gpointer self)
{
	__lambda73_ ((ProtonPlusWidgetsToolsBox*) self, job);
}

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

static void
__lambda74_ (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
	GtkWidget* child = NULL;
	AdwViewStack* _tmp12_;
	GtkWidget* _tmp13_;
	GtkWidget* _tmp14_;
	_tmp0_ = self->priv->current_job;
	if (_tmp0_ != NULL) {
		ProtonPlusWidgetsToolsReleaseBox* _tmp1_;
		ProtonPlusServicesInstallJob* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gboolean _tmp6_;
		_tmp1_ = self->priv->_release_box;
		_tmp2_ = self->priv->current_job;
		proton_plus_widgets_tools_release_box_set_selected_job (_tmp1_, _tmp2_, TRUE);
		_tmp4_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = g_strcmp0 (_tmp5_, "migrate") == 0;
		_g_free0 (_tmp5_);
		if (_tmp6_) {
			AdwNavigationView* _tmp7_;
			AdwNavigationPage* _tmp8_;
			AdwNavigationPage* _tmp9_;
			AdwNavigationPage* _tmp10_;
			_tmp7_ = self->priv->_navigation_view;
			_tmp8_ = self->priv->_migrate_page;
			_tmp9_ = adw_navigation_view_get_previous_page (_tmp7_, _tmp8_);
			_tmp10_ = self->priv->_release_page;
			_tmp3_ = _tmp9_ == _tmp10_;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			proton_plus_widgets_tools_box_pop_page (self);
		} else {
			proton_plus_widgets_tools_box_navigate_to_canonical_page (self, "release");
		}
	}
	_tmp11_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_refresh_usage_pills (_tmp11_);
	_tmp12_ = self->priv->_groups_stack;
	_tmp13_ = gtk_widget_get_first_child ((GtkWidget*) _tmp12_);
	_tmp14_ = _g_object_ref0 (_tmp13_);
	child = _tmp14_;
	while (TRUE) {
		GtkWidget* _tmp15_;
		GtkWidget* _tmp16_;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		GtkWidget* _tmp20_;
		_tmp15_ = child;
		if (!(_tmp15_ != NULL)) {
			break;
		}
		_tmp16_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp16_)) {
			GtkWidget* _tmp17_;
			_tmp17_ = child;
			proton_plus_widgets_tools_group_box_refresh (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
		}
		_tmp18_ = child;
		_tmp19_ = gtk_widget_get_next_sibling (_tmp18_);
		_tmp20_ = _g_object_ref0 (_tmp19_);
		_g_object_unref0 (child);
		child = _tmp20_;
	}
	_g_object_unref0 (child);
}

static void
___lambda74__proton_plus_widgets_tools_migrate_box_finished (ProtonPlusWidgetsToolsMigrateBox* _sender,
                                                             gpointer self)
{
	__lambda74_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda78_ (ProtonPlusWidgetsToolsBox* self)
{
	proton_plus_utils_controller_navigation_host_controller_navigate_back ((ProtonPlusUtilsControllerNavigationHost*) self);
}

static void
___lambda78__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda78_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda79_ (ProtonPlusWidgetsToolsBox* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	_tmp1_ = self->priv->current_job;
	if (_tmp1_ != NULL) {
		ProtonPlusServicesInstallJob* _tmp2_;
		ProtonPlusModelsRelease* _tmp3_;
		ProtonPlusModelsRelease* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp2_ = self->priv->current_job;
		_tmp3_ = proton_plus_services_install_job_get_release (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = proton_plus_models_release_get_page_url (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusServicesInstallJob* _tmp7_;
		ProtonPlusModelsRelease* _tmp8_;
		ProtonPlusModelsRelease* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp7_ = self->priv->current_job;
		_tmp8_ = proton_plus_services_install_job_get_release (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_models_release_get_page_url (_tmp9_);
		_tmp11_ = _tmp10_;
		proton_plus_utils_system_open_uri (_tmp11_);
	}
}

static void
___lambda79__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda79_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda80_ (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	gchar* internal_name = NULL;
	ProtonPlusServicesInstallJob* _tmp1_;
	gchar* _tmp2_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp3_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	const gchar* _tmp7_;
	ProtonPlusModelsLauncher* _tmp8_;
	AdwNavigationPage* _tmp9_;
	_tmp0_ = self->priv->current_job;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->current_job;
	_tmp2_ = proton_plus_services_install_job_get_usage_identifier (_tmp1_);
	internal_name = _tmp2_;
	_tmp3_ = self->priv->_migrate_box;
	_tmp4_ = self->priv->_release_box;
	_tmp5_ = proton_plus_widgets_tools_release_box_get_selected_games (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = internal_name;
	_tmp8_ = self->priv->_current_launcher;
	proton_plus_widgets_tools_migrate_box_init (_tmp3_, _tmp6_, _tmp7_, _tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp9_ = self->priv->_migrate_page;
	proton_plus_widgets_tools_box_push_page (self, _tmp9_);
	_g_free0 (internal_name);
}

static void
___lambda80__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda80_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
_proton_plus_widgets_tools_box_on_refresh_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	proton_plus_widgets_tools_box_on_refresh_clicked ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda81_ (ProtonPlusWidgetsToolsBox* self)
{
	gchar* search_text = NULL;
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp3_;
	const gchar* _tmp4_;
	GtkWidget* child = NULL;
	AdwViewStack* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	_tmp0_ = self->priv->_search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	search_text = _tmp2_;
	_tmp3_ = self->priv->_releases_box;
	_tmp4_ = search_text;
	proton_plus_widgets_tools_releases_box_set_search_text (_tmp3_, _tmp4_);
	proton_plus_widgets_tools_box_update_search_button_state (self);
	_tmp5_ = self->priv->_groups_stack;
	_tmp6_ = gtk_widget_get_first_child ((GtkWidget*) _tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	child = _tmp7_;
	while (TRUE) {
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		_tmp8_ = child;
		if (!(_tmp8_ != NULL)) {
			break;
		}
		_tmp9_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp9_)) {
			GtkWidget* _tmp10_;
			const gchar* _tmp11_;
			_tmp10_ = child;
			_tmp11_ = search_text;
			proton_plus_widgets_tools_group_box_set_search_text (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), _tmp11_);
		}
		_tmp12_ = child;
		_tmp13_ = gtk_widget_get_next_sibling (_tmp12_);
		_tmp14_ = _g_object_ref0 (_tmp13_);
		_g_object_unref0 (child);
		child = _tmp14_;
	}
	_g_object_unref0 (child);
	_g_free0 (search_text);
}

static void
___lambda81__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                              gpointer self)
{
	__lambda81_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda82_ (Block16Data* _data16_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data16_->self;
	_tmp0_ = self->priv->_all_filter_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_tools_box_set_current_filter (self, PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL);
		_tmp3_ = _data16_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda82__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda82_ (self);
}

static void
__lambda83_ (Block16Data* _data16_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data16_->self;
	_tmp0_ = _data16_->installed_filter_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_tools_box_set_current_filter (self, PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED);
		_tmp3_ = _data16_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda83__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda83_ (self);
}

static void
__lambda84_ (Block16Data* _data16_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data16_->self;
	_tmp0_ = _data16_->used_filter_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_tools_box_set_current_filter (self, PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED);
		_tmp3_ = _data16_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda84__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda84_ (self);
}

static void
__lambda85_ (Block16Data* _data16_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data16_->self;
	_tmp0_ = _data16_->unused_filter_button;
	_tmp1_ = gtk_check_button_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkPopover* _tmp3_;
		proton_plus_widgets_tools_box_set_current_filter (self, PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED);
		_tmp3_ = _data16_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda85__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda85_ (self);
}

static void
__lambda86_ (ProtonPlusWidgetsToolsBox* self)
{
	gchar* visible_child = NULL;
	gchar* _tmp0_;
	GtkButton* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	GtkMenuButton* _tmp6_;
	gboolean _tmp7_ = FALSE;
	const gchar* _tmp8_;
	GtkMenuButton* _tmp10_;
	gboolean _tmp11_ = FALSE;
	GSettings* _tmp12_;
	gboolean background_updates_enabled = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	const gchar* _tmp17_;
	GtkButton* _tmp20_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp21_;
	const gchar* _tmp22_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp23_;
	GtkMenuButton* _tmp24_;
	GtkMenuButton* _tmp25_;
	const gchar* _tmp26_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp27_;
	GtkButton* _tmp28_;
	GtkButton* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	visible_child = _tmp0_;
	_tmp1_ = self->priv->_back_button;
	_tmp2_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, g_strcmp0 (_tmp2_, "groups") != 0);
	_tmp4_ = visible_child;
	if (g_strcmp0 (_tmp4_, "release") != 0) {
		const gchar* _tmp5_;
		_tmp5_ = visible_child;
		_tmp3_ = g_strcmp0 (_tmp5_, "migrate") != 0;
	} else {
		_tmp3_ = FALSE;
	}
	_tmp6_ = self->priv->_search_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, _tmp3_);
	_tmp8_ = visible_child;
	if (g_strcmp0 (_tmp8_, "release") != 0) {
		const gchar* _tmp9_;
		_tmp9_ = visible_child;
		_tmp7_ = g_strcmp0 (_tmp9_, "migrate") != 0;
	} else {
		_tmp7_ = FALSE;
	}
	_tmp10_ = self->priv->_filter_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, _tmp7_);
	_tmp12_ = proton_plus_globals_SETTINGS;
	if (_tmp12_ != NULL) {
		GSettings* _tmp13_;
		_tmp13_ = proton_plus_globals_SETTINGS;
		_tmp11_ = g_settings_get_boolean (_tmp13_, "background-updates");
	} else {
		_tmp11_ = FALSE;
	}
	background_updates_enabled = _tmp11_;
	_tmp17_ = visible_child;
	if (g_strcmp0 (_tmp17_, "release") != 0) {
		const gchar* _tmp18_;
		_tmp18_ = visible_child;
		_tmp16_ = g_strcmp0 (_tmp18_, "releases") != 0;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		const gchar* _tmp19_;
		_tmp19_ = visible_child;
		_tmp15_ = g_strcmp0 (_tmp19_, "migrate") != 0;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		_tmp14_ = !background_updates_enabled;
	} else {
		_tmp14_ = FALSE;
	}
	_tmp20_ = self->priv->_refresh_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp20_, _tmp14_);
	proton_plus_widgets_tools_box_update_header_title (self);
	_tmp21_ = self->priv->_releases_box;
	_tmp22_ = visible_child;
	proton_plus_widgets_tools_releases_box_set_header_controls_visible (_tmp21_, g_strcmp0 (_tmp22_, "releases") == 0);
	_tmp23_ = self->priv->_migrate_box;
	_tmp24_ = proton_plus_widgets_tools_migrate_box_get_games_button (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp25_, g_strcmp0 (_tmp26_, "migrate") == 0);
	_tmp27_ = self->priv->_migrate_box;
	_tmp28_ = proton_plus_widgets_tools_migrate_box_get_migrate_button (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp29_, g_strcmp0 (_tmp30_, "migrate") == 0);
	proton_plus_widgets_tools_box_update_open_button_visibility (self);
	_tmp31_ = visible_child;
	if (g_strcmp0 (_tmp31_, "groups") == 0) {
		AdwViewStack* _tmp32_;
		AdwViewStack* _tmp33_;
		AdwViewStack* _tmp34_;
		GtkSelectionModel* _tmp35_;
		GtkSelectionModel* _tmp36_;
		GtkActionBar* _tmp37_;
		AdwViewStack* _tmp38_;
		GtkSelectionModel* _tmp39_;
		GtkSelectionModel* _tmp40_;
		_tmp32_ = self->priv->_center_stack;
		adw_view_stack_set_visible_child_name (_tmp32_, "groups");
		_tmp33_ = self->priv->_center_stack;
		_tmp34_ = self->priv->_groups_stack;
		_tmp35_ = adw_view_stack_get_pages (_tmp34_);
		_tmp36_ = _tmp35_;
		gtk_widget_set_visible ((GtkWidget*) _tmp33_, g_list_model_get_n_items ((GListModel*) _tmp36_) > ((guint) 1));
		_g_object_unref0 (_tmp36_);
		_tmp37_ = self->priv->_action_bar;
		_tmp38_ = self->priv->_groups_stack;
		_tmp39_ = adw_view_stack_get_pages (_tmp38_);
		_tmp40_ = _tmp39_;
		gtk_widget_set_visible ((GtkWidget*) _tmp37_, g_list_model_get_n_items ((GListModel*) _tmp40_) > ((guint) 1));
		_g_object_unref0 (_tmp40_);
	} else {
		const gchar* _tmp41_;
		_tmp41_ = visible_child;
		if (g_strcmp0 (_tmp41_, "release") == 0) {
			AdwViewStack* _tmp42_;
			gboolean has_multiple_views = FALSE;
			ProtonPlusWidgetsToolsReleaseBox* _tmp43_;
			AdwViewStack* _tmp44_;
			GtkActionBar* _tmp45_;
			_tmp42_ = self->priv->_center_stack;
			adw_view_stack_set_visible_child_name (_tmp42_, "release");
			_tmp43_ = self->priv->_release_box;
			has_multiple_views = proton_plus_widgets_tools_release_box_has_multiple_views (_tmp43_);
			_tmp44_ = self->priv->_center_stack;
			gtk_widget_set_visible ((GtkWidget*) _tmp44_, has_multiple_views);
			_tmp45_ = self->priv->_action_bar;
			gtk_widget_set_visible ((GtkWidget*) _tmp45_, has_multiple_views);
		} else {
			const gchar* _tmp46_;
			_tmp46_ = visible_child;
			if (g_strcmp0 (_tmp46_, "migrate") == 0) {
				AdwViewStack* _tmp47_;
				GtkActionBar* _tmp48_;
				_tmp47_ = self->priv->_center_stack;
				gtk_widget_set_visible ((GtkWidget*) _tmp47_, FALSE);
				_tmp48_ = self->priv->_action_bar;
				gtk_widget_set_visible ((GtkWidget*) _tmp48_, FALSE);
			} else {
				AdwViewStack* _tmp49_;
				GtkActionBar* _tmp50_;
				_tmp49_ = self->priv->_center_stack;
				gtk_widget_set_visible ((GtkWidget*) _tmp49_, FALSE);
				_tmp50_ = self->priv->_action_bar;
				gtk_widget_set_visible ((GtkWidget*) _tmp50_, FALSE);
			}
		}
	}
	_g_free0 (visible_child);
}

static void
___lambda86__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda86_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda87_ (ProtonPlusWidgetsToolsBox* self,
             AdwNavigationPage* page)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (page != NULL);
	_tmp0_ = self->priv->_search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, "");
	_tmp1_ = adw_navigation_page_get_tag (page);
	if (g_strcmp0 (_tmp1_, "releases") == 0) {
		proton_plus_widgets_tools_box_refresh_group_boxes (self);
	}
}

static void
___lambda87__adw_navigation_view_popped (AdwNavigationView* _sender,
                                         AdwNavigationPage* page,
                                         gpointer self)
{
	__lambda87_ ((ProtonPlusWidgetsToolsBox*) self, page);
}

static void
_proton_plus_widgets_tools_box_update_header_title_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	proton_plus_widgets_tools_box_update_header_title ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda88_ (ProtonPlusWidgetsToolsBox* self)
{
	proton_plus_widgets_tools_box_update_open_button_visibility (self);
}

static void
___lambda88__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda88_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda89_ (ProtonPlusWidgetsToolsBox* self)
{
	proton_plus_widgets_tools_box_update_open_button_visibility (self);
}

static void
___lambda89__proton_plus_widgets_tools_release_box_selection_changed (ProtonPlusWidgetsToolsReleaseBox* _sender,
                                                                      gpointer self)
{
	__lambda89_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
_proton_plus_widgets_tools_box_update_refresh_button_visibility_g_settings_changed (GSettings* _sender,
                                                                                    const gchar* key,
                                                                                    gpointer self)
{
	proton_plus_widgets_tools_box_update_refresh_button_visibility ((ProtonPlusWidgetsToolsBox*) self);
}

static void
_proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools_g_settings_changed (GSettings* _sender,
                                                                                   const gchar* key,
                                                                                   gpointer self)
{
	proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools ((ProtonPlusWidgetsToolsBox*) self);
}

ProtonPlusWidgetsToolsBox*
proton_plus_widgets_tools_box_construct (GType object_type)
{
	ProtonPlusWidgetsToolsBox * self = NULL;
	Block16Data* _data16_;
	AdwViewStack* _tmp0_ = NULL;
	AdwViewStack* _tmp1_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp2_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp3_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp4_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp5_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp6_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp7_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp8_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp9_;
	AdwViewStack* _tmp10_;
	AdwNavigationPage* _tmp11_;
	AdwNavigationPage* _tmp12_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp13_;
	AdwNavigationPage* _tmp14_;
	AdwNavigationPage* _tmp15_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp16_;
	AdwNavigationPage* _tmp17_;
	AdwNavigationPage* _tmp18_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp19_;
	AdwNavigationPage* _tmp20_;
	AdwNavigationPage* _tmp21_;
	AdwNavigationView* _tmp22_ = NULL;
	AdwNavigationView* _tmp23_;
	AdwNavigationView* _tmp24_;
	AdwNavigationPage* _tmp25_;
	AdwNavigationView* _tmp26_;
	AdwNavigationPage* _tmp27_;
	AdwNavigationView* _tmp28_;
	AdwNavigationPage* _tmp29_;
	AdwNavigationView* _tmp30_;
	AdwNavigationPage* _tmp31_;
	GtkButton* _tmp32_ = NULL;
	GtkButton* _tmp33_;
	GtkButton* _tmp34_;
	GtkButton* _tmp35_;
	GtkButton* _tmp36_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp37_;
	GtkButton* _tmp38_;
	GtkButton* _tmp39_ = NULL;
	GtkButton* _tmp40_;
	GtkButton* _tmp41_;
	AdwButtonContent* migrate_button_content = NULL;
	AdwButtonContent* _tmp42_;
	AdwButtonContent* _tmp43_;
	AdwButtonContent* _tmp44_;
	AdwButtonContent* _tmp45_;
	GtkWidget* _tmp46_;
	GtkButton* _tmp47_ = NULL;
	GtkButton* _tmp48_;
	GtkButton* _tmp49_;
	GtkButton* _tmp50_;
	AdwViewStack* _tmp51_;
	AdwViewStack* _tmp52_;
	AdwViewSwitcher* _tmp53_ = NULL;
	AdwViewSwitcher* _tmp54_;
	GtkButton* _tmp55_ = NULL;
	GtkButton* _tmp56_;
	GtkButton* _tmp57_;
	GtkButton* _tmp58_;
	gchar* _tmp59_;
	GtkSearchEntry* _tmp60_ = NULL;
	GtkSearchEntry* _tmp61_;
	GtkSearchEntry* _tmp62_;
	GtkSearchEntry* _tmp63_;
	GtkBox* search_popover_box = NULL;
	GtkBox* _tmp64_ = NULL;
	GtkBox* _tmp65_;
	GtkSearchEntry* _tmp66_;
	GtkPopover* search_popover = NULL;
	GtkPopover* _tmp67_;
	GtkPopover* _tmp68_;
	GtkBox* _tmp69_;
	gchar* _tmp70_;
	GtkPopover* _tmp71_;
	GtkPopover* _tmp72_;
	GtkMenuButton* _tmp73_ = NULL;
	GtkMenuButton* _tmp74_;
	GtkMenuButton* _tmp75_;
	GtkPopover* _tmp76_;
	GtkMenuButton* _tmp77_;
	GtkSearchEntry* _tmp78_;
	gchar* _tmp79_;
	GtkMenuButton* _tmp80_ = NULL;
	GtkMenuButton* _tmp81_;
	GtkMenuButton* _tmp82_;
	GtkCheckButton* _tmp83_;
	GtkCheckButton* _tmp84_;
	GtkCheckButton* _tmp85_;
	GtkCheckButton* _tmp86_;
	GtkCheckButton* _tmp87_;
	GtkCheckButton* _tmp88_;
	GtkCheckButton* _tmp89_;
	GtkCheckButton* _tmp90_;
	GtkCheckButton* _tmp91_;
	GtkCheckButton* _tmp92_;
	GtkCheckButton* _tmp93_;
	GtkCheckButton* _tmp94_;
	ProtonPlusWidgetsControllerChoiceBox* filter_box = NULL;
	ProtonPlusWidgetsControllerChoiceBox* _tmp95_ = NULL;
	ProtonPlusWidgetsControllerChoiceBox* _tmp96_;
	GtkCheckButton* _tmp97_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp98_;
	GtkCheckButton* _tmp99_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp100_;
	GtkCheckButton* _tmp101_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp102_;
	GtkCheckButton* _tmp103_;
	GtkPopover* _tmp104_;
	GtkPopover* _tmp105_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp106_;
	GtkMenuButton* _tmp107_;
	GtkPopover* _tmp108_;
	GtkPopover* _tmp109_;
	GtkMenuButton* _tmp110_;
	GtkCheckButton* _tmp111_;
	GtkCheckButton* _tmp112_;
	GtkCheckButton* _tmp113_;
	GtkCheckButton* _tmp114_;
	GtkCheckButton* _tmp115_;
	AdwViewStack* _tmp116_;
	AdwViewStack* _tmp117_;
	AdwViewStack* _tmp118_;
	AdwViewSwitcher* _tmp119_;
	AdwViewStack* _tmp120_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp121_;
	AdwViewSwitcher* _tmp122_;
	AdwViewSwitcher* _tmp123_;
	GtkBox* center_box = NULL;
	GtkBox* _tmp124_ = NULL;
	GtkBox* _tmp125_;
	AdwViewStack* _tmp126_;
	AdwHeaderBar* _tmp127_ = NULL;
	AdwHeaderBar* _tmp128_;
	AdwHeaderBar* _tmp129_;
	GtkButton* _tmp130_;
	AdwHeaderBar* _tmp131_;
	GtkButton* _tmp132_;
	AdwHeaderBar* _tmp133_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp134_;
	GtkButton* _tmp135_;
	GtkButton* _tmp136_;
	AdwHeaderBar* _tmp137_;
	GtkMenuButton* _tmp138_;
	AdwHeaderBar* _tmp139_;
	GtkMenuButton* _tmp140_;
	AdwHeaderBar* _tmp141_;
	GtkButton* _tmp142_;
	AdwHeaderBar* _tmp143_;
	GtkButton* _tmp144_;
	AdwHeaderBar* _tmp145_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp146_;
	GtkMenuButton* _tmp147_;
	GtkMenuButton* _tmp148_;
	AdwHeaderBar* _tmp149_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp150_;
	GtkButton* _tmp151_;
	GtkButton* _tmp152_;
	AdwHeaderBar* _tmp153_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp154_;
	GtkButton* _tmp155_;
	GtkButton* _tmp156_;
	AdwHeaderBar* _tmp157_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp158_;
	GtkBox* _tmp159_;
	GtkBox* _tmp160_;
	GtkActionBar* _tmp161_;
	GtkActionBar* _tmp162_;
	GtkActionBar* _tmp163_;
	GtkBox* _tmp164_;
	AdwNavigationView* _tmp165_;
	AdwNavigationView* _tmp166_;
	AdwNavigationView* _tmp167_;
	AdwViewStack* _tmp168_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp169_;
	AdwViewSwitcher* _tmp170_;
	AdwViewSwitcher* _tmp171_;
	AdwViewStack* _tmp172_;
	AdwViewStack* _tmp173_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp174_;
	AdwHeaderBar* _tmp175_;
	AdwNavigationView* _tmp176_;
	GtkActionBar* _tmp177_;
	GSettings* _tmp178_;
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	self = (ProtonPlusWidgetsToolsBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 0, NULL);
	_data16_->self = g_object_ref (self);
	_tmp0_ = (AdwViewStack*) adw_view_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_tools_box_set_groups_stack (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = proton_plus_widgets_tools_releases_box_new ();
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_tools_box_set_releases_box (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_releases_box;
	g_signal_connect_object (_tmp4_, "job-selected", (GCallback) ___lambda73__proton_plus_widgets_tools_releases_box_job_selected, self, 0);
	_tmp5_ = proton_plus_widgets_tools_release_box_new ();
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	proton_plus_widgets_tools_box_set_release_box (self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = proton_plus_widgets_tools_migrate_box_new ();
	g_object_ref_sink (_tmp7_);
	_tmp8_ = _tmp7_;
	proton_plus_widgets_tools_box_set_migrate_box (self, _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = self->priv->_migrate_box;
	g_signal_connect_object (_tmp9_, "finished", (GCallback) ___lambda74__proton_plus_widgets_tools_migrate_box_finished, self, 0);
	_tmp10_ = self->priv->_groups_stack;
	_tmp11_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp10_, _ ("Tools"), "groups");
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	proton_plus_widgets_tools_box_set_groups_page (self, _tmp12_);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = self->priv->_releases_box;
	_tmp14_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp13_, _ ("Downloads"), "releases");
	g_object_ref_sink (_tmp14_);
	_tmp15_ = _tmp14_;
	proton_plus_widgets_tools_box_set_releases_page (self, _tmp15_);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = self->priv->_release_box;
	_tmp17_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp16_, _ ("Details"), "release");
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	proton_plus_widgets_tools_box_set_release_page (self, _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = self->priv->_migrate_box;
	_tmp20_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp19_, _ ("Migrate"), "migrate");
	g_object_ref_sink (_tmp20_);
	_tmp21_ = _tmp20_;
	proton_plus_widgets_tools_box_set_migrate_page (self, _tmp21_);
	_g_object_unref0 (_tmp21_);
	_tmp22_ = (AdwNavigationView*) adw_navigation_view_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp22_, TRUE);
	g_object_ref_sink (_tmp22_);
	_tmp23_ = _tmp22_;
	proton_plus_widgets_tools_box_set_navigation_view (self, _tmp23_);
	_g_object_unref0 (_tmp23_);
	_tmp24_ = self->priv->_navigation_view;
	_tmp25_ = self->priv->_groups_page;
	adw_navigation_view_add (_tmp24_, _tmp25_);
	_tmp26_ = self->priv->_navigation_view;
	_tmp27_ = self->priv->_releases_page;
	adw_navigation_view_add (_tmp26_, _tmp27_);
	_tmp28_ = self->priv->_navigation_view;
	_tmp29_ = self->priv->_release_page;
	adw_navigation_view_add (_tmp28_, _tmp29_);
	_tmp30_ = self->priv->_navigation_view;
	_tmp31_ = self->priv->_migrate_page;
	adw_navigation_view_add (_tmp30_, _tmp31_);
	_tmp32_ = (GtkButton*) gtk_button_new_from_icon_name ("go-previous-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp32_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
	g_object_ref_sink (_tmp32_);
	_tmp33_ = _tmp32_;
	proton_plus_widgets_tools_box_set_back_button (self, _tmp33_);
	_g_object_unref0 (_tmp33_);
	_tmp34_ = self->priv->_back_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp34_, "flat");
	_tmp35_ = self->priv->_back_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp35_, _ ("Back"));
	_tmp36_ = self->priv->_back_button;
	g_signal_connect_object (_tmp36_, "clicked", (GCallback) ___lambda78__gtk_button_clicked, self, 0);
	_tmp37_ = self->priv->_releases_box;
	_tmp38_ = self->priv->_back_button;
	proton_plus_widgets_tools_releases_box_set_controller_up_target (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = (GtkButton*) gtk_button_new_from_icon_name ("globe-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp39_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp39_, FALSE);
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	proton_plus_widgets_tools_box_set_open_button (self, _tmp40_);
	_g_object_unref0 (_tmp40_);
	_tmp41_ = self->priv->_open_button;
	g_signal_connect_object (_tmp41_, "clicked", (GCallback) ___lambda79__gtk_button_clicked, self, 0);
	_tmp42_ = (AdwButtonContent*) adw_button_content_new ();
	g_object_ref_sink (_tmp42_);
	migrate_button_content = _tmp42_;
	_tmp43_ = migrate_button_content;
	adw_button_content_set_label (_tmp43_, _ ("Migrate"));
	_tmp44_ = migrate_button_content;
	adw_button_content_set_icon_name (_tmp44_, "right-left-symbolic");
	_tmp45_ = migrate_button_content;
	_tmp46_ = _g_object_ref0 ((GtkWidget*) _tmp45_);
	_tmp47_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp47_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp47_, FALSE);
	gtk_button_set_child (_tmp47_, _tmp46_);
	_g_object_unref0 (_tmp46_);
	g_object_ref_sink (_tmp47_);
	_tmp48_ = _tmp47_;
	proton_plus_widgets_tools_box_set_migrate_button (self, _tmp48_);
	_g_object_unref0 (_tmp48_);
	_tmp49_ = self->priv->_migrate_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp49_, _ ("Migrate selected games to another tool"));
	_tmp50_ = self->priv->_migrate_button;
	g_signal_connect_object (_tmp50_, "clicked", (GCallback) ___lambda80__gtk_button_clicked, self, 0);
	_tmp51_ = self->priv->_groups_stack;
	_tmp52_ = _g_object_ref0 (_tmp51_);
	_tmp53_ = (AdwViewSwitcher*) adw_view_switcher_new ();
	adw_view_switcher_set_stack (_tmp53_, _tmp52_);
	_g_object_unref0 (_tmp52_);
	adw_view_switcher_set_policy (_tmp53_, ADW_VIEW_SWITCHER_POLICY_WIDE);
	g_object_ref_sink (_tmp53_);
	_tmp54_ = _tmp53_;
	proton_plus_widgets_tools_box_set_switcher (self, _tmp54_);
	_g_object_unref0 (_tmp54_);
	_tmp55_ = (GtkButton*) gtk_button_new_from_icon_name ("update-check-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp55_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp55_);
	_tmp56_ = _tmp55_;
	proton_plus_widgets_tools_box_set_refresh_button (self, _tmp56_);
	_g_object_unref0 (_tmp56_);
	_tmp57_ = self->priv->_refresh_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp57_, _ ("Check for updates"));
	_tmp58_ = self->priv->_refresh_button;
	g_signal_connect_object (_tmp58_, "clicked", (GCallback) _proton_plus_widgets_tools_box_on_refresh_clicked_gtk_button_clicked, self, 0);
	_tmp59_ = g_strdup (_ ("Search"));
	_tmp60_ = (GtkSearchEntry*) gtk_search_entry_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp60_, GTK_ALIGN_CENTER);
	g_object_set (_tmp60_, "placeholder-text", _tmp59_, NULL);
	_g_free0 (_tmp59_);
	g_object_set ((GtkWidget*) _tmp60_, "width-request", 400, NULL);
	g_object_ref_sink (_tmp60_);
	_tmp61_ = _tmp60_;
	proton_plus_widgets_tools_box_set_search_entry (self, _tmp61_);
	_g_object_unref0 (_tmp61_);
	_tmp62_ = self->priv->_search_entry;
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) _tmp62_, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_SEARCH);
	_tmp63_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp63_, "search-changed", (GCallback) ___lambda81__gtk_search_entry_search_changed, self, 0);
	_tmp64_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp64_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp64_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp64_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp64_, 12);
	g_object_ref_sink (_tmp64_);
	search_popover_box = _tmp64_;
	_tmp65_ = search_popover_box;
	_tmp66_ = self->priv->_search_entry;
	gtk_box_append (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp67_);
	search_popover = _tmp67_;
	_tmp68_ = search_popover;
	_tmp69_ = search_popover_box;
	gtk_popover_set_child (_tmp68_, (GtkWidget*) _tmp69_);
	_tmp70_ = g_strdup ("magnifying-glass-symbolic");
	_tmp71_ = search_popover;
	_tmp72_ = _g_object_ref0 (_tmp71_);
	_tmp73_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp73_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp73_, _tmp70_);
	_g_free0 (_tmp70_);
	gtk_menu_button_set_popover (_tmp73_, _tmp72_);
	_g_object_unref0 (_tmp72_);
	g_object_ref_sink (_tmp73_);
	_tmp74_ = _tmp73_;
	proton_plus_widgets_tools_box_set_search_button (self, _tmp74_);
	_g_object_unref0 (_tmp74_);
	_tmp75_ = self->priv->_search_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp75_, _ ("Search"));
	_tmp76_ = search_popover;
	_tmp77_ = self->priv->_search_button;
	_tmp78_ = self->priv->_search_entry;
	proton_plus_widgets_window_register_popover_for_controller (_tmp76_, (GtkWidget*) _tmp77_, (GtkWidget*) _tmp78_);
	_tmp79_ = g_strdup ("filter-2-symbolic");
	_tmp80_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp80_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp80_, _tmp79_);
	_g_free0 (_tmp79_);
	g_object_ref_sink (_tmp80_);
	_tmp81_ = _tmp80_;
	proton_plus_widgets_tools_box_set_filter_button (self, _tmp81_);
	_g_object_unref0 (_tmp81_);
	_tmp82_ = self->priv->_filter_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp82_, _ ("Filter"));
	_tmp83_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("All"));
	g_object_ref_sink (_tmp83_);
	_tmp84_ = _tmp83_;
	proton_plus_widgets_tools_box_set_all_filter_button (self, _tmp84_);
	_g_object_unref0 (_tmp84_);
	_tmp85_ = self->priv->_all_filter_button;
	gtk_check_button_set_active (_tmp85_, TRUE);
	_tmp86_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Installed"));
	g_object_ref_sink (_tmp86_);
	_data16_->installed_filter_button = _tmp86_;
	_tmp87_ = _data16_->installed_filter_button;
	_tmp88_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp87_, _tmp88_);
	_tmp89_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Used"));
	g_object_ref_sink (_tmp89_);
	_data16_->used_filter_button = _tmp89_;
	_tmp90_ = _data16_->used_filter_button;
	_tmp91_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp90_, _tmp91_);
	_tmp92_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Unused"));
	g_object_ref_sink (_tmp92_);
	_data16_->unused_filter_button = _tmp92_;
	_tmp93_ = _data16_->unused_filter_button;
	_tmp94_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp93_, _tmp94_);
	_tmp95_ = proton_plus_widgets_controller_choice_box_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp95_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp95_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp95_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp95_, 12);
	g_object_ref_sink (_tmp95_);
	filter_box = _tmp95_;
	_tmp96_ = filter_box;
	_tmp97_ = self->priv->_all_filter_button;
	gtk_box_append ((GtkBox*) _tmp96_, (GtkWidget*) _tmp97_);
	_tmp98_ = filter_box;
	_tmp99_ = _data16_->installed_filter_button;
	gtk_box_append ((GtkBox*) _tmp98_, (GtkWidget*) _tmp99_);
	_tmp100_ = filter_box;
	_tmp101_ = _data16_->used_filter_button;
	gtk_box_append ((GtkBox*) _tmp100_, (GtkWidget*) _tmp101_);
	_tmp102_ = filter_box;
	_tmp103_ = _data16_->unused_filter_button;
	gtk_box_append ((GtkBox*) _tmp102_, (GtkWidget*) _tmp103_);
	_tmp104_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp104_);
	_data16_->filter_popover = _tmp104_;
	_tmp105_ = _data16_->filter_popover;
	_tmp106_ = filter_box;
	gtk_popover_set_child (_tmp105_, (GtkWidget*) _tmp106_);
	_tmp107_ = self->priv->_filter_button;
	_tmp108_ = _data16_->filter_popover;
	gtk_menu_button_set_popover (_tmp107_, _tmp108_);
	_tmp109_ = _data16_->filter_popover;
	_tmp110_ = self->priv->_filter_button;
	_tmp111_ = self->priv->_all_filter_button;
	proton_plus_widgets_window_register_popover_for_controller (_tmp109_, (GtkWidget*) _tmp110_, (GtkWidget*) _tmp111_);
	_tmp112_ = self->priv->_all_filter_button;
	g_signal_connect_data (_tmp112_, "toggled", (GCallback) ___lambda82__gtk_check_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp113_ = _data16_->installed_filter_button;
	g_signal_connect_data (_tmp113_, "toggled", (GCallback) ___lambda83__gtk_check_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp114_ = _data16_->used_filter_button;
	g_signal_connect_data (_tmp114_, "toggled", (GCallback) ___lambda84__gtk_check_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp115_ = _data16_->unused_filter_button;
	g_signal_connect_data (_tmp115_, "toggled", (GCallback) ___lambda85__gtk_check_button_toggled, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp116_ = (AdwViewStack*) adw_view_stack_new ();
	g_object_ref_sink (_tmp116_);
	_tmp117_ = _tmp116_;
	proton_plus_widgets_tools_box_set_center_stack (self, _tmp117_);
	_g_object_unref0 (_tmp117_);
	_tmp118_ = self->priv->_center_stack;
	_tmp119_ = self->priv->_switcher;
	adw_view_stack_add_named (_tmp118_, (GtkWidget*) _tmp119_, "groups");
	_tmp120_ = self->priv->_center_stack;
	_tmp121_ = self->priv->_release_box;
	_tmp122_ = proton_plus_widgets_tools_release_box_get_stack_switcher (_tmp121_);
	_tmp123_ = _tmp122_;
	adw_view_stack_add_named (_tmp120_, (GtkWidget*) _tmp123_, "release");
	_tmp124_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_halign ((GtkWidget*) _tmp124_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp124_);
	center_box = _tmp124_;
	_tmp125_ = center_box;
	_tmp126_ = self->priv->_center_stack;
	gtk_box_append (_tmp125_, (GtkWidget*) _tmp126_);
	_tmp127_ = (AdwHeaderBar*) adw_header_bar_new ();
	adw_header_bar_set_show_start_title_buttons (_tmp127_, FALSE);
	adw_header_bar_set_show_end_title_buttons (_tmp127_, FALSE);
	adw_header_bar_set_show_title (_tmp127_, FALSE);
	g_object_ref_sink (_tmp127_);
	_tmp128_ = _tmp127_;
	proton_plus_widgets_tools_box_set_header_bar (self, _tmp128_);
	_g_object_unref0 (_tmp128_);
	_tmp129_ = self->priv->_header_bar;
	_tmp130_ = self->priv->_back_button;
	adw_header_bar_pack_start (_tmp129_, (GtkWidget*) _tmp130_);
	_tmp131_ = self->priv->_header_bar;
	_tmp132_ = self->priv->_refresh_button;
	adw_header_bar_pack_end (_tmp131_, (GtkWidget*) _tmp132_);
	_tmp133_ = self->priv->_header_bar;
	_tmp134_ = self->priv->_releases_box;
	_tmp135_ = proton_plus_widgets_tools_releases_box_get_refresh_button (_tmp134_);
	_tmp136_ = _tmp135_;
	adw_header_bar_pack_end (_tmp133_, (GtkWidget*) _tmp136_);
	_tmp137_ = self->priv->_header_bar;
	_tmp138_ = self->priv->_filter_button;
	adw_header_bar_pack_end (_tmp137_, (GtkWidget*) _tmp138_);
	_tmp139_ = self->priv->_header_bar;
	_tmp140_ = self->priv->_search_button;
	adw_header_bar_pack_end (_tmp139_, (GtkWidget*) _tmp140_);
	_tmp141_ = self->priv->_header_bar;
	_tmp142_ = self->priv->_open_button;
	adw_header_bar_pack_end (_tmp141_, (GtkWidget*) _tmp142_);
	_tmp143_ = self->priv->_header_bar;
	_tmp144_ = self->priv->_migrate_button;
	adw_header_bar_pack_end (_tmp143_, (GtkWidget*) _tmp144_);
	_tmp145_ = self->priv->_header_bar;
	_tmp146_ = self->priv->_migrate_box;
	_tmp147_ = proton_plus_widgets_tools_migrate_box_get_games_button (_tmp146_);
	_tmp148_ = _tmp147_;
	adw_header_bar_pack_end (_tmp145_, (GtkWidget*) _tmp148_);
	_tmp149_ = self->priv->_header_bar;
	_tmp150_ = self->priv->_migrate_box;
	_tmp151_ = proton_plus_widgets_tools_migrate_box_get_migrate_button (_tmp150_);
	_tmp152_ = _tmp151_;
	adw_header_bar_pack_end (_tmp149_, (GtkWidget*) _tmp152_);
	_tmp153_ = self->priv->_header_bar;
	_tmp154_ = self->priv->_releases_box;
	_tmp155_ = proton_plus_widgets_tools_releases_box_get_repository_button (_tmp154_);
	_tmp156_ = _tmp155_;
	adw_header_bar_pack_end (_tmp153_, (GtkWidget*) _tmp156_);
	_tmp157_ = self->priv->_header_bar;
	_tmp158_ = self->priv->_releases_box;
	_tmp159_ = proton_plus_widgets_tools_releases_box_get_variant_box (_tmp158_);
	_tmp160_ = _tmp159_;
	adw_header_bar_pack_end (_tmp157_, (GtkWidget*) _tmp160_);
	_tmp161_ = (GtkActionBar*) gtk_action_bar_new ();
	g_object_ref_sink (_tmp161_);
	_tmp162_ = _tmp161_;
	proton_plus_widgets_tools_box_set_action_bar (self, _tmp162_);
	_g_object_unref0 (_tmp162_);
	_tmp163_ = self->priv->_action_bar;
	_tmp164_ = center_box;
	gtk_action_bar_set_center_widget (_tmp163_, (GtkWidget*) _tmp164_);
	_tmp165_ = self->priv->_navigation_view;
	g_signal_connect_object ((GObject*) _tmp165_, "notify::visible-page", (GCallback) ___lambda86__g_object_notify, self, 0);
	_tmp166_ = self->priv->_navigation_view;
	g_signal_connect_object (_tmp166_, "popped", (GCallback) ___lambda87__adw_navigation_view_popped, self, 0);
	_tmp167_ = self->priv->_navigation_view;
	g_object_notify ((GObject*) _tmp167_, "visible-page");
	_tmp168_ = self->priv->_groups_stack;
	g_signal_connect_object ((GObject*) _tmp168_, "notify::visible-child", (GCallback) _proton_plus_widgets_tools_box_update_header_title_g_object_notify, self, 0);
	_tmp169_ = self->priv->_release_box;
	_tmp170_ = proton_plus_widgets_tools_release_box_get_stack_switcher (_tmp169_);
	_tmp171_ = _tmp170_;
	_tmp172_ = adw_view_switcher_get_stack (_tmp171_);
	_tmp173_ = _tmp172_;
	g_signal_connect_object ((GObject*) _tmp173_, "notify::visible-child-name", (GCallback) ___lambda88__g_object_notify, self, 0);
	_tmp174_ = self->priv->_release_box;
	g_signal_connect_object (_tmp174_, "selection-changed", (GCallback) ___lambda89__proton_plus_widgets_tools_release_box_selection_changed, self, 0);
	_tmp175_ = self->priv->_header_bar;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp175_);
	_tmp176_ = self->priv->_navigation_view;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp176_);
	_tmp177_ = self->priv->_action_bar;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp177_);
	_tmp178_ = proton_plus_globals_SETTINGS;
	if (_tmp178_ != NULL) {
		GSettings* _tmp179_;
		gulong _tmp180_;
		GSettings* _tmp181_;
		gulong _tmp182_;
		_tmp179_ = proton_plus_globals_SETTINGS;
		_tmp180_ = g_signal_connect_object (_tmp179_, "changed::background-updates", (GCallback) _proton_plus_widgets_tools_box_update_refresh_button_visibility_g_settings_changed, self, 0);
		self->priv->background_updates_changed_handler = _tmp180_;
		_tmp181_ = proton_plus_globals_SETTINGS;
		_tmp182_ = g_signal_connect_object (_tmp181_, "changed::show-legacy-tools", (GCallback) _proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools_g_settings_changed, self, 0);
		self->priv->show_legacy_tools_changed_handler = _tmp182_;
	}
	_g_object_unref0 (center_box);
	_g_object_unref0 (filter_box);
	_g_object_unref0 (search_popover);
	_g_object_unref0 (search_popover_box);
	_g_object_unref0 (migrate_button_content);
	block16_data_unref (_data16_);
	_data16_ = NULL;
	return self;
}

ProtonPlusWidgetsToolsBox*
proton_plus_widgets_tools_box_new (void)
{
	return proton_plus_widgets_tools_box_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX);
}

static void
proton_plus_widgets_tools_box_real_dispose (GObject* base)
{
	ProtonPlusWidgetsToolsBox * self;
	GSettings* _tmp0_;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp0_ = proton_plus_globals_SETTINGS;
	if (_tmp0_ != NULL) {
		if (self->priv->background_updates_changed_handler != ((gulong) 0)) {
			GSettings* _tmp1_;
			_tmp1_ = proton_plus_globals_SETTINGS;
			g_signal_handler_disconnect ((GObject*) _tmp1_, self->priv->background_updates_changed_handler);
			self->priv->background_updates_changed_handler = (gulong) 0;
		}
		if (self->priv->show_legacy_tools_changed_handler != ((gulong) 0)) {
			GSettings* _tmp2_;
			_tmp2_ = proton_plus_globals_SETTINGS;
			g_signal_handler_disconnect ((GObject*) _tmp2_, self->priv->show_legacy_tools_changed_handler);
			self->priv->show_legacy_tools_changed_handler = (gulong) 0;
		}
	}
	G_OBJECT_CLASS (proton_plus_widgets_tools_box_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox));
}

static void
proton_plus_widgets_tools_box_update_refresh_button_visibility (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_navigation_view;
	g_object_notify ((GObject*) _tmp0_, "visible-page");
}

static void
proton_plus_widgets_tools_box_update_search_button_state (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	if (g_strcmp0 (_tmp1_, "") != 0) {
		GtkMenuButton* _tmp2_;
		GtkMenuButton* _tmp3_;
		_tmp2_ = self->priv->_search_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "tools-filter-active");
		_tmp3_ = self->priv->_search_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _ ("Search is active"));
	} else {
		GtkMenuButton* _tmp4_;
		GtkMenuButton* _tmp5_;
		_tmp4_ = self->priv->_search_button;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp4_, "tools-filter-active");
		_tmp5_ = self->priv->_search_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _ ("Search"));
	}
}

static void
proton_plus_widgets_tools_box_update_filter_button_state (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsFilter _tmp0_;
	ProtonPlusWidgetsToolsFilter _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_box_get_current_filter (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
		GtkMenuButton* _tmp2_;
		GtkMenuButton* _tmp3_;
		_tmp2_ = self->priv->_filter_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "tools-filter-active");
		_tmp3_ = self->priv->_filter_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp3_, _ ("Filter is active"));
	} else {
		GtkMenuButton* _tmp4_;
		GtkMenuButton* _tmp5_;
		_tmp4_ = self->priv->_filter_button;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp4_, "tools-filter-active");
		_tmp5_ = self->priv->_filter_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp5_, _ ("Filter"));
	}
}

static void
proton_plus_widgets_tools_box_update_header_title (ProtonPlusWidgetsToolsBox* self)
{
	GtkWidget* title_widget = NULL;
	gchar* visible_child = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	AdwHeaderBar* _tmp20_;
	GtkWidget* _tmp21_;
	AdwHeaderBar* _tmp22_;
	GtkWidget* _tmp23_;
	g_return_if_fail (self != NULL);
	title_widget = NULL;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	visible_child = _tmp0_;
	_tmp1_ = visible_child;
	if (g_strcmp0 (_tmp1_, "groups") == 0) {
		ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
		AdwViewStack* _tmp2_;
		GtkWidget* _tmp3_;
		ProtonPlusWidgetsToolsGroupBox* _tmp4_;
		ProtonPlusWidgetsToolsGroupBox* _tmp5_;
		_tmp2_ = self->priv->_groups_stack;
		_tmp3_ = adw_view_stack_get_visible_child (_tmp2_);
		_tmp4_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp3_) ? ((ProtonPlusWidgetsToolsGroupBox*) _tmp3_) : NULL);
		group_box = _tmp4_;
		_tmp5_ = group_box;
		if (_tmp5_ != NULL) {
			ProtonPlusWidgetsToolsGroupBox* _tmp6_;
			GtkBox* _tmp7_;
			GtkBox* _tmp8_;
			GtkWidget* _tmp9_;
			_tmp6_ = group_box;
			_tmp7_ = proton_plus_widgets_tools_group_box_get_header_title (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp8_);
			_g_object_unref0 (title_widget);
			title_widget = _tmp9_;
		}
		_g_object_unref0 (group_box);
	} else {
		const gchar* _tmp10_;
		_tmp10_ = visible_child;
		if (g_strcmp0 (_tmp10_, "releases") == 0) {
			ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
			GtkBox* _tmp12_;
			GtkBox* _tmp13_;
			GtkWidget* _tmp14_;
			_tmp11_ = self->priv->_releases_box;
			_tmp12_ = proton_plus_widgets_tools_releases_box_get_header_title (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = _g_object_ref0 ((GtkWidget*) _tmp13_);
			_g_object_unref0 (title_widget);
			title_widget = _tmp14_;
		} else {
			const gchar* _tmp15_;
			_tmp15_ = visible_child;
			if (g_strcmp0 (_tmp15_, "release") == 0) {
				ProtonPlusWidgetsToolsReleaseBox* _tmp16_;
				GtkBox* _tmp17_;
				GtkBox* _tmp18_;
				GtkWidget* _tmp19_;
				_tmp16_ = self->priv->_release_box;
				_tmp17_ = proton_plus_widgets_tools_release_box_get_header_box (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = _g_object_ref0 ((GtkWidget*) _tmp18_);
				_g_object_unref0 (title_widget);
				title_widget = _tmp19_;
			}
		}
	}
	_tmp20_ = self->priv->_header_bar;
	_tmp21_ = title_widget;
	adw_header_bar_set_title_widget (_tmp20_, _tmp21_);
	_tmp22_ = self->priv->_header_bar;
	_tmp23_ = title_widget;
	adw_header_bar_set_show_title (_tmp22_, _tmp23_ != NULL);
	_g_free0 (visible_child);
	_g_object_unref0 (title_widget);
}

static void
proton_plus_widgets_tools_box_refresh_groups_for_legacy_tools (ProtonPlusWidgetsToolsBox* self)
{
	GtkWidget* child = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_groups_stack;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp4_)) {
			GtkWidget* _tmp5_;
			_tmp5_ = child;
			proton_plus_widgets_tools_group_box_refresh (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
		}
		_tmp6_ = child;
		_tmp7_ = gtk_widget_get_next_sibling (_tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (child);
		child = _tmp8_;
	}
	_g_object_unref0 (child);
}

static void
proton_plus_widgets_tools_box_update_open_button_visibility (ProtonPlusWidgetsToolsBox* self)
{
	gchar* visible_child = NULL;
	gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp2_;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	const gchar* _tmp17_;
	GtkButton* _tmp24_;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_;
	GtkButton* _tmp36_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	visible_child = _tmp0_;
	_tmp2_ = self->priv->current_job;
	if (_tmp2_ != NULL) {
		ProtonPlusServicesInstallJob* _tmp3_;
		ProtonPlusModelsRelease* _tmp4_;
		ProtonPlusModelsRelease* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp3_ = self->priv->current_job;
		_tmp4_ = proton_plus_services_install_job_get_release (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = proton_plus_models_release_get_page_url (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkButton* _tmp8_;
		ProtonPlusServicesInstallJob* _tmp9_;
		ProtonPlusModelsRelease* _tmp10_;
		ProtonPlusModelsRelease* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp8_ = self->priv->_open_button;
		_tmp9_ = self->priv->current_job;
		_tmp10_ = proton_plus_services_install_job_get_release (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = proton_plus_models_release_get_page_url (_tmp11_);
		_tmp13_ = _tmp12_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp13_);
	} else {
		GtkButton* _tmp14_;
		_tmp14_ = self->priv->_open_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp14_, NULL);
	}
	_tmp17_ = visible_child;
	if (g_strcmp0 (_tmp17_, "release") == 0) {
		ProtonPlusServicesInstallJob* _tmp18_;
		_tmp18_ = self->priv->current_job;
		_tmp16_ = _tmp18_ != NULL;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		ProtonPlusServicesInstallJob* _tmp19_;
		ProtonPlusModelsRelease* _tmp20_;
		ProtonPlusModelsRelease* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		_tmp19_ = self->priv->current_job;
		_tmp20_ = proton_plus_services_install_job_get_release (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = proton_plus_models_release_get_page_url (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp15_ = _tmp23_ != NULL;
	} else {
		_tmp15_ = FALSE;
	}
	_tmp24_ = self->priv->_open_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp24_, _tmp15_);
	_tmp27_ = visible_child;
	if (g_strcmp0 (_tmp27_, "release") == 0) {
		ProtonPlusWidgetsToolsReleaseBox* _tmp28_;
		AdwViewSwitcher* _tmp29_;
		AdwViewSwitcher* _tmp30_;
		AdwViewStack* _tmp31_;
		AdwViewStack* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		_tmp28_ = self->priv->_release_box;
		_tmp29_ = proton_plus_widgets_tools_release_box_get_stack_switcher (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = adw_view_switcher_get_stack (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = adw_view_stack_get_visible_child_name (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp26_ = g_strcmp0 (_tmp34_, "games") == 0;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		ProtonPlusWidgetsToolsReleaseBox* _tmp35_;
		_tmp35_ = self->priv->_release_box;
		_tmp25_ = proton_plus_widgets_tools_release_box_get_selected_games_count (_tmp35_) > 0;
	} else {
		_tmp25_ = FALSE;
	}
	_tmp36_ = self->priv->_migrate_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp36_, _tmp25_);
	_g_free0 (visible_child);
}

static void
proton_plus_widgets_tools_box_refresh_group_boxes (ProtonPlusWidgetsToolsBox* self)
{
	GtkWidget* child = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_groups_stack;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp4_)) {
			GtkWidget* _tmp5_;
			_tmp5_ = child;
			proton_plus_widgets_tools_group_box_refresh (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
		}
		_tmp6_ = child;
		_tmp7_ = gtk_widget_get_next_sibling (_tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (child);
		child = _tmp8_;
	}
	_g_object_unref0 (child);
}

static gchar*
proton_plus_widgets_tools_box_get_visible_page_tag (ProtonPlusWidgetsToolsBox* self)
{
	const gchar* _tmp0_ = NULL;
	AdwNavigationView* _tmp1_;
	AdwNavigationPage* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_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_ = "groups";
	}
	_tmp4_ = g_strdup (_tmp0_);
	result = _tmp4_;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_navigation_stack_contains (ProtonPlusWidgetsToolsBox* self,
                                                         AdwNavigationPage* page)
{
	GListModel* navigation_stack = NULL;
	AdwNavigationView* _tmp0_;
	GListModel* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (page != NULL, FALSE);
	_tmp0_ = self->priv->_navigation_view;
	_tmp1_ = adw_navigation_view_get_navigation_stack (_tmp0_);
	navigation_stack = _tmp1_;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				GListModel* _tmp4_;
				GListModel* _tmp5_;
				GObject* _tmp6_;
				GObject* _tmp7_;
				gboolean _tmp8_;
				if (!_tmp2_) {
					guint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = navigation_stack;
				if (!(i < g_list_model_get_n_items (_tmp4_))) {
					break;
				}
				_tmp5_ = navigation_stack;
				_tmp6_ = g_list_model_get_item (_tmp5_, i);
				_tmp7_ = _tmp6_;
				_tmp8_ = _tmp7_ == G_TYPE_CHECK_INSTANCE_CAST (page, G_TYPE_OBJECT, GObject);
				_g_object_unref0 (_tmp7_);
				if (_tmp8_) {
					result = TRUE;
					_g_object_unref0 (navigation_stack);
					return result;
				}
			}
		}
	}
	result = FALSE;
	_g_object_unref0 (navigation_stack);
	return result;
}

static void
proton_plus_widgets_tools_box_push_page (ProtonPlusWidgetsToolsBox* self,
                                         AdwNavigationPage* page)
{
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationView* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (page != NULL);
	_tmp0_ = self->priv->_navigation_view;
	_tmp1_ = adw_navigation_view_get_visible_page (_tmp0_);
	if (_tmp1_ == page) {
		return;
	}
	if (proton_plus_widgets_tools_box_navigation_stack_contains (self, page)) {
		AdwNavigationView* _tmp2_;
		_tmp2_ = self->priv->_navigation_view;
		adw_navigation_view_pop_to_page (_tmp2_, page);
		return;
	}
	_tmp3_ = self->priv->_navigation_view;
	adw_navigation_view_push (_tmp3_, page);
}

static gboolean
proton_plus_widgets_tools_box_pop_page (ProtonPlusWidgetsToolsBox* 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_tools_box_reset_to_root (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	AdwNavigationPage* _tmp2_;
	AdwNavigationPage** _tmp3_;
	AdwNavigationPage** _tmp4_;
	gint _tmp4__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_navigation_view;
	_tmp1_ = self->priv->_groups_page;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_tmp3_ = g_new0 (AdwNavigationPage*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 1;
	adw_navigation_view_replace (_tmp0_, _tmp4_, (gint) 1);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_object_unref), NULL);
}

static void
proton_plus_widgets_tools_box_navigate_to_canonical_page (ProtonPlusWidgetsToolsBox* self,
                                                          const gchar* tag)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tag != NULL);
	_tmp0_ = tag;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("groups")))) {
		switch (0) {
			default:
			{
				proton_plus_widgets_tools_box_reset_to_root (self);
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("releases")))) {
		switch (0) {
			default:
			{
				AdwNavigationView* _tmp3_;
				AdwNavigationPage* _tmp4_;
				AdwNavigationPage* _tmp5_;
				AdwNavigationPage* _tmp6_;
				AdwNavigationPage* _tmp7_;
				AdwNavigationPage** _tmp8_;
				AdwNavigationPage** _tmp9_;
				gint _tmp9__length1;
				_tmp3_ = self->priv->_navigation_view;
				_tmp4_ = self->priv->_groups_page;
				_tmp5_ = _g_object_ref0 (_tmp4_);
				_tmp6_ = self->priv->_releases_page;
				_tmp7_ = _g_object_ref0 (_tmp6_);
				_tmp8_ = g_new0 (AdwNavigationPage*, 2 + 1);
				_tmp8_[0] = _tmp5_;
				_tmp8_[1] = _tmp7_;
				_tmp9_ = _tmp8_;
				_tmp9__length1 = 2;
				adw_navigation_view_replace (_tmp3_, _tmp9_, (gint) 2);
				_tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) g_object_unref), NULL);
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("release")))) {
		switch (0) {
			default:
			{
				AdwNavigationView* _tmp10_;
				AdwNavigationPage* _tmp11_;
				AdwNavigationPage* _tmp12_;
				AdwNavigationPage* _tmp13_;
				AdwNavigationPage* _tmp14_;
				AdwNavigationPage* _tmp15_;
				AdwNavigationPage* _tmp16_;
				AdwNavigationPage** _tmp17_;
				AdwNavigationPage** _tmp18_;
				gint _tmp18__length1;
				_tmp10_ = self->priv->_navigation_view;
				_tmp11_ = self->priv->_groups_page;
				_tmp12_ = _g_object_ref0 (_tmp11_);
				_tmp13_ = self->priv->_releases_page;
				_tmp14_ = _g_object_ref0 (_tmp13_);
				_tmp15_ = self->priv->_release_page;
				_tmp16_ = _g_object_ref0 (_tmp15_);
				_tmp17_ = g_new0 (AdwNavigationPage*, 3 + 1);
				_tmp17_[0] = _tmp12_;
				_tmp17_[1] = _tmp14_;
				_tmp17_[2] = _tmp16_;
				_tmp18_ = _tmp17_;
				_tmp18__length1 = 3;
				adw_navigation_view_replace (_tmp10_, _tmp18_, (gint) 3);
				_tmp18_ = (_vala_array_free (_tmp18_, _tmp18__length1, (GDestroyNotify) g_object_unref), NULL);
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("migrate")))) {
		switch (0) {
			default:
			{
				AdwNavigationView* _tmp19_;
				AdwNavigationPage* _tmp20_;
				AdwNavigationPage* _tmp21_;
				AdwNavigationPage* _tmp22_;
				AdwNavigationPage* _tmp23_;
				AdwNavigationPage* _tmp24_;
				AdwNavigationPage* _tmp25_;
				AdwNavigationPage* _tmp26_;
				AdwNavigationPage* _tmp27_;
				AdwNavigationPage** _tmp28_;
				AdwNavigationPage** _tmp29_;
				gint _tmp29__length1;
				_tmp19_ = self->priv->_navigation_view;
				_tmp20_ = self->priv->_groups_page;
				_tmp21_ = _g_object_ref0 (_tmp20_);
				_tmp22_ = self->priv->_releases_page;
				_tmp23_ = _g_object_ref0 (_tmp22_);
				_tmp24_ = self->priv->_release_page;
				_tmp25_ = _g_object_ref0 (_tmp24_);
				_tmp26_ = self->priv->_migrate_page;
				_tmp27_ = _g_object_ref0 (_tmp26_);
				_tmp28_ = g_new0 (AdwNavigationPage*, 4 + 1);
				_tmp28_[0] = _tmp21_;
				_tmp28_[1] = _tmp23_;
				_tmp28_[2] = _tmp25_;
				_tmp28_[3] = _tmp27_;
				_tmp29_ = _tmp28_;
				_tmp29__length1 = 4;
				adw_navigation_view_replace (_tmp19_, _tmp29_, (gint) 4);
				_tmp29_ = (_vala_array_free (_tmp29_, _tmp29__length1, (GDestroyNotify) g_object_unref), NULL);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_warning ("tools-box.vala:490: Unknown Tools navigation page: %s", tag);
				proton_plus_widgets_tools_box_reset_to_root (self);
				break;
			}
		}
	}
}

void
proton_plus_widgets_tools_box_show_groups_page (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* _tmp0_;
	GtkCheckButton* _tmp1_;
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_box_reset_to_root (self);
	_tmp0_ = self->priv->_search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, "");
	_tmp1_ = self->priv->_all_filter_button;
	gtk_check_button_set_active (_tmp1_, TRUE);
	proton_plus_widgets_tools_box_refresh_group_boxes (self);
}

static gchar*
proton_plus_widgets_tools_box_real_get_controller_page_id (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("tools:%s", _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	result = _tmp3_;
	return result;
}

static GObject*
proton_plus_widgets_tools_box_real_get_controller_page_root (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	GtkWidget* _tmp2_;
	GObject* _tmp3_;
	GObject* result;
	self = (ProtonPlusWidgetsToolsBox*) 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_tools_box_real_get_controller_initial_focus (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	GtkWidget* root = NULL;
	AdwNavigationView* _tmp11_;
	AdwNavigationPage* _tmp12_;
	GtkWidget* _tmp13_;
	GtkWidget* _tmp14_;
	GtkWidget* _tmp15_ = NULL;
	GtkWidget* _tmp16_;
	GtkWidget* _tmp19_;
	GObject* result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "groups") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		ProtonPlusWidgetsToolsGroupBox* group = NULL;
		AdwViewStack* _tmp3_;
		GtkWidget* _tmp4_;
		ProtonPlusWidgetsToolsGroupBox* _tmp5_;
		ProtonPlusWidgetsToolsGroupBox* _tmp6_ = NULL;
		ProtonPlusWidgetsToolsGroupBox* _tmp7_;
		GObject* _tmp8_ = NULL;
		GObject* _tmp10_;
		_tmp3_ = self->priv->_groups_stack;
		_tmp4_ = adw_view_stack_get_visible_child (_tmp3_);
		_tmp5_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp4_) ? ((ProtonPlusWidgetsToolsGroupBox*) _tmp4_) : NULL);
		group = _tmp5_;
		_tmp7_ = group;
		_tmp6_ = _tmp7_;
		_tmp8_ = NULL;
		if (_tmp6_ != NULL) {
			GObject* _tmp9_;
			_tmp9_ = proton_plus_widgets_tools_group_box_get_controller_initial_focus (_tmp6_);
			_g_object_unref0 (_tmp8_);
			_tmp8_ = _tmp9_;
		}
		_tmp10_ = _tmp8_;
		_tmp8_ = NULL;
		result = _tmp10_;
		_g_object_unref0 (_tmp8_);
		_g_object_unref0 (group);
		return result;
	}
	_tmp11_ = self->priv->_navigation_view;
	_tmp12_ = adw_navigation_view_get_visible_page (_tmp11_);
	_tmp13_ = adw_navigation_page_get_child (_tmp12_);
	_tmp14_ = _g_object_ref0 (_tmp13_);
	root = _tmp14_;
	_tmp16_ = root;
	if (_tmp16_ == NULL) {
		_g_object_unref0 (_tmp15_);
		_tmp15_ = NULL;
	} else {
		GtkWidget* _tmp17_;
		GtkWidget* _tmp18_;
		_tmp17_ = root;
		_tmp18_ = proton_plus_widgets_tools_box_find_first_focusable (self, _tmp17_);
		_g_object_unref0 (_tmp15_);
		_tmp15_ = _tmp18_;
	}
	_tmp19_ = _tmp15_;
	_tmp15_ = NULL;
	result = (GObject*) _tmp19_;
	_g_object_unref0 (_tmp15_);
	_g_object_unref0 (root);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_box_find_first_focusable (ProtonPlusWidgetsToolsBox* self,
                                                    GtkWidget* root)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkWidget* child = NULL;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (root != NULL, NULL);
	if (!gtk_widget_get_mapped (root)) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = !gtk_widget_is_visible (root);
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = !gtk_widget_is_sensitive (root);
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	if (gtk_widget_get_focusable (root)) {
		GtkWidget* _tmp2_;
		_tmp2_ = _g_object_ref0 (root);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = gtk_widget_get_first_child (root);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	child = _tmp4_;
	while (TRUE) {
		GtkWidget* _tmp5_;
		GtkWidget* target = NULL;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp5_ = child;
		if (!(_tmp5_ != NULL)) {
			break;
		}
		_tmp6_ = child;
		_tmp7_ = proton_plus_widgets_tools_box_find_first_focusable (self, _tmp6_);
		target = _tmp7_;
		_tmp8_ = target;
		if (_tmp8_ != NULL) {
			result = target;
			_g_object_unref0 (child);
			return result;
		}
		_tmp9_ = child;
		_tmp10_ = gtk_widget_get_next_sibling (_tmp9_);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_g_object_unref0 (child);
		child = _tmp11_;
		_g_object_unref0 (target);
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_navigate_back (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	result = proton_plus_widgets_tools_box_pop_page (self);
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_can_navigate_back (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "groups") != 0;
	_g_free0 (_tmp1_);
	result = _tmp2_;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_can_switch_page (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_prefers_initial_focus_after_switch (ProtonPlusUtilsControllerNavigationHost* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	result = FALSE;
	return result;
}

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

static gboolean
proton_plus_widgets_tools_box_real_controller_can_open_search (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkMenuButton* _tmp2_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp2_ = self->priv->_search_button;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp2_)) {
		GtkMenuButton* _tmp3_;
		_tmp3_ = self->priv->_search_button;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp3_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp4_;
		_tmp4_ = self->priv->_search_button;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_can_open_filter (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsToolsBox * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkMenuButton* _tmp2_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp2_ = self->priv->_filter_button;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp2_)) {
		GtkMenuButton* _tmp3_;
		_tmp3_ = self->priv->_filter_button;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp3_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp4_;
		_tmp4_ = self->priv->_filter_button;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_open_search (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsToolsBox * self;
	GtkMenuButton* _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	if (!proton_plus_utils_controller_page_shortcuts_controller_can_open_search ((ProtonPlusUtilsControllerPageShortcuts*) self)) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->_search_button;
	gtk_menu_button_popup (_tmp0_);
	result = TRUE;
	return result;
}

static gboolean
proton_plus_widgets_tools_box_real_controller_open_filter (ProtonPlusUtilsControllerPageShortcuts* base)
{
	ProtonPlusWidgetsToolsBox * self;
	GtkMenuButton* _tmp0_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) 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;
}

void
proton_plus_widgets_tools_box_show_download (ProtonPlusWidgetsToolsBox* self,
                                             ProtonPlusServicesInstallJob* job)
{
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	proton_plus_widgets_tools_box_navigate_to_canonical_page (self, "releases");
	_tmp0_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_focus_job (_tmp0_, job, NULL, NULL);
}

static void
_proton_plus_widgets_tools_box_set_selected_tool_proton_plus_widgets_tools_group_box_tool_selected (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                                                    ProtonPlusModelsTool* tool,
                                                                                                    gpointer self)
{
	proton_plus_widgets_tools_box_set_selected_tool ((ProtonPlusWidgetsToolsBox*) self, tool);
}

void
proton_plus_widgets_tools_box_set_selected_launcher (ProtonPlusWidgetsToolsBox* self,
                                                     ProtonPlusModelsLauncher* launcher)
{
	GtkWidget* child = NULL;
	ProtonPlusModelsGroup** _tmp6_;
	gint _tmp6__length1;
	AdwNavigationView* _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	proton_plus_widgets_tools_box_set_current_launcher (self, launcher);
	while (TRUE) {
		AdwViewStack* _tmp0_;
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		AdwViewStack* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp0_ = self->priv->_groups_stack;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_g_object_unref0 (child);
		child = _tmp2_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = self->priv->_groups_stack;
		_tmp5_ = child;
		adw_view_stack_remove (_tmp4_, _tmp5_);
	}
	_tmp6_ = launcher->groups;
	_tmp6__length1 = launcher->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp6_;
		group_collection_length1 = _tmp6__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp7_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp7_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp7_;
			{
				ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
				ProtonPlusModelsGroup* _tmp8_;
				GtkMenuButton* _tmp9_;
				ProtonPlusWidgetsToolsGroupBox* _tmp10_;
				ProtonPlusWidgetsToolsGroupBox* _tmp11_;
				ProtonPlusWidgetsToolsFilter _tmp12_;
				ProtonPlusWidgetsToolsFilter _tmp13_;
				ProtonPlusWidgetsToolsGroupBox* _tmp14_;
				GtkSearchEntry* _tmp15_;
				const gchar* _tmp16_;
				ProtonPlusWidgetsToolsGroupBox* _tmp17_;
				AdwViewStack* _tmp18_;
				ProtonPlusWidgetsToolsGroupBox* _tmp19_;
				ProtonPlusModelsGroup* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				gchar* _tmp23_;
				gchar* _tmp24_;
				ProtonPlusModelsGroup* _tmp25_;
				const gchar* _tmp26_;
				const gchar* _tmp27_;
				_tmp8_ = group;
				_tmp9_ = self->priv->_search_button;
				_tmp10_ = proton_plus_widgets_tools_group_box_new (_tmp8_, (GtkWidget*) _tmp9_);
				g_object_ref_sink (_tmp10_);
				group_box = _tmp10_;
				_tmp11_ = group_box;
				_tmp12_ = proton_plus_widgets_tools_box_get_current_filter (self);
				_tmp13_ = _tmp12_;
				proton_plus_widgets_tools_group_box_set_filter (_tmp11_, _tmp13_);
				_tmp14_ = group_box;
				_tmp15_ = self->priv->_search_entry;
				_tmp16_ = gtk_editable_get_text ((GtkEditable*) _tmp15_);
				proton_plus_widgets_tools_group_box_set_search_text (_tmp14_, _tmp16_);
				_tmp17_ = group_box;
				g_signal_connect_object (_tmp17_, "tool-selected", (GCallback) _proton_plus_widgets_tools_box_set_selected_tool_proton_plus_widgets_tools_group_box_tool_selected, self, 0);
				_tmp18_ = self->priv->_groups_stack;
				_tmp19_ = group_box;
				_tmp20_ = group;
				_tmp21_ = proton_plus_models_group_get_title (_tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = g_utf8_strdown (_tmp22_, (gssize) -1);
				_tmp24_ = _tmp23_;
				_tmp25_ = group;
				_tmp26_ = proton_plus_models_group_get_title (_tmp25_);
				_tmp27_ = _tmp26_;
				adw_view_stack_add_titled_with_icon (_tmp18_, (GtkWidget*) _tmp19_, _tmp24_, _tmp27_, "layer-group-symbolic");
				_g_free0 (_tmp24_);
				_g_object_unref0 (group_box);
				_g_object_unref0 (group);
			}
		}
	}
	_tmp28_ = self->priv->_navigation_view;
	g_object_notify ((GObject*) _tmp28_, "visible-page");
	proton_plus_widgets_tools_box_reset_to_root (self);
	_g_object_unref0 (child);
}

static void
__lambda90_ (ProtonPlusWidgetsToolsBox* self,
             GObject* obj,
             GAsyncResult* _result_)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsToolsReleasesBox* _tmp1_;
	GtkRoot* root = NULL;
	GtkRoot* _tmp4_;
	GtkRoot* _tmp5_;
	GtkRoot* _tmp6_ = NULL;
	GtkRoot* _tmp7_;
	GtkWidget* _tmp8_ = NULL;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp10_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	GtkWidget* _tmp14_;
	g_return_if_fail (_result_ != NULL);
	_tmp1_ = self->priv->_releases_box;
	if (!proton_plus_widgets_tools_releases_box_set_selected_tool_finish (_tmp1_, _result_)) {
		_tmp0_ = TRUE;
	} else {
		gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
		_tmp3_ = _tmp2_;
		_tmp0_ = g_strcmp0 (_tmp3_, "releases") != 0;
		_g_free0 (_tmp3_);
	}
	if (_tmp0_) {
		return;
	}
	_tmp4_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	root = _tmp5_;
	_tmp7_ = root;
	_tmp6_ = _tmp7_;
	_tmp8_ = NULL;
	if (_tmp6_ != NULL) {
		GtkWidget* _tmp9_;
		_tmp9_ = gtk_root_get_focus (_tmp6_);
		_tmp8_ = _tmp9_;
	}
	_tmp10_ = _g_object_ref0 (_tmp8_);
	focused = _tmp10_;
	_tmp14_ = focused;
	if (_tmp14_ == NULL) {
		_tmp13_ = TRUE;
	} else {
		GtkWidget* _tmp15_;
		_tmp15_ = focused;
		_tmp13_ = !gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
	}
	if (_tmp13_) {
		_tmp12_ = TRUE;
	} else {
		GtkWidget* _tmp16_;
		AdwViewStack* _tmp17_;
		_tmp16_ = focused;
		_tmp17_ = self->priv->_groups_stack;
		_tmp12_ = _tmp16_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget);
	}
	if (_tmp12_) {
		_tmp11_ = TRUE;
	} else {
		GtkWidget* _tmp18_;
		AdwViewStack* _tmp19_;
		_tmp18_ = focused;
		_tmp19_ = self->priv->_groups_stack;
		_tmp11_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp19_);
	}
	if (_tmp11_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp20_;
		_tmp20_ = self->priv->_releases_box;
		proton_plus_widgets_tools_releases_box_focus_first_controller_target (_tmp20_);
	}
	_g_object_unref0 (focused);
	_g_object_unref0 (root);
}

static void
___lambda90__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda90_ ((ProtonPlusWidgetsToolsBox*) self, source_object, res);
	g_object_unref (self);
}

static void
proton_plus_widgets_tools_box_set_selected_tool (ProtonPlusWidgetsToolsBox* self,
                                                 ProtonPlusModelsTool* tool)
{
	AdwNavigationPage* _tmp0_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	_tmp0_ = self->priv->_releases_page;
	proton_plus_widgets_tools_box_push_page (self, _tmp0_);
	_tmp1_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_set_selected_tool (_tmp1_, tool, ___lambda90__gasync_ready_callback, g_object_ref (self));
}

static void
proton_plus_widgets_tools_box_set_selected_job (ProtonPlusWidgetsToolsBox* self,
                                                ProtonPlusServicesInstallJob* job,
                                                gboolean show_games)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusWidgetsToolsReleaseBox* _tmp1_;
	AdwNavigationPage* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_tmp0_ = _g_object_ref0 (job);
	_g_object_unref0 (self->priv->current_job);
	self->priv->current_job = _tmp0_;
	_tmp1_ = self->priv->_release_box;
	proton_plus_widgets_tools_release_box_set_selected_job (_tmp1_, job, show_games);
	_tmp2_ = self->priv->_release_page;
	proton_plus_widgets_tools_box_push_page (self, _tmp2_);
}

static void
proton_plus_widgets_tools_box_on_refresh_clicked (ProtonPlusWidgetsToolsBox* self)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_box_check_for_updates (self, NULL, NULL);
}

static void
proton_plus_widgets_tools_box_check_for_updates_data_free (gpointer _data)
{
	ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusWidgetsToolsBoxCheckForUpdatesData, _data_);
}

static void
proton_plus_widgets_tools_box_check_for_updates (ProtonPlusWidgetsToolsBox* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_;
	ProtonPlusWidgetsToolsBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusWidgetsToolsBoxCheckForUpdatesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_widgets_tools_box_check_for_updates_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_widgets_tools_box_check_for_updates_co (_data_);
}

static void
proton_plus_widgets_tools_box_check_for_updates_finish (ProtonPlusWidgetsToolsBox* self,
                                                        GAsyncResult* _res_)
{
	ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
proton_plus_widgets_tools_box_check_for_updates_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_)
{
	ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_widgets_tools_box_check_for_updates_co (_data_);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static gboolean
proton_plus_widgets_tools_box_check_for_updates_co (ProtonPlusWidgetsToolsBoxCheckForUpdatesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp0_, FALSE);
	g_signal_emit (_data_->self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL], 0, _ ("Checking for updates"));
	_data_->launchers = NULL;
	_data_->_tmp1_ = _data_->self->priv->_current_launcher;
	_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
	_data_->launchers = g_list_append (_data_->launchers, _data_->_tmp2_);
	_data_->_tmp3_ = proton_plus_services_installation_service_get_instance ();
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->launchers;
	_data_->_state_ = 1;
	proton_plus_services_installation_service_check_for_updates (_data_->_tmp4_, _data_->_tmp5_, proton_plus_widgets_tools_box_check_for_updates_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_services_installation_service_check_for_updates_finish (_data_->_tmp4_, _data_->_res_);
	switch (_data_->code) {
		case PROTON_PLUS_RETURN_CODE_RUNNERS_IN_USE:
		{
			g_signal_emit (_data_->self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL], 0, _ ("Can't update while a game is running"));
			break;
		}
		case PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE:
		{
			g_signal_emit (_data_->self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL], 0, _ ("Nothing to update"));
			break;
		}
		case PROTON_PLUS_RETURN_CODE_RUNNERS_UPDATED:
		case PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED:
		{
			g_signal_emit (_data_->self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL], 0, _ ("Everything is now up-to-date"));
			break;
		}
		default:
		{
			_data_->_tmp6_ = proton_plus_get_return_code_message (_data_->code);
			_data_->_tmp7_ = _data_->_tmp6_;
			_data_->_tmp8_ = g_strdup_printf (_ ("Couldn't check for updates (Reason: %s)"), _data_->_tmp7_);
			_data_->_tmp9_ = _data_->_tmp8_;
			g_signal_emit (_data_->self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL], 0, _data_->_tmp9_);
			_g_free0 (_data_->_tmp9_);
			_g_free0 (_data_->_tmp7_);
			break;
		}
	}
	_data_->_tmp10_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp10_, TRUE);
	(_data_->launchers == NULL) ? NULL : (_data_->launchers = (_g_list_free__g_object_unref0_ (_data_->launchers), NULL));
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static ProtonPlusModelsLauncher*
proton_plus_widgets_tools_box_get_current_launcher (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusModelsLauncher* result;
	ProtonPlusModelsLauncher* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_current_launcher;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_current_launcher (ProtonPlusWidgetsToolsBox* self,
                                                    ProtonPlusModelsLauncher* value)
{
	ProtonPlusModelsLauncher* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_current_launcher);
	self->priv->_current_launcher = _tmp0_;
}

static AdwNavigationView*
proton_plus_widgets_tools_box_get_navigation_view (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationView* result;
	AdwNavigationView* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_navigation_view;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_navigation_view (ProtonPlusWidgetsToolsBox* self,
                                                   AdwNavigationView* value)
{
	AdwNavigationView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_navigation_view);
	self->priv->_navigation_view = _tmp0_;
}

static AdwNavigationPage*
proton_plus_widgets_tools_box_get_groups_page (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_groups_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_groups_page (ProtonPlusWidgetsToolsBox* self,
                                               AdwNavigationPage* value)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_groups_page);
	self->priv->_groups_page = _tmp0_;
}

static AdwNavigationPage*
proton_plus_widgets_tools_box_get_releases_page (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_releases_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_releases_page (ProtonPlusWidgetsToolsBox* self,
                                                 AdwNavigationPage* value)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_releases_page);
	self->priv->_releases_page = _tmp0_;
}

static AdwNavigationPage*
proton_plus_widgets_tools_box_get_release_page (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_release_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_release_page (ProtonPlusWidgetsToolsBox* self,
                                                AdwNavigationPage* value)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_release_page);
	self->priv->_release_page = _tmp0_;
}

static AdwNavigationPage*
proton_plus_widgets_tools_box_get_migrate_page (ProtonPlusWidgetsToolsBox* self)
{
	AdwNavigationPage* result;
	AdwNavigationPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_migrate_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_migrate_page (ProtonPlusWidgetsToolsBox* self,
                                                AdwNavigationPage* value)
{
	AdwNavigationPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_migrate_page);
	self->priv->_migrate_page = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_box_get_back_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_back_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_back_button (ProtonPlusWidgetsToolsBox* self,
                                               GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_back_button);
	self->priv->_back_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_box_get_refresh_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_refresh_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_refresh_button (ProtonPlusWidgetsToolsBox* self,
                                                  GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_refresh_button);
	self->priv->_refresh_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_box_get_open_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_open_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_open_button (ProtonPlusWidgetsToolsBox* self,
                                               GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_open_button);
	self->priv->_open_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_box_get_migrate_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_migrate_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_migrate_button (ProtonPlusWidgetsToolsBox* self,
                                                  GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_migrate_button);
	self->priv->_migrate_button = _tmp0_;
}

static GtkSearchEntry*
proton_plus_widgets_tools_box_get_search_entry (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* result;
	GtkSearchEntry* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_search_entry;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_search_entry (ProtonPlusWidgetsToolsBox* self,
                                                GtkSearchEntry* value)
{
	GtkSearchEntry* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_search_entry);
	self->priv->_search_entry = _tmp0_;
}

static GtkMenuButton*
proton_plus_widgets_tools_box_get_search_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkMenuButton* result;
	GtkMenuButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_search_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_search_button (ProtonPlusWidgetsToolsBox* self,
                                                 GtkMenuButton* value)
{
	GtkMenuButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_search_button);
	self->priv->_search_button = _tmp0_;
}

static GtkMenuButton*
proton_plus_widgets_tools_box_get_filter_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkMenuButton* result;
	GtkMenuButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_filter_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                 GtkMenuButton* value)
{
	GtkMenuButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_filter_button);
	self->priv->_filter_button = _tmp0_;
}

static AdwHeaderBar*
proton_plus_widgets_tools_box_get_header_bar (ProtonPlusWidgetsToolsBox* self)
{
	AdwHeaderBar* result;
	AdwHeaderBar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_bar;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_header_bar (ProtonPlusWidgetsToolsBox* self,
                                              AdwHeaderBar* value)
{
	AdwHeaderBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_header_bar);
	self->priv->_header_bar = _tmp0_;
}

static GtkActionBar*
proton_plus_widgets_tools_box_get_action_bar (ProtonPlusWidgetsToolsBox* self)
{
	GtkActionBar* result;
	GtkActionBar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_action_bar;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_action_bar (ProtonPlusWidgetsToolsBox* self,
                                              GtkActionBar* value)
{
	GtkActionBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_action_bar);
	self->priv->_action_bar = _tmp0_;
}

static GtkCheckButton*
proton_plus_widgets_tools_box_get_all_filter_button (ProtonPlusWidgetsToolsBox* self)
{
	GtkCheckButton* result;
	GtkCheckButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_all_filter_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_all_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                     GtkCheckButton* value)
{
	GtkCheckButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_all_filter_button);
	self->priv->_all_filter_button = _tmp0_;
}

static AdwViewStack*
proton_plus_widgets_tools_box_get_groups_stack (ProtonPlusWidgetsToolsBox* self)
{
	AdwViewStack* result;
	AdwViewStack* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_groups_stack;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_groups_stack (ProtonPlusWidgetsToolsBox* self,
                                                AdwViewStack* value)
{
	AdwViewStack* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_groups_stack);
	self->priv->_groups_stack = _tmp0_;
}

static ProtonPlusWidgetsToolsReleasesBox*
proton_plus_widgets_tools_box_get_releases_box (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsReleasesBox* result;
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_releases_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_releases_box (ProtonPlusWidgetsToolsBox* self,
                                                ProtonPlusWidgetsToolsReleasesBox* value)
{
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_releases_box);
	self->priv->_releases_box = _tmp0_;
}

static ProtonPlusWidgetsToolsReleaseBox*
proton_plus_widgets_tools_box_get_release_box (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsReleaseBox* result;
	ProtonPlusWidgetsToolsReleaseBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_release_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_release_box (ProtonPlusWidgetsToolsBox* self,
                                               ProtonPlusWidgetsToolsReleaseBox* value)
{
	ProtonPlusWidgetsToolsReleaseBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_release_box);
	self->priv->_release_box = _tmp0_;
}

static ProtonPlusWidgetsToolsMigrateBox*
proton_plus_widgets_tools_box_get_migrate_box (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsMigrateBox* result;
	ProtonPlusWidgetsToolsMigrateBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_migrate_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_migrate_box (ProtonPlusWidgetsToolsBox* self,
                                               ProtonPlusWidgetsToolsMigrateBox* value)
{
	ProtonPlusWidgetsToolsMigrateBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_migrate_box);
	self->priv->_migrate_box = _tmp0_;
}

static AdwViewSwitcher*
proton_plus_widgets_tools_box_get_switcher (ProtonPlusWidgetsToolsBox* self)
{
	AdwViewSwitcher* result;
	AdwViewSwitcher* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_switcher;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_switcher (ProtonPlusWidgetsToolsBox* self,
                                            AdwViewSwitcher* value)
{
	AdwViewSwitcher* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_switcher);
	self->priv->_switcher = _tmp0_;
}

static AdwViewStack*
proton_plus_widgets_tools_box_get_center_stack (ProtonPlusWidgetsToolsBox* self)
{
	AdwViewStack* result;
	AdwViewStack* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_center_stack;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_center_stack (ProtonPlusWidgetsToolsBox* self,
                                                AdwViewStack* value)
{
	AdwViewStack* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_center_stack);
	self->priv->_center_stack = _tmp0_;
}

ProtonPlusWidgetsToolsFilter
proton_plus_widgets_tools_box_get_current_filter (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsFilter result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_current_filter;
	return result;
}

void
proton_plus_widgets_tools_box_set_current_filter (ProtonPlusWidgetsToolsBox* self,
                                                  ProtonPlusWidgetsToolsFilter value)
{
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	GtkWidget* child = NULL;
	AdwViewStack* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	g_return_if_fail (self != NULL);
	self->priv->_current_filter = value;
	_tmp0_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_set_filter (_tmp0_, value);
	proton_plus_widgets_tools_box_update_filter_button_state (self);
	_tmp1_ = self->priv->_groups_stack;
	_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	child = _tmp3_;
	while (TRUE) {
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		_tmp4_ = child;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp5_)) {
			GtkWidget* _tmp6_;
			_tmp6_ = child;
			proton_plus_widgets_tools_group_box_set_filter (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), value);
		}
		_tmp7_ = child;
		_tmp8_ = gtk_widget_get_next_sibling (_tmp7_);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (child);
		child = _tmp9_;
	}
	_g_object_unref0 (child);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_box_properties[PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY]);
}

static void
proton_plus_widgets_tools_box_class_init (ProtonPlusWidgetsToolsBoxClass * klass,
                                          gpointer klass_data)
{
	proton_plus_widgets_tools_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsBox_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) proton_plus_widgets_tools_box_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_tools_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY, proton_plus_widgets_tools_box_properties[PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY] = g_param_spec_enum ("current-filter", "current-filter", "current-filter", PROTON_PLUS_WIDGETS_TOOLS_TYPE_FILTER, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL] = g_signal_new ("toast-sent", PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static void
proton_plus_widgets_tools_box_proton_plus_utils_controller_navigation_host_interface_init (ProtonPlusUtilsControllerNavigationHostIface * iface,
                                                                                           gpointer iface_data)
{
	proton_plus_widgets_tools_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_tools_box_real_get_controller_page_id;
	iface->get_controller_page_root = (GObject* (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_get_controller_page_root;
	iface->get_controller_initial_focus = (GObject* (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_get_controller_initial_focus;
	iface->controller_navigate_back = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_controller_navigate_back;
	iface->controller_can_navigate_back = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_controller_can_navigate_back;
	iface->controller_can_switch_page = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_controller_can_switch_page;
	iface->controller_prefers_initial_focus_after_switch = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*)) proton_plus_widgets_tools_box_real_controller_prefers_initial_focus_after_switch;
	iface->controller_switch_page = (gboolean (*) (ProtonPlusUtilsControllerNavigationHost*, gint)) proton_plus_widgets_tools_box_real_controller_switch_page;
}

static void
proton_plus_widgets_tools_box_proton_plus_utils_controller_page_shortcuts_interface_init (ProtonPlusUtilsControllerPageShortcutsIface * iface,
                                                                                          gpointer iface_data)
{
	proton_plus_widgets_tools_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_tools_box_real_controller_can_open_search;
	iface->controller_can_open_filter = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_tools_box_real_controller_can_open_filter;
	iface->controller_open_search = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_tools_box_real_controller_open_search;
	iface->controller_open_filter = (gboolean (*) (ProtonPlusUtilsControllerPageShortcuts*)) proton_plus_widgets_tools_box_real_controller_open_filter;
}

static void
proton_plus_widgets_tools_box_instance_init (ProtonPlusWidgetsToolsBox * self,
                                             gpointer klass)
{
	self->priv = proton_plus_widgets_tools_box_get_instance_private (self);
	self->priv->background_updates_changed_handler = (gulong) 0;
	self->priv->show_legacy_tools_changed_handler = (gulong) 0;
	self->priv->_current_filter = PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL;
}

static void
proton_plus_widgets_tools_box_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX, ProtonPlusWidgetsToolsBox);
	_g_object_unref0 (self->priv->_current_launcher);
	_g_object_unref0 (self->priv->current_job);
	_g_object_unref0 (self->priv->_navigation_view);
	_g_object_unref0 (self->priv->_groups_page);
	_g_object_unref0 (self->priv->_releases_page);
	_g_object_unref0 (self->priv->_release_page);
	_g_object_unref0 (self->priv->_migrate_page);
	_g_object_unref0 (self->priv->_back_button);
	_g_object_unref0 (self->priv->_refresh_button);
	_g_object_unref0 (self->priv->_open_button);
	_g_object_unref0 (self->priv->_migrate_button);
	_g_object_unref0 (self->priv->_search_entry);
	_g_object_unref0 (self->priv->_search_button);
	_g_object_unref0 (self->priv->_filter_button);
	_g_object_unref0 (self->priv->_header_bar);
	_g_object_unref0 (self->priv->_action_bar);
	_g_object_unref0 (self->priv->_all_filter_button);
	_g_object_unref0 (self->priv->_groups_stack);
	_g_object_unref0 (self->priv->_releases_box);
	_g_object_unref0 (self->priv->_release_box);
	_g_object_unref0 (self->priv->_migrate_box);
	_g_object_unref0 (self->priv->_switcher);
	_g_object_unref0 (self->priv->_center_stack);
	G_OBJECT_CLASS (proton_plus_widgets_tools_box_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsBox), 0, (GInstanceInitFunc) proton_plus_widgets_tools_box_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_navigation_host_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_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_tools_box_proton_plus_utils_controller_page_shortcuts_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_tools_box_type_id;
	proton_plus_widgets_tools_box_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsToolsBox", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_tools_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_tools_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_PAGE_SHORTCUTS, &proton_plus_utils_controller_page_shortcuts_info);
	ProtonPlusWidgetsToolsBox_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_box_type_id, sizeof (ProtonPlusWidgetsToolsBoxPrivate));
	return proton_plus_widgets_tools_box_type_id;
}

GType
proton_plus_widgets_tools_box_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_box_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_box_type_id__once)) {
		GType proton_plus_widgets_tools_box_type_id;
		proton_plus_widgets_tools_box_type_id = proton_plus_widgets_tools_box_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_box_type_id__once, proton_plus_widgets_tools_box_type_id);
	}
	return proton_plus_widgets_tools_box_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_box_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX, ProtonPlusWidgetsToolsBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_tools_box_get_current_filter (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_tools_box_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX, ProtonPlusWidgetsToolsBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_BOX_CURRENT_FILTER_PROPERTY:
		proton_plus_widgets_tools_box_set_current_filter (self, g_value_get_enum (value));
		break;
		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);
}

