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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <adwaita.h>
#include <gee.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_EXTRA_BUTTON (proton_plus_widgets_extra_button_get_type ())
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButton))
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButtonClass))
#define PROTON_PLUS_WIDGETS_IS_EXTRA_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON))
#define PROTON_PLUS_WIDGETS_IS_EXTRA_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON))
#define PROTON_PLUS_WIDGETS_EXTRA_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButtonClass))

typedef struct _ProtonPlusWidgetsExtraButton ProtonPlusWidgetsExtraButton;
typedef struct _ProtonPlusWidgetsExtraButtonClass ProtonPlusWidgetsExtraButtonClass;
typedef struct _ProtonPlusWidgetsExtraButtonPrivate ProtonPlusWidgetsExtraButtonPrivate;

#define PROTON_PLUS_MODELS_TYPE_GAME (proton_plus_models_game_get_type ())
#define PROTON_PLUS_MODELS_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGame))
#define PROTON_PLUS_MODELS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))
#define PROTON_PLUS_MODELS_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;
enum  {
	PROTON_PLUS_WIDGETS_EXTRA_BUTTON_0_PROPERTY,
	PROTON_PLUS_WIDGETS_EXTRA_BUTTON_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_extra_button_properties[PROTON_PLUS_WIDGETS_EXTRA_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_MODELS_GAMES_TYPE_STEAM (proton_plus_models_games_steam_get_type ())
#define PROTON_PLUS_MODELS_GAMES_STEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam))
#define PROTON_PLUS_MODELS_GAMES_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))

typedef struct _ProtonPlusModelsGamesSteam ProtonPlusModelsGamesSteam;
typedef struct _ProtonPlusModelsGamesSteamClass ProtonPlusModelsGamesSteamClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block9Data Block9Data;

#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;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER (proton_plus_models_simple_runner_get_type ())
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunner))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;

#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;
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

#define PROTON_PLUS_MODELS_TYPE_GROUP (proton_plus_models_group_get_type ())
#define PROTON_PLUS_MODELS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup))
#define PROTON_PLUS_MODELS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))
#define PROTON_PLUS_MODELS_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))

typedef struct _ProtonPlusModelsGroup ProtonPlusModelsGroup;
typedef struct _ProtonPlusModelsGroupClass ProtonPlusModelsGroupClass;
typedef enum  {
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP
} ProtonPlusModelsLauncherInstallationTypes;

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())

#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_WIDGETS_TYPE_ERROR_DIALOG (proton_plus_widgets_error_dialog_get_type ())
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialog))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_IS_ERROR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG))
#define PROTON_PLUS_WIDGETS_ERROR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_ERROR_DIALOG, ProtonPlusWidgetsErrorDialogClass))

typedef struct _ProtonPlusWidgetsErrorDialog ProtonPlusWidgetsErrorDialog;
typedef struct _ProtonPlusWidgetsErrorDialogClass ProtonPlusWidgetsErrorDialogClass;

struct _ProtonPlusWidgetsExtraButton {
	GtkButton parent_instance;
	ProtonPlusWidgetsExtraButtonPrivate * priv;
};

struct _ProtonPlusWidgetsExtraButtonClass {
	GtkButtonClass parent_class;
};

struct _ProtonPlusWidgetsExtraButtonPrivate {
	ProtonPlusModelsGame* game;
	GtkButton* open_install_directory_button;
	GtkButton* open_prefix_directory_button;
	GtkButton* open_protontricks_button;
	GtkButton* run_custom_executable_button;
	GtkBox* content_box;
	GtkPopover* popover;
};

struct _Block9Data {
	int _ref_count_;
	ProtonPlusWidgetsExtraButton* self;
	GtkFileDialog* file_dialog;
};

struct _ProtonPlusModelsLauncher {
	GObject parent_instance;
	ProtonPlusModelsLauncherPrivate * priv;
	gchar* title;
	gchar* icon_path;
	gchar* directory;
	gboolean installed;
	gboolean has_library_support;
	GList* games;
	GeeArrayList* compatibility_tools;
	ProtonPlusModelsGroup** groups;
	gint groups_length1;
	ProtonPlusModelsLauncherInstallationTypes installation_type;
};

struct _ProtonPlusModelsLauncherClass {
	GObjectClass parent_class;
	void (*load_game_library) (ProtonPlusModelsLauncher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*load_game_library_finish) (ProtonPlusModelsLauncher* self, GAsyncResult* _res_);
	gint (*get_compatibility_tool_usage_count) (ProtonPlusModelsLauncher* self, const gchar* compatibility_tool_name);
};

