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

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

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

enum  {
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block22Data Block22Data;
typedef struct _Block23Data Block23Data;
typedef struct _Block24Data Block24Data;
typedef struct _Block25Data Block25Data;
typedef struct _Block26Data Block26Data;
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_RESET_FILTER_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_NUM_SIGNALS
};
static guint proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsToolsGroupBoxPrivate {
	GtkBox* _header_title;
	GtkBox* _header_actions;
	GtkListBox* list_box;
	GtkScrolledWindow* scrolled;
	GtkStack* stack;
	AdwStatusPage* status_page;
	GtkButton* empty_action_button;
	GtkWidget* controller_up_target;
	AdwExpanderRow* expanded_row;
	ProtonPlusModelsTool* expanded_tool;
	ProtonPlusWidgetsToolsReleasesBox* releases_section;
	GtkBox* releases_host;
	gboolean changing_expansion;
	guint visibility_change_generation;
	ProtonPlusWidgetsToolsFilter _filter;
	gchar* _search_text;
};

struct _Block22Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsGroupBox* self;
	ProtonPlusModelsGroup* group;
};

struct _Block23Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsGroupBox* self;
	AdwExpanderRow* row;
	ProtonPlusModelsTool* tool;
};

struct _Block24Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsGroupBox* self;
	gdouble position;
};

struct _Block25Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsGroupBox* self;
	GtkWidget* widget;
};

struct _Block26Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsGroupBox* self;
	guint expected_generation;
};

static gint ProtonPlusWidgetsToolsGroupBox_private_offset;
static gpointer proton_plus_widgets_tools_group_box_parent_class = NULL;
static ProtonPlusUtilsControllerDirectionalFocusIface * proton_plus_widgets_tools_group_box_proton_plus_utils_controller_directional_focus_parent_iface = NULL;
static ProtonPlusUtilsControllerActivationHandlerIface * proton_plus_widgets_tools_group_box_proton_plus_utils_controller_activation_handler_parent_iface = NULL;

static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void proton_plus_widgets_tools_group_box_set_header_title (ProtonPlusWidgetsToolsGroupBox* self,
                                                           GtkBox* value);
static void proton_plus_widgets_tools_group_box_set_header_actions (ProtonPlusWidgetsToolsGroupBox* self,
                                                             GtkBox* value);
static gboolean proton_plus_widgets_tools_group_box_filter_func (ProtonPlusWidgetsToolsGroupBox* self,
                                                          GtkListBoxRow* row);
static gboolean _proton_plus_widgets_tools_group_box_filter_func_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                                    gpointer self);
static gint proton_plus_widgets_tools_group_box_sort_func (ProtonPlusWidgetsToolsGroupBox* self,
                                                    GtkListBoxRow* row1,
                                                    GtkListBoxRow* row2);
static gint _proton_plus_widgets_tools_group_box_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                            GtkListBoxRow* row2,
                                                                            gpointer self);
static void __lambda69_ (Block22Data* _data22_);
static void ___lambda69__proton_plus_models_group_installed_tool_index_invalidated (ProtonPlusModelsGroup* _sender,
                                                                             gpointer self);
static void __lambda70_ (ProtonPlusWidgetsToolsGroupBox* self);
static void ___lambda70__proton_plus_models_group_installed_state_refreshed (ProtonPlusModelsGroup* _sender,
                                                                      gpointer self);
static void __lambda71_ (ProtonPlusWidgetsToolsGroupBox* self);
static void ___lambda71__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static AdwExpanderRow* proton_plus_widgets_tools_group_box_create_tool_card (ProtonPlusWidgetsToolsGroupBox* self,
                                                                      ProtonPlusModelsTool* tool);
static void proton_plus_widgets_tools_group_box_update_visibility (ProtonPlusWidgetsToolsGroupBox* self);
static gboolean proton_plus_widgets_tools_group_box_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                              GObject* focused_object,
                                                                              ProtonPlusUtilsControllerNavigationDirection direction);
static AdwExpanderRow* proton_plus_widgets_tools_group_box_find_expander_row_ancestor (ProtonPlusWidgetsToolsGroupBox* self,
                                                                                GtkWidget* widget);
static gboolean proton_plus_widgets_tools_group_box_focus_from_header_actions (ProtonPlusWidgetsToolsGroupBox* self,
                                                                        AdwExpanderRow* row,
                                                                        GtkMenuButton* actions_button,
                                                                        ProtonPlusUtilsControllerNavigationDirection direction);
static AdwExpanderRow* proton_plus_widgets_tools_group_box_find_adjacent_visible_row (ProtonPlusWidgetsToolsGroupBox* self,
                                                                               AdwExpanderRow* row,
                                                                               ProtonPlusUtilsControllerNavigationDirection direction);
static GtkListBoxRow* proton_plus_widgets_tools_group_box_find_first_visible_row (ProtonPlusWidgetsToolsGroupBox* self);
static gboolean proton_plus_widgets_tools_group_box_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                                       GObject* focused_object);
static GtkWidget* proton_plus_widgets_tools_group_box_find_header_action_ancestor (ProtonPlusWidgetsToolsGroupBox* self,
                                                                            GtkWidget* focused);
static void proton_plus_widgets_tools_group_box_update_status_page (ProtonPlusWidgetsToolsGroupBox* self);
static void proton_plus_widgets_tools_group_box_refresh_tool_state_metadata (ProtonPlusWidgetsToolsGroupBox* self);
static void proton_plus_widgets_tools_group_box_collapse_if_hidden (ProtonPlusWidgetsToolsGroupBox* self);
static void proton_plus_widgets_tools_group_box_update_release_section_boundary (ProtonPlusWidgetsToolsGroupBox* self);
static void proton_plus_widgets_tools_group_box_update_tool_state_metadata (ProtonPlusWidgetsToolsGroupBox* self,
                                                                     GtkLabel* state_label,
                                                                     ProtonPlusModelsTool* tool);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static void proton_plus_widgets_tools_group_box_update_expanded_accessibility (ProtonPlusWidgetsToolsGroupBox* self,
                                                                        AdwExpanderRow* row);
static void __lambda72_ (Block23Data* _data23_);
static void proton_plus_widgets_tools_group_box_on_row_expanded_changed (ProtonPlusWidgetsToolsGroupBox* self,
                                                                  AdwExpanderRow* row,
                                                                  ProtonPlusModelsTool* tool);
static void ___lambda72__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void proton_plus_widgets_tools_group_box_detach_release_section (ProtonPlusWidgetsToolsGroupBox* self);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static gboolean __lambda73_ (Block24Data* _data24_);
static gboolean ___lambda73__gsource_func (gpointer self);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static gboolean __lambda74_ (Block25Data* _data25_);
static gboolean ___lambda74__gsource_func (gpointer self);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static gboolean ___lambda68_ (Block26Data* _data26_);
static gboolean ____lambda68__gsource_func (gpointer self);
static void g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void proton_plus_widgets_tools_group_box_finalize (GObject * obj);
static GType proton_plus_widgets_tools_group_box_get_type_once (void);
static void _vala_proton_plus_widgets_tools_group_box_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec);
static void _vala_proton_plus_widgets_tools_group_box_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
proton_plus_widgets_tools_group_box_get_instance_private (ProtonPlusWidgetsToolsGroupBox* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsGroupBox_private_offset);
}

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

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		ProtonPlusWidgetsToolsGroupBox* self;
		self = _data22_->self;
		_g_object_unref0 (_data22_->group);
		_g_object_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static gboolean
_proton_plus_widgets_tools_group_box_filter_func_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                           gpointer self)
{
	gboolean result;
	result = proton_plus_widgets_tools_group_box_filter_func ((ProtonPlusWidgetsToolsGroupBox*) self, row);
	return result;
}

static gint
_proton_plus_widgets_tools_group_box_sort_func_gtk_list_box_sort_func (GtkListBoxRow* row1,
                                                                       GtkListBoxRow* row2,
                                                                       gpointer self)
{
	gint result;
	result = proton_plus_widgets_tools_group_box_sort_func ((ProtonPlusWidgetsToolsGroupBox*) self, row1, row2);
	return result;
}

static void
__lambda69_ (Block22Data* _data22_)
{
	ProtonPlusWidgetsToolsGroupBox* self;
	self = _data22_->self;
	proton_plus_models_group_refresh_installed_state (_data22_->group);
}

static void
___lambda69__proton_plus_models_group_installed_tool_index_invalidated (ProtonPlusModelsGroup* _sender,
                                                                        gpointer self)
{
	__lambda69_ (self);
}

static void
__lambda70_ (ProtonPlusWidgetsToolsGroupBox* self)
{
	proton_plus_widgets_tools_group_box_refresh (self);
}

static void
___lambda70__proton_plus_models_group_installed_state_refreshed (ProtonPlusModelsGroup* _sender,
                                                                 gpointer self)
{
	__lambda70_ ((ProtonPlusWidgetsToolsGroupBox*) self);
}

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

static void
__lambda71_ (ProtonPlusWidgetsToolsGroupBox* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	_tmp0_ = proton_plus_widgets_tools_group_box_get_search_text (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_strip (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "") != 0;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL], 0);
	} else {
		ProtonPlusWidgetsToolsFilter _tmp5_;
		ProtonPlusWidgetsToolsFilter _tmp6_;
		_tmp5_ = proton_plus_widgets_tools_group_box_get_filter (self);
		_tmp6_ = _tmp5_;
		if (_tmp6_ != PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
			g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_RESET_FILTER_REQUESTED_SIGNAL], 0);
		}
	}
}

static void
___lambda71__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda71_ ((ProtonPlusWidgetsToolsGroupBox*) self);
}

