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

#include "protonplus_core.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <pango/pango.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <gee.h>
#include <float.h>
#include <math.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_RELEASE_ROW_0_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_NUM_PROPERTIES];
typedef enum  {
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_ROW,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_PRIMARY_ACTION,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS
} ProtonPlusWidgetsToolsReleaseRowControllerFocusLane;

#define PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_TYPE_CONTROLLER_FOCUS_LANE (proton_plus_widgets_tools_release_row_controller_focus_lane_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block29Data Block29Data;
typedef struct _Block30Data Block30Data;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _Block31Data Block31Data;
typedef struct _Block32Data Block32Data;
typedef struct _Block33Data Block33Data;
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CHANGELOG_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_GAMES_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_NUM_SIGNALS
};
static guint proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsToolsReleaseRowPrivate {
	ProtonPlusServicesInstallJob* _job;
	gboolean _action_request_in_progress;
	gboolean _row_disposed;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _retry_action;
	GtkBox* input_box;
	GtkButton* primary_button;
	AdwButtonContent* primary_content;
	GtkButton* cancel_button;
	GtkButton* progress_button;
	ProtonPlusWidgetsCircularProgressBar* progress_bar;
	GtkLabel* progress_status_label;
	GtkLabel* step_label;
	GtkLabel* speed_label;
	GtkLabel* time_label;
	GtkPopover* info_popover;
	GtkMenuButton* actions_button;
	GtkPopoverMenu* actions_popover;
	GtkSizeGroup* action_button_size_group;
	GSimpleAction* update_action;
	GSimpleAction* changelog_action;
	GSimpleAction* games_action;
	GSimpleAction* open_release_page_action;
	GSimpleAction* open_folder_action;
	GSimpleAction* delete_action;
	GtkWidget* controller_up_target;
	GtkWidget* controller_row_up_target;
	GtkWidget* controller_action_up_target;
	GtkWidget* controller_down_target;
	ProtonPlusWidgetsToolsReleaseRowJobSignalBinding* job_signal_binding;
	guint progress_pulse_timeout_id;
	gboolean release_action_available;
	gchar* operation_error_message;
};

struct _Block29Data {
	int _ref_count_;
	GWeakRef owner_ref;
};

struct _Block30Data {
	int _ref_count_;
	GWeakRef owner_ref;
};

struct _Block31Data {
	int _ref_count_;
	GWeakRef owner_ref;
	ProtonPlusServicesInstallJob* operation_job;
};

struct _Block32Data {
	int _ref_count_;
	GWeakRef owner_ref;
	ProtonPlusServicesInstallJob* operation_job;
};

struct _Block33Data {
	int _ref_count_;
	GWeakRef owner_ref;
};

static gint ProtonPlusWidgetsToolsReleaseRow_private_offset;
static gpointer proton_plus_widgets_tools_release_row_parent_class = NULL;
static ProtonPlusUtilsControllerDirectionalFocusIface * proton_plus_widgets_tools_release_row_proton_plus_utils_controller_directional_focus_parent_iface = NULL;
static ProtonPlusUtilsControllerActivationHandlerIface * proton_plus_widgets_tools_release_row_proton_plus_utils_controller_activation_handler_parent_iface = NULL;
static ProtonPlusWidgetsToolsReleaseRowJobSignalTargetIface * proton_plus_widgets_tools_release_row_proton_plus_widgets_tools_release_row_job_signal_target_parent_iface = NULL;

static GType proton_plus_widgets_tools_release_row_controller_focus_lane_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void proton_plus_widgets_tools_release_row_request_release_details (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_request_release_details_adw_action_row_activated (AdwActionRow* _sender,
                                                                                              gpointer self);
static void proton_plus_widgets_tools_release_row_create_primary_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_create_progress_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_create_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_create_actions_menu (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_refresh_presentation (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_primary_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_primary_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
static void proton_plus_widgets_tools_release_row_progress_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_progress_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                        gpointer self);
static void proton_plus_widgets_tools_release_row_cancel_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void proton_plus_widgets_tools_release_row_changelog_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                       GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_changelog_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                                 GVariant* parameter,
                                                                                                 gpointer self);
static void proton_plus_widgets_tools_release_row_games_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                   GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_games_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                             GVariant* parameter,
                                                                                             gpointer self);
static void proton_plus_widgets_tools_release_row_open_release_page_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                               GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_open_release_page_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                                         GVariant* parameter,
                                                                                                         gpointer self);
static void proton_plus_widgets_tools_release_row_update_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                    GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_update_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                              GVariant* parameter,
                                                                                              gpointer self);
static void proton_plus_widgets_tools_release_row_open_folder_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                         GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_open_folder_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                                   GVariant* parameter,
                                                                                                   gpointer self);
static void proton_plus_widgets_tools_release_row_delete_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                    GVariant* parameter);
static void _proton_plus_widgets_tools_release_row_delete_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                              GVariant* parameter,
                                                                                              gpointer self);
static void proton_plus_widgets_tools_release_row_actions_popover_closed (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_actions_popover_closed_gtk_popover_closed (GtkPopover* _sender,
                                                                                       gpointer self);
static void proton_plus_widgets_tools_release_row_actions_popover_mapped (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_actions_popover_mapped_gtk_widget_map (GtkWidget* _sender,
                                                                                   gpointer self);
static gboolean proton_plus_widgets_tools_release_row_is_busy_state (ProtonPlusWidgetsToolsReleaseRow* self,
                                                              ProtonPlusServicesInstallJobState state);
static void proton_plus_widgets_tools_release_row_request_update (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_open_folder (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_request_removal (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_focus_actions_popover_when_mapped (ProtonPlusWidgetsToolsReleaseRow* owner);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static gboolean __lambda56_ (Block29Data* _data29_);
static gboolean ___lambda56__gsource_func (gpointer self);
static gboolean proton_plus_widgets_tools_release_row_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                                GObject* focused_object,
                                                                                ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_focus_vertical (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               GtkWidget* focused,
                                                               ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_focus_horizontal (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                 GtkWidget* focused,
                                                                 ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                                         GObject* focused_object);
static GtkWidget* proton_plus_widgets_tools_release_row_find_action_ancestor (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                       GtkWidget* focused);
static ProtonPlusWidgetsToolsReleaseRowControllerFocusLane proton_plus_widgets_tools_release_row_controller_focus_lane (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                                                                 GtkWidget* focused);
static ProtonPlusWidgetsToolsReleaseRow* proton_plus_widgets_tools_release_row_find_adjacent_release (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                                               ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_focus_controller_lane (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                      ProtonPlusWidgetsToolsReleaseRowControllerFocusLane lane);
static gboolean proton_plus_widgets_tools_release_row_focus_controller_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                        GtkWidget* target);
static gboolean proton_plus_widgets_tools_release_row_focus_next_list_control (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkWidget* proton_plus_widgets_tools_release_row_find_focusable_primary_action (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkWidget* proton_plus_widgets_tools_release_row_find_focusable_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                        GtkWidget* current,
                                                                        gboolean forward);
static gboolean proton_plus_widgets_tools_release_row_focus_first_action (ProtonPlusWidgetsToolsReleaseRow* self);
static gboolean proton_plus_widgets_tools_release_row_focus_action_sibling (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                     GtkWidget* action,
                                                                     gboolean forward);
static void proton_plus_widgets_tools_release_row_real_dispose (GObject* base);
static void proton_plus_widgets_tools_release_row_set_row_disposed (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             gboolean value);
static void proton_plus_widgets_tools_release_row_stop_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_real_release_row_job_state_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static void proton_plus_widgets_tools_release_row_real_release_row_job_step_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static gchar* proton_plus_widgets_tools_release_row_operation_step_text (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_real_release_row_job_canceled_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static void proton_plus_widgets_tools_release_row_real_release_row_job_variant_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static void proton_plus_widgets_tools_release_row_set_retry_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             ProtonPlusWidgetsToolsReleaseRowRetryAction value);
static void proton_plus_widgets_tools_release_row_real_release_row_job_release_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static ProtonPlusWidgetsToolsReleaseRowPresentation* proton_plus_widgets_tools_release_row_current_presentation (ProtonPlusWidgetsToolsReleaseRow* self);
static gboolean proton_plus_widgets_tools_release_row_supports_update_check (ProtonPlusWidgetsToolsReleaseRow* self);
static gint proton_plus_widgets_tools_release_row_usage_count (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkWidget* proton_plus_widgets_tools_release_row_get_focused_widget (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_configure_primary_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                     ProtonPlusWidgetsToolsReleaseRowPrimaryAction action);
static void proton_plus_widgets_tools_release_row_update_cancel_accessibility (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_rebuild_actions_menu (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                 ProtonPlusWidgetsToolsReleaseRowPresentation* presentation);
static void proton_plus_widgets_tools_release_row_update_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                  ProtonPlusWidgetsToolsReleaseRowPresentation* presentation);
static void proton_plus_widgets_tools_release_row_refresh_status_text (ProtonPlusWidgetsToolsReleaseRow* self);
static gboolean proton_plus_widgets_tools_release_row_is_valid_focus_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                      GtkWidget* widget);
static void proton_plus_widgets_tools_release_row_focus_replacement (ProtonPlusWidgetsToolsReleaseRow* self);
static guint proton_plus_widgets_tools_release_row_start_progress_pulse_timeout (ProtonPlusWidgetsToolsReleaseRow* owner);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static gboolean __lambda41_ (Block30Data* _data30_);
static gboolean ___lambda41__gsource_func (gpointer self);
static void proton_plus_widgets_tools_release_row_real_release_row_job_progress_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base);
static gchar* proton_plus_widgets_tools_release_row_format_time (ProtonPlusWidgetsToolsReleaseRow* self,
                                                          gdouble seconds);
static void proton_plus_widgets_tools_release_row_begin_update (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_run_update (ProtonPlusServicesInstallJob* operation_job,
                                                       ProtonPlusWidgetsToolsReleaseRow* owner);
static Block31Data* block31_data_ref (Block31Data* _data31_);
static void block31_data_unref (void * _userdata_);
static void __lambda51_ (Block31Data* _data31_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda51__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_tools_release_row_real_install_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_run_install (ProtonPlusServicesInstallJob* operation_job,
                                                        ProtonPlusWidgetsToolsReleaseRow* owner);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
static void __lambda42_ (Block32Data* _data32_,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda42__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_tools_release_row_track_removal_dialog (ProtonPlusWidgetsToolsRemoveDialog* dialog,
                                                                 ProtonPlusWidgetsToolsReleaseRow* owner);
static Block33Data* block33_data_ref (Block33Data* _data33_);
static void block33_data_unref (void * _userdata_);
static void __lambda55_ (Block33Data* _data33_);
static void ___lambda55__adw_dialog_closed (AdwDialog* _sender,
                                     gpointer self);
static void proton_plus_widgets_tools_release_row_real_customize_remove_dialog (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                         ProtonPlusWidgetsToolsRemoveDialog* dialog);
static void proton_plus_widgets_tools_release_row_set_action_request_in_progress (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                           gboolean value);
static void proton_plus_widgets_tools_release_row_finalize (GObject * obj);
static GType proton_plus_widgets_tools_release_row_get_type_once (void);
static void _vala_proton_plus_widgets_tools_release_row_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec);
static void _vala_proton_plus_widgets_tools_release_row_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
proton_plus_widgets_tools_release_row_get_instance_private (ProtonPlusWidgetsToolsReleaseRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsReleaseRow_private_offset);
}

static GType
proton_plus_widgets_tools_release_row_controller_focus_lane_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_ROW, "PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_ROW", "row"}, {PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_PRIMARY_ACTION, "PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_PRIMARY_ACTION", "primary-action"}, {PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS, "PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS", "more-actions"}, {0, NULL, NULL}};
	GType proton_plus_widgets_tools_release_row_controller_focus_lane_type_id;
	proton_plus_widgets_tools_release_row_controller_focus_lane_type_id = g_enum_register_static ("ProtonPlusWidgetsToolsReleaseRowControllerFocusLane", values);
	return proton_plus_widgets_tools_release_row_controller_focus_lane_type_id;
}

static GType
proton_plus_widgets_tools_release_row_controller_focus_lane_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_release_row_controller_focus_lane_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_release_row_controller_focus_lane_type_id__once)) {
		GType proton_plus_widgets_tools_release_row_controller_focus_lane_type_id;
		proton_plus_widgets_tools_release_row_controller_focus_lane_type_id = proton_plus_widgets_tools_release_row_controller_focus_lane_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_release_row_controller_focus_lane_type_id__once, proton_plus_widgets_tools_release_row_controller_focus_lane_type_id);
	}
	return proton_plus_widgets_tools_release_row_controller_focus_lane_type_id__once;
}

static void
_proton_plus_widgets_tools_release_row_request_release_details_adw_action_row_activated (AdwActionRow* _sender,
                                                                                         gpointer self)
{
	proton_plus_widgets_tools_release_row_request_release_details ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

ProtonPlusWidgetsToolsReleaseRow*
proton_plus_widgets_tools_release_row_construct (GType object_type,
                                                 ProtonPlusServicesInstallJob* job,
                                                 gboolean release_action_available)
{
	ProtonPlusWidgetsToolsReleaseRow * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkSizeGroup* _tmp4_;
	GtkSizeGroup* _tmp5_;
	GtkButton* _tmp6_;
	GtkSizeGroup* _tmp7_;
	GtkMenuButton* _tmp8_;
	GtkBox* _tmp9_ = NULL;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	GtkButton* _tmp12_;
	GtkBox* _tmp13_;
	GtkButton* _tmp14_;
	GtkBox* _tmp15_;
	GtkButton* _tmp16_;
	GtkBox* _tmp17_;
	GtkMenuButton* _tmp18_;
	GtkBox* _tmp19_;
	ProtonPlusWidgetsToolsReleaseRowJobSignalBinding* _tmp20_;
	g_return_val_if_fail (job != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_release_row_release_display_title (job);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_tools_release_row_release_display_timestamp (job);
	_tmp3_ = _tmp2_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) g_object_new (object_type, "title", _tmp1_, "subtitle", _tmp3_, "subtitle-lines", 1, "title-lines", 1, "activatable", TRUE, NULL);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	proton_plus_widgets_tools_release_row_set_job (self, job);
	self->priv->release_action_available = release_action_available;
	gtk_widget_add_css_class ((GtkWidget*) self, "tools-release-row");
	g_signal_connect_object ((AdwActionRow*) self, "activated", (GCallback) _proton_plus_widgets_tools_release_row_request_release_details_adw_action_row_activated, self, 0);
	proton_plus_widgets_tools_release_row_create_primary_button (self);
	proton_plus_widgets_tools_release_row_create_progress_button (self);
	proton_plus_widgets_tools_release_row_create_cancel_button (self);
	proton_plus_widgets_tools_release_row_create_actions_menu (self);
	_tmp4_ = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
	_g_object_unref0 (self->priv->action_button_size_group);
	self->priv->action_button_size_group = _tmp4_;
	_tmp5_ = self->priv->action_button_size_group;
	_tmp6_ = self->priv->primary_button;
	gtk_size_group_add_widget (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->action_button_size_group;
	_tmp8_ = self->priv->actions_button;
	gtk_size_group_add_widget (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp9_, 12);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->input_box);
	self->priv->input_box = _tmp9_;
	_tmp10_ = self->priv->input_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "tools-release-row-input-box");
	_tmp11_ = self->priv->input_box;
	_tmp12_ = self->priv->primary_button;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = self->priv->input_box;
	_tmp14_ = self->priv->progress_button;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->input_box;
	_tmp16_ = self->priv->cancel_button;
	gtk_box_append (_tmp15_, (GtkWidget*) _tmp16_);
	_tmp17_ = self->priv->input_box;
	_tmp18_ = self->priv->actions_button;
	gtk_box_append (_tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->input_box;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp19_);
	_tmp20_ = proton_plus_widgets_tools_release_row_job_signal_binding_new (job, (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*) self);
	_g_object_unref0 (self->priv->job_signal_binding);
	self->priv->job_signal_binding = _tmp20_;
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
	proton_plus_widgets_tools_release_row_job_signal_target_release_row_job_step_changed ((ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*) self);
	proton_plus_widgets_tools_release_row_job_signal_target_release_row_job_progress_changed ((ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*) self);
	return self;
}

