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

#include "protonplus_core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <float.h>
#include <math.h>
#include <gtk/gtk.h>
#include <adwaita.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <json-glib/json-glib.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_INLINE_RELEASE_PRESENTATION_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_inline_release_presentation_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_EXPANDED_OWNER_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_inline_release_interaction_state_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_GUARD_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_GUARD_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_inline_release_request_guard_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_GUARD_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_FILTER_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_SEARCH_TEXT_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_NUM_PROPERTIES];
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _gtk_expression_unref0(var) ((var == NULL) ? NULL : (var = (gtk_expression_unref (var), NULL)))
typedef struct _ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData;
typedef struct _ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData;
typedef struct _Block27Data Block27Data;
typedef struct _Block28Data Block28Data;
typedef struct _ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData;
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CHANGELOG_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_GAMES_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_RESET_FILTER_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_NUM_SIGNALS
};
static guint proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsToolsInlineReleasePresentationPrivate {
	ProtonPlusWidgetsToolsInlineReleaseView _view;
	gboolean _show_error_banner;
};

struct _ProtonPlusWidgetsToolsInlineReleaseInteractionStatePrivate {
	GObject* owner;
	GObject* navigation_owner;
	GObject* navigation_item;
	gdouble scroll_position;
};

struct _ProtonPlusWidgetsToolsInlineReleaseRequestGuardPrivate {
	GObject* owner;
	guint generation;
};

struct _ProtonPlusWidgetsToolsReleasesBoxPrivate {
	GtkBox* _tool_box;
	GtkButton* _refresh_button;
	GtkButton* _repository_button;
	GtkMenuButton* actions_button;
	GtkBox* actions_header_host;
	GtkPopover* actions_popover;
	GtkListBox* _list_box;
	GtkStack* _content_stack;
	AdwStatusPage* _status_page;
	AdwStatusPage* _error_page;
	AdwBanner* _error_banner;
	GtkButton* _empty_action_button;
	GtkButton* _error_retry_button;
	ProtonPlusModelsTool* current_tool;
	GeeHashMap* job_state_handlers;
	guint tool_request_generation;
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard* request_guard;
	ProtonPlusModelsVariant* selected_variant;
	GeeLinkedList* displayed_variants;
	GtkDropDown* _variant_dropdown;
	GtkLabel* variant_label;
	GHashTable* variant_list_items;
	GtkImage* selected_variant_checkmark;
	GtkBox* _variant_box;
	gboolean provider_has_compatible_variants;
	gboolean updating_variant_dropdown;
	GtkListBoxRow* load_more_row;
	GtkButton* load_more_button;
	GtkWidget* controller_up_target;
	GtkWidget* controller_down_target;
	ProtonPlusWidgetsToolsInlineReleaseRequestKind last_request_kind;
	gboolean request_in_progress;
	gboolean error_active;
	gboolean background_request_started_empty;
	gchar* last_announced_state;
	ProtonPlusWidgetsToolsFilter _filter;
	gchar* _search_text;
};

struct _ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusWidgetsToolsReleasesBox* self;
	ProtonPlusModelsTool* tool;
	gboolean result;
	guint request_generation;
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	GtkButton* _tmp2_;
	AdwBanner* _tmp3_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp4_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp5_;
	GtkListBox* _tmp6_;
	ProtonPlusModelsReleaseCatalog* catalog;
	ProtonPlusModelsReleaseCatalog* _tmp7_;
	ProtonPlusModelsReleaseCatalog* _tmp8_;
	ProtonPlusModelsReleaseCatalog* _tmp9_;
	ProtonPlusModelsReleaseCatalog* _tmp10_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp11_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp12_;
	GtkButton* _tmp13_;
	ProtonPlusModelsReleaseCatalogResult* _result_;
	ProtonPlusModelsReleaseCatalog* _tmp14_;
	ProtonPlusModelsReleaseCatalogResult* _tmp15_;
	GtkButton* _tmp16_;
	ProtonPlusModelsReleaseCatalogResult* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	ProtonPlusModelsReleaseCatalogResult* _tmp20_;
	ProtonPlusReturnCode _tmp21_;
	ProtonPlusReturnCode _tmp22_;
	ProtonPlusModelsGroup* _tmp23_;
	ProtonPlusModelsGroup* _tmp24_;
	ProtonPlusModelsReleaseCatalogResult* _tmp25_;
	GeeLinkedList* _tmp26_;
	GeeLinkedList* _tmp27_;
	GtkListBox* _tmp28_;
	GtkListBoxRow* _tmp29_;
	gboolean _tmp30_;
	ProtonPlusModelsReleaseCatalog* _tmp31_;
	gboolean _tmp32_;
	gboolean _tmp33_;
	GtkListBoxRow* _tmp34_;
	GtkStack* _tmp35_;
	AdwBanner* _tmp36_;
};

struct _ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusWidgetsToolsReleasesBox* self;
	ProtonPlusModelsTool* tool;
	guint request_generation;
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	GtkStack* _tmp2_;
	const gchar* _tmp3_;
	AdwBanner* _tmp4_;
	gboolean has_cached_content;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp5_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	ProtonPlusModelsReleaseCatalog* catalog;
	ProtonPlusModelsReleaseCatalog* _tmp9_;
	ProtonPlusModelsReleaseCatalog* _tmp10_;
	ProtonPlusModelsReleaseCatalog* _tmp11_;
	ProtonPlusModelsReleaseCatalog* _tmp12_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp13_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp14_;
	GtkButton* _tmp15_;
	ProtonPlusModelsReleaseCatalogResult* _result_;
	ProtonPlusModelsReleaseCatalog* _tmp16_;
	ProtonPlusModelsReleaseCatalogResult* _tmp17_;
	ProtonPlusModelsReleaseCatalogResult* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GtkButton* _tmp21_;
	ProtonPlusModelsReleaseCatalogResult* _tmp22_;
	ProtonPlusReturnCode _tmp23_;
	ProtonPlusReturnCode _tmp24_;
	GtkListBox* _tmp25_;
	ProtonPlusModelsGroup* _tmp26_;
	ProtonPlusModelsGroup* _tmp27_;
	ProtonPlusModelsReleaseCatalogResult* _tmp28_;
	GeeLinkedList* _tmp29_;
	GeeLinkedList* _tmp30_;
	GtkListBox* _tmp31_;
	GtkListBoxRow* _tmp32_;
	gboolean _tmp33_;
	ProtonPlusModelsReleaseCatalog* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	GtkListBoxRow* _tmp37_;
	GtkStack* _tmp38_;
	AdwBanner* _tmp39_;
	GtkButton* _tmp40_;
};

struct _Block27Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsReleasesBox* self;
	GWeakRef weak_row;
};

struct _Block28Data {
	int _ref_count_;
	ProtonPlusWidgetsToolsReleasesBox* self;
	ProtonPlusServicesInstallJob* job;
};

struct _ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusWidgetsToolsReleasesBox* self;
	gboolean _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* tool;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsTool* _tmp3_;
	guint request_generation;
	AdwBanner* _tmp4_;
	GtkStack* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	ProtonPlusModelsReleaseCatalog* catalog;
	ProtonPlusModelsTool* _tmp9_;
	ProtonPlusModelsReleaseCatalog* _tmp10_;
	ProtonPlusModelsReleaseCatalog* _tmp11_;
	ProtonPlusModelsReleaseCatalog* _tmp12_;
	ProtonPlusModelsReleaseCatalog* _tmp13_;
	GtkButton* _tmp14_;
	ProtonPlusModelsReleaseCatalogResult* _result_;
	ProtonPlusModelsReleaseCatalog* _tmp15_;
	ProtonPlusModelsReleaseCatalogResult* _tmp16_;
	ProtonPlusModelsTool* _tmp17_;
	ProtonPlusModelsReleaseCatalogResult* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GeeLinkedList* _release_list;
	ProtonPlusModelsReleaseCatalogResult* _tmp21_;
	GeeLinkedList* _tmp22_;
	GeeLinkedList* _tmp23_;
	gint _release_size;
	GeeLinkedList* _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	gint _release_index;
	gint _tmp27_;
	gint _tmp28_;
	ProtonPlusModelsRelease* release;
	GeeLinkedList* _tmp29_;
	gpointer _tmp30_;
	ProtonPlusModelsRelease* _tmp31_;
	ProtonPlusModelsTool* _tmp32_;
	ProtonPlusModelsGroup* _tmp33_;
	ProtonPlusModelsGroup* _tmp34_;
	GtkListBox* _tmp35_;
	GtkListBoxRow* _tmp36_;
	GtkListBox* _tmp37_;
	GtkListBoxRow* _tmp38_;
	GtkButton* _tmp39_;
	ProtonPlusModelsReleaseCatalogResult* _tmp40_;
	ProtonPlusReturnCode _tmp41_;
	ProtonPlusReturnCode _tmp42_;
	gboolean _tmp43_;
	ProtonPlusModelsReleaseCatalog* _tmp44_;
	gboolean _tmp45_;
	gboolean _tmp46_;
	GtkListBoxRow* _tmp47_;
	GtkButton* _tmp48_;
	AdwBanner* _tmp49_;
};

static gint ProtonPlusWidgetsToolsInlineReleasePresentation_private_offset;
static gpointer proton_plus_widgets_tools_inline_release_presentation_parent_class = NULL;
static gint ProtonPlusWidgetsToolsInlineReleaseInteractionState_private_offset;
static gpointer proton_plus_widgets_tools_inline_release_interaction_state_parent_class = NULL;
static gint ProtonPlusWidgetsToolsInlineReleaseRequestGuard_private_offset;
static gpointer proton_plus_widgets_tools_inline_release_request_guard_parent_class = NULL;
static gint ProtonPlusWidgetsToolsReleasesBox_private_offset;
static gpointer proton_plus_widgets_tools_releases_box_parent_class = NULL;
static ProtonPlusUtilsControllerDirectionalFocusIface * proton_plus_widgets_tools_releases_box_proton_plus_utils_controller_directional_focus_parent_iface = NULL;
static ProtonPlusUtilsControllerActivationHandlerIface * proton_plus_widgets_tools_releases_box_proton_plus_utils_controller_activation_handler_parent_iface = NULL;

static void proton_plus_widgets_tools_inline_release_presentation_set_view (ProtonPlusWidgetsToolsInlineReleasePresentation* self,
                                                                     ProtonPlusWidgetsToolsInlineReleaseView value);
static void proton_plus_widgets_tools_inline_release_presentation_set_show_error_banner (ProtonPlusWidgetsToolsInlineReleasePresentation* self,
                                                                                  gboolean value);
static void proton_plus_widgets_tools_inline_release_presentation_finalize (GObject * obj);
static GType proton_plus_widgets_tools_inline_release_presentation_get_type_once (void);
static void _vala_proton_plus_widgets_tools_inline_release_presentation_get_property (GObject * object,
                                                                               guint property_id,
                                                                               GValue * value,
                                                                               GParamSpec * pspec);
static void _vala_proton_plus_widgets_tools_inline_release_presentation_set_property (GObject * object,
                                                                               guint property_id,
                                                                               const GValue * value,
                                                                               GParamSpec * pspec);
static void proton_plus_widgets_tools_inline_release_interaction_state_finalize (GObject * obj);
static GType proton_plus_widgets_tools_inline_release_interaction_state_get_type_once (void);
static void _vala_proton_plus_widgets_tools_inline_release_interaction_state_get_property (GObject * object,
                                                                                    guint property_id,
                                                                                    GValue * value,
                                                                                    GParamSpec * pspec);
static void proton_plus_widgets_tools_inline_release_request_guard_finalize (GObject * obj);
static GType proton_plus_widgets_tools_inline_release_request_guard_get_type_once (void);
static gchar* proton_plus_widgets_tools_releases_box_get_tool_variant_settings_key (ProtonPlusModelsTool* tool);
static gchar* proton_plus_widgets_tools_releases_box_get_legacy_tool_variant_settings_key (ProtonPlusModelsTool* tool);
static gchar* proton_plus_widgets_tools_releases_box_get_variant_tooltip (const gchar* variant_name);
static gchar* proton_plus_widgets_tools_releases_box_get_saved_variant_name (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                      ProtonPlusModelsTool* tool);
static void _vala_JsonNode_free (JsonNode* self);
static void proton_plus_widgets_tools_releases_box_save_selected_variant_name (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                        ProtonPlusModelsTool* tool,
                                                                        const gchar* variant_name);
static void _g_object_unref0_ (gpointer var);
static void proton_plus_widgets_tools_releases_box_set_refresh_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                GtkButton* value);
static void proton_plus_widgets_tools_releases_box_on_refresh_clicked (ProtonPlusWidgetsToolsReleasesBox* self);
static void _proton_plus_widgets_tools_releases_box_on_refresh_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self);
static void proton_plus_widgets_tools_releases_box_set_repository_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                   GtkButton* value);
static void __lambda66_ (ProtonPlusWidgetsToolsReleasesBox* self);
static void ___lambda66__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_releases_box_set_variant_dropdown (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                  GtkDropDown* value);
static GtkDropDown* proton_plus_widgets_tools_releases_box_get_variant_dropdown (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_on_variant_selected (ProtonPlusWidgetsToolsReleasesBox* self);
static void _proton_plus_widgets_tools_releases_box_on_variant_selected_g_object_notify (GObject* _sender,
                                                                                  GParamSpec* pspec,
                                                                                  gpointer self);
static void proton_plus_widgets_tools_releases_box_on_variant_list_item_setup (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                        GObject* object);
static void _proton_plus_widgets_tools_releases_box_on_variant_list_item_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                            GObject* object,
                                                                                                            gpointer self);
static void proton_plus_widgets_tools_releases_box_on_variant_list_item_bind (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                       GObject* object);
static void _proton_plus_widgets_tools_releases_box_on_variant_list_item_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                          GObject* object,
                                                                                                          gpointer self);
static void proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                         GObject* object);
static void _proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                                              GObject* object,
                                                                                                              gpointer self);
static void proton_plus_widgets_tools_releases_box_set_variant_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             GtkBox* value);
static void proton_plus_widgets_tools_releases_box_set_list_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                          GtkListBox* value);
static GtkListBox* proton_plus_widgets_tools_releases_box_get_list_box (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_filter_func (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             GtkListBoxRow* row);
static gboolean _proton_plus_widgets_tools_releases_box_filter_func_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                                       gpointer self);
static void proton_plus_widgets_tools_releases_box_on_load_more_clicked (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static void proton_plus_widgets_tools_releases_box_on_load_more_clicked_finish (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                         GAsyncResult* _res_);
static void _proton_plus_widgets_tools_releases_box_on_load_more_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void proton_plus_widgets_tools_releases_box_set_content_stack (ProtonPlusWidgetsToolsReleasesBox* self,
                                                               GtkStack* value);
static void proton_plus_widgets_tools_releases_box_set_status_page (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             AdwStatusPage* value);
static void proton_plus_widgets_tools_releases_box_set_empty_action_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                     GtkButton* value);
static GtkButton* proton_plus_widgets_tools_releases_box_get_empty_action_button (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_on_empty_action_clicked (ProtonPlusWidgetsToolsReleasesBox* self);
static void _proton_plus_widgets_tools_releases_box_on_empty_action_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                         gpointer self);
static AdwStatusPage* proton_plus_widgets_tools_releases_box_get_status_page (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_set_error_retry_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                    GtkButton* value);
static GtkButton* proton_plus_widgets_tools_releases_box_get_error_retry_button (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_retry_current_request (ProtonPlusWidgetsToolsReleasesBox* self);
static void _proton_plus_widgets_tools_releases_box_retry_current_request_gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
static void proton_plus_widgets_tools_releases_box_set_error_page (ProtonPlusWidgetsToolsReleasesBox* self,
                                                            AdwStatusPage* value);
static void proton_plus_widgets_tools_releases_box_set_error_banner (ProtonPlusWidgetsToolsReleasesBox* self,
                                                              AdwBanner* value);
static AdwBanner* proton_plus_widgets_tools_releases_box_get_error_banner (ProtonPlusWidgetsToolsReleasesBox* self);
static void _proton_plus_widgets_tools_releases_box_retry_current_request_adw_banner_button_clicked (AdwBanner* _sender,
                                                                                              gpointer self);
static GtkStack* proton_plus_widgets_tools_releases_box_get_content_stack (ProtonPlusWidgetsToolsReleasesBox* self);
static AdwStatusPage* proton_plus_widgets_tools_releases_box_get_error_page (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_set_tool_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                          GtkBox* value);
static GtkBox* proton_plus_widgets_tools_releases_box_get_tool_box (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_detach_actions_button (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_update_actions_placement (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_update_release_row_up_targets (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_configure_release_row_up_targets (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                              ProtonPlusWidgetsToolsReleaseRow* row);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_data_free (gpointer _data);
static gboolean proton_plus_widgets_tools_releases_box_set_selected_tool_co (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_);
static void proton_plus_widgets_tools_releases_box_set_request_in_progress (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                     gboolean in_progress);
static void proton_plus_widgets_tools_releases_box_apply_presentation (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                ProtonPlusWidgetsToolsInlineReleasePresentation* presentation);
static void proton_plus_widgets_tools_releases_box_announce_state (ProtonPlusWidgetsToolsReleasesBox* self,
                                                            const gchar* message);
static void proton_plus_widgets_tools_releases_box_reset_load_more_button (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_update_repository_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                      ProtonPlusModelsTool* tool);
static void proton_plus_widgets_tools_releases_box_update_refresh_tooltip (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                    gboolean refreshing);
static void proton_plus_widgets_tools_releases_box_update_variant_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                ProtonPlusModelsTool* tool);
static void proton_plus_widgets_tools_releases_box_update_empty_status (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_);
static gboolean proton_plus_widgets_tools_releases_box_is_current_tool_request (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                         ProtonPlusModelsTool* tool,
                                                                         guint request_generation);
static void proton_plus_widgets_tools_releases_box_show_error (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        ProtonPlusReturnCode code);
static void proton_plus_widgets_tools_releases_box_add_release_rows (ProtonPlusWidgetsToolsReleasesBox* self,
                                                              ProtonPlusModelsTool* tool,
                                                              GeeLinkedList* releases);
static gboolean proton_plus_widgets_tools_releases_box_can_show_provider_release_rows (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_apply_selected_variant_to_rows (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_update_visibility (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_has_release_rows (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_forced (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                      ProtonPlusModelsTool* tool,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_forced_finish (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                             GAsyncResult* _res_);
static gboolean proton_plus_widgets_tools_releases_box_focus_first_content_target (ProtonPlusWidgetsToolsReleasesBox* self);
static GtkWidget* proton_plus_widgets_tools_releases_box_focusable_inline_control (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                            GtkWidget* control);
static GtkWidget* proton_plus_widgets_tools_releases_box_toolbar_actions_control (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_focus_first_release_target (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                                 GObject* focused_object,
                                                                                 ProtonPlusUtilsControllerNavigationDirection direction);
static GtkWidget* proton_plus_widgets_tools_releases_box_find_inline_control_ancestor (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                                GtkWidget* focused);
static GtkWidget* proton_plus_widgets_tools_releases_box_find_inline_control (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                       GtkWidget* current,
                                                                       gboolean forward);
static gboolean proton_plus_widgets_tools_releases_box_focus_controller_up_target (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_focus_first_release_actions_target (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_focus_controller_down_target (ProtonPlusWidgetsToolsReleasesBox* self);
static gboolean proton_plus_widgets_tools_releases_box_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                                          GObject* focused_object);
static void proton_plus_widgets_tools_releases_box_update_variant_list_item_checkmark (ProtonPlusWidgetsToolsReleasesBox* self);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_forced_data_free (gpointer _data);
static gboolean proton_plus_widgets_tools_releases_box_set_selected_tool_forced_co (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_);
static void proton_plus_widgets_tools_releases_box_set_selected_tool_forced_ready (GObject* source_object,
                                                                            GAsyncResult* _res_,
                                                                            gpointer _user_data_);
static ProtonPlusModelsVariant* proton_plus_widgets_tools_releases_box_resolve_release_variant (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                                         ProtonPlusModelsRelease* release,
                                                                                         ProtonPlusServicesInstallJobMode mode);
static gboolean proton_plus_widgets_tools_releases_box_apply_selected_variant_to_job (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                               ProtonPlusServicesInstallJob* job);
static ProtonPlusWidgetsToolsReleaseRow* proton_plus_widgets_tools_releases_box_find_job_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                                       ProtonPlusServicesInstallJob* target);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
static gboolean ___lambda67_ (Block27Data* _data27_);
static gboolean ____lambda67__gsource_func (gpointer self);
static gboolean proton_plus_widgets_tools_releases_box_jobs_have_same_identity (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                         ProtonPlusServicesInstallJob* left,
                                                                         ProtonPlusServicesInstallJob* right);
static void proton_plus_widgets_tools_releases_box_add_release_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             ProtonPlusModelsRelease* release,
                                                             ProtonPlusServicesInstallJobMode mode);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void __lambda39_ (Block28Data* _data28_);
static void ___lambda39__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda64_ (ProtonPlusWidgetsToolsReleasesBox* self,
                  ProtonPlusServicesInstallJob* selected_job);
static void ___lambda64__proton_plus_widgets_tools_release_row_changelog_requested (ProtonPlusWidgetsToolsReleaseRow* _sender,
                                                                             ProtonPlusServicesInstallJob* job,
                                                                             gpointer self);
static void __lambda65_ (ProtonPlusWidgetsToolsReleasesBox* self,
                  ProtonPlusServicesInstallJob* selected_job);
static void ___lambda65__proton_plus_widgets_tools_release_row_games_requested (ProtonPlusWidgetsToolsReleaseRow* _sender,
                                                                         ProtonPlusServicesInstallJob* job,
                                                                         gpointer self);
static void proton_plus_widgets_tools_releases_box_real_dispose (GObject* base);
static void proton_plus_widgets_tools_releases_box_on_load_more_clicked_data_free (gpointer _data);
static gboolean proton_plus_widgets_tools_releases_box_on_load_more_clicked_co (ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData* _data_);
static void proton_plus_widgets_tools_releases_box_on_load_more_clicked_ready (GObject* source_object,
                                                                        GAsyncResult* _res_,
                                                                        gpointer _user_data_);
static void proton_plus_widgets_tools_releases_box_finalize (GObject * obj);
static GType proton_plus_widgets_tools_releases_box_get_type_once (void);
static void _vala_proton_plus_widgets_tools_releases_box_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec);
static void _vala_proton_plus_widgets_tools_releases_box_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static GType
proton_plus_widgets_tools_inline_expansion_transition_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_NONE, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_NONE", "none"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_EXPAND, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_EXPAND", "expand"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_COLLAPSE, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_COLLAPSE", "collapse"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_SWITCH, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_SWITCH", "switch"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_inline_expansion_transition_type_id;
	proton_plus_widgets_tools_inline_expansion_transition_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsInlineExpansionTransition", values);
	return proton_plus_widgets_tools_inline_expansion_transition_type_id;
}

GType
proton_plus_widgets_tools_inline_expansion_transition_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_expansion_transition_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_expansion_transition_type_id__once)) {
		GType proton_plus_widgets_tools_inline_expansion_transition_type_id;
		proton_plus_widgets_tools_inline_expansion_transition_type_id = proton_plus_widgets_tools_inline_expansion_transition_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_expansion_transition_type_id__once, proton_plus_widgets_tools_inline_expansion_transition_type_id);
	}
	return proton_plus_widgets_tools_inline_expansion_transition_type_id__once;
}

static GType
proton_plus_widgets_tools_inline_release_request_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL", "initial"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_REFRESH, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_REFRESH", "refresh"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_LOAD_MORE, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_LOAD_MORE", "load-more"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_inline_release_request_kind_type_id;
	proton_plus_widgets_tools_inline_release_request_kind_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsInlineReleaseRequestKind", values);
	return proton_plus_widgets_tools_inline_release_request_kind_type_id;
}

GType
proton_plus_widgets_tools_inline_release_request_kind_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_request_kind_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_request_kind_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_request_kind_type_id;
		proton_plus_widgets_tools_inline_release_request_kind_type_id = proton_plus_widgets_tools_inline_release_request_kind_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_request_kind_type_id__once, proton_plus_widgets_tools_inline_release_request_kind_type_id);
	}
	return proton_plus_widgets_tools_inline_release_request_kind_type_id__once;
}

static GType
proton_plus_widgets_tools_inline_release_view_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LOADING, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LOADING", "loading"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST", "list"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_EMPTY, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_EMPTY", "empty"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_ERROR, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_ERROR", "error"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_inline_release_view_type_id;
	proton_plus_widgets_tools_inline_release_view_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsInlineReleaseView", values);
	return proton_plus_widgets_tools_inline_release_view_type_id;
}

GType
proton_plus_widgets_tools_inline_release_view_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_view_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_view_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_view_type_id;
		proton_plus_widgets_tools_inline_release_view_type_id = proton_plus_widgets_tools_inline_release_view_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_view_type_id__once, proton_plus_widgets_tools_inline_release_view_type_id);
	}
	return proton_plus_widgets_tools_inline_release_view_type_id__once;
}

static GType
proton_plus_widgets_tools_inline_release_empty_reason_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_CATALOG, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_CATALOG", "catalog"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_SEARCH, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_SEARCH", "search"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_FILTER, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_FILTER", "filter"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_UNAVAILABLE, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_UNAVAILABLE", "unavailable"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_inline_release_empty_reason_type_id;
	proton_plus_widgets_tools_inline_release_empty_reason_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsInlineReleaseEmptyReason", values);
	return proton_plus_widgets_tools_inline_release_empty_reason_type_id;
}

GType
proton_plus_widgets_tools_inline_release_empty_reason_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_empty_reason_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_empty_reason_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_empty_reason_type_id;
		proton_plus_widgets_tools_inline_release_empty_reason_type_id = proton_plus_widgets_tools_inline_release_empty_reason_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_empty_reason_type_id__once, proton_plus_widgets_tools_inline_release_empty_reason_type_id);
	}
	return proton_plus_widgets_tools_inline_release_empty_reason_type_id__once;
}

static GType
proton_plus_widgets_tools_inline_release_actions_placement_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_HEADER, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_HEADER", "header"}, {PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_TOOLBAR, "PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_TOOLBAR", "toolbar"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_inline_release_actions_placement_type_id;
	proton_plus_widgets_tools_inline_release_actions_placement_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsInlineReleaseActionsPlacement", values);
	return proton_plus_widgets_tools_inline_release_actions_placement_type_id;
}

GType
proton_plus_widgets_tools_inline_release_actions_placement_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_actions_placement_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_actions_placement_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_actions_placement_type_id;
		proton_plus_widgets_tools_inline_release_actions_placement_type_id = proton_plus_widgets_tools_inline_release_actions_placement_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_actions_placement_type_id__once, proton_plus_widgets_tools_inline_release_actions_placement_type_id);
	}
	return proton_plus_widgets_tools_inline_release_actions_placement_type_id__once;
}

static inline gpointer
proton_plus_widgets_tools_inline_release_presentation_get_instance_private (ProtonPlusWidgetsToolsInlineReleasePresentation* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsInlineReleasePresentation_private_offset);
}

ProtonPlusWidgetsToolsInlineReleasePresentation*
proton_plus_widgets_tools_inline_release_presentation_evaluate (ProtonPlusWidgetsToolsInlineReleaseRequestKind kind,
                                                                gboolean request_in_progress,
                                                                gboolean has_content,
                                                                gboolean failed,
                                                                gboolean filtered_empty)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation* _result_ = NULL;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp0_;
	ProtonPlusWidgetsToolsInlineReleaseView _tmp12_ = 0;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp13_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* result;
	_tmp0_ = proton_plus_widgets_tools_inline_release_presentation_new ();
	_result_ = _tmp0_;
	if (request_in_progress) {
		ProtonPlusWidgetsToolsInlineReleaseView _tmp1_ = 0;
		gboolean _tmp2_ = FALSE;
		ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp4_;
		if (kind == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL) {
			_tmp2_ = TRUE;
		} else {
			_tmp2_ = !has_content;
		}
		if (_tmp2_) {
			_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LOADING;
		} else {
			ProtonPlusWidgetsToolsInlineReleaseView _tmp3_ = 0;
			if (filtered_empty) {
				_tmp3_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_EMPTY;
			} else {
				_tmp3_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST;
			}
			_tmp1_ = _tmp3_;
		}
		_tmp4_ = _result_;
		proton_plus_widgets_tools_inline_release_presentation_set_view (_tmp4_, _tmp1_);
		result = _result_;
		return result;
	}
	if (failed) {
		gboolean _tmp5_ = FALSE;
		ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp6_;
		ProtonPlusWidgetsToolsInlineReleaseView _tmp7_ = 0;
		ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp8_;
		gboolean _tmp9_;
		ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp11_;
		if (kind != PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL) {
			_tmp5_ = has_content;
		} else {
			_tmp5_ = FALSE;
		}
		_tmp6_ = _result_;
		proton_plus_widgets_tools_inline_release_presentation_set_show_error_banner (_tmp6_, _tmp5_);
		_tmp8_ = _result_;
		_tmp9_ = _tmp8_->priv->_show_error_banner;
		if (_tmp9_) {
			ProtonPlusWidgetsToolsInlineReleaseView _tmp10_ = 0;
			if (filtered_empty) {
				_tmp10_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_EMPTY;
			} else {
				_tmp10_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST;
			}
			_tmp7_ = _tmp10_;
		} else {
			_tmp7_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_ERROR;
		}
		_tmp11_ = _result_;
		proton_plus_widgets_tools_inline_release_presentation_set_view (_tmp11_, _tmp7_);
		result = _result_;
		return result;
	}
	if (has_content) {
		_tmp12_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST;
	} else {
		_tmp12_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_EMPTY;
	}
	_tmp13_ = _result_;
	proton_plus_widgets_tools_inline_release_presentation_set_view (_tmp13_, _tmp12_);
	result = _result_;
	return result;
}

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