ProtonPlusWidgetsToolsGroupBox*
proton_plus_widgets_tools_group_box_construct (GType object_type,
                                               ProtonPlusModelsGroup* group,
                                               GtkWidget* controller_up_target)
{
	ProtonPlusWidgetsToolsGroupBox * self = NULL;
	Block22Data* _data22_;
	ProtonPlusModelsGroup* _tmp0_;
	GtkImage* icon = NULL;
	GtkImage* _tmp1_;
	GtkLabel* title_label = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	GtkLabel* _tmp6_ = NULL;
	GtkLabel* desc_label = NULL;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar** _tmp10_;
	GtkLabel* _tmp11_ = NULL;
	GtkBox* title_box = NULL;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkLabel* _tmp14_;
	GtkBox* _tmp15_;
	GtkLabel* _tmp16_;
	GtkBox* _tmp17_ = NULL;
	GtkBox* _tmp18_;
	GtkBox* _tmp19_;
	GtkImage* _tmp20_;
	GtkBox* _tmp21_;
	GtkBox* _tmp22_;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* collection_toolbar = NULL;
	GtkBox* _tmp25_ = NULL;
	GtkBox* _tmp26_;
	GtkBox* _tmp27_;
	GtkBox* _tmp28_;
	GtkBox* _tmp29_;
	GtkBox* _tmp30_;
	GtkListBox* _tmp31_ = NULL;
	GtkListBox* _tmp32_;
	GtkListBox* _tmp33_;
	GtkListBox* _tmp34_;
	GtkListBox* _tmp35_;
	GtkListBox* _tmp36_;
	GtkWidget* _tmp37_;
	GtkScrolledWindow* _tmp38_ = NULL;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	AdwStatusPage* _tmp42_ = NULL;
	GtkButton* _tmp43_ = NULL;
	GtkButton* _tmp44_;
	GtkButton* _tmp45_;
	AdwStatusPage* _tmp46_;
	GtkButton* _tmp47_;
	GtkStack* _tmp48_ = NULL;
	GtkStack* _tmp49_;
	GtkScrolledWindow* _tmp50_;
	GtkStack* _tmp51_;
	AdwStatusPage* _tmp52_;
	GtkListBox* _tmp69_;
	GtkBox* group_box = NULL;
	GtkBox* _tmp70_;
	GtkBox* _tmp71_;
	GtkStack* _tmp72_;
	AdwClamp* clamp = NULL;
	GtkWidget* _tmp73_;
	AdwClamp* _tmp74_ = NULL;
	g_return_val_if_fail (group != NULL, NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (group);
	_g_object_unref0 (_data22_->group);
	_data22_->group = _tmp0_;
	self = (ProtonPlusWidgetsToolsGroupBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 0, NULL);
	_data22_->self = g_object_ref (self);
	self->priv->controller_up_target = controller_up_target;
	proton_plus_models_group_refresh_installed_state (_data22_->group);
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("layer-group-symbolic");
	g_object_ref_sink (_tmp1_);
	icon = _tmp1_;
	_tmp2_ = proton_plus_models_group_get_title (_data22_->group);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup ("title-4");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	_tmp6_ = (GtkLabel*) gtk_label_new (_tmp3_);
	gtk_widget_set_halign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp6_);
	title_label = _tmp6_;
	_tmp7_ = proton_plus_models_group_get_description (_data22_->group);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup ("caption");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = (GtkLabel*) gtk_label_new (_tmp8_);
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 1, (GDestroyNotify) g_free), NULL);
	gtk_label_set_wrap (_tmp11_, TRUE);
	gtk_label_set_xalign (_tmp11_, (gfloat) 0);
	g_object_ref_sink (_tmp11_);
	desc_label = _tmp11_;
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp12_);
	title_box = _tmp12_;
	_tmp13_ = title_box;
	_tmp14_ = title_label;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = title_box;
	_tmp16_ = desc_label;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp17_, 12);
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	proton_plus_widgets_tools_group_box_set_header_title (self, _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = self->priv->_header_title;
	_tmp20_ = icon;
	gtk_box_append (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = self->priv->_header_title;
	_tmp22_ = title_box;
	gtk_box_append (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp23_);
	_tmp24_ = _tmp23_;
	proton_plus_widgets_tools_group_box_set_header_actions (self, _tmp24_);
	_g_object_unref0 (_tmp24_);
	_tmp25_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp25_, TRUE);
	g_object_ref_sink (_tmp25_);
	collection_toolbar = _tmp25_;
	_tmp26_ = collection_toolbar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp26_, "tools-collection-toolbar");
	_tmp27_ = collection_toolbar;
	_tmp28_ = self->priv->_header_title;
	gtk_box_append (_tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = collection_toolbar;
	_tmp30_ = self->priv->_header_actions;
	gtk_box_append (_tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = (GtkListBox*) gtk_list_box_new ();
	gtk_list_box_set_selection_mode (_tmp31_, GTK_SELECTION_NONE);
	gtk_widget_set_valign ((GtkWidget*) _tmp31_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->list_box);
	self->priv->list_box = _tmp31_;
	_tmp32_ = self->priv->list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp32_, "boxed-list");
	_tmp33_ = self->priv->list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp33_, "tools-tools-card");
	_tmp34_ = self->priv->list_box;
	gtk_list_box_set_filter_func (_tmp34_, _proton_plus_widgets_tools_group_box_filter_func_gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	_tmp35_ = self->priv->list_box;
	gtk_list_box_set_sort_func (_tmp35_, _proton_plus_widgets_tools_group_box_sort_func_gtk_list_box_sort_func, g_object_ref (self), g_object_unref);
	g_signal_connect_data (_data22_->group, "installed-tool-index-invalidated", (GCallback) ___lambda69__proton_plus_models_group_installed_tool_index_invalidated, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
	g_signal_connect_object (_data22_->group, "installed-state-refreshed", (GCallback) ___lambda70__proton_plus_models_group_installed_state_refreshed, self, 0);
	_tmp36_ = self->priv->list_box;
	_tmp37_ = _g_object_ref0 ((GtkWidget*) _tmp36_);
	_tmp38_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_child (_tmp38_, _tmp37_);
	_g_object_unref0 (_tmp37_);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp38_, TRUE);
	g_object_set (_tmp38_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	g_object_set (_tmp38_, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, NULL);
	gtk_widget_set_overflow ((GtkWidget*) _tmp38_, GTK_OVERFLOW_HIDDEN);
	g_object_ref_sink (_tmp38_);
	_g_object_unref0 (self->priv->scrolled);
	self->priv->scrolled = _tmp38_;
	_tmp39_ = g_strdup (_ ("No tools found"));
	_tmp40_ = g_strdup (_ ("No tools match the current filter."));
	_tmp41_ = g_strdup ("edit-find-symbolic");
	_tmp42_ = (AdwStatusPage*) adw_status_page_new ();
	adw_status_page_set_title (_tmp42_, _tmp39_);
	_g_free0 (_tmp39_);
	adw_status_page_set_description (_tmp42_, _tmp40_);
	_g_free0 (_tmp40_);
	adw_status_page_set_icon_name (_tmp42_, _tmp41_);
	_g_free0 (_tmp41_);
	g_object_ref_sink (_tmp42_);
	_g_object_unref0 (self->priv->status_page);
	self->priv->status_page = _tmp42_;
	_tmp43_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp43_, FALSE);
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (self->priv->empty_action_button);
	self->priv->empty_action_button = _tmp43_;
	_tmp44_ = self->priv->empty_action_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp44_, "suggested-action");
	_tmp45_ = self->priv->empty_action_button;
	g_signal_connect_object (_tmp45_, "clicked", (GCallback) ___lambda71__gtk_button_clicked, self, 0);
	_tmp46_ = self->priv->status_page;
	_tmp47_ = self->priv->empty_action_button;
	adw_status_page_set_child (_tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp48_, TRUE);
	gtk_widget_set_overflow ((GtkWidget*) _tmp48_, GTK_OVERFLOW_HIDDEN);
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (self->priv->stack);
	self->priv->stack = _tmp48_;
	_tmp49_ = self->priv->stack;
	_tmp50_ = self->priv->scrolled;
	gtk_stack_add_named (_tmp49_, (GtkWidget*) _tmp50_, "list");
	_tmp51_ = self->priv->stack;
	_tmp52_ = self->priv->status_page;
	gtk_stack_add_named (_tmp51_, (GtkWidget*) _tmp52_, "empty");
	{
		GeeLinkedList* _tool_list = NULL;
		GeeLinkedList* _tmp53_;
		GeeLinkedList* _tmp54_;
		gint _tool_size = 0;
		GeeLinkedList* _tmp55_;
		gint _tmp56_;
		gint _tmp57_;
		gint _tool_index = 0;
		_tmp53_ = proton_plus_models_group_get_tools (_data22_->group);
		_tmp54_ = _tmp53_;
		_tool_list = _tmp54_;
		_tmp55_ = _tool_list;
		_tmp56_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp55_);
		_tmp57_ = _tmp56_;
		_tool_size = _tmp57_;
		_tool_index = -1;
		while (TRUE) {
			gint _tmp58_;
			gint _tmp59_;
			ProtonPlusModelsTool* tool = NULL;
			GeeLinkedList* _tmp60_;
			gpointer _tmp61_;
			AdwExpanderRow* row = NULL;
			ProtonPlusModelsTool* _tmp62_;
			AdwExpanderRow* _tmp63_;
			AdwExpanderRow* _tmp64_;
			ProtonPlusModelsTool* _tmp65_;
			ProtonPlusModelsTool* _tmp66_;
			GtkListBox* _tmp67_;
			AdwExpanderRow* _tmp68_;
			_tool_index = _tool_index + 1;
			_tmp58_ = _tool_index;
			_tmp59_ = _tool_size;
			if (!(_tmp58_ < _tmp59_)) {
				break;
			}
			_tmp60_ = _tool_list;
			_tmp61_ = gee_abstract_list_get ((GeeAbstractList*) _tmp60_, _tool_index);
			tool = (ProtonPlusModelsTool*) _tmp61_;
			_tmp62_ = tool;
			_tmp63_ = proton_plus_widgets_tools_group_box_create_tool_card (self, _tmp62_);
			row = _tmp63_;
			_tmp64_ = row;
			_tmp65_ = tool;
			_tmp66_ = _g_object_ref0 (_tmp65_);
			g_object_set_data_full ((GObject*) _tmp64_, "tool", _tmp66_, g_object_unref);
			_tmp67_ = self->priv->list_box;
			_tmp68_ = row;
			gtk_list_box_append (_tmp67_, (GtkWidget*) _tmp68_);
			_g_object_unref0 (row);
			_g_object_unref0 (tool);
		}
	}
	_tmp69_ = self->priv->list_box;
	gtk_list_box_invalidate_sort (_tmp69_);
	_tmp70_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp70_);
	group_box = _tmp70_;
	_tmp71_ = collection_toolbar;
	gtk_box_append (group_box, (GtkWidget*) _tmp71_);
	_tmp72_ = self->priv->stack;
	gtk_box_append (group_box, (GtkWidget*) _tmp72_);
	_tmp73_ = _g_object_ref0 ((GtkWidget*) group_box);
	_tmp74_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp74_, 975);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp74_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp74_, 12);
	adw_clamp_set_child (_tmp74_, _tmp73_);
	_g_object_unref0 (_tmp73_);
	g_object_ref_sink (_tmp74_);
	clamp = _tmp74_;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) clamp);
	proton_plus_widgets_tools_group_box_update_visibility (self);
	_g_object_unref0 (clamp);
	_g_object_unref0 (group_box);
	_g_object_unref0 (collection_toolbar);
	_g_object_unref0 (title_box);
	_g_object_unref0 (desc_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (icon);
	block22_data_unref (_data22_);
	_data22_ = NULL;
	return self;
}

ProtonPlusWidgetsToolsGroupBox*
proton_plus_widgets_tools_group_box_new (ProtonPlusModelsGroup* group,
                                         GtkWidget* controller_up_target)
{
	return proton_plus_widgets_tools_group_box_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, group, controller_up_target);
}

static gboolean
proton_plus_widgets_tools_group_box_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                     GObject* focused_object,
                                                                     ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsToolsGroupBox * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	AdwExpanderRow* focused_row = NULL;
	GtkWidget* _tmp1_;
	AdwExpanderRow* _tmp2_;
	AdwExpanderRow* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	ProtonPlusWidgetsToolsReleasesBox* _tmp6_;
	gboolean in_release_section = FALSE;
	GtkMenuButton* actions_button = NULL;
	AdwExpanderRow* _tmp13_;
	gconstpointer _tmp14_;
	GtkMenuButton* _tmp15_;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	GtkMenuButton* _tmp18_;
	gboolean in_header_actions = FALSE;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_ = FALSE;
	gboolean _tmp29_ = FALSE;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp31_ = FALSE;
	gboolean _tmp42_ = FALSE;
	gboolean _tmp43_ = FALSE;
	gboolean _tmp48_ = FALSE;
	gboolean _tmp53_ = FALSE;
	gboolean _tmp57_ = FALSE;
	gboolean _tmp58_ = FALSE;
	gboolean _tmp59_ = FALSE;
	gboolean _tmp60_ = FALSE;
	GtkWidget* _tmp61_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsGroupBox*) base;
	g_return_val_if_fail (focused_object != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (focused_object, gtk_widget_get_type ()) ? ((GtkWidget*) focused_object) : NULL);
	focused = _tmp0_;
	_tmp1_ = focused;
	_tmp2_ = proton_plus_widgets_tools_group_box_find_expander_row_ancestor (self, _tmp1_);
	focused_row = _tmp2_;
	_tmp3_ = focused_row;
	if (_tmp3_ == NULL) {
		result = FALSE;
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp6_ = self->priv->releases_section;
	if (_tmp6_ != NULL) {
		GtkWidget* _tmp7_;
		_tmp7_ = focused;
		_tmp5_ = _tmp7_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		gboolean _tmp8_ = FALSE;
		GtkWidget* _tmp9_;
		ProtonPlusWidgetsToolsReleasesBox* _tmp10_;
		_tmp9_ = focused;
		_tmp10_ = self->priv->releases_section;
		if (_tmp9_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)) {
			_tmp8_ = TRUE;
		} else {
			GtkWidget* _tmp11_;
			ProtonPlusWidgetsToolsReleasesBox* _tmp12_;
			_tmp11_ = focused;
			_tmp12_ = self->priv->releases_section;
			_tmp8_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox));
		}
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	in_release_section = _tmp4_;
	if (in_release_section) {
		result = FALSE;
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp13_ = focused_row;
	_tmp14_ = g_object_get_data ((GObject*) _tmp13_, "tool-actions-button");
	_tmp15_ = _g_object_ref0 ((GtkMenuButton*) _tmp14_);
	actions_button = _tmp15_;
	_tmp18_ = actions_button;
	if (_tmp18_ != NULL) {
		GtkWidget* _tmp19_;
		_tmp19_ = focused;
		_tmp17_ = _tmp19_ != NULL;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		gboolean _tmp20_ = FALSE;
		GtkWidget* _tmp21_;
		GtkMenuButton* _tmp22_;
		_tmp21_ = focused;
		_tmp22_ = actions_button;
		if (_tmp21_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget)) {
			_tmp20_ = TRUE;
		} else {
			GtkWidget* _tmp23_;
			GtkMenuButton* _tmp24_;
			_tmp23_ = focused;
			_tmp24_ = actions_button;
			_tmp20_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_menu_button_get_type (), GtkMenuButton));
		}
		_tmp16_ = _tmp20_;
	} else {
		_tmp16_ = FALSE;
	}
	in_header_actions = _tmp16_;
	if (in_header_actions) {
		AdwExpanderRow* _tmp25_;
		GtkMenuButton* _tmp26_;
		_tmp25_ = focused_row;
		_tmp26_ = actions_button;
		result = proton_plus_widgets_tools_group_box_focus_from_header_actions (self, _tmp25_, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_menu_button_get_type (), GtkMenuButton), direction);
		_g_object_unref0 (actions_button);
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT) {
		GtkMenuButton* _tmp32_;
		_tmp32_ = actions_button;
		_tmp31_ = _tmp32_ != NULL;
	} else {
		_tmp31_ = FALSE;
	}
	if (_tmp31_) {
		GtkMenuButton* _tmp33_;
		_tmp33_ = actions_button;
		_tmp30_ = gtk_widget_get_mapped ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_menu_button_get_type (), GtkMenuButton));
	} else {
		_tmp30_ = FALSE;
	}
	if (_tmp30_) {
		GtkMenuButton* _tmp34_;
		_tmp34_ = actions_button;
		_tmp29_ = gtk_widget_is_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_menu_button_get_type (), GtkMenuButton));
	} else {
		_tmp29_ = FALSE;
	}
	if (_tmp29_) {
		GtkMenuButton* _tmp35_;
		_tmp35_ = actions_button;
		_tmp28_ = gtk_widget_is_sensitive ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, gtk_menu_button_get_type (), GtkMenuButton));
	} else {
		_tmp28_ = FALSE;
	}
	if (_tmp28_) {
		GtkMenuButton* _tmp36_;
		_tmp36_ = actions_button;
		_tmp27_ = gtk_widget_get_can_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_menu_button_get_type (), GtkMenuButton));
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		GtkMenuButton* _tmp37_;
		_tmp37_ = actions_button;
		result = gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_menu_button_get_type (), GtkMenuButton));
		_g_object_unref0 (actions_button);
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		AdwExpanderRow* _tmp38_;
		gboolean _tmp39_;
		gboolean _tmp40_;
		_tmp38_ = focused_row;
		_tmp39_ = adw_expander_row_get_expanded (_tmp38_);
		_tmp40_ = _tmp39_;
		if (_tmp40_) {
			AdwExpanderRow* _tmp41_;
			_tmp41_ = focused_row;
			adw_expander_row_set_expanded (_tmp41_, FALSE);
		}
		result = TRUE;
		_g_object_unref0 (actions_button);
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		AdwExpanderRow* _tmp44_;
		AdwExpanderRow* _tmp45_;
		_tmp44_ = focused_row;
		_tmp45_ = self->priv->expanded_row;
		_tmp43_ = _tmp44_ == _tmp45_;
	} else {
		_tmp43_ = FALSE;
	}
	if (_tmp43_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp46_;
		_tmp46_ = self->priv->releases_section;
		_tmp42_ = _tmp46_ != NULL;
	} else {
		_tmp42_ = FALSE;
	}
	if (_tmp42_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp47_;
		_tmp47_ = self->priv->releases_section;
		result = proton_plus_widgets_tools_releases_box_focus_first_controller_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox));
		_g_object_unref0 (actions_button);
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		_tmp48_ = TRUE;
	} else {
		_tmp48_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN;
	}
	if (_tmp48_) {
		AdwExpanderRow* adjacent = NULL;
		AdwExpanderRow* _tmp49_;
		AdwExpanderRow* _tmp50_;
		AdwExpanderRow* _tmp51_;
		_tmp49_ = focused_row;
		_tmp50_ = proton_plus_widgets_tools_group_box_find_adjacent_visible_row (self, _tmp49_, direction);
		adjacent = _tmp50_;
		_tmp51_ = adjacent;
		if (_tmp51_ != NULL) {
			AdwExpanderRow* _tmp52_;
			_tmp52_ = adjacent;
			result = gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, adw_expander_row_get_type (), AdwExpanderRow));
			_g_object_unref0 (adjacent);
			_g_object_unref0 (actions_button);
			_g_object_unref0 (focused_row);
			_g_object_unref0 (focused);
			return result;
		}
		_g_object_unref0 (adjacent);
	}
	if (direction != PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		_tmp53_ = TRUE;
	} else {
		AdwExpanderRow* _tmp54_;
		GtkListBoxRow* _tmp55_;
		GtkListBoxRow* _tmp56_;
		_tmp54_ = focused_row;
		_tmp55_ = proton_plus_widgets_tools_group_box_find_first_visible_row (self);
		_tmp56_ = _tmp55_;
		_tmp53_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_list_box_row_get_type (), GtkListBoxRow) != _tmp56_;
		_g_object_unref0 (_tmp56_);
	}
	if (_tmp53_) {
		result = FALSE;
		_g_object_unref0 (actions_button);
		_g_object_unref0 (focused_row);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp61_ = self->priv->controller_up_target;
	if (_tmp61_ != NULL) {
		GtkWidget* _tmp62_;
		_tmp62_ = self->priv->controller_up_target;
		_tmp60_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp60_ = FALSE;
	}
	if (_tmp60_) {
		GtkWidget* _tmp63_;
		_tmp63_ = self->priv->controller_up_target;
		_tmp59_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp59_ = FALSE;
	}
	if (_tmp59_) {
		GtkWidget* _tmp64_;
		_tmp64_ = self->priv->controller_up_target;
		_tmp58_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp58_ = FALSE;
	}
	if (_tmp58_) {
		GtkWidget* _tmp65_;
		_tmp65_ = self->priv->controller_up_target;
		_tmp57_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp57_ = FALSE;
	}
	result = _tmp57_;
	_g_object_unref0 (actions_button);
	_g_object_unref0 (focused_row);
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_tools_group_box_focus_from_header_actions (ProtonPlusWidgetsToolsGroupBox* self,
                                                               AdwExpanderRow* row,
                                                               GtkMenuButton* actions_button,
                                                               ProtonPlusUtilsControllerNavigationDirection direction)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp5_ = FALSE;
	AdwExpanderRow* adjacent = NULL;
	AdwExpanderRow* _tmp6_;
	AdwExpanderRow* _tmp7_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (row != NULL, FALSE);
	g_return_val_if_fail (actions_button != NULL, FALSE);
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		result = gtk_widget_grab_focus ((GtkWidget*) row);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT) {
		result = gtk_widget_grab_focus ((GtkWidget*) actions_button);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		AdwExpanderRow* _tmp2_;
		_tmp2_ = self->priv->expanded_row;
		_tmp1_ = row == _tmp2_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp3_;
		_tmp3_ = self->priv->releases_section;
		_tmp0_ = _tmp3_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp4_;
		_tmp4_ = self->priv->releases_section;
		result = proton_plus_widgets_tools_releases_box_focus_first_controller_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox));
		return result;
	}
	if (direction != PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		_tmp5_ = direction != PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		result = FALSE;
		return result;
	}
	_tmp6_ = proton_plus_widgets_tools_group_box_find_adjacent_visible_row (self, row, direction);
	adjacent = _tmp6_;
	_tmp7_ = adjacent;
	if (_tmp7_ != NULL) {
		AdwExpanderRow* _tmp8_;
		_tmp8_ = adjacent;
		result = gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, adw_expander_row_get_type (), AdwExpanderRow));
		_g_object_unref0 (adjacent);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		GtkWidget* _tmp14_;
		_tmp14_ = self->priv->controller_up_target;
		_tmp13_ = _tmp14_ != NULL;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		GtkWidget* _tmp15_;
		_tmp15_ = self->priv->controller_up_target;
		_tmp12_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		GtkWidget* _tmp16_;
		_tmp16_ = self->priv->controller_up_target;
		_tmp11_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		GtkWidget* _tmp17_;
		_tmp17_ = self->priv->controller_up_target;
		_tmp10_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		GtkWidget* _tmp18_;
		_tmp18_ = self->priv->controller_up_target;
		_tmp9_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp9_ = FALSE;
	}
	result = _tmp9_;
	_g_object_unref0 (adjacent);
	return result;
}