ProtonPlusWidgetsToolsReleaseRow*
proton_plus_widgets_tools_release_row_new (ProtonPlusServicesInstallJob* job,
                                           gboolean release_action_available)
{
	return proton_plus_widgets_tools_release_row_construct (PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, job, release_action_available);
}

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

static void
_proton_plus_widgets_tools_release_row_primary_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	proton_plus_widgets_tools_release_row_primary_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
proton_plus_widgets_tools_release_row_create_primary_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	AdwButtonContent* _tmp0_ = NULL;
	AdwButtonContent* _tmp1_;
	GtkWidget* _tmp2_;
	GtkButton* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (AdwButtonContent*) adw_button_content_new ();
	adw_button_content_set_can_shrink (_tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->primary_content);
	self->priv->primary_content = _tmp0_;
	_tmp1_ = self->priv->primary_content;
	_tmp2_ = _g_object_ref0 ((GtkWidget*) _tmp1_);
	_tmp3_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_child (_tmp3_, _tmp2_);
	_g_object_unref0 (_tmp2_);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->primary_button);
	self->priv->primary_button = _tmp3_;
	_tmp4_ = self->priv->primary_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "flat");
	_tmp5_ = self->priv->primary_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "tools-release-install-button");
	_tmp6_ = self->priv->primary_button;
	g_signal_connect_object (_tmp6_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_primary_button_clicked_gtk_button_clicked, self, 0);
}

static void
_proton_plus_widgets_tools_release_row_progress_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                   gpointer self)
{
	proton_plus_widgets_tools_release_row_progress_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
proton_plus_widgets_tools_release_row_create_progress_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsCircularProgressBar* _tmp0_ = NULL;
	ProtonPlusWidgetsCircularProgressBar* _tmp1_;
	ProtonPlusWidgetsCircularProgressBar* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkBox* progress_content = NULL;
	GtkBox* _tmp4_;
	ProtonPlusWidgetsCircularProgressBar* _tmp5_;
	GtkLabel* _tmp6_;
	GtkWidget* _tmp7_;
	GtkButton* _tmp8_ = NULL;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	GtkButton* _tmp12_;
	GtkLabel* _tmp13_ = NULL;
	GtkLabel* _tmp14_ = NULL;
	GtkLabel* _tmp15_ = NULL;
	GtkBox* info_box = NULL;
	GtkBox* _tmp16_ = NULL;
	GtkLabel* _tmp17_;
	GtkLabel* _tmp18_;
	GtkLabel* _tmp19_;
	GtkPopover* _tmp20_;
	GtkPopover* _tmp21_;
	GtkButton* _tmp22_;
	GtkPopover* _tmp23_;
	GtkPopover* _tmp24_;
	GtkPopover* _tmp25_;
	GtkButton* _tmp26_;
	GtkLabel* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_circular_progress_bar_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	proton_plus_widgets_circular_progress_bar_set_show_text (_tmp0_, TRUE);
	proton_plus_widgets_circular_progress_bar_set_line_width (_tmp0_, 2);
	g_object_set ((GtkAccessible*) _tmp0_, "accessible-role", GTK_ACCESSIBLE_ROLE_PROGRESS_BAR, NULL);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->progress_bar);
	self->priv->progress_bar = _tmp0_;
	_tmp1_ = self->priv->progress_bar;
	gtk_widget_set_size_request ((GtkWidget*) _tmp1_, 24, 24);
	_tmp2_ = self->priv->progress_bar;
	gtk_accessible_update_property ((GtkAccessible*) _tmp2_, GTK_ACCESSIBLE_PROPERTY_VALUE_MIN, 0.0, GTK_ACCESSIBLE_PROPERTY_VALUE_MAX, 100.0, -1, -1);
	_tmp3_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	g_object_set ((GtkAccessible*) _tmp3_, "accessible-role", GTK_ACCESSIBLE_ROLE_STATUS, NULL);
	gtk_label_set_ellipsize (_tmp3_, PANGO_ELLIPSIZE_END);
	gtk_label_set_width_chars (_tmp3_, 12);
	gtk_label_set_max_width_chars (_tmp3_, 12);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->progress_status_label);
	self->priv->progress_status_label = _tmp3_;
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp4_);
	progress_content = _tmp4_;
	_tmp5_ = self->priv->progress_bar;
	gtk_box_append (progress_content, (GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->progress_status_label;
	gtk_box_append (progress_content, (GtkWidget*) _tmp6_);
	_tmp7_ = _g_object_ref0 ((GtkWidget*) progress_content);
	_tmp8_ = (GtkButton*) gtk_button_new ();
	gtk_button_set_child (_tmp8_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	gtk_widget_set_valign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->progress_button);
	self->priv->progress_button = _tmp8_;
	_tmp9_ = self->priv->progress_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp9_, "flat");
	_tmp10_ = self->priv->progress_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp10_, _ ("Show installation details"));
	_tmp11_ = self->priv->progress_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp11_, GTK_ACCESSIBLE_PROPERTY_LABEL, _ ("Show installation details"), -1, -1);
	_tmp12_ = self->priv->progress_button;
	g_signal_connect_object (_tmp12_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_progress_button_clicked_gtk_button_clicked, self, 0);
	_tmp13_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_halign ((GtkWidget*) _tmp13_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->step_label);
	self->priv->step_label = _tmp13_;
	_tmp14_ = (GtkLabel*) gtk_label_new (_ ("Speed: 0 KB/s"));
	gtk_widget_set_halign ((GtkWidget*) _tmp14_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->speed_label);
	self->priv->speed_label = _tmp14_;
	_tmp15_ = (GtkLabel*) gtk_label_new (_ ("Remaining time: --"));
	gtk_widget_set_halign ((GtkWidget*) _tmp15_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->time_label);
	self->priv->time_label = _tmp15_;
	_tmp16_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp16_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp16_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp16_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp16_, 12);
	g_object_ref_sink (_tmp16_);
	info_box = _tmp16_;
	_tmp17_ = self->priv->step_label;
	gtk_box_append (info_box, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->speed_label;
	gtk_box_append (info_box, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->time_label;
	gtk_box_append (info_box, (GtkWidget*) _tmp19_);
	_tmp20_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->info_popover);
	self->priv->info_popover = _tmp20_;
	_tmp21_ = self->priv->info_popover;
	_tmp22_ = self->priv->progress_button;
	gtk_widget_set_parent ((GtkWidget*) _tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = self->priv->info_popover;
	gtk_popover_set_autohide (_tmp23_, TRUE);
	_tmp24_ = self->priv->info_popover;
	gtk_popover_set_child (_tmp24_, (GtkWidget*) info_box);
	_tmp25_ = self->priv->info_popover;
	_tmp26_ = self->priv->progress_button;
	_tmp27_ = self->priv->step_label;
	proton_plus_widgets_window_register_popover_for_controller (_tmp25_, (GtkWidget*) _tmp26_, (GtkWidget*) _tmp27_);
	_g_object_unref0 (info_box);
	_g_object_unref0 (progress_content);
}

static void
_proton_plus_widgets_tools_release_row_cancel_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	proton_plus_widgets_tools_release_row_cancel_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
proton_plus_widgets_tools_release_row_create_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* _tmp0_ = NULL;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->cancel_button);
	self->priv->cancel_button = _tmp0_;
	_tmp1_ = self->priv->cancel_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "flat");
	_tmp2_ = self->priv->cancel_button;
	g_signal_connect_object (_tmp2_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_cancel_button_clicked_gtk_button_clicked, self, 0);
}

static void
_proton_plus_widgets_tools_release_row_changelog_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                            GVariant* parameter,
                                                                                            gpointer self)
{
	proton_plus_widgets_tools_release_row_changelog_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_games_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                        GVariant* parameter,
                                                                                        gpointer self)
{
	proton_plus_widgets_tools_release_row_games_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_open_release_page_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                                    GVariant* parameter,
                                                                                                    gpointer self)
{
	proton_plus_widgets_tools_release_row_open_release_page_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_update_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                         GVariant* parameter,
                                                                                         gpointer self)
{
	proton_plus_widgets_tools_release_row_update_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_open_folder_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                              GVariant* parameter,
                                                                                              gpointer self)
{
	proton_plus_widgets_tools_release_row_open_folder_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_delete_action_activated_g_simple_action_activate (GSimpleAction* _sender,
                                                                                         GVariant* parameter,
                                                                                         gpointer self)
{
	proton_plus_widgets_tools_release_row_delete_action_activated ((ProtonPlusWidgetsToolsReleaseRow*) self, parameter);
}

static void
_proton_plus_widgets_tools_release_row_actions_popover_closed_gtk_popover_closed (GtkPopover* _sender,
                                                                                  gpointer self)
{
	proton_plus_widgets_tools_release_row_actions_popover_closed ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
_proton_plus_widgets_tools_release_row_actions_popover_mapped_gtk_widget_map (GtkWidget* _sender,
                                                                              gpointer self)
{
	proton_plus_widgets_tools_release_row_actions_popover_mapped ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
proton_plus_widgets_tools_release_row_create_actions_menu (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GSimpleActionGroup* action_group = NULL;
	GSimpleActionGroup* _tmp0_;
	GSimpleAction* _tmp1_;
	GSimpleAction* _tmp2_;
	GSimpleAction* _tmp3_;
	GSimpleAction* _tmp4_;
	GSimpleAction* _tmp5_;
	GSimpleAction* _tmp6_;
	GSimpleAction* _tmp7_;
	GSimpleAction* _tmp8_;
	GSimpleAction* _tmp9_;
	GSimpleAction* _tmp10_;
	GSimpleAction* _tmp11_;
	GSimpleAction* _tmp12_;
	GSimpleAction* _tmp13_;
	GSimpleAction* _tmp14_;
	GSimpleAction* _tmp15_;
	GSimpleAction* _tmp16_;
	GSimpleAction* _tmp17_;
	GSimpleAction* _tmp18_;
	gchar* _tmp19_;
	GtkMenuButton* _tmp20_ = NULL;
	GtkMenuButton* _tmp21_;
	GtkMenuButton* _tmp22_;
	GtkMenuButton* _tmp23_;
	GtkMenuButton* _tmp24_;
	GtkMenuButton* _tmp25_;
	ProtonPlusServicesInstallJob* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	GMenu* _tmp32_;
	GMenu* _tmp33_;
	GtkPopoverMenu* _tmp34_;
	GtkPopoverMenu* _tmp35_;
	GtkPopoverMenu* _tmp36_;
	GtkMenuButton* _tmp37_;
	GtkPopoverMenu* _tmp38_;
	GtkPopoverMenu* _tmp39_;
	GtkMenuButton* _tmp40_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_simple_action_group_new ();
	action_group = _tmp0_;
	_tmp1_ = g_simple_action_new ("changelog", NULL);
	_g_object_unref0 (self->priv->changelog_action);
	self->priv->changelog_action = _tmp1_;
	_tmp2_ = self->priv->changelog_action;
	g_signal_connect_object (_tmp2_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_changelog_action_activated_g_simple_action_activate, self, 0);
	_tmp3_ = self->priv->changelog_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp3_);
	_tmp4_ = g_simple_action_new ("games", NULL);
	_g_object_unref0 (self->priv->games_action);
	self->priv->games_action = _tmp4_;
	_tmp5_ = self->priv->games_action;
	g_signal_connect_object (_tmp5_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_games_action_activated_g_simple_action_activate, self, 0);
	_tmp6_ = self->priv->games_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp6_);
	_tmp7_ = g_simple_action_new ("open-release-page", NULL);
	_g_object_unref0 (self->priv->open_release_page_action);
	self->priv->open_release_page_action = _tmp7_;
	_tmp8_ = self->priv->open_release_page_action;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_open_release_page_action_activated_g_simple_action_activate, self, 0);
	_tmp9_ = self->priv->open_release_page_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp9_);
	_tmp10_ = g_simple_action_new ("update", NULL);
	_g_object_unref0 (self->priv->update_action);
	self->priv->update_action = _tmp10_;
	_tmp11_ = self->priv->update_action;
	g_signal_connect_object (_tmp11_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_update_action_activated_g_simple_action_activate, self, 0);
	_tmp12_ = self->priv->update_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp12_);
	_tmp13_ = g_simple_action_new ("open-folder", NULL);
	_g_object_unref0 (self->priv->open_folder_action);
	self->priv->open_folder_action = _tmp13_;
	_tmp14_ = self->priv->open_folder_action;
	g_signal_connect_object (_tmp14_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_open_folder_action_activated_g_simple_action_activate, self, 0);
	_tmp15_ = self->priv->open_folder_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp15_);
	_tmp16_ = g_simple_action_new ("delete", NULL);
	_g_object_unref0 (self->priv->delete_action);
	self->priv->delete_action = _tmp16_;
	_tmp17_ = self->priv->delete_action;
	g_signal_connect_object (_tmp17_, "activate", (GCallback) _proton_plus_widgets_tools_release_row_delete_action_activated_g_simple_action_activate, self, 0);
	_tmp18_ = self->priv->delete_action;
	g_action_map_add_action ((GActionMap*) action_group, (GAction*) _tmp18_);
	_tmp19_ = g_strdup ("view-more-symbolic");
	_tmp20_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_icon_name (_tmp20_, _tmp19_);
	_g_free0 (_tmp19_);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->actions_button);
	self->priv->actions_button = _tmp20_;
	_tmp21_ = self->priv->actions_button;
	gtk_widget_insert_action_group ((GtkWidget*) _tmp21_, "release", (GActionGroup*) action_group);
	_tmp22_ = self->priv->actions_button;
	gtk_menu_button_set_has_frame (_tmp22_, FALSE);
	_tmp23_ = self->priv->actions_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp23_, "flat");
	_tmp24_ = self->priv->actions_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp24_, _ ("Release Actions"));
	_tmp25_ = self->priv->actions_button;
	_tmp26_ = self->priv->_job;
	_tmp27_ = proton_plus_services_install_job_get_title (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = _tmp28_;
	_tmp30_ = g_strdup_printf (_ ("Actions for %s"), _tmp29_);
	_tmp31_ = _tmp30_;
	gtk_accessible_update_property ((GtkAccessible*) _tmp25_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp31_, -1, -1);
	_g_free0 (_tmp31_);
	_g_free0 (_tmp29_);
	_tmp32_ = g_menu_new ();
	_tmp33_ = _tmp32_;
	_tmp34_ = (GtkPopoverMenu*) gtk_popover_menu_new_from_model ((GMenuModel*) _tmp33_);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->actions_popover);
	self->priv->actions_popover = _tmp34_;
	_g_object_unref0 (_tmp33_);
	_tmp35_ = self->priv->actions_popover;
	g_signal_connect_object ((GtkPopover*) _tmp35_, "closed", (GCallback) _proton_plus_widgets_tools_release_row_actions_popover_closed_gtk_popover_closed, self, 0);
	_tmp36_ = self->priv->actions_popover;
	g_signal_connect_object ((GtkWidget*) _tmp36_, "map", (GCallback) _proton_plus_widgets_tools_release_row_actions_popover_mapped_gtk_widget_map, self, 0);
	_tmp37_ = self->priv->actions_button;
	_tmp38_ = self->priv->actions_popover;
	gtk_menu_button_set_popover (_tmp37_, (GtkPopover*) _tmp38_);
	_tmp39_ = self->priv->actions_popover;
	_tmp40_ = self->priv->actions_button;
	proton_plus_widgets_window_register_popover_for_controller ((GtkPopover*) _tmp39_, (GtkWidget*) _tmp40_, NULL);
	_g_object_unref0 (action_group);
}

static void
proton_plus_widgets_tools_release_row_changelog_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                  GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_request_release_details (self);
}

static void
proton_plus_widgets_tools_release_row_request_release_details (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_row_disposed;
	if (!_tmp0_) {
		ProtonPlusServicesInstallJob* _tmp1_;
		_tmp1_ = self->priv->_job;
		g_signal_emit (self, proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CHANGELOG_REQUESTED_SIGNAL], 0, _tmp1_);
	}
}

static void
proton_plus_widgets_tools_release_row_games_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                              GVariant* parameter)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_job;
	g_signal_emit (self, proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_GAMES_REQUESTED_SIGNAL], 0, _tmp0_);
}