ProtonPlusWidgetsToolsInlineReleaseEmptyReason
proton_plus_widgets_tools_inline_release_presentation_empty_reason (const gchar* query,
                                                                    ProtonPlusWidgetsToolsFilter filter,
                                                                    gboolean compatible)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	ProtonPlusWidgetsToolsInlineReleaseEmptyReason result;
	g_return_val_if_fail (query != NULL, 0);
	_tmp0_ = string_strip (query);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") != 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_SEARCH;
		return result;
	}
	if (filter != PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
		result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_FILTER;
		return result;
	}
	if (!compatible) {
		result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_UNAVAILABLE;
		return result;
	}
	result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_CATALOG;
	return result;
}

ProtonPlusWidgetsToolsInlineReleaseActionsPlacement
proton_plus_widgets_tools_inline_release_presentation_actions_placement (gboolean show_build_selector)
{
	ProtonPlusWidgetsToolsInlineReleaseActionsPlacement _tmp0_ = 0;
	ProtonPlusWidgetsToolsInlineReleaseActionsPlacement result;
	if (show_build_selector) {
		_tmp0_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_TOOLBAR;
	} else {
		_tmp0_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_HEADER;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsToolsInlineReleasePresentation*
proton_plus_widgets_tools_inline_release_presentation_construct (GType object_type)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation * self = NULL;
	self = (ProtonPlusWidgetsToolsInlineReleasePresentation*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsToolsInlineReleasePresentation*
proton_plus_widgets_tools_inline_release_presentation_new (void)
{
	return proton_plus_widgets_tools_inline_release_presentation_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_PRESENTATION);
}

ProtonPlusWidgetsToolsInlineReleaseView
proton_plus_widgets_tools_inline_release_presentation_get_view (ProtonPlusWidgetsToolsInlineReleasePresentation* self)
{
	ProtonPlusWidgetsToolsInlineReleaseView result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_view;
	return result;
}

static void
proton_plus_widgets_tools_inline_release_presentation_set_view (ProtonPlusWidgetsToolsInlineReleasePresentation* self,
                                                                ProtonPlusWidgetsToolsInlineReleaseView value)
{
	ProtonPlusWidgetsToolsInlineReleaseView old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_inline_release_presentation_get_view (self);
	if (old_value != value) {
		self->priv->_view = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_inline_release_presentation_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_tools_inline_release_presentation_get_show_error_banner (ProtonPlusWidgetsToolsInlineReleasePresentation* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_error_banner;
	return result;
}

static void
proton_plus_widgets_tools_inline_release_presentation_set_show_error_banner (ProtonPlusWidgetsToolsInlineReleasePresentation* self,
                                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_inline_release_presentation_get_show_error_banner (self);
	if (old_value != value) {
		self->priv->_show_error_banner = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_inline_release_presentation_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY]);
	}
}

static void
proton_plus_widgets_tools_inline_release_presentation_class_init (ProtonPlusWidgetsToolsInlineReleasePresentationClass * klass,
                                                                  gpointer klass_data)
{
	proton_plus_widgets_tools_inline_release_presentation_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsInlineReleasePresentation_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_inline_release_presentation_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_tools_inline_release_presentation_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_inline_release_presentation_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY, proton_plus_widgets_tools_inline_release_presentation_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY] = g_param_spec_enum ("view", "view", "view", PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_VIEW, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY, proton_plus_widgets_tools_inline_release_presentation_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY] = g_param_spec_boolean ("show-error-banner", "show-error-banner", "show-error-banner", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_tools_inline_release_presentation_instance_init (ProtonPlusWidgetsToolsInlineReleasePresentation * self,
                                                                     gpointer klass)
{
	self->priv = proton_plus_widgets_tools_inline_release_presentation_get_instance_private (self);
}

static void
proton_plus_widgets_tools_inline_release_presentation_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_PRESENTATION, ProtonPlusWidgetsToolsInlineReleasePresentation);
	G_OBJECT_CLASS (proton_plus_widgets_tools_inline_release_presentation_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_inline_release_presentation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsInlineReleasePresentationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_inline_release_presentation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsInlineReleasePresentation), 0, (GInstanceInitFunc) proton_plus_widgets_tools_inline_release_presentation_instance_init, NULL };
	GType proton_plus_widgets_tools_inline_release_presentation_type_id;
	proton_plus_widgets_tools_inline_release_presentation_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsToolsInlineReleasePresentation", &g_define_type_info, 0);
	ProtonPlusWidgetsToolsInlineReleasePresentation_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_inline_release_presentation_type_id, sizeof (ProtonPlusWidgetsToolsInlineReleasePresentationPrivate));
	return proton_plus_widgets_tools_inline_release_presentation_type_id;
}

GType
proton_plus_widgets_tools_inline_release_presentation_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_presentation_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_presentation_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_presentation_type_id;
		proton_plus_widgets_tools_inline_release_presentation_type_id = proton_plus_widgets_tools_inline_release_presentation_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_presentation_type_id__once, proton_plus_widgets_tools_inline_release_presentation_type_id);
	}
	return proton_plus_widgets_tools_inline_release_presentation_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_inline_release_presentation_get_property (GObject * object,
                                                                          guint property_id,
                                                                          GValue * value,
                                                                          GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_PRESENTATION, ProtonPlusWidgetsToolsInlineReleasePresentation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_tools_inline_release_presentation_get_view (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_tools_inline_release_presentation_get_show_error_banner (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_tools_inline_release_presentation_set_property (GObject * object,
                                                                          guint property_id,
                                                                          const GValue * value,
                                                                          GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_PRESENTATION, ProtonPlusWidgetsToolsInlineReleasePresentation);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_VIEW_PROPERTY:
		proton_plus_widgets_tools_inline_release_presentation_set_view (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_PRESENTATION_SHOW_ERROR_BANNER_PROPERTY:
		proton_plus_widgets_tools_inline_release_presentation_set_show_error_banner (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_widgets_tools_inline_release_interaction_state_get_instance_private (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsInlineReleaseInteractionState_private_offset);
}

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

ProtonPlusWidgetsToolsInlineExpansionTransition
proton_plus_widgets_tools_inline_release_interaction_state_expand (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                   GObject* new_owner)
{
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsInlineExpansionTransition _tmp1_ = 0;
	GObject* _tmp2_;
	ProtonPlusWidgetsToolsInlineExpansionTransition transition = 0;
	GObject* _tmp3_;
	ProtonPlusWidgetsToolsInlineExpansionTransition result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (new_owner != NULL, 0);
	_tmp0_ = self->priv->owner;
	if (_tmp0_ == new_owner) {
		result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_NONE;
		return result;
	}
	_tmp2_ = self->priv->owner;
	if (_tmp2_ == NULL) {
		_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_EXPAND;
	} else {
		_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_SWITCH;
	}
	transition = _tmp1_;
	_tmp3_ = _g_object_ref0 (new_owner);
	_g_object_unref0 (self->priv->owner);
	self->priv->owner = _tmp3_;
	result = transition;
	return result;
}

ProtonPlusWidgetsToolsInlineExpansionTransition
proton_plus_widgets_tools_inline_release_interaction_state_collapse (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                     GObject* collapsed_owner)
{
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsInlineExpansionTransition result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (collapsed_owner != NULL, 0);
	_tmp0_ = self->priv->owner;
	if (_tmp0_ != collapsed_owner) {
		result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_NONE;
		return result;
	}
	_g_object_unref0 (self->priv->owner);
	self->priv->owner = NULL;
	result = PROTON_PLUS_WIDGETS_TOOLS_INLINE_EXPANSION_TRANSITION_COLLAPSE;
	return result;
}

gboolean
proton_plus_widgets_tools_inline_release_interaction_state_is_expanded (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                        GObject* candidate)
{
	GObject* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (candidate != NULL, FALSE);
	_tmp0_ = self->priv->owner;
	result = _tmp0_ == candidate;
	return result;
}

void
proton_plus_widgets_tools_inline_release_interaction_state_remember_navigation (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                                GObject* current_owner,
                                                                                GObject* selected_item,
                                                                                gdouble position)
{
	GObject* _tmp0_;
	GObject* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (current_owner != NULL);
	g_return_if_fail (selected_item != NULL);
	_tmp0_ = _g_object_ref0 (current_owner);
	_g_object_unref0 (self->priv->navigation_owner);
	self->priv->navigation_owner = _tmp0_;
	_tmp1_ = _g_object_ref0 (selected_item);
	_g_object_unref0 (self->priv->navigation_item);
	self->priv->navigation_item = _tmp1_;
	self->priv->scroll_position = position;
}

gboolean
proton_plus_widgets_tools_inline_release_interaction_state_restore_navigation (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                               GObject* current_owner,
                                                                               GObject* selected_item,
                                                                               gdouble* position)
{
	gdouble _vala_position = 0.0;
	gboolean _tmp0_ = FALSE;
	GObject* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (current_owner != NULL, FALSE);
	g_return_val_if_fail (selected_item != NULL, FALSE);
	_vala_position = self->priv->scroll_position;
	_tmp1_ = self->priv->navigation_owner;
	if (_tmp1_ == current_owner) {
		GObject* _tmp2_;
		_tmp2_ = self->priv->navigation_item;
		_tmp0_ = _tmp2_ == selected_item;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	if (position) {
		*position = _vala_position;
	}
	return result;
}

void
proton_plus_widgets_tools_inline_release_interaction_state_clear_navigation (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self,
                                                                             GObject* cleared_owner)
{
	GObject* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cleared_owner != NULL);
	_tmp0_ = self->priv->navigation_owner;
	if (_tmp0_ != cleared_owner) {
		return;
	}
	_g_object_unref0 (self->priv->navigation_owner);
	self->priv->navigation_owner = NULL;
	_g_object_unref0 (self->priv->navigation_item);
	self->priv->navigation_item = NULL;
	self->priv->scroll_position = 0.0;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

gboolean
proton_plus_widgets_tools_inline_release_interaction_state_matches_filter (const gchar* query,
                                                                           const gchar* tool_title,
                                                                           gboolean expanded,
                                                                           gboolean has_loaded_release_match)
{
	gchar* normalized = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_;
	gboolean result;
	g_return_val_if_fail (query != NULL, FALSE);
	g_return_val_if_fail (tool_title != NULL, FALSE);
	_tmp0_ = string_strip (query);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_utf8_strdown (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	normalized = _tmp3_;
	_tmp6_ = normalized;
	if (g_strcmp0 (_tmp6_, "") == 0) {
		_tmp5_ = TRUE;
	} else {
		gchar* _tmp7_;
		gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = g_utf8_strdown (tool_title, (gssize) -1);
		_tmp8_ = _tmp7_;
		_tmp9_ = normalized;
		_tmp5_ = string_contains (_tmp8_, _tmp9_);
		_g_free0 (_tmp8_);
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		gboolean _tmp10_ = FALSE;
		if (expanded) {
			_tmp10_ = has_loaded_release_match;
		} else {
			_tmp10_ = FALSE;
		}
		_tmp4_ = _tmp10_;
	}
	result = _tmp4_;
	_g_free0 (normalized);
	return result;
}

ProtonPlusWidgetsToolsInlineReleaseInteractionState*
proton_plus_widgets_tools_inline_release_interaction_state_construct (GType object_type)
{
	ProtonPlusWidgetsToolsInlineReleaseInteractionState * self = NULL;
	self = (ProtonPlusWidgetsToolsInlineReleaseInteractionState*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsToolsInlineReleaseInteractionState*
proton_plus_widgets_tools_inline_release_interaction_state_new (void)
{
	return proton_plus_widgets_tools_inline_release_interaction_state_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_INTERACTION_STATE);
}

GObject*
proton_plus_widgets_tools_inline_release_interaction_state_get_expanded_owner (ProtonPlusWidgetsToolsInlineReleaseInteractionState* self)
{
	GObject* result;
	GObject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->owner;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_inline_release_interaction_state_class_init (ProtonPlusWidgetsToolsInlineReleaseInteractionStateClass * klass,
                                                                       gpointer klass_data)
{
	proton_plus_widgets_tools_inline_release_interaction_state_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsInlineReleaseInteractionState_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_inline_release_interaction_state_get_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_inline_release_interaction_state_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_EXPANDED_OWNER_PROPERTY, proton_plus_widgets_tools_inline_release_interaction_state_properties[PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_EXPANDED_OWNER_PROPERTY] = g_param_spec_object ("expanded-owner", "expanded-owner", "expanded-owner", G_TYPE_OBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_tools_inline_release_interaction_state_instance_init (ProtonPlusWidgetsToolsInlineReleaseInteractionState * self,
                                                                          gpointer klass)
{
	self->priv = proton_plus_widgets_tools_inline_release_interaction_state_get_instance_private (self);
	self->priv->scroll_position = 0.0;
}

static void
proton_plus_widgets_tools_inline_release_interaction_state_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsInlineReleaseInteractionState * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_INTERACTION_STATE, ProtonPlusWidgetsToolsInlineReleaseInteractionState);
	_g_object_unref0 (self->priv->owner);
	_g_object_unref0 (self->priv->navigation_owner);
	_g_object_unref0 (self->priv->navigation_item);
	G_OBJECT_CLASS (proton_plus_widgets_tools_inline_release_interaction_state_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_inline_release_interaction_state_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsInlineReleaseInteractionStateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_inline_release_interaction_state_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsInlineReleaseInteractionState), 0, (GInstanceInitFunc) proton_plus_widgets_tools_inline_release_interaction_state_instance_init, NULL };
	GType proton_plus_widgets_tools_inline_release_interaction_state_type_id;
	proton_plus_widgets_tools_inline_release_interaction_state_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsToolsInlineReleaseInteractionState", &g_define_type_info, 0);
	ProtonPlusWidgetsToolsInlineReleaseInteractionState_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_inline_release_interaction_state_type_id, sizeof (ProtonPlusWidgetsToolsInlineReleaseInteractionStatePrivate));
	return proton_plus_widgets_tools_inline_release_interaction_state_type_id;
}

GType
proton_plus_widgets_tools_inline_release_interaction_state_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_interaction_state_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_interaction_state_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_interaction_state_type_id;
		proton_plus_widgets_tools_inline_release_interaction_state_type_id = proton_plus_widgets_tools_inline_release_interaction_state_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_interaction_state_type_id__once, proton_plus_widgets_tools_inline_release_interaction_state_type_id);
	}
	return proton_plus_widgets_tools_inline_release_interaction_state_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_inline_release_interaction_state_get_property (GObject * object,
                                                                               guint property_id,
                                                                               GValue * value,
                                                                               GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsInlineReleaseInteractionState * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_INTERACTION_STATE, ProtonPlusWidgetsToolsInlineReleaseInteractionState);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_INTERACTION_STATE_EXPANDED_OWNER_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_inline_release_interaction_state_get_expanded_owner (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_widgets_tools_inline_release_request_guard_get_instance_private (ProtonPlusWidgetsToolsInlineReleaseRequestGuard* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsInlineReleaseRequestGuard_private_offset);
}

guint
proton_plus_widgets_tools_inline_release_request_guard_select (ProtonPlusWidgetsToolsInlineReleaseRequestGuard* self,
                                                               GObject* selected_owner)
{
	GObject* _tmp0_;
	guint _tmp1_;
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	g_return_val_if_fail (selected_owner != NULL, 0U);
	_tmp0_ = _g_object_ref0 (selected_owner);
	_g_object_unref0 (self->priv->owner);
	self->priv->owner = _tmp0_;
	_tmp1_ = self->priv->generation;
	self->priv->generation = _tmp1_ + 1;
	result = self->priv->generation;
	return result;
}

void
proton_plus_widgets_tools_inline_release_request_guard_clear (ProtonPlusWidgetsToolsInlineReleaseRequestGuard* self)
{
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->owner);
	self->priv->owner = NULL;
	_tmp0_ = self->priv->generation;
	self->priv->generation = _tmp0_ + 1;
}

gboolean
proton_plus_widgets_tools_inline_release_request_guard_is_current (ProtonPlusWidgetsToolsInlineReleaseRequestGuard* self,
                                                                   GObject* selected_owner,
                                                                   guint request_generation)
{
	gboolean _tmp0_ = FALSE;
	GObject* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (selected_owner != NULL, FALSE);
	_tmp1_ = self->priv->owner;
	if (_tmp1_ == selected_owner) {
		_tmp0_ = self->priv->generation == request_generation;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsToolsInlineReleaseRequestGuard*
proton_plus_widgets_tools_inline_release_request_guard_construct (GType object_type)
{
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard * self = NULL;
	self = (ProtonPlusWidgetsToolsInlineReleaseRequestGuard*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsToolsInlineReleaseRequestGuard*
proton_plus_widgets_tools_inline_release_request_guard_new (void)
{
	return proton_plus_widgets_tools_inline_release_request_guard_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_REQUEST_GUARD);
}

static void
proton_plus_widgets_tools_inline_release_request_guard_class_init (ProtonPlusWidgetsToolsInlineReleaseRequestGuardClass * klass,
                                                                   gpointer klass_data)
{
	proton_plus_widgets_tools_inline_release_request_guard_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsInlineReleaseRequestGuard_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_inline_release_request_guard_finalize;
}

static void
proton_plus_widgets_tools_inline_release_request_guard_instance_init (ProtonPlusWidgetsToolsInlineReleaseRequestGuard * self,
                                                                      gpointer klass)
{
	self->priv = proton_plus_widgets_tools_inline_release_request_guard_get_instance_private (self);
	self->priv->generation = (guint) 0;
}

static void
proton_plus_widgets_tools_inline_release_request_guard_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_INLINE_RELEASE_REQUEST_GUARD, ProtonPlusWidgetsToolsInlineReleaseRequestGuard);
	_g_object_unref0 (self->priv->owner);
	G_OBJECT_CLASS (proton_plus_widgets_tools_inline_release_request_guard_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_inline_release_request_guard_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsInlineReleaseRequestGuardClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_inline_release_request_guard_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsInlineReleaseRequestGuard), 0, (GInstanceInitFunc) proton_plus_widgets_tools_inline_release_request_guard_instance_init, NULL };
	GType proton_plus_widgets_tools_inline_release_request_guard_type_id;
	proton_plus_widgets_tools_inline_release_request_guard_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsToolsInlineReleaseRequestGuard", &g_define_type_info, 0);
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_inline_release_request_guard_type_id, sizeof (ProtonPlusWidgetsToolsInlineReleaseRequestGuardPrivate));
	return proton_plus_widgets_tools_inline_release_request_guard_type_id;
}

GType
proton_plus_widgets_tools_inline_release_request_guard_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_inline_release_request_guard_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_inline_release_request_guard_type_id__once)) {
		GType proton_plus_widgets_tools_inline_release_request_guard_type_id;
		proton_plus_widgets_tools_inline_release_request_guard_type_id = proton_plus_widgets_tools_inline_release_request_guard_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_inline_release_request_guard_type_id__once, proton_plus_widgets_tools_inline_release_request_guard_type_id);
	}
	return proton_plus_widgets_tools_inline_release_request_guard_type_id__once;
}

static inline gpointer
proton_plus_widgets_tools_releases_box_get_instance_private (ProtonPlusWidgetsToolsReleasesBox* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsReleasesBox_private_offset);
}

static gchar*
proton_plus_widgets_tools_releases_box_get_tool_variant_settings_key (ProtonPlusModelsTool* tool)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* result;
	g_return_val_if_fail (tool != NULL, NULL);
	_tmp0_ = proton_plus_models_tool_get_id (tool);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}

static gchar*
proton_plus_widgets_tools_releases_box_get_legacy_tool_variant_settings_key (ProtonPlusModelsTool* tool)
{
	ProtonPlusModelsGroup* _tmp0_;
	ProtonPlusModelsGroup* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusModelsLauncher* _tmp3_;
	const gchar* _tmp4_;
	ProtonPlusModelsGroup* _tmp5_;
	ProtonPlusModelsGroup* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* result;
	g_return_val_if_fail (tool != NULL, NULL);
	_tmp0_ = proton_plus_models_tool_get_group (tool);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_group_get_launcher (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_->title;
	_tmp5_ = proton_plus_models_tool_get_group (tool);
	_tmp6_ = _tmp5_;
	_tmp7_ = proton_plus_models_group_get_title (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = proton_plus_models_tool_get_title (tool);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf ("%s::%s::%s", _tmp4_, _tmp8_, _tmp10_);
	result = _tmp11_;
	return result;
}

static gchar*
proton_plus_widgets_tools_releases_box_get_variant_tooltip (const gchar* variant_name)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	static GQuark _tmp1_label6 = 0;
	static GQuark _tmp1_label7 = 0;
	gchar* result;
	g_return_val_if_fail (variant_name != NULL, NULL);
	_tmp0_ = variant_name;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("x86_64")))) {
		switch (0) {
			default:
			{
				gchar* _tmp3_;
				_tmp3_ = g_strdup (_ ("Standard 64-bit build for most Intel and AMD PCs."));
				result = _tmp3_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("x86_64_v3")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup (_ ("Optimized 64-bit build for Intel and AMD CPUs that support the x86-64-" \
"v3 instruction set."));
				result = _tmp4_;
				return result;
			}
		}
	} else if ((_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("arm64")))) || (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("aarch64"))))) {
		switch (0) {
			default:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup (_ ("64-bit ARM build. Choose this only on ARM64 hardware."));
				result = _tmp5_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("x86")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup (_ ("32-bit x86 build. Choose this only when a 32-bit runner is required."));
				result = _tmp6_;
				return result;
			}
		}
	} else if ((_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("wow64")))) || (_tmp2_ == ((0 != _tmp1_label6) ? _tmp1_label6 : (_tmp1_label6 = g_quark_from_static_string ("x86_64_wow64"))))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup (_ ("64-bit build with WoW64 support for running 32-bit Windows application" \
"s."));
				result = _tmp7_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label7) ? _tmp1_label7 : (_tmp1_label7 = g_quark_from_static_string ("default")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup (_ ("The provider's recommended build for most systems."));
				result = _tmp8_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup_printf (_ ("Select the %s build variant."), variant_name);
				result = _tmp9_;
				return result;
			}
		}
	}
}

static gchar*
proton_plus_widgets_tools_releases_box_get_saved_variant_name (ProtonPlusWidgetsToolsReleasesBox* self,
                                                               ProtonPlusModelsTool* tool)
{
	GSettings* _tmp0_;
	GSettings* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (tool != NULL, NULL);
	_tmp0_ = proton_plus_globals_SETTINGS;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = proton_plus_globals_SETTINGS;
	_tmp3_ = g_settings_get_string (_tmp2_, "selected-tool-variants");
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_widgets_tools_releases_box_get_saved_variant_name_from_json (_tmp4_, tool);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	result = _tmp6_;
	return result;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

gchar*
proton_plus_widgets_tools_releases_box_get_saved_variant_name_from_json (const gchar* raw,
                                                                         ProtonPlusModelsTool* tool)
{
	JsonNode* root_node = NULL;
	JsonNode* _tmp1_;
	gboolean _tmp2_ = FALSE;
	JsonNode* _tmp3_;
	JsonObject* root_obj = NULL;
	JsonNode* _tmp6_;
	JsonObject* _tmp7_;
	JsonObject* _tmp8_;
	gchar* saved_variant_name = NULL;
	JsonObject* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	JsonObject* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* result;
	g_return_val_if_fail (raw != NULL, NULL);
	g_return_val_if_fail (tool != NULL, NULL);
	if (g_strcmp0 (raw, "") == 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("");
		result = _tmp0_;
		return result;
	}
	_tmp1_ = proton_plus_utils_parser_get_node_from_json (raw);
	root_node = _tmp1_;
	_tmp3_ = root_node;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		JsonNode* _tmp4_;
		_tmp4_ = root_node;
		_tmp2_ = json_node_get_node_type (_tmp4_) != JSON_NODE_OBJECT;
	}
	if (_tmp2_) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup ("");
		result = _tmp5_;
		__vala_JsonNode_free0 (root_node);
		return result;
	}
	_tmp6_ = root_node;
	_tmp7_ = json_node_get_object (_tmp6_);
	_tmp8_ = _json_object_ref0 (_tmp7_);
	root_obj = _tmp8_;
	_tmp9_ = root_obj;
	_tmp10_ = proton_plus_widgets_tools_releases_box_get_tool_variant_settings_key (tool);
	_tmp11_ = _tmp10_;
	_tmp12_ = json_object_get_string_member_with_default (_tmp9_, _tmp11_, "");
	_tmp13_ = g_strdup (_tmp12_);
	_tmp14_ = _tmp13_;
	_g_free0 (_tmp11_);
	saved_variant_name = _tmp14_;
	_tmp15_ = saved_variant_name;
	if (g_strcmp0 (_tmp15_, "") != 0) {
		result = saved_variant_name;
		_json_object_unref0 (root_obj);
		__vala_JsonNode_free0 (root_node);
		return result;
	}
	_tmp16_ = root_obj;
	_tmp17_ = proton_plus_widgets_tools_releases_box_get_legacy_tool_variant_settings_key (tool);
	_tmp18_ = _tmp17_;
	_tmp19_ = json_object_get_string_member_with_default (_tmp16_, _tmp18_, "");
	_tmp20_ = g_strdup (_tmp19_);
	_tmp21_ = _tmp20_;
	_g_free0 (_tmp18_);
	result = _tmp21_;
	_g_free0 (saved_variant_name);
	_json_object_unref0 (root_obj);
	__vala_JsonNode_free0 (root_node);
	return result;
}