static gboolean
proton_plus_widgets_tools_group_box_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                              GObject* focused_object)
{
	ProtonPlusWidgetsToolsGroupBox * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* header_action = NULL;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp6_;
	AdwExpanderRow* row = NULL;
	GtkWidget* _tmp8_;
	AdwExpanderRow* _tmp9_;
	AdwExpanderRow* _tmp10_;
	GtkMenuButton* actions_button = NULL;
	AdwExpanderRow* _tmp11_;
	gconstpointer _tmp12_;
	GtkMenuButton* _tmp13_;
	gboolean _tmp14_ = FALSE;
	GtkMenuButton* _tmp15_;
	AdwExpanderRow* _tmp22_;
	AdwExpanderRow* _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsGroupBox*) base;
	g_return_val_if_fail (focused_object != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (focused_object, gtk_widget_get_type ()) ? ((GtkWidget*) focused_object) : NULL);
	focused = _tmp0_;
	_tmp1_ = focused;
	if (_tmp1_ == NULL) {
		result = FALSE;
		_g_object_unref0 (focused);
		return result;
	}
	_tmp2_ = focused;
	_tmp3_ = proton_plus_widgets_tools_group_box_find_header_action_ancestor (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	header_action = _tmp3_;
	_tmp4_ = header_action;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_menu_button_get_type ())) {
		GtkWidget* _tmp5_;
		_tmp5_ = header_action;
		gtk_menu_button_popup (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_menu_button_get_type (), GtkMenuButton));
		result = TRUE;
		_g_object_unref0 (header_action);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp6_ = header_action;
	if (_tmp6_ != NULL) {
		GtkWidget* _tmp7_;
		_tmp7_ = header_action;
		result = gtk_widget_activate (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (header_action);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp8_ = focused;
	_tmp9_ = proton_plus_widgets_tools_group_box_find_expander_row_ancestor (self, _tmp8_);
	row = _tmp9_;
	_tmp10_ = row;
	if (_tmp10_ == NULL) {
		result = FALSE;
		_g_object_unref0 (row);
		_g_object_unref0 (header_action);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp11_ = row;
	_tmp12_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, adw_expander_row_get_type (), AdwExpanderRow), "tool-actions-button");
	_tmp13_ = _g_object_ref0 ((GtkMenuButton*) _tmp12_);
	actions_button = _tmp13_;
	_tmp15_ = actions_button;
	if (_tmp15_ != NULL) {
		gboolean _tmp16_ = FALSE;
		GtkWidget* _tmp17_;
		GtkMenuButton* _tmp18_;
		_tmp17_ = focused;
		_tmp18_ = actions_button;
		if (_tmp17_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget)) {
			_tmp16_ = TRUE;
		} else {
			GtkWidget* _tmp19_;
			GtkMenuButton* _tmp20_;
			_tmp19_ = focused;
			_tmp20_ = actions_button;
			_tmp16_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_menu_button_get_type (), GtkMenuButton));
		}
		_tmp14_ = _tmp16_;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		GtkMenuButton* _tmp21_;
		_tmp21_ = actions_button;
		gtk_menu_button_popup (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_menu_button_get_type (), GtkMenuButton));
		result = TRUE;
		_g_object_unref0 (actions_button);
		_g_object_unref0 (row);
		_g_object_unref0 (header_action);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp22_ = row;
	_tmp23_ = row;
	_tmp24_ = adw_expander_row_get_expanded (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, adw_expander_row_get_type (), AdwExpanderRow));
	_tmp25_ = _tmp24_;
	adw_expander_row_set_expanded (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, adw_expander_row_get_type (), AdwExpanderRow), !_tmp25_);
	result = TRUE;
	_g_object_unref0 (actions_button);
	_g_object_unref0 (row);
	_g_object_unref0 (header_action);
	_g_object_unref0 (focused);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_group_box_find_header_action_ancestor (ProtonPlusWidgetsToolsGroupBox* self,
                                                                 GtkWidget* focused)
{
	GtkWidget* current = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (focused != NULL, NULL);
	_tmp0_ = _g_object_ref0 (focused);
	current = _tmp0_;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		GtkBox* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp2_ = current;
		if (_tmp2_ != NULL) {
			GtkWidget* _tmp3_;
			GtkBox* _tmp4_;
			_tmp3_ = current;
			_tmp4_ = self->priv->_header_actions;
			_tmp1_ = _tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget);
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp5_ = current;
		_tmp6_ = gtk_widget_get_parent (_tmp5_);
		_tmp7_ = self->priv->_header_actions;
		if (_tmp6_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)) {
			result = current;
			return result;
		}
		_tmp8_ = current;
		_tmp9_ = gtk_widget_get_parent (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (current);
		current = _tmp10_;
	}
	result = NULL;
	_g_object_unref0 (current);
	return result;
}

static AdwExpanderRow*
proton_plus_widgets_tools_group_box_find_adjacent_visible_row (ProtonPlusWidgetsToolsGroupBox* self,
                                                               AdwExpanderRow* row,
                                                               ProtonPlusUtilsControllerNavigationDirection direction)
{
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* child = NULL;
	GtkWidget* _tmp3_;
	AdwExpanderRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (row != NULL, NULL);
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		GtkWidget* _tmp1_;
		_tmp1_ = gtk_widget_get_prev_sibling ((GtkWidget*) row);
		_tmp0_ = _tmp1_;
	} else {
		GtkWidget* _tmp2_;
		_tmp2_ = gtk_widget_get_next_sibling ((GtkWidget*) row);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = _g_object_ref0 (_tmp0_);
	child = _tmp3_;
	while (TRUE) {
		GtkWidget* _tmp4_;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		gboolean _tmp9_ = FALSE;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp18_ = NULL;
		GtkWidget* _tmp23_;
		_tmp4_ = child;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp10_ = child;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, adw_expander_row_get_type ())) {
			GtkWidget* _tmp11_;
			_tmp11_ = child;
			_tmp9_ = gtk_widget_get_mapped (_tmp11_);
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			GtkWidget* _tmp12_;
			_tmp12_ = child;
			_tmp8_ = gtk_widget_is_visible (_tmp12_);
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			GtkWidget* _tmp13_;
			_tmp13_ = child;
			_tmp7_ = gtk_widget_get_child_visible (_tmp13_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GtkWidget* _tmp14_;
			_tmp14_ = child;
			_tmp6_ = gtk_widget_is_sensitive (_tmp14_);
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkWidget* _tmp15_;
			_tmp15_ = child;
			_tmp5_ = gtk_widget_get_focusable (_tmp15_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp16_;
			AdwExpanderRow* _tmp17_;
			_tmp16_ = child;
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, adw_expander_row_get_type (), AdwExpanderRow));
			result = _tmp17_;
			_g_object_unref0 (child);
			return result;
		}
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
			GtkWidget* _tmp19_;
			GtkWidget* _tmp20_;
			_tmp19_ = child;
			_tmp20_ = gtk_widget_get_prev_sibling (_tmp19_);
			_tmp18_ = _tmp20_;
		} else {
			GtkWidget* _tmp21_;
			GtkWidget* _tmp22_;
			_tmp21_ = child;
			_tmp22_ = gtk_widget_get_next_sibling (_tmp21_);
			_tmp18_ = _tmp22_;
		}
		_tmp23_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (child);
		child = _tmp23_;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static AdwExpanderRow*
proton_plus_widgets_tools_group_box_find_expander_row_ancestor (ProtonPlusWidgetsToolsGroupBox* self,
                                                                GtkWidget* widget)
{
	GtkWidget* current = NULL;
	GtkWidget* _tmp0_;
	AdwExpanderRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = _g_object_ref0 (widget);
	current = _tmp0_;
	while (TRUE) {
		gboolean _tmp1_ = FALSE;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp2_ = current;
		if (_tmp2_ != NULL) {
			GtkWidget* _tmp3_;
			GtkListBox* _tmp4_;
			_tmp3_ = current;
			_tmp4_ = self->priv->list_box;
			_tmp1_ = _tmp3_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget);
		} else {
			_tmp1_ = FALSE;
		}
		if (!_tmp1_) {
			break;
		}
		_tmp5_ = current;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, adw_expander_row_get_type ())) {
			GtkWidget* _tmp6_;
			AdwExpanderRow* _tmp7_;
			_tmp6_ = current;
			_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, adw_expander_row_get_type (), AdwExpanderRow));
			result = _tmp7_;
			_g_object_unref0 (current);
			return result;
		}
		_tmp8_ = current;
		_tmp9_ = gtk_widget_get_parent (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (current);
		current = _tmp10_;
	}
	result = NULL;
	_g_object_unref0 (current);
	return result;
}