static gint ProtonPlusWidgetsExtraButton_private_offset;
static gpointer proton_plus_widgets_extra_button_parent_class = NULL;
VALA_EXTERN gchar* proton_plus_globals_PROTONTRICKS_EXEC;
VALA_EXTERN ProtonPlusWidgetsWindow* proton_plus_widgets_application_window;

VALA_EXTERN GType proton_plus_widgets_extra_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsExtraButton, g_object_unref)
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsExtraButton* proton_plus_widgets_extra_button_new (ProtonPlusModelsGame* game);
VALA_EXTERN ProtonPlusWidgetsExtraButton* proton_plus_widgets_extra_button_construct (GType object_type,
                                                                          ProtonPlusModelsGame* game);
VALA_EXTERN GType proton_plus_models_games_steam_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGamesSteam, g_object_unref)
VALA_EXTERN gboolean proton_plus_models_games_steam_get_is_non_steam (ProtonPlusModelsGamesSteam* self);
VALA_EXTERN const gchar* proton_plus_models_game_get_prefixdir (ProtonPlusModelsGame* self);
static void proton_plus_widgets_extra_button_real_dispose (GObject* base);
static void proton_plus_widgets_extra_button_extra_button_clicked (ProtonPlusWidgetsExtraButton* self);
static void proton_plus_widgets_extra_button_open_install_directory_button_clicked (ProtonPlusWidgetsExtraButton* self);
VALA_EXTERN void proton_plus_utils_system_open_uri (const gchar* uri);
VALA_EXTERN const gchar* proton_plus_models_game_get_installdir (ProtonPlusModelsGame* self);
static void proton_plus_widgets_extra_button_open_prefix_directory_button_clicked (ProtonPlusWidgetsExtraButton* self);
static void proton_plus_widgets_extra_button_open_protontricks_button_clicked (ProtonPlusWidgetsExtraButton* self);
VALA_EXTERN void proton_plus_utils_system_run_command (const gchar* command,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN gchar* proton_plus_utils_system_run_command_finish (GAsyncResult* _res_);
VALA_EXTERN guint proton_plus_models_games_steam_get_appid (ProtonPlusModelsGamesSteam* self);
static void proton_plus_widgets_extra_button_run_custom_executable_button_clicked (ProtonPlusWidgetsExtraButton* self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
VALA_EXTERN GType proton_plus_widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsWindow, g_object_unref)
static void __lambda37_ (Block9Data* _data9_,
                  GObject* obj,
                  GAsyncResult* res);
static void proton_plus_widgets_extra_button_run_custom_executable (ProtonPlusWidgetsExtraButton* self,
                                                             const gchar* exe_path);
static void ___lambda37__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, 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 ProtonPlusModelsLauncher* proton_plus_models_game_get_launcher (ProtonPlusModelsGame* self);
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
VALA_EXTERN const gchar* proton_plus_models_simple_runner_get_internal_title (ProtonPlusModelsSimpleRunner* self);
VALA_EXTERN const gchar* proton_plus_models_game_get_compatibility_tool (ProtonPlusModelsGame* self);
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 const gchar* proton_plus_models_simple_runner_get_path (ProtonPlusModelsSimpleRunner* self);
VALA_EXTERN GType proton_plus_widgets_error_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsErrorDialog, g_object_unref)
VALA_EXTERN const gchar* proton_plus_models_game_get_name (ProtonPlusModelsGame* self);
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_new (const gchar* heading,
                                                                    const gchar* body);
VALA_EXTERN ProtonPlusWidgetsErrorDialog* proton_plus_widgets_error_dialog_construct (GType object_type,
                                                                          const gchar* heading,
                                                                          const gchar* body);
static GObject * proton_plus_widgets_extra_button_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static void _proton_plus_widgets_extra_button_open_install_directory_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                 gpointer self);
static void _proton_plus_widgets_extra_button_open_prefix_directory_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                gpointer self);
static void _proton_plus_widgets_extra_button_open_protontricks_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                            gpointer self);
static void _proton_plus_widgets_extra_button_run_custom_executable_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                                gpointer self);
static void _proton_plus_widgets_extra_button_extra_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                gpointer self);
static void proton_plus_widgets_extra_button_finalize (GObject * obj);
static GType proton_plus_widgets_extra_button_get_type_once (void);

static inline gpointer
proton_plus_widgets_extra_button_get_instance_private (ProtonPlusWidgetsExtraButton* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsExtraButton_private_offset);
}

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

