/* 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 <gtk/gtk.h>
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <adwaita.h>
#include <gio/gio.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_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_tools_release_row_properties[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block21Data Block21Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_SELECTED_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;
	GtkBox* input_box;
	GtkButton* _update_button;
	GtkButton* _open_button;
	GtkButton* _remove_button;
	GtkButton* _install_button;
	GtkButton* _cancel_button;
	GtkButton* _progress_button;
	ProtonPlusWidgetsCircularProgressBar* _progress_bar;
	GtkLabel* _step_label;
	GtkLabel* _speed_label;
	GtkLabel* _time_label;
	GtkLabel* _usage_pill;
	GtkPopover* _info_popover;
	GtkWidget* controller_up_target;
	guint progress_pulse_timeout_id;
};

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

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 Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void proton_plus_widgets_tools_release_row_set_remove_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                              GtkButton* value);
static GtkButton* proton_plus_widgets_tools_release_row_get_remove_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_remove_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void proton_plus_widgets_tools_release_row_create_install_btn (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_set_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                              GtkButton* value);
static GtkButton* proton_plus_widgets_tools_release_row_get_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void __lambda45_ (Block21Data* _data21_);
static void ___lambda45__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_release_row_set_progress_bar (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             ProtonPlusWidgetsCircularProgressBar* value);
static ProtonPlusWidgetsCircularProgressBar* proton_plus_widgets_tools_release_row_get_progress_bar (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_set_progress_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                GtkButton* value);
static GtkButton* proton_plus_widgets_tools_release_row_get_progress_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void __lambda46_ (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkPopover* proton_plus_widgets_tools_release_row_get_info_popover (ProtonPlusWidgetsToolsReleaseRow* self);
static void ___lambda46__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void proton_plus_widgets_tools_release_row_set_step_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                           GtkLabel* value);
static void proton_plus_widgets_tools_release_row_set_speed_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                            GtkLabel* value);
static void proton_plus_widgets_tools_release_row_set_time_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                           GtkLabel* value);
static GtkLabel* proton_plus_widgets_tools_release_row_get_step_label (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkLabel* proton_plus_widgets_tools_release_row_get_speed_label (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkLabel* proton_plus_widgets_tools_release_row_get_time_label (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_set_info_popover (ProtonPlusWidgetsToolsReleaseRow* self,
                                                             GtkPopover* value);
static void __lambda50_ (Block21Data* _data21_);
static void ___lambda50__adw_action_row_activated (AdwActionRow* _sender,
                                            gpointer self);
static void proton_plus_widgets_tools_release_row_set_update_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                              GtkButton* value);
static GtkButton* proton_plus_widgets_tools_release_row_get_update_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_update_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_update_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                      gpointer self);
static void proton_plus_widgets_tools_release_row_set_open_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                            GtkButton* value);
static GtkButton* proton_plus_widgets_tools_release_row_get_open_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_open_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_open_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                    gpointer self);
static GtkButton* proton_plus_widgets_tools_release_row_get_install_button (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_set_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self,
                                                           GtkLabel* value);
static GtkLabel* proton_plus_widgets_tools_release_row_get_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_job_state_changed (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_job_state_changed_g_object_notify (GObject* _sender,
                                                                               GParamSpec* pspec,
                                                                               gpointer self);
static void proton_plus_widgets_tools_release_row_job_step_changed (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_job_step_changed_g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self);
static void proton_plus_widgets_tools_release_row_job_progress_changed (ProtonPlusWidgetsToolsReleaseRow* self);
static void _proton_plus_widgets_tools_release_row_job_progress_changed_proton_plus_services_install_job_progress_updated (ProtonPlusServicesInstallJob* _sender,
                                                                                                                    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,
                                                               ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_focus_horizontal (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                 GtkWidget* focused,
                                                                 ProtonPlusUtilsControllerNavigationDirection direction);
static ProtonPlusWidgetsToolsReleaseRow* proton_plus_widgets_tools_release_row_find_adjacent_release (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                                               ProtonPlusUtilsControllerNavigationDirection direction);
static gboolean proton_plus_widgets_tools_release_row_focus_next_list_control (ProtonPlusWidgetsToolsReleaseRow* self);
static GtkWidget* proton_plus_widgets_tools_release_row_find_action_ancestor (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                       GtkWidget* focused);
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 GtkWidget* proton_plus_widgets_tools_release_row_find_focusable_action (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                        GtkWidget* current,
                                                                        gboolean forward);
static void proton_plus_widgets_tools_release_row_set_install_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                               GtkButton* value);
static void _proton_plus_widgets_tools_release_row_install_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self);
static void proton_plus_widgets_tools_release_row_real_dispose (GObject* base);
static void proton_plus_widgets_tools_release_row_stop_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self);
static void proton_plus_widgets_tools_release_row_update_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self);
static gboolean ___lambda52_ (ProtonPlusWidgetsToolsReleaseRow* self);
static gboolean ____lambda52__gsource_func (gpointer self);
static void __lambda51_ (ProtonPlusWidgetsToolsReleaseRow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void proton_plus_widgets_tools_release_row_show_error (ProtonPlusWidgetsToolsReleaseRow* self,
                                                       const gchar* title,
                                                       const gchar* description,
                                                       ProtonPlusReturnCode code);
static void ___lambda51__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static gchar* proton_plus_widgets_tools_release_row_format_time (ProtonPlusWidgetsToolsReleaseRow* self,
                                                          gdouble seconds);
static void proton_plus_widgets_tools_release_row_real_install_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self);
static void __lambda44_ (ProtonPlusWidgetsToolsReleaseRow* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda44__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static void proton_plus_widgets_tools_release_row_real_remove_button_clicked (ProtonPlusWidgetsToolsReleaseRow* 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_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 inline gpointer
proton_plus_widgets_tools_release_row_get_instance_private (ProtonPlusWidgetsToolsReleaseRow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsToolsReleaseRow_private_offset);
}

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

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

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

static void
_proton_plus_widgets_tools_release_row_remove_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	proton_plus_widgets_tools_release_row_remove_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
__lambda45_ (Block21Data* _data21_)
{
	ProtonPlusWidgetsToolsReleaseRow* self;
	self = _data21_->self;
	proton_plus_services_install_job_set_canceled (_data21_->job, TRUE);
}

static void
___lambda45__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda45_ (self);
}

static void
__lambda46_ (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkPopover* _tmp0_;
	_tmp0_ = self->priv->_info_popover;
	gtk_popover_popup (_tmp0_);
}

static void
___lambda46__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda46_ ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
__lambda50_ (Block21Data* _data21_)
{
	ProtonPlusWidgetsToolsReleaseRow* self;
	self = _data21_->self;
	g_signal_emit (self, proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_SELECTED_SIGNAL], 0, _data21_->job);
}

static void
___lambda50__adw_action_row_activated (AdwActionRow* _sender,
                                       gpointer self)
{
	__lambda50_ (self);
}

static void
_proton_plus_widgets_tools_release_row_update_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                 gpointer self)
{
	proton_plus_widgets_tools_release_row_update_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
_proton_plus_widgets_tools_release_row_open_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                               gpointer self)
{
	proton_plus_widgets_tools_release_row_open_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
_proton_plus_widgets_tools_release_row_job_state_changed_g_object_notify (GObject* _sender,
                                                                          GParamSpec* pspec,
                                                                          gpointer self)
{
	proton_plus_widgets_tools_release_row_job_state_changed ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
_proton_plus_widgets_tools_release_row_job_step_changed_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self)
{
	proton_plus_widgets_tools_release_row_job_step_changed ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
_proton_plus_widgets_tools_release_row_job_progress_changed_proton_plus_services_install_job_progress_updated (ProtonPlusServicesInstallJob* _sender,
                                                                                                               gpointer self)
{
	proton_plus_widgets_tools_release_row_job_progress_changed ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

ProtonPlusWidgetsToolsReleaseRow*
proton_plus_widgets_tools_release_row_construct (GType object_type,
                                                 ProtonPlusServicesInstallJob* job)
{
	ProtonPlusWidgetsToolsReleaseRow * self = NULL;
	Block21Data* _data21_;
	ProtonPlusServicesInstallJob* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	ProtonPlusModelsRelease* _tmp4_;
	ProtonPlusModelsRelease* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkImage* icon = NULL;
	GtkImage* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	GtkButton* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GtkButton* _tmp17_;
	GtkButton* _tmp18_;
	GtkButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	ProtonPlusWidgetsCircularProgressBar* _tmp24_ = NULL;
	ProtonPlusWidgetsCircularProgressBar* _tmp25_;
	ProtonPlusWidgetsCircularProgressBar* _tmp26_;
	ProtonPlusWidgetsCircularProgressBar* _tmp27_;
	GtkButton* _tmp28_;
	GtkButton* _tmp29_;
	GtkButton* _tmp30_;
	ProtonPlusWidgetsCircularProgressBar* _tmp31_;
	GtkButton* _tmp32_;
	GtkButton* _tmp33_;
	GtkButton* _tmp34_;
	GtkLabel* _tmp35_ = NULL;
	GtkLabel* _tmp36_;
	GtkLabel* _tmp37_ = NULL;
	GtkLabel* _tmp38_;
	GtkLabel* _tmp39_ = NULL;
	GtkLabel* _tmp40_;
	GtkBox* info_box = NULL;
	GtkBox* _tmp41_ = NULL;
	GtkBox* _tmp42_;
	GtkLabel* _tmp43_;
	GtkBox* _tmp44_;
	GtkLabel* _tmp45_;
	GtkBox* _tmp46_;
	GtkLabel* _tmp47_;
	GtkPopover* _tmp48_;
	GtkPopover* _tmp49_;
	GtkPopover* _tmp50_;
	GtkButton* _tmp51_;
	GtkPopover* _tmp52_;
	GtkPopover* _tmp53_;
	GtkBox* _tmp54_;
	GtkPopover* _tmp55_;
	GtkButton* _tmp56_;
	GtkBox* _tmp57_ = NULL;
	GtkBox* _tmp58_;
	GtkBox* _tmp59_;
	gboolean _tmp60_ = FALSE;
	ProtonPlusServicesInstallJobMode _tmp61_;
	ProtonPlusServicesInstallJobMode _tmp62_;
	GtkButton* _tmp86_;
	GtkButton* _tmp87_;
	GtkButton* _tmp88_;
	GtkButton* _tmp89_;
	GtkButton* _tmp90_;
	GtkBox* _tmp91_;
	GtkButton* _tmp92_;
	GtkBox* _tmp93_;
	GtkButton* _tmp94_;
	GtkBox* _tmp95_;
	GtkButton* _tmp96_;
	GtkBox* _tmp97_;
	GtkButton* _tmp98_;
	GtkBox* _tmp99_;
	GtkButton* _tmp100_;
	GtkLabel* _tmp101_ = NULL;
	GtkLabel* _tmp102_;
	GtkLabel* _tmp103_;
	GtkLabel* _tmp104_;
	GtkImage* _tmp105_;
	GtkBox* _tmp106_;
	g_return_val_if_fail (job != NULL, NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (job);
	_g_object_unref0 (_data21_->job);
	_data21_->job = _tmp0_;
	_tmp1_ = proton_plus_services_install_job_get_title (_data21_->job);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_services_install_job_get_release (_data21_->job);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_release_get_release_date (_tmp5_);
	_tmp7_ = _tmp6_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) g_object_new (object_type, "title", _tmp3_, "subtitle", _tmp7_, "activatable", TRUE, NULL);
	_data21_->self = g_object_ref (self);
	_g_free0 (_tmp3_);
	proton_plus_widgets_tools_release_row_set_job (self, _data21_->job);
	_tmp8_ = (GtkImage*) gtk_image_new_from_icon_name ("box-open-symbolic");
	g_object_ref_sink (_tmp8_);
	icon = _tmp8_;
	_tmp9_ = (GtkButton*) gtk_button_new_from_icon_name ("trash-symbolic");
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	proton_plus_widgets_tools_release_row_set_remove_button (self, _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = self->priv->_remove_button;
	_tmp12_ = proton_plus_services_install_job_get_title (_data21_->job);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup_printf (_ ("Delete %s"), _tmp14_);
	_tmp16_ = _tmp15_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, _tmp16_);
	_g_free0 (_tmp16_);
	_g_free0 (_tmp14_);
	_tmp17_ = self->priv->_remove_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp17_, "flat");
	_tmp18_ = self->priv->_remove_button;
	g_signal_connect_object (_tmp18_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_remove_button_clicked_gtk_button_clicked, self, 0);
	proton_plus_widgets_tools_release_row_create_install_btn (self);
	_tmp19_ = (GtkButton*) gtk_button_new_from_icon_name ("circle-xmark-symbolic");
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	proton_plus_widgets_tools_release_row_set_cancel_button (self, _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = self->priv->_cancel_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp21_, _ ("Cancel installation"));
	_tmp22_ = self->priv->_cancel_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp22_, "flat");
	_tmp23_ = self->priv->_cancel_button;
	g_signal_connect_data (_tmp23_, "clicked", (GCallback) ___lambda45__gtk_button_clicked, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	_tmp24_ = proton_plus_widgets_circular_progress_bar_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp24_, GTK_ALIGN_CENTER);
	proton_plus_widgets_circular_progress_bar_set_show_text (_tmp24_, TRUE);
	g_object_ref_sink (_tmp24_);
	_tmp25_ = _tmp24_;
	proton_plus_widgets_tools_release_row_set_progress_bar (self, _tmp25_);
	_g_object_unref0 (_tmp25_);
	_tmp26_ = self->priv->_progress_bar;
	gtk_widget_set_size_request ((GtkWidget*) _tmp26_, 24, 24);
	_tmp27_ = self->priv->_progress_bar;
	proton_plus_widgets_circular_progress_bar_set_line_width (_tmp27_, 2);
	_tmp28_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp28_);
	_tmp29_ = _tmp28_;
	proton_plus_widgets_tools_release_row_set_progress_button (self, _tmp29_);
	_g_object_unref0 (_tmp29_);
	_tmp30_ = self->priv->_progress_button;
	_tmp31_ = self->priv->_progress_bar;
	gtk_button_set_child (_tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = self->priv->_progress_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp32_, "flat");
	_tmp33_ = self->priv->_progress_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp33_, _ ("Show installation details"));
	_tmp34_ = self->priv->_progress_button;
	g_signal_connect_object (_tmp34_, "clicked", (GCallback) ___lambda46__gtk_button_clicked, self, 0);
	_tmp35_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_halign ((GtkWidget*) _tmp35_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp35_);
	_tmp36_ = _tmp35_;
	proton_plus_widgets_tools_release_row_set_step_label (self, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = (GtkLabel*) gtk_label_new (_ ("Speed: 0 KB/s"));
	gtk_widget_set_halign ((GtkWidget*) _tmp37_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp37_);
	_tmp38_ = _tmp37_;
	proton_plus_widgets_tools_release_row_set_speed_label (self, _tmp38_);
	_g_object_unref0 (_tmp38_);
	_tmp39_ = (GtkLabel*) gtk_label_new (_ ("Remaining time: --"));
	gtk_widget_set_halign ((GtkWidget*) _tmp39_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp39_);
	_tmp40_ = _tmp39_;
	proton_plus_widgets_tools_release_row_set_time_label (self, _tmp40_);
	_g_object_unref0 (_tmp40_);
	_tmp41_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp41_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp41_, 12);
	g_object_ref_sink (_tmp41_);
	info_box = _tmp41_;
	_tmp42_ = info_box;
	_tmp43_ = self->priv->_step_label;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = info_box;
	_tmp45_ = self->priv->_speed_label;
	gtk_box_append (_tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = info_box;
	_tmp47_ = self->priv->_time_label;
	gtk_box_append (_tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp48_);
	_tmp49_ = _tmp48_;
	proton_plus_widgets_tools_release_row_set_info_popover (self, _tmp49_);
	_g_object_unref0 (_tmp49_);
	_tmp50_ = self->priv->_info_popover;
	_tmp51_ = self->priv->_progress_button;
	gtk_widget_set_parent ((GtkWidget*) _tmp50_, (GtkWidget*) _tmp51_);
	_tmp52_ = self->priv->_info_popover;
	gtk_popover_set_autohide (_tmp52_, TRUE);
	_tmp53_ = self->priv->_info_popover;
	_tmp54_ = info_box;
	gtk_popover_set_child (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = self->priv->_info_popover;
	_tmp56_ = self->priv->_progress_button;
	proton_plus_widgets_window_register_popover_for_controller (_tmp55_, (GtkWidget*) _tmp56_, NULL);
	g_signal_connect_data ((AdwActionRow*) self, "activated", (GCallback) ___lambda50__adw_action_row_activated, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	_tmp57_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp57_, 12);
	gtk_widget_set_valign ((GtkWidget*) _tmp57_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp57_);
	_g_object_unref0 (self->priv->input_box);
	self->priv->input_box = _tmp57_;
	_tmp58_ = self->priv->input_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp58_, "linked");
	_tmp59_ = self->priv->input_box;
	gtk_widget_add_css_class ((GtkWidget*) _tmp59_, "tools-release-row-input-box");
	_tmp61_ = proton_plus_services_install_job_get_mode (_data21_->job);
	_tmp62_ = _tmp61_;
	if (_tmp62_ == PROTON_PLUS_SERVICES_INSTALL_JOB_MODE_LATEST) {
		_tmp60_ = TRUE;
	} else {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp63_;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp64_;
		_tmp63_ = proton_plus_services_install_job_get_steam_tinker_launch_context (_data21_->job);
		_tmp64_ = _tmp63_;
		_tmp60_ = _tmp64_ != NULL;
	}
	if (_tmp60_) {
		GtkButton* _tmp65_;
		GtkButton* _tmp66_;
		GtkButton* _tmp67_;
		GtkButton* _tmp68_;
		GtkButton* _tmp69_;
		GtkBox* _tmp70_;
		GtkButton* _tmp71_;
		GtkBox* info_pill = NULL;
		GtkBox* _tmp72_ = NULL;
		GtkBox* _tmp73_;
		GtkImage* _tmp74_;
		GtkImage* _tmp75_;
		GtkBox* _tmp76_;
		ProtonPlusModelsTool* _tmp77_;
		ProtonPlusModelsTool* _tmp78_;
		gchar* _tmp79_;
		gchar* _tmp80_;
		gchar* _tmp81_;
		gchar* _tmp82_;
		gchar* _tmp83_;
		GtkBox* _tmp84_;
		GtkBox* _tmp85_;
		_tmp65_ = (GtkButton*) gtk_button_new_from_icon_name ("update-check-symbolic");
		g_object_ref_sink (_tmp65_);
		_tmp66_ = _tmp65_;
		proton_plus_widgets_tools_release_row_set_update_button (self, _tmp66_);
		_g_object_unref0 (_tmp66_);
		_tmp67_ = self->priv->_update_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp67_, "flat");
		_tmp68_ = self->priv->_update_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp68_, _ ("Update the runner if a newer version is available"));
		_tmp69_ = self->priv->_update_button;
		g_signal_connect_object (_tmp69_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_update_button_clicked_gtk_button_clicked, self, 0);
		_tmp70_ = self->priv->input_box;
		_tmp71_ = self->priv->_update_button;
		gtk_box_append (_tmp70_, (GtkWidget*) _tmp71_);
		_tmp72_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
		gtk_widget_set_valign ((GtkWidget*) _tmp72_, GTK_ALIGN_CENTER);
		gtk_widget_set_margin_end ((GtkWidget*) _tmp72_, 6);
		g_object_ref_sink (_tmp72_);
		info_pill = _tmp72_;
		_tmp73_ = info_pill;
		_tmp74_ = (GtkImage*) gtk_image_new_from_icon_name ("info-2-symbolic");
		g_object_ref_sink (_tmp74_);
		_tmp75_ = _tmp74_;
		gtk_box_append (_tmp73_, (GtkWidget*) _tmp75_);
		_g_object_unref0 (_tmp75_);
		_tmp76_ = info_pill;
		_tmp77_ = proton_plus_services_install_job_get_tool (_data21_->job);
		_tmp78_ = _tmp77_;
		_tmp79_ = proton_plus_models_tool_get_last_version (_tmp78_);
		_tmp80_ = _tmp79_;
		_tmp81_ = _tmp80_;
		_tmp82_ = g_strdup_printf (_ ("Version: %s\n" \
"This is a rolling release.\n" \
"It will always be updated to the latest available version when automat" \
"ic updates is activated."), _tmp81_);
		_tmp83_ = _tmp82_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp76_, _tmp83_);
		_g_free0 (_tmp83_);
		_g_free0 (_tmp81_);
		_tmp84_ = info_pill;
		gtk_widget_add_css_class ((GtkWidget*) _tmp84_, "info-pill");
		_tmp85_ = info_pill;
		adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp85_);
		_g_object_unref0 (info_pill);
	}
	_tmp86_ = (GtkButton*) gtk_button_new_from_icon_name ("folder-open-2-symbolic");
	g_object_ref_sink (_tmp86_);
	_tmp87_ = _tmp86_;
	proton_plus_widgets_tools_release_row_set_open_button (self, _tmp87_);
	_g_object_unref0 (_tmp87_);
	_tmp88_ = self->priv->_open_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp88_, _ ("Open tool directory"));
	_tmp89_ = self->priv->_open_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp89_, "flat");
	_tmp90_ = self->priv->_open_button;
	g_signal_connect_object (_tmp90_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_open_button_clicked_gtk_button_clicked, self, 0);
	_tmp91_ = self->priv->input_box;
	_tmp92_ = self->priv->_open_button;
	gtk_box_append (_tmp91_, (GtkWidget*) _tmp92_);
	_tmp93_ = self->priv->input_box;
	_tmp94_ = self->priv->_remove_button;
	gtk_box_append (_tmp93_, (GtkWidget*) _tmp94_);
	_tmp95_ = self->priv->input_box;
	_tmp96_ = self->priv->_install_button;
	gtk_box_append (_tmp95_, (GtkWidget*) _tmp96_);
	_tmp97_ = self->priv->input_box;
	_tmp98_ = self->priv->_progress_button;
	gtk_box_append (_tmp97_, (GtkWidget*) _tmp98_);
	_tmp99_ = self->priv->input_box;
	_tmp100_ = self->priv->_cancel_button;
	gtk_box_append (_tmp99_, (GtkWidget*) _tmp100_);
	_tmp101_ = (GtkLabel*) gtk_label_new ("");
	gtk_widget_set_valign ((GtkWidget*) _tmp101_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp101_, 6);
	g_object_ref_sink (_tmp101_);
	_tmp102_ = _tmp101_;
	proton_plus_widgets_tools_release_row_set_usage_pill (self, _tmp102_);
	_g_object_unref0 (_tmp102_);
	_tmp103_ = self->priv->_usage_pill;
	gtk_widget_add_css_class ((GtkWidget*) _tmp103_, "usage-pill");
	_tmp104_ = self->priv->_usage_pill;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp104_);
	proton_plus_widgets_tools_release_row_refresh_usage_pill (self);
	_tmp105_ = icon;
	adw_action_row_add_prefix ((AdwActionRow*) self, (GtkWidget*) _tmp105_);
	_tmp106_ = self->priv->input_box;
	adw_action_row_add_suffix ((AdwActionRow*) self, (GtkWidget*) _tmp106_);
	g_signal_connect_object ((GObject*) _data21_->job, "notify::state", (GCallback) _proton_plus_widgets_tools_release_row_job_state_changed_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) _data21_->job, "notify::step", (GCallback) _proton_plus_widgets_tools_release_row_job_step_changed_g_object_notify, self, 0);
	g_signal_connect_object (_data21_->job, "progress-updated", (GCallback) _proton_plus_widgets_tools_release_row_job_progress_changed_proton_plus_services_install_job_progress_updated, self, 0);
	g_object_notify ((GObject*) _data21_->job, "step");
	g_object_notify ((GObject*) _data21_->job, "state");
	_g_object_unref0 (info_box);
	_g_object_unref0 (icon);
	block21_data_unref (_data21_);
	_data21_ = NULL;
	return self;
}

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

void
proton_plus_widgets_tools_release_row_set_controller_up_target (ProtonPlusWidgetsToolsReleaseRow* self,
                                                                GtkWidget* target)
{
	g_return_if_fail (self != NULL);
	self->priv->controller_up_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 _tmp3_ = 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_) {
		result = proton_plus_widgets_tools_release_row_focus_vertical (self, direction);
		_g_object_unref0 (focused);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_LEFT) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_RIGHT;
	}
	if (_tmp3_) {
		GtkWidget* _tmp4_;
		_tmp4_ = focused;
		result = proton_plus_widgets_tools_release_row_focus_horizontal (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, 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_focus_vertical (ProtonPlusWidgetsToolsReleaseRow* self,
                                                      ProtonPlusUtilsControllerNavigationDirection direction)
{
	ProtonPlusWidgetsToolsReleaseRow* adjacent = NULL;
	ProtonPlusWidgetsToolsReleaseRow* _tmp0_;
	ProtonPlusWidgetsToolsReleaseRow* _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_tools_release_row_find_adjacent_release (self, direction);
	adjacent = _tmp0_;
	_tmp1_ = adjacent;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsToolsReleaseRow* _tmp2_;
		_tmp2_ = adjacent;
		result = gtk_widget_grab_focus ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_WIDGETS_TOOLS_TYPE_RELEASE_ROW, ProtonPlusWidgetsToolsReleaseRow));
		_g_object_unref0 (adjacent);
		return result;
	}
	if (direction == PROTON_PLUS_UTILS_CONTROLLER_NAVIGATION_DIRECTION_UP) {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		gboolean _tmp6_ = FALSE;
		GtkWidget* _tmp7_;
		_tmp7_ = self->priv->controller_up_target;
		if (_tmp7_ != NULL) {
			GtkWidget* _tmp8_;
			_tmp8_ = self->priv->controller_up_target;
			_tmp6_ = gtk_widget_get_mapped (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
		} else {
			_tmp6_ = FALSE;
		}
		if (_tmp6_) {
			GtkWidget* _tmp9_;
			_tmp9_ = self->priv->controller_up_target;
			_tmp5_ = gtk_widget_is_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget));
		} else {
			_tmp5_ = FALSE;
		}
		if (_tmp5_) {
			GtkWidget* _tmp10_;
			_tmp10_ = self->priv->controller_up_target;
			_tmp4_ = gtk_widget_is_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget));
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			GtkWidget* _tmp11_;
			_tmp11_ = self->priv->controller_up_target;
			_tmp3_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget));
		} else {
			_tmp3_ = FALSE;
		}
		result = _tmp3_;
		_g_object_unref0 (adjacent);
		return result;
	}
	result = proton_plus_widgets_tools_release_row_focus_next_list_control (self);
	_g_object_unref0 (adjacent);
	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 = gtk_widget_grab_focus ((GtkWidget*) self);
	_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) {
			GtkWidget* previous = NULL;
			GtkWidget* _tmp4_;
			GtkWidget* _tmp5_;
			gboolean _tmp6_ = FALSE;
			GtkWidget* _tmp7_;
			_tmp4_ = action;
			_tmp5_ = proton_plus_widgets_tools_release_row_find_focusable_action (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_widget_get_type (), GtkWidget), FALSE);
			previous = _tmp5_;
			_tmp7_ = previous;
			if (_tmp7_ != NULL) {
				GtkWidget* _tmp8_;
				_tmp8_ = previous;
				_tmp6_ = gtk_widget_grab_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget));
			} else {
				_tmp6_ = gtk_widget_grab_focus ((GtkWidget*) self);
			}
			result = _tmp6_;
			_g_object_unref0 (previous);
			_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_focusable (_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_install_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self)
{
	proton_plus_widgets_tools_release_row_install_button_clicked ((ProtonPlusWidgetsToolsReleaseRow*) self);
}

static void
proton_plus_widgets_tools_release_row_create_install_btn (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	ProtonPlusServicesInstallJob* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkButton* _tmp9_;
	GtkButton* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkButton*) gtk_button_new_from_icon_name ("download-2-symbolic");
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_tools_release_row_set_install_button (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_install_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->_install_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp9_, "flat");
	_tmp10_ = self->priv->_install_button;
	g_signal_connect_object (_tmp10_, "clicked", (GCallback) _proton_plus_widgets_tools_release_row_install_button_clicked_gtk_button_clicked, self, 0);
}

static void
proton_plus_widgets_tools_release_row_real_dispose (GObject* base)
{
	ProtonPlusWidgetsToolsReleaseRow * self;
	GtkPopover* _tmp0_;
	self = (ProtonPlusWidgetsToolsReleaseRow*) base;
	proton_plus_widgets_tools_release_row_stop_progress_pulse (self);
	_tmp0_ = self->priv->_info_popover;
	gtk_widget_unparent ((GtkWidget*) _tmp0_);
	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_job_state_changed (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobState _tmp2_;
	ProtonPlusServicesInstallJobState _tmp3_;
	gboolean installed = FALSE;
	gboolean _tmp7_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp8_;
	ProtonPlusServicesInstallJobState _tmp9_;
	ProtonPlusServicesInstallJobState _tmp10_;
	gboolean downloading = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean busy = FALSE;
	gboolean _tmp18_ = FALSE;
	GtkButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_ = NULL;
	GtkButton* _tmp24_;
	GtkButton* _tmp25_;
	GtkButton* _tmp26_;
	GtkButton* _tmp27_;
	GtkButton* _tmp28_ = NULL;
	GtkButton* _tmp29_;
	GtkButton* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_state (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp4_;
		ProtonPlusServicesInstallJobState _tmp5_;
		ProtonPlusServicesInstallJobState _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_state (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE;
	}
	installed = _tmp0_;
	_tmp8_ = self->priv->_job;
	_tmp9_ = proton_plus_services_install_job_get_state (_tmp8_);
	_tmp10_ = _tmp9_;
	if (_tmp10_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		_tmp7_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp11_;
		ProtonPlusServicesInstallJobState _tmp12_;
		ProtonPlusServicesInstallJobState _tmp13_;
		_tmp11_ = self->priv->_job;
		_tmp12_ = proton_plus_services_install_job_get_state (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp7_ = _tmp13_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	}
	downloading = _tmp7_;
	if (downloading) {
		_tmp14_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp15_;
		ProtonPlusServicesInstallJobState _tmp16_;
		ProtonPlusServicesInstallJobState _tmp17_;
		_tmp15_ = self->priv->_job;
		_tmp16_ = proton_plus_services_install_job_get_state (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp14_ = _tmp17_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_REMOVING;
	}
	busy = _tmp14_;
	if (!installed) {
		_tmp18_ = !downloading;
	} else {
		_tmp18_ = FALSE;
	}
	_tmp19_ = self->priv->_install_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp19_, _tmp18_);
	_tmp20_ = self->priv->_progress_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp20_, downloading);
	_tmp21_ = self->priv->_cancel_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp21_, downloading);
	_tmp22_ = self->priv->_remove_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp22_, installed);
	_tmp24_ = self->priv->_update_button;
	_tmp23_ = _tmp24_;
	if (_tmp23_ != NULL) {
		gtk_widget_set_visible ((GtkWidget*) _tmp23_, installed);
	}
	_tmp25_ = self->priv->_open_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp25_, installed);
	_tmp26_ = self->priv->_install_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp26_, !busy);
	_tmp27_ = self->priv->_remove_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp27_, !busy);
	_tmp29_ = self->priv->_update_button;
	_tmp28_ = _tmp29_;
	if (_tmp28_ != NULL) {
		gtk_widget_set_sensitive ((GtkWidget*) _tmp28_, !busy);
	}
	_tmp30_ = self->priv->_open_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp30_, !busy);
	proton_plus_widgets_tools_release_row_update_progress_pulse (self);
}

static void
proton_plus_widgets_tools_release_row_job_step_changed (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsCircularProgressBar* _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobStep _tmp2_;
	ProtonPlusServicesInstallJobStep _tmp3_;
	GtkLabel* _tmp4_;
	ProtonPlusServicesInstallJob* _tmp5_;
	ProtonPlusServicesInstallJobStep _tmp6_;
	ProtonPlusServicesInstallJobStep _tmp7_;
	GtkLabel* _tmp8_;
	ProtonPlusServicesInstallJob* _tmp9_;
	ProtonPlusServicesInstallJobStep _tmp10_;
	ProtonPlusServicesInstallJobStep _tmp11_;
	gchar* text = NULL;
	gchar* _tmp12_;
	ProtonPlusServicesInstallJob* _tmp13_;
	ProtonPlusServicesInstallJobStep _tmp14_;
	ProtonPlusServicesInstallJobStep _tmp15_;
	GtkLabel* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_progress_bar;
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_step (_tmp1_);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_circular_progress_bar_set_show_text (_tmp0_, _tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING);
	_tmp4_ = self->priv->_speed_label;
	_tmp5_ = self->priv->_job;
	_tmp6_ = proton_plus_services_install_job_get_step (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, _tmp7_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING);
	_tmp8_ = self->priv->_time_label;
	_tmp9_ = self->priv->_job;
	_tmp10_ = proton_plus_services_install_job_get_step (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_widget_set_visible ((GtkWidget*) _tmp8_, _tmp11_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING);
	proton_plus_widgets_tools_release_row_update_progress_pulse (self);
	_tmp12_ = g_strdup (_ ("Nothing"));
	text = _tmp12_;
	_tmp13_ = self->priv->_job;
	_tmp14_ = proton_plus_services_install_job_get_step (_tmp13_);
	_tmp15_ = _tmp14_;
	switch (_tmp15_) {
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_DOWNLOADING:
		{
			gchar* _tmp16_;
			_tmp16_ = g_strdup (_ ("Downloading"));
			_g_free0 (text);
			text = _tmp16_;
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING:
		{
			gchar* _tmp17_;
			_tmp17_ = g_strdup (_ ("Extracting"));
			_g_free0 (text);
			text = _tmp17_;
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING:
		{
			gchar* _tmp18_;
			_tmp18_ = g_strdup (_ ("Moving"));
			_g_free0 (text);
			text = _tmp18_;
			break;
		}
		case PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_REMOVING:
		{
			gchar* _tmp19_;
			_tmp19_ = g_strdup (_ ("Removing"));
			_g_free0 (text);
			text = _tmp19_;
			break;
		}
		default:
		{
			break;
		}
	}
	_tmp20_ = self->priv->_step_label;
	_tmp21_ = text;
	_tmp22_ = g_strdup_printf (_ ("Step: %s"), _tmp21_);
	_tmp23_ = _tmp22_;
	gtk_label_set_label (_tmp20_, _tmp23_);
	_g_free0 (_tmp23_);
	_g_free0 (text);
}

static gboolean
___lambda52_ (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsCircularProgressBar* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_progress_bar;
	proton_plus_widgets_circular_progress_bar_pulse (_tmp0_, 0.01);
	result = G_SOURCE_CONTINUE;
	return result;
}

static gboolean
____lambda52__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda52_ ((ProtonPlusWidgetsToolsReleaseRow*) self);
	return result;
}

static void
proton_plus_widgets_tools_release_row_update_progress_pulse (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallJobState _tmp2_;
	ProtonPlusServicesInstallJobState _tmp3_;
	gboolean installing = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean needs_pulse = FALSE;
	gboolean _tmp15_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_state (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_INSTALLING) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusServicesInstallJob* _tmp4_;
		ProtonPlusServicesInstallJobState _tmp5_;
		ProtonPlusServicesInstallJobState _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_state (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING;
	}
	installing = _tmp0_;
	if (installing) {
		gboolean _tmp8_ = FALSE;
		ProtonPlusServicesInstallJob* _tmp9_;
		ProtonPlusServicesInstallJobStep _tmp10_;
		ProtonPlusServicesInstallJobStep _tmp11_;
		_tmp9_ = self->priv->_job;
		_tmp10_ = proton_plus_services_install_job_get_step (_tmp9_);
		_tmp11_ = _tmp10_;
		if (_tmp11_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING) {
			_tmp8_ = TRUE;
		} else {
			ProtonPlusServicesInstallJob* _tmp12_;
			ProtonPlusServicesInstallJobStep _tmp13_;
			ProtonPlusServicesInstallJobStep _tmp14_;
			_tmp12_ = self->priv->_job;
			_tmp13_ = proton_plus_services_install_job_get_step (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp8_ = _tmp14_ == PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING;
		}
		_tmp7_ = _tmp8_;
	} else {
		_tmp7_ = FALSE;
	}
	needs_pulse = _tmp7_;
	if (needs_pulse) {
		_tmp15_ = self->priv->progress_pulse_timeout_id == ((guint) 0);
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		ProtonPlusWidgetsCircularProgressBar* _tmp16_;
		_tmp16_ = self->priv->_progress_bar;
		proton_plus_widgets_circular_progress_bar_pulse (_tmp16_, 0.01);
		self->priv->progress_pulse_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 16, ____lambda52__gsource_func, g_object_ref (self), g_object_unref);
	} else {
		if (!needs_pulse) {
			proton_plus_widgets_tools_release_row_stop_progress_pulse (self);
		}
	}
}

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)) {
		g_source_remove (self->priv->progress_pulse_timeout_id);
		self->priv->progress_pulse_timeout_id = (guint) 0;
	}
}

static void
__lambda51_ (ProtonPlusWidgetsToolsReleaseRow* self,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusReturnCode code = 0;
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_job;
	code = proton_plus_services_install_job_update_finish (_tmp0_, res);
	if (code == PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED) {
		ProtonPlusUtilsDownloadManager* _tmp1_;
		ProtonPlusUtilsDownloadManager* _tmp2_;
		ProtonPlusServicesInstallJob* _tmp3_;
		_tmp1_ = proton_plus_utils_download_manager_get_instance ();
		_tmp2_ = _tmp1_;
		_tmp3_ = self->priv->_job;
		g_signal_emit_by_name (_tmp2_, "tool-updated", _tmp3_, TRUE);
	} else {
		if (code == PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE) {
			ProtonPlusUtilsDownloadManager* _tmp4_;
			ProtonPlusUtilsDownloadManager* _tmp5_;
			ProtonPlusServicesInstallJob* _tmp6_;
			_tmp4_ = proton_plus_utils_download_manager_get_instance ();
			_tmp5_ = _tmp4_;
			_tmp6_ = self->priv->_job;
			g_signal_emit_by_name (_tmp5_, "tool-updated", _tmp6_, FALSE);
		} else {
			ProtonPlusServicesInstallJob* _tmp7_;
			gboolean _tmp8_;
			gboolean _tmp9_;
			_tmp7_ = self->priv->_job;
			_tmp8_ = proton_plus_services_install_job_get_canceled (_tmp7_);
			_tmp9_ = _tmp8_;
			if (!_tmp9_) {
				ProtonPlusServicesInstallJob* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp10_ = self->priv->_job;
				_tmp11_ = proton_plus_services_install_job_get_title (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = g_strdup_printf (_ ("Failed to Update %s"), _tmp13_);
				_tmp15_ = _tmp14_;
				proton_plus_widgets_tools_release_row_show_error (self, _tmp15_, _ ("An error occurred while attempting to update the compatibility tool."), code);
				_g_free0 (_tmp15_);
				_g_free0 (_tmp13_);
			}
		}
	}
}

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

static void
proton_plus_widgets_tools_release_row_update_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_job;
	proton_plus_services_install_job_update (_tmp0_, ___lambda51__gasync_ready_callback, g_object_ref (self));
}

static void
proton_plus_widgets_tools_release_row_open_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_job;
	_tmp1_ = proton_plus_services_install_job_get_install_location (_tmp0_);
	_tmp2_ = _tmp1_;
	proton_plus_utils_system_open_path (_tmp2_);
}

void
proton_plus_widgets_tools_release_row_refresh_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gint count = 0;
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusModelsTool* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsGroup* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsLauncher* _tmp5_;
	ProtonPlusModelsLauncher* _tmp6_;
	ProtonPlusServicesInstallJob* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gint _tmp10_;
	g_return_if_fail (self != NULL);
	_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_);
	count = _tmp10_;
	if (count > 0) {
		GtkLabel* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		GtkLabel* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		GtkLabel* _tmp17_;
		_tmp11_ = self->priv->_usage_pill;
		_tmp12_ = g_strdup_printf ("%i", count);
		_tmp13_ = _tmp12_;
		gtk_label_set_label (_tmp11_, _tmp13_);
		_g_free0 (_tmp13_);
		_tmp14_ = self->priv->_usage_pill;
		_tmp15_ = g_strdup_printf (ngettext ("Used by %i game", "Used by %i games", (gulong) count), count);
		_tmp16_ = _tmp15_;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp14_, _tmp16_);
		_g_free0 (_tmp16_);
		_tmp17_ = self->priv->_usage_pill;
		gtk_widget_set_visible ((GtkWidget*) _tmp17_, TRUE);
	} else {
		GtkLabel* _tmp18_;
		_tmp18_ = self->priv->_usage_pill;
		gtk_widget_set_visible ((GtkWidget*) _tmp18_, FALSE);
	}
}

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_job_progress_changed (ProtonPlusWidgetsToolsReleaseRow* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusServicesInstallJob* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkLabel* _tmp14_;
	ProtonPlusServicesInstallJob* _tmp15_;
	gdouble _tmp16_;
	gdouble _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_ = NULL;
	ProtonPlusServicesInstallJob* _tmp23_;
	gdouble _tmp24_;
	gdouble _tmp25_;
	GtkLabel* _tmp33_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_is_percent (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		ProtonPlusServicesInstallJob* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = self->priv->_job;
		_tmp5_ = proton_plus_services_install_job_get_progress (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ProtonPlusWidgetsCircularProgressBar* _tmp7_;
		ProtonPlusServicesInstallJob* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		_tmp7_ = self->priv->_progress_bar;
		_tmp8_ = self->priv->_job;
		_tmp9_ = proton_plus_services_install_job_get_progress (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = string_replace (_tmp10_, "%", "");
		_tmp12_ = _tmp11_;
		proton_plus_widgets_circular_progress_bar_set_fraction (_tmp7_, double_parse (_tmp12_) / 100.0);
		_g_free0 (_tmp12_);
	} else {
		ProtonPlusWidgetsCircularProgressBar* _tmp13_;
		_tmp13_ = self->priv->_progress_bar;
		proton_plus_widgets_circular_progress_bar_pulse (_tmp13_, 0.05);
	}
	_tmp14_ = self->priv->_speed_label;
	_tmp15_ = self->priv->_job;
	_tmp16_ = proton_plus_services_install_job_get_speed_kbps (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = proton_plus_utils_filesystem_convert_bytes_to_string ((gint64) (_tmp17_ * 1024));
	_tmp19_ = _tmp18_;
	_tmp20_ = g_strdup_printf (_ ("Speed: %s/s"), _tmp19_);
	_tmp21_ = _tmp20_;
	gtk_label_set_label (_tmp14_, _tmp21_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_tmp23_ = self->priv->_job;
	_tmp24_ = proton_plus_services_install_job_get_seconds_remaining (_tmp23_);
	_tmp25_ = _tmp24_;
	if (_tmp25_ >= ((gdouble) 0)) {
		ProtonPlusServicesInstallJob* _tmp26_;
		gdouble _tmp27_;
		gdouble _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp26_ = self->priv->_job;
		_tmp27_ = proton_plus_services_install_job_get_seconds_remaining (_tmp26_);
		_tmp28_ = _tmp27_;
		_tmp29_ = proton_plus_widgets_tools_release_row_format_time (self, _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_strdup_printf (_ ("Remaining time: %s"), _tmp30_);
		_g_free0 (_tmp22_);
		_tmp22_ = _tmp31_;
		_g_free0 (_tmp30_);
	} else {
		gchar* _tmp32_;
		_tmp32_ = g_strdup (_ ("Remaining time: --"));
		_g_free0 (_tmp22_);
		_tmp22_ = _tmp32_;
	}
	_tmp33_ = self->priv->_time_label;
	gtk_label_set_label (_tmp33_, _tmp22_);
	_g_free0 (_tmp22_);
}

static gchar*
proton_plus_widgets_tools_release_row_format_time (ProtonPlusWidgetsToolsReleaseRow* self,
                                                   gdouble seconds)
{
	gint total = 0;
	gint h = 0;
	gint m = 0;
	gint s = 0;
	gchar* _tmp0_ = NULL;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	total = (gint) seconds;
	h = total / 3600;
	m = (total % 3600) / 60;
	s = total % 60;
	if (h > 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup_printf (_ ("%dh %dm %ds"), h, m, s);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_ = NULL;
		gchar* _tmp5_;
		if (m > 0) {
			gchar* _tmp3_;
			_tmp3_ = g_strdup_printf (_ ("%dm %ds"), m, s);
			_g_free0 (_tmp2_);
			_tmp2_ = _tmp3_;
		} else {
			gchar* _tmp4_;
			_tmp4_ = g_strdup_printf (_ ("%ds"), s);
			_g_free0 (_tmp2_);
			_tmp2_ = _tmp4_;
		}
		_tmp5_ = _tmp2_;
		_tmp2_ = NULL;
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp5_;
		_g_free0 (_tmp2_);
	}
	_tmp6_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp6_;
	_g_free0 (_tmp0_);
	return result;
}

static void
__lambda44_ (ProtonPlusWidgetsToolsReleaseRow* self,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusReturnCode code = 0;
	ProtonPlusServicesInstallJob* _tmp0_;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->_job;
	code = proton_plus_services_install_job_install_finish (_tmp0_, res);
	if (code != PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED) {
		ProtonPlusServicesInstallJob* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->_job;
		_tmp3_ = proton_plus_services_install_job_get_canceled (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp1_ = !_tmp4_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ProtonPlusServicesInstallJob* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp5_ = self->priv->_job;
		_tmp6_ = proton_plus_services_install_job_get_title (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup_printf (_ ("ProtonPlus could not install %s on your system."), _tmp8_);
		_tmp10_ = _tmp9_;
		proton_plus_widgets_tools_release_row_show_error (self, _ ("Installation Failed"), _tmp10_, code);
		_g_free0 (_tmp10_);
		_g_free0 (_tmp8_);
	}
}

static void
___lambda44__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda44_ ((ProtonPlusWidgetsToolsReleaseRow*) self, source_object, res);
	g_object_unref (self);
}

static void
proton_plus_widgets_tools_release_row_real_install_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusServicesInstallJob* _tmp0_;
	_tmp0_ = self->priv->_job;
	proton_plus_services_install_job_install (_tmp0_, ___lambda44__gasync_ready_callback, g_object_ref (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 void
proton_plus_widgets_tools_release_row_real_remove_button_clicked (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsToolsRemoveDialog* dialog = NULL;
	ProtonPlusServicesInstallJob* _tmp0_;
	ProtonPlusWidgetsToolsRemoveDialog* _tmp1_;
	GtkRoot* _tmp2_;
	_tmp0_ = self->priv->_job;
	_tmp1_ = proton_plus_widgets_tools_remove_dialog_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	proton_plus_widgets_tools_release_row_customize_remove_dialog (self, dialog);
	_tmp2_ = gtk_widget_get_root ((GtkWidget*) self);
	proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) dialog, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_window_get_type (), GtkWindow));
	_g_object_unref0 (dialog);
}

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

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

static void
proton_plus_widgets_tools_release_row_show_error (ProtonPlusWidgetsToolsReleaseRow* self,
                                                  const gchar* title,
                                                  const gchar* description,
                                                  ProtonPlusReturnCode code)
{
	gchar* _tmp0_ = NULL;
	ProtonPlusServicesInstallJob* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	ProtonPlusWidgetsMainErrorDialog* dialog = NULL;
	ProtonPlusWidgetsMainErrorDialog* _tmp6_;
	GtkRoot* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (description != NULL);
	_tmp1_ = self->priv->_job;
	_tmp2_ = proton_plus_services_install_job_get_error_message (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	_tmp0_ = _tmp4_;
	if (_tmp0_ == NULL) {
		gchar* _tmp5_;
		_tmp5_ = proton_plus_get_return_code_message (code);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp5_;
	}
	_tmp6_ = proton_plus_widgets_main_error_dialog_new (title, description, _tmp0_);
	g_object_ref_sink (_tmp6_);
	dialog = _tmp6_;
	_tmp7_ = gtk_widget_get_root ((GtkWidget*) self);
	proton_plus_widgets_window_present_dialog_for_controller ((AdwDialog*) dialog, (GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_window_get_type (), GtkWindow));
	_g_object_unref0 (dialog);
	_g_free0 (_tmp0_);
}

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]);
	}
}

static GtkButton*
proton_plus_widgets_tools_release_row_get_update_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_update_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_update_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                         GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_update_button);
	self->priv->_update_button = _tmp0_;
}

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

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

static GtkButton*
proton_plus_widgets_tools_release_row_get_remove_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_remove_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_remove_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                         GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_remove_button);
	self->priv->_remove_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_release_row_get_install_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_install_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_install_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                          GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_install_button);
	self->priv->_install_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_release_row_get_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_cancel_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_cancel_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                         GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_cancel_button);
	self->priv->_cancel_button = _tmp0_;
}

static GtkButton*
proton_plus_widgets_tools_release_row_get_progress_button (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkButton* result;
	GtkButton* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_progress_button;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_progress_button (ProtonPlusWidgetsToolsReleaseRow* self,
                                                           GtkButton* value)
{
	GtkButton* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_progress_button);
	self->priv->_progress_button = _tmp0_;
}

static ProtonPlusWidgetsCircularProgressBar*
proton_plus_widgets_tools_release_row_get_progress_bar (ProtonPlusWidgetsToolsReleaseRow* self)
{
	ProtonPlusWidgetsCircularProgressBar* result;
	ProtonPlusWidgetsCircularProgressBar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_progress_bar;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_progress_bar (ProtonPlusWidgetsToolsReleaseRow* self,
                                                        ProtonPlusWidgetsCircularProgressBar* value)
{
	ProtonPlusWidgetsCircularProgressBar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_progress_bar);
	self->priv->_progress_bar = _tmp0_;
}

static GtkLabel*
proton_plus_widgets_tools_release_row_get_step_label (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_step_label;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_step_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                      GtkLabel* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_step_label);
	self->priv->_step_label = _tmp0_;
}

static GtkLabel*
proton_plus_widgets_tools_release_row_get_speed_label (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_speed_label;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_speed_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                       GtkLabel* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_speed_label);
	self->priv->_speed_label = _tmp0_;
}

static GtkLabel*
proton_plus_widgets_tools_release_row_get_time_label (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_time_label;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_time_label (ProtonPlusWidgetsToolsReleaseRow* self,
                                                      GtkLabel* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_time_label);
	self->priv->_time_label = _tmp0_;
}

static GtkLabel*
proton_plus_widgets_tools_release_row_get_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkLabel* result;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_usage_pill;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_usage_pill (ProtonPlusWidgetsToolsReleaseRow* self,
                                                      GtkLabel* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_usage_pill);
	self->priv->_usage_pill = _tmp0_;
}

static GtkPopover*
proton_plus_widgets_tools_release_row_get_info_popover (ProtonPlusWidgetsToolsReleaseRow* self)
{
	GtkPopover* result;
	GtkPopover* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_info_popover;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_tools_release_row_set_info_popover (ProtonPlusWidgetsToolsReleaseRow* self,
                                                        GtkPopover* value)
{
	GtkPopover* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_info_popover);
	self->priv->_info_popover = _tmp0_;
}

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)->remove_button_clicked = (void (*) (ProtonPlusWidgetsToolsReleaseRow*)) proton_plus_widgets_tools_release_row_real_remove_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));
	proton_plus_widgets_tools_release_row_signals[PROTON_PLUS_WIDGETS_TOOLS_RELEASE_ROW_JOB_SELECTED_SIGNAL] = g_signal_new ("job-selected", 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_instance_init (ProtonPlusWidgetsToolsReleaseRow * self,
                                                     gpointer klass)
{
	self->priv = proton_plus_widgets_tools_release_row_get_instance_private (self);
	self->priv->progress_pulse_timeout_id = (guint) 0;
}

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->_update_button);
	_g_object_unref0 (self->priv->_open_button);
	_g_object_unref0 (self->priv->_remove_button);
	_g_object_unref0 (self->priv->_install_button);
	_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->_step_label);
	_g_object_unref0 (self->priv->_speed_label);
	_g_object_unref0 (self->priv->_time_label);
	_g_object_unref0 (self->priv->_usage_pill);
	_g_object_unref0 (self->priv->_info_popover);
	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};
	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);
	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;
		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;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