static GtkListBoxRow*
proton_plus_widgets_tools_group_box_find_first_visible_row (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkListBoxRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp17_;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp9_ = child;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, gtk_list_box_row_get_type ())) {
			GtkWidget* _tmp10_;
			_tmp10_ = child;
			_tmp8_ = gtk_widget_get_mapped (_tmp10_);
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			GtkWidget* _tmp11_;
			_tmp11_ = child;
			_tmp7_ = gtk_widget_is_visible (_tmp11_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GtkWidget* _tmp12_;
			_tmp12_ = child;
			_tmp6_ = gtk_widget_get_child_visible (_tmp12_);
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkWidget* _tmp13_;
			_tmp13_ = child;
			_tmp5_ = gtk_widget_is_sensitive (_tmp13_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp14_;
			_tmp14_ = child;
			_tmp4_ = gtk_widget_get_focusable (_tmp14_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GtkWidget* _tmp15_;
			GtkListBoxRow* _tmp16_;
			_tmp15_ = child;
			_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_list_box_row_get_type (), GtkListBoxRow));
			result = _tmp16_;
			_g_object_unref0 (child);
			return result;
		}
		_tmp17_ = child;
		_tmp18_ = gtk_widget_get_next_sibling (_tmp17_);
		_tmp19_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (child);
		child = _tmp19_;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

GObject*
proton_plus_widgets_tools_group_box_get_controller_initial_focus (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkListBoxRow* row = NULL;
	GtkListBoxRow* _tmp0_;
	GtkListBoxRow* _tmp1_;
	GtkButton* _tmp2_ = NULL;
	GtkButton* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GObject* _tmp7_;
	GObject* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_group_box_find_first_visible_row (self);
	row = _tmp0_;
	_tmp1_ = row;
	if (_tmp1_ != NULL) {
		result = (GObject*) row;
		return result;
	}
	_tmp3_ = self->priv->empty_action_button;
	_tmp4_ = gtk_widget_get_visible ((GtkWidget*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_) {
		GtkButton* _tmp6_;
		_tmp6_ = self->priv->empty_action_button;
		_tmp2_ = _tmp6_;
	} else {
		_tmp2_ = NULL;
	}
	_tmp7_ = _g_object_ref0 ((GObject*) _tmp2_);
	result = _tmp7_;
	_g_object_unref0 (row);
	return result;
}

void
proton_plus_widgets_tools_group_box_clear_header_actions (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkWidget* child = NULL;
	g_return_if_fail (self != NULL);
	while (TRUE) {
		GtkBox* _tmp0_;
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		GtkBox* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp0_ = self->priv->_header_actions;
		_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
		_tmp2_ = _g_object_ref0 (_tmp1_);
		_g_object_unref0 (child);
		child = _tmp2_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = self->priv->_header_actions;
		_tmp5_ = child;
		gtk_box_remove (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	}
	_g_object_unref0 (child);
}

void
proton_plus_widgets_tools_group_box_populate_header_actions (ProtonPlusWidgetsToolsGroupBox* self,
                                                             GtkWidget* refresh,
                                                             GtkWidget* filter,
                                                             GtkWidget* search)
{
	GtkBox* _tmp0_;
	GtkBox* _tmp1_;
	GtkBox* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (refresh != NULL);
	g_return_if_fail (filter != NULL);
	g_return_if_fail (search != NULL);
	proton_plus_widgets_tools_group_box_clear_header_actions (self);
	_tmp0_ = self->priv->_header_actions;
	gtk_box_append (_tmp0_, refresh);
	_tmp1_ = self->priv->_header_actions;
	gtk_box_append (_tmp1_, filter);
	_tmp2_ = self->priv->_header_actions;
	gtk_box_append (_tmp2_, search);
}

static void
proton_plus_widgets_tools_group_box_update_status_page (ProtonPlusWidgetsToolsGroupBox* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	GtkButton* _tmp10_;
	ProtonPlusWidgetsToolsFilter _tmp11_;
	ProtonPlusWidgetsToolsFilter _tmp12_;
	ProtonPlusWidgetsToolsFilter _tmp13_;
	ProtonPlusWidgetsToolsFilter _tmp14_;
	ProtonPlusWidgetsToolsFilter _tmp16_;
	ProtonPlusWidgetsToolsFilter _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_group_box_get_search_text (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_strip (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strcmp0 (_tmp3_, "") != 0;
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		AdwStatusPage* _tmp5_;
		AdwStatusPage* _tmp6_;
		AdwStatusPage* _tmp7_;
		GtkButton* _tmp8_;
		GtkButton* _tmp9_;
		_tmp5_ = self->priv->status_page;
		adw_status_page_set_title (_tmp5_, _ ("No matching tools"));
		_tmp6_ = self->priv->status_page;
		adw_status_page_set_description (_tmp6_, _ ("Try a different search term or clear the search."));
		_tmp7_ = self->priv->status_page;
		adw_status_page_set_icon_name (_tmp7_, "edit-find-symbolic");
		_tmp8_ = self->priv->empty_action_button;
		gtk_button_set_label (_tmp8_, _ ("Clear Search"));
		_tmp9_ = self->priv->empty_action_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE);
		return;
	}
	_tmp10_ = self->priv->empty_action_button;
	_tmp11_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp12_ = _tmp11_;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, _tmp12_ != PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL);
	_tmp13_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp14_ = _tmp13_;
	if (_tmp14_ != PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
		GtkButton* _tmp15_;
		_tmp15_ = self->priv->empty_action_button;
		gtk_button_set_label (_tmp15_, _ ("Reset Filters"));
	}
	_tmp16_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp17_ = _tmp16_;
	switch (_tmp17_) {
		case PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED:
		{
			AdwStatusPage* _tmp18_;
			AdwStatusPage* _tmp19_;
			AdwStatusPage* _tmp20_;
			_tmp18_ = self->priv->status_page;
			adw_status_page_set_title (_tmp18_, _ ("No installed tools"));
			_tmp19_ = self->priv->status_page;
			adw_status_page_set_description (_tmp19_, _ ("Install a compatibility tool to see it here."));
			_tmp20_ = self->priv->status_page;
			adw_status_page_set_icon_name (_tmp20_, "box-open-symbolic");
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED:
		{
			AdwStatusPage* _tmp21_;
			AdwStatusPage* _tmp22_;
			AdwStatusPage* _tmp23_;
			_tmp21_ = self->priv->status_page;
			adw_status_page_set_title (_tmp21_, _ ("No tools in use"));
			_tmp22_ = self->priv->status_page;
			adw_status_page_set_description (_tmp22_, _ ("No games currently use a tool from this group."));
			_tmp23_ = self->priv->status_page;
			adw_status_page_set_icon_name (_tmp23_, "gamepad2-symbolic");
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED:
		{
			AdwStatusPage* _tmp24_;
			AdwStatusPage* _tmp25_;
			AdwStatusPage* _tmp26_;
			_tmp24_ = self->priv->status_page;
			adw_status_page_set_title (_tmp24_, _ ("No unused tools"));
			_tmp25_ = self->priv->status_page;
			adw_status_page_set_description (_tmp25_, _ ("Every tool in this group is currently in use."));
			_tmp26_ = self->priv->status_page;
			adw_status_page_set_icon_name (_tmp26_, "check-round-outline-symbolic");
			break;
		}
		default:
		{
			AdwStatusPage* _tmp27_;
			AdwStatusPage* _tmp28_;
			AdwStatusPage* _tmp29_;
			_tmp27_ = self->priv->status_page;
			adw_status_page_set_title (_tmp27_, _ ("No tools found"));
			_tmp28_ = self->priv->status_page;
			adw_status_page_set_description (_tmp28_, _ ("No tools are available in this group."));
			_tmp29_ = self->priv->status_page;
			adw_status_page_set_icon_name (_tmp29_, "edit-find-symbolic");
			break;
		}
	}
}

static void
proton_plus_widgets_tools_group_box_update_visibility (ProtonPlusWidgetsToolsGroupBox* self)
{
	gboolean has_visible = FALSE;
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	has_visible = FALSE;
	_tmp0_ = self->priv->list_box;
	_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 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_list_box_row_get_type ())) {
			GtkWidget* _tmp5_;
			_tmp5_ = child;
			if (proton_plus_widgets_tools_group_box_filter_func (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_list_box_row_get_type (), GtkListBoxRow))) {
				has_visible = TRUE;
				break;
			}
		}
		_tmp6_ = child;
		_tmp7_ = gtk_widget_get_next_sibling (_tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (child);
		child = _tmp8_;
	}
	if (has_visible) {
		GtkStack* _tmp9_;
		_tmp9_ = self->priv->stack;
		gtk_stack_set_visible_child_name (_tmp9_, "list");
	} else {
		GtkStack* _tmp10_;
		_tmp10_ = self->priv->stack;
		gtk_stack_set_visible_child_name (_tmp10_, "empty");
	}
	_g_object_unref0 (child);
}

void
proton_plus_widgets_tools_group_box_refresh (ProtonPlusWidgetsToolsGroupBox* self)
{
	guint _tmp0_;
	GtkListBox* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->visibility_change_generation;
	self->priv->visibility_change_generation = _tmp0_ + 1;
	proton_plus_widgets_tools_group_box_refresh_tool_state_metadata (self);
	_tmp1_ = self->priv->list_box;
	gtk_list_box_invalidate_filter (_tmp1_);
	_tmp2_ = self->priv->list_box;
	gtk_list_box_invalidate_sort (_tmp2_);
	proton_plus_widgets_tools_group_box_update_status_page (self);
	proton_plus_widgets_tools_group_box_update_visibility (self);
	proton_plus_widgets_tools_group_box_collapse_if_hidden (self);
	proton_plus_widgets_tools_group_box_update_release_section_boundary (self);
}

static void
proton_plus_widgets_tools_group_box_refresh_tool_state_metadata (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		AdwExpanderRow* row = NULL;
		GtkWidget* _tmp4_;
		AdwExpanderRow* _tmp5_;
		AdwExpanderRow* _tmp6_;
		GtkWidget* _tmp18_;
		GtkWidget* _tmp19_;
		GtkWidget* _tmp20_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, adw_expander_row_get_type ()) ? ((AdwExpanderRow*) _tmp4_) : NULL);
		row = _tmp5_;
		_tmp6_ = row;
		if (_tmp6_ != NULL) {
			ProtonPlusModelsTool* tool = NULL;
			AdwExpanderRow* _tmp7_;
			gconstpointer _tmp8_;
			ProtonPlusModelsTool* _tmp9_;
			GtkLabel* state_label = NULL;
			AdwExpanderRow* _tmp10_;
			gconstpointer _tmp11_;
			GtkLabel* _tmp12_;
			gboolean _tmp13_ = FALSE;
			ProtonPlusModelsTool* _tmp14_;
			_tmp7_ = row;
			_tmp8_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, adw_expander_row_get_type (), AdwExpanderRow), "tool");
			_tmp9_ = _g_object_ref0 ((ProtonPlusModelsTool*) _tmp8_);
			tool = _tmp9_;
			_tmp10_ = row;
			_tmp11_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, adw_expander_row_get_type (), AdwExpanderRow), "state-label");
			_tmp12_ = _g_object_ref0 ((GtkLabel*) _tmp11_);
			state_label = _tmp12_;
			_tmp14_ = tool;
			if (_tmp14_ != NULL) {
				GtkLabel* _tmp15_;
				_tmp15_ = state_label;
				_tmp13_ = _tmp15_ != NULL;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				GtkLabel* _tmp16_;
				ProtonPlusModelsTool* _tmp17_;
				_tmp16_ = state_label;
				_tmp17_ = tool;
				proton_plus_widgets_tools_group_box_update_tool_state_metadata (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_label_get_type (), GtkLabel), _tmp17_);
			}
			_g_object_unref0 (state_label);
			_g_object_unref0 (tool);
		}
		_tmp18_ = child;
		_tmp19_ = gtk_widget_get_next_sibling (_tmp18_);
		_tmp20_ = _g_object_ref0 (_tmp19_);
		_g_object_unref0 (child);
		child = _tmp20_;
		_g_object_unref0 (row);
	}
	_g_object_unref0 (child);
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		ProtonPlusWidgetsToolsGroupBox* self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->row);
		_g_object_unref0 (_data23_->tool);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static void
__lambda72_ (Block23Data* _data23_)
{
	ProtonPlusWidgetsToolsGroupBox* self;
	AdwExpanderRow* _tmp0_;
	self = _data23_->self;
	_tmp0_ = _data23_->row;
	proton_plus_widgets_tools_group_box_on_row_expanded_changed (self, _tmp0_, _data23_->tool);
}

static void
___lambda72__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda72_ (self);
}

