/* 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 <gio/gio.h>
#include <float.h>
#include <math.h>
#include <gee.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 _Block17Data Block17Data;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block18Data Block18Data;
typedef struct _Block19Data Block19Data;
typedef struct _Block20Data Block20Data;
typedef struct _Block21Data Block21Data;
typedef struct _ProtonPlusWidgetsToolsBoxCheckForUpdatesData ProtonPlusWidgetsToolsBoxCheckForUpdatesData;
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_BOX_TOAST_SENT_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_BOX_HEADER_PRESENTATION_CHANGED_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* _migrate_page;
	GtkButton* _refresh_button;
	GtkSearchEntry* _search_entry;
	GtkMenuButton* _search_button;
	GtkMenuButton* _filter_button;
	GtkActionBar* _action_bar;
	GtkCheckButton* _all_filter_button;
	AdwViewStack* _groups_stack;
	ProtonPlusWidgetsToolsReleasesBox* _releases_box;
	ProtonPlusWidgetsToolsMigrateBox* _migrate_box;
	AdwViewSwitcher* _switcher;
	AdwViewStack* _center_stack;
	GtkBox* _root_page_box;
	ProtonPlusWidgetsToolsGroupBox* heading_group;
	ProtonPlusWidgetsHeaderPresentation* _migrate_presentation;
	gulong background_updates_changed_handler;
	gulong show_legacy_tools_changed_handler;
	gulong migrate_back_handler;
	ProtonPlusWidgetsToolsGroupBox* expanded_group;
	ProtonPlusServicesInstallJob* pending_download_job;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* interaction_state;
	ProtonPlusWidgetsToolsFilter _current_filter;
};

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

struct _Block18Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusServicesInstallJob* job;
	ProtonPlusWidgetsToolsGroupBox* group_box;
	gdouble scroll_position;
};

struct _Block19Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusWidgetsToolsGroupBox* group_box;
};

struct _Block20Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusWidgetsToolsGroupBox* group_box;
	ProtonPlusModelsTool* tool;
};

struct _Block21Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusServicesInstallJob* job;
};

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 Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_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_root_page_box (ProtonPlusWidgetsToolsBox* self,
                                                      GtkBox* value);
static GtkBox* proton_plus_widgets_tools_box_get_root_page_box (ProtonPlusWidgetsToolsBox* self);
static AdwViewStack* proton_plus_widgets_tools_box_get_groups_stack (ProtonPlusWidgetsToolsBox* self);
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 __lambda75_ (ProtonPlusWidgetsToolsBox* self,
                  ProtonPlusServicesInstallJob* job);
static void proton_plus_widgets_tools_box_show_changelog_dialog (ProtonPlusWidgetsToolsBox* self,
                                                          ProtonPlusServicesInstallJob* job);
static void ___lambda75__proton_plus_widgets_tools_releases_box_changelog_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                              ProtonPlusServicesInstallJob* job,
                                                                              gpointer self);
static void __lambda83_ (ProtonPlusWidgetsToolsBox* self,
                  ProtonPlusServicesInstallJob* job);
static void proton_plus_widgets_tools_box_show_games_dialog (ProtonPlusWidgetsToolsBox* self,
                                                      ProtonPlusServicesInstallJob* job);
static void ___lambda83__proton_plus_widgets_tools_releases_box_games_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                          ProtonPlusServicesInstallJob* job,
                                                                          gpointer self);
static void __lambda87_ (ProtonPlusWidgetsToolsBox* self);
static GtkSearchEntry* proton_plus_widgets_tools_box_get_search_entry (ProtonPlusWidgetsToolsBox* self);
static GtkMenuButton* proton_plus_widgets_tools_box_get_search_button (ProtonPlusWidgetsToolsBox* self);
static void ___lambda87__proton_plus_widgets_tools_releases_box_clear_search_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                                 gpointer self);
static void __lambda88_ (ProtonPlusWidgetsToolsBox* self);
static GtkCheckButton* proton_plus_widgets_tools_box_get_all_filter_button (ProtonPlusWidgetsToolsBox* self);
static GtkMenuButton* proton_plus_widgets_tools_box_get_filter_button (ProtonPlusWidgetsToolsBox* self);
static void ___lambda88__proton_plus_widgets_tools_releases_box_reset_filter_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                                 gpointer self);
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 __lambda89_ (ProtonPlusWidgetsToolsBox* self);
static gchar* proton_plus_widgets_tools_box_get_visible_page_tag (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 void ___lambda89__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_migrate_page (ProtonPlusWidgetsToolsBox* self,
                                                     AdwNavigationPage* value);
static void proton_plus_widgets_tools_box_set_navigation_view (ProtonPlusWidgetsToolsBox* self,
                                                        AdwNavigationView* value);
static AdwNavigationView* proton_plus_widgets_tools_box_get_navigation_view (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_groups_page (ProtonPlusWidgetsToolsBox* self);
static AdwNavigationPage* proton_plus_widgets_tools_box_get_migrate_page (ProtonPlusWidgetsToolsBox* 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 void __lambda90_ (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_update_search_button_state (ProtonPlusWidgetsToolsBox* self);
static void ___lambda90__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                                   gpointer self);
static void __lambda91_ (Block17Data* _data17_);
static void ___lambda91__gtk_search_entry_stop_search (GtkSearchEntry* _sender,
                                                gpointer self);
static void proton_plus_widgets_tools_box_set_search_button (ProtonPlusWidgetsToolsBox* self,
                                                      GtkMenuButton* value);
static void proton_plus_widgets_tools_box_set_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                      GtkMenuButton* value);
static void proton_plus_widgets_tools_box_set_all_filter_button (ProtonPlusWidgetsToolsBox* self,
                                                          GtkCheckButton* value);
static void __lambda92_ (Block17Data* _data17_);
static void ___lambda92__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda93_ (Block17Data* _data17_);
static void ___lambda93__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda94_ (Block17Data* _data17_);
static void ___lambda94__gtk_check_button_toggled (GtkCheckButton* _sender,
                                            gpointer self);
static void __lambda95_ (Block17Data* _data17_);
static void ___lambda95__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_migrate_presentation (ProtonPlusWidgetsToolsBox* self,
                                                             ProtonPlusWidgetsHeaderPresentation* value);
static ProtonPlusWidgetsHeaderPresentation* proton_plus_widgets_tools_box_get_migrate_presentation (ProtonPlusWidgetsToolsBox* self);
static void __lambda96_ (ProtonPlusWidgetsToolsBox* self);
static void ___lambda96__proton_plus_widgets_header_presentation_back_requested (ProtonPlusWidgetsHeaderPresentation* _sender,
                                                                          gpointer 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 __lambda97_ (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_clear_root_heading (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_update_root_heading (ProtonPlusWidgetsToolsBox* self);
static void ___lambda97__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda98_ (ProtonPlusWidgetsToolsBox* self,
                  AdwNavigationPage* page);
static void proton_plus_widgets_tools_box_refresh_group_boxes (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_restore_current_release_focus (ProtonPlusWidgetsToolsBox* self);
static void ___lambda98__adw_navigation_view_popped (AdwNavigationView* _sender,
                                              AdwNavigationPage* page,
                                              gpointer self);
static void __lambda100_ (ProtonPlusWidgetsToolsBox* self);
static void proton_plus_widgets_tools_box_collapse_current_expansion (ProtonPlusWidgetsToolsBox* self,
                                                               gboolean restore_focus);
static void ___lambda100__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    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 ProtonPlusWidgetsToolsGroupBox* proton_plus_widgets_tools_box_find_group_for_tool (ProtonPlusWidgetsToolsBox* self,
                                                                                   ProtonPlusModelsTool* tool);
static void proton_plus_widgets_tools_box_focus_download_job (ProtonPlusWidgetsToolsBox* self,
                                                       ProtonPlusServicesInstallJob* job,
                                                       ProtonPlusWidgetsToolsGroupBox* group_box);
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
static gboolean __lambda99_ (Block18Data* _data18_);
static gboolean ___lambda99__gsource_func (gpointer self);
static gboolean proton_plus_widgets_tools_box_navigation_stack_contains (ProtonPlusWidgetsToolsBox* self,
                                                                  AdwNavigationPage* page);
static void proton_plus_widgets_tools_box_push_page (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 __lambda101_ (ProtonPlusWidgetsToolsBox* self);
static gboolean ___lambda101__gsource_func (gpointer self);
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 Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
static void ____lambda102_ (Block19Data* _data19_,
                     ProtonPlusModelsTool* tool,
                     gboolean expanded);
static void proton_plus_widgets_tools_box_on_tool_expansion_changed (ProtonPlusWidgetsToolsBox* self,
                                                              ProtonPlusWidgetsToolsGroupBox* group_box,
                                                              ProtonPlusModelsTool* tool,
                                                              gboolean expanded);
static void _____lambda102__proton_plus_widgets_tools_group_box_tool_expansion_changed (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                                 ProtonPlusModelsTool* tool,
                                                                                 gboolean expanded,
                                                                                 gpointer self);
static void ____lambda104_ (ProtonPlusWidgetsToolsBox* self);
static void _____lambda104__proton_plus_widgets_tools_group_box_clear_search_requested (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                                 gpointer self);
static void ____lambda105_ (ProtonPlusWidgetsToolsBox* self);
static void _____lambda105__proton_plus_widgets_tools_group_box_reset_filter_requested (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                                 gpointer self);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void __lambda103_ (Block20Data* _data20_,
                   GObject* obj,
                   GAsyncResult* _result_);
static void ___lambda103__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void proton_plus_widgets_tools_box_remember_release_navigation (ProtonPlusWidgetsToolsBox* self,
                                                                ProtonPlusServicesInstallJob* job);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void __lambda86_ (Block21Data* _data21_,
                  GeeArrayList* games);
static void ___lambda86__proton_plus_widgets_tools_release_games_dialog_migrate_requested (ProtonPlusWidgetsToolsReleaseGamesDialog* _sender,
                                                                                    GeeArrayList* games,
                                                                                    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 ProtonPlusModelsLauncher* proton_plus_widgets_tools_box_get_current_launcher (ProtonPlusWidgetsToolsBox* self);
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 Block17Data*
block17_data_ref (Block17Data* _data17_)
{
	g_atomic_int_inc (&_data17_->_ref_count_);
	return _data17_;
}

static void
block17_data_unref (void * _userdata_)
{
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data17_->self;
		_g_object_unref0 (_data17_->filter_popover);
		_g_object_unref0 (_data17_->unused_filter_button);
		_g_object_unref0 (_data17_->used_filter_button);
		_g_object_unref0 (_data17_->installed_filter_button);
		_g_object_unref0 (_data17_->search_popover);
		_g_object_unref0 (self);
		g_slice_free (Block17Data, _data17_);
	}
}

static void
__lambda75_ (ProtonPlusWidgetsToolsBox* self,
             ProtonPlusServicesInstallJob* job)
{
	g_return_if_fail (job != NULL);
	proton_plus_widgets_tools_box_show_changelog_dialog (self, job);
}

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

static void
__lambda83_ (ProtonPlusWidgetsToolsBox* self,
             ProtonPlusServicesInstallJob* job)
{
	g_return_if_fail (job != NULL);
	proton_plus_widgets_tools_box_show_games_dialog (self, job);
}

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

static void
__lambda87_ (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* _tmp0_;
	GtkMenuButton* _tmp1_;
	_tmp0_ = self->priv->_search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, "");
	_tmp1_ = self->priv->_search_button;
	gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
}

static void
___lambda87__proton_plus_widgets_tools_releases_box_clear_search_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                            gpointer self)
{
	__lambda87_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda88_ (ProtonPlusWidgetsToolsBox* self)
{
	GtkCheckButton* _tmp0_;
	GtkMenuButton* _tmp1_;
	_tmp0_ = self->priv->_all_filter_button;
	gtk_check_button_set_active (_tmp0_, TRUE);
	_tmp1_ = self->priv->_filter_button;
	gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
}

static void
___lambda88__proton_plus_widgets_tools_releases_box_reset_filter_requested (ProtonPlusWidgetsToolsReleasesBox* _sender,
                                                                            gpointer self)
{
	__lambda88_ ((ProtonPlusWidgetsToolsBox*) self);
}

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

static void
__lambda89_ (ProtonPlusWidgetsToolsBox* self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp3_;
	GtkWidget* child = NULL;
	AdwViewStack* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "migrate") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		proton_plus_widgets_tools_box_pop_page (self);
	} else {
		proton_plus_widgets_tools_box_navigate_to_canonical_page (self, "groups");
	}
	_tmp3_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_refresh_usage_pills (_tmp3_);
	_tmp4_ = self->priv->_groups_stack;
	_tmp5_ = gtk_widget_get_first_child ((GtkWidget*) _tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	child = _tmp6_;
	while (TRUE) {
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		GtkWidget* _tmp12_;
		_tmp7_ = child;
		if (!(_tmp7_ != NULL)) {
			break;
		}
		_tmp8_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp8_)) {
			GtkWidget* _tmp9_;
			_tmp9_ = child;
			proton_plus_widgets_tools_group_box_refresh (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
		}
		_tmp10_ = child;
		_tmp11_ = gtk_widget_get_next_sibling (_tmp10_);
		_tmp12_ = _g_object_ref0 (_tmp11_);
		_g_object_unref0 (child);
		child = _tmp12_;
	}
	_g_object_unref0 (child);
}

static void
___lambda89__proton_plus_widgets_tools_migrate_box_finished (ProtonPlusWidgetsToolsMigrateBox* _sender,
                                                             gpointer self)
{
	__lambda89_ ((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
__lambda90_ (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
___lambda90__gtk_search_entry_search_changed (GtkSearchEntry* _sender,
                                              gpointer self)
{
	__lambda90_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda91_ (Block17Data* _data17_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkSearchEntry* _tmp0_;
	const gchar* _tmp1_;
	GtkPopover* _tmp3_;
	GtkMenuButton* _tmp4_;
	self = _data17_->self;
	_tmp0_ = self->priv->_search_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	if (g_strcmp0 (_tmp1_, "") != 0) {
		GtkSearchEntry* _tmp2_;
		_tmp2_ = self->priv->_search_entry;
		gtk_editable_set_text ((GtkEditable*) _tmp2_, "");
		return;
	}
	_tmp3_ = _data17_->search_popover;
	gtk_popover_popdown (_tmp3_);
	_tmp4_ = self->priv->_search_button;
	gtk_widget_grab_focus ((GtkWidget*) _tmp4_);
}

static void
___lambda91__gtk_search_entry_stop_search (GtkSearchEntry* _sender,
                                           gpointer self)
{
	__lambda91_ (self);
}

static void
__lambda92_ (Block17Data* _data17_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data17_->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_ = _data17_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda92__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda92_ (self);
}

static void
__lambda93_ (Block17Data* _data17_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data17_->self;
	_tmp0_ = _data17_->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_ = _data17_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda93__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda93_ (self);
}

static void
__lambda94_ (Block17Data* _data17_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data17_->self;
	_tmp0_ = _data17_->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_ = _data17_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda94__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda94_ (self);
}

static void
__lambda95_ (Block17Data* _data17_)
{
	ProtonPlusWidgetsToolsBox* self;
	GtkCheckButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data17_->self;
	_tmp0_ = _data17_->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_ = _data17_->filter_popover;
		gtk_popover_popdown (_tmp3_);
	}
}

static void
___lambda95__gtk_check_button_toggled (GtkCheckButton* _sender,
                                       gpointer self)
{
	__lambda95_ (self);
}

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

static void
___lambda96__proton_plus_widgets_header_presentation_back_requested (ProtonPlusWidgetsHeaderPresentation* _sender,
                                                                     gpointer self)
{
	__lambda96_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
__lambda97_ (ProtonPlusWidgetsToolsBox* self)
{
	gchar* visible_child = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	GtkMenuButton* _tmp2_;
	const gchar* _tmp3_;
	GtkMenuButton* _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_ = FALSE;
	GSettings* _tmp7_;
	gboolean background_updates_enabled = FALSE;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	GtkButton* _tmp11_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp12_;
	GtkMenuButton* _tmp13_;
	GtkMenuButton* _tmp14_;
	const gchar* _tmp15_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp16_;
	GtkButton* _tmp17_;
	GtkButton* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	ProtonPlusWidgetsHeaderPresentation* _tmp35_;
	ProtonPlusWidgetsHeaderPresentation* _tmp36_;
	const gchar* _tmp37_;
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	visible_child = _tmp0_;
	_tmp1_ = visible_child;
	if (g_strcmp0 (_tmp1_, "groups") != 0) {
		proton_plus_widgets_tools_box_clear_root_heading (self);
	}
	_tmp2_ = self->priv->_search_button;
	_tmp3_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, g_strcmp0 (_tmp3_, "migrate") != 0);
	_tmp4_ = self->priv->_filter_button;
	_tmp5_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, g_strcmp0 (_tmp5_, "migrate") != 0);
	_tmp7_ = proton_plus_globals_SETTINGS;
	if (_tmp7_ != NULL) {
		GSettings* _tmp8_;
		_tmp8_ = proton_plus_globals_SETTINGS;
		_tmp6_ = g_settings_get_boolean (_tmp8_, "background-updates");
	} else {
		_tmp6_ = FALSE;
	}
	background_updates_enabled = _tmp6_;
	_tmp10_ = visible_child;
	if (g_strcmp0 (_tmp10_, "migrate") != 0) {
		_tmp9_ = !background_updates_enabled;
	} else {
		_tmp9_ = FALSE;
	}
	_tmp11_ = self->priv->_refresh_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, _tmp9_);
	_tmp12_ = self->priv->_migrate_box;
	_tmp13_ = proton_plus_widgets_tools_migrate_box_get_games_button (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp14_, g_strcmp0 (_tmp15_, "migrate") == 0);
	_tmp16_ = self->priv->_migrate_box;
	_tmp17_ = proton_plus_widgets_tools_migrate_box_get_migrate_button (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = visible_child;
	gtk_widget_set_visible ((GtkWidget*) _tmp18_, g_strcmp0 (_tmp19_, "migrate") == 0);
	_tmp20_ = visible_child;
	if (g_strcmp0 (_tmp20_, "groups") == 0) {
		AdwViewStack* _tmp21_;
		AdwViewStack* _tmp22_;
		AdwViewStack* _tmp23_;
		GtkSelectionModel* _tmp24_;
		GtkSelectionModel* _tmp25_;
		GtkActionBar* _tmp26_;
		AdwViewStack* _tmp27_;
		GtkSelectionModel* _tmp28_;
		GtkSelectionModel* _tmp29_;
		_tmp21_ = self->priv->_center_stack;
		adw_view_stack_set_visible_child_name (_tmp21_, "groups");
		_tmp22_ = self->priv->_center_stack;
		_tmp23_ = self->priv->_groups_stack;
		_tmp24_ = adw_view_stack_get_pages (_tmp23_);
		_tmp25_ = _tmp24_;
		gtk_widget_set_visible ((GtkWidget*) _tmp22_, g_list_model_get_n_items ((GListModel*) _tmp25_) > ((guint) 1));
		_g_object_unref0 (_tmp25_);
		_tmp26_ = self->priv->_action_bar;
		_tmp27_ = self->priv->_groups_stack;
		_tmp28_ = adw_view_stack_get_pages (_tmp27_);
		_tmp29_ = _tmp28_;
		gtk_widget_set_visible ((GtkWidget*) _tmp26_, g_list_model_get_n_items ((GListModel*) _tmp29_) > ((guint) 1));
		_g_object_unref0 (_tmp29_);
	} else {
		const gchar* _tmp30_;
		_tmp30_ = visible_child;
		if (g_strcmp0 (_tmp30_, "migrate") == 0) {
			AdwViewStack* _tmp31_;
			GtkActionBar* _tmp32_;
			_tmp31_ = self->priv->_center_stack;
			gtk_widget_set_visible ((GtkWidget*) _tmp31_, FALSE);
			_tmp32_ = self->priv->_action_bar;
			gtk_widget_set_visible ((GtkWidget*) _tmp32_, FALSE);
		} else {
			AdwViewStack* _tmp33_;
			GtkActionBar* _tmp34_;
			_tmp33_ = self->priv->_center_stack;
			gtk_widget_set_visible ((GtkWidget*) _tmp33_, FALSE);
			_tmp34_ = self->priv->_action_bar;
			gtk_widget_set_visible ((GtkWidget*) _tmp34_, FALSE);
		}
	}
	_tmp35_ = proton_plus_widgets_tools_box_get_header_presentation (self);
	_tmp36_ = _tmp35_;
	g_signal_emit (self, proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_HEADER_PRESENTATION_CHANGED_SIGNAL], 0, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = visible_child;
	if (g_strcmp0 (_tmp37_, "groups") == 0) {
		proton_plus_widgets_tools_box_update_root_heading (self);
	}
	_g_free0 (visible_child);
}

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

static void
__lambda98_ (ProtonPlusWidgetsToolsBox* self,
             AdwNavigationPage* page)
{
	const gchar* _tmp0_;
	g_return_if_fail (page != NULL);
	_tmp0_ = adw_navigation_page_get_tag (page);
	if (g_strcmp0 (_tmp0_, "migrate") == 0) {
		proton_plus_widgets_tools_box_refresh_group_boxes (self);
		proton_plus_widgets_tools_box_restore_current_release_focus (self);
		_g_object_unref0 (self->priv->current_job);
		self->priv->current_job = NULL;
	}
}

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

static void
__lambda100_ (ProtonPlusWidgetsToolsBox* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp1_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	_tmp1_ = self->priv->expanded_group;
	if (_tmp1_ != NULL) {
		AdwViewStack* _tmp2_;
		GtkWidget* _tmp3_;
		ProtonPlusWidgetsToolsGroupBox* _tmp4_;
		_tmp2_ = self->priv->_groups_stack;
		_tmp3_ = adw_view_stack_get_visible_child (_tmp2_);
		_tmp4_ = self->priv->expanded_group;
		_tmp0_ = _tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		proton_plus_widgets_tools_box_collapse_current_expansion (self, FALSE);
	}
	_tmp5_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strcmp0 (_tmp6_, "groups") == 0;
	_g_free0 (_tmp6_);
	if (_tmp7_) {
		proton_plus_widgets_tools_box_update_root_heading (self);
	}
}

static void
___lambda100__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda100_ ((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;
	Block17Data* _data17_;
	AdwViewStack* _tmp0_ = NULL;
	AdwViewStack* _tmp1_;
	GtkBox* _tmp2_ = NULL;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	AdwViewStack* _tmp5_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp6_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp7_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp8_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp9_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp10_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp12_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp13_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp14_;
	GtkBox* _tmp15_;
	AdwNavigationPage* _tmp16_;
	AdwNavigationPage* _tmp17_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp18_;
	AdwNavigationPage* _tmp19_;
	AdwNavigationPage* _tmp20_;
	AdwNavigationView* _tmp21_ = NULL;
	AdwNavigationView* _tmp22_;
	AdwNavigationView* _tmp23_;
	AdwNavigationPage* _tmp24_;
	AdwNavigationView* _tmp25_;
	AdwNavigationPage* _tmp26_;
	AdwViewStack* _tmp27_;
	AdwViewStack* _tmp28_;
	AdwViewSwitcher* _tmp29_ = NULL;
	AdwViewSwitcher* _tmp30_;
	GtkButton* _tmp31_ = NULL;
	GtkButton* _tmp32_;
	GtkButton* _tmp33_;
	GtkButton* _tmp34_;
	GtkButton* _tmp35_;
	gchar* _tmp36_;
	GtkSearchEntry* _tmp37_ = NULL;
	GtkSearchEntry* _tmp38_;
	GtkSearchEntry* _tmp39_;
	GtkSearchEntry* _tmp40_;
	GtkBox* search_popover_box = NULL;
	GtkBox* _tmp41_ = NULL;
	GtkBox* _tmp42_;
	GtkSearchEntry* _tmp43_;
	GtkPopover* _tmp44_;
	GtkPopover* _tmp45_;
	GtkBox* _tmp46_;
	GtkSearchEntry* _tmp47_;
	gchar* _tmp48_;
	GtkPopover* _tmp49_;
	GtkPopover* _tmp50_;
	GtkMenuButton* _tmp51_ = NULL;
	GtkMenuButton* _tmp52_;
	GtkMenuButton* _tmp53_;
	GtkMenuButton* _tmp54_;
	GtkPopover* _tmp55_;
	GtkMenuButton* _tmp56_;
	GtkSearchEntry* _tmp57_;
	gchar* _tmp58_;
	GtkMenuButton* _tmp59_ = NULL;
	GtkMenuButton* _tmp60_;
	GtkMenuButton* _tmp61_;
	GtkMenuButton* _tmp62_;
	GtkCheckButton* _tmp63_;
	GtkCheckButton* _tmp64_;
	GtkCheckButton* _tmp65_;
	GtkCheckButton* _tmp66_;
	GtkCheckButton* _tmp67_;
	GtkCheckButton* _tmp68_;
	GtkCheckButton* _tmp69_;
	GtkCheckButton* _tmp70_;
	GtkCheckButton* _tmp71_;
	GtkCheckButton* _tmp72_;
	GtkCheckButton* _tmp73_;
	GtkCheckButton* _tmp74_;
	ProtonPlusWidgetsControllerChoiceBox* filter_box = NULL;
	ProtonPlusWidgetsControllerChoiceBox* _tmp75_ = NULL;
	ProtonPlusWidgetsControllerChoiceBox* _tmp76_;
	GtkCheckButton* _tmp77_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp78_;
	GtkCheckButton* _tmp79_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp80_;
	GtkCheckButton* _tmp81_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp82_;
	GtkCheckButton* _tmp83_;
	GtkPopover* _tmp84_;
	GtkPopover* _tmp85_;
	ProtonPlusWidgetsControllerChoiceBox* _tmp86_;
	GtkMenuButton* _tmp87_;
	GtkPopover* _tmp88_;
	GtkPopover* _tmp89_;
	GtkMenuButton* _tmp90_;
	GtkCheckButton* _tmp91_;
	GtkCheckButton* _tmp92_;
	GtkCheckButton* _tmp93_;
	GtkCheckButton* _tmp94_;
	GtkCheckButton* _tmp95_;
	AdwViewStack* _tmp96_;
	AdwViewStack* _tmp97_;
	AdwViewStack* _tmp98_;
	AdwViewSwitcher* _tmp99_;
	GtkBox* center_box = NULL;
	GtkBox* _tmp100_ = NULL;
	GtkBox* _tmp101_;
	AdwViewStack* _tmp102_;
	AdwWindowTitle* migrate_title = NULL;
	AdwWindowTitle* _tmp103_;
	AdwWindowTitle* _tmp104_;
	ProtonPlusWidgetsHeaderPresentation* _tmp105_;
	ProtonPlusWidgetsHeaderPresentation* _tmp106_;
	ProtonPlusWidgetsHeaderPresentation* _tmp107_;
	gulong _tmp108_;
	ProtonPlusWidgetsHeaderPresentation* _tmp109_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp110_;
	GtkMenuButton* _tmp111_;
	GtkMenuButton* _tmp112_;
	ProtonPlusWidgetsHeaderPresentation* _tmp113_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp114_;
	GtkButton* _tmp115_;
	GtkButton* _tmp116_;
	GtkActionBar* _tmp117_;
	GtkActionBar* _tmp118_;
	GtkActionBar* _tmp119_;
	GtkBox* _tmp120_;
	AdwNavigationView* _tmp121_;
	AdwNavigationView* _tmp122_;
	AdwNavigationView* _tmp123_;
	AdwViewStack* _tmp124_;
	AdwNavigationView* _tmp125_;
	GtkActionBar* _tmp126_;
	GSettings* _tmp127_;
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	self = (ProtonPlusWidgetsToolsBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 0, NULL);
	_data17_->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_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp2_, TRUE);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_tools_box_set_root_page_box (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->_root_page_box;
	_tmp5_ = self->priv->_groups_stack;
	gtk_box_append (_tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = proton_plus_widgets_tools_releases_box_new ();
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	proton_plus_widgets_tools_box_set_releases_box (self, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = self->priv->_releases_box;
	g_signal_connect_object (_tmp8_, "changelog-requested", (GCallback) ___lambda75__proton_plus_widgets_tools_releases_box_changelog_requested, self, 0);
	_tmp9_ = self->priv->_releases_box;
	g_signal_connect_object (_tmp9_, "games-requested", (GCallback) ___lambda83__proton_plus_widgets_tools_releases_box_games_requested, self, 0);
	_tmp10_ = self->priv->_releases_box;
	g_signal_connect_object (_tmp10_, "clear-search-requested", (GCallback) ___lambda87__proton_plus_widgets_tools_releases_box_clear_search_requested, self, 0);
	_tmp11_ = self->priv->_releases_box;
	g_signal_connect_object (_tmp11_, "reset-filter-requested", (GCallback) ___lambda88__proton_plus_widgets_tools_releases_box_reset_filter_requested, self, 0);
	_tmp12_ = proton_plus_widgets_tools_migrate_box_new ();
	g_object_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	proton_plus_widgets_tools_box_set_migrate_box (self, _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->priv->_migrate_box;
	g_signal_connect_object (_tmp14_, "finished", (GCallback) ___lambda89__proton_plus_widgets_tools_migrate_box_finished, self, 0);
	_tmp15_ = self->priv->_root_page_box;
	_tmp16_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp15_, _ ("Tools"), "groups");
	g_object_ref_sink (_tmp16_);
	_tmp17_ = _tmp16_;
	proton_plus_widgets_tools_box_set_groups_page (self, _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = self->priv->_migrate_box;
	_tmp19_ = adw_navigation_page_new_with_tag ((GtkWidget*) _tmp18_, _ ("Migrate"), "migrate");
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	proton_plus_widgets_tools_box_set_migrate_page (self, _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = (AdwNavigationView*) adw_navigation_view_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp21_, TRUE);
	g_object_ref_sink (_tmp21_);
	_tmp22_ = _tmp21_;
	proton_plus_widgets_tools_box_set_navigation_view (self, _tmp22_);
	_g_object_unref0 (_tmp22_);
	_tmp23_ = self->priv->_navigation_view;
	_tmp24_ = self->priv->_groups_page;
	adw_navigation_view_add (_tmp23_, _tmp24_);
	_tmp25_ = self->priv->_navigation_view;
	_tmp26_ = self->priv->_migrate_page;
	adw_navigation_view_add (_tmp25_, _tmp26_);
	_tmp27_ = self->priv->_groups_stack;
	_tmp28_ = _g_object_ref0 (_tmp27_);
	_tmp29_ = (AdwViewSwitcher*) adw_view_switcher_new ();
	adw_view_switcher_set_stack (_tmp29_, _tmp28_);
	_g_object_unref0 (_tmp28_);
	adw_view_switcher_set_policy (_tmp29_, ADW_VIEW_SWITCHER_POLICY_WIDE);
	g_object_ref_sink (_tmp29_);
	_tmp30_ = _tmp29_;
	proton_plus_widgets_tools_box_set_switcher (self, _tmp30_);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = (GtkButton*) gtk_button_new_from_icon_name ("update-check-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp31_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp31_);
	_tmp32_ = _tmp31_;
	proton_plus_widgets_tools_box_set_refresh_button (self, _tmp32_);
	_g_object_unref0 (_tmp32_);
	_tmp33_ = self->priv->_refresh_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp33_, _ ("Check for updates"));
	_tmp34_ = self->priv->_refresh_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp34_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Check for updates"), -1, -1);
	_tmp35_ = self->priv->_refresh_button;
	g_signal_connect_object (_tmp35_, "clicked", (GCallback) _proton_plus_widgets_tools_box_on_refresh_clicked_gtk_button_clicked, self, 0);
	_tmp36_ = g_strdup (_ ("Search"));
	_tmp37_ = (GtkSearchEntry*) gtk_search_entry_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp37_, GTK_ALIGN_CENTER);
	g_object_set (_tmp37_, "placeholder-text", _tmp36_, NULL);
	_g_free0 (_tmp36_);
	g_object_set ((GtkWidget*) _tmp37_, "width-request", 280, NULL);
	g_object_ref_sink (_tmp37_);
	_tmp38_ = _tmp37_;
	proton_plus_widgets_tools_box_set_search_entry (self, _tmp38_);
	_g_object_unref0 (_tmp38_);
	_tmp39_ = self->priv->_search_entry;
	proton_plus_utils_text_input_metadata_policy_apply ((GtkWidget*) _tmp39_, PROTON_PLUS_UTILS_TEXT_INPUT_FIELD_KIND_SEARCH);
	_tmp40_ = self->priv->_search_entry;
	g_signal_connect_object (_tmp40_, "search-changed", (GCallback) ___lambda90__gtk_search_entry_search_changed, self, 0);
	_tmp41_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp41_, 12);
	g_object_ref_sink (_tmp41_);
	search_popover_box = _tmp41_;
	_tmp42_ = search_popover_box;
	_tmp43_ = self->priv->_search_entry;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp44_);
	_data17_->search_popover = _tmp44_;
	_tmp45_ = _data17_->search_popover;
	_tmp46_ = search_popover_box;
	gtk_popover_set_child (_tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = self->priv->_search_entry;
	g_signal_connect_data (_tmp47_, "stop-search", (GCallback) ___lambda91__gtk_search_entry_stop_search, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp48_ = g_strdup ("edit-find-symbolic");
	_tmp49_ = _data17_->search_popover;
	_tmp50_ = _g_object_ref0 (_tmp49_);
	_tmp51_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp51_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp51_, _tmp48_);
	_g_free0 (_tmp48_);
	gtk_menu_button_set_popover (_tmp51_, _tmp50_);
	_g_object_unref0 (_tmp50_);
	g_object_ref_sink (_tmp51_);
	_tmp52_ = _tmp51_;
	proton_plus_widgets_tools_box_set_search_button (self, _tmp52_);
	_g_object_unref0 (_tmp52_);
	_tmp53_ = self->priv->_search_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp53_, _ ("Search"));
	_tmp54_ = self->priv->_search_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp54_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Search"), -1, -1);
	_tmp55_ = _data17_->search_popover;
	_tmp56_ = self->priv->_search_button;
	_tmp57_ = self->priv->_search_entry;
	proton_plus_widgets_window_register_popover_for_controller (_tmp55_, (GtkWidget*) _tmp56_, (GtkWidget*) _tmp57_);
	_tmp58_ = g_strdup ("filter-2-symbolic");
	_tmp59_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp59_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_icon_name (_tmp59_, _tmp58_);
	_g_free0 (_tmp58_);
	g_object_ref_sink (_tmp59_);
	_tmp60_ = _tmp59_;
	proton_plus_widgets_tools_box_set_filter_button (self, _tmp60_);
	_g_object_unref0 (_tmp60_);
	_tmp61_ = self->priv->_filter_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp61_, _ ("Filter"));
	_tmp62_ = self->priv->_filter_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp62_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Filter"), -1, -1);
	_tmp63_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("All"));
	g_object_ref_sink (_tmp63_);
	_tmp64_ = _tmp63_;
	proton_plus_widgets_tools_box_set_all_filter_button (self, _tmp64_);
	_g_object_unref0 (_tmp64_);
	_tmp65_ = self->priv->_all_filter_button;
	gtk_check_button_set_active (_tmp65_, TRUE);
	_tmp66_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Installed"));
	g_object_ref_sink (_tmp66_);
	_data17_->installed_filter_button = _tmp66_;
	_tmp67_ = _data17_->installed_filter_button;
	_tmp68_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp67_, _tmp68_);
	_tmp69_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Used"));
	g_object_ref_sink (_tmp69_);
	_data17_->used_filter_button = _tmp69_;
	_tmp70_ = _data17_->used_filter_button;
	_tmp71_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp70_, _tmp71_);
	_tmp72_ = (GtkCheckButton*) gtk_check_button_new_with_label (_ ("Unused"));
	g_object_ref_sink (_tmp72_);
	_data17_->unused_filter_button = _tmp72_;
	_tmp73_ = _data17_->unused_filter_button;
	_tmp74_ = self->priv->_all_filter_button;
	gtk_check_button_set_group (_tmp73_, _tmp74_);
	_tmp75_ = proton_plus_widgets_controller_choice_box_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp75_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp75_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp75_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp75_, 12);
	g_object_ref_sink (_tmp75_);
	filter_box = _tmp75_;
	_tmp76_ = filter_box;
	_tmp77_ = self->priv->_all_filter_button;
	gtk_box_append ((GtkBox*) _tmp76_, (GtkWidget*) _tmp77_);
	_tmp78_ = filter_box;
	_tmp79_ = _data17_->installed_filter_button;
	gtk_box_append ((GtkBox*) _tmp78_, (GtkWidget*) _tmp79_);
	_tmp80_ = filter_box;
	_tmp81_ = _data17_->used_filter_button;
	gtk_box_append ((GtkBox*) _tmp80_, (GtkWidget*) _tmp81_);
	_tmp82_ = filter_box;
	_tmp83_ = _data17_->unused_filter_button;
	gtk_box_append ((GtkBox*) _tmp82_, (GtkWidget*) _tmp83_);
	_tmp84_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp84_);
	_data17_->filter_popover = _tmp84_;
	_tmp85_ = _data17_->filter_popover;
	_tmp86_ = filter_box;
	gtk_popover_set_child (_tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = self->priv->_filter_button;
	_tmp88_ = _data17_->filter_popover;
	gtk_menu_button_set_popover (_tmp87_, _tmp88_);
	_tmp89_ = _data17_->filter_popover;
	_tmp90_ = self->priv->_filter_button;
	_tmp91_ = self->priv->_all_filter_button;
	proton_plus_widgets_window_register_popover_for_controller (_tmp89_, (GtkWidget*) _tmp90_, (GtkWidget*) _tmp91_);
	_tmp92_ = self->priv->_all_filter_button;
	g_signal_connect_data (_tmp92_, "toggled", (GCallback) ___lambda92__gtk_check_button_toggled, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp93_ = _data17_->installed_filter_button;
	g_signal_connect_data (_tmp93_, "toggled", (GCallback) ___lambda93__gtk_check_button_toggled, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp94_ = _data17_->used_filter_button;
	g_signal_connect_data (_tmp94_, "toggled", (GCallback) ___lambda94__gtk_check_button_toggled, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp95_ = _data17_->unused_filter_button;
	g_signal_connect_data (_tmp95_, "toggled", (GCallback) ___lambda95__gtk_check_button_toggled, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp96_ = (AdwViewStack*) adw_view_stack_new ();
	g_object_ref_sink (_tmp96_);
	_tmp97_ = _tmp96_;
	proton_plus_widgets_tools_box_set_center_stack (self, _tmp97_);
	_g_object_unref0 (_tmp97_);
	_tmp98_ = self->priv->_center_stack;
	_tmp99_ = self->priv->_switcher;
	adw_view_stack_add_named (_tmp98_, (GtkWidget*) _tmp99_, "groups");
	_tmp100_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_halign ((GtkWidget*) _tmp100_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp100_);
	center_box = _tmp100_;
	_tmp101_ = center_box;
	_tmp102_ = self->priv->_center_stack;
	gtk_box_append (_tmp101_, (GtkWidget*) _tmp102_);
	_tmp103_ = (AdwWindowTitle*) adw_window_title_new (_ ("Migrate"), "");
	g_object_ref_sink (_tmp103_);
	migrate_title = _tmp103_;
	_tmp104_ = migrate_title;
	_tmp105_ = proton_plus_widgets_header_presentation_new ((GtkWidget*) _tmp104_, TRUE);
	_tmp106_ = _tmp105_;
	proton_plus_widgets_tools_box_set_migrate_presentation (self, _tmp106_);
	_g_object_unref0 (_tmp106_);
	_tmp107_ = self->priv->_migrate_presentation;
	_tmp108_ = g_signal_connect_object (_tmp107_, "back-requested", (GCallback) ___lambda96__proton_plus_widgets_header_presentation_back_requested, self, 0);
	self->priv->migrate_back_handler = _tmp108_;
	_tmp109_ = self->priv->_migrate_presentation;
	_tmp110_ = self->priv->_migrate_box;
	_tmp111_ = proton_plus_widgets_tools_migrate_box_get_games_button (_tmp110_);
	_tmp112_ = _tmp111_;
	proton_plus_widgets_header_presentation_add_end_action (_tmp109_, (GtkWidget*) _tmp112_);
	_tmp113_ = self->priv->_migrate_presentation;
	_tmp114_ = self->priv->_migrate_box;
	_tmp115_ = proton_plus_widgets_tools_migrate_box_get_migrate_button (_tmp114_);
	_tmp116_ = _tmp115_;
	proton_plus_widgets_header_presentation_add_end_action (_tmp113_, (GtkWidget*) _tmp116_);
	_tmp117_ = (GtkActionBar*) gtk_action_bar_new ();
	g_object_ref_sink (_tmp117_);
	_tmp118_ = _tmp117_;
	proton_plus_widgets_tools_box_set_action_bar (self, _tmp118_);
	_g_object_unref0 (_tmp118_);
	_tmp119_ = self->priv->_action_bar;
	_tmp120_ = center_box;
	gtk_action_bar_set_center_widget (_tmp119_, (GtkWidget*) _tmp120_);
	_tmp121_ = self->priv->_navigation_view;
	g_signal_connect_object ((GObject*) _tmp121_, "notify::visible-page", (GCallback) ___lambda97__g_object_notify, self, 0);
	_tmp122_ = self->priv->_navigation_view;
	g_signal_connect_object (_tmp122_, "popped", (GCallback) ___lambda98__adw_navigation_view_popped, self, 0);
	_tmp123_ = self->priv->_navigation_view;
	g_object_notify ((GObject*) _tmp123_, "visible-page");
	_tmp124_ = self->priv->_groups_stack;
	g_signal_connect_object ((GObject*) _tmp124_, "notify::visible-child", (GCallback) ___lambda100__g_object_notify, self, 0);
	_tmp125_ = self->priv->_navigation_view;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp125_);
	_tmp126_ = self->priv->_action_bar;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp126_);
	_tmp127_ = proton_plus_globals_SETTINGS;
	if (_tmp127_ != NULL) {
		GSettings* _tmp128_;
		gulong _tmp129_;
		GSettings* _tmp130_;
		gulong _tmp131_;
		_tmp128_ = proton_plus_globals_SETTINGS;
		_tmp129_ = g_signal_connect_object (_tmp128_, "changed::background-updates", (GCallback) _proton_plus_widgets_tools_box_update_refresh_button_visibility_g_settings_changed, self, 0);
		self->priv->background_updates_changed_handler = _tmp129_;
		_tmp130_ = proton_plus_globals_SETTINGS;
		_tmp131_ = g_signal_connect_object (_tmp130_, "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 = _tmp131_;
	}
	_g_object_unref0 (migrate_title);
	_g_object_unref0 (center_box);
	_g_object_unref0 (filter_box);
	_g_object_unref0 (search_popover_box);
	block17_data_unref (_data17_);
	_data17_ = 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* _tmp1_;
	self = (ProtonPlusWidgetsToolsBox*) base;
	proton_plus_widgets_tools_box_collapse_current_expansion (self, FALSE);
	proton_plus_widgets_tools_box_clear_root_heading (self);
	_g_object_unref0 (self->priv->pending_download_job);
	self->priv->pending_download_job = NULL;
	_g_object_unref0 (self->priv->current_job);
	self->priv->current_job = NULL;
	if (self->priv->migrate_back_handler != ((gulong) 0)) {
		ProtonPlusWidgetsHeaderPresentation* _tmp0_;
		_tmp0_ = self->priv->_migrate_presentation;
		g_signal_handler_disconnect ((GObject*) _tmp0_, self->priv->migrate_back_handler);
		self->priv->migrate_back_handler = (gulong) 0;
	}
	_tmp1_ = proton_plus_globals_SETTINGS;
	if (_tmp1_ != NULL) {
		if (self->priv->background_updates_changed_handler != ((gulong) 0)) {
			GSettings* _tmp2_;
			_tmp2_ = proton_plus_globals_SETTINGS;
			g_signal_handler_disconnect ((GObject*) _tmp2_, 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* _tmp3_;
			_tmp3_ = proton_plus_globals_SETTINGS;
			g_signal_handler_disconnect ((GObject*) _tmp3_, 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_clear_root_heading (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsGroupBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->heading_group;
	if (_tmp0_ != NULL) {
		ProtonPlusWidgetsToolsGroupBox* _tmp1_;
		_tmp1_ = self->priv->heading_group;
		proton_plus_widgets_tools_group_box_clear_header_actions (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
	}
	_g_object_unref0 (self->priv->heading_group);
	self->priv->heading_group = NULL;
}

static void
proton_plus_widgets_tools_box_update_root_heading (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	ProtonPlusWidgetsToolsGroupBox* _tmp2_;
	ProtonPlusWidgetsToolsGroupBox* _tmp3_;
	ProtonPlusWidgetsToolsGroupBox* _tmp4_;
	ProtonPlusWidgetsToolsGroupBox* _tmp5_;
	ProtonPlusWidgetsToolsGroupBox* _tmp6_;
	GtkButton* _tmp7_;
	GtkMenuButton* _tmp8_;
	GtkMenuButton* _tmp9_;
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_box_clear_root_heading (self);
	_tmp0_ = self->priv->_groups_stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp1_) ? ((ProtonPlusWidgetsToolsGroupBox*) _tmp1_) : NULL);
	group_box = _tmp2_;
	_tmp3_ = group_box;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (group_box);
		return;
	}
	_tmp4_ = group_box;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->heading_group);
	self->priv->heading_group = _tmp5_;
	_tmp6_ = group_box;
	_tmp7_ = self->priv->_refresh_button;
	_tmp8_ = self->priv->_filter_button;
	_tmp9_ = self->priv->_search_button;
	proton_plus_widgets_tools_group_box_populate_header_actions (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), (GtkWidget*) _tmp7_, (GtkWidget*) _tmp8_, (GtkWidget*) _tmp9_);
	_g_object_unref0 (group_box);
}

ProtonPlusWidgetsHeaderPresentation*
proton_plus_widgets_tools_box_get_header_presentation (ProtonPlusWidgetsToolsBox* self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	ProtonPlusWidgetsHeaderPresentation* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	g_free (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("migrate")))) {
		switch (0) {
			default:
			{
				ProtonPlusWidgetsHeaderPresentation* _tmp4_;
				ProtonPlusWidgetsHeaderPresentation* _tmp5_;
				_tmp4_ = self->priv->_migrate_presentation;
				_tmp5_ = _g_object_ref0 (_tmp4_);
				result = _tmp5_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = NULL;
				return result;
			}
		}
	}
}

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_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 ProtonPlusWidgetsToolsGroupBox*
proton_plus_widgets_tools_box_find_group_for_tool (ProtonPlusWidgetsToolsBox* self,
                                                   ProtonPlusModelsTool* tool)
{
	GtkWidget* child = NULL;
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	ProtonPlusWidgetsToolsGroupBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (tool != NULL, 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_;
		ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
		GtkWidget* _tmp4_;
		ProtonPlusWidgetsToolsGroupBox* _tmp5_;
		gboolean _tmp6_ = FALSE;
		ProtonPlusWidgetsToolsGroupBox* _tmp7_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp4_) ? ((ProtonPlusWidgetsToolsGroupBox*) _tmp4_) : NULL);
		group_box = _tmp5_;
		_tmp7_ = group_box;
		if (_tmp7_ != NULL) {
			ProtonPlusWidgetsToolsGroupBox* _tmp8_;
			_tmp8_ = group_box;
			_tmp6_ = proton_plus_widgets_tools_group_box_contains_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), tool);
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			result = group_box;
			_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 (group_box);
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static void
proton_plus_widgets_tools_box_collapse_current_expansion (ProtonPlusWidgetsToolsBox* self,
                                                          gboolean restore_focus)
{
	ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
	ProtonPlusWidgetsToolsGroupBox* _tmp0_;
	ProtonPlusWidgetsToolsGroupBox* _tmp1_;
	ProtonPlusWidgetsToolsGroupBox* _tmp2_;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp3_;
	ProtonPlusWidgetsToolsGroupBox* _tmp4_;
	ProtonPlusWidgetsToolsGroupBox* _tmp5_;
	ProtonPlusWidgetsToolsGroupBox* _tmp6_;
	ProtonPlusWidgetsToolsGroupBox* _tmp7_;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp8_;
	ProtonPlusWidgetsToolsGroupBox* _tmp9_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->expanded_group;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	group_box = _tmp1_;
	_tmp2_ = group_box;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (group_box);
		return;
	}
	_tmp3_ = self->priv->interaction_state;
	_tmp4_ = group_box;
	proton_plus_widgets_tools_inline_release_interaction_state_clear_navigation (_tmp3_, (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
	_tmp5_ = group_box;
	proton_plus_widgets_tools_group_box_collapse_expanded_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), restore_focus);
	_tmp6_ = self->priv->expanded_group;
	_tmp7_ = group_box;
	if (_tmp6_ == _tmp7_) {
		_g_object_unref0 (self->priv->expanded_group);
		self->priv->expanded_group = NULL;
	}
	_tmp8_ = self->priv->interaction_state;
	_tmp9_ = group_box;
	proton_plus_widgets_tools_inline_release_interaction_state_collapse (_tmp8_, (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
	_tmp10_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_clear_selected_tool (_tmp10_);
	_g_object_unref0 (group_box);
}

static void
proton_plus_widgets_tools_box_focus_download_job (ProtonPlusWidgetsToolsBox* self,
                                                  ProtonPlusServicesInstallJob* job,
                                                  ProtonPlusWidgetsToolsGroupBox* group_box)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp2_;
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	ProtonPlusWidgetsToolsReleasesBox* _tmp8_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp9_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	g_return_if_fail (group_box != NULL);
	_tmp2_ = self->priv->expanded_group;
	if (_tmp2_ != group_box) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusModelsTool* _tmp3_;
		ProtonPlusModelsTool* _tmp4_;
		_tmp3_ = proton_plus_services_install_job_get_tool (job);
		_tmp4_ = _tmp3_;
		_tmp1_ = !proton_plus_widgets_tools_group_box_is_expanded_tool (group_box, _tmp4_);
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleasesBox* _tmp5_;
		ProtonPlusModelsTool* _tmp6_;
		ProtonPlusModelsTool* _tmp7_;
		_tmp5_ = self->priv->_releases_box;
		_tmp6_ = proton_plus_services_install_job_get_tool (job);
		_tmp7_ = _tmp6_;
		_tmp0_ = !proton_plus_widgets_tools_releases_box_is_showing_tool (_tmp5_, _tmp7_);
	}
	if (_tmp0_) {
		return;
	}
	_tmp8_ = self->priv->_releases_box;
	_tmp9_ = proton_plus_widgets_tools_releases_box_focus_job_row (_tmp8_, job, TRUE);
	row = _tmp9_;
	_tmp10_ = row;
	if (_tmp10_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp11_;
		_tmp11_ = row;
		proton_plus_widgets_tools_group_box_focus_release_widget (group_box, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), TRUE);
	} else {
		GtkWidget* fallback = NULL;
		GtkWidget* _tmp12_;
		GtkWidget* _tmp13_;
		_tmp12_ = proton_plus_widgets_tools_group_box_get_expanded_row (group_box);
		fallback = _tmp12_;
		_tmp13_ = fallback;
		if (_tmp13_ != NULL) {
			GtkWidget* _tmp14_;
			_tmp14_ = fallback;
			gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
		}
		_g_object_unref0 (fallback);
	}
	_g_object_unref0 (row);
}

static Block18Data*
block18_data_ref (Block18Data* _data18_)
{
	g_atomic_int_inc (&_data18_->_ref_count_);
	return _data18_;
}

static void
block18_data_unref (void * _userdata_)
{
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data18_->self;
		_g_object_unref0 (_data18_->group_box);
		_g_object_unref0 (_data18_->job);
		_g_object_unref0 (self);
		g_slice_free (Block18Data, _data18_);
	}
}

static gboolean
__lambda99_ (Block18Data* _data18_)
{
	ProtonPlusWidgetsToolsBox* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
	ProtonPlusServicesInstallJob* _tmp12_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp13_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp14_;
	ProtonPlusWidgetsToolsGroupBox* _tmp21_;
	gboolean result;
	self = _data18_->self;
	_tmp2_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "groups") != 0;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsGroupBox* _tmp5_;
		ProtonPlusWidgetsToolsGroupBox* _tmp6_;
		_tmp5_ = self->priv->expanded_group;
		_tmp6_ = _data18_->group_box;
		_tmp1_ = _tmp5_ != _tmp6_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsGroupBox* _tmp7_;
		ProtonPlusServicesInstallJob* _tmp8_;
		ProtonPlusModelsTool* _tmp9_;
		ProtonPlusModelsTool* _tmp10_;
		_tmp7_ = _data18_->group_box;
		_tmp8_ = _data18_->job;
		_tmp9_ = proton_plus_services_install_job_get_tool (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp0_ = !proton_plus_widgets_tools_group_box_is_expanded_tool (_tmp7_, _tmp10_);
	}
	if (_tmp0_) {
		result = G_SOURCE_REMOVE;
		return result;
	}
	_tmp11_ = self->priv->_releases_box;
	_tmp12_ = _data18_->job;
	_tmp13_ = proton_plus_widgets_tools_releases_box_focus_job_row (_tmp11_, _tmp12_, FALSE);
	row = _tmp13_;
	_tmp14_ = row;
	if (_tmp14_ != NULL) {
		ProtonPlusWidgetsToolsGroupBox* _tmp15_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp16_;
		_tmp15_ = _data18_->group_box;
		_tmp16_ = row;
		proton_plus_widgets_tools_group_box_focus_release_widget (_tmp15_, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), FALSE);
	} else {
		GtkWidget* fallback = NULL;
		ProtonPlusWidgetsToolsGroupBox* _tmp17_;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		_tmp17_ = _data18_->group_box;
		_tmp18_ = proton_plus_widgets_tools_group_box_get_expanded_row (_tmp17_);
		fallback = _tmp18_;
		_tmp19_ = fallback;
		if (_tmp19_ != NULL) {
			GtkWidget* _tmp20_;
			_tmp20_ = fallback;
			gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget));
		}
		_g_object_unref0 (fallback);
	}
	_tmp21_ = _data18_->group_box;
	proton_plus_widgets_tools_group_box_restore_scroll_position (_tmp21_, _data18_->scroll_position);
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (row);
	return result;
}

static gboolean
___lambda99__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda99_ (self);
	return result;
}

static void
proton_plus_widgets_tools_box_restore_current_release_focus (ProtonPlusWidgetsToolsBox* self)
{
	Block18Data* _data18_;
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusServicesInstallJob* _tmp4_;
	ProtonPlusWidgetsToolsGroupBox* _tmp5_;
	ProtonPlusWidgetsToolsGroupBox* _tmp6_;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp7_;
	ProtonPlusWidgetsToolsGroupBox* _tmp8_;
	ProtonPlusServicesInstallJob* _tmp9_;
	gdouble _tmp10_ = 0.0;
	gboolean _tmp11_;
	g_return_if_fail (self != NULL);
	_data18_ = g_slice_new0 (Block18Data);
	_data18_->_ref_count_ = 1;
	_data18_->self = g_object_ref (self);
	_tmp1_ = self->priv->current_job;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsGroupBox* _tmp2_;
		_tmp2_ = self->priv->expanded_group;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		block18_data_unref (_data18_);
		_data18_ = NULL;
		return;
	}
	_tmp3_ = self->priv->current_job;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
	_data18_->job = _tmp4_;
	_tmp5_ = self->priv->expanded_group;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
	_data18_->group_box = _tmp6_;
	_tmp7_ = self->priv->interaction_state;
	_tmp8_ = _data18_->group_box;
	_tmp9_ = _data18_->job;
	_tmp11_ = proton_plus_widgets_tools_inline_release_interaction_state_restore_navigation (_tmp7_, (GObject*) _tmp8_, (GObject*) _tmp9_, &_tmp10_);
	_data18_->scroll_position = _tmp10_;
	if (!_tmp11_) {
		block18_data_unref (_data18_);
		_data18_ = NULL;
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda99__gsource_func, block18_data_ref (_data18_), block18_data_unref);
	block18_data_unref (_data18_);
	_data18_ = NULL;
}

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;
	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 ("migrate")))) {
		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->_migrate_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 {
		switch (0) {
			default:
			{
				g_warning ("tools-box.vala:515: 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);
	proton_plus_widgets_tools_box_collapse_current_expansion (self, TRUE);
	_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 _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp1_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strcmp0 (_tmp2_, "groups") == 0;
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		ProtonPlusWidgetsToolsGroupBox* _tmp4_;
		_tmp4_ = self->priv->expanded_group;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		proton_plus_widgets_tools_box_collapse_current_expansion (self, TRUE);
		result = TRUE;
		return result;
	}
	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;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsBox*) base;
	_tmp1_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strcmp0 (_tmp2_, "groups") != 0;
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsGroupBox* _tmp4_;
		_tmp4_ = self->priv->expanded_group;
		_tmp0_ = _tmp4_ != NULL;
	}
	result = _tmp0_;
	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;
}

gboolean
proton_plus_widgets_tools_box_search_available (ProtonPlusWidgetsToolsBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp2_ = proton_plus_widgets_tools_box_get_visible_page_tag (self);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "groups") == 0;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		GtkMenuButton* _tmp5_;
		_tmp5_ = self->priv->_search_button;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp5_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp6_;
		_tmp6_ = self->priv->_search_button;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp6_);
	} 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
__lambda101_ (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_search_entry;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp0_)) {
		GtkSearchEntry* _tmp1_;
		_tmp1_ = self->priv->_search_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda101__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda101_ ((ProtonPlusWidgetsToolsBox*) self);
	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_);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda101__gsource_func, g_object_ref (self), g_object_unref);
	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)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusWidgetsToolsGroupBox* group_box = NULL;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusWidgetsToolsGroupBox* _tmp3_;
	ProtonPlusWidgetsToolsGroupBox* _tmp4_;
	AdwViewStack* _tmp5_;
	ProtonPlusWidgetsToolsGroupBox* _tmp6_;
	gboolean _tmp7_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp8_;
	ProtonPlusModelsTool* _tmp9_;
	ProtonPlusModelsTool* _tmp10_;
	ProtonPlusWidgetsToolsGroupBox* _tmp18_;
	ProtonPlusModelsTool* _tmp19_;
	ProtonPlusModelsTool* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	proton_plus_widgets_tools_box_navigate_to_canonical_page (self, "groups");
	_tmp0_ = _g_object_ref0 (job);
	_g_object_unref0 (self->priv->pending_download_job);
	self->priv->pending_download_job = _tmp0_;
	_tmp1_ = proton_plus_services_install_job_get_tool (job);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_widgets_tools_box_find_group_for_tool (self, _tmp2_);
	group_box = _tmp3_;
	_tmp4_ = group_box;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (self->priv->pending_download_job);
		self->priv->pending_download_job = NULL;
		_g_object_unref0 (group_box);
		return;
	}
	_tmp5_ = self->priv->_groups_stack;
	_tmp6_ = group_box;
	adw_view_stack_set_visible_child (_tmp5_, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
	_tmp8_ = group_box;
	_tmp9_ = proton_plus_services_install_job_get_tool (job);
	_tmp10_ = _tmp9_;
	if (proton_plus_widgets_tools_group_box_is_expanded_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), _tmp10_)) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
		ProtonPlusModelsTool* _tmp12_;
		ProtonPlusModelsTool* _tmp13_;
		_tmp11_ = self->priv->_releases_box;
		_tmp12_ = proton_plus_services_install_job_get_tool (job);
		_tmp13_ = _tmp12_;
		_tmp7_ = proton_plus_widgets_tools_releases_box_is_showing_tool (_tmp11_, _tmp13_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp14_;
		ProtonPlusModelsTool* _tmp15_;
		ProtonPlusModelsTool* _tmp16_;
		ProtonPlusWidgetsToolsGroupBox* _tmp17_;
		_tmp14_ = self->priv->_releases_box;
		_tmp15_ = proton_plus_services_install_job_get_tool (job);
		_tmp16_ = _tmp15_;
		if (proton_plus_widgets_tools_releases_box_is_loading_tool (_tmp14_, _tmp16_)) {
			_g_object_unref0 (group_box);
			return;
		}
		_g_object_unref0 (self->priv->pending_download_job);
		self->priv->pending_download_job = NULL;
		_tmp17_ = group_box;
		proton_plus_widgets_tools_box_focus_download_job (self, job, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox));
		_g_object_unref0 (group_box);
		return;
	}
	_tmp18_ = group_box;
	_tmp19_ = proton_plus_services_install_job_get_tool (job);
	_tmp20_ = _tmp19_;
	if (!proton_plus_widgets_tools_group_box_expand_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), _tmp20_)) {
		_g_object_unref0 (self->priv->pending_download_job);
		self->priv->pending_download_job = NULL;
	}
	_g_object_unref0 (group_box);
}

static Block19Data*
block19_data_ref (Block19Data* _data19_)
{
	g_atomic_int_inc (&_data19_->_ref_count_);
	return _data19_;
}

static void
block19_data_unref (void * _userdata_)
{
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data19_->self;
		_g_object_unref0 (_data19_->group_box);
		_g_object_unref0 (self);
		g_slice_free (Block19Data, _data19_);
	}
}

static void
____lambda102_ (Block19Data* _data19_,
                ProtonPlusModelsTool* tool,
                gboolean expanded)
{
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusWidgetsToolsGroupBox* _tmp0_;
	self = _data19_->self;
	g_return_if_fail (tool != NULL);
	_tmp0_ = _data19_->group_box;
	proton_plus_widgets_tools_box_on_tool_expansion_changed (self, _tmp0_, tool, expanded);
}

static void
_____lambda102__proton_plus_widgets_tools_group_box_tool_expansion_changed (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                            ProtonPlusModelsTool* tool,
                                                                            gboolean expanded,
                                                                            gpointer self)
{
	____lambda102_ (self, tool, expanded);
}

static void
____lambda104_ (ProtonPlusWidgetsToolsBox* self)
{
	GtkSearchEntry* _tmp0_;
	GtkMenuButton* _tmp1_;
	_tmp0_ = self->priv->_search_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, "");
	_tmp1_ = self->priv->_search_button;
	gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
}

static void
_____lambda104__proton_plus_widgets_tools_group_box_clear_search_requested (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                            gpointer self)
{
	____lambda104_ ((ProtonPlusWidgetsToolsBox*) self);
}

static void
____lambda105_ (ProtonPlusWidgetsToolsBox* self)
{
	GtkCheckButton* _tmp0_;
	GtkMenuButton* _tmp1_;
	_tmp0_ = self->priv->_all_filter_button;
	gtk_check_button_set_active (_tmp0_, TRUE);
	_tmp1_ = self->priv->_filter_button;
	gtk_widget_grab_focus ((GtkWidget*) _tmp1_);
}

static void
_____lambda105__proton_plus_widgets_tools_group_box_reset_filter_requested (ProtonPlusWidgetsToolsGroupBox* _sender,
                                                                            gpointer self)
{
	____lambda105_ ((ProtonPlusWidgetsToolsBox*) self);
}

void
proton_plus_widgets_tools_box_set_selected_launcher (ProtonPlusWidgetsToolsBox* self,
                                                     ProtonPlusModelsLauncher* launcher)
{
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	GtkWidget* child = NULL;
	ProtonPlusModelsGroup** _tmp7_;
	gint _tmp7__length1;
	AdwNavigationView* _tmp31_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	proton_plus_widgets_tools_box_collapse_current_expansion (self, FALSE);
	proton_plus_widgets_tools_box_clear_root_heading (self);
	_tmp0_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_clear_selected_tool (_tmp0_);
	_g_object_unref0 (self->priv->pending_download_job);
	self->priv->pending_download_job = NULL;
	_g_object_unref0 (self->priv->current_job);
	self->priv->current_job = NULL;
	proton_plus_widgets_tools_box_set_current_launcher (self, launcher);
	while (TRUE) {
		AdwViewStack* _tmp1_;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		AdwViewStack* _tmp5_;
		GtkWidget* _tmp6_;
		_tmp1_ = self->priv->_groups_stack;
		_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
		_tmp3_ = _g_object_ref0 (_tmp2_);
		_g_object_unref0 (child);
		child = _tmp3_;
		_tmp4_ = child;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp5_ = self->priv->_groups_stack;
		_tmp6_ = child;
		adw_view_stack_remove (_tmp5_, _tmp6_);
	}
	_tmp7_ = launcher->groups;
	_tmp7__length1 = launcher->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp7_;
		group_collection_length1 = _tmp7__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp8_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp8_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp8_;
			{
				Block19Data* _data19_;
				ProtonPlusModelsGroup* _tmp9_;
				GtkMenuButton* _tmp10_;
				ProtonPlusWidgetsToolsGroupBox* _tmp11_;
				ProtonPlusWidgetsToolsGroupBox* _tmp12_;
				ProtonPlusWidgetsToolsFilter _tmp13_;
				ProtonPlusWidgetsToolsFilter _tmp14_;
				ProtonPlusWidgetsToolsGroupBox* _tmp15_;
				GtkSearchEntry* _tmp16_;
				const gchar* _tmp17_;
				ProtonPlusWidgetsToolsGroupBox* _tmp18_;
				ProtonPlusWidgetsToolsGroupBox* _tmp19_;
				ProtonPlusWidgetsToolsGroupBox* _tmp20_;
				AdwViewStack* _tmp21_;
				ProtonPlusWidgetsToolsGroupBox* _tmp22_;
				ProtonPlusModelsGroup* _tmp23_;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				gchar* _tmp26_;
				gchar* _tmp27_;
				ProtonPlusModelsGroup* _tmp28_;
				const gchar* _tmp29_;
				const gchar* _tmp30_;
				_data19_ = g_slice_new0 (Block19Data);
				_data19_->_ref_count_ = 1;
				_data19_->self = g_object_ref (self);
				_tmp9_ = group;
				_tmp10_ = self->priv->_search_button;
				_tmp11_ = proton_plus_widgets_tools_group_box_new (_tmp9_, (GtkWidget*) _tmp10_);
				g_object_ref_sink (_tmp11_);
				_data19_->group_box = _tmp11_;
				_tmp12_ = _data19_->group_box;
				_tmp13_ = proton_plus_widgets_tools_box_get_current_filter (self);
				_tmp14_ = _tmp13_;
				proton_plus_widgets_tools_group_box_set_filter (_tmp12_, _tmp14_);
				_tmp15_ = _data19_->group_box;
				_tmp16_ = self->priv->_search_entry;
				_tmp17_ = gtk_editable_get_text ((GtkEditable*) _tmp16_);
				proton_plus_widgets_tools_group_box_set_search_text (_tmp15_, _tmp17_);
				_tmp18_ = _data19_->group_box;
				g_signal_connect_data (_tmp18_, "tool-expansion-changed", (GCallback) _____lambda102__proton_plus_widgets_tools_group_box_tool_expansion_changed, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
				_tmp19_ = _data19_->group_box;
				g_signal_connect_object (_tmp19_, "clear-search-requested", (GCallback) _____lambda104__proton_plus_widgets_tools_group_box_clear_search_requested, self, 0);
				_tmp20_ = _data19_->group_box;
				g_signal_connect_object (_tmp20_, "reset-filter-requested", (GCallback) _____lambda105__proton_plus_widgets_tools_group_box_reset_filter_requested, self, 0);
				_tmp21_ = self->priv->_groups_stack;
				_tmp22_ = _data19_->group_box;
				_tmp23_ = group;
				_tmp24_ = proton_plus_models_group_get_title (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp26_ = g_utf8_strdown (_tmp25_, (gssize) -1);
				_tmp27_ = _tmp26_;
				_tmp28_ = group;
				_tmp29_ = proton_plus_models_group_get_title (_tmp28_);
				_tmp30_ = _tmp29_;
				adw_view_stack_add_titled_with_icon (_tmp21_, (GtkWidget*) _tmp22_, _tmp27_, _tmp30_, "layer-group-symbolic");
				_g_free0 (_tmp27_);
				_g_object_unref0 (group);
				block19_data_unref (_data19_);
				_data19_ = NULL;
			}
		}
	}
	_tmp31_ = self->priv->_navigation_view;
	g_object_notify ((GObject*) _tmp31_, "visible-page");
	proton_plus_widgets_tools_box_reset_to_root (self);
	_g_object_unref0 (child);
}

static Block20Data*
block20_data_ref (Block20Data* _data20_)
{
	g_atomic_int_inc (&_data20_->_ref_count_);
	return _data20_;
}

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data20_->self;
		_g_object_unref0 (_data20_->group_box);
		_g_object_unref0 (_data20_->tool);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void
__lambda103_ (Block20Data* _data20_,
              GObject* obj,
              GAsyncResult* _result_)
{
	ProtonPlusWidgetsToolsBox* self;
	gboolean loaded = FALSE;
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp3_;
	gboolean _tmp5_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp6_;
	self = _data20_->self;
	g_return_if_fail (_result_ != NULL);
	_tmp0_ = self->priv->_releases_box;
	loaded = proton_plus_widgets_tools_releases_box_set_selected_tool_finish (_tmp0_, _result_);
	_tmp3_ = self->priv->expanded_group;
	if (_tmp3_ != _data20_->group_box) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = !proton_plus_widgets_tools_group_box_is_expanded_tool (_data20_->group_box, _data20_->tool);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleasesBox* _tmp4_;
		_tmp4_ = self->priv->_releases_box;
		_tmp1_ = !proton_plus_widgets_tools_releases_box_is_showing_tool (_tmp4_, _data20_->tool);
	}
	if (_tmp1_) {
		return;
	}
	_tmp6_ = self->priv->pending_download_job;
	if (_tmp6_ != NULL) {
		ProtonPlusServicesInstallJob* _tmp7_;
		ProtonPlusModelsTool* _tmp8_;
		ProtonPlusModelsTool* _tmp9_;
		_tmp7_ = self->priv->pending_download_job;
		_tmp8_ = proton_plus_services_install_job_get_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
		_tmp9_ = _tmp8_;
		_tmp5_ = _tmp9_ == _data20_->tool;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ProtonPlusServicesInstallJob* target = NULL;
		ProtonPlusServicesInstallJob* _tmp10_;
		ProtonPlusServicesInstallJob* _tmp11_;
		ProtonPlusServicesInstallJob* _tmp12_;
		_tmp10_ = self->priv->pending_download_job;
		_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
		target = _tmp11_;
		_g_object_unref0 (self->priv->pending_download_job);
		self->priv->pending_download_job = NULL;
		_tmp12_ = target;
		proton_plus_widgets_tools_box_focus_download_job (self, _tmp12_, _data20_->group_box);
		_g_object_unref0 (target);
		return;
	}
	if (!loaded) {
		return;
	}
}

static void
___lambda103__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda103_ (self, source_object, res);
	block20_data_unref (self);
}

static void
proton_plus_widgets_tools_box_on_tool_expansion_changed (ProtonPlusWidgetsToolsBox* self,
                                                         ProtonPlusWidgetsToolsGroupBox* group_box,
                                                         ProtonPlusModelsTool* tool,
                                                         gboolean expanded)
{
	Block20Data* _data20_;
	ProtonPlusWidgetsToolsGroupBox* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusWidgetsToolsGroupBox* previous_group = NULL;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp11_;
	GObject* _tmp12_;
	GObject* _tmp13_;
	ProtonPlusWidgetsToolsGroupBox* _tmp14_;
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp15_;
	gboolean _tmp16_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp17_;
	ProtonPlusWidgetsToolsGroupBox* _tmp20_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp21_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp22_;
	ProtonPlusWidgetsToolsFilter _tmp23_;
	ProtonPlusWidgetsToolsFilter _tmp24_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp25_;
	GtkSearchEntry* _tmp26_;
	const gchar* _tmp27_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp28_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (group_box != NULL);
	g_return_if_fail (tool != NULL);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_data20_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (group_box);
	_g_object_unref0 (_data20_->group_box);
	_data20_->group_box = _tmp0_;
	_tmp1_ = _g_object_ref0 (tool);
	_g_object_unref0 (_data20_->tool);
	_data20_->tool = _tmp1_;
	if (!expanded) {
		ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp2_;
		ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp3_;
		ProtonPlusWidgetsToolsGroupBox* _tmp4_;
		_tmp2_ = self->priv->interaction_state;
		proton_plus_widgets_tools_inline_release_interaction_state_collapse (_tmp2_, (GObject*) _data20_->group_box);
		_tmp3_ = self->priv->interaction_state;
		proton_plus_widgets_tools_inline_release_interaction_state_clear_navigation (_tmp3_, (GObject*) _data20_->group_box);
		_tmp4_ = self->priv->expanded_group;
		if (_tmp4_ == _data20_->group_box) {
			gboolean _tmp5_ = FALSE;
			ProtonPlusServicesInstallJob* _tmp6_;
			ProtonPlusWidgetsToolsReleasesBox* _tmp10_;
			_tmp6_ = self->priv->pending_download_job;
			if (_tmp6_ != NULL) {
				ProtonPlusServicesInstallJob* _tmp7_;
				ProtonPlusModelsTool* _tmp8_;
				ProtonPlusModelsTool* _tmp9_;
				_tmp7_ = self->priv->pending_download_job;
				_tmp8_ = proton_plus_services_install_job_get_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
				_tmp9_ = _tmp8_;
				_tmp5_ = _tmp9_ == _data20_->tool;
			} else {
				_tmp5_ = FALSE;
			}
			if (_tmp5_) {
				_g_object_unref0 (self->priv->pending_download_job);
				self->priv->pending_download_job = NULL;
			}
			_tmp10_ = self->priv->_releases_box;
			proton_plus_widgets_tools_releases_box_clear_selected_tool (_tmp10_);
			_g_object_unref0 (self->priv->expanded_group);
			self->priv->expanded_group = NULL;
		}
		block20_data_unref (_data20_);
		_data20_ = NULL;
		return;
	}
	_tmp11_ = self->priv->interaction_state;
	_tmp12_ = proton_plus_widgets_tools_inline_release_interaction_state_get_expanded_owner (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_GROUP_BOX (_tmp13_) ? ((ProtonPlusWidgetsToolsGroupBox*) _tmp13_) : NULL);
	previous_group = _tmp14_;
	_tmp15_ = self->priv->interaction_state;
	proton_plus_widgets_tools_inline_release_interaction_state_expand (_tmp15_, (GObject*) _data20_->group_box);
	_tmp17_ = previous_group;
	if (_tmp17_ != NULL) {
		ProtonPlusWidgetsToolsGroupBox* _tmp18_;
		_tmp18_ = previous_group;
		_tmp16_ = _tmp18_ != _data20_->group_box;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		ProtonPlusWidgetsToolsGroupBox* _tmp19_;
		_tmp19_ = previous_group;
		proton_plus_widgets_tools_group_box_collapse_expanded_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), FALSE);
	}
	_tmp20_ = _g_object_ref0 (_data20_->group_box);
	_g_object_unref0 (self->priv->expanded_group);
	self->priv->expanded_group = _tmp20_;
	_tmp21_ = self->priv->_releases_box;
	proton_plus_widgets_tools_group_box_attach_release_section (_data20_->group_box, _data20_->tool, _tmp21_);
	_tmp22_ = self->priv->_releases_box;
	_tmp23_ = proton_plus_widgets_tools_box_get_current_filter (self);
	_tmp24_ = _tmp23_;
	proton_plus_widgets_tools_releases_box_set_filter (_tmp22_, _tmp24_);
	_tmp25_ = self->priv->_releases_box;
	_tmp26_ = self->priv->_search_entry;
	_tmp27_ = gtk_editable_get_text ((GtkEditable*) _tmp26_);
	proton_plus_widgets_tools_releases_box_set_search_text (_tmp25_, _tmp27_);
	_tmp28_ = self->priv->_releases_box;
	if (proton_plus_widgets_tools_releases_box_is_showing_tool (_tmp28_, _data20_->tool)) {
		gboolean _tmp29_ = FALSE;
		gboolean _tmp30_ = FALSE;
		ProtonPlusServicesInstallJob* _tmp31_;
		_tmp31_ = self->priv->pending_download_job;
		if (_tmp31_ != NULL) {
			ProtonPlusServicesInstallJob* _tmp32_;
			ProtonPlusModelsTool* _tmp33_;
			ProtonPlusModelsTool* _tmp34_;
			_tmp32_ = self->priv->pending_download_job;
			_tmp33_ = proton_plus_services_install_job_get_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
			_tmp34_ = _tmp33_;
			_tmp30_ = _tmp34_ == _data20_->tool;
		} else {
			_tmp30_ = FALSE;
		}
		if (_tmp30_) {
			ProtonPlusWidgetsToolsReleasesBox* _tmp35_;
			_tmp35_ = self->priv->_releases_box;
			_tmp29_ = !proton_plus_widgets_tools_releases_box_is_loading_tool (_tmp35_, _data20_->tool);
		} else {
			_tmp29_ = FALSE;
		}
		if (_tmp29_) {
			ProtonPlusServicesInstallJob* target = NULL;
			ProtonPlusServicesInstallJob* _tmp36_;
			ProtonPlusServicesInstallJob* _tmp37_;
			ProtonPlusServicesInstallJob* _tmp38_;
			_tmp36_ = self->priv->pending_download_job;
			_tmp37_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, ProtonPlusServicesInstallJob));
			target = _tmp37_;
			_g_object_unref0 (self->priv->pending_download_job);
			self->priv->pending_download_job = NULL;
			_tmp38_ = target;
			proton_plus_widgets_tools_box_focus_download_job (self, _tmp38_, _data20_->group_box);
			_g_object_unref0 (target);
		}
		_g_object_unref0 (previous_group);
		block20_data_unref (_data20_);
		_data20_ = NULL;
		return;
	}
	_tmp39_ = self->priv->_releases_box;
	proton_plus_widgets_tools_releases_box_set_selected_tool (_tmp39_, _data20_->tool, ___lambda103__gasync_ready_callback, block20_data_ref (_data20_));
	_g_object_unref0 (previous_group);
	block20_data_unref (_data20_);
	_data20_ = NULL;
}

static void
proton_plus_widgets_tools_box_remember_release_navigation (ProtonPlusWidgetsToolsBox* self,
                                                           ProtonPlusServicesInstallJob* job)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsToolsGroupBox* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_tmp1_ = self->priv->expanded_group;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsToolsGroupBox* _tmp2_;
		ProtonPlusModelsTool* _tmp3_;
		ProtonPlusModelsTool* _tmp4_;
		_tmp2_ = self->priv->expanded_group;
		_tmp3_ = proton_plus_services_install_job_get_tool (job);
		_tmp4_ = _tmp3_;
		_tmp0_ = proton_plus_widgets_tools_group_box_is_expanded_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), _tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp5_;
		ProtonPlusWidgetsToolsGroupBox* _tmp6_;
		ProtonPlusWidgetsToolsGroupBox* _tmp7_;
		_tmp5_ = self->priv->interaction_state;
		_tmp6_ = self->priv->expanded_group;
		_tmp7_ = self->priv->expanded_group;
		proton_plus_widgets_tools_inline_release_interaction_state_remember_navigation (_tmp5_, (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox), (GObject*) job, proton_plus_widgets_tools_group_box_get_scroll_position (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox)));
	}
}

static void
proton_plus_widgets_tools_box_show_changelog_dialog (ProtonPlusWidgetsToolsBox* self,
                                                     ProtonPlusServicesInstallJob* job)
{
	ProtonPlusWidgetsToolsReleaseChangelogDialog* dialog = NULL;
	ProtonPlusWidgetsToolsReleaseChangelogDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_tmp0_ = proton_plus_widgets_tools_release_changelog_dialog_new (job);
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) dialog, (GtkWidget*) self);
	_g_object_unref0 (dialog);
}

static Block21Data*
block21_data_ref (Block21Data* _data21_)
{
	g_atomic_int_inc (&_data21_->_ref_count_);
	return _data21_;
}

static void
block21_data_unref (void * _userdata_)
{
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		ProtonPlusWidgetsToolsBox* self;
		self = _data21_->self;
		_g_object_unref0 (_data21_->job);
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}

static void
__lambda86_ (Block21Data* _data21_,
             GeeArrayList* games)
{
	ProtonPlusWidgetsToolsBox* self;
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusWidgetsToolsMigrateBox* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ProtonPlusModelsTool* _tmp4_;
	ProtonPlusModelsTool* _tmp5_;
	ProtonPlusModelsGroup* _tmp6_;
	ProtonPlusModelsGroup* _tmp7_;
	ProtonPlusModelsLauncher* _tmp8_;
	ProtonPlusModelsLauncher* _tmp9_;
	AdwNavigationPage* _tmp10_;
	self = _data21_->self;
	g_return_if_fail (games != NULL);
	proton_plus_widgets_tools_box_remember_release_navigation (self, _data21_->job);
	_tmp0_ = _g_object_ref0 (_data21_->job);
	_g_object_unref0 (self->priv->current_job);
	self->priv->current_job = _tmp0_;
	_tmp1_ = self->priv->_migrate_box;
	_tmp2_ = proton_plus_services_install_job_get_usage_identifier (_data21_->job);
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_services_install_job_get_tool (_data21_->job);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_tool_get_group (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_models_group_get_launcher (_tmp7_);
	_tmp9_ = _tmp8_;
	proton_plus_widgets_tools_migrate_box_init (_tmp1_, games, _tmp3_, _tmp9_);
	_g_free0 (_tmp3_);
	_tmp10_ = self->priv->_migrate_page;
	proton_plus_widgets_tools_box_push_page (self, _tmp10_);
}

static void
___lambda86__proton_plus_widgets_tools_release_games_dialog_migrate_requested (ProtonPlusWidgetsToolsReleaseGamesDialog* _sender,
                                                                               GeeArrayList* games,
                                                                               gpointer self)
{
	__lambda86_ (self, games);
}

static void
proton_plus_widgets_tools_box_show_games_dialog (ProtonPlusWidgetsToolsBox* self,
                                                 ProtonPlusServicesInstallJob* job)
{
	Block21Data* _data21_;
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsGroup* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsLauncher* _tmp5_;
	ProtonPlusModelsLauncher* _tmp6_;
	ProtonPlusWidgetsToolsReleaseGamesDialog* dialog = NULL;
	ProtonPlusWidgetsToolsReleaseGamesDialog* _tmp7_;
	ProtonPlusWidgetsToolsReleaseGamesDialog* _tmp8_;
	ProtonPlusWidgetsToolsReleaseGamesDialog* _tmp9_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (job);
	_g_object_unref0 (_data21_->job);
	_data21_->job = _tmp0_;
	_tmp1_ = proton_plus_services_install_job_get_tool (_data21_->job);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_models_tool_get_group (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_models_group_get_launcher (_tmp4_);
	_tmp6_ = _tmp5_;
	if (!PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp6_)) {
		block21_data_unref (_data21_);
		_data21_ = NULL;
		return;
	}
	_tmp7_ = proton_plus_widgets_tools_release_games_dialog_new (_data21_->job);
	g_object_ref_sink (_tmp7_);
	dialog = _tmp7_;
	_tmp8_ = dialog;
	g_signal_connect_data (_tmp8_, "migrate-requested", (GCallback) ___lambda86__proton_plus_widgets_tools_release_games_dialog_migrate_requested, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	_tmp9_ = dialog;
	proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) _tmp9_, (GtkWidget*) self);
	_g_object_unref0 (dialog);
	block21_data_unref (_data21_);
	_data21_ = NULL;
}

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

static GtkBox*
proton_plus_widgets_tools_box_get_root_page_box (ProtonPlusWidgetsToolsBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_root_page_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_root_page_box (ProtonPlusWidgetsToolsBox* self,
                                                 GtkBox* value)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_root_page_box);
	self->priv->_root_page_box = _tmp0_;
}

static ProtonPlusWidgetsHeaderPresentation*
proton_plus_widgets_tools_box_get_migrate_presentation (ProtonPlusWidgetsToolsBox* self)
{
	ProtonPlusWidgetsHeaderPresentation* result;
	ProtonPlusWidgetsHeaderPresentation* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_migrate_presentation;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_box_set_migrate_presentation (ProtonPlusWidgetsToolsBox* self,
                                                        ProtonPlusWidgetsHeaderPresentation* value)
{
	ProtonPlusWidgetsHeaderPresentation* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_migrate_presentation);
	self->priv->_migrate_presentation = _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);
	proton_plus_widgets_tools_box_signals[PROTON_PLUS_WIDGETS_TOOLS_BOX_HEADER_PRESENTATION_CHANGED_SIGNAL] = g_signal_new ("header-presentation-changed", PROTON_PLUS_WIDGETS_TOOLS_TYPE_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_WIDGETS_HEADER_TYPE_PRESENTATION);
}

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)
{
	ProtonPlusWidgetsToolsInlineReleaseInteractionState* _tmp0_;
	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->migrate_back_handler = (gulong) 0;
	_tmp0_ = proton_plus_widgets_tools_inline_release_interaction_state_new ();
	self->priv->interaction_state = _tmp0_;
	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->_migrate_page);
	_g_object_unref0 (self->priv->_refresh_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->_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->_migrate_box);
	_g_object_unref0 (self->priv->_switcher);
	_g_object_unref0 (self->priv->_center_stack);
	_g_object_unref0 (self->priv->_root_page_box);
	_g_object_unref0 (self->priv->heading_group);
	_g_object_unref0 (self->priv->_migrate_presentation);
	_g_object_unref0 (self->priv->expanded_group);
	_g_object_unref0 (self->priv->pending_download_job);
	_g_object_unref0 (self->priv->interaction_state);
	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);
}