static void
proton_plus_widgets_tools_releases_box_save_selected_variant_name (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                   ProtonPlusModelsTool* tool,
                                                                   const gchar* variant_name)
{
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	GSettings* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	g_return_if_fail (variant_name != NULL);
	_tmp0_ = proton_plus_globals_SETTINGS;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = proton_plus_globals_SETTINGS;
	_tmp2_ = proton_plus_globals_SETTINGS;
	_tmp3_ = g_settings_get_string (_tmp2_, "selected-tool-variants");
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_widgets_tools_releases_box_get_json_with_saved_variant_name (_tmp4_, tool, variant_name);
	_tmp6_ = _tmp5_;
	g_settings_set_string (_tmp1_, "selected-tool-variants", _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
}

gchar*
proton_plus_widgets_tools_releases_box_get_json_with_saved_variant_name (const gchar* raw,
                                                                         ProtonPlusModelsTool* tool,
                                                                         const gchar* variant_name)
{
	JsonObject* root_obj = NULL;
	JsonNode* root_node = NULL;
	JsonNode* _tmp0_;
	gboolean _tmp1_ = FALSE;
	JsonNode* _tmp2_;
	JsonObject* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	JsonNode* node = NULL;
	JsonNode* _tmp11_;
	JsonObject* _tmp12_;
	JsonGenerator* generator = NULL;
	JsonGenerator* _tmp13_;
	gchar* _tmp14_;
	gchar* result;
	g_return_val_if_fail (raw != NULL, NULL);
	g_return_val_if_fail (tool != NULL, NULL);
	g_return_val_if_fail (variant_name != NULL, NULL);
	_tmp0_ = proton_plus_utils_parser_get_node_from_json (raw);
	root_node = _tmp0_;
	_tmp2_ = root_node;
	if (_tmp2_ != NULL) {
		JsonNode* _tmp3_;
		_tmp3_ = root_node;
		_tmp1_ = json_node_get_node_type (_tmp3_) == JSON_NODE_OBJECT;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		JsonNode* _tmp4_;
		JsonObject* _tmp5_;
		JsonObject* _tmp6_;
		_tmp4_ = root_node;
		_tmp5_ = json_node_get_object (_tmp4_);
		_tmp6_ = _json_object_ref0 (_tmp5_);
		_json_object_unref0 (root_obj);
		root_obj = _tmp6_;
	} else {
		JsonObject* _tmp7_;
		_tmp7_ = json_object_new ();
		_json_object_unref0 (root_obj);
		root_obj = _tmp7_;
	}
	_tmp8_ = root_obj;
	_tmp9_ = proton_plus_widgets_tools_releases_box_get_tool_variant_settings_key (tool);
	_tmp10_ = _tmp9_;
	json_object_set_string_member (_tmp8_, _tmp10_, variant_name);
	_g_free0 (_tmp10_);
	_tmp11_ = json_node_new (JSON_NODE_OBJECT);
	node = _tmp11_;
	_tmp12_ = root_obj;
	json_node_set_object (node, _tmp12_);
	_tmp13_ = json_generator_new ();
	generator = _tmp13_;
	json_generator_set_root (generator, node);
	_tmp14_ = json_generator_to_data (generator, NULL);
	result = _tmp14_;
	_g_object_unref0 (generator);
	__vala_JsonNode_free0 (node);
	__vala_JsonNode_free0 (root_node);
	_json_object_unref0 (root_obj);
	return result;
}

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

static void
_proton_plus_widgets_tools_releases_box_on_refresh_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_refresh_clicked ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

static void
__lambda66_ (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkPopover* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ProtonPlusModelsTool* _tmp2_;
	_tmp0_ = self->priv->actions_popover;
	gtk_popover_popdown (_tmp0_);
	_tmp2_ = self->priv->current_tool;
	if (_tmp2_ != NULL) {
		ProtonPlusModelsTool* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->priv->current_tool;
		_tmp4_ = proton_plus_models_tool_get_repository_url (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = g_strcmp0 (_tmp5_, "") != 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ProtonPlusModelsTool* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = self->priv->current_tool;
		_tmp7_ = proton_plus_models_tool_get_repository_url (_tmp6_);
		_tmp8_ = _tmp7_;
		proton_plus_utils_system_open_uri (_tmp8_);
	}
}

static void
___lambda66__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda66_ ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

static gpointer
_gtk_expression_ref0 (gpointer self)
{
	return self ? gtk_expression_ref (self) : NULL;
}

static void
_proton_plus_widgets_tools_releases_box_on_variant_selected_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_variant_selected ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

static void
_proton_plus_widgets_tools_releases_box_on_variant_list_item_setup_gtk_signal_list_item_factory_setup (GtkSignalListItemFactory* _sender,
                                                                                                       GObject* object,
                                                                                                       gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_variant_list_item_setup ((ProtonPlusWidgetsToolsReleasesBox*) self, object);
}

static void
_proton_plus_widgets_tools_releases_box_on_variant_list_item_bind_gtk_signal_list_item_factory_bind (GtkSignalListItemFactory* _sender,
                                                                                                     GObject* object,
                                                                                                     gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_variant_list_item_bind ((ProtonPlusWidgetsToolsReleasesBox*) self, object);
}

static void
_proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind_gtk_signal_list_item_factory_unbind (GtkSignalListItemFactory* _sender,
                                                                                                         GObject* object,
                                                                                                         gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind ((ProtonPlusWidgetsToolsReleasesBox*) self, object);
}

static gboolean
_proton_plus_widgets_tools_releases_box_filter_func_gtk_list_box_filter_func (GtkListBoxRow* row,
                                                                              gpointer self)
{
	gboolean result;
	result = proton_plus_widgets_tools_releases_box_filter_func ((ProtonPlusWidgetsToolsReleasesBox*) self, row);
	return result;
}

static void
_proton_plus_widgets_tools_releases_box_on_load_more_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_load_more_clicked ((ProtonPlusWidgetsToolsReleasesBox*) self, NULL, NULL);
}

static void
_proton_plus_widgets_tools_releases_box_on_empty_action_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self)
{
	proton_plus_widgets_tools_releases_box_on_empty_action_clicked ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

static void
_proton_plus_widgets_tools_releases_box_retry_current_request_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	proton_plus_widgets_tools_releases_box_retry_current_request ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

static void
_proton_plus_widgets_tools_releases_box_retry_current_request_adw_banner_button_clicked (AdwBanner* _sender,
                                                                                         gpointer self)
{
	proton_plus_widgets_tools_releases_box_retry_current_request ((ProtonPlusWidgetsToolsReleasesBox*) self);
}

ProtonPlusWidgetsToolsReleasesBox*
proton_plus_widgets_tools_releases_box_construct (GType object_type)
{
	ProtonPlusWidgetsToolsReleasesBox * self = NULL;
	GHashTable* _tmp0_;
	AdwButtonContent* refresh_button_content = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	AdwButtonContent* _tmp3_ = NULL;
	GtkWidget* _tmp4_;
	GtkButton* _tmp5_ = NULL;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	AdwButtonContent* repository_button_content = NULL;
	gchar* _tmp9_;
	gchar* _tmp10_;
	AdwButtonContent* _tmp11_ = NULL;
	GtkWidget* _tmp12_;
	GtkButton* _tmp13_ = NULL;
	GtkButton* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkExpression* expression = NULL;
	GtkPropertyExpression* _tmp18_;
	GtkExpression* _tmp19_;
	gchar* _tmp20_;
	GtkDropDown* _tmp21_ = NULL;
	GtkDropDown* _tmp22_;
	GtkDropDown* _tmp23_;
	GtkDropDown* _tmp24_;
	GtkDropDown* _tmp25_;
	GtkDropDown* _tmp26_;
	GtkSignalListItemFactory* variant_list_factory = NULL;
	GtkSignalListItemFactory* _tmp27_;
	GtkDropDown* _tmp28_;
	gchar* _tmp29_;
	gchar** _tmp30_;
	GtkLabel* _tmp31_ = NULL;
	GtkBox* variant_controls = NULL;
	GtkBox* _tmp32_ = NULL;
	GtkLabel* _tmp33_;
	GtkDropDown* _tmp34_;
	GtkBox* _tmp35_ = NULL;
	GtkBox* _tmp36_;
	GtkBox* _tmp37_;
	GtkBox* _tmp38_;
	GtkListBox* _tmp39_ = NULL;
	GtkListBox* _tmp40_;
	GtkListBox* _tmp41_;
	GtkListBox* _tmp42_;
	GtkListBox* _tmp43_;
	GtkButton* _tmp44_ = NULL;
	GtkButton* _tmp45_;
	GtkButton* _tmp46_;
	GtkButton* _tmp47_;
	GtkButton* _tmp48_;
	GtkWidget* _tmp49_;
	GtkListBoxRow* _tmp50_ = NULL;
	GtkListBox* _tmp51_;
	GtkListBoxRow* _tmp52_;
	AdwSpinner* spinner = NULL;
	AdwSpinner* _tmp53_ = NULL;
	GtkBox* spinner_box = NULL;
	GtkBox* _tmp54_ = NULL;
	GtkBox* loading_box = NULL;
	GtkBox* _tmp55_ = NULL;
	GtkLabel* _tmp56_;
	GtkLabel* _tmp57_;
	GtkStack* _tmp58_ = NULL;
	GtkStack* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	AdwStatusPage* _tmp63_ = NULL;
	AdwStatusPage* _tmp64_;
	gchar* _tmp65_;
	GtkButton* _tmp66_ = NULL;
	GtkButton* _tmp67_;
	GtkButton* _tmp68_;
	GtkButton* _tmp69_;
	AdwStatusPage* _tmp70_;
	GtkButton* _tmp71_;
	GtkButton* _tmp72_ = NULL;
	GtkButton* _tmp73_;
	GtkButton* _tmp74_;
	GtkButton* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	GtkButton* _tmp78_;
	GtkWidget* _tmp79_;
	AdwStatusPage* _tmp80_ = NULL;
	AdwStatusPage* _tmp81_;
	AdwBanner* _tmp82_;
	AdwBanner* _tmp83_;
	AdwBanner* _tmp84_;
	AdwBanner* _tmp85_;
	AdwBanner* _tmp86_;
	AdwBanner* _tmp87_;
	GtkStack* _tmp88_;
	GtkListBox* _tmp89_;
	GtkStack* _tmp90_;
	GtkStack* _tmp91_;
	AdwStatusPage* _tmp92_;
	GtkStack* _tmp93_;
	AdwStatusPage* _tmp94_;
	GtkBox* actions_popover_box = NULL;
	GtkBox* _tmp95_ = NULL;
	GtkButton* _tmp96_;
	GtkButton* _tmp97_;
	GtkWidget* _tmp98_;
	GtkPopover* _tmp99_ = NULL;
	GtkBox* _tmp100_;
	GtkBox* _tmp101_;
	GtkBox* _tmp102_;
	GtkBox* _tmp103_;
	GtkBox* _tmp104_;
	AdwBanner* _tmp105_;
	GtkBox* _tmp106_;
	GtkStack* _tmp107_;
	GtkBox* _tmp108_;
	self = (ProtonPlusWidgetsToolsReleasesBox*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, "spacing", 0, NULL);
	_tmp0_ = g_hash_table_new_full (NULL, NULL, _g_object_unref0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->variant_list_items);
	self->priv->variant_list_items = _tmp0_;
	_tmp1_ = g_strdup ("arrows-rotate-symbolic");
	_tmp2_ = g_strdup (_ ("Check for new releases"));
	_tmp3_ = (AdwButtonContent*) adw_button_content_new ();
	adw_button_content_set_icon_name (_tmp3_, _tmp1_);
	_g_free0 (_tmp1_);
	adw_button_content_set_label (_tmp3_, _tmp2_);
	_g_free0 (_tmp2_);
	g_object_ref_sink (_tmp3_);
	refresh_button_content = _tmp3_;
	_tmp4_ = _g_object_ref0 ((GtkWidget*) refresh_button_content);
	_tmp5_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
	gtk_button_set_child (_tmp5_, _tmp4_);
	_g_object_unref0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	_tmp6_ = _tmp5_;
	proton_plus_widgets_tools_releases_box_set_refresh_button (self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = self->priv->_refresh_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp7_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Check for new releases"), -1, -1);
	_tmp8_ = self->priv->_refresh_button;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) _proton_plus_widgets_tools_releases_box_on_refresh_clicked_gtk_button_clicked, self, 0);
	_tmp9_ = g_strdup ("globe-symbolic");
	_tmp10_ = g_strdup (_ ("Open Repository"));
	_tmp11_ = (AdwButtonContent*) adw_button_content_new ();
	adw_button_content_set_icon_name (_tmp11_, _tmp9_);
	_g_free0 (_tmp9_);
	adw_button_content_set_label (_tmp11_, _tmp10_);
	_g_free0 (_tmp10_);
	g_object_ref_sink (_tmp11_);
	repository_button_content = _tmp11_;
	_tmp12_ = _g_object_ref0 ((GtkWidget*) repository_button_content);
	_tmp13_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp13_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp13_, TRUE);
	gtk_button_set_child (_tmp13_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	gtk_widget_set_visible ((GtkWidget*) _tmp13_, FALSE);
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	proton_plus_widgets_tools_releases_box_set_repository_button (self, _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = self->priv->_repository_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp15_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Open Repository"), -1, -1);
	_tmp16_ = self->priv->_repository_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp16_, _ ("Open Repository"));
	_tmp17_ = self->priv->_repository_button;
	g_signal_connect_object (_tmp17_, "clicked", (GCallback) ___lambda66__gtk_button_clicked, self, 0);
	_tmp18_ = (GtkPropertyExpression*) gtk_property_expression_new (gtk_string_object_get_type (), NULL, "string");
	expression = (GtkExpression*) _tmp18_;
	_tmp19_ = _gtk_expression_ref0 (expression);
	_tmp20_ = g_strdup (_ ("Choose which architecture or build variant to show."));
	_tmp21_ = (GtkDropDown*) gtk_drop_down_new (NULL, _tmp19_);
	gtk_widget_set_visible ((GtkWidget*) _tmp21_, FALSE);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp21_, _tmp20_);
	_g_free0 (_tmp20_);
	g_object_ref_sink (_tmp21_);
	_tmp22_ = _tmp21_;
	proton_plus_widgets_tools_releases_box_set_variant_dropdown (self, _tmp22_);
	_g_object_unref0 (_tmp22_);
	_tmp23_ = self->priv->_variant_dropdown;
	gtk_accessible_update_property ((GtkAccessible*) _tmp23_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Build"), -1, -1);
	_tmp24_ = self->priv->_variant_dropdown;
	gtk_widget_set_valign ((GtkWidget*) _tmp24_, GTK_ALIGN_CENTER);
	_tmp25_ = self->priv->_variant_dropdown;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp25_, TRUE);
	_tmp26_ = self->priv->_variant_dropdown;
	g_signal_connect_object ((GObject*) _tmp26_, "notify::selected", (GCallback) _proton_plus_widgets_tools_releases_box_on_variant_selected_g_object_notify, self, 0);
	_tmp27_ = (GtkSignalListItemFactory*) gtk_signal_list_item_factory_new ();
	variant_list_factory = _tmp27_;
	g_signal_connect_object (variant_list_factory, "setup", (GCallback) _proton_plus_widgets_tools_releases_box_on_variant_list_item_setup_gtk_signal_list_item_factory_setup, self, 0);
	g_signal_connect_object (variant_list_factory, "bind", (GCallback) _proton_plus_widgets_tools_releases_box_on_variant_list_item_bind_gtk_signal_list_item_factory_bind, self, 0);
	g_signal_connect_object (variant_list_factory, "unbind", (GCallback) _proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind_gtk_signal_list_item_factory_unbind, self, 0);
	_tmp28_ = self->priv->_variant_dropdown;
	gtk_drop_down_set_list_factory (_tmp28_, (GtkListItemFactory*) variant_list_factory);
	_tmp29_ = g_strdup ("dim-label");
	_tmp30_ = g_new0 (gchar*, 1 + 1);
	_tmp30_[0] = _tmp29_;
	_tmp31_ = (GtkLabel*) gtk_label_new (_ ("Build"));
	gtk_widget_set_halign ((GtkWidget*) _tmp31_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp31_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp31_, _tmp30_);
	_tmp30_ = (_vala_array_free (_tmp30_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->variant_label);
	self->priv->variant_label = _tmp31_;
	_tmp32_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp32_, TRUE);
	g_object_ref_sink (_tmp32_);
	variant_controls = _tmp32_;
	_tmp33_ = self->priv->variant_label;
	gtk_box_append (variant_controls, (GtkWidget*) _tmp33_);
	_tmp34_ = self->priv->_variant_dropdown;
	gtk_box_append (variant_controls, (GtkWidget*) _tmp34_);
	_tmp35_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
	gtk_widget_set_visible ((GtkWidget*) _tmp35_, FALSE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp35_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp35_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp35_, 8);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp35_, 8);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp35_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp35_, 12);
	g_object_ref_sink (_tmp35_);
	_tmp36_ = _tmp35_;
	proton_plus_widgets_tools_releases_box_set_variant_box (self, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = self->priv->_variant_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp37_, "tools-release-toolbar");
	_tmp38_ = self->priv->_variant_box;
	gtk_box_append (_tmp38_, (GtkWidget*) variant_controls);
	_tmp39_ = (GtkListBox*) gtk_list_box_new ();
	gtk_list_box_set_selection_mode (_tmp39_, GTK_SELECTION_NONE);
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	proton_plus_widgets_tools_releases_box_set_list_box (self, _tmp40_);
	_g_object_unref0 (_tmp40_);
	_tmp41_ = self->priv->_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp41_, "boxed-list");
	_tmp42_ = self->priv->_list_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp42_, "tools-releases-card");
	_tmp43_ = self->priv->_list_box;
	gtk_list_box_set_filter_func (_tmp43_, _proton_plus_widgets_tools_releases_box_filter_func_gtk_list_box_filter_func, g_object_ref (self), g_object_unref);
	_tmp44_ = (GtkButton*) gtk_button_new_with_label (_ ("Load More"));
	gtk_widget_set_margin_top ((GtkWidget*) _tmp44_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp44_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp44_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp44_, 12);
	gtk_widget_set_halign ((GtkWidget*) _tmp44_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp44_, TRUE);
	g_object_ref_sink (_tmp44_);
	_g_object_unref0 (self->priv->load_more_button);
	self->priv->load_more_button = _tmp44_;
	_tmp45_ = self->priv->load_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp45_, "pill");
	_tmp46_ = self->priv->load_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp46_, "suggested-action");
	_tmp47_ = self->priv->load_more_button;
	g_signal_connect_object (_tmp47_, "clicked", (GCallback) _proton_plus_widgets_tools_releases_box_on_load_more_clicked_gtk_button_clicked, self, 0);
	_tmp48_ = self->priv->load_more_button;
	_tmp49_ = _g_object_ref0 ((GtkWidget*) _tmp48_);
	_tmp50_ = (GtkListBoxRow*) gtk_list_box_row_new ();
	gtk_list_box_row_set_child (_tmp50_, _tmp49_);
	_g_object_unref0 (_tmp49_);
	gtk_list_box_row_set_activatable (_tmp50_, FALSE);
	gtk_list_box_row_set_selectable (_tmp50_, FALSE);
	gtk_widget_set_focusable ((GtkWidget*) _tmp50_, FALSE);
	gtk_widget_set_visible ((GtkWidget*) _tmp50_, FALSE);
	g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->priv->load_more_row);
	self->priv->load_more_row = _tmp50_;
	_tmp51_ = self->priv->_list_box;
	_tmp52_ = self->priv->load_more_row;
	gtk_list_box_append (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = (AdwSpinner*) adw_spinner_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp53_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp53_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp53_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp53_, FALSE);
	g_object_ref_sink (_tmp53_);
	spinner = _tmp53_;
	gtk_widget_set_size_request ((GtkWidget*) spinner, 32, 32);
	_tmp54_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp54_, FALSE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp54_, TRUE);
	g_object_ref_sink (_tmp54_);
	spinner_box = _tmp54_;
	_tmp55_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp55_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp55_, 18);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp55_, 18);
	g_object_ref_sink (_tmp55_);
	loading_box = _tmp55_;
	gtk_box_append (loading_box, (GtkWidget*) spinner);
	_tmp56_ = (GtkLabel*) gtk_label_new (_ ("Loading releases"));
	g_object_ref_sink (_tmp56_);
	_tmp57_ = _tmp56_;
	gtk_box_append (loading_box, (GtkWidget*) _tmp57_);
	_g_object_unref0 (_tmp57_);
	gtk_box_append (spinner_box, (GtkWidget*) loading_box);
	_tmp58_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp58_, FALSE);
	gtk_widget_set_overflow ((GtkWidget*) _tmp58_, GTK_OVERFLOW_HIDDEN);
	g_object_ref_sink (_tmp58_);
	_tmp59_ = _tmp58_;
	proton_plus_widgets_tools_releases_box_set_content_stack (self, _tmp59_);
	_g_object_unref0 (_tmp59_);
	_tmp60_ = g_strdup (_ ("No releases available"));
	_tmp61_ = g_strdup (_ ("Check again for new releases."));
	_tmp62_ = g_strdup ("box-open-symbolic");
	_tmp63_ = (AdwStatusPage*) adw_status_page_new ();
	adw_status_page_set_title (_tmp63_, _tmp60_);
	_g_free0 (_tmp60_);
	adw_status_page_set_description (_tmp63_, _tmp61_);
	_g_free0 (_tmp61_);
	adw_status_page_set_icon_name (_tmp63_, _tmp62_);
	_g_free0 (_tmp62_);
	g_object_ref_sink (_tmp63_);
	_tmp64_ = _tmp63_;
	proton_plus_widgets_tools_releases_box_set_status_page (self, _tmp64_);
	_g_object_unref0 (_tmp64_);
	_tmp65_ = g_strdup (_ ("Refresh"));
	_tmp66_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_label (_tmp66_, _tmp65_);
	_g_free0 (_tmp65_);
	gtk_widget_set_halign ((GtkWidget*) _tmp66_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp66_);
	_tmp67_ = _tmp66_;
	proton_plus_widgets_tools_releases_box_set_empty_action_button (self, _tmp67_);
	_g_object_unref0 (_tmp67_);
	_tmp68_ = self->priv->_empty_action_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp68_, "suggested-action");
	_tmp69_ = self->priv->_empty_action_button;
	g_signal_connect_object (_tmp69_, "clicked", (GCallback) _proton_plus_widgets_tools_releases_box_on_empty_action_clicked_gtk_button_clicked, self, 0);
	_tmp70_ = self->priv->_status_page;
	_tmp71_ = self->priv->_empty_action_button;
	adw_status_page_set_child (_tmp70_, (GtkWidget*) _tmp71_);
	_tmp72_ = (GtkButton*) gtk_button_new_with_label (_ ("Retry"));
	gtk_widget_set_halign ((GtkWidget*) _tmp72_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp72_);
	_tmp73_ = _tmp72_;
	proton_plus_widgets_tools_releases_box_set_error_retry_button (self, _tmp73_);
	_g_object_unref0 (_tmp73_);
	_tmp74_ = self->priv->_error_retry_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp74_, "suggested-action");
	_tmp75_ = self->priv->_error_retry_button;
	g_signal_connect_object (_tmp75_, "clicked", (GCallback) _proton_plus_widgets_tools_releases_box_retry_current_request_gtk_button_clicked, self, 0);
	_tmp76_ = g_strdup (_ ("Failed to Fetch Releases"));
	_tmp77_ = g_strdup ("dialog-error-symbolic");
	_tmp78_ = self->priv->_error_retry_button;
	_tmp79_ = _g_object_ref0 ((GtkWidget*) _tmp78_);
	_tmp80_ = (AdwStatusPage*) adw_status_page_new ();
	adw_status_page_set_title (_tmp80_, _tmp76_);
	_g_free0 (_tmp76_);
	adw_status_page_set_icon_name (_tmp80_, _tmp77_);
	_g_free0 (_tmp77_);
	adw_status_page_set_child (_tmp80_, _tmp79_);
	_g_object_unref0 (_tmp79_);
	g_object_ref_sink (_tmp80_);
	_tmp81_ = _tmp80_;
	proton_plus_widgets_tools_releases_box_set_error_page (self, _tmp81_);
	_g_object_unref0 (_tmp81_);
	_tmp82_ = (AdwBanner*) adw_banner_new (_ ("Couldn’t load releases"));
	g_object_ref_sink (_tmp82_);
	_tmp83_ = _tmp82_;
	proton_plus_widgets_tools_releases_box_set_error_banner (self, _tmp83_);
	_g_object_unref0 (_tmp83_);
	_tmp84_ = self->priv->_error_banner;
	adw_banner_set_button_label (_tmp84_, _ ("Retry"));
	_tmp85_ = self->priv->_error_banner;
	gtk_widget_set_focusable ((GtkWidget*) _tmp85_, TRUE);
	_tmp86_ = self->priv->_error_banner;
	g_signal_connect_object (_tmp86_, "button-clicked", (GCallback) _proton_plus_widgets_tools_releases_box_retry_current_request_adw_banner_button_clicked, self, 0);
	_tmp87_ = self->priv->_error_banner;
	adw_banner_set_revealed (_tmp87_, FALSE);
	_tmp88_ = self->priv->_content_stack;
	_tmp89_ = self->priv->_list_box;
	gtk_stack_add_named (_tmp88_, (GtkWidget*) _tmp89_, "list");
	_tmp90_ = self->priv->_content_stack;
	gtk_stack_add_named (_tmp90_, (GtkWidget*) spinner_box, "spinner");
	_tmp91_ = self->priv->_content_stack;
	_tmp92_ = self->priv->_status_page;
	gtk_stack_add_named (_tmp91_, (GtkWidget*) _tmp92_, "empty");
	_tmp93_ = self->priv->_content_stack;
	_tmp94_ = self->priv->_error_page;
	gtk_stack_add_named (_tmp93_, (GtkWidget*) _tmp94_, "error");
	_tmp95_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_set ((GtkWidget*) _tmp95_, "width-request", 240, NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp95_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp95_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp95_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp95_, 6);
	g_object_ref_sink (_tmp95_);
	actions_popover_box = _tmp95_;
	_tmp96_ = self->priv->_repository_button;
	gtk_box_append (actions_popover_box, (GtkWidget*) _tmp96_);
	_tmp97_ = self->priv->_refresh_button;
	gtk_box_append (actions_popover_box, (GtkWidget*) _tmp97_);
	_tmp98_ = _g_object_ref0 ((GtkWidget*) actions_popover_box);
	_tmp99_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_child (_tmp99_, _tmp98_);
	_g_object_unref0 (_tmp98_);
	g_object_ref_sink (_tmp99_);
	_g_object_unref0 (self->priv->actions_popover);
	self->priv->actions_popover = _tmp99_;
	_tmp100_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp100_);
	_tmp101_ = _tmp100_;
	proton_plus_widgets_tools_releases_box_set_tool_box (self, _tmp101_);
	_g_object_unref0 (_tmp101_);
	_tmp102_ = self->priv->_tool_box;
	_tmp103_ = self->priv->_variant_box;
	gtk_box_append (_tmp102_, (GtkWidget*) _tmp103_);
	_tmp104_ = self->priv->_tool_box;
	_tmp105_ = self->priv->_error_banner;
	gtk_box_append (_tmp104_, (GtkWidget*) _tmp105_);
	_tmp106_ = self->priv->_tool_box;
	_tmp107_ = self->priv->_content_stack;
	gtk_box_append (_tmp106_, (GtkWidget*) _tmp107_);
	_tmp108_ = self->priv->_tool_box;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp108_);
	_g_object_unref0 (actions_popover_box);
	_g_object_unref0 (loading_box);
	_g_object_unref0 (spinner_box);
	_g_object_unref0 (spinner);
	_g_object_unref0 (variant_controls);
	_g_object_unref0 (variant_list_factory);
	_gtk_expression_unref0 (expression);
	_g_object_unref0 (repository_button_content);
	_g_object_unref0 (refresh_button_content);
	return self;
}

ProtonPlusWidgetsToolsReleasesBox*
proton_plus_widgets_tools_releases_box_new (void)
{
	return proton_plus_widgets_tools_releases_box_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX);
}

void
proton_plus_widgets_tools_releases_box_attach_actions_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                              GtkBox* header_host,
                                                              GtkMenuButton* button)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GtkMenuButton* _tmp2_;
	GtkBox* _tmp6_;
	GtkPopover* _tmp7_;
	GtkPopover* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (header_host != NULL);
	g_return_if_fail (button != NULL);
	_tmp2_ = self->priv->actions_button;
	if (_tmp2_ == button) {
		GtkBox* _tmp3_;
		_tmp3_ = self->priv->actions_header_host;
		_tmp1_ = _tmp3_ == header_host;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkPopover* _tmp4_;
		GtkPopover* _tmp5_;
		_tmp4_ = gtk_menu_button_get_popover (button);
		_tmp5_ = self->priv->actions_popover;
		_tmp0_ = _tmp4_ == _tmp5_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		return;
	}
	proton_plus_widgets_tools_releases_box_detach_actions_button (self);
	_tmp6_ = _g_object_ref0 (header_host);
	_g_object_unref0 (self->priv->actions_header_host);
	self->priv->actions_header_host = _tmp6_;
	self->priv->actions_button = button;
	_tmp7_ = self->priv->actions_popover;
	gtk_menu_button_set_popover (button, _tmp7_);
	gtk_widget_set_visible ((GtkWidget*) button, FALSE);
	gtk_widget_set_visible ((GtkWidget*) header_host, FALSE);
	_tmp8_ = self->priv->actions_popover;
	proton_plus_widgets_window_register_popover_for_controller (_tmp8_, (GtkWidget*) button, NULL);
}

static void
proton_plus_widgets_tools_releases_box_detach_actions_button (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkMenuButton* _tmp0_;
	GtkMenuButton* button = NULL;
	GtkMenuButton* _tmp1_;
	GtkMenuButton* _tmp2_;
	GtkMenuButton* _tmp3_;
	GtkMenuButton* _tmp4_;
	GtkMenuButton* _tmp5_;
	GtkWidget* _tmp6_;
	GtkBox* _tmp7_;
	gboolean _tmp10_ = FALSE;
	GtkBox* _tmp11_;
	GtkMenuButton* _tmp17_;
	GtkBox* _tmp18_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->actions_button;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->actions_button;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_menu_button_get_type (), GtkMenuButton));
	button = _tmp2_;
	_tmp3_ = button;
	gtk_menu_button_popdown (_tmp3_);
	_tmp4_ = button;
	gtk_menu_button_set_popover (_tmp4_, NULL);
	_tmp5_ = button;
	_tmp6_ = gtk_widget_get_parent ((GtkWidget*) _tmp5_);
	_tmp7_ = self->priv->_variant_box;
	if (_tmp6_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)) {
		GtkBox* _tmp8_;
		GtkMenuButton* _tmp9_;
		_tmp8_ = self->priv->_variant_box;
		_tmp9_ = button;
		gtk_box_remove (_tmp8_, (GtkWidget*) _tmp9_);
	}
	_tmp11_ = self->priv->actions_header_host;
	if (_tmp11_ != NULL) {
		GtkMenuButton* _tmp12_;
		GtkWidget* _tmp13_;
		GtkBox* _tmp14_;
		_tmp12_ = button;
		_tmp13_ = gtk_widget_get_parent ((GtkWidget*) _tmp12_);
		_tmp14_ = self->priv->actions_header_host;
		_tmp10_ = _tmp13_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		GtkBox* _tmp15_;
		GtkMenuButton* _tmp16_;
		_tmp15_ = self->priv->actions_header_host;
		_tmp16_ = button;
		gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_box_get_type (), GtkBox), (GtkWidget*) _tmp16_);
	}
	_tmp17_ = button;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, FALSE);
	_tmp18_ = self->priv->actions_header_host;
	if (_tmp18_ != NULL) {
		GtkBox* _tmp19_;
		_tmp19_ = self->priv->actions_header_host;
		gtk_widget_set_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, gtk_box_get_type (), GtkBox), FALSE);
	}
	self->priv->actions_button = NULL;
	_g_object_unref0 (self->priv->actions_header_host);
	self->priv->actions_header_host = NULL;
	_g_object_unref0 (button);
}