static AdwExpanderRow*
proton_plus_widgets_tools_group_box_create_tool_card (ProtonPlusWidgetsToolsGroupBox* self,
                                                      ProtonPlusModelsTool* tool)
{
	Block23Data* _data23_;
	ProtonPlusModelsTool* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	AdwExpanderRow* _tmp3_ = NULL;
	AdwExpanderRow* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	AdwExpanderRow* _tmp11_;
	GtkLabel* title_label = NULL;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	GtkLabel* _tmp14_ = NULL;
	GtkLabel* description_label = NULL;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkLabel* _tmp20_ = NULL;
	GtkBox* metadata_box = NULL;
	GtkBox* _tmp21_ = NULL;
	GtkBox* text_box = NULL;
	GtkBox* _tmp22_ = NULL;
	GtkBox* _tmp23_;
	GtkLabel* _tmp24_;
	GtkBox* _tmp25_;
	GtkLabel* _tmp26_;
	GtkBox* _tmp27_;
	GtkBox* _tmp28_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp29_ = NULL;
	GtkBox* _tmp30_;
	GtkBox* _tmp31_;
	AdwExpanderRow* _tmp32_;
	GtkBox* _tmp33_;
	GtkMenuButton* actions_button = NULL;
	gchar* _tmp34_;
	gchar* _tmp35_;
	GtkMenuButton* _tmp36_ = NULL;
	GtkMenuButton* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	AdwExpanderRow* _tmp42_;
	GtkMenuButton* _tmp43_;
	GtkMenuButton* _tmp44_;
	GtkBox* actions_header_host = NULL;
	GtkBox* _tmp45_ = NULL;
	GtkBox* _tmp46_;
	GtkMenuButton* _tmp47_;
	AdwExpanderRow* _tmp48_;
	GtkBox* _tmp49_;
	GtkBox* _tmp50_;
	AdwExpanderRow* _tmp51_;
	GtkBox* _tmp52_;
	GtkBox* release_host = NULL;
	GtkBox* _tmp53_;
	AdwExpanderRow* _tmp54_;
	GtkBox* _tmp55_;
	GtkBox* _tmp56_;
	AdwExpanderRow* _tmp57_;
	GtkBox* _tmp58_;
	AdwExpanderRow* _tmp59_;
	GtkLabel* state_label = NULL;
	gchar* _tmp89_;
	gchar** _tmp90_;
	GtkLabel* _tmp91_ = NULL;
	AdwExpanderRow* _tmp92_;
	GtkLabel* _tmp93_;
	GtkBox* _tmp94_;
	AdwExpanderRow* _tmp95_;
	AdwExpanderRow* _tmp96_;
	AdwExpanderRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (tool != NULL, NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (tool);
	_g_object_unref0 (_data23_->tool);
	_data23_->tool = _tmp0_;
	_tmp1_ = g_strdup ("");
	_tmp2_ = g_strdup ("");
	_tmp3_ = (AdwExpanderRow*) adw_expander_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp3_, _tmp1_);
	_g_free0 (_tmp1_);
	adw_expander_row_set_subtitle (_tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_data23_->row = _tmp3_;
	_tmp4_ = _data23_->row;
	_tmp5_ = proton_plus_models_tool_get_title (_data23_->tool);
	_tmp6_ = _tmp5_;
	_tmp7_ = proton_plus_models_tool_get_description (_data23_->tool);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf ("%s. %s", _tmp6_, _tmp8_);
	_tmp10_ = _tmp9_;
	gtk_accessible_update_property ((GtkAccessible*) _tmp4_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp10_, -1, -1);
	_g_free0 (_tmp10_);
	_tmp11_ = _data23_->row;
	proton_plus_widgets_tools_group_box_update_expanded_accessibility (self, _tmp11_);
	_tmp12_ = proton_plus_models_tool_get_title (_data23_->tool);
	_tmp13_ = _tmp12_;
	_tmp14_ = (GtkLabel*) gtk_label_new (_tmp13_);
	gtk_widget_set_halign ((GtkWidget*) _tmp14_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp14_, 0.0f);
	gtk_label_set_ellipsize (_tmp14_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp14_);
	title_label = _tmp14_;
	_tmp15_ = proton_plus_models_tool_get_description (_data23_->tool);
	_tmp16_ = _tmp15_;
	_tmp17_ = g_strdup ("subtitle");
	_tmp18_ = g_strdup ("dim-label");
	_tmp19_ = g_new0 (gchar*, 2 + 1);
	_tmp19_[0] = _tmp17_;
	_tmp19_[1] = _tmp18_;
	_tmp20_ = (GtkLabel*) gtk_label_new (_tmp16_);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_START);
	gtk_label_set_xalign (_tmp20_, 0.0f);
	gtk_label_set_wrap (_tmp20_, TRUE);
	gtk_label_set_wrap_mode (_tmp20_, PANGO_WRAP_WORD_CHAR);
	gtk_label_set_lines (_tmp20_, 2);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp20_);
	description_label = _tmp20_;
	_tmp21_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp21_, GTK_ALIGN_START);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp21_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp21_, 4);
	g_object_ref_sink (_tmp21_);
	metadata_box = _tmp21_;
	_tmp22_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp22_, TRUE);
	g_object_ref_sink (_tmp22_);
	text_box = _tmp22_;
	_tmp23_ = text_box;
	_tmp24_ = title_label;
	gtk_box_append (_tmp23_, (GtkWidget*) _tmp24_);
	_tmp25_ = text_box;
	_tmp26_ = description_label;
	gtk_box_append (_tmp25_, (GtkWidget*) _tmp26_);
	_tmp27_ = text_box;
	_tmp28_ = metadata_box;
	gtk_box_append (_tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp29_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp29_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp29_, 8);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp29_, 8);
	g_object_ref_sink (_tmp29_);
	content_box = _tmp29_;
	_tmp30_ = content_box;
	_tmp31_ = text_box;
	gtk_box_append (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = _data23_->row;
	_tmp33_ = content_box;
	adw_expander_row_add_prefix (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = g_strdup ("view-more-symbolic");
	_tmp35_ = g_strdup (_ ("Tool Actions"));
	_tmp36_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_icon_name (_tmp36_, _tmp34_);
	_g_free0 (_tmp34_);
	gtk_widget_set_valign ((GtkWidget*) _tmp36_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp36_, FALSE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp36_, _tmp35_);
	_g_free0 (_tmp35_);
	g_object_ref_sink (_tmp36_);
	actions_button = _tmp36_;
	_tmp37_ = actions_button;
	_tmp38_ = proton_plus_models_tool_get_title (_data23_->tool);
	_tmp39_ = _tmp38_;
	_tmp40_ = g_strdup_printf ("%s — %s", _ ("Tool Actions"), _tmp39_);
	_tmp41_ = _tmp40_;
	gtk_accessible_update_property ((GtkAccessible*) _tmp37_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp41_, -1, -1);
	_g_free0 (_tmp41_);
	_tmp42_ = _data23_->row;
	_tmp43_ = actions_button;
	_tmp44_ = _g_object_ref0 (_tmp43_);
	g_object_set_data_full ((GObject*) _tmp42_, "tool-actions-button", _tmp44_, g_object_unref);
	_tmp45_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_visible ((GtkWidget*) _tmp45_, FALSE);
	gtk_widget_set_valign ((GtkWidget*) _tmp45_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp45_);
	actions_header_host = _tmp45_;
	_tmp46_ = actions_header_host;
	_tmp47_ = actions_button;
	gtk_box_append (_tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = _data23_->row;
	_tmp49_ = actions_header_host;
	_tmp50_ = _g_object_ref0 (_tmp49_);
	g_object_set_data_full ((GObject*) _tmp48_, "tool-actions-header-host", _tmp50_, g_object_unref);
	_tmp51_ = _data23_->row;
	_tmp52_ = actions_header_host;
	adw_expander_row_add_suffix (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp53_);
	release_host = _tmp53_;
	_tmp54_ = _data23_->row;
	_tmp55_ = release_host;
	_tmp56_ = _g_object_ref0 (_tmp55_);
	g_object_set_data_full ((GObject*) _tmp54_, "inline-release-host", _tmp56_, g_object_unref);
	_tmp57_ = _data23_->row;
	_tmp58_ = release_host;
	adw_expander_row_add_row (_tmp57_, (GtkWidget*) _tmp58_);
	_tmp59_ = _data23_->row;
	g_signal_connect_data ((GObject*) _tmp59_, "notify::expanded", (GCallback) ___lambda72__g_object_notify, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
	if (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_data23_->tool)) {
		ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
		ProtonPlusModelsToolsProviderTool* _tmp60_;
		gboolean _tmp61_ = FALSE;
		ProtonPlusModelsToolsProviderTool* _tmp62_;
		gchar* _tmp63_;
		gchar* _tmp64_;
		gchar* _tmp65_;
		gboolean _tmp66_;
		_tmp60_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data23_->tool, PROTON_PLUS_MODELS_TOOLS_TYPE_PROVIDER_TOOL, ProtonPlusModelsToolsProviderTool));
		provider_tool = _tmp60_;
		_tmp62_ = provider_tool;
		_tmp63_ = proton_plus_models_tools_provider_tool_get_tag (_tmp62_);
		_tmp64_ = _tmp63_;
		_tmp65_ = _tmp64_;
		_tmp66_ = _tmp65_ != NULL;
		_g_free0 (_tmp65_);
		if (_tmp66_) {
			ProtonPlusModelsToolsProviderTool* _tmp67_;
			gchar* _tmp68_;
			gchar* _tmp69_;
			gchar* _tmp70_;
			_tmp67_ = provider_tool;
			_tmp68_ = proton_plus_models_tools_provider_tool_get_tag (_tmp67_);
			_tmp69_ = _tmp68_;
			_tmp70_ = _tmp69_;
			_tmp61_ = g_strcmp0 (_tmp70_, "") != 0;
			_g_free0 (_tmp70_);
		} else {
			_tmp61_ = FALSE;
		}
		if (_tmp61_) {
			GtkLabel* tag_label = NULL;
			ProtonPlusModelsToolsProviderTool* _tmp71_;
			gchar* _tmp72_;
			gchar* _tmp73_;
			gchar* _tmp74_;
			gchar* _tmp75_;
			gchar* _tmp76_;
			gchar* _tmp77_;
			gchar** _tmp78_;
			GtkLabel* _tmp79_ = NULL;
			GtkLabel* _tmp80_;
			ProtonPlusModelsToolsProviderTool* _tmp81_;
			gchar* _tmp82_;
			gchar* _tmp83_;
			gchar* _tmp84_;
			gboolean _tmp85_;
			GtkBox* _tmp87_;
			GtkLabel* _tmp88_;
			_tmp71_ = provider_tool;
			_tmp72_ = proton_plus_models_tools_provider_tool_get_tag (_tmp71_);
			_tmp73_ = _tmp72_;
			_tmp74_ = _tmp73_;
			_tmp75_ = proton_plus_utils_safe_translate (_tmp74_);
			_tmp76_ = _tmp75_;
			_tmp77_ = g_strdup ("tool-metadata-pill");
			_tmp78_ = g_new0 (gchar*, 1 + 1);
			_tmp78_[0] = _tmp77_;
			_tmp79_ = (GtkLabel*) gtk_label_new (_tmp76_);
			gtk_widget_set_valign ((GtkWidget*) _tmp79_, GTK_ALIGN_CENTER);
			gtk_widget_set_css_classes ((GtkWidget*) _tmp79_, _tmp78_);
			_tmp78_ = (_vala_array_free (_tmp78_, 1, (GDestroyNotify) g_free), NULL);
			g_object_ref_sink (_tmp79_);
			_tmp80_ = _tmp79_;
			_g_free0 (_tmp76_);
			_g_free0 (_tmp74_);
			tag_label = _tmp80_;
			_tmp81_ = provider_tool;
			_tmp82_ = proton_plus_models_tools_provider_tool_get_tag (_tmp81_);
			_tmp83_ = _tmp82_;
			_tmp84_ = _tmp83_;
			_tmp85_ = g_strcmp0 (_tmp84_, "Recommended") == 0;
			_g_free0 (_tmp84_);
			if (_tmp85_) {
				GtkLabel* _tmp86_;
				_tmp86_ = tag_label;
				gtk_widget_set_tooltip_text ((GtkWidget*) _tmp86_, _ ("Recommended compatibility tool"));
			}
			_tmp87_ = metadata_box;
			_tmp88_ = tag_label;
			gtk_box_append (_tmp87_, (GtkWidget*) _tmp88_);
			_g_object_unref0 (tag_label);
		}
		_g_object_unref0 (provider_tool);
	}
	_tmp89_ = g_strdup ("tool-metadata-pill");
	_tmp90_ = g_new0 (gchar*, 1 + 1);
	_tmp90_[0] = _tmp89_;
	_tmp91_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_valign ((GtkWidget*) _tmp91_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp91_, _tmp90_);
	_tmp90_ = (_vala_array_free (_tmp90_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp91_);
	state_label = _tmp91_;
	_tmp92_ = _data23_->row;
	_tmp93_ = _g_object_ref0 (state_label);
	g_object_set_data_full ((GObject*) _tmp92_, "state-label", _tmp93_, g_object_unref);
	_tmp94_ = metadata_box;
	gtk_box_append (_tmp94_, (GtkWidget*) state_label);
	proton_plus_widgets_tools_group_box_update_tool_state_metadata (self, state_label, _data23_->tool);
	_tmp95_ = _data23_->row;
	_tmp96_ = _g_object_ref0 (_tmp95_);
	result = _tmp96_;
	_g_object_unref0 (state_label);
	_g_object_unref0 (release_host);
	_g_object_unref0 (actions_header_host);
	_g_object_unref0 (actions_button);
	_g_object_unref0 (content_box);
	_g_object_unref0 (text_box);
	_g_object_unref0 (metadata_box);
	_g_object_unref0 (description_label);
	_g_object_unref0 (title_label);
	block23_data_unref (_data23_);
	_data23_ = NULL;
	return result;
}

static void
proton_plus_widgets_tools_group_box_on_row_expanded_changed (ProtonPlusWidgetsToolsGroupBox* self,
                                                             AdwExpanderRow* row,
                                                             ProtonPlusModelsTool* tool)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (tool != NULL);
	proton_plus_widgets_tools_group_box_update_expanded_accessibility (self, row);
	if (self->priv->changing_expansion) {
		return;
	}
	_tmp0_ = adw_expander_row_get_expanded (row);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		gboolean _tmp2_ = FALSE;
		AdwExpanderRow* _tmp3_;
		AdwExpanderRow* _tmp5_;
		ProtonPlusModelsTool* _tmp6_;
		_tmp3_ = self->priv->expanded_row;
		if (_tmp3_ != NULL) {
			AdwExpanderRow* _tmp4_;
			_tmp4_ = self->priv->expanded_row;
			_tmp2_ = _tmp4_ != row;
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			proton_plus_widgets_tools_group_box_collapse_expanded_tool (self, FALSE);
		}
		_tmp5_ = _g_object_ref0 (row);
		_g_object_unref0 (self->priv->expanded_row);
		self->priv->expanded_row = _tmp5_;
		_tmp6_ = _g_object_ref0 (tool);
		_g_object_unref0 (self->priv->expanded_tool);
		self->priv->expanded_tool = _tmp6_;
		g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL], 0, tool, TRUE);
	} else {
		AdwExpanderRow* _tmp7_;
		_tmp7_ = self->priv->expanded_row;
		if (_tmp7_ == row) {
			GtkRoot* root = NULL;
			GtkRoot* _tmp8_;
			GtkRoot* _tmp9_;
			GtkRoot* _tmp10_ = NULL;
			GtkRoot* _tmp11_;
			GtkWidget* _tmp12_ = NULL;
			GtkWidget* focused = NULL;
			GtkWidget* _tmp14_;
			gboolean _tmp15_ = FALSE;
			gboolean _tmp16_ = FALSE;
			ProtonPlusWidgetsToolsReleasesBox* _tmp17_;
			gboolean focus_was_inside = FALSE;
			_tmp8_ = gtk_widget_get_root ((GtkWidget*) self);
			_tmp9_ = _g_object_ref0 (_tmp8_);
			root = _tmp9_;
			_tmp11_ = root;
			_tmp10_ = _tmp11_;
			_tmp12_ = NULL;
			if (_tmp10_ != NULL) {
				GtkWidget* _tmp13_;
				_tmp13_ = gtk_root_get_focus (_tmp10_);
				_tmp12_ = _tmp13_;
			}
			_tmp14_ = _g_object_ref0 (_tmp12_);
			focused = _tmp14_;
			_tmp17_ = self->priv->releases_section;
			if (_tmp17_ != NULL) {
				GtkWidget* _tmp18_;
				_tmp18_ = focused;
				_tmp16_ = _tmp18_ != NULL;
			} else {
				_tmp16_ = FALSE;
			}
			if (_tmp16_) {
				gboolean _tmp19_ = FALSE;
				GtkWidget* _tmp20_;
				ProtonPlusWidgetsToolsReleasesBox* _tmp21_;
				_tmp20_ = focused;
				_tmp21_ = self->priv->releases_section;
				if (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget) == G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget)) {
					_tmp19_ = TRUE;
				} else {
					GtkWidget* _tmp22_;
					ProtonPlusWidgetsToolsReleasesBox* _tmp23_;
					_tmp22_ = focused;
					_tmp23_ = self->priv->releases_section;
					_tmp19_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox));
				}
				_tmp15_ = _tmp19_;
			} else {
				_tmp15_ = FALSE;
			}
			focus_was_inside = _tmp15_;
			proton_plus_widgets_tools_group_box_detach_release_section (self);
			_g_object_unref0 (self->priv->expanded_row);
			self->priv->expanded_row = NULL;
			_g_object_unref0 (self->priv->expanded_tool);
			self->priv->expanded_tool = NULL;
			if (focus_was_inside) {
				gtk_widget_grab_focus ((GtkWidget*) row);
			}
			g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL], 0, tool, FALSE);
			_g_object_unref0 (focused);
			_g_object_unref0 (root);
		}
	}
}