static void
proton_plus_widgets_tools_release_row_open_release_page_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                          GVariant* parameter)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	ProtonPlusServicesInstallJob* _tmp9_;
	ProtonPlusModelsRelease* _tmp10_;
	ProtonPlusModelsRelease* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp2_ = self->priv->_action_request_in_progress;
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_row_disposed;
		_tmp1_ = _tmp3_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp4_;
		ProtonPlusModelsRelease* _tmp5_;
		ProtonPlusModelsRelease* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_release (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = proton_plus_models_release_get_page_url (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp9_ = self->priv->_job;
	_tmp10_ = proton_plus_services_install_job_get_release (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = proton_plus_models_release_get_page_url (_tmp11_);
	_tmp13_ = _tmp12_;
	proton_plus_utils_system_open_uri (_tmp13_);
}

static void
proton_plus_widgets_tools_release_row_progress_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkPopover* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->info_popover;
	if (gtk_widget_get_mapped ((GtkWidget*) _tmp0_)) {
		GtkPopover* _tmp1_;
		_tmp1_ = self->priv->info_popover;
		gtk_popover_popdown (_tmp1_);
	} else {
		GtkPopover* _tmp2_;
		_tmp2_ = self->priv->info_popover;
		gtk_popover_popup (_tmp2_);
	}
}

static void
proton_plus_widgets_tools_release_row_cancel_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobState _tmp2_;
	ProtonPlusServicesInstallJobState _tmp3_;
	ProtonPlusServicesInstallJob* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_state (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!proton_plus_widgets_tools_release_row_is_busy_state (self, _tmp3_)) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_canceled (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp7_ = self->priv->_job;
	proton_plus_services_install_job_set_canceled (_tmp7_, TRUE);
}

static void
proton_plus_widgets_tools_release_row_update_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_request_update (self);
}

static void
proton_plus_widgets_tools_release_row_open_folder_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                    GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_open_folder (self);
}

static void
proton_plus_widgets_tools_release_row_delete_action_activated (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_request_removal (self);
}

static void
proton_plus_widgets_tools_release_row_actions_popover_closed (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp3_ = self->priv->_row_disposed;
	if (!_tmp3_) {
		GtkMenuButton* _tmp4_;
		_tmp4_ = self->priv->actions_button;
		_tmp2_ = gtk_widget_get_mapped ((GtkWidget*) _tmp4_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GtkMenuButton* _tmp5_;
		_tmp5_ = self->priv->actions_button;
		_tmp1_ = gtk_widget_is_visible ((GtkWidget*) _tmp5_);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkMenuButton* _tmp6_;
		_tmp6_ = self->priv->actions_button;
		_tmp0_ = gtk_widget_is_sensitive ((GtkWidget*) _tmp6_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkMenuButton* _tmp7_;
		_tmp7_ = self->priv->actions_button;
		gtk_widget_grab_focus ((GtkWidget*) _tmp7_);
	}
}

static void
proton_plus_widgets_tools_release_row_actions_popover_mapped (ProtonPlusWidgetsToolsReleaseRow* self)
{
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_focus_actions_popover_when_mapped (self);
}

static Block29Data*
block29_data_ref (Block29Data* _data29_)
{
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}

static void
block29_data_unref (void * _userdata_)
{
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		g_weak_ref_clear (&_data29_->owner_ref);
		g_slice_free (Block29Data, _data29_);
	}
}

static gboolean
__lambda56_ (Block29Data* _data29_)
{
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp4_;
	gboolean result;
	_tmp0_ = g_weak_ref_get (&_data29_->owner_ref);
	_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp0_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	row = _tmp1_;
	_tmp4_ = row;
	if (_tmp4_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = row;
		_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_row_disposed;
		_tmp3_ = !_tmp6_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp7_;
		GtkPopoverMenu* _tmp8_;
		_tmp7_ = row;
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->actions_popover;
		_tmp2_ = gtk_widget_get_mapped ((GtkWidget*) _tmp8_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp9_;
		GtkPopoverMenu* _tmp10_;
		_tmp9_ = row;
		_tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->actions_popover;
		gtk_widget_child_focus ((GtkWidget*) _tmp10_, GTK_DIR_TAB_FORWARD);
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (row);
	return result;
}

static gboolean
___lambda56__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda56_ (self);
	return result;
}

static void
proton_plus_widgets_tools_release_row_focus_actions_popover_when_mapped (ProtonPlusWidgetsToolsReleaseRow* owner)
{
	Block29Data* _data29_;
	g_return_if_fail (owner != NULL);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	g_weak_ref_init (&_data29_->owner_ref, (GObject*) owner);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda56__gsource_func, block29_data_ref (_data29_), block29_data_unref);
	block29_data_unref (_data29_);
	_data29_ = NULL;
}

void
proton_plus_widgets_tools_release_row_set_controller_up_targets (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                 GtkWidget* fallback_target,
                                                                 GtkWidget* row_target,
                                                                 GtkWidget* action_target)
{
	g_return_if_fail (self != NULL);
	self->priv->controller_up_target = fallback_target;
	self->priv->controller_row_up_target = row_target;
	self->priv->controller_action_up_target = action_target;
}

void
proton_plus_widgets_tools_release_row_set_controller_down_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                  GtkWidget* target)
{
	g_return_if_fail (self != NULL);
	self->priv->controller_down_target = target;
}

static gboolean
proton_plus_widgets_tools_release_row_real_controller_focus_direction (ProtonPlusUtilsControllerDirectionalFocus* base,
                                                                       GObject* focused_object,
                                                                       ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean result;
	self = (ProtonPlusWidgetsToolsReleaseRow*) 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;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_DOWN;
	}
	if (_tmp2_) {
		GtkWidget* _tmp3_;
		_tmp3_ = focused;
		result = proton_plus_widgets_tools_release_row_focus_vertical (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget), direction);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT;
	}
	if (_tmp4_) {
		GtkWidget* _tmp5_;
		_tmp5_ = focused;
		result = proton_plus_widgets_tools_release_row_focus_horizontal (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget), direction);
		_g_object_unref0 (focused);
		return result;
	}
	result = FALSE;
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_real_controller_activate (ProtonPlusUtilsControllerActivationHandler* base,
                                                                GObject* focused_object)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* action = NULL;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	GtkWidget* _tmp4_;
	GtkMenuButton* _tmp5_;
	GtkWidget* _tmp7_;
	gboolean result;
	self = (ProtonPlusWidgetsToolsReleaseRow*) 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_release_row_find_action_ancestor (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	action = _tmp3_;
	_tmp4_ = action;
	_tmp5_ = self->priv->actions_button;
	if (_tmp4_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_widget_get_type (), GtkWidget)) {
		GtkMenuButton* _tmp6_;
		_tmp6_ = self->priv->actions_button;
		gtk_menu_button_popup (_tmp6_);
		result = TRUE;
		_g_object_unref0 (action);
		_g_object_unref0 (focused);
		return result;
	}
	_tmp7_ = action;
	if (_tmp7_ != NULL) {
		GtkWidget* _tmp8_;
		_tmp8_ = action;
		result = gtk_widget_activate (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
		_g_object_unref0 (action);
		_g_object_unref0 (focused);
		return result;
	}
	proton_plus_widgets_tools_release_row_request_release_details (self);
	result = TRUE;
	_g_object_unref0 (action);
	_g_object_unref0 (focused);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_vertical (ProtonPlusWidgetsToolsReleaseRow* self,
                                                      GtkWidget* focused,
                                                      ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsToolsReleaseRowControllerFocusLane focus_lane = 0;
	ProtonPlusWidgetsToolsReleaseRow* adjacent = NULL;
	ProtonPlusWidgetsToolsReleaseRow* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	GtkWidget* _tmp13_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (focused != NULL, FALSE);
	focus_lane = proton_plus_widgets_tools_release_row_controller_focus_lane (self, focused);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_adjacent_release (self, direction);
	adjacent = _tmp0_;
	_tmp1_ = adjacent;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp2_;
		_tmp2_ = adjacent;
		result = proton_plus_widgets_tools_release_row_focus_controller_lane (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), focus_lane);
		_g_object_unref0 (adjacent);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		GtkWidget* _tmp3_ = NULL;
		GtkWidget* preferred_target = NULL;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		if (focus_lane != PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_ROW) {
			GtkWidget* _tmp4_;
			_tmp4_ = self->priv->controller_action_up_target;
			_tmp3_ = _tmp4_;
		} else {
			GtkWidget* _tmp5_;
			_tmp5_ = self->priv->controller_row_up_target;
			_tmp3_ = _tmp5_;
		}
		_tmp6_ = _g_object_ref0 (_tmp3_);
		preferred_target = _tmp6_;
		_tmp7_ = preferred_target;
		if (proton_plus_widgets_tools_release_row_focus_controller_target (self, _tmp7_)) {
			result = TRUE;
			_g_object_unref0 (preferred_target);
			_g_object_unref0 (adjacent);
			return result;
		}
		_tmp8_ = self->priv->controller_up_target;
		result = proton_plus_widgets_tools_release_row_focus_controller_target (self, _tmp8_);
		_g_object_unref0 (preferred_target);
		_g_object_unref0 (adjacent);
		return result;
	}
	if (proton_plus_widgets_tools_release_row_focus_next_list_control (self)) {
		result = TRUE;
		_g_object_unref0 (adjacent);
		return result;
	}
	_tmp13_ = self->priv->controller_down_target;
	if (_tmp13_ != NULL) {
		GtkWidget* _tmp14_;
		_tmp14_ = self->priv->controller_down_target;
		_tmp12_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		GtkWidget* _tmp15_;
		_tmp15_ = self->priv->controller_down_target;
		_tmp11_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		GtkWidget* _tmp16_;
		_tmp16_ = self->priv->controller_down_target;
		_tmp10_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		GtkWidget* _tmp17_;
		_tmp17_ = self->priv->controller_down_target;
		_tmp9_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp9_ = FALSE;
	}
	result = _tmp9_;
	_g_object_unref0 (adjacent);
	return result;
}

static ProtonPlusWidgetsToolsReleaseRowControllerFocusLane
proton_plus_widgets_tools_release_row_controller_focus_lane (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             GtkWidget* focused)
{
	GtkWidget* action = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkMenuButton* _tmp2_;
	GtkWidget* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowControllerFocusLane result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (focused != NULL, 0);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_action_ancestor (self, focused);
	action = _tmp0_;
	_tmp1_ = action;
	_tmp2_ = self->priv->actions_button;
	if (_tmp1_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget)) {
		result = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS;
		_g_object_unref0 (action);
		return result;
	}
	_tmp3_ = action;
	if (_tmp3_ != NULL) {
		result = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_PRIMARY_ACTION;
		_g_object_unref0 (action);
		return result;
	}
	result = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_ROW;
	_g_object_unref0 (action);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_controller_lane (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             ProtonPlusWidgetsToolsReleaseRowControllerFocusLane lane)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	switch (lane) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_PRIMARY_ACTION:
		{
			GtkWidget* primary_action = NULL;
			GtkWidget* _tmp0_;
			GtkWidget* _tmp1_;
			_tmp0_ = proton_plus_widgets_tools_release_row_find_focusable_primary_action (self);
			primary_action = _tmp0_;
			_tmp1_ = primary_action;
			if (proton_plus_widgets_tools_release_row_focus_controller_target (self, _tmp1_)) {
				result = TRUE;
				_g_object_unref0 (primary_action);
				return result;
			}
			_g_object_unref0 (primary_action);
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS:
		{
			GtkMenuButton* _tmp2_;
			_tmp2_ = self->priv->actions_button;
			if (proton_plus_widgets_tools_release_row_focus_controller_target (self, (GtkWidget*) _tmp2_)) {
				result = TRUE;
				return result;
			}
			break;
		}
		default:
		{
			break;
		}
	}
	result = gtk_widget_grab_focus ((GtkWidget*) self);
	return result;
}