ProtonPlusWidgetsExtraButton*
proton_plus_widgets_extra_button_construct (GType object_type,
                                            ProtonPlusModelsGame* game)
{
	ProtonPlusWidgetsExtraButton * self = NULL;
	ProtonPlusModelsGame* _tmp0_;
	g_return_val_if_fail (game != NULL, NULL);
	self = (ProtonPlusWidgetsExtraButton*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (game);
	_g_object_unref0 (self->priv->game);
	self->priv->game = _tmp0_;
	if (PROTON_PLUS_MODELS_GAMES_IS_STEAM (game)) {
		const gchar* _tmp1_;
		ProtonPlusModelsGamesSteam* steam_game = NULL;
		ProtonPlusModelsGamesSteam* _tmp4_;
		GtkButton* _tmp5_;
		ProtonPlusModelsGamesSteam* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		GtkButton* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GtkButton* _tmp12_;
		ProtonPlusModelsGamesSteam* _tmp13_;
		gboolean _tmp14_;
		gboolean _tmp15_;
		GtkBox* _tmp16_;
		GtkButton* _tmp17_;
		GtkButton* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		_tmp1_ = proton_plus_globals_PROTONTRICKS_EXEC;
		if (_tmp1_ != NULL) {
			GtkBox* _tmp2_;
			GtkButton* _tmp3_;
			_tmp2_ = self->priv->content_box;
			_tmp3_ = self->priv->open_protontricks_button;
			gtk_box_append (_tmp2_, (GtkWidget*) _tmp3_);
		}
		_tmp4_ = _g_object_ref0 (PROTON_PLUS_MODELS_GAMES_IS_STEAM (game) ? ((ProtonPlusModelsGamesSteam*) game) : NULL);
		steam_game = _tmp4_;
		_tmp5_ = self->priv->open_install_directory_button;
		_tmp6_ = steam_game;
		_tmp7_ = proton_plus_models_games_steam_get_is_non_steam (_tmp6_);
		_tmp8_ = _tmp7_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, !_tmp8_);
		_tmp9_ = self->priv->open_prefix_directory_button;
		_tmp10_ = proton_plus_models_game_get_prefixdir (game);
		_tmp11_ = _tmp10_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, g_file_test (_tmp11_, G_FILE_TEST_IS_DIR));
		_tmp12_ = self->priv->open_protontricks_button;
		_tmp13_ = steam_game;
		_tmp14_ = proton_plus_models_games_steam_get_is_non_steam (_tmp13_);
		_tmp15_ = _tmp14_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, !_tmp15_);
		_tmp16_ = self->priv->content_box;
		_tmp17_ = self->priv->run_custom_executable_button;
		gtk_box_append (_tmp16_, (GtkWidget*) _tmp17_);
		_tmp18_ = self->priv->run_custom_executable_button;
		_tmp19_ = proton_plus_models_game_get_prefixdir (game);
		_tmp20_ = _tmp19_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp18_, g_file_test (_tmp20_, G_FILE_TEST_IS_DIR));
		_g_object_unref0 (steam_game);
	}
	return self;
}

ProtonPlusWidgetsExtraButton*
proton_plus_widgets_extra_button_new (ProtonPlusModelsGame* game)
{
	return proton_plus_widgets_extra_button_construct (PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, game);
}

static void
proton_plus_widgets_extra_button_real_dispose (GObject* base)
{
	ProtonPlusWidgetsExtraButton * self;
	GtkPopover* _tmp0_;
	self = (ProtonPlusWidgetsExtraButton*) base;
	_tmp0_ = self->priv->popover;
	gtk_widget_unparent ((GtkWidget*) _tmp0_);
	G_OBJECT_CLASS (proton_plus_widgets_extra_button_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_button_get_type (), GtkButton));
}

static void
proton_plus_widgets_extra_button_extra_button_clicked (ProtonPlusWidgetsExtraButton* self)
{
	GtkPopover* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->popover;
	gtk_popover_popup (_tmp0_);
}