static void
proton_plus_widgets_tools_releases_box_update_actions_placement (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	GtkMenuButton* _tmp1_;
	GtkMenuButton* button = NULL;
	GtkMenuButton* _tmp3_;
	GtkMenuButton* _tmp4_;
	GtkBox* header_host = NULL;
	GtkBox* _tmp5_;
	GtkBox* _tmp6_;
	ProtonPlusWidgetsToolsInlineReleaseActionsPlacement placement = 0;
	GtkDropDown* _tmp7_;
	GtkMenuButton* _tmp34_;
	ProtonPlusModelsTool* _tmp35_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->actions_button;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GtkBox* _tmp2_;
		_tmp2_ = self->priv->actions_header_host;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->actions_button;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_menu_button_get_type (), GtkMenuButton));
	button = _tmp4_;
	_tmp5_ = self->priv->actions_header_host;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_box_get_type (), GtkBox));
	header_host = _tmp6_;
	_tmp7_ = self->priv->_variant_dropdown;
	placement = proton_plus_widgets_tools_inline_release_presentation_actions_placement (gtk_widget_get_visible ((GtkWidget*) _tmp7_));
	if (placement == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_ACTIONS_PLACEMENT_TOOLBAR) {
		GtkMenuButton* _tmp8_;
		GtkWidget* _tmp9_;
		GtkBox* _tmp10_;
		GtkMenuButton* _tmp13_;
		GtkWidget* _tmp14_;
		GtkBox* _tmp15_;
		GtkBox* _tmp18_;
		GtkBox* _tmp19_;
		ProtonPlusModelsTool* _tmp20_;
		_tmp8_ = button;
		_tmp9_ = gtk_widget_get_parent ((GtkWidget*) _tmp8_);
		_tmp10_ = header_host;
		if (_tmp9_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)) {
			GtkBox* _tmp11_;
			GtkMenuButton* _tmp12_;
			_tmp11_ = header_host;
			_tmp12_ = button;
			gtk_box_remove (_tmp11_, (GtkWidget*) _tmp12_);
		}
		_tmp13_ = button;
		_tmp14_ = gtk_widget_get_parent ((GtkWidget*) _tmp13_);
		_tmp15_ = self->priv->_variant_box;
		if (_tmp14_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget)) {
			GtkBox* _tmp16_;
			GtkMenuButton* _tmp17_;
			_tmp16_ = self->priv->_variant_box;
			_tmp17_ = button;
			gtk_box_append (_tmp16_, (GtkWidget*) _tmp17_);
		}
		_tmp18_ = header_host;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, FALSE);
		_tmp19_ = self->priv->_variant_box;
		_tmp20_ = self->priv->current_tool;
		gtk_widget_set_visible ((GtkWidget*) _tmp19_, _tmp20_ != NULL);
	} else {
		GtkMenuButton* _tmp21_;
		GtkWidget* _tmp22_;
		GtkBox* _tmp23_;
		GtkMenuButton* _tmp26_;
		GtkWidget* _tmp27_;
		GtkBox* _tmp28_;
		GtkBox* _tmp31_;
		ProtonPlusModelsTool* _tmp32_;
		GtkBox* _tmp33_;
		_tmp21_ = button;
		_tmp22_ = gtk_widget_get_parent ((GtkWidget*) _tmp21_);
		_tmp23_ = self->priv->_variant_box;
		if (_tmp22_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget)) {
			GtkBox* _tmp24_;
			GtkMenuButton* _tmp25_;
			_tmp24_ = self->priv->_variant_box;
			_tmp25_ = button;
			gtk_box_remove (_tmp24_, (GtkWidget*) _tmp25_);
		}
		_tmp26_ = button;
		_tmp27_ = gtk_widget_get_parent ((GtkWidget*) _tmp26_);
		_tmp28_ = header_host;
		if (_tmp27_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget)) {
			GtkBox* _tmp29_;
			GtkMenuButton* _tmp30_;
			_tmp29_ = header_host;
			_tmp30_ = button;
			gtk_box_append (_tmp29_, (GtkWidget*) _tmp30_);
		}
		_tmp31_ = header_host;
		_tmp32_ = self->priv->current_tool;
		gtk_widget_set_visible ((GtkWidget*) _tmp31_, _tmp32_ != NULL);
		_tmp33_ = self->priv->_variant_box;
		gtk_widget_set_visible ((GtkWidget*) _tmp33_, FALSE);
	}
	_tmp34_ = button;
	_tmp35_ = self->priv->current_tool;
	gtk_widget_set_visible ((GtkWidget*) _tmp34_, _tmp35_ != NULL);
	proton_plus_widgets_tools_releases_box_update_release_row_up_targets (self);
	_g_object_unref0 (header_host);
	_g_object_unref0 (button);
}

void
proton_plus_widgets_tools_releases_box_set_controller_up_target (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                 GtkWidget* target)
{
	g_return_if_fail (self != NULL);
	self->priv->controller_up_target = target;
	proton_plus_widgets_tools_releases_box_update_release_row_up_targets (self);
}

static void
proton_plus_widgets_tools_releases_box_update_release_row_up_targets (ProtonPlusWidgetsToolsReleasesBox* 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_;
		ProtonPlusWidgetsToolsReleaseRow* row = NULL;
		GtkWidget* _tmp4_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp5_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp6_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp4_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp4_) : NULL);
		row = _tmp5_;
		_tmp6_ = row;
		if (_tmp6_ != NULL) {
			ProtonPlusWidgetsToolsReleaseRow* _tmp7_;
			_tmp7_ = row;
			proton_plus_widgets_tools_releases_box_configure_release_row_up_targets (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
		}
		_tmp8_ = child;
		_tmp9_ = gtk_widget_get_next_sibling (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (child);
		child = _tmp10_;
		_g_object_unref0 (row);
	}
	_g_object_unref0 (child);
}

static void
proton_plus_widgets_tools_releases_box_configure_release_row_up_targets (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                         ProtonPlusWidgetsToolsReleaseRow* row)
{
	GtkDropDown* _tmp0_ = NULL;
	GtkDropDown* _tmp1_;
	GtkWidget* row_target = NULL;
	GtkWidget* _tmp3_;
	GtkMenuButton* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GtkMenuButton* _tmp6_;
	GtkWidget* action_target = NULL;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_tmp1_ = self->priv->_variant_dropdown;
	if (gtk_widget_get_visible ((GtkWidget*) _tmp1_)) {
		GtkDropDown* _tmp2_;
		_tmp2_ = self->priv->_variant_dropdown;
		_tmp0_ = _tmp2_;
	} else {
		_tmp0_ = NULL;
	}
	_tmp3_ = _g_object_ref0 ((GtkWidget*) _tmp0_);
	row_target = _tmp3_;
	_tmp6_ = self->priv->actions_button;
	if (_tmp6_ != NULL) {
		GtkMenuButton* _tmp7_;
		_tmp7_ = self->priv->actions_button;
		_tmp5_ = gtk_widget_get_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_menu_button_get_type (), GtkMenuButton));
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GtkMenuButton* _tmp8_;
		_tmp8_ = self->priv->actions_button;
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = NULL;
	}
	_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp4_);
	action_target = _tmp9_;
	_tmp10_ = self->priv->controller_up_target;
	_tmp11_ = row_target;
	proton_plus_widgets_tools_release_row_set_controller_up_targets (row, _tmp10_, _tmp11_, action_target);
	_g_object_unref0 (action_target);
	_g_object_unref0 (row_target);
}

void
proton_plus_widgets_tools_releases_box_set_controller_down_target (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                   GtkWidget* target)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (self != NULL);
	self->priv->controller_down_target = target;
	_tmp0_ = self->priv->_list_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	while (TRUE) {
		GtkWidget* _tmp3_;
		ProtonPlusWidgetsToolsReleaseRow* row = NULL;
		GtkWidget* _tmp4_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp5_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp6_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp4_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp4_) : NULL);
		row = _tmp5_;
		_tmp6_ = row;
		if (_tmp6_ != NULL) {
			ProtonPlusWidgetsToolsReleaseRow* _tmp7_;
			_tmp7_ = row;
			proton_plus_widgets_tools_release_row_set_controller_down_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), target);
		}
		_tmp8_ = child;
		_tmp9_ = gtk_widget_get_next_sibling (_tmp8_);
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (child);
		child = _tmp10_;
		_g_object_unref0 (row);
	}
	_g_object_unref0 (child);
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_data_free (gpointer _data)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->tool);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData, _data_);
}

void
proton_plus_widgets_tools_releases_box_set_selected_tool (ProtonPlusWidgetsToolsReleasesBox* self,
                                                          ProtonPlusModelsTool* tool,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	_data_ = g_slice_new0 (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_widgets_tools_releases_box_set_selected_tool_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (tool);
	_g_object_unref0 (_data_->tool);
	_data_->tool = _tmp1_;
	proton_plus_widgets_tools_releases_box_set_selected_tool_co (_data_);
}

gboolean
proton_plus_widgets_tools_releases_box_set_selected_tool_finish (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                 GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_widgets_tools_releases_box_set_selected_tool_co (_data_);
}

static gboolean
proton_plus_widgets_tools_releases_box_set_selected_tool_co (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->request_guard;
	_data_->request_generation = proton_plus_widgets_tools_inline_release_request_guard_select (_data_->_tmp0_, (GObject*) _data_->tool);
	_data_->self->priv->tool_request_generation = _data_->request_generation;
	_data_->_tmp1_ = _g_object_ref0 (_data_->tool);
	_g_object_unref0 (_data_->self->priv->current_tool);
	_data_->self->priv->current_tool = _data_->_tmp1_;
	_data_->self->priv->last_request_kind = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL;
	_data_->_tmp2_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp2_, FALSE);
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, TRUE);
	_data_->self->priv->error_active = FALSE;
	_data_->self->priv->background_request_started_empty = FALSE;
	_data_->_tmp3_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp3_, FALSE);
	_data_->_tmp4_ = proton_plus_widgets_tools_inline_release_presentation_evaluate (_data_->self->priv->last_request_kind, TRUE, FALSE, FALSE, FALSE);
	_data_->_tmp5_ = _data_->_tmp4_;
	proton_plus_widgets_tools_releases_box_apply_presentation (_data_->self, _data_->_tmp5_);
	_g_object_unref0 (_data_->_tmp5_);
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Loading releases"));
	proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
	proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (_data_->self);
	_data_->_tmp6_ = _data_->self->priv->_list_box;
	gtk_list_box_remove_all (_data_->_tmp6_);
	proton_plus_widgets_tools_releases_box_update_repository_button (_data_->self, _data_->tool);
	proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, FALSE);
	proton_plus_widgets_tools_releases_box_update_variant_row (_data_->self, _data_->tool);
	_data_->_tmp7_ = proton_plus_models_tool_get_release_catalog (_data_->tool);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _g_object_ref0 (_data_->_tmp8_);
	_data_->catalog = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->catalog;
	if (_data_->_tmp10_ == NULL) {
		proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
		proton_plus_widgets_tools_releases_box_update_empty_status (_data_->self);
		_data_->_tmp11_ = proton_plus_widgets_tools_inline_release_presentation_evaluate (_data_->self->priv->last_request_kind, FALSE, FALSE, FALSE, FALSE);
		_data_->_tmp12_ = _data_->_tmp11_;
		proton_plus_widgets_tools_releases_box_apply_presentation (_data_->self, _data_->_tmp12_);
		_g_object_unref0 (_data_->_tmp12_);
		_data_->_tmp13_ = _data_->self->priv->_refresh_button;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp13_, TRUE);
		proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("No releases available"));
		_data_->result = TRUE;
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp14_ = _data_->catalog;
	_data_->_state_ = 1;
	proton_plus_models_release_catalog_load (_data_->_tmp14_, FALSE, proton_plus_widgets_tools_releases_box_set_selected_tool_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp15_ = proton_plus_models_release_catalog_load_finish (_data_->_tmp14_, _data_->_res_);
	_data_->_result_ = _data_->_tmp15_;
	if (!proton_plus_widgets_tools_releases_box_is_current_tool_request (_data_->self, _data_->tool, _data_->request_generation)) {
		_data_->result = FALSE;
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
	_data_->_tmp16_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp16_, TRUE);
	_data_->_tmp17_ = _data_->_result_;
	_data_->_tmp18_ = proton_plus_models_release_catalog_result_get_succeeded (_data_->_tmp17_);
	_data_->_tmp19_ = _data_->_tmp18_;
	if (!_data_->_tmp19_) {
		_data_->_tmp20_ = _data_->_result_;
		_data_->_tmp21_ = proton_plus_models_release_catalog_result_get_code (_data_->_tmp20_);
		_data_->_tmp22_ = _data_->_tmp21_;
		proton_plus_widgets_tools_releases_box_show_error (_data_->self, _data_->_tmp22_);
		_data_->result = FALSE;
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp23_ = proton_plus_models_tool_get_group (_data_->tool);
	_data_->_tmp24_ = _data_->_tmp23_;
	proton_plus_models_group_refresh_installed_state (_data_->_tmp24_);
	_data_->_tmp25_ = _data_->_result_;
	_data_->_tmp26_ = proton_plus_models_release_catalog_result_get_releases (_data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	proton_plus_widgets_tools_releases_box_add_release_rows (_data_->self, _data_->tool, _data_->_tmp27_);
	_data_->_tmp28_ = _data_->self->priv->_list_box;
	_data_->_tmp29_ = _data_->self->priv->load_more_row;
	gtk_list_box_append (_data_->_tmp28_, (GtkWidget*) _data_->_tmp29_);
	_data_->_tmp31_ = _data_->catalog;
	_data_->_tmp32_ = proton_plus_models_release_catalog_get_has_more (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	if (_data_->_tmp33_) {
		_data_->_tmp30_ = proton_plus_widgets_tools_releases_box_can_show_provider_release_rows (_data_->self);
	} else {
		_data_->_tmp30_ = FALSE;
	}
	_data_->_tmp34_ = _data_->self->priv->load_more_row;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp34_, _data_->_tmp30_);
	_data_->_tmp35_ = _data_->self->priv->_content_stack;
	gtk_stack_set_visible_child_name (_data_->_tmp35_, "list");
	_data_->_tmp36_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp36_, FALSE);
	proton_plus_widgets_tools_releases_box_apply_selected_variant_to_rows (_data_->self);
	proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, FALSE);
	proton_plus_widgets_tools_releases_box_update_visibility (_data_->self);
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Releases loaded"));
	_data_->result = TRUE;
	_g_object_unref0 (_data_->_result_);
	_g_object_unref0 (_data_->catalog);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_widgets_tools_releases_box_clear_selected_tool (ProtonPlusWidgetsToolsReleasesBox* self)
{
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard* _tmp0_;
	guint _tmp1_;
	GtkBox* _tmp2_;
	GtkListBox* _tmp3_;
	GtkButton* _tmp4_;
	gchar* _tmp5_;
	AdwBanner* _tmp6_;
	GtkStack* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->request_guard;
	proton_plus_widgets_tools_inline_release_request_guard_clear (_tmp0_);
	_tmp1_ = self->priv->tool_request_generation;
	self->priv->tool_request_generation = _tmp1_ + 1;
	_g_object_unref0 (self->priv->current_tool);
	self->priv->current_tool = NULL;
	proton_plus_widgets_tools_releases_box_detach_actions_button (self);
	_tmp2_ = self->priv->_variant_box;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	proton_plus_widgets_tools_releases_box_update_refresh_tooltip (self, FALSE);
	proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (self);
	_tmp3_ = self->priv->_list_box;
	gtk_list_box_remove_all (_tmp3_);
	proton_plus_widgets_tools_releases_box_reset_load_more_button (self);
	_tmp4_ = self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, TRUE);
	proton_plus_widgets_tools_releases_box_set_request_in_progress (self, FALSE);
	self->priv->error_active = FALSE;
	self->priv->background_request_started_empty = FALSE;
	_tmp5_ = g_strdup ("");
	_g_free0 (self->priv->last_announced_state);
	self->priv->last_announced_state = _tmp5_;
	_tmp6_ = self->priv->_error_banner;
	adw_banner_set_revealed (_tmp6_, FALSE);
	_tmp7_ = self->priv->_content_stack;
	gtk_stack_set_visible_child_name (_tmp7_, "empty");
}

gboolean
proton_plus_widgets_tools_releases_box_is_showing_tool (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        ProtonPlusModelsTool* tool)
{
	ProtonPlusModelsTool* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp0_ = self->priv->current_tool;
	result = _tmp0_ == tool;
	return result;
}

gboolean
proton_plus_widgets_tools_releases_box_is_loading_tool (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        ProtonPlusModelsTool* tool)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsTool* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp1_ = self->priv->current_tool;
	if (_tmp1_ == tool) {
		_tmp0_ = self->priv->request_in_progress;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

gboolean
proton_plus_widgets_tools_releases_box_has_release_title_match (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                const gchar* query)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gchar* normalized = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkWidget* child = NULL;
	GtkListBox* _tmp7_;
	GtkWidget* _tmp8_;
	GtkWidget* _tmp9_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (query != NULL, FALSE);
	_tmp0_ = string_strip (query);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strcmp0 (_tmp1_, "") == 0;
	_g_free0 (_tmp1_);
	if (_tmp2_) {
		result = TRUE;
		return result;
	}
	_tmp3_ = string_strip (query);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_utf8_strdown (_tmp4_, (gssize) -1);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	normalized = _tmp6_;
	_tmp7_ = self->priv->_list_box;
	_tmp8_ = gtk_widget_get_first_child ((GtkWidget*) _tmp7_);
	_tmp9_ = _g_object_ref0 (_tmp8_);
	child = _tmp9_;
	while (TRUE) {
		GtkWidget* _tmp10_;
		ProtonPlusServicesInstallJob* job = NULL;
		GtkWidget* _tmp11_;
		gconstpointer _tmp12_;
		ProtonPlusServicesInstallJob* _tmp13_;
		gboolean _tmp14_ = FALSE;
		ProtonPlusServicesInstallJob* _tmp15_;
		GtkWidget* _tmp23_;
		GtkWidget* _tmp24_;
		GtkWidget* _tmp25_;
		_tmp10_ = child;
		if (!(_tmp10_ != NULL)) {
			break;
		}
		_tmp11_ = child;
		_tmp12_ = g_object_get_data ((GObject*) _tmp11_, "job");
		_tmp13_ = _g_object_ref0 ((ProtonPlusServicesInstallJob*) _tmp12_);
		job = _tmp13_;
		_tmp15_ = job;
		if (_tmp15_ != NULL) {
			ProtonPlusServicesInstallJob* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp16_ = job;
			_tmp17_ = proton_plus_services_install_job_get_title (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = _tmp18_;
			_tmp20_ = g_utf8_strdown (_tmp19_, (gssize) -1);
			_tmp21_ = _tmp20_;
			_tmp22_ = normalized;
			_tmp14_ = string_contains (_tmp21_, _tmp22_);
			_g_free0 (_tmp21_);
			_g_free0 (_tmp19_);
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			result = TRUE;
			_g_object_unref0 (job);
			_g_object_unref0 (child);
			_g_free0 (normalized);
			return result;
		}
		_tmp23_ = child;
		_tmp24_ = gtk_widget_get_next_sibling (_tmp23_);
		_tmp25_ = _g_object_ref0 (_tmp24_);
		_g_object_unref0 (child);
		child = _tmp25_;
		_g_object_unref0 (job);
	}
	result = FALSE;
	_g_object_unref0 (child);
	_g_free0 (normalized);
	return result;
}

static void
proton_plus_widgets_tools_releases_box_announce_state (ProtonPlusWidgetsToolsReleasesBox* self,
                                                       const gchar* message)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GtkStack* _tmp2_;
	GtkStack* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = self->priv->last_announced_state;
	if (g_strcmp0 (_tmp0_, message) == 0) {
		return;
	}
	_tmp1_ = g_strdup (message);
	_g_free0 (self->priv->last_announced_state);
	self->priv->last_announced_state = _tmp1_;
	_tmp2_ = self->priv->_content_stack;
	gtk_accessible_update_property ((GtkAccessible*) _tmp2_, GTK_ACCESSIBLE_PROPERTY_LABEL, message, -1, -1);
	_tmp3_ = self->priv->_content_stack;
	gtk_accessible_announce ((GtkAccessible*) _tmp3_, message, GTK_ACCESSIBLE_ANNOUNCEMENT_PRIORITY_MEDIUM);
}

static void
proton_plus_widgets_tools_releases_box_set_request_in_progress (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                gboolean in_progress)
{
	GtkStack* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->request_in_progress = in_progress;
	_tmp0_ = self->priv->_content_stack;
	gtk_accessible_update_state ((GtkAccessible*) _tmp0_, GTK_ACCESSIBLE_STATE_BUSY, in_progress, -1, -1);
}

static void
proton_plus_widgets_tools_releases_box_show_error (ProtonPlusWidgetsToolsReleasesBox* self,
                                                   ProtonPlusReturnCode code)
{
	ProtonPlusWidgetsToolsInlineReleasePresentation* presentation = NULL;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp0_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp1_;
	ProtonPlusWidgetsToolsInlineReleaseView _tmp2_;
	ProtonPlusWidgetsToolsInlineReleaseView _tmp3_;
	AdwStatusPage* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	ProtonPlusWidgetsToolsInlineReleasePresentation* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_inline_release_presentation_evaluate (self->priv->last_request_kind, FALSE, proton_plus_widgets_tools_releases_box_has_release_rows (self), TRUE, self->priv->background_request_started_empty);
	presentation = _tmp0_;
	_tmp1_ = presentation;
	_tmp2_ = proton_plus_widgets_tools_inline_release_presentation_get_view (_tmp1_);
	_tmp3_ = _tmp2_;
	self->priv->error_active = _tmp3_ == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_ERROR;
	_tmp4_ = self->priv->_error_page;
	_tmp5_ = proton_plus_get_return_code_message (code);
	_tmp6_ = _tmp5_;
	adw_status_page_set_description (_tmp4_, _tmp6_);
	_g_free0 (_tmp6_);
	_tmp7_ = presentation;
	_tmp8_ = proton_plus_widgets_tools_inline_release_presentation_get_show_error_banner (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		const gchar* _tmp10_ = NULL;
		gchar* title = NULL;
		gchar* _tmp11_;
		AdwBanner* _tmp12_;
		const gchar* _tmp13_;
		AdwBanner* _tmp14_;
		const gchar* _tmp15_;
		if (self->priv->last_request_kind == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_LOAD_MORE) {
			_tmp10_ = _ ("Couldn’t load more releases");
		} else {
			_tmp10_ = _ ("Couldn’t refresh releases");
		}
		_tmp11_ = g_strdup (_tmp10_);
		title = _tmp11_;
		_tmp12_ = self->priv->_error_banner;
		_tmp13_ = title;
		adw_banner_set_title (_tmp12_, _tmp13_);
		_tmp14_ = self->priv->_error_banner;
		adw_banner_set_revealed (_tmp14_, TRUE);
		_tmp15_ = title;
		proton_plus_widgets_tools_releases_box_announce_state (self, _tmp15_);
		_g_free0 (title);
	} else {
		AdwBanner* _tmp16_;
		_tmp16_ = self->priv->_error_banner;
		adw_banner_set_revealed (_tmp16_, FALSE);
		proton_plus_widgets_tools_releases_box_announce_state (self, _ ("Failed to Fetch Releases"));
	}
	_tmp17_ = presentation;
	proton_plus_widgets_tools_releases_box_apply_presentation (self, _tmp17_);
	_tmp18_ = proton_plus_get_return_code_message (code);
	_tmp19_ = _tmp18_;
	g_warning ("tools-releases-box.vala:759: Release catalog request failed: %s", _tmp19_);
	_g_free0 (_tmp19_);
	_g_object_unref0 (presentation);
}

static void
proton_plus_widgets_tools_releases_box_retry_current_request (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsTool* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->current_tool;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self->priv->request_in_progress;
	}
	if (_tmp0_) {
		return;
	}
	if (self->priv->last_request_kind == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_REFRESH) {
		ProtonPlusModelsTool* _tmp2_;
		_tmp2_ = self->priv->current_tool;
		proton_plus_widgets_tools_releases_box_set_selected_tool_forced (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_MODELS_TYPE_TOOL, ProtonPlusModelsTool), NULL, NULL);
	} else {
		if (self->priv->last_request_kind == PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_LOAD_MORE) {
			proton_plus_widgets_tools_releases_box_on_load_more_clicked (self, NULL, NULL);
		} else {
			ProtonPlusModelsTool* _tmp3_;
			_tmp3_ = self->priv->current_tool;
			proton_plus_widgets_tools_releases_box_set_selected_tool (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PROTON_PLUS_MODELS_TYPE_TOOL, ProtonPlusModelsTool), NULL, NULL);
		}
	}
}