gboolean
proton_plus_widgets_tools_release_row_focus_more_actions_controller_target (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = proton_plus_widgets_tools_release_row_focus_controller_lane (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CONTROLLER_FOCUS_LANE_MORE_ACTIONS);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_release_row_find_focusable_primary_action (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkWidget* action = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_;
	GtkMenuButton* _tmp3_;
	GtkWidget* _tmp5_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_focusable_action (self, NULL, TRUE);
	action = _tmp0_;
	_tmp2_ = action;
	_tmp3_ = self->priv->actions_button;
	if (_tmp2_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
		GtkWidget* _tmp4_;
		_tmp4_ = action;
		_tmp1_ = _tmp4_;
	} else {
		_tmp1_ = NULL;
	}
	_tmp5_ = _g_object_ref0 (_tmp1_);
	result = _tmp5_;
	_g_object_unref0 (action);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_controller_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               GtkWidget* target)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (target != NULL) {
		_tmp3_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (target, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

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

static gboolean
proton_plus_widgets_tools_release_row_focus_next_list_control (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkWidget* sibling = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_widget_get_next_sibling ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	sibling = _tmp1_;
	while (TRUE) {
		GtkWidget* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		GtkWidget* _tmp6_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		_tmp2_ = sibling;
		if (!(_tmp2_ != NULL)) {
			break;
		}
		_tmp6_ = sibling;
		if (gtk_widget_get_mapped (_tmp6_)) {
			GtkWidget* _tmp7_;
			_tmp7_ = sibling;
			_tmp5_ = gtk_widget_is_visible (_tmp7_);
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp8_;
			_tmp8_ = sibling;
			_tmp4_ = gtk_widget_get_child_visible (_tmp8_);
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GtkWidget* _tmp9_;
			_tmp9_ = sibling;
			_tmp3_ = gtk_widget_is_sensitive (_tmp9_);
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			gboolean _tmp10_ = FALSE;
			GtkWidget* _tmp11_;
			_tmp11_ = sibling;
			if (gtk_widget_child_focus (_tmp11_, GTK_DIR_TAB_FORWARD)) {
				_tmp10_ = TRUE;
			} else {
				GtkWidget* _tmp12_;
				_tmp12_ = sibling;
				_tmp10_ = gtk_widget_grab_focus (_tmp12_);
			}
			result = _tmp10_;
			_g_object_unref0 (sibling);
			return result;
		}
		_tmp13_ = sibling;
		_tmp14_ = gtk_widget_get_next_sibling (_tmp13_);
		_tmp15_ = _g_object_ref0 (_tmp14_);
		_g_object_unref0 (sibling);
		sibling = _tmp15_;
	}
	result = FALSE;
	_g_object_unref0 (sibling);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_horizontal (ProtonPlusWidgetsToolsReleaseRow* self,
                                                        GtkWidget* focused,
                                                        ProtonPlusUtilsControllerNavigationDirection direction)
{
	GtkWidget* action = NULL;
	GtkWidget* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (focused != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_action_ancestor (self, focused);
	action = _tmp0_;
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT) {
		GtkWidget* _tmp1_;
		if (focused == G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)) {
			result = proton_plus_widgets_tools_release_row_focus_first_action (self);
			_g_object_unref0 (action);
			return result;
		}
		_tmp1_ = action;
		if (_tmp1_ != NULL) {
			GtkWidget* _tmp2_;
			_tmp2_ = action;
			result = proton_plus_widgets_tools_release_row_focus_action_sibling (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), TRUE);
			_g_object_unref0 (action);
			return result;
		}
	} else {
		GtkWidget* _tmp3_;
		if (focused == G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)) {
			result = gtk_widget_grab_focus ((GtkWidget*) self);
			_g_object_unref0 (action);
			return result;
		}
		_tmp3_ = action;
		if (_tmp3_ != NULL) {
			result = gtk_widget_grab_focus ((GtkWidget*) self);
			_g_object_unref0 (action);
			return result;
		}
	}
	result = FALSE;
	_g_object_unref0 (action);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_first_action (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkWidget* action = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_focusable_action (self, NULL, TRUE);
	action = _tmp0_;
	_tmp2_ = action;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = action;
		_tmp1_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = gtk_widget_grab_focus ((GtkWidget*) self);
	}
	result = _tmp1_;
	_g_object_unref0 (action);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_focus_action_sibling (ProtonPlusWidgetsToolsReleaseRow* self,
                                                            GtkWidget* action,
                                                            gboolean forward)
{
	GtkWidget* sibling = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (action != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_focusable_action (self, action, forward);
	sibling = _tmp0_;
	_tmp2_ = sibling;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = sibling;
		_tmp1_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = gtk_widget_grab_focus (action);
	}
	result = _tmp1_;
	_g_object_unref0 (sibling);
	return result;
}

static GtkWidget*
proton_plus_widgets_tools_release_row_find_focusable_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             GtkWidget* current,
                                                             gboolean forward)
{
	GtkWidget* child = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (current == NULL) {
		GtkWidget* _tmp0_ = NULL;
		GtkWidget* _tmp5_;
		if (forward) {
			GtkBox* _tmp1_;
			GtkWidget* _tmp2_;
			_tmp1_ = self->priv->input_box;
			_tmp2_ = gtk_widget_get_first_child ((GtkWidget*) _tmp1_);
			_tmp0_ = _tmp2_;
		} else {
			GtkBox* _tmp3_;
			GtkWidget* _tmp4_;
			_tmp3_ = self->priv->input_box;
			_tmp4_ = gtk_widget_get_last_child ((GtkWidget*) _tmp3_);
			_tmp0_ = _tmp4_;
		}
		_tmp5_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (child);
		child = _tmp5_;
	} else {
		GtkWidget* _tmp6_ = NULL;
		GtkWidget* _tmp9_;
		if (forward) {
			GtkWidget* _tmp7_;
			_tmp7_ = gtk_widget_get_next_sibling (current);
			_tmp6_ = _tmp7_;
		} else {
			GtkWidget* _tmp8_;
			_tmp8_ = gtk_widget_get_prev_sibling (current);
			_tmp6_ = _tmp8_;
		}
		_tmp9_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (child);
		child = _tmp9_;
	}
	while (TRUE) {
		GtkWidget* _tmp10_;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_ = FALSE;
		gboolean _tmp13_ = FALSE;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp18_ = NULL;
		GtkWidget* _tmp23_;
		_tmp10_ = child;
		if (!(_tmp10_ != NULL)) {
			break;
		}
		_tmp14_ = child;
		if (gtk_widget_get_mapped (_tmp14_)) {
			GtkWidget* _tmp15_;
			_tmp15_ = child;
			_tmp13_ = gtk_widget_is_visible (_tmp15_);
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			GtkWidget* _tmp16_;
			_tmp16_ = child;
			_tmp12_ = gtk_widget_is_sensitive (_tmp16_);
		} else {
			_tmp12_ = FALSE;
		}
		if (_tmp12_) {
			GtkWidget* _tmp17_;
			_tmp17_ = child;
			_tmp11_ = gtk_widget_get_can_focus (_tmp17_);
		} else {
			_tmp11_ = FALSE;
		}
		if (_tmp11_) {
			result = child;
			return result;
		}
		if (forward) {
			GtkWidget* _tmp19_;
			GtkWidget* _tmp20_;
			_tmp19_ = child;
			_tmp20_ = gtk_widget_get_next_sibling (_tmp19_);
			_tmp18_ = _tmp20_;
		} else {
			GtkWidget* _tmp21_;
			GtkWidget* _tmp22_;
			_tmp21_ = child;
			_tmp22_ = gtk_widget_get_prev_sibling (_tmp21_);
			_tmp18_ = _tmp22_;
		}
		_tmp23_ = _g_object_ref0 (_tmp18_);
		_g_object_unref0 (child);
		child = _tmp23_;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

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

static void
proton_plus_widgets_tools_release_row_real_dispose (GObject* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	ProtonPlusWidgetsToolsReleaseRowJobSignalBinding* _tmp0_;
	GtkPopover* _tmp1_;
	GtkMenuButton* _tmp2_;
	GtkMenuButton* _tmp3_;
	GtkMenuButton* _tmp4_;
	GtkPopover* _tmp5_;
	GtkWidget* _tmp6_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	proton_plus_widgets_tools_release_row_set_row_disposed (self, TRUE);
	_tmp0_ = self->priv->job_signal_binding;
	proton_plus_widgets_tools_release_row_job_signal_binding_disconnect_handlers (_tmp0_);
	proton_plus_widgets_tools_release_row_stop_progress_pulse (self);
	_tmp1_ = self->priv->info_popover;
	gtk_popover_popdown (_tmp1_);
	_tmp2_ = self->priv->actions_button;
	gtk_menu_button_popdown (_tmp2_);
	_tmp3_ = self->priv->actions_button;
	gtk_menu_button_set_popover (_tmp3_, NULL);
	_tmp4_ = self->priv->actions_button;
	gtk_widget_insert_action_group ((GtkWidget*) _tmp4_, "release", NULL);
	_tmp5_ = self->priv->info_popover;
	_tmp6_ = gtk_widget_get_parent ((GtkWidget*) _tmp5_);
	if (_tmp6_ != NULL) {
		GtkPopover* _tmp7_;
		_tmp7_ = self->priv->info_popover;
		gtk_widget_unparent ((GtkWidget*) _tmp7_);
	}
	G_OBJECT_CLASS (proton_plus_widgets_tools_release_row_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, adw_action_row_get_type (), AdwActionRow));
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_state_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_step_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	gboolean downloading = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobStep _tmp2_;
	ProtonPlusServicesInstallJobStep _tmp3_;
	ProtonPlusWidgetsCircularProgressBar* _tmp4_;
	GtkLabel* _tmp5_;
	GtkLabel* _tmp6_;
	gchar* operation_text = NULL;
	gchar* _tmp7_;
	GtkLabel* _tmp8_;
	const gchar* _tmp9_;
	GtkLabel* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GtkButton* _tmp14_;
	const gchar* _tmp15_;
	ProtonPlusServicesInstallJob* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ProtonPlusWidgetsCircularProgressBar* _tmp22_;
	ProtonPlusServicesInstallJob* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_step (_tmp1_);
	_tmp3_ = _tmp2_;
	downloading = _tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING;
	_tmp4_ = self->priv->progress_bar;
	proton_plus_widgets_circular_progress_bar_set_show_text (_tmp4_, downloading);
	_tmp5_ = self->priv->speed_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, downloading);
	_tmp6_ = self->priv->time_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, downloading);
	_tmp7_ = proton_plus_widgets_tools_release_row_operation_step_text (self);
	operation_text = _tmp7_;
	_tmp8_ = self->priv->progress_status_label;
	_tmp9_ = operation_text;
	gtk_label_set_label (_tmp8_, _tmp9_);
	_tmp10_ = self->priv->step_label;
	_tmp11_ = operation_text;
	_tmp12_ = g_strdup_printf (_ ("Step: %s"), _tmp11_);
	_tmp13_ = _tmp12_;
	gtk_label_set_label (_tmp10_, _tmp13_);
	_g_free0 (_tmp13_);
	_tmp14_ = self->priv->progress_button;
	_tmp15_ = operation_text;
	_tmp16_ = self->priv->_job;
	_tmp17_ = proton_plus_services_install_job_get_title (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strdup_printf (_ ("%s for %s"), _tmp15_, _tmp19_);
	_tmp21_ = _tmp20_;
	gtk_accessible_update_property ((GtkAccessible*) _tmp14_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp21_, -1, -1);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp22_ = self->priv->progress_bar;
	_tmp23_ = self->priv->_job;
	_tmp24_ = proton_plus_services_install_job_get_title (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = _tmp25_;
	_tmp27_ = g_strdup_printf (_ ("Progress for %s"), _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = operation_text;
	gtk_accessible_update_property ((GtkAccessible*) _tmp22_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp28_, GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, _tmp29_, -1, -1);
	_g_free0 (_tmp28_);
	_g_free0 (_tmp26_);
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
	_g_free0 (operation_text);
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_canceled_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_canceled (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		GtkLabel* _tmp4_;
		_tmp4_ = self->priv->progress_status_label;
		gtk_label_set_label (_tmp4_, _ ("Cancelling"));
	}
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_variant_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	proton_plus_widgets_tools_release_row_set_retry_action (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE);
	_g_free0 (self->priv->operation_error_message);
	self->priv->operation_error_message = NULL;
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_release_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkMenuButton* _tmp4_;
	ProtonPlusServicesInstallJob* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_widgets_tools_release_row_release_display_title (_tmp1_);
	_tmp3_ = _tmp2_;
	adw_preferences_row_set_title ((AdwPreferencesRow*) self, _tmp3_);
	_g_free0 (_tmp3_);
	proton_plus_widgets_tools_release_row_set_retry_action (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE);
	_g_free0 (self->priv->operation_error_message);
	self->priv->operation_error_message = NULL;
	_tmp4_ = self->priv->actions_button;
	_tmp5_ = self->priv->_job;
	_tmp6_ = proton_plus_services_install_job_get_title (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf (_ ("Actions for %s"), _tmp8_);
	_tmp10_ = _tmp9_;
	gtk_accessible_update_property ((GtkAccessible*) _tmp4_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp10_, -1, -1);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	proton_plus_widgets_tools_release_row_refresh_presentation (self);
}

static ProtonPlusWidgetsToolsReleaseRowPresentation*
proton_plus_widgets_tools_release_row_current_presentation (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean has_directory = FALSE;
	ProtonPlusServicesInstallJob* _tmp7_;
	ProtonPlusServicesInstallJobState _tmp8_;
	ProtonPlusServicesInstallJobState _tmp9_;
	ProtonPlusServicesInstallJob* _tmp10_;
	ProtonPlusServicesInstallJobStep _tmp11_;
	ProtonPlusServicesInstallJobStep _tmp12_;
	ProtonPlusServicesInstallJob* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	ProtonPlusServicesInstallJob* _tmp16_;
	ProtonPlusServicesInstallJobMode _tmp17_;
	ProtonPlusServicesInstallJobMode _tmp18_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp19_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp20_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_install_location (_tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "") != 0) {
		ProtonPlusServicesInstallJob* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_install_location (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = g_file_test (_tmp6_, G_FILE_TEST_IS_DIR);
	} else {
		_tmp0_ = FALSE;
	}
	has_directory = _tmp0_;
	_tmp7_ = self->priv->_job;
	_tmp8_ = proton_plus_services_install_job_get_state (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = self->priv->_job;
	_tmp11_ = proton_plus_services_install_job_get_step (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = self->priv->_job;
	_tmp14_ = proton_plus_services_install_job_get_canceled (_tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = self->priv->_job;
	_tmp17_ = proton_plus_services_install_job_get_mode (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = self->priv->_retry_action;
	_tmp20_ = proton_plus_widgets_tools_release_row_presentation_evaluate (_tmp9_, _tmp12_, proton_plus_widgets_tools_release_row_supports_update_check (self), has_directory, _tmp15_, _tmp18_ != PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED, proton_plus_widgets_tools_release_row_usage_count (self) > 0, self->priv->release_action_available, _tmp19_);
	result = _tmp20_;
	return result;
}

gchar*
proton_plus_widgets_tools_release_row_release_display_title (ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gchar* _tmp3_ = NULL;
	ProtonPlusModelsRelease* _tmp4_;
	ProtonPlusModelsRelease* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* title = NULL;
	gchar* _tmp15_;
	const gchar* _tmp16_ = NULL;
	ProtonPlusServicesInstallJobMode _tmp17_;
	ProtonPlusServicesInstallJobMode _tmp18_;
	gchar* _tmp20_;
	gchar* result;
	g_return_val_if_fail (job != NULL, NULL);
	_tmp0_ = proton_plus_services_install_job_get_steam_tinker_launch_context (job);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (_ ("Latest"));
		result = _tmp2_;
		return result;
	}
	_tmp4_ = proton_plus_services_install_job_get_release (job);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_release_get_title (_tmp5_);
	_tmp7_ = _tmp6_;
	if (g_strcmp0 (_tmp7_, "") != 0) {
		ProtonPlusModelsRelease* _tmp8_;
		ProtonPlusModelsRelease* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp8_ = proton_plus_services_install_job_get_release (job);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_models_release_get_title (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_strdup (_tmp11_);
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp12_;
	} else {
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp13_ = proton_plus_services_install_job_get_title (job);
		_tmp14_ = _tmp13_;
		_g_free0 (_tmp3_);
		_tmp3_ = _tmp14_;
	}
	_tmp15_ = _tmp3_;
	_tmp3_ = NULL;
	title = _tmp15_;
	_tmp17_ = proton_plus_services_install_job_get_mode (job);
	_tmp18_ = _tmp17_;
	if (_tmp18_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST) {
		_tmp16_ = _ ("Latest");
	} else {
		const gchar* _tmp19_;
		_tmp19_ = title;
		_tmp16_ = _tmp19_;
	}
	_tmp20_ = g_strdup (_tmp16_);
	result = _tmp20_;
	_g_free0 (title);
	_g_free0 (_tmp3_);
	return result;
}

gchar*
proton_plus_widgets_tools_release_row_release_display_timestamp (ProtonPlusServicesInstallJob* job)
{
	gchar* _tmp0_ = NULL;
	ProtonPlusServicesInstallJobMode _tmp1_;
	ProtonPlusServicesInstallJobMode _tmp2_;
	gchar* _tmp9_;
	gchar* result;
	g_return_val_if_fail (job != NULL, NULL);
	_tmp1_ = proton_plus_services_install_job_get_mode (job);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_VERSIONED) {
		ProtonPlusModelsRelease* _tmp3_;
		ProtonPlusModelsRelease* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp3_ = proton_plus_services_install_job_get_release (job);
		_tmp4_ = _tmp3_;
		_tmp5_ = proton_plus_models_release_get_release_date (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = proton_plus_utils_format_timestamp (_tmp6_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp7_;
	} else {
		gchar* _tmp8_;
		_tmp8_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp8_;
	}
	_tmp9_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp9_;
	_g_free0 (_tmp0_);
	return result;
}

void
proton_plus_widgets_tools_release_row_set_release_action_available (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                    gboolean available)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	if (self->priv->release_action_available == available) {
		return;
	}
	self->priv->release_action_available = available;
	proton_plus_widgets_tools_release_row_set_retry_action (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE);
	_tmp0_ = self->priv->_row_disposed;
	if (!_tmp0_) {
		proton_plus_widgets_tools_release_row_refresh_presentation (self);
	}
}

static gboolean
proton_plus_widgets_tools_release_row_supports_update_check (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobMode _tmp2_;
	ProtonPlusServicesInstallJobMode _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_mode (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp4_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp5_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_steam_tinker_launch_context (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ != NULL;
	}
	result = _tmp0_;
	return result;
}

static gint
proton_plus_widgets_tools_release_row_usage_count (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsGroup* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsLauncher* _tmp5_;
	ProtonPlusModelsLauncher* _tmp6_;
	ProtonPlusServicesInstallJob* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gint _tmp10_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = self->priv->_job;
	_tmp1_ = proton_plus_services_install_job_get_tool (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = proton_plus_models_tool_get_group (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_models_group_get_launcher (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->_job;
	_tmp8_ = proton_plus_services_install_job_get_usage_identifier (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = proton_plus_models_launcher_get_compatibility_tool_usage_count (_tmp6_, _tmp9_);
	_g_free0 (_tmp9_);
	result = _tmp10_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_refresh_presentation (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkWidget* focused = NULL;
	GtkWidget* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GtkWidget* _tmp2_;
	gboolean replace_focus = FALSE;
	ProtonPlusWidgetsToolsReleaseRowPresentation* presentation = NULL;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp14_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp15_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp16_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp17_;
	gboolean _tmp18_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp19_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp20_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp21_;
	GtkButton* _tmp25_;
	GtkButton* _tmp26_;
	gboolean _tmp27_;
	GtkButton* _tmp28_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp29_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp30_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp31_;
	GtkButton* _tmp32_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp33_;
	gboolean _tmp34_;
	gboolean _tmp35_;
	GtkButton* _tmp36_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp37_;
	gboolean _tmp38_;
	gboolean _tmp39_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp40_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp41_;
	gboolean _tmp42_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_release_row_get_focused_widget (self);
	focused = _tmp0_;
	_tmp2_ = focused;
	if (_tmp2_ != NULL) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		GtkWidget* _tmp6_;
		GtkBox* _tmp7_;
		_tmp6_ = focused;
		_tmp7_ = self->priv->input_box;
		if (_tmp6_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget)) {
			_tmp5_ = TRUE;
		} else {
			GtkWidget* _tmp8_;
			GtkBox* _tmp9_;
			_tmp8_ = focused;
			_tmp9_ = self->priv->input_box;
			_tmp5_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp9_);
		}
		if (_tmp5_) {
			_tmp4_ = TRUE;
		} else {
			GtkWidget* _tmp10_;
			GtkPopoverMenu* _tmp11_;
			_tmp10_ = focused;
			_tmp11_ = self->priv->actions_popover;
			_tmp4_ = _tmp10_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget);
		}
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			GtkWidget* _tmp12_;
			GtkPopoverMenu* _tmp13_;
			_tmp12_ = focused;
			_tmp13_ = self->priv->actions_popover;
			_tmp3_ = gtk_widget_is_ancestor (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget), (GtkWidget*) _tmp13_);
		}
		_tmp1_ = _tmp3_;
	} else {
		_tmp1_ = FALSE;
	}
	replace_focus = _tmp1_;
	_tmp14_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	presentation = _tmp14_;
	_tmp15_ = presentation;
	_tmp16_ = proton_plus_widgets_tools_release_row_presentation_get_primary_action (_tmp15_);
	_tmp17_ = _tmp16_;
	proton_plus_widgets_tools_release_row_configure_primary_action (self, _tmp17_);
	_tmp19_ = presentation;
	_tmp20_ = proton_plus_widgets_tools_release_row_presentation_get_primary_action (_tmp19_);
	_tmp21_ = _tmp20_;
	if (_tmp21_ == PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_INSTALL) {
		_tmp18_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp22_;
		ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp23_;
		ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp24_;
		_tmp22_ = presentation;
		_tmp23_ = proton_plus_widgets_tools_release_row_presentation_get_primary_action (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp18_ = _tmp24_ == PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_RETRY;
	}
	_tmp25_ = self->priv->primary_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp25_, _tmp18_);
	_tmp26_ = self->priv->primary_button;
	_tmp27_ = self->priv->_action_request_in_progress;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp26_, !_tmp27_);
	_tmp28_ = self->priv->progress_button;
	_tmp29_ = presentation;
	_tmp30_ = proton_plus_widgets_tools_release_row_presentation_get_primary_action (_tmp29_);
	_tmp31_ = _tmp30_;
	gtk_widget_set_visible ((GtkWidget*) _tmp28_, _tmp31_ == PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_PROGRESS);
	_tmp32_ = self->priv->cancel_button;
	_tmp33_ = presentation;
	_tmp34_ = proton_plus_widgets_tools_release_row_presentation_get_show_cancel (_tmp33_);
	_tmp35_ = _tmp34_;
	gtk_widget_set_visible ((GtkWidget*) _tmp32_, _tmp35_);
	_tmp36_ = self->priv->cancel_button;
	_tmp37_ = presentation;
	_tmp38_ = proton_plus_widgets_tools_release_row_presentation_get_cancel_enabled (_tmp37_);
	_tmp39_ = _tmp38_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp36_, _tmp39_);
	proton_plus_widgets_tools_release_row_update_cancel_accessibility (self);
	_tmp40_ = presentation;
	proton_plus_widgets_tools_release_row_rebuild_actions_menu (self, _tmp40_);
	_tmp41_ = presentation;
	proton_plus_widgets_tools_release_row_update_progress_pulse (self, _tmp41_);
	proton_plus_widgets_tools_release_row_refresh_status_text (self);
	if (replace_focus) {
		GtkWidget* _tmp43_;
		_tmp43_ = focused;
		_tmp42_ = !proton_plus_widgets_tools_release_row_is_valid_focus_target (self, _tmp43_);
	} else {
		_tmp42_ = FALSE;
	}
	if (_tmp42_) {
		proton_plus_widgets_tools_release_row_focus_replacement (self);
	}
	_g_object_unref0 (presentation);
	_g_object_unref0 (focused);
}

static void
proton_plus_widgets_tools_release_row_configure_primary_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                ProtonPlusWidgetsToolsReleaseRowPrimaryAction action)
{
	g_return_if_fail (self != NULL);
	switch (action) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_INSTALL:
		{
			AdwButtonContent* _tmp0_;
			AdwButtonContent* _tmp1_;
			GtkButton* _tmp2_;
			ProtonPlusServicesInstallJob* _tmp3_;
			gchar* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			gchar* _tmp7_;
			gchar* _tmp8_;
			GtkButton* _tmp9_;
			ProtonPlusServicesInstallJob* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			gchar* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			_tmp0_ = self->priv->primary_content;
			adw_button_content_set_icon_name (_tmp0_, "folder-download-symbolic");
			_tmp1_ = self->priv->primary_content;
			adw_button_content_set_label (_tmp1_, "");
			_tmp2_ = self->priv->primary_button;
			_tmp3_ = self->priv->_job;
			_tmp4_ = proton_plus_services_install_job_get_title (_tmp3_);
			_tmp5_ = _tmp4_;
			_tmp6_ = _tmp5_;
			_tmp7_ = g_strdup_printf (_ ("Install %s"), _tmp6_);
			_tmp8_ = _tmp7_;
			gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _tmp8_);
			_g_free0 (_tmp8_);
			_g_free0 (_tmp6_);
			_tmp9_ = self->priv->primary_button;
			_tmp10_ = self->priv->_job;
			_tmp11_ = proton_plus_services_install_job_get_title (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = _tmp12_;
			_tmp14_ = g_strdup_printf (_ ("Install %s"), _tmp13_);
			_tmp15_ = _tmp14_;
			gtk_accessible_update_property ((GtkAccessible*) _tmp9_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp15_, -1, -1);
			_g_free0 (_tmp15_);
			_g_free0 (_tmp13_);
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_RETRY:
		{
			AdwButtonContent* _tmp16_;
			AdwButtonContent* _tmp17_;
			GtkButton* _tmp18_;
			const gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			GtkButton* _tmp22_;
			const gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp16_ = self->priv->primary_content;
			adw_button_content_set_icon_name (_tmp16_, "view-refresh-symbolic");
			_tmp17_ = self->priv->primary_content;
			adw_button_content_set_label (_tmp17_, _ ("Retry"));
			_tmp18_ = self->priv->primary_button;
			_tmp19_ = adw_preferences_row_get_title ((AdwPreferencesRow*) self);
			_tmp20_ = g_strdup_printf (_ ("Retry %s"), _tmp19_);
			_tmp21_ = _tmp20_;
			gtk_widget_set_tooltip_text ((GtkWidget*) _tmp18_, _tmp21_);
			_g_free0 (_tmp21_);
			_tmp22_ = self->priv->primary_button;
			_tmp23_ = adw_preferences_row_get_title ((AdwPreferencesRow*) self);
			_tmp24_ = g_strdup_printf (_ ("Retry %s"), _tmp23_);
			_tmp25_ = _tmp24_;
			gtk_accessible_update_property ((GtkAccessible*) _tmp22_, GTK_ACCESSIBLE_PROPERTY_LABEL, _tmp25_, -1, -1);
			_g_free0 (_tmp25_);
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
proton_plus_widgets_tools_release_row_update_cancel_accessibility (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gchar* _tmp0_ = NULL;
	ProtonPlusServicesInstallJob* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gchar* label = NULL;
	gchar* _tmp14_;
	GtkButton* _tmp15_;
	GtkButton* _tmp16_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_canceled (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		ProtonPlusServicesInstallJob* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_title (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strdup_printf (_ ("Cancelling %s"), _tmp7_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp8_;
		_g_free0 (_tmp7_);
	} else {
		ProtonPlusServicesInstallJob* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp9_ = self->priv->_job;
		_tmp10_ = proton_plus_services_install_job_get_title (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup_printf (_ ("Cancel %s"), _tmp12_);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp13_;
		_g_free0 (_tmp12_);
	}
	_tmp14_ = _tmp0_;
	_tmp0_ = NULL;
	label = _tmp14_;
	_tmp15_ = self->priv->cancel_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp15_, label);
	_tmp16_ = self->priv->cancel_button;
	gtk_accessible_update_property ((GtkAccessible*) _tmp16_, GTK_ACCESSIBLE_PROPERTY_LABEL, label, -1, -1);
	_g_free0 (label);
	_g_free0 (_tmp0_);
}

static void
proton_plus_widgets_tools_release_row_rebuild_actions_menu (ProtonPlusWidgetsToolsReleaseRow* self,
                                                            ProtonPlusWidgetsToolsReleaseRowPresentation* presentation)
{
	GSimpleAction* _tmp0_;
	gboolean _tmp1_;
	GSimpleAction* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp5_;
	ProtonPlusModelsRelease* _tmp6_;
	ProtonPlusModelsRelease* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GSimpleAction* _tmp11_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_;
	gboolean _tmp14_;
	GSimpleAction* _tmp16_;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_;
	gboolean _tmp19_;
	GSimpleAction* _tmp21_;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_;
	gboolean _tmp24_;
	GSimpleAction* _tmp26_;
	GMenu* menu = NULL;
	GMenu* _tmp27_;
	GMenu* details_section = NULL;
	GMenu* _tmp28_;
	GMenu* _tmp29_;
	ProtonPlusServicesInstallJob* _tmp30_;
	ProtonPlusModelsRelease* _tmp31_;
	ProtonPlusModelsRelease* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	ProtonPlusServicesInstallJob* _tmp36_;
	ProtonPlusModelsTool* _tmp37_;
	ProtonPlusModelsTool* _tmp38_;
	ProtonPlusModelsGroup* _tmp39_;
	ProtonPlusModelsGroup* _tmp40_;
	ProtonPlusModelsLauncher* _tmp41_;
	ProtonPlusModelsLauncher* _tmp42_;
	GMenu* _tmp44_;
	GMenu* _tmp45_;
	GMenu* management_section = NULL;
	GMenu* _tmp46_;
	gboolean _tmp47_;
	gboolean _tmp48_;
	gboolean _tmp57_;
	gboolean _tmp58_;
	gboolean _tmp60_;
	gboolean _tmp61_;
	GMenu* _tmp63_;
	GtkPopoverMenu* _tmp66_;
	GMenu* _tmp67_;
	GtkMenuButton* _tmp68_;
	gboolean _tmp69_;
	gboolean _tmp70_;
	gboolean _tmp71_ = FALSE;
	gboolean _tmp72_;
	gboolean _tmp73_;
	GtkMenuButton* _tmp75_;
	gboolean _tmp76_;
	gboolean _tmp77_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (presentation != NULL);
	_tmp0_ = self->priv->changelog_action;
	_tmp1_ = self->priv->_action_request_in_progress;
	g_simple_action_set_enabled (_tmp0_, !_tmp1_);
	_tmp2_ = self->priv->games_action;
	_tmp3_ = self->priv->_action_request_in_progress;
	g_simple_action_set_enabled (_tmp2_, !_tmp3_);
	_tmp5_ = self->priv->_job;
	_tmp6_ = proton_plus_services_install_job_get_release (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = proton_plus_models_release_get_page_url (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ != NULL) {
		gboolean _tmp10_;
		_tmp10_ = self->priv->_action_request_in_progress;
		_tmp4_ = !_tmp10_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp11_ = self->priv->open_release_page_action;
	g_simple_action_set_enabled (_tmp11_, _tmp4_);
	_tmp13_ = proton_plus_widgets_tools_release_row_presentation_get_show_update_action (presentation);
	_tmp14_ = _tmp13_;
	if (_tmp14_) {
		gboolean _tmp15_;
		_tmp15_ = self->priv->_action_request_in_progress;
		_tmp12_ = !_tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	_tmp16_ = self->priv->update_action;
	g_simple_action_set_enabled (_tmp16_, _tmp12_);
	_tmp18_ = proton_plus_widgets_tools_release_row_presentation_get_show_open_folder (presentation);
	_tmp19_ = _tmp18_;
	if (_tmp19_) {
		gboolean _tmp20_;
		_tmp20_ = self->priv->_action_request_in_progress;
		_tmp17_ = !_tmp20_;
	} else {
		_tmp17_ = FALSE;
	}
	_tmp21_ = self->priv->open_folder_action;
	g_simple_action_set_enabled (_tmp21_, _tmp17_);
	_tmp23_ = proton_plus_widgets_tools_release_row_presentation_get_show_delete (presentation);
	_tmp24_ = _tmp23_;
	if (_tmp24_) {
		gboolean _tmp25_;
		_tmp25_ = self->priv->_action_request_in_progress;
		_tmp22_ = !_tmp25_;
	} else {
		_tmp22_ = FALSE;
	}
	_tmp26_ = self->priv->delete_action;
	g_simple_action_set_enabled (_tmp26_, _tmp22_);
	_tmp27_ = g_menu_new ();
	menu = _tmp27_;
	_tmp28_ = g_menu_new ();
	details_section = _tmp28_;
	_tmp29_ = details_section;
	g_menu_append (_tmp29_, _ ("_Changelog"), "release.changelog");
	_tmp30_ = self->priv->_job;
	_tmp31_ = proton_plus_services_install_job_get_release (_tmp30_);
	_tmp32_ = _tmp31_;
	_tmp33_ = proton_plus_models_release_get_page_url (_tmp32_);
	_tmp34_ = _tmp33_;
	if (_tmp34_ != NULL) {
		GMenu* _tmp35_;
		_tmp35_ = details_section;
		g_menu_append (_tmp35_, _ ("Open Release Page"), "release.open-release-page");
	}
	_tmp36_ = self->priv->_job;
	_tmp37_ = proton_plus_services_install_job_get_tool (_tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = proton_plus_models_tool_get_group (_tmp38_);
	_tmp40_ = _tmp39_;
	_tmp41_ = proton_plus_models_group_get_launcher (_tmp40_);
	_tmp42_ = _tmp41_;
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp42_)) {
		GMenu* _tmp43_;
		_tmp43_ = details_section;
		g_menu_append (_tmp43_, _ ("_Games Using This Tool"), "release.games");
	}
	_tmp44_ = menu;
	_tmp45_ = details_section;
	g_menu_append_section (_tmp44_, NULL, (GMenuModel*) _tmp45_);
	_tmp46_ = g_menu_new ();
	management_section = _tmp46_;
	_tmp47_ = proton_plus_widgets_tools_release_row_presentation_get_show_update_action (presentation);
	_tmp48_ = _tmp47_;
	if (_tmp48_) {
		const gchar* _tmp49_ = NULL;
		ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp50_;
		gchar* label = NULL;
		gchar* _tmp54_;
		GMenu* _tmp55_;
		const gchar* _tmp56_;
		_tmp50_ = self->priv->_retry_action;
		if (_tmp50_ == PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_UPDATE) {
			_tmp49_ = _ ("Retry");
		} else {
			const gchar* _tmp51_ = NULL;
			gboolean _tmp52_;
			gboolean _tmp53_;
			_tmp52_ = proton_plus_widgets_tools_release_row_presentation_get_update_available (presentation);
			_tmp53_ = _tmp52_;
			if (_tmp53_) {
				_tmp51_ = _ ("Update");
			} else {
				_tmp51_ = _ ("_Check for Updates");
			}
			_tmp49_ = _tmp51_;
		}
		_tmp54_ = g_strdup (_tmp49_);
		label = _tmp54_;
		_tmp55_ = management_section;
		_tmp56_ = label;
		g_menu_append (_tmp55_, _tmp56_, "release.update");
		_g_free0 (label);
	}
	_tmp57_ = proton_plus_widgets_tools_release_row_presentation_get_show_open_folder (presentation);
	_tmp58_ = _tmp57_;
	if (_tmp58_) {
		GMenu* _tmp59_;
		_tmp59_ = management_section;
		g_menu_append (_tmp59_, _ ("_Open Folder"), "release.open-folder");
	}
	_tmp60_ = proton_plus_widgets_tools_release_row_presentation_get_show_delete (presentation);
	_tmp61_ = _tmp60_;
	if (_tmp61_) {
		GMenu* _tmp62_;
		_tmp62_ = management_section;
		g_menu_append (_tmp62_, _ ("_Delete…"), "release.delete");
	}
	_tmp63_ = management_section;
	if (g_menu_model_get_n_items ((GMenuModel*) _tmp63_) > 0) {
		GMenu* _tmp64_;
		GMenu* _tmp65_;
		_tmp64_ = menu;
		_tmp65_ = management_section;
		g_menu_append_section (_tmp64_, NULL, (GMenuModel*) _tmp65_);
	}
	_tmp66_ = self->priv->actions_popover;
	_tmp67_ = menu;
	gtk_popover_menu_set_menu_model (_tmp66_, (GMenuModel*) _tmp67_);
	_tmp68_ = self->priv->actions_button;
	_tmp69_ = proton_plus_widgets_tools_release_row_presentation_get_show_menu (presentation);
	_tmp70_ = _tmp69_;
	gtk_widget_set_visible ((GtkWidget*) _tmp68_, _tmp70_);
	_tmp72_ = proton_plus_widgets_tools_release_row_presentation_get_show_menu (presentation);
	_tmp73_ = _tmp72_;
	if (_tmp73_) {
		gboolean _tmp74_;
		_tmp74_ = self->priv->_action_request_in_progress;
		_tmp71_ = !_tmp74_;
	} else {
		_tmp71_ = FALSE;
	}
	_tmp75_ = self->priv->actions_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp75_, _tmp71_);
	_tmp76_ = proton_plus_widgets_tools_release_row_presentation_get_show_menu (presentation);
	_tmp77_ = _tmp76_;
	if (!_tmp77_) {
		GtkMenuButton* _tmp78_;
		_tmp78_ = self->priv->actions_button;
		gtk_menu_button_popdown (_tmp78_);
	}
	_g_object_unref0 (management_section);
	_g_object_unref0 (details_section);
	_g_object_unref0 (menu);
}

static GtkWidget*
proton_plus_widgets_tools_release_row_get_focused_widget (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkRoot* root = NULL;
	GtkRoot* _tmp0_;
	GtkRoot* _tmp1_;
	GtkRoot* _tmp2_ = NULL;
	GtkRoot* _tmp3_;
	GtkWidget* _tmp4_ = NULL;
	GtkWidget* _tmp6_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_root_get_type ()) ? ((GtkRoot*) _tmp0_) : NULL);
	root = _tmp1_;
	_tmp3_ = root;
	_tmp2_ = _tmp3_;
	_tmp4_ = NULL;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp5_;
		_tmp5_ = gtk_root_get_focus (_tmp2_);
		_tmp4_ = _tmp5_;
	}
	_tmp6_ = _g_object_ref0 (_tmp4_);
	result = _tmp6_;
	_g_object_unref0 (root);
	return result;
}

static gboolean
proton_plus_widgets_tools_release_row_is_valid_focus_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             GtkWidget* widget)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (widget != NULL) {
		GtkRoot* _tmp5_;
		_tmp5_ = gtk_widget_get_root (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
		_tmp4_ = _tmp5_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		_tmp3_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = gtk_widget_get_focusable (G_TYPE_CHECK_INSTANCE_CAST (widget, gtk_widget_get_type (), GtkWidget));
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_focus_replacement (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkWidget* replacement = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_focusable_action (self, NULL, TRUE);
	replacement = _tmp0_;
	_tmp1_ = replacement;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_;
		_tmp2_ = replacement;
		gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget));
	} else {
		gtk_widget_grab_focus ((GtkWidget*) self);
	}
	_g_object_unref0 (replacement);
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static void
proton_plus_widgets_tools_release_row_refresh_status_text (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GeeArrayList* details = NULL;
	GeeArrayList* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* presentation = NULL;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp1_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp6_;
	const gchar* _tmp8_;
	ProtonPlusServicesInstallJob* _tmp11_;
	ProtonPlusServicesInstallJobState _tmp12_;
	ProtonPlusServicesInstallJobState _tmp13_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp28_;
	gint current_usage_count = 0;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	gchar* status = NULL;
	GeeArrayList* _tmp36_;
	gint _tmp37_ = 0;
	gpointer* _tmp38_;
	gchar** _tmp39_;
	gint _tmp39__length1;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* date = NULL;
	ProtonPlusServicesInstallJob* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_ = NULL;
	gboolean _tmp45_ = FALSE;
	const gchar* _tmp46_;
	gchar* _tmp56_ = NULL;
	const gchar* _tmp57_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	details = _tmp0_;
	_tmp1_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	presentation = _tmp1_;
	_tmp2_ = presentation;
	_tmp3_ = proton_plus_widgets_tools_release_row_presentation_get_recommended (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		GeeArrayList* _tmp5_;
		_tmp5_ = details;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, _ ("Recommended"));
	}
	_tmp6_ = self->priv->_retry_action;
	if (_tmp6_ != PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE) {
		GeeArrayList* _tmp7_;
		_tmp7_ = details;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _ ("Failed"));
	}
	_tmp8_ = self->priv->operation_error_message;
	if (_tmp8_ != NULL) {
		GeeArrayList* _tmp9_;
		const gchar* _tmp10_;
		_tmp9_ = details;
		_tmp10_ = self->priv->operation_error_message;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, (const gchar*) _tmp10_);
	}
	_tmp11_ = self->priv->_job;
	_tmp12_ = proton_plus_services_install_job_get_state (_tmp11_);
	_tmp13_ = _tmp12_;
	switch (_tmp13_) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED:
		{
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE:
		{
			GeeArrayList* _tmp14_;
			GeeArrayList* _tmp15_;
			_tmp14_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp14_, _ ("Installed"));
			_tmp15_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _ ("Update available"));
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE:
		{
			GeeArrayList* _tmp16_;
			_tmp16_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _ ("Installed"));
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING:
		{
			GeeArrayList* _tmp17_;
			GeeArrayList* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			_tmp17_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _ ("Installing"));
			_tmp18_ = details;
			_tmp19_ = proton_plus_widgets_tools_release_row_operation_step_text (self);
			_tmp20_ = _tmp19_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp20_);
			_g_free0 (_tmp20_);
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING:
		{
			GeeArrayList* _tmp21_;
			GeeArrayList* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			_tmp21_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp21_, _ ("Updating"));
			_tmp22_ = details;
			_tmp23_ = proton_plus_widgets_tools_release_row_operation_step_text (self);
			_tmp24_ = _tmp23_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp24_);
			_g_free0 (_tmp24_);
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING:
		{
			GeeArrayList* _tmp25_;
			_tmp25_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _ ("Removing"));
			break;
		}
		default:
		break;
	}
	_tmp26_ = presentation;
	_tmp27_ = proton_plus_widgets_tools_release_row_presentation_get_unavailable (_tmp26_);
	_tmp28_ = _tmp27_;
	if (_tmp28_) {
		GeeArrayList* _tmp29_;
		_tmp29_ = details;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp29_, _ ("Unavailable for the selected variant"));
	}
	current_usage_count = proton_plus_widgets_tools_release_row_usage_count (self);
	_tmp30_ = presentation;
	_tmp31_ = proton_plus_widgets_tools_release_row_presentation_get_in_use (_tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_) {
		GeeArrayList* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		_tmp33_ = details;
		_tmp34_ = g_strdup_printf (ngettext ("In use by %i game", "In use by %i games", (gulong) current_usage_count), current_usage_count);
		_tmp35_ = _tmp34_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp33_, _tmp35_);
		_g_free0 (_tmp35_);
	}
	_tmp36_ = details;
	_tmp38_ = gee_collection_to_array ((GeeCollection*) _tmp36_, &_tmp37_);
	_tmp39_ = _tmp38_;
	_tmp39__length1 = _tmp37_;
	_tmp40_ = _vala_g_strjoinv (" · ", _tmp39_, (gint) _tmp37_);
	_tmp41_ = _tmp40_;
	_tmp39_ = (_vala_array_free (_tmp39_, _tmp39__length1, (GDestroyNotify) g_free), NULL);
	status = _tmp41_;
	_tmp42_ = self->priv->_job;
	_tmp43_ = proton_plus_widgets_tools_release_row_release_display_timestamp (_tmp42_);
	date = _tmp43_;
	_tmp46_ = date;
	if (g_strcmp0 (_tmp46_, "") != 0) {
		const gchar* _tmp47_;
		_tmp47_ = status;
		_tmp45_ = g_strcmp0 (_tmp47_, "") != 0;
	} else {
		_tmp45_ = FALSE;
	}
	if (_tmp45_) {
		const gchar* _tmp48_;
		const gchar* _tmp49_;
		gchar* _tmp50_;
		_tmp48_ = date;
		_tmp49_ = status;
		_tmp50_ = g_strdup_printf ("%s · %s", _tmp48_, _tmp49_);
		_g_free0 (_tmp44_);
		_tmp44_ = _tmp50_;
	} else {
		const gchar* _tmp51_ = NULL;
		const gchar* _tmp52_;
		gchar* _tmp55_;
		_tmp52_ = date;
		if (g_strcmp0 (_tmp52_, "") != 0) {
			const gchar* _tmp53_;
			_tmp53_ = date;
			_tmp51_ = _tmp53_;
		} else {
			const gchar* _tmp54_;
			_tmp54_ = status;
			_tmp51_ = _tmp54_;
		}
		_tmp55_ = g_strdup (_tmp51_);
		_g_free0 (_tmp44_);
		_tmp44_ = _tmp55_;
	}
	adw_action_row_set_subtitle ((AdwActionRow*) self, _tmp44_);
	_tmp57_ = status;
	if (g_strcmp0 (_tmp57_, "") != 0) {
		const gchar* _tmp58_;
		gchar* _tmp59_;
		_tmp58_ = status;
		_tmp59_ = g_strdup_printf (_ ("%s. Open Release Details"), _tmp58_);
		_g_free0 (_tmp56_);
		_tmp56_ = _tmp59_;
	} else {
		gchar* _tmp60_;
		_tmp60_ = g_strdup (_ ("Open Release Details"));
		_g_free0 (_tmp56_);
		_tmp56_ = _tmp60_;
	}
	gtk_accessible_update_property ((GtkAccessible*) self, GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, _tmp56_, -1, -1);
	_g_free0 (_tmp56_);
	_g_free0 (_tmp44_);
	_g_free0 (date);
	_g_free0 (status);
	_g_object_unref0 (presentation);
	_g_object_unref0 (details);
}