static void
proton_plus_widgets_tools_group_box_update_expanded_accessibility (ProtonPlusWidgetsToolsGroupBox* self,
                                                                   AdwExpanderRow* row)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = adw_expander_row_get_expanded (row);
	_tmp1_ = _tmp0_;
	gtk_accessible_update_state ((GtkAccessible*) row, GTK_ACCESSIBLE_STATE_EXPANDED, _tmp1_, -1, -1);
}

gboolean
proton_plus_widgets_tools_group_box_contains_tool (ProtonPlusWidgetsToolsGroupBox* self,
                                                   ProtonPlusModelsTool* tool)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp0_ = self->priv->list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		gconstpointer _tmp5_;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "tool");
		if (((ProtonPlusModelsTool*) _tmp5_) == tool) {
			result = TRUE;
			_g_object_unref0 (child);
			return result;
		}
		_tmp6_ = child;
		_tmp7_ = gtk_widget_get_next_sibling (_tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (child);
		child = _tmp8_;
	}
	result = FALSE;
	_g_object_unref0 (child);
	return result;
}

gboolean
proton_plus_widgets_tools_group_box_is_expanded_tool (ProtonPlusWidgetsToolsGroupBox* self,
                                                      ProtonPlusModelsTool* tool)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusModelsTool* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp2_ = self->priv->expanded_tool;
	if (_tmp2_ == tool) {
		AdwExpanderRow* _tmp3_;
		_tmp3_ = self->priv->expanded_row;
		_tmp1_ = _tmp3_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		AdwExpanderRow* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = self->priv->expanded_row;
		_tmp5_ = adw_expander_row_get_expanded (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, adw_expander_row_get_type (), AdwExpanderRow));
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
proton_plus_widgets_tools_group_box_expand_tool (ProtonPlusWidgetsToolsGroupBox* self,
                                                 ProtonPlusModelsTool* tool)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp0_ = self->priv->list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		gboolean _tmp4_ = FALSE;
		GtkWidget* _tmp5_;
		gconstpointer _tmp6_;
		GtkWidget* _tmp19_;
		GtkWidget* _tmp20_;
		GtkWidget* _tmp21_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp5_ = child;
		_tmp6_ = g_object_get_data ((GObject*) _tmp5_, "tool");
		if (((ProtonPlusModelsTool*) _tmp6_) == tool) {
			GtkWidget* _tmp7_;
			_tmp7_ = child;
			_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, adw_expander_row_get_type ());
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			AdwExpanderRow* row = NULL;
			GtkWidget* _tmp8_;
			AdwExpanderRow* _tmp9_;
			AdwExpanderRow* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_tmp8_ = child;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, adw_expander_row_get_type (), AdwExpanderRow));
			row = _tmp9_;
			_tmp10_ = row;
			_tmp11_ = adw_expander_row_get_expanded (_tmp10_);
			_tmp12_ = _tmp11_;
			if (!_tmp12_) {
				AdwExpanderRow* _tmp13_;
				_tmp13_ = row;
				adw_expander_row_set_expanded (_tmp13_, TRUE);
			} else {
				AdwExpanderRow* _tmp14_;
				AdwExpanderRow* _tmp15_;
				_tmp14_ = self->priv->expanded_row;
				_tmp15_ = row;
				if (_tmp14_ != _tmp15_) {
					AdwExpanderRow* _tmp16_;
					AdwExpanderRow* _tmp17_;
					ProtonPlusModelsTool* _tmp18_;
					_tmp16_ = row;
					_tmp17_ = _g_object_ref0 (_tmp16_);
					_g_object_unref0 (self->priv->expanded_row);
					self->priv->expanded_row = _tmp17_;
					_tmp18_ = _g_object_ref0 (tool);
					_g_object_unref0 (self->priv->expanded_tool);
					self->priv->expanded_tool = _tmp18_;
					g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL], 0, tool, TRUE);
				}
			}
			result = TRUE;
			_g_object_unref0 (row);
			_g_object_unref0 (child);
			return result;
		}
		_tmp19_ = child;
		_tmp20_ = gtk_widget_get_next_sibling (_tmp19_);
		_tmp21_ = _g_object_ref0 (_tmp20_);
		_g_object_unref0 (child);
		child = _tmp21_;
	}
	result = FALSE;
	_g_object_unref0 (child);
	return result;
}

void
proton_plus_widgets_tools_group_box_attach_release_section (ProtonPlusWidgetsToolsGroupBox* self,
                                                            ProtonPlusModelsTool* tool,
                                                            ProtonPlusWidgetsToolsReleasesBox* section)
{
	gboolean _tmp0_ = FALSE;
	GtkBox* host = NULL;
	AdwExpanderRow* _tmp2_;
	gconstpointer _tmp3_;
	GtkBox* _tmp4_;
	GtkBox* _tmp5_;
	GtkBox* current_parent = NULL;
	GtkWidget* _tmp6_;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp10_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	GtkMenuButton* actions_button = NULL;
	AdwExpanderRow* _tmp14_;
	gconstpointer _tmp15_;
	GtkMenuButton* _tmp16_;
	GtkBox* actions_header_host = NULL;
	AdwExpanderRow* _tmp17_;
	gconstpointer _tmp18_;
	GtkBox* _tmp19_;
	gboolean _tmp20_ = FALSE;
	GtkMenuButton* _tmp21_;
	AdwExpanderRow* _tmp25_;
	AdwExpanderRow* _tmp26_;
	AdwExpanderRow* _tmp27_;
	AdwExpanderRow* _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	g_return_if_fail (section != NULL);
	if (!proton_plus_widgets_tools_group_box_is_expanded_tool (self, tool)) {
		_tmp0_ = TRUE;
	} else {
		AdwExpanderRow* _tmp1_;
		_tmp1_ = self->priv->expanded_row;
		_tmp0_ = _tmp1_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	proton_plus_widgets_tools_group_box_detach_release_section (self);
	_tmp2_ = self->priv->expanded_row;
	_tmp3_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, adw_expander_row_get_type (), AdwExpanderRow), "inline-release-host");
	_tmp4_ = _g_object_ref0 ((GtkBox*) _tmp3_);
	host = _tmp4_;
	_tmp5_ = host;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (host);
		return;
	}
	_tmp6_ = gtk_widget_get_parent ((GtkWidget*) section);
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_box_get_type ()) ? ((GtkBox*) _tmp6_) : NULL);
	current_parent = _tmp7_;
	_tmp8_ = current_parent;
	if (_tmp8_ != NULL) {
		GtkBox* _tmp9_;
		_tmp9_ = current_parent;
		gtk_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_box_get_type (), GtkBox), (GtkWidget*) section);
	}
	_tmp10_ = host;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_box_get_type (), GtkBox), (GtkWidget*) section);
	_tmp11_ = _g_object_ref0 (section);
	_g_object_unref0 (self->priv->releases_section);
	self->priv->releases_section = _tmp11_;
	_tmp12_ = host;
	_tmp13_ = _g_object_ref0 (_tmp12_);
	_g_object_unref0 (self->priv->releases_host);
	self->priv->releases_host = _tmp13_;
	_tmp14_ = self->priv->expanded_row;
	_tmp15_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, adw_expander_row_get_type (), AdwExpanderRow), "tool-actions-button");
	_tmp16_ = _g_object_ref0 ((GtkMenuButton*) _tmp15_);
	actions_button = _tmp16_;
	_tmp17_ = self->priv->expanded_row;
	_tmp18_ = g_object_get_data ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, adw_expander_row_get_type (), AdwExpanderRow), "tool-actions-header-host");
	_tmp19_ = _g_object_ref0 ((GtkBox*) _tmp18_);
	actions_header_host = _tmp19_;
	_tmp21_ = actions_button;
	if (_tmp21_ != NULL) {
		GtkBox* _tmp22_;
		_tmp22_ = actions_header_host;
		_tmp20_ = _tmp22_ != NULL;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		GtkBox* _tmp23_;
		GtkMenuButton* _tmp24_;
		_tmp23_ = actions_header_host;
		_tmp24_ = actions_button;
		proton_plus_widgets_tools_releases_box_attach_actions_button (section, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_menu_button_get_type (), GtkMenuButton));
	}
	_tmp25_ = self->priv->expanded_row;
	proton_plus_widgets_tools_releases_box_set_controller_up_target (section, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, adw_expander_row_get_type (), AdwExpanderRow));
	_tmp26_ = self->priv->expanded_row;
	_tmp27_ = proton_plus_widgets_tools_group_box_find_adjacent_visible_row (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, adw_expander_row_get_type (), AdwExpanderRow), PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN);
	_tmp28_ = _tmp27_;
	proton_plus_widgets_tools_releases_box_set_controller_down_target (section, (GtkWidget*) _tmp28_);
	_g_object_unref0 (_tmp28_);
	_g_object_unref0 (actions_header_host);
	_g_object_unref0 (actions_button);
	_g_object_unref0 (current_parent);
	_g_object_unref0 (host);
}

static void
proton_plus_widgets_tools_group_box_detach_release_section (ProtonPlusWidgetsToolsGroupBox* self)
{
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	ProtonPlusWidgetsToolsReleasesBox* section = NULL;
	ProtonPlusWidgetsToolsReleasesBox* _tmp1_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp2_;
	GtkBox* host = NULL;
	GtkBox* _tmp3_;
	GtkBox* _tmp4_;
	gboolean _tmp5_ = FALSE;
	GtkBox* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->releases_section;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->releases_section;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox));
	section = _tmp2_;
	_tmp3_ = self->priv->releases_host;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	host = _tmp4_;
	_g_object_unref0 (self->priv->releases_section);
	self->priv->releases_section = NULL;
	_g_object_unref0 (self->priv->releases_host);
	self->priv->releases_host = NULL;
	_tmp6_ = host;
	if (_tmp6_ != NULL) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp7_;
		GtkWidget* _tmp8_;
		GtkBox* _tmp9_;
		_tmp7_ = section;
		_tmp8_ = gtk_widget_get_parent ((GtkWidget*) _tmp7_);
		_tmp9_ = host;
		_tmp5_ = _tmp8_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GtkBox* _tmp10_;
		ProtonPlusWidgetsToolsReleasesBox* _tmp11_;
		_tmp10_ = host;
		_tmp11_ = section;
		gtk_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_box_get_type (), GtkBox), (GtkWidget*) _tmp11_);
	}
	_g_object_unref0 (host);
	_g_object_unref0 (section);
}

void
proton_plus_widgets_tools_group_box_collapse_expanded_tool (ProtonPlusWidgetsToolsGroupBox* self,
                                                            gboolean restore_focus)
{
	AdwExpanderRow* _tmp0_;
	AdwExpanderRow* row = NULL;
	AdwExpanderRow* _tmp1_;
	AdwExpanderRow* _tmp2_;
	ProtonPlusModelsTool* tool = NULL;
	ProtonPlusModelsTool* _tmp3_;
	ProtonPlusModelsTool* _tmp4_;
	AdwExpanderRow* _tmp5_;
	AdwExpanderRow* _tmp6_;
	ProtonPlusModelsTool* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->expanded_row;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->expanded_row;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, adw_expander_row_get_type (), AdwExpanderRow));
	row = _tmp2_;
	_tmp3_ = self->priv->expanded_tool;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	tool = _tmp4_;
	proton_plus_widgets_tools_group_box_detach_release_section (self);
	self->priv->changing_expansion = TRUE;
	_tmp5_ = row;
	adw_expander_row_set_expanded (_tmp5_, FALSE);
	_tmp6_ = row;
	proton_plus_widgets_tools_group_box_update_expanded_accessibility (self, _tmp6_);
	self->priv->changing_expansion = FALSE;
	_g_object_unref0 (self->priv->expanded_row);
	self->priv->expanded_row = NULL;
	_g_object_unref0 (self->priv->expanded_tool);
	self->priv->expanded_tool = NULL;
	if (restore_focus) {
		AdwExpanderRow* _tmp7_;
		_tmp7_ = row;
		gtk_widget_grab_focus ((GtkWidget*) _tmp7_);
	}
	_tmp8_ = tool;
	if (_tmp8_ != NULL) {
		ProtonPlusModelsTool* _tmp9_;
		_tmp9_ = tool;
		g_signal_emit (self, proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL], 0, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PROTON_PLUS_MODELS_TYPE_TOOL, ProtonPlusModelsTool), FALSE);
	}
	_g_object_unref0 (tool);
	_g_object_unref0 (row);
}

GtkWidget*
proton_plus_widgets_tools_group_box_get_expanded_row (ProtonPlusWidgetsToolsGroupBox* self)
{
	AdwExpanderRow* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->expanded_row;
	_tmp1_ = _g_object_ref0 ((GtkWidget*) _tmp0_);
	result = _tmp1_;
	return result;
}

gdouble
proton_plus_widgets_tools_group_box_get_scroll_position (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->scrolled;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	result = gtk_adjustment_get_value (_tmp1_);
	return result;
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		ProtonPlusWidgetsToolsGroupBox* self;
		self = _data24_->self;
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static gboolean
__lambda73_ (Block24Data* _data24_)
{
	ProtonPlusWidgetsToolsGroupBox* self;
	GtkAdjustment* adjustment = NULL;
	GtkScrolledWindow* _tmp0_;
	GtkAdjustment* _tmp1_;
	GtkAdjustment* _tmp2_;
	gdouble maximum = 0.0;
	gdouble _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	gdouble _tmp6_;
	gdouble _tmp7_;
	gdouble _tmp8_;
	gdouble _tmp9_;
	gdouble _tmp10_;
	gboolean result;
	self = _data24_->self;
	_tmp0_ = self->priv->scrolled;
	_tmp1_ = gtk_scrolled_window_get_vadjustment (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	adjustment = _tmp2_;
	_tmp3_ = gtk_adjustment_get_lower (adjustment);
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_adjustment_get_upper (adjustment);
	_tmp6_ = _tmp5_;
	_tmp7_ = gtk_adjustment_get_page_size (adjustment);
	_tmp8_ = _tmp7_;
	maximum = MAX (_tmp4_, _tmp6_ - _tmp8_);
	_tmp9_ = gtk_adjustment_get_lower (adjustment);
	_tmp10_ = _tmp9_;
	gtk_adjustment_set_value (adjustment, MIN (maximum, MAX (_tmp10_, _data24_->position)));
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (adjustment);
	return result;
}

static gboolean
___lambda73__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda73_ (self);
	return result;
}

void
proton_plus_widgets_tools_group_box_restore_scroll_position (ProtonPlusWidgetsToolsGroupBox* self,
                                                             gdouble position)
{
	Block24Data* _data24_;
	g_return_if_fail (self != NULL);
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->self = g_object_ref (self);
	_data24_->position = position;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda73__gsource_func, block24_data_ref (_data24_), block24_data_unref);
	block24_data_unref (_data24_);
	_data24_ = NULL;
}

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

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