static void
proton_plus_widgets_tools_releases_box_apply_presentation (ProtonPlusWidgetsToolsReleasesBox* self,
                                                           ProtonPlusWidgetsToolsInlineReleasePresentation* presentation)
{
	ProtonPlusWidgetsToolsInlineReleaseView _tmp0_;
	ProtonPlusWidgetsToolsInlineReleaseView _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (presentation != NULL);
	_tmp0_ = proton_plus_widgets_tools_inline_release_presentation_get_view (presentation);
	_tmp1_ = _tmp0_;
	switch (_tmp1_) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LOADING:
		{
			GtkStack* _tmp2_;
			_tmp2_ = self->priv->_content_stack;
			gtk_stack_set_visible_child_name (_tmp2_, "spinner");
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_LIST:
		{
			GtkStack* _tmp3_;
			_tmp3_ = self->priv->_content_stack;
			gtk_stack_set_visible_child_name (_tmp3_, "list");
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_VIEW_ERROR:
		{
			GtkStack* _tmp4_;
			_tmp4_ = self->priv->_content_stack;
			gtk_stack_set_visible_child_name (_tmp4_, "error");
			break;
		}
		default:
		{
			GtkStack* _tmp5_;
			_tmp5_ = self->priv->_content_stack;
			gtk_stack_set_visible_child_name (_tmp5_, "empty");
			break;
		}
	}
}

static void
proton_plus_widgets_tools_releases_box_on_empty_action_clicked (ProtonPlusWidgetsToolsReleasesBox* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	ProtonPlusWidgetsToolsFilter _tmp2_;
	ProtonPlusWidgetsToolsFilter _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_releases_box_get_search_text (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp3_ = _tmp2_;
	switch (proton_plus_widgets_tools_inline_release_presentation_empty_reason (_tmp1_, _tmp3_, self->priv->provider_has_compatible_variants)) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_SEARCH:
		{
			g_signal_emit (self, proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL], 0);
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_FILTER:
		{
			g_signal_emit (self, proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_RESET_FILTER_REQUESTED_SIGNAL], 0);
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_CATALOG:
		{
			proton_plus_widgets_tools_releases_box_on_refresh_clicked (self);
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
proton_plus_widgets_tools_releases_box_update_empty_status (ProtonPlusWidgetsToolsReleasesBox* self)
{
	ProtonPlusWidgetsToolsInlineReleaseEmptyReason reason = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	ProtonPlusWidgetsToolsFilter _tmp2_;
	ProtonPlusWidgetsToolsFilter _tmp3_;
	GtkButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_releases_box_get_search_text (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp3_ = _tmp2_;
	reason = proton_plus_widgets_tools_inline_release_presentation_empty_reason (_tmp1_, _tmp3_, self->priv->provider_has_compatible_variants);
	_tmp4_ = self->priv->_empty_action_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	switch (reason) {
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_SEARCH:
		{
			AdwStatusPage* _tmp5_;
			AdwStatusPage* _tmp6_;
			AdwStatusPage* _tmp7_;
			GtkButton* _tmp8_;
			_tmp5_ = self->priv->_status_page;
			adw_status_page_set_title (_tmp5_, _ ("No matching releases"));
			_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"));
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_FILTER:
		{
			AdwStatusPage* _tmp9_;
			AdwStatusPage* _tmp10_;
			AdwStatusPage* _tmp11_;
			GtkButton* _tmp12_;
			_tmp9_ = self->priv->_status_page;
			adw_status_page_set_title (_tmp9_, _ ("No releases match this filter"));
			_tmp10_ = self->priv->_status_page;
			adw_status_page_set_description (_tmp10_, _ ("Reset the filters to see all releases."));
			_tmp11_ = self->priv->_status_page;
			adw_status_page_set_icon_name (_tmp11_, "filter-2-symbolic");
			_tmp12_ = self->priv->_empty_action_button;
			gtk_button_set_label (_tmp12_, _ ("Reset Filters"));
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_EMPTY_REASON_UNAVAILABLE:
		{
			AdwStatusPage* _tmp13_;
			AdwStatusPage* _tmp14_;
			AdwStatusPage* _tmp15_;
			GtkButton* _tmp16_;
			_tmp13_ = self->priv->_status_page;
			adw_status_page_set_title (_tmp13_, _ ("No compatible releases"));
			_tmp14_ = self->priv->_status_page;
			adw_status_page_set_description (_tmp14_, _ ("No compatible variants are available for this system."));
			_tmp15_ = self->priv->_status_page;
			adw_status_page_set_icon_name (_tmp15_, "dialog-warning-symbolic");
			_tmp16_ = self->priv->_empty_action_button;
			gtk_widget_set_visible ((GtkWidget*) _tmp16_, FALSE);
			break;
		}
		default:
		{
			AdwStatusPage* _tmp17_;
			AdwStatusPage* _tmp18_;
			AdwStatusPage* _tmp19_;
			GtkButton* _tmp20_;
			_tmp17_ = self->priv->_status_page;
			adw_status_page_set_title (_tmp17_, _ ("No releases available"));
			_tmp18_ = self->priv->_status_page;
			adw_status_page_set_description (_tmp18_, _ ("Check again for new releases."));
			_tmp19_ = self->priv->_status_page;
			adw_status_page_set_icon_name (_tmp19_, "box-open-symbolic");
			_tmp20_ = self->priv->_empty_action_button;
			gtk_button_set_label (_tmp20_, _ ("Refresh"));
			break;
		}
	}
}

gboolean
proton_plus_widgets_tools_releases_box_focus_first_controller_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = proton_plus_widgets_tools_releases_box_focus_first_content_target (self);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_focus_first_content_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* variant_control = NULL;
	GtkDropDown* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* tool_actions_control = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_variant_dropdown;
	_tmp1_ = proton_plus_widgets_tools_releases_box_focusable_inline_control (self, (GtkWidget*) _tmp0_);
	variant_control = _tmp1_;
	_tmp2_ = variant_control;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = variant_control;
		result = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (variant_control);
		return result;
	}
	_tmp4_ = proton_plus_widgets_tools_releases_box_toolbar_actions_control (self);
	tool_actions_control = _tmp4_;
	_tmp5_ = tool_actions_control;
	if (_tmp5_ != NULL) {
		GtkWidget* _tmp6_;
		_tmp6_ = tool_actions_control;
		result = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (tool_actions_control);
		_g_object_unref0 (variant_control);
		return result;
	}
	result = proton_plus_widgets_tools_releases_box_focus_first_release_target (self);
	_g_object_unref0 (tool_actions_control);
	_g_object_unref0 (variant_control);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_focus_first_release_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	AdwBanner* _tmp3_;
	GtkWidget* child = NULL;
	GtkListBox* _tmp8_;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_ = FALSE;
	gboolean _tmp29_ = FALSE;
	GtkListBoxRow* _tmp30_;
	gboolean _tmp35_ = FALSE;
	gboolean _tmp36_ = FALSE;
	GtkButton* _tmp37_;
	gboolean _tmp41_ = FALSE;
	gboolean _tmp42_ = FALSE;
	GtkButton* _tmp43_;
	gboolean _tmp47_ = FALSE;
	gboolean _tmp48_ = FALSE;
	gboolean _tmp49_ = FALSE;
	gboolean _tmp50_ = FALSE;
	GtkWidget* _tmp51_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp3_ = self->priv->_error_banner;
	if (adw_banner_get_revealed (_tmp3_)) {
		AdwBanner* _tmp4_;
		_tmp4_ = self->priv->_error_banner;
		_tmp2_ = gtk_widget_get_mapped ((GtkWidget*) _tmp4_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		AdwBanner* _tmp5_;
		_tmp5_ = self->priv->_error_banner;
		_tmp1_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp5_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		AdwBanner* _tmp6_;
		_tmp6_ = self->priv->_error_banner;
		_tmp0_ = gtk_widget_get_focusable ((GtkWidget*) _tmp6_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		AdwBanner* _tmp7_;
		_tmp7_ = self->priv->_error_banner;
		result = gtk_widget_grab_focus ((GtkWidget*) _tmp7_);
		return result;
	}
	_tmp8_ = self->priv->_list_box;
	_tmp9_ = gtk_widget_get_first_child ((GtkWidget*) _tmp8_);
	_tmp10_ = _g_object_ref0 (_tmp9_);
	child = _tmp10_;
	while (TRUE) {
		GtkWidget* _tmp11_;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_ = FALSE;
		gboolean _tmp16_ = FALSE;
		GtkWidget* _tmp17_;
		GtkWidget* _tmp24_;
		GtkWidget* _tmp25_;
		GtkWidget* _tmp26_;
		_tmp11_ = child;
		if (!(_tmp11_ != NULL)) {
			break;
		}
		_tmp17_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp17_)) {
			GtkWidget* _tmp18_;
			_tmp18_ = child;
			_tmp16_ = gtk_widget_get_mapped (_tmp18_);
		} else {
			_tmp16_ = FALSE;
		}
		if (_tmp16_) {
			GtkWidget* _tmp19_;
			_tmp19_ = child;
			_tmp15_ = gtk_widget_is_visible (_tmp19_);
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			GtkWidget* _tmp20_;
			_tmp20_ = child;
			_tmp14_ = gtk_widget_get_child_visible (_tmp20_);
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			GtkWidget* _tmp21_;
			_tmp21_ = child;
			_tmp13_ = gtk_widget_is_sensitive (_tmp21_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			GtkWidget* _tmp22_;
			_tmp22_ = child;
			_tmp12_ = gtk_widget_get_focusable (_tmp22_);
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			GtkWidget* _tmp23_;
			_tmp23_ = child;
			result = gtk_widget_grab_focus (_tmp23_);
			_g_object_unref0 (child);
			return result;
		}
		_tmp24_ = child;
		_tmp25_ = gtk_widget_get_next_sibling (_tmp24_);
		_tmp26_ = _g_object_ref0 (_tmp25_);
		_g_object_unref0 (child);
		child = _tmp26_;
	}
	_tmp30_ = self->priv->load_more_row;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp30_)) {
		GtkListBoxRow* _tmp31_;
		_tmp31_ = self->priv->load_more_row;
		_tmp29_ = gtk_widget_is_visible ((GtkWidget*) _tmp31_);
	} else {
		_tmp29_ = FALSE;
	}
	if (_tmp29_) {
		GtkListBoxRow* _tmp32_;
		_tmp32_ = self->priv->load_more_row;
		_tmp28_ = gtk_widget_get_child_visible ((GtkWidget*) _tmp32_);
	} else {
		_tmp28_ = FALSE;
	}
	if (_tmp28_) {
		GtkButton* _tmp33_;
		_tmp33_ = self->priv->load_more_button;
		_tmp27_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp33_);
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		GtkButton* _tmp34_;
		_tmp34_ = self->priv->load_more_button;
		result = gtk_widget_grab_focus ((GtkWidget*) _tmp34_);
		_g_object_unref0 (child);
		return result;
	}
	_tmp37_ = self->priv->_error_retry_button;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp37_)) {
		GtkButton* _tmp38_;
		_tmp38_ = self->priv->_error_retry_button;
		_tmp36_ = gtk_widget_is_visible ((GtkWidget*) _tmp38_);
	} else {
		_tmp36_ = FALSE;
	}
	if (_tmp36_) {
		GtkButton* _tmp39_;
		_tmp39_ = self->priv->_error_retry_button;
		_tmp35_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp39_);
	} else {
		_tmp35_ = FALSE;
	}
	if (_tmp35_) {
		GtkButton* _tmp40_;
		_tmp40_ = self->priv->_error_retry_button;
		result = gtk_widget_grab_focus ((GtkWidget*) _tmp40_);
		_g_object_unref0 (child);
		return result;
	}
	_tmp43_ = self->priv->_empty_action_button;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp43_)) {
		GtkButton* _tmp44_;
		_tmp44_ = self->priv->_empty_action_button;
		_tmp42_ = gtk_widget_is_visible ((GtkWidget*) _tmp44_);
	} else {
		_tmp42_ = FALSE;
	}
	if (_tmp42_) {
		GtkButton* _tmp45_;
		_tmp45_ = self->priv->_empty_action_button;
		_tmp41_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp45_);
	} else {
		_tmp41_ = FALSE;
	}
	if (_tmp41_) {
		GtkButton* _tmp46_;
		_tmp46_ = self->priv->_empty_action_button;
		result = gtk_widget_grab_focus ((GtkWidget*) _tmp46_);
		_g_object_unref0 (child);
		return result;
	}
	_tmp51_ = self->priv->controller_up_target;
	if (_tmp51_ != NULL) {
		GtkWidget* _tmp52_;
		_tmp52_ = self->priv->controller_up_target;
		_tmp50_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp50_ = FALSE;
	}
	if (_tmp50_) {
		GtkWidget* _tmp53_;
		_tmp53_ = self->priv->controller_up_target;
		_tmp49_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp49_ = FALSE;
	}
	if (_tmp49_) {
		GtkWidget* _tmp54_;
		_tmp54_ = self->priv->controller_up_target;
		_tmp48_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp48_ = FALSE;
	}
	if (_tmp48_) {
		GtkWidget* _tmp55_;
		_tmp55_ = self->priv->controller_up_target;
		_tmp47_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp47_ = FALSE;
	}
	result = _tmp47_;
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                        GObject* focused_object,
                                                                        ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* inline_control = NULL;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	gboolean _tmp15_ = FALSE;
	GtkWidget* _tmp16_;
	AdwBanner* _tmp17_;
	gboolean _tmp43_ = FALSE;
	gboolean _tmp44_ = FALSE;
	gboolean _tmp45_ = FALSE;
	GtkWidget* _tmp46_;
	GtkButton* _tmp47_;
	gboolean _tmp58_ = FALSE;
	GtkWidget* _tmp59_;
	GtkListBoxRow* _tmp60_;
	gboolean _tmp82_ = FALSE;
	GtkButton* _tmp83_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsReleasesBox*) 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_releases_box_find_inline_control_ancestor (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	inline_control = _tmp3_;
	_tmp4_ = inline_control;
	if (_tmp4_ != NULL) {
		gboolean _tmp5_ = FALSE;
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
			_tmp5_ = TRUE;
		} else {
			_tmp5_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT;
		}
		if (_tmp5_) {
			gboolean forward = FALSE;
			GtkWidget* target = NULL;
			GtkWidget* _tmp6_;
			GtkWidget* _tmp7_;
			GtkWidget* _tmp8_;
			forward = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT;
			_tmp6_ = inline_control;
			_tmp7_ = proton_plus_widgets_tools_releases_box_find_inline_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), forward);
			target = _tmp7_;
			_tmp8_ = target;
			if (_tmp8_ != NULL) {
				GtkWidget* _tmp9_;
				_tmp9_ = target;
				result = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
				_g_object_unref0 (target);
				_g_object_unref0 (inline_control);
				_g_object_unref0 (focused);
				return result;
			}
			result = FALSE;
			_g_object_unref0 (target);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
			result = proton_plus_widgets_tools_releases_box_focus_controller_up_target (self);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
			GtkWidget* actions_control = NULL;
			GtkWidget* _tmp10_;
			gboolean _tmp11_ = FALSE;
			GtkWidget* _tmp12_;
			_tmp10_ = proton_plus_widgets_tools_releases_box_toolbar_actions_control (self);
			actions_control = _tmp10_;
			_tmp12_ = actions_control;
			if (_tmp12_ != NULL) {
				GtkWidget* _tmp13_;
				GtkWidget* _tmp14_;
				_tmp13_ = inline_control;
				_tmp14_ = actions_control;
				_tmp11_ = _tmp13_ == _tmp14_;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				result = proton_plus_widgets_tools_releases_box_focus_first_release_actions_target (self);
				_g_object_unref0 (actions_control);
				_g_object_unref0 (inline_control);
				_g_object_unref0 (focused);
				return result;
			}
			result = proton_plus_widgets_tools_releases_box_focus_first_release_target (self);
			_g_object_unref0 (actions_control);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		result = FALSE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp16_ = focused;
	_tmp17_ = self->priv->_error_banner;
	if (_tmp16_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget)) {
		_tmp15_ = TRUE;
	} else {
		GtkWidget* _tmp18_;
		AdwBanner* _tmp19_;
		_tmp18_ = focused;
		_tmp19_ = self->priv->_error_banner;
		_tmp15_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp19_);
	}
	if (_tmp15_) {
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
			GtkWidget* target = NULL;
			GtkWidget* _tmp20_;
			gboolean _tmp21_ = FALSE;
			GtkWidget* _tmp22_;
			_tmp20_ = proton_plus_widgets_tools_releases_box_find_inline_control (self, NULL, FALSE);
			target = _tmp20_;
			_tmp22_ = target;
			if (_tmp22_ != NULL) {
				GtkWidget* _tmp23_;
				_tmp23_ = target;
				_tmp21_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget));
			} else {
				_tmp21_ = proton_plus_widgets_tools_releases_box_focus_controller_up_target (self);
			}
			result = _tmp21_;
			_g_object_unref0 (target);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
			GtkWidget* child = NULL;
			GtkListBox* _tmp24_;
			GtkWidget* _tmp25_;
			GtkWidget* _tmp26_;
			_tmp24_ = self->priv->_list_box;
			_tmp25_ = gtk_widget_get_first_child ((GtkWidget*) _tmp24_);
			_tmp26_ = _g_object_ref0 (_tmp25_);
			child = _tmp26_;
			while (TRUE) {
				GtkWidget* _tmp27_;
				gboolean _tmp28_ = FALSE;
				gboolean _tmp29_ = FALSE;
				gboolean _tmp30_ = FALSE;
				gboolean _tmp31_ = FALSE;
				gboolean _tmp32_ = FALSE;
				GtkWidget* _tmp33_;
				GtkWidget* _tmp40_;
				GtkWidget* _tmp41_;
				GtkWidget* _tmp42_;
				_tmp27_ = child;
				if (!(_tmp27_ != NULL)) {
					break;
				}
				_tmp33_ = child;
				if (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp33_)) {
					GtkWidget* _tmp34_;
					_tmp34_ = child;
					_tmp32_ = gtk_widget_get_mapped (_tmp34_);
				} else {
					_tmp32_ = FALSE;
				}
				if (_tmp32_) {
					GtkWidget* _tmp35_;
					_tmp35_ = child;
					_tmp31_ = gtk_widget_is_visible (_tmp35_);
				} else {
					_tmp31_ = FALSE;
				}
				if (_tmp31_) {
					GtkWidget* _tmp36_;
					_tmp36_ = child;
					_tmp30_ = gtk_widget_get_child_visible (_tmp36_);
				} else {
					_tmp30_ = FALSE;
				}
				if (_tmp30_) {
					GtkWidget* _tmp37_;
					_tmp37_ = child;
					_tmp29_ = gtk_widget_is_sensitive (_tmp37_);
				} else {
					_tmp29_ = FALSE;
				}
				if (_tmp29_) {
					GtkWidget* _tmp38_;
					_tmp38_ = child;
					_tmp28_ = gtk_widget_get_focusable (_tmp38_);
				} else {
					_tmp28_ = FALSE;
				}
				if (_tmp28_) {
					GtkWidget* _tmp39_;
					_tmp39_ = child;
					result = gtk_widget_grab_focus (_tmp39_);
					_g_object_unref0 (child);
					_g_object_unref0 (inline_control);
					_g_object_unref0 (focused);
					return result;
				}
				_tmp40_ = child;
				_tmp41_ = gtk_widget_get_next_sibling (_tmp40_);
				_tmp42_ = _g_object_ref0 (_tmp41_);
				_g_object_unref0 (child);
				child = _tmp42_;
			}
			result = proton_plus_widgets_tools_releases_box_focus_controller_down_target (self);
			_g_object_unref0 (child);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		result = FALSE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp46_ = focused;
	_tmp47_ = self->priv->_error_retry_button;
	if (_tmp46_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_widget_get_type (), GtkWidget)) {
		_tmp45_ = TRUE;
	} else {
		GtkWidget* _tmp48_;
		GtkButton* _tmp49_;
		_tmp48_ = focused;
		_tmp49_ = self->priv->_error_retry_button;
		_tmp45_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp49_);
	}
	if (_tmp45_) {
		_tmp44_ = TRUE;
	} else {
		GtkWidget* _tmp50_;
		GtkButton* _tmp51_;
		_tmp50_ = focused;
		_tmp51_ = self->priv->_empty_action_button;
		_tmp44_ = _tmp50_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_widget_get_type (), GtkWidget);
	}
	if (_tmp44_) {
		_tmp43_ = TRUE;
	} else {
		GtkWidget* _tmp52_;
		GtkButton* _tmp53_;
		_tmp52_ = focused;
		_tmp53_ = self->priv->_empty_action_button;
		_tmp43_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp53_);
	}
	if (_tmp43_) {
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
			GtkWidget* target = NULL;
			GtkWidget* _tmp54_;
			gboolean _tmp55_ = FALSE;
			GtkWidget* _tmp56_;
			_tmp54_ = proton_plus_widgets_tools_releases_box_find_inline_control (self, NULL, FALSE);
			target = _tmp54_;
			_tmp56_ = target;
			if (_tmp56_ != NULL) {
				GtkWidget* _tmp57_;
				_tmp57_ = target;
				_tmp55_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, gtk_widget_get_type (), GtkWidget));
			} else {
				_tmp55_ = proton_plus_widgets_tools_releases_box_focus_controller_up_target (self);
			}
			result = _tmp55_;
			_g_object_unref0 (target);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
			result = proton_plus_widgets_tools_releases_box_focus_controller_down_target (self);
			_g_object_unref0 (inline_control);
			_g_object_unref0 (focused);
			return result;
		}
		result = FALSE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp59_ = focused;
	_tmp60_ = self->priv->load_more_row;
	if (_tmp59_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, gtk_widget_get_type (), GtkWidget)) {
		GtkWidget* _tmp61_;
		GtkListBoxRow* _tmp62_;
		_tmp61_ = focused;
		_tmp62_ = self->priv->load_more_row;
		_tmp58_ = !gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp62_);
	} else {
		_tmp58_ = FALSE;
	}
	if (_tmp58_) {
		result = FALSE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		GtkWidget* child = NULL;
		GtkListBox* _tmp63_;
		GtkWidget* _tmp64_;
		GtkWidget* _tmp65_;
		_tmp63_ = self->priv->_list_box;
		_tmp64_ = gtk_widget_get_last_child ((GtkWidget*) _tmp63_);
		_tmp65_ = _g_object_ref0 (_tmp64_);
		child = _tmp65_;
		while (TRUE) {
			GtkWidget* _tmp66_;
			gboolean _tmp67_ = FALSE;
			gboolean _tmp68_ = FALSE;
			gboolean _tmp69_ = FALSE;
			gboolean _tmp70_ = FALSE;
			gboolean _tmp71_ = FALSE;
			GtkWidget* _tmp72_;
			GtkWidget* _tmp79_;
			GtkWidget* _tmp80_;
			GtkWidget* _tmp81_;
			_tmp66_ = child;
			if (!(_tmp66_ != NULL)) {
				break;
			}
			_tmp72_ = child;
			if (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp72_)) {
				GtkWidget* _tmp73_;
				_tmp73_ = child;
				_tmp71_ = gtk_widget_get_mapped (_tmp73_);
			} else {
				_tmp71_ = FALSE;
			}
			if (_tmp71_) {
				GtkWidget* _tmp74_;
				_tmp74_ = child;
				_tmp70_ = gtk_widget_is_visible (_tmp74_);
			} else {
				_tmp70_ = FALSE;
			}
			if (_tmp70_) {
				GtkWidget* _tmp75_;
				_tmp75_ = child;
				_tmp69_ = gtk_widget_get_child_visible (_tmp75_);
			} else {
				_tmp69_ = FALSE;
			}
			if (_tmp69_) {
				GtkWidget* _tmp76_;
				_tmp76_ = child;
				_tmp68_ = gtk_widget_is_sensitive (_tmp76_);
			} else {
				_tmp68_ = FALSE;
			}
			if (_tmp68_) {
				GtkWidget* _tmp77_;
				_tmp77_ = child;
				_tmp67_ = gtk_widget_get_focusable (_tmp77_);
			} else {
				_tmp67_ = FALSE;
			}
			if (_tmp67_) {
				GtkWidget* _tmp78_;
				_tmp78_ = child;
				result = gtk_widget_grab_focus (_tmp78_);
				_g_object_unref0 (child);
				_g_object_unref0 (inline_control);
				_g_object_unref0 (focused);
				return result;
			}
			_tmp79_ = child;
			_tmp80_ = gtk_widget_get_prev_sibling (_tmp79_);
			_tmp81_ = _g_object_ref0 (_tmp80_);
			_g_object_unref0 (child);
			child = _tmp81_;
		}
		_g_object_unref0 (child);
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN) {
		_tmp82_ = proton_plus_widgets_tools_releases_box_focus_controller_down_target (self);
	} else {
		_tmp82_ = FALSE;
	}
	if (_tmp82_) {
		result = TRUE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp83_ = self->priv->load_more_button;
	result = gtk_widget_grab_focus ((GtkWidget*) _tmp83_);
	_g_object_unref0 (inline_control);
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_focus_first_release_actions_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != 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;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		gboolean _tmp7_ = FALSE;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		GtkWidget* _tmp16_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp8_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp8_)) {
			GtkWidget* _tmp9_;
			_tmp9_ = child;
			_tmp7_ = gtk_widget_get_mapped (_tmp9_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GtkWidget* _tmp10_;
			_tmp10_ = child;
			_tmp6_ = gtk_widget_is_visible (_tmp10_);
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkWidget* _tmp11_;
			_tmp11_ = child;
			_tmp5_ = gtk_widget_get_child_visible (_tmp11_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp12_;
			_tmp12_ = child;
			_tmp4_ = gtk_widget_is_sensitive (_tmp12_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GtkWidget* _tmp13_;
			_tmp13_ = child;
			result = proton_plus_widgets_tools_release_row_focus_more_actions_controller_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
			_g_object_unref0 (child);
			return result;
		}
		_tmp14_ = child;
		_tmp15_ = gtk_widget_get_next_sibling (_tmp14_);
		_tmp16_ = _g_object_ref0 (_tmp15_);
		_g_object_unref0 (child);
		child = _tmp16_;
	}
	result = proton_plus_widgets_tools_releases_box_focus_first_release_target (self);
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                                 GObject* focused_object)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* inline_control = NULL;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp8_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsReleasesBox*) 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_releases_box_find_inline_control_ancestor (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	inline_control = _tmp3_;
	_tmp4_ = inline_control;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_menu_button_get_type ())) {
		GtkWidget* _tmp5_;
		_tmp5_ = inline_control;
		gtk_menu_button_popup (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_menu_button_get_type (), GtkMenuButton));
		result = TRUE;
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp6_ = inline_control;
	if (_tmp6_ != NULL) {
		GtkWidget* _tmp7_;
		_tmp7_ = inline_control;
		result = gtk_widget_activate (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (inline_control);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp8_ = focused;
	result = gtk_widget_activate (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (inline_control);
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_focus_controller_up_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GtkWidget* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp4_ = self->priv->controller_up_target;
	if (_tmp4_ != NULL) {
		GtkWidget* _tmp5_;
		_tmp5_ = self->priv->controller_up_target;
		_tmp3_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		GtkWidget* _tmp6_;
		_tmp6_ = self->priv->controller_up_target;
		_tmp2_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkWidget* _tmp7_;
		_tmp7_ = self->priv->controller_up_target;
		_tmp1_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkWidget* _tmp8_;
		_tmp8_ = self->priv->controller_up_target;
		_tmp0_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_focus_controller_down_target (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GtkWidget* _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp4_ = self->priv->controller_down_target;
	if (_tmp4_ != NULL) {
		GtkWidget* _tmp5_;
		_tmp5_ = self->priv->controller_down_target;
		_tmp3_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		GtkWidget* _tmp6_;
		_tmp6_ = self->priv->controller_down_target;
		_tmp2_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkWidget* _tmp7_;
		_tmp7_ = self->priv->controller_down_target;
		_tmp1_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkWidget* _tmp8_;
		_tmp8_ = self->priv->controller_down_target;
		_tmp0_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_releases_box_find_inline_control_ancestor (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                     GtkWidget* focused)
{
	GtkWidget* tool_actions_control = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean _tmp6_ = FALSE;
	GtkDropDown* _tmp7_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (focused != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_releases_box_toolbar_actions_control (self);
	tool_actions_control = _tmp0_;
	_tmp2_ = tool_actions_control;
	if (_tmp2_ != NULL) {
		gboolean _tmp3_ = FALSE;
		GtkWidget* _tmp4_;
		_tmp4_ = tool_actions_control;
		if (focused == _tmp4_) {
			_tmp3_ = TRUE;
		} else {
			GtkWidget* _tmp5_;
			_tmp5_ = tool_actions_control;
			_tmp3_ = gtk_widget_is_ancestor (focused, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget));
		}
		_tmp1_ = _tmp3_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		result = tool_actions_control;
		return result;
	}
	_tmp7_ = self->priv->_variant_dropdown;
	if (focused == G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)) {
		_tmp6_ = TRUE;
	} else {
		GtkDropDown* _tmp8_;
		_tmp8_ = self->priv->_variant_dropdown;
		_tmp6_ = gtk_widget_is_ancestor (focused, (GtkWidget*) _tmp8_);
	}
	if (_tmp6_) {
		GtkDropDown* _tmp9_;
		GtkWidget* _tmp10_;
		_tmp9_ = self->priv->_variant_dropdown;
		_tmp10_ = _g_object_ref0 ((GtkWidget*) _tmp9_);
		result = _tmp10_;
		_g_object_unref0 (tool_actions_control);
		return result;
	}
	result = NULL;
	_g_object_unref0 (tool_actions_control);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_releases_box_find_inline_control (ProtonPlusWidgetsToolsReleasesBox* self,
                                                            GtkWidget* current,
                                                            gboolean forward)
{
	GtkWidget* first = NULL;
	GtkDropDown* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* last = NULL;
	GtkWidget* _tmp2_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp13_ = FALSE;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_variant_dropdown;
	_tmp1_ = proton_plus_widgets_tools_releases_box_focusable_inline_control (self, (GtkWidget*) _tmp0_);
	first = _tmp1_;
	_tmp2_ = proton_plus_widgets_tools_releases_box_toolbar_actions_control (self);
	last = _tmp2_;
	if (current == NULL) {
		GtkWidget* _tmp3_ = NULL;
		GtkWidget* _tmp10_;
		if (forward) {
			GtkWidget* _tmp4_ = NULL;
			GtkWidget* _tmp5_;
			_tmp5_ = first;
			_tmp4_ = _tmp5_;
			if (_tmp4_ == NULL) {
				GtkWidget* _tmp6_;
				_tmp6_ = last;
				_tmp4_ = _tmp6_;
			}
			_tmp3_ = _tmp4_;
		} else {
			GtkWidget* _tmp7_ = NULL;
			GtkWidget* _tmp8_;
			_tmp8_ = last;
			_tmp7_ = _tmp8_;
			if (_tmp7_ == NULL) {
				GtkWidget* _tmp9_;
				_tmp9_ = first;
				_tmp7_ = _tmp9_;
			}
			_tmp3_ = _tmp7_;
		}
		_tmp10_ = _g_object_ref0 (_tmp3_);
		result = _tmp10_;
		_g_object_unref0 (last);
		_g_object_unref0 (first);
		return result;
	}
	if (forward) {
		GtkWidget* _tmp12_;
		_tmp12_ = first;
		_tmp11_ = current == _tmp12_;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		result = last;
		_g_object_unref0 (first);
		return result;
	}
	if (!forward) {
		GtkWidget* _tmp14_;
		_tmp14_ = last;
		_tmp13_ = current == _tmp14_;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		result = first;
		_g_object_unref0 (last);
		return result;
	}
	result = NULL;
	_g_object_unref0 (last);
	_g_object_unref0 (first);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_releases_box_toolbar_actions_control (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GtkMenuButton* _tmp2_;
	GtkWidget* _tmp8_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp2_ = self->priv->actions_button;
	if (_tmp2_ != NULL) {
		GtkMenuButton* _tmp3_;
		GtkWidget* _tmp4_;
		GtkBox* _tmp5_;
		_tmp3_ = self->priv->actions_button;
		_tmp4_ = gtk_widget_get_parent ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_menu_button_get_type (), GtkMenuButton));
		_tmp5_ = self->priv->_variant_box;
		_tmp1_ = _tmp4_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp6_;
		GtkWidget* _tmp7_;
		_tmp6_ = self->priv->actions_button;
		_tmp7_ = proton_plus_widgets_tools_releases_box_focusable_inline_control (self, (GtkWidget*) _tmp6_);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp7_;
	} else {
		_g_object_unref0 (_tmp0_);
		_tmp0_ = NULL;
	}
	_tmp8_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp8_;
	_g_object_unref0 (_tmp0_);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_releases_box_focusable_inline_control (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                 GtkWidget* control)
{
	GtkWidget* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	GtkWidget* _tmp5_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (control != NULL) {
		_tmp4_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (control, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (control, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (control, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = gtk_widget_get_can_focus (G_TYPE_CHECK_INSTANCE_CAST (control, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = control;
	} else {
		_tmp0_ = NULL;
	}
	_tmp5_ = _g_object_ref0 (_tmp0_);
	result = _tmp5_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_on_variant_list_item_setup (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                   GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkImage* checkmark = NULL;
	GtkImage* _tmp2_ = NULL;
	GtkBox* row = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkBox* content = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkLabel* _tmp5_;
	GtkImage* _tmp6_;
	GtkBox* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp1_, 0.0f);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	label = _tmp1_;
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name ("object-select-symbolic");
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	g_object_ref_sink (_tmp2_);
	checkmark = _tmp2_;
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, TRUE);
	g_object_ref_sink (_tmp3_);
	row = _tmp3_;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp4_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp4_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp4_, 12);
	g_object_ref_sink (_tmp4_);
	content = _tmp4_;
	gtk_box_append (content, (GtkWidget*) label);
	gtk_box_append (content, (GtkWidget*) checkmark);
	gtk_box_append (row, (GtkWidget*) content);
	_tmp5_ = _g_object_ref0 (label);
	g_object_set_data_full (object, "variant-label", _tmp5_, g_object_unref);
	_tmp6_ = _g_object_ref0 (checkmark);
	g_object_set_data_full (object, "variant-checkmark", _tmp6_, g_object_unref);
	_tmp7_ = _g_object_ref0 (row);
	g_object_set_data_full (object, "variant-row", _tmp7_, g_object_unref);
	gtk_list_item_set_child (list_item, (GtkWidget*) row);
	_g_object_unref0 (content);
	_g_object_unref0 (row);
	_g_object_unref0 (checkmark);
	_g_object_unref0 (label);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_tools_releases_box_on_variant_list_item_bind (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                  GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkStringObject* variant = NULL;
	GtkListItem* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	GtkStringObject* _tmp4_;
	GtkStringObject* _tmp5_;
	GHashTable* _tmp6_;
	GtkStringObject* _tmp7_;
	GtkStringObject* _tmp8_;
	GtkListItem* _tmp9_;
	GtkListItem* _tmp10_;
	gchar* variant_name = NULL;
	GtkStringObject* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* tooltip = NULL;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	GtkLabel* label = NULL;
	gconstpointer _tmp17_;
	GtkLabel* _tmp18_;
	GtkImage* checkmark = NULL;
	gconstpointer _tmp19_;
	GtkImage* _tmp20_;
	GtkBox* row = NULL;
	gconstpointer _tmp21_;
	GtkBox* _tmp22_;
	GtkWidget* list_row = NULL;
	GtkBox* _tmp23_;
	GtkWidget* _tmp24_;
	GtkWidget* _tmp25_;
	GtkLabel* _tmp26_;
	const gchar* _tmp27_;
	GtkWidget* _tmp28_;
	GtkImage* _tmp31_;
	GtkStringObject* _tmp32_;
	GtkDropDown* _tmp33_;
	GObject* _tmp34_;
	GObject* _tmp35_;
	GtkImage* _tmp36_;
	gboolean _tmp37_;
	gboolean _tmp38_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = list_item;
	_tmp2_ = gtk_list_item_get_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_string_object_get_type ()) ? ((GtkStringObject*) _tmp3_) : NULL);
	variant = _tmp4_;
	_tmp5_ = variant;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (variant);
		_g_object_unref0 (list_item);
		return;
	}
	_tmp6_ = self->priv->variant_list_items;
	_tmp7_ = variant;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	_tmp9_ = list_item;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	g_hash_table_insert (_tmp6_, _tmp8_, _tmp10_);
	_tmp11_ = variant;
	_tmp12_ = gtk_string_object_get_string (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strdup (_tmp13_);
	variant_name = _tmp14_;
	_tmp15_ = variant_name;
	_tmp16_ = proton_plus_widgets_tools_releases_box_get_variant_tooltip (_tmp15_);
	tooltip = _tmp16_;
	_tmp17_ = g_object_get_data (object, "variant-label");
	_tmp18_ = _g_object_ref0 ((GtkLabel*) _tmp17_);
	label = _tmp18_;
	_tmp19_ = g_object_get_data (object, "variant-checkmark");
	_tmp20_ = _g_object_ref0 ((GtkImage*) _tmp19_);
	checkmark = _tmp20_;
	_tmp21_ = g_object_get_data (object, "variant-row");
	_tmp22_ = _g_object_ref0 ((GtkBox*) _tmp21_);
	row = _tmp22_;
	_tmp23_ = row;
	_tmp24_ = gtk_widget_get_parent ((GtkWidget*) _tmp23_);
	_tmp25_ = _g_object_ref0 (_tmp24_);
	list_row = _tmp25_;
	_tmp26_ = label;
	_tmp27_ = variant_name;
	gtk_label_set_label (_tmp26_, _tmp27_);
	_tmp28_ = list_row;
	if (_tmp28_ != NULL) {
		GtkWidget* _tmp29_;
		const gchar* _tmp30_;
		_tmp29_ = list_row;
		_tmp30_ = tooltip;
		gtk_widget_set_tooltip_text (_tmp29_, _tmp30_);
	}
	_tmp31_ = checkmark;
	_tmp32_ = variant;
	_tmp33_ = self->priv->_variant_dropdown;
	_tmp34_ = gtk_drop_down_get_selected_item (_tmp33_);
	_tmp35_ = _tmp34_;
	gtk_widget_set_visible ((GtkWidget*) _tmp31_, G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, G_TYPE_OBJECT, GObject) == _tmp35_);
	_tmp36_ = checkmark;
	_tmp37_ = gtk_widget_get_visible ((GtkWidget*) _tmp36_);
	_tmp38_ = _tmp37_;
	if (_tmp38_) {
		GtkImage* _tmp39_;
		GtkImage* _tmp40_;
		_tmp39_ = checkmark;
		_tmp40_ = _g_object_ref0 (_tmp39_);
		_g_object_unref0 (self->priv->selected_variant_checkmark);
		self->priv->selected_variant_checkmark = _tmp40_;
	}
	_g_object_unref0 (list_row);
	_g_object_unref0 (row);
	_g_object_unref0 (checkmark);
	_g_object_unref0 (label);
	_g_free0 (tooltip);
	_g_free0 (variant_name);
	_g_object_unref0 (variant);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_tools_releases_box_on_variant_list_item_unbind (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                    GObject* object)
{
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp0_;
	GtkStringObject* variant = NULL;
	GtkListItem* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	GtkStringObject* _tmp4_;
	gboolean _tmp5_ = FALSE;
	GtkStringObject* _tmp6_;
	GtkImage* checkmark = NULL;
	gconstpointer _tmp13_;
	GtkImage* _tmp14_;
	GtkImage* _tmp15_;
	GtkImage* _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (object, gtk_list_item_get_type ()) ? ((GtkListItem*) object) : NULL);
	list_item = _tmp0_;
	_tmp1_ = list_item;
	_tmp2_ = gtk_list_item_get_item (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gtk_string_object_get_type ()) ? ((GtkStringObject*) _tmp3_) : NULL);
	variant = _tmp4_;
	_tmp6_ = variant;
	if (_tmp6_ != NULL) {
		GHashTable* _tmp7_;
		GtkStringObject* _tmp8_;
		gconstpointer _tmp9_;
		GtkListItem* _tmp10_;
		_tmp7_ = self->priv->variant_list_items;
		_tmp8_ = variant;
		_tmp9_ = g_hash_table_lookup (_tmp7_, _tmp8_);
		_tmp10_ = list_item;
		_tmp5_ = ((GtkListItem*) _tmp9_) == _tmp10_;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GHashTable* _tmp11_;
		GtkStringObject* _tmp12_;
		_tmp11_ = self->priv->variant_list_items;
		_tmp12_ = variant;
		g_hash_table_remove (_tmp11_, _tmp12_);
	}
	_tmp13_ = g_object_get_data (object, "variant-checkmark");
	_tmp14_ = _g_object_ref0 ((GtkImage*) _tmp13_);
	checkmark = _tmp14_;
	_tmp15_ = checkmark;
	_tmp16_ = self->priv->selected_variant_checkmark;
	if (_tmp15_ == _tmp16_) {
		_g_object_unref0 (self->priv->selected_variant_checkmark);
		self->priv->selected_variant_checkmark = NULL;
	}
	_g_object_unref0 (checkmark);
	_g_object_unref0 (variant);
	_g_object_unref0 (list_item);
}

static void
proton_plus_widgets_tools_releases_box_update_variant_list_item_checkmark (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkImage* _tmp0_;
	GtkStringObject* selected_item = NULL;
	GtkDropDown* _tmp2_;
	GObject* _tmp3_;
	GObject* _tmp4_;
	GtkStringObject* _tmp5_;
	GtkListItem* _tmp6_ = NULL;
	GtkStringObject* _tmp7_;
	GtkListItem* list_item = NULL;
	GtkListItem* _tmp11_;
	GtkListItem* _tmp12_;
	GtkListItem* _tmp13_;
	gconstpointer _tmp14_;
	GtkImage* _tmp15_;
	GtkImage* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->selected_variant_checkmark;
	if (_tmp0_ != NULL) {
		GtkImage* _tmp1_;
		_tmp1_ = self->priv->selected_variant_checkmark;
		gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	}
	_tmp2_ = self->priv->_variant_dropdown;
	_tmp3_ = gtk_drop_down_get_selected_item (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_string_object_get_type ()) ? ((GtkStringObject*) _tmp4_) : NULL);
	selected_item = _tmp5_;
	_tmp7_ = selected_item;
	if (_tmp7_ != NULL) {
		GHashTable* _tmp8_;
		GtkStringObject* _tmp9_;
		gconstpointer _tmp10_;
		_tmp8_ = self->priv->variant_list_items;
		_tmp9_ = selected_item;
		_tmp10_ = g_hash_table_lookup (_tmp8_, _tmp9_);
		_tmp6_ = (GtkListItem*) _tmp10_;
	} else {
		_tmp6_ = NULL;
	}
	_tmp11_ = _g_object_ref0 (_tmp6_);
	list_item = _tmp11_;
	_tmp12_ = list_item;
	if (_tmp12_ == NULL) {
		_g_object_unref0 (self->priv->selected_variant_checkmark);
		self->priv->selected_variant_checkmark = NULL;
		_g_object_unref0 (list_item);
		_g_object_unref0 (selected_item);
		return;
	}
	_tmp13_ = list_item;
	_tmp14_ = g_object_get_data ((GObject*) _tmp13_, "variant-checkmark");
	_tmp15_ = _g_object_ref0 ((GtkImage*) _tmp14_);
	_g_object_unref0 (self->priv->selected_variant_checkmark);
	self->priv->selected_variant_checkmark = _tmp15_;
	_tmp16_ = self->priv->selected_variant_checkmark;
	gtk_widget_set_visible ((GtkWidget*) _tmp16_, TRUE);
	_g_object_unref0 (list_item);
	_g_object_unref0 (selected_item);
}

static void
proton_plus_widgets_tools_releases_box_on_refresh_clicked (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkPopover* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->actions_popover;
	gtk_popover_popdown (_tmp0_);
	_tmp1_ = self->priv->current_tool;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->current_tool;
	proton_plus_widgets_tools_releases_box_set_selected_tool_forced (self, _tmp2_, NULL, NULL);
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_forced_data_free (gpointer _data)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->tool);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData, _data_);
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_forced (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                 ProtonPlusModelsTool* tool,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	_data_ = g_slice_new0 (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_widgets_tools_releases_box_set_selected_tool_forced_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (tool);
	_g_object_unref0 (_data_->tool);
	_data_->tool = _tmp1_;
	proton_plus_widgets_tools_releases_box_set_selected_tool_forced_co (_data_);
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_forced_finish (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                        GAsyncResult* _res_)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
proton_plus_widgets_tools_releases_box_set_selected_tool_forced_ready (GObject* source_object,
                                                                       GAsyncResult* _res_,
                                                                       gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_widgets_tools_releases_box_set_selected_tool_forced_co (_data_);
}

static gboolean
proton_plus_widgets_tools_releases_box_set_selected_tool_forced_co (ProtonPlusWidgetsToolsReleasesBoxSetSelectedToolForcedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->self->priv->request_in_progress) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->self->priv->request_guard;
	_data_->request_generation = proton_plus_widgets_tools_inline_release_request_guard_select (_data_->_tmp0_, (GObject*) _data_->tool);
	_data_->self->priv->tool_request_generation = _data_->request_generation;
	_data_->_tmp1_ = _g_object_ref0 (_data_->tool);
	_g_object_unref0 (_data_->self->priv->current_tool);
	_data_->self->priv->current_tool = _data_->_tmp1_;
	_data_->self->priv->last_request_kind = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_REFRESH;
	_data_->_tmp2_ = _data_->self->priv->_content_stack;
	_data_->_tmp3_ = gtk_stack_get_visible_child_name (_data_->_tmp2_);
	_data_->self->priv->background_request_started_empty = g_strcmp0 (_data_->_tmp3_, "empty") == 0;
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, TRUE);
	_data_->self->priv->error_active = FALSE;
	_data_->_tmp4_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp4_, FALSE);
	_data_->has_cached_content = proton_plus_widgets_tools_releases_box_has_release_rows (_data_->self);
	_data_->_tmp5_ = proton_plus_widgets_tools_inline_release_presentation_evaluate (_data_->self->priv->last_request_kind, TRUE, _data_->has_cached_content, FALSE, _data_->self->priv->background_request_started_empty);
	_data_->_tmp6_ = _data_->_tmp5_;
	proton_plus_widgets_tools_releases_box_apply_presentation (_data_->self, _data_->_tmp6_);
	_g_object_unref0 (_data_->_tmp6_);
	_data_->_tmp7_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp7_, FALSE);
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Loading releases"));
	proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, TRUE);
	proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
	_data_->_tmp8_ = _data_->self->priv->load_more_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp8_, FALSE);
	_data_->_tmp9_ = proton_plus_models_tool_get_release_catalog (_data_->tool);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = _g_object_ref0 (_data_->_tmp10_);
	_data_->catalog = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->catalog;
	if (_data_->_tmp12_ == NULL) {
		proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
		proton_plus_widgets_tools_releases_box_update_empty_status (_data_->self);
		_data_->_tmp13_ = proton_plus_widgets_tools_inline_release_presentation_evaluate (_data_->self->priv->last_request_kind, FALSE, FALSE, FALSE, FALSE);
		_data_->_tmp14_ = _data_->_tmp13_;
		proton_plus_widgets_tools_releases_box_apply_presentation (_data_->self, _data_->_tmp14_);
		_g_object_unref0 (_data_->_tmp14_);
		_data_->_tmp15_ = _data_->self->priv->_refresh_button;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp15_, TRUE);
		proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, FALSE);
		proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp16_ = _data_->catalog;
	_data_->_state_ = 1;
	proton_plus_models_release_catalog_refresh (_data_->_tmp16_, proton_plus_widgets_tools_releases_box_set_selected_tool_forced_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp17_ = proton_plus_models_release_catalog_refresh_finish (_data_->_tmp16_, _data_->_res_);
	_data_->_result_ = _data_->_tmp17_;
	if (!proton_plus_widgets_tools_releases_box_is_current_tool_request (_data_->self, _data_->tool, _data_->request_generation)) {
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
	_data_->_tmp18_ = _data_->_result_;
	_data_->_tmp19_ = proton_plus_models_release_catalog_result_get_succeeded (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	if (!_data_->_tmp20_) {
		_data_->_tmp21_ = _data_->self->priv->_refresh_button;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp21_, TRUE);
		proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
		proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, FALSE);
		_data_->_tmp22_ = _data_->_result_;
		_data_->_tmp23_ = proton_plus_models_release_catalog_result_get_code (_data_->_tmp22_);
		_data_->_tmp24_ = _data_->_tmp23_;
		proton_plus_widgets_tools_releases_box_show_error (_data_->self, _data_->_tmp24_);
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (_data_->self);
	_data_->_tmp25_ = _data_->self->priv->_list_box;
	gtk_list_box_remove_all (_data_->_tmp25_);
	_data_->_tmp26_ = proton_plus_models_tool_get_group (_data_->tool);
	_data_->_tmp27_ = _data_->_tmp26_;
	proton_plus_models_group_refresh_installed_state (_data_->_tmp27_);
	_data_->_tmp28_ = _data_->_result_;
	_data_->_tmp29_ = proton_plus_models_release_catalog_result_get_releases (_data_->_tmp28_);
	_data_->_tmp30_ = _data_->_tmp29_;
	proton_plus_widgets_tools_releases_box_add_release_rows (_data_->self, _data_->tool, _data_->_tmp30_);
	_data_->_tmp31_ = _data_->self->priv->_list_box;
	_data_->_tmp32_ = _data_->self->priv->load_more_row;
	gtk_list_box_append (_data_->_tmp31_, (GtkWidget*) _data_->_tmp32_);
	_data_->_tmp34_ = _data_->catalog;
	_data_->_tmp35_ = proton_plus_models_release_catalog_get_has_more (_data_->_tmp34_);
	_data_->_tmp36_ = _data_->_tmp35_;
	if (_data_->_tmp36_) {
		_data_->_tmp33_ = proton_plus_widgets_tools_releases_box_can_show_provider_release_rows (_data_->self);
	} else {
		_data_->_tmp33_ = FALSE;
	}
	_data_->_tmp37_ = _data_->self->priv->load_more_row;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp37_, _data_->_tmp33_);
	_data_->_tmp38_ = _data_->self->priv->_content_stack;
	gtk_stack_set_visible_child_name (_data_->_tmp38_, "list");
	_data_->_tmp39_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp39_, FALSE);
	proton_plus_widgets_tools_releases_box_apply_selected_variant_to_rows (_data_->self);
	proton_plus_widgets_tools_releases_box_update_refresh_tooltip (_data_->self, FALSE);
	proton_plus_widgets_tools_releases_box_update_visibility (_data_->self);
	_data_->_tmp40_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp40_, TRUE);
	proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Releases loaded"));
	_g_object_unref0 (_data_->_result_);
	_g_object_unref0 (_data_->catalog);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_widgets_tools_releases_box_update_variant_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                           ProtonPlusModelsTool* tool)
{
	GeeLinkedList* _tmp0_;
	GtkLabel* _tmp1_;
	GtkDropDown* _tmp2_;
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsToolsProviderTool* _tmp3_;
	ProtonPlusModelsToolsProviderTool* _tmp4_;
	ProtonPlusModelsToolsProviderTool* _tmp5_;
	GeeLinkedList* _tmp6_;
	GeeLinkedList* _tmp7_;
	ProtonPlusModelsCpuCapabilities* _tmp8_;
	GeeLinkedList* _tmp9_;
	GeeLinkedList* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	GeeLinkedList* _tmp13_;
	ProtonPlusModelsCpuCapabilities* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	ProtonPlusModelsVariant* _tmp17_;
	GeeLinkedList* _tmp18_;
	GtkStringList* model = NULL;
	GtkStringList* _tmp19_;
	gint selected_index = 0;
	gint index = 0;
	GtkDropDown* _tmp35_;
	GtkStringList* _tmp36_;
	GtkDropDown* _tmp37_;
	GtkLabel* _tmp38_;
	GtkDropDown* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	_g_object_unref0 (self->priv->selected_variant);
	self->priv->selected_variant = NULL;
	_tmp0_ = self->priv->displayed_variants;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	self->priv->provider_has_compatible_variants = TRUE;
	_tmp1_ = self->priv->variant_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, FALSE);
	_tmp2_ = self->priv->_variant_dropdown;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	proton_plus_widgets_tools_releases_box_update_actions_placement (self);
	_tmp3_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (tool) ? ((ProtonPlusModelsToolsProviderTool*) tool) : NULL);
	provider_tool = _tmp3_;
	_tmp4_ = provider_tool;
	if (_tmp4_ == NULL) {
		_g_object_unref0 (provider_tool);
		return;
	}
	_tmp5_ = provider_tool;
	_tmp6_ = proton_plus_models_tools_provider_tool_get_variants (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_globals_CPU_CAPABILITIES;
	_tmp9_ = proton_plus_models_variant_selector_compatible_variants ((GeeIterable*) _tmp7_, _tmp8_);
	_g_object_unref0 (self->priv->displayed_variants);
	self->priv->displayed_variants = _tmp9_;
	_tmp10_ = self->priv->displayed_variants;
	_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
	_tmp12_ = _tmp11_;
	self->priv->provider_has_compatible_variants = _tmp12_ > 0;
	if (!self->priv->provider_has_compatible_variants) {
		_g_object_unref0 (provider_tool);
		return;
	}
	_tmp13_ = self->priv->displayed_variants;
	_tmp14_ = proton_plus_globals_CPU_CAPABILITIES;
	_tmp15_ = proton_plus_widgets_tools_releases_box_get_saved_variant_name (self, tool);
	_tmp16_ = _tmp15_;
	_tmp17_ = proton_plus_models_variant_selector_select_variant ((GeeIterable*) _tmp13_, _tmp14_, _tmp16_);
	_g_object_unref0 (self->priv->selected_variant);
	self->priv->selected_variant = _tmp17_;
	_g_free0 (_tmp16_);
	_tmp18_ = self->priv->displayed_variants;
	if (!proton_plus_models_variant_selector_should_show_dropdown ((GeeCollection*) _tmp18_)) {
		_g_object_unref0 (provider_tool);
		return;
	}
	_tmp19_ = gtk_string_list_new (NULL);
	model = _tmp19_;
	selected_index = 0;
	index = 0;
	{
		GeeLinkedList* _variant_list = NULL;
		GeeLinkedList* _tmp20_;
		gint _variant_size = 0;
		GeeLinkedList* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		gint _variant_index = 0;
		_tmp20_ = self->priv->displayed_variants;
		_variant_list = _tmp20_;
		_tmp21_ = _variant_list;
		_tmp22_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp21_);
		_tmp23_ = _tmp22_;
		_variant_size = _tmp23_;
		_variant_index = -1;
		while (TRUE) {
			gint _tmp24_;
			gint _tmp25_;
			ProtonPlusModelsVariant* variant = NULL;
			GeeLinkedList* _tmp26_;
			gpointer _tmp27_;
			GtkStringList* _tmp28_;
			ProtonPlusModelsVariant* _tmp29_;
			const gchar* _tmp30_;
			const gchar* _tmp31_;
			ProtonPlusModelsVariant* _tmp32_;
			ProtonPlusModelsVariant* _tmp33_;
			gint _tmp34_;
			_variant_index = _variant_index + 1;
			_tmp24_ = _variant_index;
			_tmp25_ = _variant_size;
			if (!(_tmp24_ < _tmp25_)) {
				break;
			}
			_tmp26_ = _variant_list;
			_tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp26_, _variant_index);
			variant = (ProtonPlusModelsVariant*) _tmp27_;
			_tmp28_ = model;
			_tmp29_ = variant;
			_tmp30_ = proton_plus_models_variant_get_name (_tmp29_);
			_tmp31_ = _tmp30_;
			gtk_string_list_append (_tmp28_, _tmp31_);
			_tmp32_ = variant;
			_tmp33_ = self->priv->selected_variant;
			if (_tmp32_ == _tmp33_) {
				selected_index = index;
			}
			_tmp34_ = index;
			index = _tmp34_ + 1;
			_g_object_unref0 (variant);
		}
	}
	self->priv->updating_variant_dropdown = TRUE;
	_tmp35_ = self->priv->_variant_dropdown;
	_tmp36_ = model;
	gtk_drop_down_set_model (_tmp35_, (GListModel*) _tmp36_);
	_tmp37_ = self->priv->_variant_dropdown;
	gtk_drop_down_set_selected (_tmp37_, (guint) selected_index);
	self->priv->updating_variant_dropdown = FALSE;
	proton_plus_widgets_tools_releases_box_update_variant_list_item_checkmark (self);
	_tmp38_ = self->priv->variant_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp38_, TRUE);
	_tmp39_ = self->priv->_variant_dropdown;
	gtk_widget_set_visible ((GtkWidget*) _tmp39_, TRUE);
	proton_plus_widgets_tools_releases_box_update_actions_placement (self);
	_g_object_unref0 (model);
	_g_object_unref0 (provider_tool);
}