static gchar*
proton_plus_widgets_tools_release_row_operation_step_text (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	ProtonPlusServicesInstallJob* _tmp4_;
	ProtonPlusServicesInstallJobStep _tmp5_;
	ProtonPlusServicesInstallJobStep _tmp6_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_job;
	_tmp1_ = proton_plus_services_install_job_get_canceled (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gchar* _tmp3_;
		_tmp3_ = g_strdup (_ ("Cancelling"));
		result = _tmp3_;
		return result;
	}
	_tmp4_ = self->priv->_job;
	_tmp5_ = proton_plus_services_install_job_get_step (_tmp4_);
	_tmp6_ = _tmp5_;
	switch (_tmp6_) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING:
		{
			gchar* _tmp7_;
			_tmp7_ = g_strdup (_ ("Downloading"));
			result = _tmp7_;
			return result;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING:
		{
			gchar* _tmp8_;
			_tmp8_ = g_strdup (_ ("Extracting"));
			result = _tmp8_;
			return result;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING:
		{
			gchar* _tmp9_;
			_tmp9_ = g_strdup (_ ("Moving"));
			result = _tmp9_;
			return result;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_REMOVING:
		{
			gchar* _tmp10_;
			_tmp10_ = g_strdup (_ ("Removing"));
			result = _tmp10_;
			return result;
		}
		default:
		{
			ProtonPlusServicesInstallJob* _tmp11_;
			ProtonPlusServicesInstallJobState _tmp12_;
			ProtonPlusServicesInstallJobState _tmp13_;
			ProtonPlusServicesInstallJob* _tmp15_;
			ProtonPlusServicesInstallJobState _tmp16_;
			ProtonPlusServicesInstallJobState _tmp17_;
			gchar* _tmp19_;
			_tmp11_ = self->priv->_job;
			_tmp12_ = proton_plus_services_install_job_get_state (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING) {
				gchar* _tmp14_;
				_tmp14_ = g_strdup (_ ("Preparing update"));
				result = _tmp14_;
				return result;
			}
			_tmp15_ = self->priv->_job;
			_tmp16_ = proton_plus_services_install_job_get_state (_tmp15_);
			_tmp17_ = _tmp16_;
			if (_tmp17_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING) {
				gchar* _tmp18_;
				_tmp18_ = g_strdup (_ ("Removing"));
				result = _tmp18_;
				return result;
			}
			_tmp19_ = g_strdup (_ ("Preparing installation"));
			result = _tmp19_;
			return result;
		}
	}
}

static void
proton_plus_widgets_tools_release_row_update_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             ProtonPlusWidgetsToolsReleaseRowPresentation* presentation)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (presentation != NULL);
	_tmp1_ = proton_plus_widgets_tools_release_row_presentation_get_progress_indeterminate (presentation);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = self->priv->progress_pulse_timeout_id == ((guint) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusWidgetsCircularProgressBar* _tmp3_;
		ProtonPlusWidgetsCircularProgressBar* _tmp4_;
		_tmp3_ = self->priv->progress_bar;
		gtk_accessible_reset_property ((GtkAccessible*) _tmp3_, GTK_ACCESSIBLE_PROPERTY_VALUE_NOW);
		_tmp4_ = self->priv->progress_bar;
		proton_plus_widgets_circular_progress_bar_pulse (_tmp4_, 0.01);
		self->priv->progress_pulse_timeout_id = proton_plus_widgets_tools_release_row_start_progress_pulse_timeout (self);
	} else {
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = proton_plus_widgets_tools_release_row_presentation_get_progress_indeterminate (presentation);
		_tmp6_ = _tmp5_;
		if (!_tmp6_) {
			proton_plus_widgets_tools_release_row_stop_progress_pulse (self);
		}
	}
}