static gboolean
__lambda74_ (Block25Data* _data25_)
{
	ProtonPlusWidgetsToolsGroupBox* self;
	graphene_rect_t bounds = {0};
	GtkListBox* _tmp0_;
	graphene_rect_t _tmp1_ = {0};
	gboolean _tmp2_;
	gboolean result;
	self = _data25_->self;
	_tmp0_ = self->priv->list_box;
	_tmp2_ = gtk_widget_compute_bounds (_data25_->widget, (GtkWidget*) _tmp0_, &_tmp1_);
	bounds = _tmp1_;
	if (_tmp2_) {
		GtkAdjustment* adjustment = NULL;
		GtkScrolledWindow* _tmp3_;
		GtkAdjustment* _tmp4_;
		GtkAdjustment* _tmp5_;
		gdouble maximum = 0.0;
		GtkAdjustment* _tmp6_;
		gdouble _tmp7_;
		gdouble _tmp8_;
		GtkAdjustment* _tmp9_;
		gdouble _tmp10_;
		gdouble _tmp11_;
		GtkAdjustment* _tmp12_;
		gdouble _tmp13_;
		gdouble _tmp14_;
		gdouble value = 0.0;
		graphene_rect_t _tmp15_;
		graphene_point_t _tmp16_;
		GtkAdjustment* _tmp17_;
		gdouble _tmp18_;
		gdouble _tmp19_;
		graphene_rect_t _tmp20_;
		graphene_size_t _tmp21_;
		GtkAdjustment* _tmp22_;
		GtkAdjustment* _tmp23_;
		gdouble _tmp24_;
		gdouble _tmp25_;
		_tmp3_ = self->priv->scrolled;
		_tmp4_ = gtk_scrolled_window_get_vadjustment (_tmp3_);
		_tmp5_ = _g_object_ref0 (_tmp4_);
		adjustment = _tmp5_;
		_tmp6_ = adjustment;
		_tmp7_ = gtk_adjustment_get_lower (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = adjustment;
		_tmp10_ = gtk_adjustment_get_upper (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = adjustment;
		_tmp13_ = gtk_adjustment_get_page_size (_tmp12_);
		_tmp14_ = _tmp13_;
		maximum = MAX (_tmp8_, _tmp11_ - _tmp14_);
		_tmp15_ = bounds;
		_tmp16_ = _tmp15_.origin;
		_tmp17_ = adjustment;
		_tmp18_ = gtk_adjustment_get_page_size (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = bounds;
		_tmp21_ = _tmp20_.size;
		value = _tmp16_.y - ((_tmp19_ - _tmp21_.height) / 2.0);
		_tmp22_ = adjustment;
		_tmp23_ = adjustment;
		_tmp24_ = gtk_adjustment_get_lower (_tmp23_);
		_tmp25_ = _tmp24_;
		gtk_adjustment_set_value (_tmp22_, MIN (maximum, MAX (_tmp25_, value)));
		_g_object_unref0 (adjustment);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda74__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda74_ (self);
	return result;
}

void
proton_plus_widgets_tools_group_box_focus_release_widget (ProtonPlusWidgetsToolsGroupBox* self,
                                                          GtkWidget* widget,
                                                          gboolean center)
{
	Block25Data* _data25_;
	GtkWidget* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_data25_ = g_slice_new0 (Block25Data);
	_data25_->_ref_count_ = 1;
	_data25_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (widget);
	_g_object_unref0 (_data25_->widget);
	_data25_->widget = _tmp0_;
	gtk_widget_grab_focus (_data25_->widget);
	if (!center) {
		block25_data_unref (_data25_);
		_data25_ = NULL;
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda74__gsource_func, block25_data_ref (_data25_), block25_data_unref);
	block25_data_unref (_data25_);
	_data25_ = NULL;
}

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

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

static gboolean
___lambda68_ (Block26Data* _data26_)
{
	ProtonPlusWidgetsToolsGroupBox* self;
	gboolean _tmp0_ = FALSE;
	GtkListBoxRow* target = NULL;
	GtkListBoxRow* _tmp2_;
	GtkListBoxRow* _tmp3_;
	gboolean result;
	self = _data26_->self;
	if (_data26_->expected_generation != self->priv->visibility_change_generation) {
		_tmp0_ = TRUE;
	} else {
		AdwExpanderRow* _tmp1_;
		_tmp1_ = self->priv->expanded_row;
		_tmp0_ = _tmp1_ != NULL;
	}
	if (_tmp0_) {
		result = G_SOURCE_REMOVE;
		return result;
	}
	_tmp2_ = proton_plus_widgets_tools_group_box_find_first_visible_row (self);
	target = _tmp2_;
	_tmp3_ = target;
	if (_tmp3_ != NULL) {
		GtkListBoxRow* _tmp4_;
		_tmp4_ = target;
		gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_list_box_row_get_type (), GtkListBoxRow));
	} else {
		GtkWidget* _tmp5_;
		_tmp5_ = self->priv->controller_up_target;
		if (_tmp5_ != NULL) {
			GtkWidget* _tmp6_;
			_tmp6_ = self->priv->controller_up_target;
			gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
		}
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (target);
	return result;
}

static gboolean
____lambda68__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda68_ (self);
	return result;
}

static void
proton_plus_widgets_tools_group_box_collapse_if_hidden (ProtonPlusWidgetsToolsGroupBox* self)
{
	AdwExpanderRow* _tmp0_;
	AdwExpanderRow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->expanded_row;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->expanded_row;
	if (!proton_plus_widgets_tools_group_box_filter_func (self, G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, adw_expander_row_get_type (), AdwExpanderRow), gtk_list_box_row_get_type (), GtkListBoxRow))) {
		Block26Data* _data26_;
		GtkRoot* root = NULL;
		GtkRoot* _tmp2_;
		GtkRoot* _tmp3_;
		GtkRoot* _tmp4_ = NULL;
		GtkRoot* _tmp5_;
		GtkWidget* _tmp6_ = NULL;
		GtkWidget* focused = NULL;
		GtkWidget* _tmp8_;
		AdwExpanderRow* hidden_row = NULL;
		AdwExpanderRow* _tmp9_;
		AdwExpanderRow* _tmp10_;
		gboolean _tmp11_ = FALSE;
		GtkWidget* _tmp12_;
		gboolean replace_focus = FALSE;
		_data26_ = g_slice_new0 (Block26Data);
		_data26_->_ref_count_ = 1;
		_data26_->self = g_object_ref (self);
		_tmp2_ = gtk_widget_get_root ((GtkWidget*) self);
		_tmp3_ = _g_object_ref0 (_tmp2_);
		root = _tmp3_;
		_tmp5_ = root;
		_tmp4_ = _tmp5_;
		_tmp6_ = NULL;
		if (_tmp4_ != NULL) {
			GtkWidget* _tmp7_;
			_tmp7_ = gtk_root_get_focus (_tmp4_);
			_tmp6_ = _tmp7_;
		}
		_tmp8_ = _g_object_ref0 (_tmp6_);
		focused = _tmp8_;
		_tmp9_ = self->priv->expanded_row;
		_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, adw_expander_row_get_type (), AdwExpanderRow));
		hidden_row = _tmp10_;
		_tmp12_ = focused;
		if (_tmp12_ != NULL) {
			gboolean _tmp13_ = FALSE;
			GtkWidget* _tmp14_;
			AdwExpanderRow* _tmp15_;
			_tmp14_ = focused;
			_tmp15_ = hidden_row;
			if (_tmp14_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget)) {
				_tmp13_ = TRUE;
			} else {
				GtkWidget* _tmp16_;
				AdwExpanderRow* _tmp17_;
				_tmp16_ = focused;
				_tmp17_ = hidden_row;
				_tmp13_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp17_);
			}
			_tmp11_ = _tmp13_;
		} else {
			_tmp11_ = FALSE;
		}
		replace_focus = _tmp11_;
		proton_plus_widgets_tools_group_box_collapse_expanded_tool (self, FALSE);
		if (!replace_focus) {
			_g_object_unref0 (hidden_row);
			_g_object_unref0 (focused);
			_g_object_unref0 (root);
			block26_data_unref (_data26_);
			_data26_ = NULL;
			return;
		}
		_data26_->expected_generation = self->priv->visibility_change_generation;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda68__gsource_func, block26_data_ref (_data26_), block26_data_unref);
		_g_object_unref0 (hidden_row);
		_g_object_unref0 (focused);
		_g_object_unref0 (root);
		block26_data_unref (_data26_);
		_data26_ = NULL;
	}
}

static void
proton_plus_widgets_tools_group_box_update_release_section_boundary (ProtonPlusWidgetsToolsGroupBox* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusWidgetsToolsReleasesBox* _tmp1_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp3_;
	AdwExpanderRow* _tmp4_;
	AdwExpanderRow* _tmp5_;
	AdwExpanderRow* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->releases_section;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		AdwExpanderRow* _tmp2_;
		_tmp2_ = self->priv->expanded_row;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->releases_section;
	_tmp4_ = self->priv->expanded_row;
	_tmp5_ = proton_plus_widgets_tools_group_box_find_adjacent_visible_row (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, adw_expander_row_get_type (), AdwExpanderRow), PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN);
	_tmp6_ = _tmp5_;
	proton_plus_widgets_tools_releases_box_set_controller_down_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox), (GtkWidget*) _tmp6_);
	_g_object_unref0 (_tmp6_);
}

static void
proton_plus_widgets_tools_group_box_update_tool_state_metadata (ProtonPlusWidgetsToolsGroupBox* self,
                                                                GtkLabel* state_label,
                                                                ProtonPlusModelsTool* tool)
{
	GtkBox* metadata_box = NULL;
	GtkWidget* _tmp0_;
	GtkBox* _tmp1_;
	GtkBox* _tmp2_;
	gboolean has_visible_metadata = FALSE;
	GtkWidget* child = NULL;
	GtkBox* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	GtkBox* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (state_label != NULL);
	g_return_if_fail (tool != NULL);
	if (proton_plus_models_tool_is_used (tool)) {
		gtk_label_set_label (state_label, _ ("Used by games"));
		gtk_widget_set_tooltip_text ((GtkWidget*) state_label, _ ("One or more releases of this tool is installed and currently used by o" \
"ne or more games"));
		gtk_widget_set_visible ((GtkWidget*) state_label, TRUE);
	} else {
		if (proton_plus_models_tool_is_installed (tool)) {
			gtk_label_set_label (state_label, _ ("Installed"));
			gtk_widget_set_tooltip_text ((GtkWidget*) state_label, _ ("One or more releases of this tool is installed, but not currently used" \
" by any games"));
			gtk_widget_set_visible ((GtkWidget*) state_label, TRUE);
		} else {
			gtk_widget_set_visible ((GtkWidget*) state_label, FALSE);
		}
	}
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) state_label);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_box_get_type ()) ? ((GtkBox*) _tmp0_) : NULL);
	metadata_box = _tmp1_;
	_tmp2_ = metadata_box;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (metadata_box);
		return;
	}
	has_visible_metadata = FALSE;
	_tmp3_ = metadata_box;
	_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_box_get_type (), GtkBox));
	_tmp5_ = _g_object_ref0 (_tmp4_);
	child = _tmp5_;
	while (TRUE) {
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp6_ = child;
		if (!(_tmp6_ != NULL)) {
			break;
		}
		_tmp7_ = child;
		if (gtk_widget_get_visible (_tmp7_)) {
			has_visible_metadata = TRUE;
			break;
		}
		_tmp8_ = child;
		_tmp9_ = gtk_widget_get_next_sibling (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (child);
		child = _tmp10_;
	}
	_tmp11_ = metadata_box;
	gtk_widget_set_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_box_get_type (), GtkBox), has_visible_metadata);
	_g_object_unref0 (child);
	_g_object_unref0 (metadata_box);
}