static void
proton_plus_widgets_extra_button_open_install_directory_button_clicked (ProtonPlusWidgetsExtraButton* self)
{
	ProtonPlusModelsGame* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkPopover* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game;
	_tmp1_ = proton_plus_models_game_get_installdir (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf ("file://%s", _tmp2_);
	_tmp4_ = _tmp3_;
	proton_plus_utils_system_open_uri (_tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = self->priv->popover;
	gtk_popover_popdown (_tmp5_);
}

static void
proton_plus_widgets_extra_button_open_prefix_directory_button_clicked (ProtonPlusWidgetsExtraButton* self)
{
	ProtonPlusModelsGame* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GtkPopover* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game;
	_tmp1_ = proton_plus_models_game_get_prefixdir (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf ("file://%s", _tmp2_);
	_tmp4_ = _tmp3_;
	proton_plus_utils_system_open_uri (_tmp4_);
	_g_free0 (_tmp4_);
	_tmp5_ = self->priv->popover;
	gtk_popover_popdown (_tmp5_);
}

static void
proton_plus_widgets_extra_button_open_protontricks_button_clicked (ProtonPlusWidgetsExtraButton* self)
{
	ProtonPlusModelsGamesSteam* steam_game = NULL;
	ProtonPlusModelsGame* _tmp0_;
	ProtonPlusModelsGamesSteam* _tmp1_;
	const gchar* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkPopover* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->game;
	_tmp1_ = _g_object_ref0 (PROTON_PLUS_MODELS_GAMES_IS_STEAM (_tmp0_) ? ((ProtonPlusModelsGamesSteam*) _tmp0_) : NULL);
	steam_game = _tmp1_;
	_tmp2_ = proton_plus_globals_PROTONTRICKS_EXEC;
	_tmp3_ = proton_plus_models_games_steam_get_appid (steam_game);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf ("%s %u --gui", _tmp2_, _tmp4_);
	_tmp6_ = _tmp5_;
	proton_plus_utils_system_run_command (_tmp6_, NULL, NULL);
	_g_free0 (_tmp6_);
	_tmp7_ = self->priv->popover;
	gtk_popover_popdown (_tmp7_);
	_g_object_unref0 (steam_game);
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		ProtonPlusWidgetsExtraButton* self;
		self = _data9_->self;
		_g_object_unref0 (_data9_->file_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static void
__lambda37_ (Block9Data* _data9_,
             GObject* obj,
             GAsyncResult* res)
{
	ProtonPlusWidgetsExtraButton* self;
	GError* _inner_error0_ = NULL;
	self = _data9_->self;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		_tmp0_ = gtk_file_dialog_open_finish (_data9_->file_dialog, res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (file != NULL) {
			gchar* _tmp1_;
			gchar* _tmp2_;
			_tmp1_ = g_file_get_path (file);
			_tmp2_ = _tmp1_;
			proton_plus_widgets_extra_button_run_custom_executable (self, _tmp2_);
			_g_free0 (_tmp2_);
		}
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("extra-button.vala:108: %s", _tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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;
	}
}

static void
___lambda37__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda37_ (self, source_object, res);
	block9_data_unref (self);
}

static void
proton_plus_widgets_extra_button_run_custom_executable_button_clicked (ProtonPlusWidgetsExtraButton* self)
{
	Block9Data* _data9_;
	GtkFileDialog* _tmp0_;
	GListStore* filters = NULL;
	GListStore* _tmp1_;
	GtkFileFilter* filter = NULL;
	GtkFileFilter* _tmp2_;
	ProtonPlusWidgetsWindow* _tmp3_;
	GtkPopover* _tmp4_;
	g_return_if_fail (self != NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_tmp0_ = gtk_file_dialog_new ();
	_data9_->file_dialog = _tmp0_;
	gtk_file_dialog_set_title (_data9_->file_dialog, _ ("Select executable"));
	_tmp1_ = g_list_store_new (gtk_file_filter_get_type ());
	filters = _tmp1_;
	_tmp2_ = gtk_file_filter_new ();
	filter = _tmp2_;
	gtk_file_filter_add_pattern (filter, "*.exe");
	gtk_file_filter_add_pattern (filter, "*.msi");
	gtk_file_filter_add_pattern (filter, "*.msu");
	g_object_set (filter, "name", _ ("Executables (*.exe, *.msi, *.msu)"), NULL);
	g_list_store_append (filters, (GObject*) filter);
	gtk_file_dialog_set_filters (_data9_->file_dialog, (GListModel*) filters);
	_tmp3_ = proton_plus_widgets_application_window;
	gtk_file_dialog_open (_data9_->file_dialog, (GtkWindow*) _tmp3_, NULL, ___lambda37__gasync_ready_callback, block9_data_ref (_data9_));
	_tmp4_ = self->priv->popover;
	gtk_popover_popdown (_tmp4_);
	_g_object_unref0 (filter);
	_g_object_unref0 (filters);
	block9_data_unref (_data9_);
	_data9_ = NULL;
}

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

static void
proton_plus_widgets_extra_button_run_custom_executable (ProtonPlusWidgetsExtraButton* self,
                                                        const gchar* exe_path)
{
	ProtonPlusModelsSimpleRunner* selected_runner = NULL;
	gboolean _tmp19_ = FALSE;
	ProtonPlusModelsSimpleRunner* _tmp20_;
	gboolean _tmp46_ = FALSE;
	ProtonPlusModelsSimpleRunner* _tmp47_;
	gchar* proton_path = NULL;
	ProtonPlusModelsSimpleRunner* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* steam_compat_data_path = NULL;
	ProtonPlusModelsGame* _tmp64_;
	const gchar* _tmp65_;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* steam_compat_client_install_path = NULL;
	ProtonPlusModelsGame* _tmp68_;
	ProtonPlusModelsLauncher* _tmp69_;
	ProtonPlusModelsLauncher* _tmp70_;
	const gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* inner_command = NULL;
	const gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	const gchar* _tmp76_;
	gchar* _tmp77_;
	gchar* _tmp78_;
	const gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	const gchar* _tmp86_;
	gchar* _tmp87_;
	gchar* _tmp88_;
	gchar* _tmp89_;
	gchar* _tmp90_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (exe_path != NULL);
	selected_runner = NULL;
	{
		GeeArrayList* _runner_list = NULL;
		ProtonPlusModelsGame* _tmp0_;
		ProtonPlusModelsLauncher* _tmp1_;
		ProtonPlusModelsLauncher* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _runner_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _runner_index = 0;
		_tmp0_ = self->priv->game;
		_tmp1_ = proton_plus_models_game_get_launcher (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_->compatibility_tools;
		_runner_list = _tmp3_;
		_tmp4_ = _runner_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_runner_size = _tmp6_;
		_runner_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			ProtonPlusModelsSimpleRunner* runner = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			ProtonPlusModelsSimpleRunner* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			ProtonPlusModelsGame* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			_runner_index = _runner_index + 1;
			_tmp7_ = _runner_index;
			_tmp8_ = _runner_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _runner_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _runner_index);
			runner = (ProtonPlusModelsSimpleRunner*) _tmp10_;
			_tmp11_ = runner;
			_tmp12_ = proton_plus_models_simple_runner_get_internal_title (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = self->priv->game;
			_tmp15_ = proton_plus_models_game_get_compatibility_tool (_tmp14_);
			_tmp16_ = _tmp15_;
			if (g_strcmp0 (_tmp13_, _tmp16_) == 0) {
				ProtonPlusModelsSimpleRunner* _tmp17_;
				ProtonPlusModelsSimpleRunner* _tmp18_;
				_tmp17_ = runner;
				_tmp18_ = _g_object_ref0 (_tmp17_);
				_g_object_unref0 (selected_runner);
				selected_runner = _tmp18_;
				_g_object_unref0 (runner);
				break;
			}
			_g_object_unref0 (runner);
		}
	}
	_tmp20_ = selected_runner;
	if (_tmp20_ == NULL) {
		ProtonPlusModelsGame* _tmp21_;
		ProtonPlusModelsLauncher* _tmp22_;
		ProtonPlusModelsLauncher* _tmp23_;
		_tmp21_ = self->priv->game;
		_tmp22_ = proton_plus_models_game_get_launcher (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp19_ = PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp23_);
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		ProtonPlusModelsLaunchersSteam* steam = NULL;
		ProtonPlusModelsGame* _tmp24_;
		ProtonPlusModelsLauncher* _tmp25_;
		ProtonPlusModelsLauncher* _tmp26_;
		ProtonPlusModelsLaunchersSteam* _tmp27_;
		_tmp24_ = self->priv->game;
		_tmp25_ = proton_plus_models_game_get_launcher (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp26_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp26_) : NULL);
		steam = _tmp27_;
		{
			GeeArrayList* _runner_list = NULL;
			ProtonPlusModelsLaunchersSteam* _tmp28_;
			GeeArrayList* _tmp29_;
			gint _runner_size = 0;
			GeeArrayList* _tmp30_;
			gint _tmp31_;
			gint _tmp32_;
			gint _runner_index = 0;
			_tmp28_ = steam;
			_tmp29_ = ((ProtonPlusModelsLauncher*) _tmp28_)->compatibility_tools;
			_runner_list = _tmp29_;
			_tmp30_ = _runner_list;
			_tmp31_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp30_);
			_tmp32_ = _tmp31_;
			_runner_size = _tmp32_;
			_runner_index = -1;
			while (TRUE) {
				gint _tmp33_;
				gint _tmp34_;
				ProtonPlusModelsSimpleRunner* runner = NULL;
				GeeArrayList* _tmp35_;
				gpointer _tmp36_;
				gboolean _tmp37_ = FALSE;
				ProtonPlusModelsSimpleRunner* _tmp38_;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				_runner_index = _runner_index + 1;
				_tmp33_ = _runner_index;
				_tmp34_ = _runner_size;
				if (!(_tmp33_ < _tmp34_)) {
					break;
				}
				_tmp35_ = _runner_list;
				_tmp36_ = gee_abstract_list_get ((GeeAbstractList*) _tmp35_, _runner_index);
				runner = (ProtonPlusModelsSimpleRunner*) _tmp36_;
				_tmp38_ = runner;
				_tmp39_ = proton_plus_models_simple_runner_get_internal_title (_tmp38_);
				_tmp40_ = _tmp39_;
				if (g_strcmp0 (_tmp40_, "proton_experimental") == 0) {
					_tmp37_ = TRUE;
				} else {
					ProtonPlusModelsSimpleRunner* _tmp41_;
					const gchar* _tmp42_;
					const gchar* _tmp43_;
					_tmp41_ = runner;
					_tmp42_ = proton_plus_models_simple_runner_get_internal_title (_tmp41_);
					_tmp43_ = _tmp42_;
					_tmp37_ = string_contains (_tmp43_, "proton");
				}
				if (_tmp37_) {
					ProtonPlusModelsSimpleRunner* _tmp44_;
					ProtonPlusModelsSimpleRunner* _tmp45_;
					_tmp44_ = runner;
					_tmp45_ = _g_object_ref0 (_tmp44_);
					_g_object_unref0 (selected_runner);
					selected_runner = _tmp45_;
					_g_object_unref0 (runner);
					break;
				}
				_g_object_unref0 (runner);
			}
		}
		_g_object_unref0 (steam);
	}
	_tmp47_ = selected_runner;
	if (_tmp47_ == NULL) {
		_tmp46_ = TRUE;
	} else {
		ProtonPlusModelsSimpleRunner* _tmp48_;
		const gchar* _tmp49_;
		const gchar* _tmp50_;
		_tmp48_ = selected_runner;
		_tmp49_ = proton_plus_models_simple_runner_get_path (_tmp48_);
		_tmp50_ = _tmp49_;
		_tmp46_ = _tmp50_ == NULL;
	}
	if (_tmp46_) {
		ProtonPlusWidgetsErrorDialog* dialog = NULL;
		ProtonPlusModelsGame* _tmp51_;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		gchar* _tmp54_;
		gchar* _tmp55_;
		ProtonPlusWidgetsErrorDialog* _tmp56_;
		ProtonPlusWidgetsErrorDialog* _tmp57_;
		ProtonPlusWidgetsErrorDialog* _tmp58_;
		ProtonPlusWidgetsWindow* _tmp59_;
		_tmp51_ = self->priv->game;
		_tmp52_ = proton_plus_models_game_get_name (_tmp51_);
		_tmp53_ = _tmp52_;
		_tmp54_ = g_strdup_printf (_ ("Couldn't find the compatibility tool for %s"), _tmp53_);
		_tmp55_ = _tmp54_;
		_tmp56_ = proton_plus_widgets_error_dialog_new (_tmp55_, _ ("Please make sure it's installed."));
		g_object_ref_sink (_tmp56_);
		_tmp57_ = _tmp56_;
		_g_free0 (_tmp55_);
		dialog = _tmp57_;
		_tmp58_ = dialog;
		_tmp59_ = proton_plus_widgets_application_window;
		adw_dialog_present ((AdwDialog*) _tmp58_, (GtkWidget*) _tmp59_);
		_g_object_unref0 (dialog);
		_g_object_unref0 (selected_runner);
		return;
	}
	_tmp60_ = selected_runner;
	_tmp61_ = proton_plus_models_simple_runner_get_path (_tmp60_);
	_tmp62_ = _tmp61_;
	_tmp63_ = g_strdup_printf ("%s/proton", _tmp62_);
	proton_path = _tmp63_;
	_tmp64_ = self->priv->game;
	_tmp65_ = proton_plus_models_game_get_prefixdir (_tmp64_);
	_tmp66_ = _tmp65_;
	_tmp67_ = g_strdup (_tmp66_);
	steam_compat_data_path = _tmp67_;
	_tmp68_ = self->priv->game;
	_tmp69_ = proton_plus_models_game_get_launcher (_tmp68_);
	_tmp70_ = _tmp69_;
	_tmp71_ = _tmp70_->directory;
	_tmp72_ = g_strdup (_tmp71_);
	steam_compat_client_install_path = _tmp72_;
	_tmp73_ = steam_compat_data_path;
	_tmp74_ = g_shell_quote (_tmp73_);
	_tmp75_ = _tmp74_;
	_tmp76_ = steam_compat_client_install_path;
	_tmp77_ = g_shell_quote (_tmp76_);
	_tmp78_ = _tmp77_;
	_tmp79_ = proton_path;
	_tmp80_ = g_shell_quote (_tmp79_);
	_tmp81_ = _tmp80_;
	_tmp82_ = g_shell_quote (exe_path);
	_tmp83_ = _tmp82_;
	_tmp84_ = g_strdup_printf ("STEAM_COMPAT_DATA_PATH=%s STEAM_COMPAT_CLIENT_INSTALL_PATH=%s %s run %" \
"s", _tmp75_, _tmp78_, _tmp81_, _tmp83_);
	_tmp85_ = _tmp84_;
	_g_free0 (_tmp83_);
	_g_free0 (_tmp81_);
	_g_free0 (_tmp78_);
	_g_free0 (_tmp75_);
	inner_command = _tmp85_;
	_tmp86_ = inner_command;
	_tmp87_ = g_shell_quote (_tmp86_);
	_tmp88_ = _tmp87_;
	_tmp89_ = g_strconcat ("sh -c ", _tmp88_, NULL);
	_tmp90_ = _tmp89_;
	proton_plus_utils_system_run_command (_tmp90_, NULL, NULL);
	_g_free0 (_tmp90_);
	_g_free0 (_tmp88_);
	_g_free0 (inner_command);
	_g_free0 (steam_compat_client_install_path);
	_g_free0 (steam_compat_data_path);
	_g_free0 (proton_path);
	_g_object_unref0 (selected_runner);
}

static void
_proton_plus_widgets_extra_button_open_install_directory_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                            gpointer self)
{
	proton_plus_widgets_extra_button_open_install_directory_button_clicked ((ProtonPlusWidgetsExtraButton*) self);
}

static void
_proton_plus_widgets_extra_button_open_prefix_directory_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                           gpointer self)
{
	proton_plus_widgets_extra_button_open_prefix_directory_button_clicked ((ProtonPlusWidgetsExtraButton*) self);
}

static void
_proton_plus_widgets_extra_button_open_protontricks_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                       gpointer self)
{
	proton_plus_widgets_extra_button_open_protontricks_button_clicked ((ProtonPlusWidgetsExtraButton*) self);
}

static void
_proton_plus_widgets_extra_button_run_custom_executable_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                           gpointer self)
{
	proton_plus_widgets_extra_button_run_custom_executable_button_clicked ((ProtonPlusWidgetsExtraButton*) self);
}