static Block30Data*
block30_data_ref (Block30Data* _data30_)
{
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}

static void
block30_data_unref (void * _userdata_)
{
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		g_weak_ref_clear (&_data30_->owner_ref);
		g_slice_free (Block30Data, _data30_);
	}
}

static gboolean
__lambda41_ (Block30Data* _data30_)
{
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp6_;
	ProtonPlusWidgetsCircularProgressBar* _tmp7_;
	gboolean result;
	_tmp0_ = g_weak_ref_get (&_data30_->owner_ref);
	_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp0_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	row = _tmp1_;
	_tmp3_ = row;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = row;
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_row_disposed;
		_tmp2_ = _tmp5_;
	}
	if (_tmp2_) {
		result = G_SOURCE_REMOVE;
		_g_object_unref0 (row);
		return result;
	}
	_tmp6_ = row;
	_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->progress_bar;
	proton_plus_widgets_circular_progress_bar_pulse (_tmp7_, 0.01);
	result = G_SOURCE_CONTINUE;
	_g_object_unref0 (row);
	return result;
}

static gboolean
___lambda41__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda41_ (self);
	return result;
}

static guint
proton_plus_widgets_tools_release_row_start_progress_pulse_timeout (ProtonPlusWidgetsToolsReleaseRow* owner)
{
	Block30Data* _data30_;
	guint result;
	g_return_val_if_fail (owner != NULL, 0U);
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	g_weak_ref_init (&_data30_->owner_ref, (GObject*) owner);
	result = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 16, ___lambda41__gsource_func, block30_data_ref (_data30_), block30_data_unref);
	block30_data_unref (_data30_);
	_data30_ = NULL;
	return result;
}

static void
proton_plus_widgets_tools_release_row_stop_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->progress_pulse_timeout_id == ((guint) 0)) {
		return;
	}
	g_source_remove (self->priv->progress_pulse_timeout_id);
	self->priv->progress_pulse_timeout_id = (guint) 0;
}