static gboolean
proton_plus_widgets_tools_group_box_filter_func (ProtonPlusWidgetsToolsGroupBox* self,
                                                 GtkListBoxRow* row)
{
	ProtonPlusModelsTool* tool = NULL;
	gconstpointer _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ProtonPlusModelsTool* _tmp4_;
	ProtonPlusModelsTool* _tmp5_;
	gboolean expanded = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean has_release_match = FALSE;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	ProtonPlusModelsTool* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	GSettings* _tmp18_;
	ProtonPlusWidgetsToolsFilter _tmp23_;
	ProtonPlusWidgetsToolsFilter _tmp24_;
	ProtonPlusWidgetsToolsFilter _tmp25_;
	ProtonPlusWidgetsToolsFilter _tmp26_;
	ProtonPlusWidgetsToolsFilter _tmp28_;
	ProtonPlusWidgetsToolsFilter _tmp29_;
	ProtonPlusWidgetsToolsFilter _tmp31_;
	ProtonPlusWidgetsToolsFilter _tmp32_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (row != NULL, FALSE);
	_tmp0_ = g_object_get_data ((GObject*) row, "tool");
	_tmp1_ = _g_object_ref0 ((ProtonPlusModelsTool*) _tmp0_);
	tool = _tmp1_;
	_tmp2_ = tool;
	if (_tmp2_ == NULL) {
		result = TRUE;
		_g_object_unref0 (tool);
		return result;
	}
	_tmp4_ = tool;
	_tmp5_ = self->priv->expanded_tool;
	if (_tmp4_ == _tmp5_) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp6_;
		_tmp6_ = self->priv->releases_section;
		_tmp3_ = _tmp6_ != NULL;
	} else {
		_tmp3_ = FALSE;
	}
	expanded = _tmp3_;
	if (expanded) {
		ProtonPlusWidgetsToolsReleasesBox* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp8_ = self->priv->releases_section;
		_tmp9_ = proton_plus_widgets_tools_group_box_get_search_text (self);
		_tmp10_ = _tmp9_;
		_tmp7_ = proton_plus_widgets_tools_releases_box_has_release_title_match (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox), _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	has_release_match = _tmp7_;
	_tmp11_ = proton_plus_widgets_tools_group_box_get_search_text (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = tool;
	_tmp14_ = proton_plus_models_tool_get_title (_tmp13_);
	_tmp15_ = _tmp14_;
	if (!proton_plus_widgets_tools_inline_release_interaction_state_matches_filter (_tmp12_, _tmp15_, expanded, has_release_match)) {
		result = FALSE;
		_g_object_unref0 (tool);
		return result;
	}
	_tmp18_ = proton_plus_globals_SETTINGS;
	if (_tmp18_ != NULL) {
		GSettings* _tmp19_;
		_tmp19_ = proton_plus_globals_SETTINGS;
		_tmp17_ = !g_settings_get_boolean (_tmp19_, "show-legacy-tools");
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		ProtonPlusModelsTool* _tmp20_;
		gboolean _tmp21_;
		gboolean _tmp22_;
		_tmp20_ = tool;
		_tmp21_ = proton_plus_models_tool_get_legacy (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp16_ = _tmp22_;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		result = FALSE;
		_g_object_unref0 (tool);
		return result;
	}
	_tmp23_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp24_ = _tmp23_;
	if (_tmp24_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
		result = TRUE;
		_g_object_unref0 (tool);
		return result;
	}
	_tmp25_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp26_ = _tmp25_;
	if (_tmp26_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED) {
		ProtonPlusModelsTool* _tmp27_;
		_tmp27_ = tool;
		result = proton_plus_models_tool_is_installed (_tmp27_);
		_g_object_unref0 (tool);
		return result;
	}
	_tmp28_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp29_ = _tmp28_;
	if (_tmp29_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED) {
		ProtonPlusModelsTool* _tmp30_;
		_tmp30_ = tool;
		result = proton_plus_models_tool_is_used (_tmp30_);
		_g_object_unref0 (tool);
		return result;
	}
	_tmp31_ = proton_plus_widgets_tools_group_box_get_filter (self);
	_tmp32_ = _tmp31_;
	if (_tmp32_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED) {
		ProtonPlusModelsTool* _tmp33_;
		_tmp33_ = tool;
		result = !proton_plus_models_tool_is_used (_tmp33_);
		_g_object_unref0 (tool);
		return result;
	}
	result = TRUE;
	_g_object_unref0 (tool);
	return result;
}

static gint
proton_plus_widgets_tools_group_box_sort_func (ProtonPlusWidgetsToolsGroupBox* self,
                                               GtkListBoxRow* row1,
                                               GtkListBoxRow* row2)
{
	ProtonPlusModelsTool* tool1 = NULL;
	gconstpointer _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* tool2 = NULL;
	gconstpointer _tmp2_;
	ProtonPlusModelsTool* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ProtonPlusModelsTool* _tmp5_;
	gboolean tool1_installed = FALSE;
	ProtonPlusModelsTool* _tmp7_;
	gboolean tool2_installed = FALSE;
	ProtonPlusModelsTool* _tmp8_;
	gboolean tool1_used = FALSE;
	ProtonPlusModelsTool* _tmp9_;
	gboolean tool2_used = FALSE;
	ProtonPlusModelsTool* _tmp10_;
	gint _result_ = 0;
	ProtonPlusModelsTool* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	ProtonPlusModelsTool* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	GCompareFunc _tmp19_;
	ProtonPlusModelsTool* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	ProtonPlusModelsTool* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gint _tmp30_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (row1 != NULL, -1);
	g_return_val_if_fail (row2 != NULL, -1);
	_tmp0_ = g_object_get_data ((GObject*) row1, "tool");
	_tmp1_ = _g_object_ref0 ((ProtonPlusModelsTool*) _tmp0_);
	tool1 = _tmp1_;
	_tmp2_ = g_object_get_data ((GObject*) row2, "tool");
	_tmp3_ = _g_object_ref0 ((ProtonPlusModelsTool*) _tmp2_);
	tool2 = _tmp3_;
	_tmp5_ = tool1;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		ProtonPlusModelsTool* _tmp6_;
		_tmp6_ = tool2;
		_tmp4_ = _tmp6_ == NULL;
	}
	if (_tmp4_) {
		result = 0;
		_g_object_unref0 (tool2);
		_g_object_unref0 (tool1);
		return result;
	}
	_tmp7_ = tool1;
	tool1_installed = proton_plus_models_tool_is_installed (_tmp7_);
	_tmp8_ = tool2;
	tool2_installed = proton_plus_models_tool_is_installed (_tmp8_);
	_tmp9_ = tool1;
	tool1_used = proton_plus_models_tool_is_used (_tmp9_);
	_tmp10_ = tool2;
	tool2_used = proton_plus_models_tool_is_used (_tmp10_);
	_result_ = 0;
	if (tool1_installed != tool2_installed) {
		gint _tmp11_ = 0;
		if (tool1_installed) {
			_tmp11_ = -1000000;
		} else {
			_tmp11_ = 1000000;
		}
		_result_ += _tmp11_;
	}
	_tmp12_ = tool1;
	_tmp13_ = proton_plus_models_tool_get_sort_priority (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = tool2;
	_tmp16_ = proton_plus_models_tool_get_sort_priority (_tmp15_);
	_tmp17_ = _tmp16_;
	_result_ += (_tmp14_ - _tmp17_) * 1000;
	if (tool1_used != tool2_used) {
		gint _tmp18_ = 0;
		if (tool1_used) {
			_tmp18_ = -1;
		} else {
			_tmp18_ = 1;
		}
		_result_ += _tmp18_;
	}
	if (_result_ != 0) {
		result = _result_;
		_g_object_unref0 (tool2);
		_g_object_unref0 (tool1);
		return result;
	}
	_tmp19_ = ((GCompareFunc) g_strcmp0);
	_tmp20_ = tool1;
	_tmp21_ = proton_plus_models_tool_get_title (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = g_utf8_strdown (_tmp22_, (gssize) -1);
	_tmp24_ = _tmp23_;
	_tmp25_ = tool2;
	_tmp26_ = proton_plus_models_tool_get_title (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = g_utf8_strdown (_tmp27_, (gssize) -1);
	_tmp29_ = _tmp28_;
	_tmp30_ = _tmp19_ (_tmp24_, _tmp29_);
	_g_free0 (_tmp29_);
	_g_free0 (_tmp24_);
	result = _tmp30_;
	_g_object_unref0 (tool2);
	_g_object_unref0 (tool1);
	return result;
}

GtkBox*
proton_plus_widgets_tools_group_box_get_header_title (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_title;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_group_box_set_header_title (ProtonPlusWidgetsToolsGroupBox* self,
                                                      GtkBox* value)
{
	GtkBox* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_group_box_get_header_title (self);
	if (old_value != value) {
		GtkBox* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_header_title);
		self->priv->_header_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY]);
	}
}

GtkBox*
proton_plus_widgets_tools_group_box_get_header_actions (ProtonPlusWidgetsToolsGroupBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_actions;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_group_box_set_header_actions (ProtonPlusWidgetsToolsGroupBox* self,
                                                        GtkBox* value)
{
	GtkBox* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_group_box_get_header_actions (self);
	if (old_value != value) {
		GtkBox* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_header_actions);
		self->priv->_header_actions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY]);
	}
}

ProtonPlusWidgetsToolsFilter
proton_plus_widgets_tools_group_box_get_filter (ProtonPlusWidgetsToolsGroupBox* self)
{
	ProtonPlusWidgetsToolsFilter result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_filter;
	return result;
}

void
proton_plus_widgets_tools_group_box_set_filter (ProtonPlusWidgetsToolsGroupBox* self,
                                                ProtonPlusWidgetsToolsFilter value)
{
	guint _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->visibility_change_generation;
	self->priv->visibility_change_generation = _tmp0_ + 1;
	self->priv->_filter = value;
	_tmp1_ = self->priv->list_box;
	gtk_list_box_invalidate_filter (_tmp1_);
	proton_plus_widgets_tools_group_box_update_status_page (self);
	proton_plus_widgets_tools_group_box_update_visibility (self);
	proton_plus_widgets_tools_group_box_collapse_if_hidden (self);
	proton_plus_widgets_tools_group_box_update_release_section_boundary (self);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY]);
}

const gchar*
proton_plus_widgets_tools_group_box_get_search_text (ProtonPlusWidgetsToolsGroupBox* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_search_text;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_tools_group_box_set_search_text (ProtonPlusWidgetsToolsGroupBox* self,
                                                     const gchar* value)
{
	guint _tmp0_;
	gchar* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->visibility_change_generation;
	self->priv->visibility_change_generation = _tmp0_ + 1;
	_tmp1_ = g_strdup (value);
	_g_free0 (self->priv->_search_text);
	self->priv->_search_text = _tmp1_;
	_tmp2_ = self->priv->list_box;
	gtk_list_box_invalidate_filter (_tmp2_);
	proton_plus_widgets_tools_group_box_update_status_page (self);
	proton_plus_widgets_tools_group_box_update_visibility (self);
	proton_plus_widgets_tools_group_box_collapse_if_hidden (self);
	proton_plus_widgets_tools_group_box_update_release_section_boundary (self);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY]);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

static void
proton_plus_widgets_tools_group_box_class_init (ProtonPlusWidgetsToolsGroupBoxClass * klass,
                                                gpointer klass_data)
{
	proton_plus_widgets_tools_group_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsGroupBox_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_group_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_tools_group_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_group_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY] = g_param_spec_object ("header-title", "header-title", "header-title", gtk_box_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY] = g_param_spec_object ("header-actions", "header-actions", "header-actions", gtk_box_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY] = g_param_spec_enum ("filter", "filter", "filter", PROTON_PLUS_WIDGETS_TOOLS_TYPE_FILTER, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY, proton_plus_widgets_tools_group_box_properties[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY] = g_param_spec_string ("search-text", "search-text", "search-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_TOOL_EXPANSION_CHANGED_SIGNAL] = g_signal_new ("tool-expansion-changed", PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, PROTON_PLUS_MODELS_TYPE_TOOL, G_TYPE_BOOLEAN);
	proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL] = g_signal_new ("clear-search-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	proton_plus_widgets_tools_group_box_signals[PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_RESET_FILTER_REQUESTED_SIGNAL] = g_signal_new ("reset-filter-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_widgets_tools_group_box_proton_plus_utils_controller_directional_focus_interface_init (ProtonPlusUtilsControllerDirectionalFocusIface * iface,
                                                                                                   gpointer iface_data)
{
	proton_plus_widgets_tools_group_box_proton_plus_utils_controller_directional_focus_parent_iface = g_type_interface_peek_parent (iface);
	iface->controller_focus_direction = (gboolean (*) (ProtonPlusUtilsControllerDirectionalFocus*, GObject*, ProtonPlusUtilsControllerNavigationDirection)) proton_plus_widgets_tools_group_box_real_controller_focus_direction;
}

static void
proton_plus_widgets_tools_group_box_proton_plus_utils_controller_activation_handler_interface_init (ProtonPlusUtilsControllerActivationHandlerIface * iface,
                                                                                                    gpointer iface_data)
{
	proton_plus_widgets_tools_group_box_proton_plus_utils_controller_activation_handler_parent_iface = g_type_interface_peek_parent (iface);
	iface->controller_activate = (gboolean (*) (ProtonPlusUtilsControllerActivationHandler*, GObject*)) proton_plus_widgets_tools_group_box_real_controller_activate;
}

static void
proton_plus_widgets_tools_group_box_instance_init (ProtonPlusWidgetsToolsGroupBox * self,
                                                   gpointer klass)
{
	gchar* _tmp0_;
	self->priv = proton_plus_widgets_tools_group_box_get_instance_private (self);
	self->priv->changing_expansion = FALSE;
	self->priv->visibility_change_generation = (guint) 0;
	self->priv->_filter = PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL;
	_tmp0_ = g_strdup ("");
	self->priv->_search_text = _tmp0_;
}

static void
proton_plus_widgets_tools_group_box_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsGroupBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox);
	_g_object_unref0 (self->priv->_header_title);
	_g_object_unref0 (self->priv->_header_actions);
	_g_object_unref0 (self->priv->list_box);
	_g_object_unref0 (self->priv->scrolled);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->status_page);
	_g_object_unref0 (self->priv->empty_action_button);
	_g_object_unref0 (self->priv->expanded_row);
	_g_object_unref0 (self->priv->expanded_tool);
	_g_object_unref0 (self->priv->releases_section);
	_g_object_unref0 (self->priv->releases_host);
	_g_free0 (self->priv->_search_text);
	G_OBJECT_CLASS (proton_plus_widgets_tools_group_box_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_group_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsGroupBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_group_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsGroupBox), 0, (GInstanceInitFunc) proton_plus_widgets_tools_group_box_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_directional_focus_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_group_box_proton_plus_utils_controller_directional_focus_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo proton_plus_utils_controller_activation_handler_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_group_box_proton_plus_utils_controller_activation_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_tools_group_box_type_id;
	proton_plus_widgets_tools_group_box_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsToolsGroupBox", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_tools_group_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_DIRECTIONAL_FOCUS, &proton_plus_utils_controller_directional_focus_info);
	g_type_add_interface_static (proton_plus_widgets_tools_group_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_ACTIVATION_HANDLER, &proton_plus_utils_controller_activation_handler_info);
	ProtonPlusWidgetsToolsGroupBox_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_group_box_type_id, sizeof (ProtonPlusWidgetsToolsGroupBoxPrivate));
	return proton_plus_widgets_tools_group_box_type_id;
}

GType
proton_plus_widgets_tools_group_box_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_group_box_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_group_box_type_id__once)) {
		GType proton_plus_widgets_tools_group_box_type_id;
		proton_plus_widgets_tools_group_box_type_id = proton_plus_widgets_tools_group_box_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_group_box_type_id__once, proton_plus_widgets_tools_group_box_type_id);
	}
	return proton_plus_widgets_tools_group_box_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_group_box_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsGroupBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_group_box_get_header_title (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_group_box_get_header_actions (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_tools_group_box_get_filter (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_tools_group_box_get_search_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_tools_group_box_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsGroupBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_GROUP_BOX, ProtonPlusWidgetsToolsGroupBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_TITLE_PROPERTY:
		proton_plus_widgets_tools_group_box_set_header_title (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_HEADER_ACTIONS_PROPERTY:
		proton_plus_widgets_tools_group_box_set_header_actions (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_FILTER_PROPERTY:
		proton_plus_widgets_tools_group_box_set_filter (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_GROUP_BOX_SEARCH_TEXT_PROPERTY:
		proton_plus_widgets_tools_group_box_set_search_text (self, g_value_get_string (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);
}