static void
proton_plus_widgets_tools_releases_box_update_repository_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                 ProtonPlusModelsTool* tool)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GtkButton* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	_tmp0_ = proton_plus_models_tool_get_repository_url (tool);
	_tmp1_ = _tmp0_;
	if (g_strcmp0 (_tmp1_, "") != 0) {
		GtkButton* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp2_ = self->priv->_repository_button;
		_tmp3_ = proton_plus_models_tool_get_repository_url (tool);
		_tmp4_ = _tmp3_;
		gtk_accessible_update_property ((GtkAccessible*) _tmp2_, GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, _tmp4_, -1, -1);
	} else {
		GtkButton* _tmp5_;
		_tmp5_ = self->priv->_repository_button;
		gtk_accessible_reset_property ((GtkAccessible*) _tmp5_, GTK_ACCESSIBLE_PROPERTY_DESCRIPTION);
	}
	_tmp6_ = self->priv->_repository_button;
	_tmp7_ = proton_plus_models_tool_get_repository_url (tool);
	_tmp8_ = _tmp7_;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, g_strcmp0 (_tmp8_, "") != 0);
}

static void
proton_plus_widgets_tools_releases_box_on_variant_selected (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gint selected_index = 0;
	GtkDropDown* _tmp6_;
	guint _tmp7_;
	guint _tmp8_;
	ProtonPlusModelsVariant* variant = NULL;
	GeeLinkedList* _tmp9_;
	ProtonPlusModelsVariant* _tmp10_;
	ProtonPlusModelsVariant* _tmp11_;
	ProtonPlusModelsVariant* _tmp12_;
	ProtonPlusModelsVariant* _tmp13_;
	ProtonPlusModelsVariant* _tmp14_;
	ProtonPlusModelsVariant* _tmp15_;
	ProtonPlusModelsTool* _tmp16_;
	ProtonPlusModelsVariant* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GtkPopover* _tmp20_;
	g_return_if_fail (self != NULL);
	if (self->priv->updating_variant_dropdown) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusModelsTool* _tmp2_;
		_tmp2_ = self->priv->current_tool;
		_tmp1_ = _tmp2_ == NULL;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		GeeLinkedList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		_tmp3_ = self->priv->displayed_variants;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp0_ = _tmp5_ <= 1;
	}
	if (_tmp0_) {
		return;
	}
	_tmp6_ = self->priv->_variant_dropdown;
	_tmp7_ = gtk_drop_down_get_selected (_tmp6_);
	_tmp8_ = _tmp7_;
	selected_index = (gint) _tmp8_;
	_tmp9_ = self->priv->displayed_variants;
	_tmp10_ = proton_plus_models_variant_selector_variant_at_display_index ((GeeList*) _tmp9_, selected_index);
	variant = _tmp10_;
	_tmp11_ = variant;
	if (_tmp11_ == NULL) {
		_g_object_unref0 (variant);
		return;
	}
	proton_plus_widgets_tools_releases_box_update_variant_list_item_checkmark (self);
	_tmp12_ = self->priv->selected_variant;
	_tmp13_ = variant;
	if (_tmp12_ == _tmp13_) {
		_g_object_unref0 (variant);
		return;
	}
	_tmp14_ = variant;
	_tmp15_ = _g_object_ref0 (_tmp14_);
	_g_object_unref0 (self->priv->selected_variant);
	self->priv->selected_variant = _tmp15_;
	_tmp16_ = self->priv->current_tool;
	_tmp17_ = variant;
	_tmp18_ = proton_plus_models_variant_get_name (_tmp17_);
	_tmp19_ = _tmp18_;
	proton_plus_widgets_tools_releases_box_save_selected_variant_name (self, _tmp16_, _tmp19_);
	proton_plus_widgets_tools_releases_box_apply_selected_variant_to_rows (self);
	_tmp20_ = self->priv->actions_popover;
	gtk_popover_popdown (_tmp20_);
	_g_object_unref0 (variant);
}