static gdouble
double_parse (const gchar* str)
{
	gdouble result;
	g_return_val_if_fail (str != NULL, -1.0);
	result = g_ascii_strtod (str, NULL);
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
proton_plus_widgets_tools_release_row_real_release_row_job_progress_changed (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	gboolean _tmp0_;
	gboolean _tmp1_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GtkLabel* _tmp28_;
	ProtonPlusServicesInstallJob* _tmp29_;
	gdouble _tmp30_;
	gdouble _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_ = NULL;
	ProtonPlusServicesInstallJob* _tmp37_;
	gdouble _tmp38_;
	gdouble _tmp39_;
	GtkLabel* _tmp47_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	_tmp0_ = self->priv->_row_disposed;
	if (_tmp0_) {
		return;
	}
	_tmp2_ = self->priv->_job;
	_tmp3_ = proton_plus_services_install_job_get_is_percent (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ProtonPlusServicesInstallJob* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->_job;
		_tmp6_ = proton_plus_services_install_job_get_progress (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp1_ = _tmp7_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gdouble percentage = 0.0;
		ProtonPlusServicesInstallJob* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gdouble _tmp13_;
		ProtonPlusWidgetsCircularProgressBar* _tmp14_;
		ProtonPlusWidgetsCircularProgressBar* _tmp15_;
		ProtonPlusServicesInstallJob* _tmp16_;
		const gchar* _tmp17_;
		const gchar* _tmp18_;
		_tmp8_ = self->priv->_job;
		_tmp9_ = proton_plus_services_install_job_get_progress (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = string_replace (_tmp10_, "%", "");
		_tmp12_ = _tmp11_;
		_tmp13_ = double_parse (_tmp12_);
		_g_free0 (_tmp12_);
		percentage = _tmp13_;
		_tmp14_ = self->priv->progress_bar;
		proton_plus_widgets_circular_progress_bar_set_fraction (_tmp14_, percentage / 100.0);
		_tmp15_ = self->priv->progress_bar;
		_tmp16_ = self->priv->_job;
		_tmp17_ = proton_plus_services_install_job_get_progress (_tmp16_);
		_tmp18_ = _tmp17_;
		gtk_accessible_update_property ((GtkAccessible*) _tmp15_, GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, percentage, GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, _tmp18_, -1, -1);
	} else {
		ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp19_;
		ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp20_;
		gboolean _tmp21_;
		gboolean _tmp22_;
		gboolean _tmp23_;
		_tmp19_ = proton_plus_widgets_tools_release_row_current_presentation (self);
		_tmp20_ = _tmp19_;
		_tmp21_ = proton_plus_widgets_tools_release_row_presentation_get_progress_indeterminate (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = _tmp22_;
		_g_object_unref0 (_tmp20_);
		if (_tmp23_) {
			ProtonPlusWidgetsCircularProgressBar* _tmp24_;
			ProtonPlusWidgetsCircularProgressBar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			_tmp24_ = self->priv->progress_bar;
			gtk_accessible_reset_property ((GtkAccessible*) _tmp24_, GTK_ACCESSIBLE_PROPERTY_VALUE_NOW);
			_tmp25_ = self->priv->progress_bar;
			_tmp26_ = proton_plus_widgets_tools_release_row_operation_step_text (self);
			_tmp27_ = _tmp26_;
			gtk_accessible_update_property ((GtkAccessible*) _tmp25_, GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT, _tmp27_, -1, -1);
			_g_free0 (_tmp27_);
		}
	}
	_tmp28_ = self->priv->speed_label;
	_tmp29_ = self->priv->_job;
	_tmp30_ = proton_plus_services_install_job_get_speed_kbps (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = proton_plus_utils_filesystem_convert_bytes_to_string ((gint64) (_tmp31_ * 1024));
	_tmp33_ = _tmp32_;
	_tmp34_ = g_strdup_printf (_ ("Speed: %s/s"), _tmp33_);
	_tmp35_ = _tmp34_;
	gtk_label_set_label (_tmp28_, _tmp35_);
	_g_free0 (_tmp35_);
	_g_free0 (_tmp33_);
	_tmp37_ = self->priv->_job;
	_tmp38_ = proton_plus_services_install_job_get_seconds_remaining (_tmp37_);
	_tmp39_ = _tmp38_;
	if (_tmp39_ >= ((gdouble) 0)) {
		ProtonPlusServicesInstallJob* _tmp40_;
		gdouble _tmp41_;
		gdouble _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		_tmp40_ = self->priv->_job;
		_tmp41_ = proton_plus_services_install_job_get_seconds_remaining (_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = proton_plus_widgets_tools_release_row_format_time (self, _tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = g_strdup_printf (_ ("Remaining time: %s"), _tmp44_);
		_g_free0 (_tmp36_);
		_tmp36_ = _tmp45_;
		_g_free0 (_tmp44_);
	} else {
		gchar* _tmp46_;
		_tmp46_ = g_strdup (_ ("Remaining time: --"));
		_g_free0 (_tmp36_);
		_tmp36_ = _tmp46_;
	}
	_tmp47_ = self->priv->time_label;
	gtk_label_set_label (_tmp47_, _tmp36_);
	_g_free0 (_tmp36_);
}

static gchar*
proton_plus_widgets_tools_release_row_format_time (ProtonPlusWidgetsToolsReleaseRow* self,
                                                   gdouble seconds)
{
	gint total = 0;
	gint hours = 0;
	gint minutes = 0;
	gint remaining_seconds = 0;
	gchar* _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	total = (gint) seconds;
	hours = total / 3600;
	minutes = (total % 3600) / 60;
	remaining_seconds = total % 60;
	if (hours > 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup_printf (_ ("%dh %dm %ds"), hours, minutes, remaining_seconds);
		result = _tmp0_;
		return result;
	}
	if (minutes > 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup_printf (_ ("%dm %ds"), minutes, remaining_seconds);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_strdup_printf (_ ("%ds"), remaining_seconds);
	result = _tmp2_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_primary_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp5_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp6_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp7_;
	ProtonPlusWidgetsToolsReleaseRowPrimaryAction _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_action_request_in_progress;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_row_disposed;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->_job;
	proton_plus_services_install_job_refresh_state (_tmp3_);
	_tmp4_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_tools_release_row_presentation_get_primary_action (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp5_);
	switch (_tmp8_) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_INSTALL:
		{
			proton_plus_widgets_tools_release_row_install_button_clicked (self);
			break;
		}
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_PRIMARY_ACTION_RETRY:
		{
			ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp9_;
			_tmp9_ = self->priv->_retry_action;
			if (_tmp9_ == PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_INSTALL) {
				proton_plus_widgets_tools_release_row_install_button_clicked (self);
			}
			break;
		}
		default:
		{
			break;
		}
	}
}

static void
proton_plus_widgets_tools_release_row_request_update (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_action_request_in_progress;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_row_disposed;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->_job;
	proton_plus_services_install_job_refresh_state (_tmp3_);
	_tmp4_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_tools_release_row_presentation_get_show_update_action (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp5_);
	if (_tmp8_) {
		proton_plus_widgets_tools_release_row_begin_update (self);
	}
}

static void
proton_plus_widgets_tools_release_row_begin_update (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_set_retry_action (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE);
	_g_free0 (self->priv->operation_error_message);
	self->priv->operation_error_message = NULL;
	proton_plus_widgets_tools_release_row_update_action_request_state (self, TRUE);
	_tmp0_ = self->priv->_job;
	proton_plus_widgets_tools_release_row_run_update (_tmp0_, self);
}

static Block31Data*
block31_data_ref (Block31Data* _data31_)
{
	g_atomic_int_inc (&_data31_->_ref_count_);
	return _data31_;
}

static void
block31_data_unref (void * _userdata_)
{
	Block31Data* _data31_;
	_data31_ = (Block31Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data31_->_ref_count_)) {
		g_weak_ref_clear (&_data31_->owner_ref);
		_g_object_unref0 (_data31_->operation_job);
		g_slice_free (Block31Data, _data31_);
	}
}

static void
__lambda51_ (Block31Data* _data31_,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusReturnCode code = 0;
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	GObject* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp5_;
	gboolean _tmp6_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp7_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp10_ = 0;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp15_;
	gchar* _tmp16_ = NULL;
	ProtonPlusWidgetsToolsReleaseRow* _tmp17_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp18_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp20_;
	gchar* _tmp21_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp22_;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	g_return_if_fail (res != NULL);
	code = proton_plus_services_install_job_update_finish (_data31_->operation_job, res);
	if (code == PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED) {
		ProtonPlusUtilsDownloadManager* _tmp0_;
		ProtonPlusUtilsDownloadManager* _tmp1_;
		_tmp0_ = proton_plus_utils_download_manager_get_instance ();
		_tmp1_ = _tmp0_;
		g_signal_emit_by_name (_tmp1_, "tool-updated", _data31_->operation_job, TRUE);
	} else {
		if (code == PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE) {
			ProtonPlusUtilsDownloadManager* _tmp2_;
			ProtonPlusUtilsDownloadManager* _tmp3_;
			_tmp2_ = proton_plus_utils_download_manager_get_instance ();
			_tmp3_ = _tmp2_;
			g_signal_emit_by_name (_tmp3_, "tool-updated", _data31_->operation_job, FALSE);
		}
	}
	_tmp4_ = g_weak_ref_get (&_data31_->owner_ref);
	_tmp5_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp4_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	row = _tmp5_;
	_tmp7_ = row;
	if (_tmp7_ == NULL) {
		_tmp6_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp8_;
		gboolean _tmp9_;
		_tmp8_ = row;
		_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_row_disposed;
		_tmp6_ = _tmp9_;
	}
	if (_tmp6_) {
		_g_object_unref0 (row);
		return;
	}
	if (code != PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED) {
		_tmp12_ = code != PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		gboolean _tmp13_;
		gboolean _tmp14_;
		_tmp13_ = proton_plus_services_install_job_get_canceled (_data31_->operation_job);
		_tmp14_ = _tmp13_;
		_tmp11_ = !_tmp14_;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		_tmp10_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_UPDATE;
	} else {
		_tmp10_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE;
	}
	_tmp15_ = row;
	proton_plus_widgets_tools_release_row_set_retry_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), _tmp10_);
	_tmp17_ = row;
	_tmp18_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_retry_action;
	if (_tmp18_ != PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE) {
		gchar* _tmp19_;
		_tmp19_ = proton_plus_get_return_code_message (code);
		_g_free0 (_tmp16_);
		_tmp16_ = _tmp19_;
	} else {
		_g_free0 (_tmp16_);
		_tmp16_ = NULL;
	}
	_tmp20_ = row;
	_tmp21_ = _tmp16_;
	_tmp16_ = NULL;
	_g_free0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->operation_error_message);
	G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->operation_error_message = _tmp21_;
	_tmp22_ = row;
	proton_plus_widgets_tools_release_row_update_action_request_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), FALSE);
	if (code != PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED) {
		_tmp24_ = code != PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE;
	} else {
		_tmp24_ = FALSE;
	}
	if (_tmp24_) {
		gboolean _tmp25_;
		gboolean _tmp26_;
		_tmp25_ = proton_plus_services_install_job_get_canceled (_data31_->operation_job);
		_tmp26_ = _tmp25_;
		_tmp23_ = !_tmp26_;
	} else {
		_tmp23_ = FALSE;
	}
	if (_tmp23_) {
		gchar* _tmp27_ = NULL;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		gchar* _tmp34_;
		_tmp28_ = proton_plus_services_install_job_get_error_message (_data31_->operation_job);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_strdup (_tmp29_);
		_tmp27_ = _tmp30_;
		if (_tmp27_ == NULL) {
			gchar* _tmp31_;
			_tmp31_ = proton_plus_get_return_code_message (code);
			_g_free0 (_tmp27_);
			_tmp27_ = _tmp31_;
		}
		_tmp32_ = proton_plus_services_install_job_get_title (_data31_->operation_job);
		_tmp33_ = _tmp32_;
		_tmp34_ = _tmp33_;
		g_warning ("tools-release-row.vala:984: Failed to update %s: %s", _tmp34_, _tmp27_);
		_g_free0 (_tmp34_);
		_g_free0 (_tmp27_);
	}
	_g_free0 (_tmp16_);
	_g_object_unref0 (row);
}

static void
___lambda51__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda51_ (self, source_object, res);
	block31_data_unref (self);
}

static void
proton_plus_widgets_tools_release_row_run_update (ProtonPlusServicesInstallJob* operation_job,
                                                  ProtonPlusWidgetsToolsReleaseRow* owner)
{
	Block31Data* _data31_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (operation_job != NULL);
	g_return_if_fail (owner != NULL);
	_data31_ = g_slice_new0 (Block31Data);
	_data31_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (operation_job);
	_g_object_unref0 (_data31_->operation_job);
	_data31_->operation_job = _tmp0_;
	g_weak_ref_init (&_data31_->owner_ref, (GObject*) owner);
	proton_plus_services_install_job_update (_data31_->operation_job, ___lambda51__gasync_ready_callback, block31_data_ref (_data31_));
	block31_data_unref (_data31_);
	_data31_ = NULL;
}

static void
proton_plus_widgets_tools_release_row_open_folder (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_action_request_in_progress;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_row_disposed;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->_job;
	proton_plus_services_install_job_refresh_state (_tmp3_);
	_tmp4_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_tools_release_row_presentation_get_show_open_folder (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_g_object_unref0 (_tmp5_);
	if (_tmp8_) {
		ProtonPlusServicesInstallJob* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = self->priv->_job;
		_tmp10_ = proton_plus_services_install_job_get_install_location (_tmp9_);
		_tmp11_ = _tmp10_;
		proton_plus_utils_system_open_path (_tmp11_);
	}
}

static void
proton_plus_widgets_tools_release_row_real_install_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	_tmp1_ = self->priv->_action_request_in_progress;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_row_disposed;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	proton_plus_widgets_tools_release_row_set_retry_action (self, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE);
	_g_free0 (self->priv->operation_error_message);
	self->priv->operation_error_message = NULL;
	proton_plus_widgets_tools_release_row_update_action_request_state (self, TRUE);
	_tmp3_ = self->priv->_job;
	proton_plus_widgets_tools_release_row_run_install (_tmp3_, self);
}

void
proton_plus_widgets_tools_release_row_install_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsToolsReleaseRowClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_GET_CLASS (self);
	if (_klass_->install_button_clicked) {
		_klass_->install_button_clicked (self);
	}
}

static Block32Data*
block32_data_ref (Block32Data* _data32_)
{
	g_atomic_int_inc (&_data32_->_ref_count_);
	return _data32_;
}

static void
block32_data_unref (void * _userdata_)
{
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
		g_weak_ref_clear (&_data32_->owner_ref);
		_g_object_unref0 (_data32_->operation_job);
		g_slice_free (Block32Data, _data32_);
	}
}

static void
__lambda42_ (Block32Data* _data32_,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusReturnCode code = 0;
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp6_ = 0;
	gboolean _tmp7_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp10_;
	gchar* _tmp11_ = NULL;
	ProtonPlusWidgetsToolsReleaseRow* _tmp12_;
	ProtonPlusWidgetsToolsReleaseRowRetryAction _tmp13_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp15_;
	gchar* _tmp16_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp17_;
	gboolean _tmp18_ = FALSE;
	g_return_if_fail (res != NULL);
	code = proton_plus_services_install_job_install_finish (_data32_->operation_job, res);
	_tmp0_ = g_weak_ref_get (&_data32_->owner_ref);
	_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp0_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	row = _tmp1_;
	_tmp3_ = row;
	if (_tmp3_ == NULL) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusWidgetsToolsReleaseRow* _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = row;
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_row_disposed;
		_tmp2_ = _tmp5_;
	}
	if (_tmp2_) {
		_g_object_unref0 (row);
		return;
	}
	if (code != PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED) {
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp8_ = proton_plus_services_install_job_get_canceled (_data32_->operation_job);
		_tmp9_ = _tmp8_;
		_tmp7_ = !_tmp9_;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		_tmp6_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_INSTALL;
	} else {
		_tmp6_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE;
	}
	_tmp10_ = row;
	proton_plus_widgets_tools_release_row_set_retry_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), _tmp6_);
	_tmp12_ = row;
	_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_retry_action;
	if (_tmp13_ != PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE) {
		gchar* _tmp14_;
		_tmp14_ = proton_plus_get_return_code_message (code);
		_g_free0 (_tmp11_);
		_tmp11_ = _tmp14_;
	} else {
		_g_free0 (_tmp11_);
		_tmp11_ = NULL;
	}
	_tmp15_ = row;
	_tmp16_ = _tmp11_;
	_tmp11_ = NULL;
	_g_free0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->operation_error_message);
	G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->operation_error_message = _tmp16_;
	_tmp17_ = row;
	proton_plus_widgets_tools_release_row_update_action_request_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), FALSE);
	if (code != PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED) {
		gboolean _tmp19_;
		gboolean _tmp20_;
		_tmp19_ = proton_plus_services_install_job_get_canceled (_data32_->operation_job);
		_tmp20_ = _tmp19_;
		_tmp18_ = !_tmp20_;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		gchar* _tmp21_ = NULL;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		_tmp22_ = proton_plus_services_install_job_get_error_message (_data32_->operation_job);
		_tmp23_ = _tmp22_;
		_tmp24_ = g_strdup (_tmp23_);
		_tmp21_ = _tmp24_;
		if (_tmp21_ == NULL) {
			gchar* _tmp25_;
			_tmp25_ = proton_plus_get_return_code_message (code);
			_g_free0 (_tmp21_);
			_tmp21_ = _tmp25_;
		}
		_tmp26_ = proton_plus_services_install_job_get_title (_data32_->operation_job);
		_tmp27_ = _tmp26_;
		_tmp28_ = _tmp27_;
		g_warning ("tools-release-row.vala:1030: Failed to install %s: %s", _tmp28_, _tmp21_);
		_g_free0 (_tmp28_);
		_g_free0 (_tmp21_);
	}
	_g_free0 (_tmp11_);
	_g_object_unref0 (row);
}

