/* switch-profile-button.c generated by valac 0.56.19, the Vala compiler
 * generated from switch-profile-button.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <adwaita.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON (proton_plus_widgets_switch_profile_button_get_type ())
#define PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON, ProtonPlusWidgetsSwitchProfileButton))
#define PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON, ProtonPlusWidgetsSwitchProfileButtonClass))
#define PROTON_PLUS_WIDGETS_IS_SWITCH_PROFILE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON))
#define PROTON_PLUS_WIDGETS_IS_SWITCH_PROFILE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON))
#define PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON, ProtonPlusWidgetsSwitchProfileButtonClass))

typedef struct _ProtonPlusWidgetsSwitchProfileButton ProtonPlusWidgetsSwitchProfileButton;
typedef struct _ProtonPlusWidgetsSwitchProfileButtonClass ProtonPlusWidgetsSwitchProfileButtonClass;
typedef struct _ProtonPlusWidgetsSwitchProfileButtonPrivate ProtonPlusWidgetsSwitchProfileButtonPrivate;

#define PROTON_PLUS_MODELS_TYPE_LAUNCHER (proton_plus_models_launcher_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher))
#define PROTON_PLUS_MODELS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))
#define PROTON_PLUS_MODELS_IS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_IS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;

#define PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM (proton_plus_models_launchers_steam_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam))
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteamClass))
#define PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM))
#define PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM))
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteamClass))

typedef struct _ProtonPlusModelsLaunchersSteam ProtonPlusModelsLaunchersSteam;
typedef struct _ProtonPlusModelsLaunchersSteamClass ProtonPlusModelsLaunchersSteamClass;

#define PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE (proton_plus_models_steam_profile_get_type ())
#define PROTON_PLUS_MODELS_STEAM_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfile))
#define PROTON_PLUS_MODELS_STEAM_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfileClass))
#define PROTON_PLUS_MODELS_IS_STEAM_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE))
#define PROTON_PLUS_MODELS_IS_STEAM_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE))
#define PROTON_PLUS_MODELS_STEAM_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfileClass))

typedef struct _ProtonPlusModelsSteamProfile ProtonPlusModelsSteamProfile;
typedef struct _ProtonPlusModelsSteamProfileClass ProtonPlusModelsSteamProfileClass;
typedef void (*ProtonPlusWidgetsGamesBoxload_steam_profile_func) (ProtonPlusModelsSteamProfile* profile, gpointer user_data);
enum  {
	PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON_0_PROPERTY,
	PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_switch_profile_button_properties[PROTON_PLUS_WIDGETS_SWITCH_PROFILE_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG (proton_plus_widgets_profile_dialog_get_type ())
#define PROTON_PLUS_WIDGETS_PROFILE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG, ProtonPlusWidgetsProfileDialog))
#define PROTON_PLUS_WIDGETS_PROFILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG, ProtonPlusWidgetsProfileDialogClass))
#define PROTON_PLUS_WIDGETS_IS_PROFILE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG))
#define PROTON_PLUS_WIDGETS_IS_PROFILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG))
#define PROTON_PLUS_WIDGETS_PROFILE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_PROFILE_DIALOG, ProtonPlusWidgetsProfileDialogClass))

typedef struct _ProtonPlusWidgetsProfileDialog ProtonPlusWidgetsProfileDialog;
typedef struct _ProtonPlusWidgetsProfileDialogClass ProtonPlusWidgetsProfileDialogClass;

#define PROTON_PLUS_WIDGETS_TYPE_WINDOW (proton_plus_widgets_window_get_type ())
#define PROTON_PLUS_WIDGETS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindow))
#define PROTON_PLUS_WIDGETS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))
#define PROTON_PLUS_WIDGETS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))

typedef struct _ProtonPlusWidgetsWindow ProtonPlusWidgetsWindow;
typedef struct _ProtonPlusWidgetsWindowClass ProtonPlusWidgetsWindowClass;

struct _ProtonPlusWidgetsSwitchProfileButton {
	GtkButton parent_instance;
	ProtonPlusWidgetsSwitchProfileButtonPrivate * priv;
};

struct _ProtonPlusWidgetsSwitchProfileButtonClass {
	GtkButtonClass parent_class;
};

struct _ProtonPlusWidgetsSwitchProfileButtonPrivate {
	ProtonPlusModelsLaunchersSteam* launcher;
	ProtonPlusWidgetsGamesBoxload_steam_profile_func load_steam_profile;
	gpointer load_steam_profile_target;
	GDestroyNotify load_steam_profile_target_destroy_notify;
	GtkListBox* game_list_box;
	GtkImage* image;
	GtkLabel* label;
	GtkBox* content;
};

static gint ProtonPlusWidgetsSwitchProfileButton_private_offset;
static gpointer proton_plus_widgets_switch_profile_button_parent_class = NULL;
VALA_EXTERN ProtonPlusWidgetsWindow* proton_plus_widgets_application_window;

VALA_EXTERN GType proton_plus_widgets_switch_profile_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsSwitchProfileButton, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
VALA_EXTERN GType proton_plus_models_launchers_steam_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLaunchersSteam, g_object_unref)
VALA_EXTERN GType proton_plus_models_steam_profile_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSteamProfile, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsSwitchProfileButton* proton_plus_widgets_switch_profile_button_new (void);
VALA_EXTERN ProtonPlusWidgetsSwitchProfileButton* proton_plus_widgets_switch_profile_button_construct (GType object_type);
static void proton_plus_widgets_switch_profile_button_switch_profile_button_clicked (ProtonPlusWidgetsSwitchProfileButton* self);
static void _proton_plus_widgets_switch_profile_button_switch_profile_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                  gpointer self);
VALA_EXTERN void proton_plus_widgets_switch_profile_button_load (ProtonPlusWidgetsSwitchProfileButton* self,
                                                     ProtonPlusModelsLaunchersSteam* launcher,
                                                     ProtonPlusWidgetsGamesBoxload_steam_profile_func load_steam_profile,
                                                     gpointer load_steam_profile_target,
                                                     GtkListBox* game_list_box);
static void __lambda39_ (ProtonPlusWidgetsSwitchProfileButton* self);
static void proton_plus_widgets_switch_profile_button_profile_changed (ProtonPlusWidgetsSwitchProfileButton* self);
static void ___lambda39__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
VALA_EXTERN ProtonPlusModelsSteamProfile* proton_plus_models_launchers_steam_get_profile (ProtonPlusModelsLaunchersSteam* self);
VALA_EXTERN const gchar* proton_plus_models_steam_profile_get_image_path (ProtonPlusModelsSteamProfile* self);
VALA_EXTERN GType proton_plus_widgets_profile_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsProfileDialog, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsProfileDialog* proton_plus_widgets_profile_dialog_new (ProtonPlusModelsLaunchersSteam* launcher,
                                                                        ProtonPlusWidgetsGamesBoxload_steam_profile_func load_steam_profile_func,
                                                                        gpointer load_steam_profile_func_target);
VALA_EXTERN ProtonPlusWidgetsProfileDialog* proton_plus_widgets_profile_dialog_construct (GType object_type,
                                                                              ProtonPlusModelsLaunchersSteam* launcher,
                                                                              ProtonPlusWidgetsGamesBoxload_steam_profile_func load_steam_profile_func,
                                                                              gpointer load_steam_profile_func_target);
VALA_EXTERN GType proton_plus_widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsWindow, g_object_unref)
static void proton_plus_widgets_switch_profile_button_finalize (GObject * obj);
static GType proton_plus_widgets_switch_profile_button_get_type_once (void);

static inline gpointer
proton_plus_widgets_switch_profile_button_get_instance_private (ProtonPlusWidgetsSwitchProfileButton* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsSwitchProfileButton_private_offset);
}

static void
_proton_plus_widgets_switch_profile_button_switch_profile_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                             gpointer self)
{
	proton_plus_widgets_switch_profile_button_switch_profile_button_clicked ((ProtonPlusWidgetsSwitchProfileButton*) self);
}

ProtonPlusWidgetsSwitchProfileButton*
proton_plus_widgets_switch_profile_button_construct (GType object_type)
{
	ProtonPlusWidgetsSwitchProfileButton * self = NULL;
	GtkImage* _tmp0_;
	GtkLabel* _tmp1_;
	GtkBox* _tmp2_;
	GtkBox* _tmp3_;
	GtkImage* _tmp4_;
	GtkBox* _tmp5_;
	GtkLabel* _tmp6_;
	GtkBox* _tmp7_;
	self = (ProtonPlusWidgetsSwitchProfileButton*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->image);
	self->priv->image = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("Switch profile"));
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp1_;
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->content);
	self->priv->content = _tmp2_;
	_tmp3_ = self->priv->content;
	_tmp4_ = self->priv->image;
	gtk_box_append (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = self->priv->content;
	_tmp6_ = self->priv->label;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _proton_plus_widgets_switch_profile_button_switch_profile_button_clicked_gtk_button_clicked, self, 0);
	_tmp7_ = self->priv->content;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp7_);
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _ ("Switch to another profile"));
	gtk_widget_add_css_class ((GtkWidget*) self, "flat");
	return self;
}

ProtonPlusWidgetsSwitchProfileButton*
proton_plus_widgets_switch_profile_button_new (void)
{
	return proton_plus_widgets_switch_profile_button_construct (PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON);
}

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

static void
__lambda39_ (ProtonPlusWidgetsSwitchProfileButton* self)
{
	proton_plus_widgets_switch_profile_button_profile_changed (self);
}

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

void
proton_plus_widgets_switch_profile_button_load (ProtonPlusWidgetsSwitchProfileButton* self,
                                                ProtonPlusModelsLaunchersSteam* launcher,
                                                ProtonPlusWidgetsGamesBoxload_steam_profile_func load_steam_profile,
                                                gpointer load_steam_profile_target,
                                                GtkListBox* game_list_box)
{
	ProtonPlusModelsLaunchersSteam* _tmp0_;
	GtkListBox* _tmp1_;
	GtkImage* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	g_return_if_fail (game_list_box != NULL);
	_tmp0_ = _g_object_ref0 (launcher);
	_g_object_unref0 (self->priv->launcher);
	self->priv->launcher = _tmp0_;
	(self->priv->load_steam_profile_target_destroy_notify == NULL) ? NULL : (self->priv->load_steam_profile_target_destroy_notify (self->priv->load_steam_profile_target), NULL);
	self->priv->load_steam_profile = NULL;
	self->priv->load_steam_profile_target = NULL;
	self->priv->load_steam_profile_target_destroy_notify = NULL;
	self->priv->load_steam_profile = load_steam_profile;
	self->priv->load_steam_profile_target = load_steam_profile_target;
	self->priv->load_steam_profile_target_destroy_notify = NULL;
	_tmp1_ = _g_object_ref0 (game_list_box);
	_g_object_unref0 (self->priv->game_list_box);
	self->priv->game_list_box = _tmp1_;
	_tmp2_ = self->priv->image;
	gtk_widget_set_visible ((GtkWidget*) _tmp2_, FALSE);
	g_signal_connect_object ((GObject*) launcher, "notify::profile", (GCallback) ___lambda39__g_object_notify, self, 0);
}

static void
proton_plus_widgets_switch_profile_button_profile_changed (ProtonPlusWidgetsSwitchProfileButton* self)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsLaunchersSteam* _tmp1_;
	ProtonPlusModelsSteamProfile* _tmp2_;
	ProtonPlusModelsSteamProfile* _tmp3_;
	gboolean profile_valid = FALSE;
	GtkImage* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->launcher;
	_tmp2_ = proton_plus_models_launchers_steam_get_profile (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		ProtonPlusModelsLaunchersSteam* _tmp4_;
		ProtonPlusModelsSteamProfile* _tmp5_;
		ProtonPlusModelsSteamProfile* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp4_ = self->priv->launcher;
		_tmp5_ = proton_plus_models_launchers_steam_get_profile (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = proton_plus_models_steam_profile_get_image_path (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	profile_valid = _tmp0_;
	if (profile_valid) {
		GtkImage* _tmp9_;
		ProtonPlusModelsLaunchersSteam* _tmp10_;
		ProtonPlusModelsSteamProfile* _tmp11_;
		ProtonPlusModelsSteamProfile* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp9_ = self->priv->image;
		_tmp10_ = self->priv->launcher;
		_tmp11_ = proton_plus_models_launchers_steam_get_profile (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = proton_plus_models_steam_profile_get_image_path (_tmp12_);
		_tmp14_ = _tmp13_;
		gtk_image_set_from_file (_tmp9_, _tmp14_);
	}
	_tmp15_ = self->priv->image;
	gtk_widget_set_visible ((GtkWidget*) _tmp15_, profile_valid);
}

static void
proton_plus_widgets_switch_profile_button_switch_profile_button_clicked (ProtonPlusWidgetsSwitchProfileButton* self)
{
	GtkListBox* _tmp0_;
	ProtonPlusWidgetsProfileDialog* dialog = NULL;
	ProtonPlusModelsLaunchersSteam* _tmp1_;
	ProtonPlusWidgetsGamesBoxload_steam_profile_func _tmp2_;
	gpointer _tmp2__target;
	ProtonPlusWidgetsProfileDialog* _tmp3_;
	ProtonPlusWidgetsWindow* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game_list_box;
	gtk_list_box_remove_all (_tmp0_);
	_tmp1_ = self->priv->launcher;
	_tmp2_ = self->priv->load_steam_profile;
	_tmp2__target = self->priv->load_steam_profile_target;
	_tmp3_ = proton_plus_widgets_profile_dialog_new (_tmp1_, _tmp2_, _tmp2__target);
	g_object_ref_sink (_tmp3_);
	dialog = _tmp3_;
	_tmp4_ = proton_plus_widgets_application_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp4_);
	_g_object_unref0 (dialog);
}

static void
proton_plus_widgets_switch_profile_button_class_init (ProtonPlusWidgetsSwitchProfileButtonClass * klass,
                                                      gpointer klass_data)
{
	proton_plus_widgets_switch_profile_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsSwitchProfileButton_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_switch_profile_button_finalize;
}

static void
proton_plus_widgets_switch_profile_button_instance_init (ProtonPlusWidgetsSwitchProfileButton * self,
                                                         gpointer klass)
{
	self->priv = proton_plus_widgets_switch_profile_button_get_instance_private (self);
}

static void
proton_plus_widgets_switch_profile_button_finalize (GObject * obj)
{
	ProtonPlusWidgetsSwitchProfileButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_SWITCH_PROFILE_BUTTON, ProtonPlusWidgetsSwitchProfileButton);
	_g_object_unref0 (self->priv->launcher);
	(self->priv->load_steam_profile_target_destroy_notify == NULL) ? NULL : (self->priv->load_steam_profile_target_destroy_notify (self->priv->load_steam_profile_target), NULL);
	self->priv->load_steam_profile = NULL;
	self->priv->load_steam_profile_target = NULL;
	self->priv->load_steam_profile_target_destroy_notify = NULL;
	_g_object_unref0 (self->priv->game_list_box);
	_g_object_unref0 (self->priv->image);
	_g_object_unref0 (self->priv->label);
	_g_object_unref0 (self->priv->content);
	G_OBJECT_CLASS (proton_plus_widgets_switch_profile_button_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_switch_profile_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsSwitchProfileButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_switch_profile_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsSwitchProfileButton), 0, (GInstanceInitFunc) proton_plus_widgets_switch_profile_button_instance_init, NULL };
	GType proton_plus_widgets_switch_profile_button_type_id;
	proton_plus_widgets_switch_profile_button_type_id = g_type_register_static (gtk_button_get_type (), "ProtonPlusWidgetsSwitchProfileButton", &g_define_type_info, 0);
	ProtonPlusWidgetsSwitchProfileButton_private_offset = g_type_add_instance_private (proton_plus_widgets_switch_profile_button_type_id, sizeof (ProtonPlusWidgetsSwitchProfileButtonPrivate));
	return proton_plus_widgets_switch_profile_button_type_id;
}

GType
proton_plus_widgets_switch_profile_button_get_type (void)
{
	static volatile gsize proton_plus_widgets_switch_profile_button_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_switch_profile_button_type_id__once)) {
		GType proton_plus_widgets_switch_profile_button_type_id;
		proton_plus_widgets_switch_profile_button_type_id = proton_plus_widgets_switch_profile_button_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_switch_profile_button_type_id__once, proton_plus_widgets_switch_profile_button_type_id);
	}
	return proton_plus_widgets_switch_profile_button_type_id__once;
}