static ProtonPlusModelsVariant*
proton_plus_widgets_tools_releases_box_resolve_release_variant (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                ProtonPlusModelsRelease* release,
                                                                ProtonPlusServicesInstallJobMode mode)
{
	ProtonPlusModelsVariant* _tmp0_;
	ProtonPlusModelsCpuCapabilities* _tmp1_;
	ProtonPlusModelsVariant* _tmp2_;
	ProtonPlusModelsVariant* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (release != NULL, NULL);
	_tmp0_ = self->priv->selected_variant;
	_tmp1_ = proton_plus_globals_CPU_CAPABILITIES;
	_tmp2_ = proton_plus_models_variant_selector_resolve_release_variant (release, _tmp0_, _tmp1_, mode == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST);
	result = _tmp2_;
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_apply_selected_variant_to_job (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                      ProtonPlusServicesInstallJob* job)
{
	ProtonPlusModelsTool* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsVariant* variant = NULL;
	ProtonPlusModelsRelease* _tmp2_;
	ProtonPlusModelsRelease* _tmp3_;
	ProtonPlusServicesInstallJobMode _tmp4_;
	ProtonPlusServicesInstallJobMode _tmp5_;
	ProtonPlusModelsVariant* _tmp6_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	ProtonPlusModelsVariant* _tmp9_;
	ProtonPlusModelsVariant* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	ProtonPlusModelsVariant* _tmp26_;
	ProtonPlusModelsAssetsAsset* _tmp27_;
	ProtonPlusModelsAssetsAsset* _tmp28_;
	ProtonPlusModelsVariant* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (job != NULL, FALSE);
	_tmp0_ = proton_plus_services_install_job_get_tool (job);
	_tmp1_ = _tmp0_;
	if (!PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp1_)) {
		result = TRUE;
		return result;
	}
	_tmp2_ = proton_plus_services_install_job_get_release (job);
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_services_install_job_get_mode (job);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_tools_releases_box_resolve_release_variant (self, _tmp3_, _tmp5_);
	variant = _tmp6_;
	_tmp9_ = variant;
	if (_tmp9_ == NULL) {
		_tmp8_ = TRUE;
	} else {
		ProtonPlusModelsVariant* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = variant;
		_tmp11_ = proton_plus_models_variant_get_download_url (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ == NULL;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		ProtonPlusModelsVariant* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		_tmp13_ = variant;
		_tmp14_ = proton_plus_models_variant_get_download_url (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp7_ = g_strcmp0 (_tmp15_, "") == 0;
	}
	if (_tmp7_) {
		ProtonPlusModelsVariant* _tmp16_;
		_tmp16_ = self->priv->selected_variant;
		if (_tmp16_ != NULL) {
			ProtonPlusModelsVariant* _tmp17_;
			const gchar* _tmp18_;
			const gchar* _tmp19_;
			ProtonPlusModelsVariant* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			_tmp17_ = self->priv->selected_variant;
			_tmp18_ = proton_plus_models_variant_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PROTON_PLUS_MODELS_TYPE_VARIANT, ProtonPlusModelsVariant));
			_tmp19_ = _tmp18_;
			_tmp20_ = self->priv->selected_variant;
			_tmp21_ = proton_plus_models_variant_get_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, PROTON_PLUS_MODELS_TYPE_VARIANT, ProtonPlusModelsVariant));
			_tmp22_ = _tmp21_;
			proton_plus_services_install_job_set_selected_variant (job, _tmp19_, NULL, _tmp22_);
		}
		result = FALSE;
		_g_object_unref0 (variant);
		return result;
	}
	_tmp23_ = variant;
	_tmp24_ = proton_plus_models_variant_get_name (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = variant;
	_tmp27_ = proton_plus_models_variant_resolved_asset (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = variant;
	_tmp30_ = proton_plus_models_variant_get_id (_tmp29_);
	_tmp31_ = _tmp30_;
	proton_plus_services_install_job_set_selected_variant (job, _tmp25_, _tmp28_, _tmp31_);
	_g_object_unref0 (_tmp28_);
	result = TRUE;
	_g_object_unref0 (variant);
	return result;
}

static void
proton_plus_widgets_tools_releases_box_apply_selected_variant_to_rows (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkListBox* _tmp16_;
	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_;
		ProtonPlusServicesInstallJob* job = NULL;
		GtkWidget* _tmp4_;
		gconstpointer _tmp5_;
		ProtonPlusServicesInstallJob* _tmp6_;
		ProtonPlusServicesInstallJob* _tmp7_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "job");
		_tmp6_ = _g_object_ref0 ((ProtonPlusServicesInstallJob*) _tmp5_);
		job = _tmp6_;
		_tmp7_ = job;
		if (_tmp7_ != NULL) {
			ProtonPlusWidgetsToolsReleaseRow* row = NULL;
			GtkWidget* _tmp8_;
			ProtonPlusWidgetsToolsReleaseRow* _tmp9_;
			gboolean available = FALSE;
			ProtonPlusServicesInstallJob* _tmp10_;
			ProtonPlusWidgetsToolsReleaseRow* _tmp11_;
			_tmp8_ = child;
			_tmp9_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp8_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp8_) : NULL);
			row = _tmp9_;
			_tmp10_ = job;
			available = proton_plus_widgets_tools_releases_box_apply_selected_variant_to_job (self, _tmp10_);
			_tmp11_ = row;
			if (_tmp11_ != NULL) {
				ProtonPlusWidgetsToolsReleaseRow* _tmp12_;
				_tmp12_ = row;
				proton_plus_widgets_tools_release_row_set_release_action_available (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), available);
			}
			_g_object_unref0 (row);
		}
		_tmp13_ = child;
		_tmp14_ = gtk_widget_get_next_sibling (_tmp13_);
		_tmp15_ = _g_object_ref0 (_tmp14_);
		_g_object_unref0 (child);
		child = _tmp15_;
		_g_object_unref0 (job);
	}
	_tmp16_ = self->priv->_list_box;
	gtk_list_box_invalidate_filter (_tmp16_);
	proton_plus_widgets_tools_releases_box_update_visibility (self);
	_g_object_unref0 (child);
}

static void
proton_plus_widgets_tools_releases_box_update_refresh_tooltip (ProtonPlusWidgetsToolsReleasesBox* self,
                                                               gboolean refreshing)
{
	const gchar* _tmp0_ = NULL;
	gchar* tooltip = NULL;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ProtonPlusModelsTool* _tmp4_;
	gchar* timestamp = NULL;
	ProtonPlusModelsTool* _tmp15_;
	ProtonPlusModelsReleaseCatalog* _tmp16_;
	ProtonPlusModelsReleaseCatalog* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	GtkButton* _tmp27_;
	const gchar* _tmp28_;
	g_return_if_fail (self != NULL);
	if (refreshing) {
		_tmp0_ = _ ("Refreshing…");
	} else {
		_tmp0_ = _ ("Check for new releases");
	}
	_tmp1_ = g_strdup (_tmp0_);
	tooltip = _tmp1_;
	_tmp4_ = self->priv->current_tool;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		ProtonPlusModelsTool* _tmp5_;
		ProtonPlusModelsReleaseCatalog* _tmp6_;
		ProtonPlusModelsReleaseCatalog* _tmp7_;
		_tmp5_ = self->priv->current_tool;
		_tmp6_ = proton_plus_models_tool_get_release_catalog (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp3_ = _tmp7_ == NULL;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusModelsTool* _tmp8_;
		ProtonPlusModelsReleaseCatalog* _tmp9_;
		ProtonPlusModelsReleaseCatalog* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp8_ = self->priv->current_tool;
		_tmp9_ = proton_plus_models_tool_get_release_catalog (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = proton_plus_models_release_catalog_get_last_updated (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp2_ = g_strcmp0 (_tmp12_, "") == 0;
	}
	if (_tmp2_) {
		GtkButton* _tmp13_;
		const gchar* _tmp14_;
		_tmp13_ = self->priv->_refresh_button;
		_tmp14_ = tooltip;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp13_, _tmp14_);
		_g_free0 (tooltip);
		return;
	}
	_tmp15_ = self->priv->current_tool;
	_tmp16_ = proton_plus_models_tool_get_release_catalog (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = proton_plus_models_release_catalog_get_last_updated (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = proton_plus_utils_format_timestamp (_tmp19_);
	timestamp = _tmp20_;
	_tmp21_ = timestamp;
	if (g_strcmp0 (_tmp21_, "") != 0) {
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp22_ = tooltip;
		_tmp23_ = timestamp;
		_tmp24_ = g_strdup_printf (_ ("Last updated: %s"), _tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_strdup_printf ("%s\n%s", _tmp22_, _tmp25_);
		_g_free0 (tooltip);
		tooltip = _tmp26_;
		_g_free0 (_tmp25_);
	}
	_tmp27_ = self->priv->_refresh_button;
	_tmp28_ = tooltip;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp27_, _tmp28_);
	_g_free0 (timestamp);
	_g_free0 (tooltip);
}

void
proton_plus_widgets_tools_releases_box_refresh_usage_pills (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkListBox* _tmp9_;
	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_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		if (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp4_)) {
			GtkWidget* _tmp5_;
			_tmp5_ = child;
			proton_plus_widgets_tools_release_row_refresh_usage_pill (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
		}
		_tmp6_ = child;
		_tmp7_ = gtk_widget_get_next_sibling (_tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (child);
		child = _tmp8_;
	}
	_tmp9_ = self->priv->_list_box;
	gtk_list_box_invalidate_filter (_tmp9_);
	proton_plus_widgets_tools_releases_box_update_visibility (self);
	_g_object_unref0 (child);
}

static Block27Data*
block27_data_ref (Block27Data* _data27_)
{
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}

static void
block27_data_unref (void * _userdata_)
{
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		ProtonPlusWidgetsToolsReleasesBox* self;
		self = _data27_->self;
		g_weak_ref_clear (&_data27_->weak_row);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}

static gboolean
___lambda67_ (Block27Data* _data27_)
{
	ProtonPlusWidgetsToolsReleasesBox* self;
	ProtonPlusWidgetsToolsReleaseRow* current_row = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp2_;
	gboolean result;
	self = _data27_->self;
	_tmp0_ = g_weak_ref_get (&_data27_->weak_row);
	_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp0_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	current_row = _tmp1_;
	_tmp2_ = current_row;
	if (_tmp2_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp3_;
		_tmp3_ = current_row;
		gtk_widget_remove_css_class ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), "download-highlight");
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (current_row);
	return result;
}

static gboolean
____lambda67__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda67_ (self);
	return result;
}

ProtonPlusWidgetsToolsReleaseRow*
proton_plus_widgets_tools_releases_box_focus_job_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                      ProtonPlusServicesInstallJob* target,
                                                      gboolean highlight)
{
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	ProtonPlusWidgetsToolsReleaseRow* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp8_;
	ProtonPlusWidgetsToolsReleaseRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (target != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_releases_box_find_job_row (self, target);
	row = _tmp0_;
	_tmp4_ = row;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp5_;
		_tmp5_ = row;
		_tmp3_ = !gtk_widget_get_mapped ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp6_;
		_tmp6_ = row;
		_tmp2_ = !gtk_widget_is_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp7_;
		_tmp7_ = row;
		_tmp1_ = !gtk_widget_get_child_visible ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
	}
	if (_tmp1_) {
		result = NULL;
		_g_object_unref0 (row);
		return result;
	}
	_tmp8_ = row;
	gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
	if (highlight) {
		Block27Data* _data27_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp9_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp10_;
		_data27_ = g_slice_new0 (Block27Data);
		_data27_->_ref_count_ = 1;
		_data27_->self = g_object_ref (self);
		_tmp9_ = row;
		gtk_widget_add_css_class ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), "download-highlight");
		_tmp10_ = row;
		g_weak_ref_init (&_data27_->weak_row, (GObject*) G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1200, ____lambda67__gsource_func, block27_data_ref (_data27_), block27_data_unref);
		block27_data_unref (_data27_);
		_data27_ = NULL;
	}
	result = row;
	return result;
}

static ProtonPlusWidgetsToolsReleaseRow*
proton_plus_widgets_tools_releases_box_find_job_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                     ProtonPlusServicesInstallJob* target)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	ProtonPlusWidgetsToolsReleaseRow* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (target != 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_;
		ProtonPlusServicesInstallJob* job = NULL;
		GtkWidget* _tmp4_;
		gconstpointer _tmp5_;
		ProtonPlusServicesInstallJob* _tmp6_;
		gboolean _tmp7_ = FALSE;
		ProtonPlusServicesInstallJob* _tmp8_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		GtkWidget* _tmp16_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "job");
		_tmp6_ = _g_object_ref0 ((ProtonPlusServicesInstallJob*) _tmp5_);
		job = _tmp6_;
		_tmp8_ = job;
		if (_tmp8_ != NULL) {
			gboolean _tmp9_ = FALSE;
			ProtonPlusServicesInstallJob* _tmp10_;
			_tmp10_ = job;
			if (_tmp10_ == target) {
				_tmp9_ = TRUE;
			} else {
				ProtonPlusServicesInstallJob* _tmp11_;
				_tmp11_ = job;
				_tmp9_ = proton_plus_widgets_tools_releases_box_jobs_have_same_identity (self, _tmp11_, target);
			}
			_tmp7_ = _tmp9_;
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GtkWidget* _tmp12_;
			ProtonPlusWidgetsToolsReleaseRow* _tmp13_;
			_tmp12_ = child;
			_tmp13_ = _g_object_ref0 (PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp12_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp12_) : NULL);
			result = _tmp13_;
			_g_object_unref0 (job);
			_g_object_unref0 (child);
			return result;
		}
		_tmp14_ = child;
		_tmp15_ = gtk_widget_get_next_sibling (_tmp14_);
		_tmp16_ = _g_object_ref0 (_tmp15_);
		_g_object_unref0 (child);
		child = _tmp16_;
		_g_object_unref0 (job);
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_jobs_have_same_identity (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                ProtonPlusServicesInstallJob* left,
                                                                ProtonPlusServicesInstallJob* right)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ProtonPlusModelsTool* _tmp5_;
	ProtonPlusModelsTool* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp13_ = FALSE;
	ProtonPlusModelsRelease* _tmp14_;
	ProtonPlusModelsRelease* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp31_ = FALSE;
	ProtonPlusModelsRelease* _tmp32_;
	ProtonPlusModelsRelease* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (left != NULL, FALSE);
	g_return_val_if_fail (right != NULL, FALSE);
	_tmp1_ = proton_plus_services_install_job_get_tool (left);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_models_tool_get_id (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_services_install_job_get_tool (right);
	_tmp6_ = _tmp5_;
	_tmp7_ = proton_plus_models_tool_get_id (_tmp6_);
	_tmp8_ = _tmp7_;
	if (g_strcmp0 (_tmp4_, _tmp8_) != 0) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJobMode _tmp9_;
		ProtonPlusServicesInstallJobMode _tmp10_;
		ProtonPlusServicesInstallJobMode _tmp11_;
		ProtonPlusServicesInstallJobMode _tmp12_;
		_tmp9_ = proton_plus_services_install_job_get_mode (left);
		_tmp10_ = _tmp9_;
		_tmp11_ = proton_plus_services_install_job_get_mode (right);
		_tmp12_ = _tmp11_;
		_tmp0_ = _tmp10_ != _tmp12_;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp14_ = proton_plus_services_install_job_get_release (left);
	_tmp15_ = _tmp14_;
	_tmp16_ = proton_plus_models_release_get_upstream_release_id (_tmp15_);
	_tmp17_ = _tmp16_;
	if (g_strcmp0 (_tmp17_, "") != 0) {
		ProtonPlusModelsRelease* _tmp18_;
		ProtonPlusModelsRelease* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp18_ = proton_plus_services_install_job_get_release (right);
		_tmp19_ = _tmp18_;
		_tmp20_ = proton_plus_models_release_get_upstream_release_id (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp13_ = g_strcmp0 (_tmp21_, "") != 0;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		ProtonPlusModelsRelease* _tmp22_;
		ProtonPlusModelsRelease* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		ProtonPlusModelsRelease* _tmp26_;
		ProtonPlusModelsRelease* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		_tmp22_ = proton_plus_services_install_job_get_release (left);
		_tmp23_ = _tmp22_;
		_tmp24_ = proton_plus_models_release_get_upstream_release_id (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = proton_plus_services_install_job_get_release (right);
		_tmp27_ = _tmp26_;
		_tmp28_ = proton_plus_models_release_get_upstream_release_id (_tmp27_);
		_tmp29_ = _tmp28_;
		result = g_strcmp0 (_tmp25_, _tmp29_) == 0;
		return result;
	}
	_tmp32_ = proton_plus_services_install_job_get_release (left);
	_tmp33_ = _tmp32_;
	_tmp34_ = proton_plus_models_release_get_source_tag (_tmp33_);
	_tmp35_ = _tmp34_;
	if (g_strcmp0 (_tmp35_, "") != 0) {
		ProtonPlusModelsRelease* _tmp36_;
		ProtonPlusModelsRelease* _tmp37_;
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		_tmp36_ = proton_plus_services_install_job_get_release (right);
		_tmp37_ = _tmp36_;
		_tmp38_ = proton_plus_models_release_get_source_tag (_tmp37_);
		_tmp39_ = _tmp38_;
		_tmp31_ = g_strcmp0 (_tmp39_, "") != 0;
	} else {
		_tmp31_ = FALSE;
	}
	if (_tmp31_) {
		ProtonPlusModelsRelease* _tmp40_;
		ProtonPlusModelsRelease* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		ProtonPlusModelsRelease* _tmp44_;
		ProtonPlusModelsRelease* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		_tmp40_ = proton_plus_services_install_job_get_release (left);
		_tmp41_ = _tmp40_;
		_tmp42_ = proton_plus_models_release_get_source_tag (_tmp41_);
		_tmp43_ = _tmp42_;
		_tmp44_ = proton_plus_services_install_job_get_release (right);
		_tmp45_ = _tmp44_;
		_tmp46_ = proton_plus_models_release_get_source_tag (_tmp45_);
		_tmp47_ = _tmp46_;
		_tmp30_ = g_strcmp0 (_tmp43_, _tmp47_) == 0;
	} else {
		_tmp30_ = FALSE;
	}
	result = _tmp30_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_add_release_rows (ProtonPlusWidgetsToolsReleasesBox* self,
                                                         ProtonPlusModelsTool* tool,
                                                         GeeLinkedList* releases)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (tool != NULL);
	g_return_if_fail (releases != NULL);
	if (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (tool)) {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) releases);
		_tmp2_ = _tmp1_;
		_tmp0_ = _tmp2_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gpointer _tmp3_;
		ProtonPlusModelsRelease* _tmp4_;
		_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) releases, 0);
		_tmp4_ = (ProtonPlusModelsRelease*) _tmp3_;
		proton_plus_widgets_tools_releases_box_add_release_row (self, _tmp4_, PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST);
		_g_object_unref0 (_tmp4_);
	}
	{
		GeeLinkedList* _release_list = NULL;
		gint _release_size = 0;
		GeeLinkedList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _release_index = 0;
		_release_list = releases;
		_tmp5_ = _release_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_release_size = _tmp7_;
		_release_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			ProtonPlusModelsRelease* release = NULL;
			GeeLinkedList* _tmp10_;
			gpointer _tmp11_;
			ProtonPlusModelsRelease* _tmp12_;
			_release_index = _release_index + 1;
			_tmp8_ = _release_index;
			_tmp9_ = _release_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _release_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _release_index);
			release = (ProtonPlusModelsRelease*) _tmp11_;
			_tmp12_ = release;
			proton_plus_widgets_tools_releases_box_add_release_row (self, _tmp12_, PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED);
			_g_object_unref0 (release);
		}
	}
}

static Block28Data*
block28_data_ref (Block28Data* _data28_)
{
	g_atomic_int_inc (&_data28_->_ref_count_);
	return _data28_;
}

static void
block28_data_unref (void * _userdata_)
{
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
		ProtonPlusWidgetsToolsReleasesBox* self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->job);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}

static void
__lambda39_ (Block28Data* _data28_)
{
	ProtonPlusWidgetsToolsReleasesBox* self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp2_;
	ProtonPlusServicesInstallJobState _tmp3_;
	ProtonPlusServicesInstallJobState _tmp4_;
	self = _data28_->self;
	_tmp2_ = _data28_->job;
	_tmp3_ = proton_plus_services_install_job_get_state (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		ProtonPlusServicesInstallJob* _tmp5_;
		ProtonPlusServicesInstallJobState _tmp6_;
		ProtonPlusServicesInstallJobState _tmp7_;
		_tmp5_ = _data28_->job;
		_tmp6_ = proton_plus_services_install_job_get_state (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ != PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ProtonPlusServicesInstallJob* _tmp8_;
		ProtonPlusServicesInstallJobState _tmp9_;
		ProtonPlusServicesInstallJobState _tmp10_;
		_tmp8_ = _data28_->job;
		_tmp9_ = proton_plus_services_install_job_get_state (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp0_ = _tmp10_ != PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkListBox* _tmp11_;
		_tmp11_ = self->priv->_list_box;
		gtk_list_box_invalidate_filter (_tmp11_);
		proton_plus_widgets_tools_releases_box_update_visibility (self);
	}
}

static void
___lambda39__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda39_ (self);
}

static void
__lambda64_ (ProtonPlusWidgetsToolsReleasesBox* self,
             ProtonPlusServicesInstallJob* selected_job)
{
	g_return_if_fail (selected_job != NULL);
	g_signal_emit (self, proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CHANGELOG_REQUESTED_SIGNAL], 0, selected_job);
}

static void
___lambda64__proton_plus_widgets_tools_release_row_changelog_requested (ProtonPlusWidgetsToolsReleaseRow* _sender,
                                                                        ProtonPlusServicesInstallJob* job,
                                                                        gpointer self)
{
	__lambda64_ ((ProtonPlusWidgetsToolsReleasesBox*) self, job);
}

static void
__lambda65_ (ProtonPlusWidgetsToolsReleasesBox* self,
             ProtonPlusServicesInstallJob* selected_job)
{
	g_return_if_fail (selected_job != NULL);
	g_signal_emit (self, proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_GAMES_REQUESTED_SIGNAL], 0, selected_job);
}

static void
___lambda65__proton_plus_widgets_tools_release_row_games_requested (ProtonPlusWidgetsToolsReleaseRow* _sender,
                                                                    ProtonPlusServicesInstallJob* job,
                                                                    gpointer self)
{
	__lambda65_ ((ProtonPlusWidgetsToolsReleasesBox*) self, job);
}

static void
proton_plus_widgets_tools_releases_box_add_release_row (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        ProtonPlusModelsRelease* release,
                                                        ProtonPlusServicesInstallJobMode mode)
{
	Block28Data* _data28_;
	ProtonPlusModelsTool* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusServicesInstallJob* _tmp2_;
	gboolean release_action_available = FALSE;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusServicesInstallJob* active_job = NULL;
	ProtonPlusUtilsDownloadManager* _tmp4_;
	ProtonPlusUtilsDownloadManager* _tmp5_;
	ProtonPlusServicesInstallJob* _tmp6_;
	ProtonPlusServicesInstallJob* _tmp7_;
	ProtonPlusServicesInstallJob* _tmp8_;
	GeeHashMap* _tmp11_;
	ProtonPlusServicesInstallJob* _tmp12_;
	GeeHashMap* _tmp17_;
	ProtonPlusServicesInstallJob* _tmp18_;
	ProtonPlusServicesInstallJob* _tmp19_;
	gulong _tmp20_;
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	ProtonPlusServicesInstallJob* _tmp21_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp22_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp23_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp32_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp33_;
	GtkWidget* _tmp34_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp35_;
	ProtonPlusServicesInstallJob* _tmp36_;
	ProtonPlusServicesInstallJob* _tmp37_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp38_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp39_;
	GtkListBox* _tmp40_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp41_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (release != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = self->priv->current_tool;
	if (_tmp0_ == NULL) {
		block28_data_unref (_data28_);
		_data28_ = NULL;
		return;
	}
	_tmp1_ = self->priv->current_tool;
	_tmp2_ = proton_plus_services_install_job_new (release, _tmp1_, mode, NULL, NULL);
	_data28_->job = _tmp2_;
	_tmp3_ = _data28_->job;
	release_action_available = proton_plus_widgets_tools_releases_box_apply_selected_variant_to_job (self, _tmp3_);
	_tmp4_ = proton_plus_utils_download_manager_get_instance ();
	_tmp5_ = _tmp4_;
	_tmp6_ = _data28_->job;
	_tmp7_ = proton_plus_utils_download_manager_get_active_download (_tmp5_, _tmp6_);
	active_job = _tmp7_;
	_tmp8_ = active_job;
	if (_tmp8_ != NULL) {
		ProtonPlusServicesInstallJob* _tmp9_;
		ProtonPlusServicesInstallJob* _tmp10_;
		_tmp9_ = active_job;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		_g_object_unref0 (_data28_->job);
		_data28_->job = _tmp10_;
	}
	_tmp11_ = self->priv->job_state_handlers;
	_tmp12_ = _data28_->job;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp11_, _tmp12_)) {
		ProtonPlusServicesInstallJob* _tmp13_;
		GeeHashMap* _tmp14_;
		ProtonPlusServicesInstallJob* _tmp15_;
		gpointer _tmp16_;
		_tmp13_ = _data28_->job;
		_tmp14_ = self->priv->job_state_handlers;
		_tmp15_ = _data28_->job;
		_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, _tmp15_);
		g_signal_handler_disconnect ((GObject*) _tmp13_, (gulong) ((guintptr) _tmp16_));
	}
	_tmp17_ = self->priv->job_state_handlers;
	_tmp18_ = _data28_->job;
	_tmp19_ = _data28_->job;
	_tmp20_ = g_signal_connect_data ((GObject*) _tmp19_, "notify::state", (GCallback) ___lambda39__g_object_notify, block28_data_ref (_data28_), (GClosureNotify) block28_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, _tmp18_, (gpointer) ((guintptr) _tmp20_));
	_tmp21_ = _data28_->job;
	_tmp22_ = proton_plus_services_install_job_get_steam_tinker_launch_context (_tmp21_);
	_tmp23_ = _tmp22_;
	if (_tmp23_ != NULL) {
		ProtonPlusServicesInstallJob* _tmp24_;
		ProtonPlusWidgetsToolsSTLReleaseRow* _tmp25_;
		ProtonPlusServicesInstallJob* _tmp26_;
		_tmp24_ = _data28_->job;
		_tmp25_ = proton_plus_widgets_tools_stl_release_row_new (_tmp24_);
		g_object_ref_sink (_tmp25_);
		_g_object_unref0 (row);
		row = (ProtonPlusWidgetsToolsReleaseRow*) _tmp25_;
		_tmp26_ = active_job;
		if (_tmp26_ == NULL) {
			ProtonPlusServicesInstallationService* _tmp27_;
			ProtonPlusServicesInstallationService* _tmp28_;
			ProtonPlusServicesInstallJob* _tmp29_;
			_tmp27_ = proton_plus_services_installation_service_get_instance ();
			_tmp28_ = _tmp27_;
			_tmp29_ = _data28_->job;
			proton_plus_services_installation_service_refresh_steam_tinker_launch_release (_tmp28_, _tmp29_, NULL, NULL);
		}
	} else {
		ProtonPlusServicesInstallJob* _tmp30_;
		ProtonPlusWidgetsToolsReleaseRow* _tmp31_;
		_tmp30_ = _data28_->job;
		_tmp31_ = proton_plus_widgets_tools_release_row_new (_tmp30_, release_action_available);
		g_object_ref_sink (_tmp31_);
		_g_object_unref0 (row);
		row = _tmp31_;
	}
	_tmp32_ = row;
	proton_plus_widgets_tools_releases_box_configure_release_row_up_targets (self, _tmp32_);
	_tmp33_ = row;
	_tmp34_ = self->priv->controller_down_target;
	proton_plus_widgets_tools_release_row_set_controller_down_target (_tmp33_, _tmp34_);
	_tmp35_ = row;
	_tmp36_ = _data28_->job;
	_tmp37_ = _g_object_ref0 (_tmp36_);
	g_object_set_data_full ((GObject*) _tmp35_, "job", _tmp37_, g_object_unref);
	_tmp38_ = row;
	g_signal_connect_object (_tmp38_, "changelog-requested", (GCallback) ___lambda64__proton_plus_widgets_tools_release_row_changelog_requested, self, 0);
	_tmp39_ = row;
	g_signal_connect_object (_tmp39_, "games-requested", (GCallback) ___lambda65__proton_plus_widgets_tools_release_row_games_requested, self, 0);
	_tmp40_ = self->priv->_list_box;
	_tmp41_ = row;
	gtk_list_box_append (_tmp40_, (GtkWidget*) _tmp41_);
	_g_object_unref0 (row);
	_g_object_unref0 (active_job);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}