static void
_proton_plus_widgets_extra_button_extra_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self)
{
	proton_plus_widgets_extra_button_extra_button_clicked ((ProtonPlusWidgetsExtraButton*) self);
}

static GObject *
proton_plus_widgets_extra_button_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ProtonPlusWidgetsExtraButton * self;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	GtkButton* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkButton* _tmp10_;
	GtkBox* _tmp11_;
	GtkButton* _tmp12_;
	GtkPopover* _tmp13_;
	GtkPopover* _tmp14_;
	GtkPopover* _tmp15_;
	GtkPopover* _tmp16_;
	GtkBox* _tmp17_;
	parent_class = G_OBJECT_CLASS (proton_plus_widgets_extra_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButton);
	_tmp0_ = (GtkButton*) gtk_button_new_with_label (_ ("Open install directory"));
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->open_install_directory_button);
	self->priv->open_install_directory_button = _tmp0_;
	_tmp1_ = self->priv->open_install_directory_button;
	g_signal_connect_object (_tmp1_, "clicked", (GCallback) _proton_plus_widgets_extra_button_open_install_directory_button_clicked_gtk_button_clicked, self, 0);
	_tmp2_ = (GtkButton*) gtk_button_new_with_label (_ ("Open prefix directory"));
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->open_prefix_directory_button);
	self->priv->open_prefix_directory_button = _tmp2_;
	_tmp3_ = self->priv->open_prefix_directory_button;
	g_signal_connect_object (_tmp3_, "clicked", (GCallback) _proton_plus_widgets_extra_button_open_prefix_directory_button_clicked_gtk_button_clicked, self, 0);
	_tmp4_ = (GtkButton*) gtk_button_new_with_label (_ ("Open in protontricks"));
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->open_protontricks_button);
	self->priv->open_protontricks_button = _tmp4_;
	_tmp5_ = self->priv->open_protontricks_button;
	g_signal_connect_object (_tmp5_, "clicked", (GCallback) _proton_plus_widgets_extra_button_open_protontricks_button_clicked_gtk_button_clicked, self, 0);
	_tmp6_ = (GtkButton*) gtk_button_new_with_label (_ ("Run custom executable"));
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->run_custom_executable_button);
	self->priv->run_custom_executable_button = _tmp6_;
	_tmp7_ = self->priv->run_custom_executable_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _proton_plus_widgets_extra_button_run_custom_executable_button_clicked_gtk_button_clicked, self, 0);
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->content_box);
	self->priv->content_box = _tmp8_;
	_tmp9_ = self->priv->content_box;
	_tmp10_ = self->priv->open_install_directory_button;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = self->priv->content_box;
	_tmp12_ = self->priv->open_prefix_directory_button;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = (GtkPopover*) gtk_popover_new ();
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->popover);
	self->priv->popover = _tmp13_;
	_tmp14_ = self->priv->popover;
	gtk_popover_set_autohide (_tmp14_, TRUE);
	_tmp15_ = self->priv->popover;
	gtk_widget_set_parent ((GtkWidget*) _tmp15_, (GtkWidget*) self);
	_tmp16_ = self->priv->popover;
	_tmp17_ = self->priv->content_box;
	gtk_popover_set_child (_tmp16_, (GtkWidget*) _tmp17_);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _proton_plus_widgets_extra_button_extra_button_clicked_gtk_button_clicked, self, 0);
	gtk_button_set_icon_name ((GtkButton*) self, "dots-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _ ("Open menu"));
	gtk_widget_add_css_class ((GtkWidget*) self, "flat");
	return obj;
}