static void
___lambda42__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda42_ (self, source_object, res);
	block32_data_unref (self);
}

static void
proton_plus_widgets_tools_release_row_run_install (ProtonPlusServicesInstallJob* operation_job,
                                                   ProtonPlusWidgetsToolsReleaseRow* owner)
{
	Block32Data* _data32_;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (operation_job != NULL);
	g_return_if_fail (owner != NULL);
	_data32_ = g_slice_new0 (Block32Data);
	_data32_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (operation_job);
	_g_object_unref0 (_data32_->operation_job);
	_data32_->operation_job = _tmp0_;
	g_weak_ref_init (&_data32_->owner_ref, (GObject*) owner);
	proton_plus_services_install_job_install (_data32_->operation_job, ___lambda42__gasync_ready_callback, block32_data_ref (_data32_));
	block32_data_unref (_data32_);
	_data32_ = NULL;
}

static void
proton_plus_widgets_tools_release_row_request_removal (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	ProtonPlusServicesInstallJob* _tmp3_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp4_;
	ProtonPlusWidgetsToolsReleaseRowPresentation* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ProtonPlusWidgetsToolsRemoveDialog* dialog = NULL;
	ProtonPlusServicesInstallJob* _tmp9_;
	ProtonPlusWidgetsToolsRemoveDialog* _tmp10_;
	ProtonPlusWidgetsToolsRemoveDialog* _tmp11_;
	ProtonPlusWidgetsToolsRemoveDialog* _tmp12_;
	GtkWindow* root = NULL;
	GtkRoot* _tmp13_;
	GtkWindow* _tmp14_;
	GtkWindow* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_action_request_in_progress;
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_row_disposed;
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp3_ = self->priv->_job;
	proton_plus_services_install_job_refresh_state (_tmp3_);
	_tmp4_ = proton_plus_widgets_tools_release_row_current_presentation (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_tools_release_row_presentation_get_show_delete (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = !_tmp7_;
	_g_object_unref0 (_tmp5_);
	if (_tmp8_) {
		return;
	}
	proton_plus_widgets_tools_release_row_update_action_request_state (self, TRUE);
	_tmp9_ = self->priv->_job;
	_tmp10_ = proton_plus_widgets_tools_remove_dialog_new (_tmp9_);
	g_object_ref_sink (_tmp10_);
	dialog = _tmp10_;
	_tmp11_ = dialog;
	proton_plus_widgets_tools_release_row_customize_remove_dialog (self, _tmp11_);
	_tmp12_ = dialog;
	proton_plus_widgets_tools_release_row_track_removal_dialog (_tmp12_, self);
	_tmp13_ = gtk_widget_get_root ((GtkWidget*) self);
	_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, gtk_window_get_type ()) ? ((GtkWindow*) _tmp13_) : NULL);
	root = _tmp14_;
	_tmp15_ = root;
	if (_tmp15_ != NULL) {
		ProtonPlusWidgetsToolsRemoveDialog* _tmp16_;
		GtkWindow* _tmp17_;
		_tmp16_ = dialog;
		_tmp17_ = root;
		proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) _tmp16_, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_window_get_type (), GtkWindow));
	} else {
		proton_plus_widgets_tools_release_row_update_action_request_state (self, FALSE);
	}
	_g_object_unref0 (root);
	_g_object_unref0 (dialog);
}

static Block33Data*
block33_data_ref (Block33Data* _data33_)
{
	g_atomic_int_inc (&_data33_->_ref_count_);
	return _data33_;
}

static void
block33_data_unref (void * _userdata_)
{
	Block33Data* _data33_;
	_data33_ = (Block33Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data33_->_ref_count_)) {
		g_weak_ref_clear (&_data33_->owner_ref);
		g_slice_free (Block33Data, _data33_);
	}
}

static void
__lambda55_ (Block33Data* _data33_)
{
	ProtonPlusWidgetsToolsReleaseRow* row = NULL;
	GObject* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ProtonPlusWidgetsToolsReleaseRow* _tmp3_;
	_tmp0_ = g_weak_ref_get (&_data33_->owner_ref);
	_tmp1_ = PROTON_PLUS_WIDGETS_TOOLS_IS_RELEASE_ROW (_tmp0_) ? ((ProtonPlusWidgetsToolsReleaseRow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	row = _tmp1_;
	_tmp3_ = row;
	if (_tmp3_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = row;
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow)->priv->_row_disposed;
		_tmp2_ = !_tmp5_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp6_;
		_tmp6_ = row;
		proton_plus_widgets_tools_release_row_update_action_request_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow), FALSE);
	}
	_g_object_unref0 (row);
}

static void
___lambda55__adw_dialog_closed (AdwDialog* _sender,
                                gpointer self)
{
	__lambda55_ (self);
}

static void
proton_plus_widgets_tools_release_row_track_removal_dialog (ProtonPlusWidgetsToolsRemoveDialog* dialog,
                                                            ProtonPlusWidgetsToolsReleaseRow* owner)
{
	Block33Data* _data33_;
	g_return_if_fail (dialog != NULL);
	g_return_if_fail (owner != NULL);
	_data33_ = g_slice_new0 (Block33Data);
	_data33_->_ref_count_ = 1;
	g_weak_ref_init (&_data33_->owner_ref, (GObject*) owner);
	g_signal_connect_data ((AdwDialog*) dialog, "closed", (GCallback) ___lambda55__adw_dialog_closed, block33_data_ref (_data33_), (GClosureNotify) block33_data_unref, 0);
	block33_data_unref (_data33_);
	_data33_ = NULL;
}

static void
proton_plus_widgets_tools_release_row_real_customize_remove_dialog (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                    ProtonPlusWidgetsToolsRemoveDialog* dialog)
{
	g_return_if_fail (dialog != NULL);
}

void
proton_plus_widgets_tools_release_row_customize_remove_dialog (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               ProtonPlusWidgetsToolsRemoveDialog* dialog)
{
	ProtonPlusWidgetsToolsReleaseRowClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_GET_CLASS (self);
	if (_klass_->customize_remove_dialog) {
		_klass_->customize_remove_dialog (self, dialog);
	}
}

void
proton_plus_widgets_tools_release_row_update_action_request_state (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                   gboolean in_progress)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	proton_plus_widgets_tools_release_row_set_action_request_in_progress (self, in_progress);
	_tmp0_ = self->priv->_row_disposed;
	if (!_tmp0_) {
		proton_plus_widgets_tools_release_row_refresh_presentation (self);
	}
}

void
proton_plus_widgets_tools_release_row_refresh_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_row_disposed;
	if (!_tmp0_) {
		proton_plus_widgets_tools_release_row_refresh_status_text (self);
	}
}

static gboolean
proton_plus_widgets_tools_release_row_is_busy_state (ProtonPlusWidgetsToolsReleaseRow* self,
                                                     ProtonPlusServicesInstallJobState state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (state == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = state == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = state == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING;
	}
	result = _tmp0_;
	return result;
}

ProtonPlusServicesInstallJob*
proton_plus_widgets_tools_release_row_get_job (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* result;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_job;
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_tools_release_row_set_job (ProtonPlusWidgetsToolsReleaseRow* self,
                                               ProtonPlusServicesInstallJob* value)
{
	ProtonPlusServicesInstallJob* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_release_row_get_job (self);
	if (old_value != value) {
		ProtonPlusServicesInstallJob* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_job);
		self->priv->_job = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_tools_release_row_get_action_request_in_progress (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_action_request_in_progress;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_action_request_in_progress (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_release_row_get_action_request_in_progress (self);
	if (old_value != value) {
		self->priv->_action_request_in_progress = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_tools_release_row_get_row_disposed (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_row_disposed;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_row_disposed (ProtonPlusWidgetsToolsReleaseRow* self,
                                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_release_row_get_row_disposed (self);
	if (old_value != value) {
		self->priv->_row_disposed = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY]);
	}
}

ProtonPlusWidgetsToolsReleaseRowRetryAction
proton_plus_widgets_tools_release_row_get_retry_action (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsToolsReleaseRowRetryAction result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_retry_action;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_retry_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                        ProtonPlusWidgetsToolsReleaseRowRetryAction value)
{
	ProtonPlusWidgetsToolsReleaseRowRetryAction old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_tools_release_row_get_retry_action (self);
	if (old_value != value) {
		self->priv->_retry_action = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY]);
	}
}

static void
proton_plus_widgets_tools_release_row_class_init (ProtonPlusWidgetsToolsReleaseRowClass * klass,
                                                  gpointer klass_data)
{
	proton_plus_widgets_tools_release_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsToolsReleaseRow_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) proton_plus_widgets_tools_release_row_real_dispose;
	((ProtonPlusWidgetsToolsReleaseRowClass *) klass)->install_button_clicked = (void (*) (ProtonPlusWidgetsToolsReleaseRow*)) proton_plus_widgets_tools_release_row_real_install_button_clicked;
	((ProtonPlusWidgetsToolsReleaseRowClass *) klass)->customize_remove_dialog = (void (*) (ProtonPlusWidgetsToolsReleaseRow*, ProtonPlusWidgetsToolsRemoveDialog*)) proton_plus_widgets_tools_release_row_real_customize_remove_dialog;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_tools_release_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_tools_release_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_tools_release_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY] = g_param_spec_object ("job", "job", "job", PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY] = g_param_spec_boolean ("action-request-in-progress", "action-request-in-progress", "action-request-in-progress", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY] = g_param_spec_boolean ("row-disposed", "row-disposed", "row-disposed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY, proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY] = g_param_spec_enum ("retry-action", "retry-action", "retry-action", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW_RETRY_ACTION, PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_CHANGELOG_REQUESTED_SIGNAL] = g_signal_new ("changelog-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, 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_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_GAMES_REQUESTED_SIGNAL] = g_signal_new ("games-requested", PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, PROTON_PLUS_SERVICES_TYPE_INSTALL_JOB);
}

static void
proton_plus_widgets_tools_release_row_proton_plus_utils_controller_directional_focus_interface_init (ProtonPlusUtilsControllerDirectionalFocusIface * iface,
                                                                                                     gpointer iface_data)
{
	proton_plus_widgets_tools_release_row_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_release_row_real_controller_focus_direction;
}

static void
proton_plus_widgets_tools_release_row_proton_plus_utils_controller_activation_handler_interface_init (ProtonPlusUtilsControllerActivationHandlerIface * iface,
                                                                                                      gpointer iface_data)
{
	proton_plus_widgets_tools_release_row_proton_plus_utils_controller_activation_handler_parent_iface = g_type_interface_peek_parent (iface);
	iface->controller_activate = (gboolean (*) (ProtonPlusUtilsControllerActivationHandler*, GObject*)) proton_plus_widgets_tools_release_row_real_controller_activate;
}

static void
proton_plus_widgets_tools_release_row_proton_plus_widgets_tools_release_row_job_signal_target_interface_init (ProtonPlusWidgetsToolsReleaseRowJobSignalTargetIface * iface,
                                                                                                              gpointer iface_data)
{
	proton_plus_widgets_tools_release_row_proton_plus_widgets_tools_release_row_job_signal_target_parent_iface = g_type_interface_peek_parent (iface);
	iface->release_row_job_state_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_state_changed;
	iface->release_row_job_step_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_step_changed;
	iface->release_row_job_canceled_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_canceled_changed;
	iface->release_row_job_variant_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_variant_changed;
	iface->release_row_job_release_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_release_changed;
	iface->release_row_job_progress_changed = (void (*) (ProtonPlusWidgetsToolsReleaseRowJobSignalTarget*)) proton_plus_widgets_tools_release_row_real_release_row_job_progress_changed;
}

static void
proton_plus_widgets_tools_release_row_instance_init (ProtonPlusWidgetsToolsReleaseRow * self,
                                                     gpointer klass)
{
	self->priv = proton_plus_widgets_tools_release_row_get_instance_private (self);
	self->priv->_action_request_in_progress = FALSE;
	self->priv->_row_disposed = FALSE;
	self->priv->_retry_action = PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_NONE;
	self->priv->progress_pulse_timeout_id = (guint) 0;
	self->priv->operation_error_message = NULL;
}

static void
proton_plus_widgets_tools_release_row_finalize (GObject * obj)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow);
	_g_object_unref0 (self->priv->_job);
	_g_object_unref0 (self->priv->input_box);
	_g_object_unref0 (self->priv->primary_button);
	_g_object_unref0 (self->priv->primary_content);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->progress_button);
	_g_object_unref0 (self->priv->progress_bar);
	_g_object_unref0 (self->priv->progress_status_label);
	_g_object_unref0 (self->priv->step_label);
	_g_object_unref0 (self->priv->speed_label);
	_g_object_unref0 (self->priv->time_label);
	_g_object_unref0 (self->priv->info_popover);
	_g_object_unref0 (self->priv->actions_button);
	_g_object_unref0 (self->priv->actions_popover);
	_g_object_unref0 (self->priv->action_button_size_group);
	_g_object_unref0 (self->priv->update_action);
	_g_object_unref0 (self->priv->changelog_action);
	_g_object_unref0 (self->priv->games_action);
	_g_object_unref0 (self->priv->open_release_page_action);
	_g_object_unref0 (self->priv->open_folder_action);
	_g_object_unref0 (self->priv->delete_action);
	_g_object_unref0 (self->priv->job_signal_binding);
	_g_free0 (self->priv->operation_error_message);
	G_OBJECT_CLASS (proton_plus_widgets_tools_release_row_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_tools_release_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsToolsReleaseRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_tools_release_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsToolsReleaseRow), 0, (GInstanceInitFunc) proton_plus_widgets_tools_release_row_instance_init, NULL };
	static const GInterfaceInfo proton_plus_utils_controller_directional_focus_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_release_row_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_release_row_proton_plus_utils_controller_activation_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo proton_plus_widgets_tools_release_row_job_signal_target_info = { (GInterfaceInitFunc) proton_plus_widgets_tools_release_row_proton_plus_widgets_tools_release_row_job_signal_target_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_widgets_tools_release_row_type_id;
	proton_plus_widgets_tools_release_row_type_id = g_type_register_static (adw_action_row_get_type (), "ProtonPlusWidgetsToolsReleaseRow", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_widgets_tools_release_row_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_release_row_type_id, PROTON_PLUS_UTILS_TYPE_CONTROLLER_ACTIVATION_HANDLER, &proton_plus_utils_controller_activation_handler_info);
	g_type_add_interface_static (proton_plus_widgets_tools_release_row_type_id, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW_JOB_SIGNAL_TARGET, &proton_plus_widgets_tools_release_row_job_signal_target_info);
	ProtonPlusWidgetsToolsReleaseRow_private_offset = g_type_add_instance_private (proton_plus_widgets_tools_release_row_type_id, sizeof (ProtonPlusWidgetsToolsReleaseRowPrivate));
	return proton_plus_widgets_tools_release_row_type_id;
}

GType
proton_plus_widgets_tools_release_row_get_type (void)
{
	static volatile gsize proton_plus_widgets_tools_release_row_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_tools_release_row_type_id__once)) {
		GType proton_plus_widgets_tools_release_row_type_id;
		proton_plus_widgets_tools_release_row_type_id = proton_plus_widgets_tools_release_row_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_tools_release_row_type_id__once, proton_plus_widgets_tools_release_row_type_id);
	}
	return proton_plus_widgets_tools_release_row_type_id__once;
}

static void
_vala_proton_plus_widgets_tools_release_row_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_tools_release_row_get_job (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_tools_release_row_get_action_request_in_progress (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_tools_release_row_get_row_disposed (self));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_tools_release_row_get_retry_action (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_tools_release_row_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_PROPERTY:
		proton_plus_widgets_tools_release_row_set_job (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ACTION_REQUEST_IN_PROGRESS_PROPERTY:
		proton_plus_widgets_tools_release_row_set_action_request_in_progress (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_ROW_DISPOSED_PROPERTY:
		proton_plus_widgets_tools_release_row_set_row_disposed (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_RETRY_ACTION_PROPERTY:
		proton_plus_widgets_tools_release_row_set_retry_action (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