static void
proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GeeHashMap* _tmp15_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->job_state_handlers;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_key (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_value (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_handler_disconnect ((GObject*) ((ProtonPlusServicesInstallJob*) _tmp11_), (gulong) ((guintptr) _tmp14_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp15_ = self->priv->job_state_handlers;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
}

static void
proton_plus_widgets_tools_releases_box_real_dispose (GObject* base)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	self = (ProtonPlusWidgetsToolsReleasesBox*) base;
	proton_plus_widgets_tools_releases_box_detach_actions_button (self);
	proton_plus_widgets_tools_releases_box_disconnect_job_state_handlers (self);
	G_OBJECT_CLASS (proton_plus_widgets_tools_releases_box_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox));
}

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

static void
proton_plus_widgets_tools_releases_box_on_load_more_clicked (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData* _data_;
	ProtonPlusWidgetsToolsReleasesBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_widgets_tools_releases_box_on_load_more_clicked_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_widgets_tools_releases_box_on_load_more_clicked_co (_data_);
}

static void
proton_plus_widgets_tools_releases_box_on_load_more_clicked_finish (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                    GAsyncResult* _res_)
{
	ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
proton_plus_widgets_tools_releases_box_on_load_more_clicked_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_)
{
	ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_widgets_tools_releases_box_on_load_more_clicked_co (_data_);
}

static gboolean
proton_plus_widgets_tools_releases_box_on_load_more_clicked_co (ProtonPlusWidgetsToolsReleasesBoxOnLoadMoreClickedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = _data_->self->priv->current_tool;
	if (_data_->_tmp1_ == NULL) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp0_ = _data_->self->priv->request_in_progress;
	}
	if (_data_->_tmp0_) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->self->priv->current_tool;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
	_data_->tool = _data_->_tmp3_;
	_data_->request_generation = _data_->self->priv->tool_request_generation;
	_data_->self->priv->last_request_kind = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_LOAD_MORE;
	_data_->self->priv->background_request_started_empty = FALSE;
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, TRUE);
	_data_->self->priv->error_active = FALSE;
	_data_->_tmp4_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp4_, FALSE);
	_data_->_tmp5_ = _data_->self->priv->_content_stack;
	gtk_stack_set_visible_child_name (_data_->_tmp5_, "list");
	_data_->_tmp6_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp6_, FALSE);
	_data_->_tmp7_ = _data_->self->priv->load_more_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp7_, FALSE);
	_data_->_tmp8_ = _data_->self->priv->load_more_button;
	gtk_button_set_label (_data_->_tmp8_, _ ("Loading…"));
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Loading releases"));
	_data_->_tmp9_ = _data_->tool;
	_data_->_tmp10_ = proton_plus_models_tool_get_release_catalog (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = _g_object_ref0 (_data_->_tmp11_);
	_data_->catalog = _data_->_tmp12_;
	_data_->_tmp13_ = _data_->catalog;
	if (_data_->_tmp13_ == NULL) {
		proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
		proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
		_data_->_tmp14_ = _data_->self->priv->_refresh_button;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp14_, TRUE);
		_g_object_unref0 (_data_->catalog);
		_g_object_unref0 (_data_->tool);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp15_ = _data_->catalog;
	_data_->_state_ = 1;
	proton_plus_models_release_catalog_load_more (_data_->_tmp15_, proton_plus_widgets_tools_releases_box_on_load_more_clicked_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp16_ = proton_plus_models_release_catalog_load_more_finish (_data_->_tmp15_, _data_->_res_);
	_data_->_result_ = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->tool;
	if (!proton_plus_widgets_tools_releases_box_is_current_tool_request (_data_->self, _data_->_tmp17_, _data_->request_generation)) {
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		_g_object_unref0 (_data_->tool);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	proton_plus_widgets_tools_releases_box_set_request_in_progress (_data_->self, FALSE);
	_data_->_tmp18_ = _data_->_result_;
	_data_->_tmp19_ = proton_plus_models_release_catalog_result_get_succeeded (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	if (_data_->_tmp20_) {
		{
			_data_->_tmp21_ = _data_->_result_;
			_data_->_tmp22_ = proton_plus_models_release_catalog_result_get_releases (_data_->_tmp21_);
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_release_list = _data_->_tmp23_;
			_data_->_tmp24_ = _data_->_release_list;
			_data_->_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp24_);
			_data_->_tmp26_ = _data_->_tmp25_;
			_data_->_release_size = _data_->_tmp26_;
			_data_->_release_index = -1;
			while (TRUE) {
				_data_->_release_index = _data_->_release_index + 1;
				_data_->_tmp27_ = _data_->_release_index;
				_data_->_tmp28_ = _data_->_release_size;
				if (!(_data_->_tmp27_ < _data_->_tmp28_)) {
					break;
				}
				_data_->_tmp29_ = _data_->_release_list;
				_data_->_tmp30_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp29_, _data_->_release_index);
				_data_->release = (ProtonPlusModelsRelease*) _data_->_tmp30_;
				_data_->_tmp31_ = _data_->release;
				proton_plus_widgets_tools_releases_box_add_release_row (_data_->self, _data_->_tmp31_, PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED);
				_g_object_unref0 (_data_->release);
			}
		}
		_data_->_tmp32_ = _data_->tool;
		_data_->_tmp33_ = proton_plus_models_tool_get_group (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->_tmp33_;
		proton_plus_models_group_refresh_installed_state (_data_->_tmp34_);
		_data_->_tmp35_ = _data_->self->priv->_list_box;
		_data_->_tmp36_ = _data_->self->priv->load_more_row;
		gtk_list_box_remove (_data_->_tmp35_, (GtkWidget*) _data_->_tmp36_);
		_data_->_tmp37_ = _data_->self->priv->_list_box;
		_data_->_tmp38_ = _data_->self->priv->load_more_row;
		gtk_list_box_append (_data_->_tmp37_, (GtkWidget*) _data_->_tmp38_);
	} else {
		proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
		_data_->_tmp39_ = _data_->self->priv->_refresh_button;
		gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp39_, TRUE);
		_data_->_tmp40_ = _data_->_result_;
		_data_->_tmp41_ = proton_plus_models_release_catalog_result_get_code (_data_->_tmp40_);
		_data_->_tmp42_ = _data_->_tmp41_;
		proton_plus_widgets_tools_releases_box_show_error (_data_->self, _data_->_tmp42_);
		_g_object_unref0 (_data_->_result_);
		_g_object_unref0 (_data_->catalog);
		_g_object_unref0 (_data_->tool);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp44_ = _data_->catalog;
	_data_->_tmp45_ = proton_plus_models_release_catalog_get_has_more (_data_->_tmp44_);
	_data_->_tmp46_ = _data_->_tmp45_;
	if (_data_->_tmp46_) {
		_data_->_tmp43_ = proton_plus_widgets_tools_releases_box_can_show_provider_release_rows (_data_->self);
	} else {
		_data_->_tmp43_ = FALSE;
	}
	_data_->_tmp47_ = _data_->self->priv->load_more_row;
	gtk_widget_set_visible ((GtkWidget*) _data_->_tmp47_, _data_->_tmp43_);
	proton_plus_widgets_tools_releases_box_reset_load_more_button (_data_->self);
	_data_->_tmp48_ = _data_->self->priv->_refresh_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp48_, TRUE);
	proton_plus_widgets_tools_releases_box_update_visibility (_data_->self);
	_data_->_tmp49_ = _data_->self->priv->_error_banner;
	adw_banner_set_revealed (_data_->_tmp49_, FALSE);
	proton_plus_widgets_tools_releases_box_announce_state (_data_->self, _ ("Releases loaded"));
	_g_object_unref0 (_data_->_result_);
	_g_object_unref0 (_data_->catalog);
	_g_object_unref0 (_data_->tool);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_widgets_tools_releases_box_reset_load_more_button (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->load_more_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, TRUE);
	_tmp1_ = self->priv->load_more_button;
	gtk_button_set_label (_tmp1_, _ ("Load More"));
}

static gboolean
proton_plus_widgets_tools_releases_box_is_current_tool_request (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                ProtonPlusModelsTool* tool,
                                                                guint request_generation)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsTool* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (tool != NULL, FALSE);
	_tmp1_ = self->priv->current_tool;
	if (_tmp1_ == tool) {
		ProtonPlusWidgetsToolsInlineReleaseRequestGuard* _tmp2_;
		_tmp2_ = self->priv->request_guard;
		_tmp0_ = proton_plus_widgets_tools_inline_release_request_guard_is_current (_tmp2_, (GObject*) tool, request_generation);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_tools_releases_box_can_show_provider_release_rows (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsTool* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->current_tool;
	if (!PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp1_)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self->priv->provider_has_compatible_variants;
	}
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_update_visibility (ProtonPlusWidgetsToolsReleasesBox* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean has_visible = FALSE;
	GtkWidget* child = NULL;
	GtkListBox* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gboolean _tmp13_ = FALSE;
	g_return_if_fail (self != NULL);
	if (self->priv->request_in_progress) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self->priv->error_active;
	}
	if (_tmp0_) {
		return;
	}
	has_visible = FALSE;
	_tmp1_ = self->priv->_list_box;
	_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	child = _tmp3_;
	while (TRUE) {
		GtkWidget* _tmp4_;
		gboolean _tmp5_ = FALSE;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		GtkWidget* _tmp12_;
		_tmp4_ = child;
		if (!(_tmp4_ != NULL)) {
			break;
		}
		_tmp6_ = child;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_list_box_row_get_type ())) {
			GtkWidget* _tmp7_;
			GtkListBoxRow* _tmp8_;
			_tmp7_ = child;
			_tmp8_ = self->priv->load_more_row;
			_tmp5_ = _tmp7_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp9_;
			_tmp9_ = child;
			if (proton_plus_widgets_tools_releases_box_filter_func (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_list_box_row_get_type (), GtkListBoxRow))) {
				has_visible = TRUE;
				break;
			}
		}
		_tmp10_ = child;
		_tmp11_ = gtk_widget_get_next_sibling (_tmp10_);
		_tmp12_ = _g_object_ref0 (_tmp11_);
		_g_object_unref0 (child);
		child = _tmp12_;
	}
	if (has_visible) {
		_tmp13_ = TRUE;
	} else {
		gboolean _tmp14_ = FALSE;
		GtkListBoxRow* _tmp15_;
		_tmp15_ = self->priv->load_more_row;
		if (_tmp15_ != NULL) {
			GtkListBoxRow* _tmp16_;
			gboolean _tmp17_;
			gboolean _tmp18_;
			_tmp16_ = self->priv->load_more_row;
			_tmp17_ = gtk_widget_get_visible ((GtkWidget*) _tmp16_);
			_tmp18_ = _tmp17_;
			_tmp14_ = _tmp18_;
		} else {
			_tmp14_ = FALSE;
		}
		_tmp13_ = _tmp14_;
	}
	if (_tmp13_) {
		GtkStack* _tmp19_;
		_tmp19_ = self->priv->_content_stack;
		gtk_stack_set_visible_child_name (_tmp19_, "list");
	} else {
		GtkStack* _tmp20_;
		AdwStatusPage* _tmp21_;
		const gchar* _tmp22_;
		proton_plus_widgets_tools_releases_box_update_empty_status (self);
		_tmp20_ = self->priv->_content_stack;
		gtk_stack_set_visible_child_name (_tmp20_, "empty");
		_tmp21_ = self->priv->_status_page;
		_tmp22_ = adw_status_page_get_title (_tmp21_);
		proton_plus_widgets_tools_releases_box_announce_state (self, _tmp22_);
	}
	_g_object_unref0 (child);
}

static gboolean
proton_plus_widgets_tools_releases_box_has_release_rows (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkWidget* child = NULL;
	GtkListBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != 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_, "job");
		if (((ProtonPlusServicesInstallJob*) _tmp5_) != NULL) {
			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;
}

static gboolean
proton_plus_widgets_tools_releases_box_filter_func (ProtonPlusWidgetsToolsReleasesBox* self,
                                                    GtkListBoxRow* row)
{
	ProtonPlusServicesInstallJob* job = NULL;
	gconstpointer _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJob* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	ProtonPlusModelsToolsProviderTool* provider_tool = NULL;
	ProtonPlusModelsTool* _tmp28_;
	ProtonPlusModelsToolsProviderTool* _tmp29_;
	gboolean _tmp30_ = FALSE;
	ProtonPlusModelsToolsProviderTool* _tmp31_;
	ProtonPlusWidgetsToolsFilter _tmp32_;
	ProtonPlusWidgetsToolsFilter _tmp33_;
	ProtonPlusWidgetsToolsFilter _tmp34_;
	ProtonPlusWidgetsToolsFilter _tmp35_;
	gint usage_count = 0;
	ProtonPlusServicesInstallJob* _tmp43_;
	ProtonPlusModelsTool* _tmp44_;
	ProtonPlusModelsTool* _tmp45_;
	ProtonPlusModelsGroup* _tmp46_;
	ProtonPlusModelsGroup* _tmp47_;
	ProtonPlusModelsLauncher* _tmp48_;
	ProtonPlusModelsLauncher* _tmp49_;
	ProtonPlusServicesInstallJob* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gint _tmp53_;
	ProtonPlusWidgetsToolsFilter _tmp54_;
	ProtonPlusWidgetsToolsFilter _tmp55_;
	ProtonPlusWidgetsToolsFilter _tmp56_;
	ProtonPlusWidgetsToolsFilter _tmp57_;
	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, "job");
	_tmp1_ = _g_object_ref0 ((ProtonPlusServicesInstallJob*) _tmp0_);
	job = _tmp1_;
	_tmp2_ = job;
	if (_tmp2_ == NULL) {
		result = TRUE;
		_g_object_unref0 (job);
		return result;
	}
	_tmp5_ = proton_plus_widgets_tools_releases_box_get_search_text (self);
	_tmp6_ = _tmp5_;
	if (g_strcmp0 (_tmp6_, "") != 0) {
		ProtonPlusServicesInstallJob* _tmp7_;
		ProtonPlusModelsRelease* _tmp8_;
		ProtonPlusModelsRelease* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp7_ = job;
		_tmp8_ = proton_plus_services_install_job_get_release (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_models_release_get_title (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_utf8_strdown (_tmp11_, (gssize) -1);
		_tmp13_ = _tmp12_;
		_tmp14_ = proton_plus_widgets_tools_releases_box_get_search_text (self);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_utf8_strdown (_tmp15_, (gssize) -1);
		_tmp17_ = _tmp16_;
		_tmp4_ = !string_contains (_tmp13_, _tmp17_);
		_g_free0 (_tmp17_);
		_g_free0 (_tmp13_);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ProtonPlusServicesInstallJob* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp18_ = job;
		_tmp19_ = proton_plus_services_install_job_get_title (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = _tmp20_;
		_tmp22_ = g_utf8_strdown (_tmp21_, (gssize) -1);
		_tmp23_ = _tmp22_;
		_tmp24_ = proton_plus_widgets_tools_releases_box_get_search_text (self);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_utf8_strdown (_tmp25_, (gssize) -1);
		_tmp27_ = _tmp26_;
		_tmp3_ = !string_contains (_tmp23_, _tmp27_);
		_g_free0 (_tmp27_);
		_g_free0 (_tmp23_);
		_g_free0 (_tmp21_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		result = FALSE;
		_g_object_unref0 (job);
		return result;
	}
	_tmp28_ = self->priv->current_tool;
	_tmp29_ = _g_object_ref0 (PROTON_PLUS_MODELS_TOOLS_IS_PROVIDER_TOOL (_tmp28_) ? ((ProtonPlusModelsToolsProviderTool*) _tmp28_) : NULL);
	provider_tool = _tmp29_;
	_tmp31_ = provider_tool;
	if (_tmp31_ != NULL) {
		_tmp30_ = !self->priv->provider_has_compatible_variants;
	} else {
		_tmp30_ = FALSE;
	}
	if (_tmp30_) {
		result = FALSE;
		_g_object_unref0 (provider_tool);
		_g_object_unref0 (job);
		return result;
	}
	_tmp32_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp33_ = _tmp32_;
	if (_tmp33_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL) {
		result = TRUE;
		_g_object_unref0 (provider_tool);
		_g_object_unref0 (job);
		return result;
	}
	_tmp34_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp35_ = _tmp34_;
	if (_tmp35_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_INSTALLED) {
		gboolean _tmp36_ = FALSE;
		ProtonPlusServicesInstallJob* _tmp37_;
		ProtonPlusServicesInstallJobState _tmp38_;
		ProtonPlusServicesInstallJobState _tmp39_;
		_tmp37_ = job;
		_tmp38_ = proton_plus_services_install_job_get_state (_tmp37_);
		_tmp39_ = _tmp38_;
		if (_tmp39_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE) {
			_tmp36_ = TRUE;
		} else {
			ProtonPlusServicesInstallJob* _tmp40_;
			ProtonPlusServicesInstallJobState _tmp41_;
			ProtonPlusServicesInstallJobState _tmp42_;
			_tmp40_ = job;
			_tmp41_ = proton_plus_services_install_job_get_state (_tmp40_);
			_tmp42_ = _tmp41_;
			_tmp36_ = _tmp42_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE;
		}
		result = _tmp36_;
		_g_object_unref0 (provider_tool);
		_g_object_unref0 (job);
		return result;
	}
	_tmp43_ = job;
	_tmp44_ = proton_plus_services_install_job_get_tool (_tmp43_);
	_tmp45_ = _tmp44_;
	_tmp46_ = proton_plus_models_tool_get_group (_tmp45_);
	_tmp47_ = _tmp46_;
	_tmp48_ = proton_plus_models_group_get_launcher (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = job;
	_tmp51_ = proton_plus_services_install_job_get_usage_identifier (_tmp50_);
	_tmp52_ = _tmp51_;
	_tmp53_ = proton_plus_models_launcher_get_compatibility_tool_usage_count (_tmp49_, _tmp52_);
	_g_free0 (_tmp52_);
	usage_count = _tmp53_;
	_tmp54_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp55_ = _tmp54_;
	if (_tmp55_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_USED) {
		result = usage_count > 0;
		_g_object_unref0 (provider_tool);
		_g_object_unref0 (job);
		return result;
	}
	_tmp56_ = proton_plus_widgets_tools_releases_box_get_filter (self);
	_tmp57_ = _tmp56_;
	if (_tmp57_ == PROTON_PLUS_WIDGETS_TOOLS_FILTER_UNUSED) {
		result = usage_count == 0;
		_g_object_unref0 (provider_tool);
		_g_object_unref0 (job);
		return result;
	}
	result = TRUE;
	_g_object_unref0 (provider_tool);
	_g_object_unref0 (job);
	return result;
}

static GtkBox*
proton_plus_widgets_tools_releases_box_get_tool_box (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_tool_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                     GtkBox* value)
{
	GtkBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_tool_box);
	self->priv->_tool_box = _tmp0_;
}

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

static void
proton_plus_widgets_tools_releases_box_set_refresh_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                           GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_releases_box_get_refresh_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_refresh_button);
		self->priv->_refresh_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY]);
	}
}

GtkButton*
proton_plus_widgets_tools_releases_box_get_repository_button (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_repository_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_repository_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                              GtkButton* value)
{
	GtkButton* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_releases_box_get_repository_button (self);
	if (old_value != value) {
		GtkButton* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_repository_button);
		self->priv->_repository_button = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY]);
	}
}

static GtkListBox*
proton_plus_widgets_tools_releases_box_get_list_box (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkListBox* result;
	GtkListBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_list_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_list_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                     GtkListBox* value)
{
	GtkListBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_list_box);
	self->priv->_list_box = _tmp0_;
}

static GtkStack*
proton_plus_widgets_tools_releases_box_get_content_stack (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkStack* result;
	GtkStack* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content_stack;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_content_stack (ProtonPlusWidgetsToolsReleasesBox* self,
                                                          GtkStack* value)
{
	GtkStack* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_content_stack);
	self->priv->_content_stack = _tmp0_;
}

static AdwStatusPage*
proton_plus_widgets_tools_releases_box_get_status_page (ProtonPlusWidgetsToolsReleasesBox* self)
{
	AdwStatusPage* result;
	AdwStatusPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_status_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_status_page (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        AdwStatusPage* value)
{
	AdwStatusPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_status_page);
	self->priv->_status_page = _tmp0_;
}

static AdwStatusPage*
proton_plus_widgets_tools_releases_box_get_error_page (ProtonPlusWidgetsToolsReleasesBox* self)
{
	AdwStatusPage* result;
	AdwStatusPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_page;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_error_page (ProtonPlusWidgetsToolsReleasesBox* self,
                                                       AdwStatusPage* value)
{
	AdwStatusPage* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_error_page);
	self->priv->_error_page = _tmp0_;
}

static AdwBanner*
proton_plus_widgets_tools_releases_box_get_error_banner (ProtonPlusWidgetsToolsReleasesBox* self)
{
	AdwBanner* result;
	AdwBanner* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_banner;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_error_banner (ProtonPlusWidgetsToolsReleasesBox* self,
                                                         AdwBanner* value)
{
	AdwBanner* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_error_banner);
	self->priv->_error_banner = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_releases_box_get_empty_action_button (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_empty_action_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_empty_action_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                                GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_empty_action_button);
	self->priv->_empty_action_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_releases_box_get_error_retry_button (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_retry_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_error_retry_button (ProtonPlusWidgetsToolsReleasesBox* self,
                                                               GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_error_retry_button);
	self->priv->_error_retry_button = _tmp0_;
}

static GtkDropDown*
proton_plus_widgets_tools_releases_box_get_variant_dropdown (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkDropDown* result;
	GtkDropDown* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_variant_dropdown;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_variant_dropdown (ProtonPlusWidgetsToolsReleasesBox* self,
                                                             GtkDropDown* value)
{
	GtkDropDown* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_variant_dropdown);
	self->priv->_variant_dropdown = _tmp0_;
}

GtkBox*
proton_plus_widgets_tools_releases_box_get_variant_box (ProtonPlusWidgetsToolsReleasesBox* self)
{
	GtkBox* result;
	GtkBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_variant_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_releases_box_set_variant_box (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        GtkBox* value)
{
	GtkBox* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_releases_box_get_variant_box (self);
	if (old_value != value) {
		GtkBox* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_variant_box);
		self->priv->_variant_box = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY]);
	}
}

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

void
proton_plus_widgets_tools_releases_box_set_filter (ProtonPlusWidgetsToolsReleasesBox* self,
                                                   ProtonPlusWidgetsToolsFilter value)
{
	GtkListBox* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_filter = value;
	_tmp0_ = self->priv->_list_box;
	gtk_list_box_invalidate_filter (_tmp0_);
	proton_plus_widgets_tools_releases_box_update_visibility (self);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_FILTER_PROPERTY]);
}

const gchar*
proton_plus_widgets_tools_releases_box_get_search_text (ProtonPlusWidgetsToolsReleasesBox* 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_releases_box_set_search_text (ProtonPlusWidgetsToolsReleasesBox* self,
                                                        const gchar* value)
{
	gchar* _tmp0_;
	GtkListBox* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_search_text);
	self->priv->_search_text = _tmp0_;
	_tmp1_ = self->priv->_list_box;
	gtk_list_box_invalidate_filter (_tmp1_);
	proton_plus_widgets_tools_releases_box_update_visibility (self);
	g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_SEARCH_TEXT_PROPERTY]);
}

static void
proton_plus_widgets_tools_releases_box_class_init (ProtonPlusWidgetsToolsReleasesBoxClass * klass,
                                                   gpointer klass_data)
{
	proton_plus_widgets_tools_releases_box_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsReleasesBox_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) proton_plus_widgets_tools_releases_box_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_releases_box_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_tools_releases_box_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_releases_box_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY] = g_param_spec_object ("refresh-button", "refresh-button", "refresh-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY] = g_param_spec_object ("repository-button", "repository-button", "repository-button", gtk_button_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY] = g_param_spec_object ("variant-box", "variant-box", "variant-box", gtk_box_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_FILTER_PROPERTY, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_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_RELEASES_BOX_SEARCH_TEXT_PROPERTY, proton_plus_widgets_tools_releases_box_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_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_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CHANGELOG_REQUESTED_SIGNAL] = g_signal_new ("changelog-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB);
	proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_GAMES_REQUESTED_SIGNAL] = g_signal_new ("games-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB);
	proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_CLEAR_SEARCH_REQUESTED_SIGNAL] = g_signal_new ("clear-search-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	proton_plus_widgets_tools_releases_box_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_RESET_FILTER_REQUESTED_SIGNAL] = g_signal_new ("reset-filter-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_widgets_tools_releases_box_proton_plus_utils_controller_directional_focus_interface_init (ProtonPlusUtilsControllerDirectionalFocusIface * iface,
                                                                                                      gpointer iface_data)
{
	proton_plus_widgets_tools_releases_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_releases_box_real_controller_focus_direction;
}

static void
proton_plus_widgets_tools_releases_box_proton_plus_utils_controller_activation_handler_interface_init (ProtonPlusUtilsControllerActivationHandlerIface * iface,
                                                                                                       gpointer iface_data)
{
	proton_plus_widgets_tools_releases_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_releases_box_real_controller_activate;
}

static void
proton_plus_widgets_tools_releases_box_instance_init (ProtonPlusWidgetsToolsReleasesBox * self,
                                                      gpointer klass)
{
	GeeHashMap* _tmp0_;
	ProtonPlusWidgetsToolsInlineReleaseRequestGuard* _tmp1_;
	GeeLinkedList* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self->priv = proton_plus_widgets_tools_releases_box_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_ULONG, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->job_state_handlers = _tmp0_;
	self->priv->tool_request_generation = (guint) 0;
	_tmp1_ = proton_plus_widgets_tools_inline_release_request_guard_new ();
	self->priv->request_guard = _tmp1_;
	self->priv->selected_variant = NULL;
	_tmp2_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_VARIANT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->displayed_variants = _tmp2_;
	self->priv->selected_variant_checkmark = NULL;
	self->priv->provider_has_compatible_variants = TRUE;
	self->priv->updating_variant_dropdown = FALSE;
	self->priv->last_request_kind = PROTON_PLUS_WIDGETS_TOOLS_INLINE_RELEASE_REQUEST_KIND_INITIAL;
	self->priv->request_in_progress = FALSE;
	self->priv->error_active = FALSE;
	self->priv->background_request_started_empty = FALSE;
	_tmp3_ = g_strdup ("");
	self->priv->last_announced_state = _tmp3_;
	self->priv->_filter = PROTON_PLUS_WIDGETS_TOOLS_FILTER_ALL;
	_tmp4_ = g_strdup ("");
	self->priv->_search_text = _tmp4_;
}

static void
proton_plus_widgets_tools_releases_box_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox);
	_g_object_unref0 (self->priv->_tool_box);
	_g_object_unref0 (self->priv->_refresh_button);
	_g_object_unref0 (self->priv->_repository_button);
	_g_object_unref0 (self->priv->actions_header_host);
	_g_object_unref0 (self->priv->actions_popover);
	_g_object_unref0 (self->priv->_list_box);
	_g_object_unref0 (self->priv->_content_stack);
	_g_object_unref0 (self->priv->_status_page);
	_g_object_unref0 (self->priv->_error_page);
	_g_object_unref0 (self->priv->_error_banner);
	_g_object_unref0 (self->priv->_empty_action_button);
	_g_object_unref0 (self->priv->_error_retry_button);
	_g_object_unref0 (self->priv->current_tool);
	_g_object_unref0 (self->priv->job_state_handlers);
	_g_object_unref0 (self->priv->request_guard);
	_g_object_unref0 (self->priv->selected_variant);
	_g_object_unref0 (self->priv->displayed_variants);
	_g_object_unref0 (self->priv->_variant_dropdown);
	_g_object_unref0 (self->priv->variant_label);
	_g_hash_table_unref0 (self->priv->variant_list_items);
	_g_object_unref0 (self->priv->selected_variant_checkmark);
	_g_object_unref0 (self->priv->_variant_box);
	_g_object_unref0 (self->priv->load_more_row);
	_g_object_unref0 (self->priv->load_more_button);
	_g_free0 (self->priv->last_announced_state);
	_g_free0 (self->priv->_search_text);
	G_OBJECT_CLASS (proton_plus_widgets_tools_releases_box_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_releases_box_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsReleasesBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_releases_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsReleasesBox), 0, (GInstanceInitFunc) proton_plus_widgets_tools_releases_box_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_directional_focus_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_releases_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_releases_box_proton_plus_utils_controller_activation_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_tools_releases_box_type_id;
	proton_plus_widgets_tools_releases_box_type_id = g_type_register_static (gtk_box_get_type (), "ProtonPlusWidgetsToolsReleasesBox", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_tools_releases_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_releases_box_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_ACTIVATION_HANDLER, &proton_plus_utils_controller_activation_handler_info);
	ProtonPlusWidgetsToolsReleasesBox_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_releases_box_type_id, sizeof (ProtonPlusWidgetsToolsReleasesBoxPrivate));
	return proton_plus_widgets_tools_releases_box_type_id;
}

GType
proton_plus_widgets_tools_releases_box_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_releases_box_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_releases_box_type_id__once)) {
		GType proton_plus_widgets_tools_releases_box_type_id;
		proton_plus_widgets_tools_releases_box_type_id = proton_plus_widgets_tools_releases_box_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_releases_box_type_id__once, proton_plus_widgets_tools_releases_box_type_id);
	}
	return proton_plus_widgets_tools_releases_box_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_releases_box_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_releases_box_get_refresh_button (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_releases_box_get_repository_button (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_releases_box_get_variant_box (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_FILTER_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_tools_releases_box_get_filter (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_SEARCH_TEXT_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_tools_releases_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_releases_box_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsReleasesBox * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASES_BOX, ProtonPlusWidgetsToolsReleasesBox);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REFRESH_BUTTON_PROPERTY:
		proton_plus_widgets_tools_releases_box_set_refresh_button (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_REPOSITORY_BUTTON_PROPERTY:
		proton_plus_widgets_tools_releases_box_set_repository_button (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_VARIANT_BOX_PROPERTY:
		proton_plus_widgets_tools_releases_box_set_variant_box (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_FILTER_PROPERTY:
		proton_plus_widgets_tools_releases_box_set_filter (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASES_BOX_SEARCH_TEXT_PROPERTY:
		proton_plus_widgets_tools_releases_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);
}