static void
proton_plus_widgets_extra_button_class_init (ProtonPlusWidgetsExtraButtonClass * klass,
                                             gpointer klass_data)
{
	proton_plus_widgets_extra_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsExtraButton_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) proton_plus_widgets_extra_button_real_dispose;
	G_OBJECT_CLASS (klass)->constructor = proton_plus_widgets_extra_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_extra_button_finalize;
}

static void
proton_plus_widgets_extra_button_instance_init (ProtonPlusWidgetsExtraButton * self,
                                                gpointer klass)
{
	self->priv = proton_plus_widgets_extra_button_get_instance_private (self);
}

static void
proton_plus_widgets_extra_button_finalize (GObject * obj)
{
	ProtonPlusWidgetsExtraButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_EXTRA_BUTTON, ProtonPlusWidgetsExtraButton);
	_g_object_unref0 (self->priv->game);
	_g_object_unref0 (self->priv->open_install_directory_button);
	_g_object_unref0 (self->priv->open_prefix_directory_button);
	_g_object_unref0 (self->priv->open_protontricks_button);
	_g_object_unref0 (self->priv->run_custom_executable_button);
	_g_object_unref0 (self->priv->content_box);
	_g_object_unref0 (self->priv->popover);
	G_OBJECT_CLASS (proton_plus_widgets_extra_button_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_extra_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsExtraButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_extra_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsExtraButton), 0, (GInstanceInitFunc) proton_plus_widgets_extra_button_instance_init, NULL };
	GType proton_plus_widgets_extra_button_type_id;
	proton_plus_widgets_extra_button_type_id = g_type_register_static (gtk_button_get_type (), "ProtonPlusWidgetsExtraButton", &g_define_type_info, 0);
	ProtonPlusWidgetsExtraButton_private_offset = g_type_add_instance_private (proton_plus_widgets_extra_button_type_id, sizeof (ProtonPlusWidgetsExtraButtonPrivate));
	return proton_plus_widgets_extra_button_type_id;
}

GType
proton_plus_widgets_extra_button_get_type (void)
{
	static volatile gsize proton_plus_widgets_extra_button_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_extra_button_type_id__once)) {
		GType proton_plus_widgets_extra_button_type_id;
		proton_plus_widgets_extra_button_type_id = proton_plus_widgets_extra_button_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_extra_button_type_id__once, proton_plus_widgets_extra_button_type_id);
	}
	return proton_plus_widgets_extra_button_type_id__once;
}

