/* assistant.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from assistant.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <handy.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include "common.h"
#include <osinfo/osinfo.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.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 BOXES_TYPE_ASSISTANT (boxes_assistant_get_type ())
#define BOXES_ASSISTANT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ASSISTANT, BoxesAssistant))
#define BOXES_ASSISTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ASSISTANT, BoxesAssistantClass))
#define BOXES_IS_ASSISTANT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ASSISTANT))
#define BOXES_IS_ASSISTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ASSISTANT))
#define BOXES_ASSISTANT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ASSISTANT, BoxesAssistantClass))

typedef struct _BoxesAssistant BoxesAssistant;
typedef struct _BoxesAssistantClass BoxesAssistantClass;
typedef struct _BoxesAssistantPrivate BoxesAssistantPrivate;

#define BOXES_TYPE_INSTALLER_MEDIA (boxes_installer_media_get_type ())
#define BOXES_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia))
#define BOXES_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))
#define BOXES_IS_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_IS_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_INSTALLER_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))

typedef struct _BoxesInstallerMedia BoxesInstallerMedia;
typedef struct _BoxesInstallerMediaClass BoxesInstallerMediaClass;

#define BOXES_TYPE_UNATTENDED_INSTALLER (boxes_unattended_installer_get_type ())
#define BOXES_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller))
#define BOXES_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))
#define BOXES_IS_UNATTENDED_INSTALLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_IS_UNATTENDED_INSTALLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UNATTENDED_INSTALLER))
#define BOXES_UNATTENDED_INSTALLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstallerClass))

typedef struct _BoxesUnattendedInstaller BoxesUnattendedInstaller;
typedef struct _BoxesUnattendedInstallerClass BoxesUnattendedInstallerClass;

#define BOXES_TYPE_VM_NAME_ROW (boxes_vm_name_row_get_type ())
#define BOXES_VM_NAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_NAME_ROW, BoxesVMNameRow))
#define BOXES_VM_NAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_NAME_ROW, BoxesVMNameRowClass))
#define BOXES_IS_VM_NAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_NAME_ROW))
#define BOXES_IS_VM_NAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_NAME_ROW))
#define BOXES_VM_NAME_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_NAME_ROW, BoxesVMNameRowClass))

typedef struct _BoxesVMNameRow BoxesVMNameRow;
typedef struct _BoxesVMNameRowClass BoxesVMNameRowClass;

#define BOXES_TYPE_OS_CHOOSER_ROW (boxes_os_chooser_row_get_type ())
#define BOXES_OS_CHOOSER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_OS_CHOOSER_ROW, BoxesOsChooserRow))
#define BOXES_OS_CHOOSER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_OS_CHOOSER_ROW, BoxesOsChooserRowClass))
#define BOXES_IS_OS_CHOOSER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_OS_CHOOSER_ROW))
#define BOXES_IS_OS_CHOOSER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_OS_CHOOSER_ROW))
#define BOXES_OS_CHOOSER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_OS_CHOOSER_ROW, BoxesOsChooserRowClass))

typedef struct _BoxesOsChooserRow BoxesOsChooserRow;
typedef struct _BoxesOsChooserRowClass BoxesOsChooserRowClass;

#define BOXES_TYPE_FIRMWARE_ROW (boxes_firmware_row_get_type ())
#define BOXES_FIRMWARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRow))
#define BOXES_FIRMWARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRowClass))
#define BOXES_IS_FIRMWARE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_FIRMWARE_ROW))
#define BOXES_IS_FIRMWARE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_FIRMWARE_ROW))
#define BOXES_FIRMWARE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_FIRMWARE_ROW, BoxesFirmwareRowClass))

typedef struct _BoxesFirmwareRow BoxesFirmwareRow;
typedef struct _BoxesFirmwareRowClass BoxesFirmwareRowClass;

#define BOXES_TYPE_EXPRESS_INSTALL_ROW (boxes_express_install_row_get_type ())
#define BOXES_EXPRESS_INSTALL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_EXPRESS_INSTALL_ROW, BoxesExpressInstallRow))
#define BOXES_EXPRESS_INSTALL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_EXPRESS_INSTALL_ROW, BoxesExpressInstallRowClass))
#define BOXES_IS_EXPRESS_INSTALL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_EXPRESS_INSTALL_ROW))
#define BOXES_IS_EXPRESS_INSTALL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_EXPRESS_INSTALL_ROW))
#define BOXES_EXPRESS_INSTALL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_EXPRESS_INSTALL_ROW, BoxesExpressInstallRowClass))

typedef struct _BoxesExpressInstallRow BoxesExpressInstallRow;
typedef struct _BoxesExpressInstallRowClass BoxesExpressInstallRowClass;

#define BOXES_TYPE_MEMORY_ROW (boxes_memory_row_get_type ())
#define BOXES_MEMORY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MEMORY_ROW, BoxesMemoryRow))
#define BOXES_MEMORY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MEMORY_ROW, BoxesMemoryRowClass))
#define BOXES_IS_MEMORY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MEMORY_ROW))
#define BOXES_IS_MEMORY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MEMORY_ROW))
#define BOXES_MEMORY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MEMORY_ROW, BoxesMemoryRowClass))

typedef struct _BoxesMemoryRow BoxesMemoryRow;
typedef struct _BoxesMemoryRowClass BoxesMemoryRowClass;

#define BOXES_TYPE_RAM_ROW (boxes_ram_row_get_type ())
#define BOXES_RAM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_RAM_ROW, BoxesRamRow))
#define BOXES_RAM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_RAM_ROW, BoxesRamRowClass))
#define BOXES_IS_RAM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_RAM_ROW))
#define BOXES_IS_RAM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_RAM_ROW))
#define BOXES_RAM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_RAM_ROW, BoxesRamRowClass))

typedef struct _BoxesRamRow BoxesRamRow;
typedef struct _BoxesRamRowClass BoxesRamRowClass;
enum  {
	BOXES_ASSISTANT_0_PROPERTY,
	BOXES_ASSISTANT_NUM_PROPERTIES
};
static GParamSpec* boxes_assistant_properties[BOXES_ASSISTANT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesAssistantSetupData BoxesAssistantSetupData;

#define BOXES_TYPE_MEDIA_MANAGER (boxes_media_manager_get_type ())
#define BOXES_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager))
#define BOXES_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))
#define BOXES_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))

typedef struct _BoxesMediaManager BoxesMediaManager;
typedef struct _BoxesMediaManagerClass BoxesMediaManagerClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesAssistantCreateInstallerMediaData BoxesAssistantCreateInstallerMediaData;
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
typedef struct _BoxesAssistantPrepareForPathData BoxesAssistantPrepareForPathData;

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _BoxesMemoryRowPrivate BoxesMemoryRowPrivate;
#define __vala_GVirStoragePoolInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirStoragePoolInfo_free (var), NULL)))
typedef struct _Block58Data Block58Data;
typedef struct _BoxesUnattendedInstallerPrivate BoxesUnattendedInstallerPrivate;

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_LIBVIRT_MACHINE (boxes_libvirt_machine_get_type ())
#define BOXES_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachine))
#define BOXES_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))
#define BOXES_IS_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_IS_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_LIBVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))

typedef struct _BoxesLibvirtMachine BoxesLibvirtMachine;
typedef struct _BoxesLibvirtMachineClass BoxesLibvirtMachineClass;
typedef struct _BoxesAssistantOnCreateButtonClickedData BoxesAssistantOnCreateButtonClickedData;

struct _BoxesAssistant {
	HdyWindow parent_instance;
	BoxesAssistantPrivate * priv;
};

struct _BoxesAssistantClass {
	HdyWindowClass parent_class;
};

struct _BoxesAssistantPrivate {
	BoxesInstallerMedia* installer_media;
	BoxesUnattendedInstaller* unattended_installer;
	GtkStack* pages;
	GtkBox* creating_page;
	GtkBox* error_page;
	HdyStatusPage* error_status_page;
	GtkBox* editing_page;
	GtkButton* create_button;
	BoxesVMNameRow* name_entry;
	BoxesOsChooserRow* os_chooser_row;
	BoxesFirmwareRow* firmware_row;
	BoxesExpressInstallRow* express_install_row;
	BoxesRamRow* ram_row;
	BoxesMemoryRow* storage_limit_row;
	HdyStatusPage* creating_status_page;
	GtkProgressBar* progress_bar;
	GCancellable* cancellable;
};

struct _BoxesAssistantSetupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesAssistant* self;
	gchar* path;
};

struct _BoxesAssistantCreateInstallerMediaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesAssistant* self;
	gchar* path;
	BoxesInstallerMedia* result;
	BoxesMediaManager* media_manager;
	BoxesMediaManager* _tmp0_;
	BoxesInstallerMedia* media;
	BoxesInstallerMedia* _tmp1_;
	GCancellable* _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	BoxesInstallerMedia* _tmp4_;
	GError* _error_;
	GError* _tmp5_;
	const gchar* _tmp6_;
	GError* _inner_error0_;
};

struct _BoxesInstallerMedia {
	GObject parent_instance;
	BoxesInstallerMediaPrivate * priv;
	OsinfoOs* os;
	OsinfoResources* resources;
	OsinfoMedia* os_media;
	gchar* label;
	gchar* device_file;
	gchar* mount_point;
	gboolean from_image;
};

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare) (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	BoxesVMCreator* (*get_vm_creator) (BoxesInstallerMedia* self);
	OsinfoDeviceList* (*get_supported_devices) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_prefers_q35) (BoxesInstallerMedia* self);
	gboolean (*get_prefers_ich9) (BoxesInstallerMedia* self);
	gboolean (*get_live) (BoxesInstallerMedia* self);
	gboolean (*get_eject_after_install) (BoxesInstallerMedia* self);
	gchar* (*get_architecture) (BoxesInstallerMedia* self);
};

struct _BoxesAssistantPrepareForPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesAssistant* self;
	gchar* path;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	BoxesInstallerMedia* _tmp2_;
	OsinfoOs* _tmp3_;
	BoxesOsChooserRow* _tmp4_;
	OsinfoOs* _tmp5_;
	OsinfoOs* _tmp6_;
	BoxesOsChooserRow* _tmp7_;
	OsinfoOs* _tmp8_;
	OsinfoOs* _tmp9_;
	const gchar* _tmp10_;
	BoxesOsChooserRow* _tmp11_;
	GtkStack* _tmp12_;
	GtkBox* _tmp13_;
};

struct _BoxesMemoryRow {
	HdyActionRow parent_instance;
	BoxesMemoryRowPrivate * priv;
	GtkStack* stack;
	GtkLabel* used_label;
	GtkSpinButton* spin_button;
};

struct _BoxesMemoryRowClass {
	HdyActionRowClass parent_class;
};

struct _Block58Data {
	int _ref_count_;
	BoxesAssistant* self;
	BoxesActivityProgress* progress;
};

struct _BoxesUnattendedInstaller {
	BoxesInstallerMedia parent_instance;
	BoxesUnattendedInstallerPrivate * priv;
	GFile* disk_file;
	GFile* kernel_file;
	GFile* initrd_file;
	OsinfoInstallConfig* config;
	OsinfoInstallScriptList* scripts;
	gchar* username;
	gchar* password;
	gchar* product_key;
};

struct _BoxesUnattendedInstallerClass {
	BoxesInstallerMediaClass parent_class;
};

struct _BoxesAssistantOnCreateButtonClickedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesAssistant* self;
	GtkButton* _tmp0_;
	BoxesExpressInstallRow* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	BoxesUnattendedInstaller* _tmp4_;
	BoxesInstallerMedia* _tmp5_;
	BoxesUnattendedInstaller* _tmp6_;
	BoxesExpressInstallRow* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	BoxesUnattendedInstaller* _tmp11_;
	BoxesExpressInstallRow* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	BoxesUnattendedInstaller* _tmp16_;
	BoxesExpressInstallRow* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	GtkStack* _tmp21_;
	GtkBox* _tmp22_;
	BoxesActivityProgress* progress;
	BoxesActivityProgress* _tmp23_;
	BoxesActivityProgress* _tmp24_;
	HdyStatusPage* _tmp25_;
	BoxesInstallerMedia* _tmp26_;
	BoxesActivityProgress* _tmp27_;
	GCancellable* _tmp28_;
	GtkButton* _tmp29_;
	BoxesVMCreator* vm_creator;
	BoxesInstallerMedia* _tmp30_;
	BoxesVMCreator* _tmp31_;
	BoxesLibvirtMachine* machine;
	BoxesVMCreator* _tmp32_;
	GCancellable* _tmp33_;
	BoxesLibvirtMachine* _tmp34_;
	BoxesLibvirtMachine* _tmp35_;
	BoxesVMNameRow* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	GVirConfigDomain* config;
	BoxesLibvirtMachine* _tmp39_;
	GVirDomain* _tmp40_;
	GVirDomain* _tmp41_;
	GVirConfigDomain* _tmp42_;
	GVirConfigDomain* _tmp43_;
	BoxesRamRow* _tmp44_;
	guint64 _tmp45_;
	guint64 _tmp46_;
	GVirConfigDomain* _tmp47_;
	GObjectClass* _tmp48_;
	GParamSpec* _tmp49_;
	GVirConfigDomain* _tmp50_;
	GVirConfigDomain* _tmp51_;
	guint64 _tmp52_;
	guint64 _tmp53_;
	BoxesLibvirtMachine* _tmp54_;
	GVirStorageVol* _tmp55_;
	GVirStorageVol* _tmp56_;
	BoxesMemoryRow* _tmp57_;
	guint64 _tmp58_;
	guint64 _tmp59_;
	BoxesFirmwareRow* _tmp60_;
	gboolean _tmp61_;
	gboolean _tmp62_;
	BoxesInstallerMedia* _tmp63_;
	GVirConfigDomain* _tmp64_;
	BoxesLibvirtMachine* _tmp65_;
	GVirDomain* _tmp66_;
	GVirDomain* _tmp67_;
	GVirConfigDomain* _tmp68_;
	GtkProgressBar* _tmp69_;
	BoxesInstallerMedia* _tmp70_;
	BoxesLibvirtMachine* _tmp71_;
	GVirDomain* _tmp72_;
	GVirDomain* _tmp73_;
	BoxesApp* _tmp74_;
	BoxesAppWindow* _tmp75_;
	BoxesAppWindow* _tmp76_;
	BoxesLibvirtMachine* _tmp77_;
	BoxesVMCreator* _tmp78_;
	BoxesLibvirtMachine* _tmp79_;
	GError* _error_;
	GError* _tmp80_;
	const gchar* _tmp81_;
	GError* _tmp82_;
	const gchar* _tmp83_;
	GtkButton* _tmp84_;
	GError* _inner_error0_;
};

static gint BoxesAssistant_private_offset;
static gpointer boxes_assistant_parent_class = NULL;
VALA_EXTERN BoxesApp* boxes_app_app;

VALA_EXTERN GType boxes_assistant_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesAssistant, g_object_unref)
VALA_EXTERN GType boxes_installer_media_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesInstallerMedia, g_object_unref)
VALA_EXTERN GType boxes_unattended_installer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUnattendedInstaller, g_object_unref)
VALA_EXTERN GType boxes_vm_name_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesVMNameRow, g_object_unref)
VALA_EXTERN GType boxes_os_chooser_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesOsChooserRow, g_object_unref)
VALA_EXTERN GType boxes_firmware_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesFirmwareRow, g_object_unref)
VALA_EXTERN GType boxes_express_install_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesExpressInstallRow, g_object_unref)
VALA_EXTERN GType boxes_memory_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesMemoryRow, g_object_unref)
VALA_EXTERN GType boxes_ram_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesRamRow, g_object_unref)
VALA_EXTERN GType boxes_app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesAppWindow, g_object_unref)
VALA_EXTERN BoxesAssistant* boxes_assistant_new (BoxesAppWindow* app_window,
                                     const gchar* path);
VALA_EXTERN BoxesAssistant* boxes_assistant_construct (GType object_type,
                                           BoxesAppWindow* app_window,
                                           const gchar* path);
static void boxes_assistant_setup (BoxesAssistant* self,
                            const gchar* path,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_);
static void boxes_assistant_setup_finish (BoxesAssistant* self,
                                   GAsyncResult* _res_);
static void boxes_assistant_setup_data_free (gpointer _data);
static gboolean boxes_assistant_setup_co (BoxesAssistantSetupData* _data_);
VALA_EXTERN void boxes_check_libvirt_kvm (GAsyncReadyCallback _callback_,
                              gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_libvirt_kvm_finish (GAsyncResult* _res_);
static void boxes_assistant_setup_ready (GObject* source_object,
                                  GAsyncResult* _res_,
                                  gpointer _user_data_);
static void boxes_assistant_show_error (BoxesAssistant* self,
                                 const gchar* reason);
static void boxes_assistant_prepare_for_path (BoxesAssistant* self,
                                       const gchar* path,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
static void boxes_assistant_prepare_for_path_finish (BoxesAssistant* self,
                                              GAsyncResult* _res_);
static void boxes_assistant_create_installer_media_data_free (gpointer _data);
static void boxes_assistant_create_installer_media (BoxesAssistant* self,
                                             const gchar* path,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static BoxesInstallerMedia* boxes_assistant_create_installer_media_finish (BoxesAssistant* self,
                                                                    GAsyncResult* _res_);
static gboolean boxes_assistant_create_installer_media_co (BoxesAssistantCreateInstallerMediaData* _data_);
VALA_EXTERN GType boxes_media_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesMediaManager, g_object_unref)
VALA_EXTERN BoxesMediaManager* boxes_media_manager_get_default (void);
VALA_EXTERN void boxes_media_manager_create_installer_media_for_path (BoxesMediaManager* self,
                                                          const gchar* path,
                                                          GCancellable* cancellable,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
VALA_EXTERN BoxesInstallerMedia* boxes_media_manager_create_installer_media_for_path_finish (BoxesMediaManager* self,
                                                                                 GAsyncResult* _res_,
                                                                                 GError** error);
static void boxes_assistant_create_installer_media_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void boxes_assistant_prepare_for_path_data_free (gpointer _data);
static gboolean boxes_assistant_prepare_for_path_co (BoxesAssistantPrepareForPathData* _data_);
static void boxes_assistant_prepare_for_path_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
VALA_EXTERN GType boxes_vm_creator_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesVMCreator, g_object_unref)
VALA_EXTERN void boxes_os_chooser_row_select_os (BoxesOsChooserRow* self,
                                     OsinfoOs* os);
static OsinfoOs* boxes_assistant_get_os (BoxesAssistant* self);
static void boxes_assistant_update_rows (BoxesAssistant* self);
VALA_EXTERN void boxes_vm_name_row_set_text (BoxesVMNameRow* self,
                                 const gchar* value);
VALA_EXTERN gboolean boxes_installer_media_get_supports_efi (BoxesInstallerMedia* self);
VALA_EXTERN gboolean boxes_installer_media_get_requires_efi (BoxesInstallerMedia* self);
static void boxes_assistant_setup_resource_rows (BoxesAssistant* self);
VALA_EXTERN gboolean boxes_installer_media_get_supports_express_install (BoxesInstallerMedia* self);
VALA_EXTERN OsinfoResources* boxes_os_database_get_recommended_resources_for_os (OsinfoOs* os,
                                                                     const gchar* architecture);
VALA_EXTERN OsinfoResources* boxes_os_database_get_default_resources (void);
VALA_EXTERN void boxes_memory_row_set_memory (BoxesMemoryRow* self,
                                  guint64 value);
VALA_EXTERN GVirStoragePool* boxes_get_storage_pool (GVirConnection* connection);
VALA_EXTERN GType boxes_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesApp, g_object_unref)
VALA_EXTERN GVirConnection* boxes_app_get_default_connection (BoxesApp* self);
static void _vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self);
static void boxes_assistant_setup_express_install_row (BoxesAssistant* self);
VALA_EXTERN gboolean boxes_express_install_row_get_enabled (BoxesExpressInstallRow* self);
VALA_EXTERN BoxesInstallerMedia* boxes_media_manager_create_unattended_installer (BoxesInstallerMedia* media,
                                                                      GError** error);
VALA_EXTERN gboolean boxes_unattended_installer_get_needs_password (BoxesUnattendedInstaller* self);
VALA_EXTERN void boxes_express_install_row_set_needs_password (BoxesExpressInstallRow* self,
                                                   gboolean value);
VALA_EXTERN gchar* boxes_unattended_installer_get_product_key_format (BoxesUnattendedInstaller* self);
VALA_EXTERN void boxes_express_install_row_set_product_key_format (BoxesExpressInstallRow* self,
                                                       const gchar* value);
VALA_EXTERN gboolean boxes_express_install_row_get_ready_to_install (BoxesExpressInstallRow* self);
static void ___lambda47_ (BoxesAssistant* self);
static void ____lambda47__boxes_express_install_row_credentials_changed (BoxesExpressInstallRow* _sender,
                                                                  gpointer self);
static void _boxes_assistant_setup_express_install_row_g_object_notify (GObject* _sender,
                                                                 GParamSpec* pspec,
                                                                 gpointer self);
static void boxes_assistant_on_os_selected_cb (BoxesAssistant* self,
                                        OsinfoOs* os);
static void _boxes_assistant_on_os_selected_cb_boxes_os_chooser_row_os_selected (BoxesOsChooserRow* _sender,
                                                                          OsinfoOs* os,
                                                                          gpointer self);
static BoxesActivityProgress* boxes_assistant_create_preparation_progress (BoxesAssistant* self);
static Block58Data* block58_data_ref (Block58Data* _data58_);
static void block58_data_unref (void * _userdata_);
static void __lambda48_ (Block58Data* _data58_);
static void ___lambda48__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void boxes_assistant_on_create_button_clicked_data_free (gpointer _data);
static void boxes_assistant_on_create_button_clicked (BoxesAssistant* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static void boxes_assistant_on_create_button_clicked_finish (BoxesAssistant* self,
                                                      GAsyncResult* _res_);
static gboolean boxes_assistant_on_create_button_clicked_co (BoxesAssistantOnCreateButtonClickedData* _data_);
VALA_EXTERN const gchar* boxes_express_install_row_get_username (BoxesExpressInstallRow* self);
VALA_EXTERN const gchar* boxes_express_install_row_get_password (BoxesExpressInstallRow* self);
VALA_EXTERN const gchar* boxes_express_install_row_get_product_key (BoxesExpressInstallRow* self);
VALA_EXTERN void boxes_installer_media_prepare (BoxesInstallerMedia* self,
                                    BoxesActivityProgress* progress,
                                    GCancellable* cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN gboolean boxes_installer_media_prepare_finish (BoxesInstallerMedia* self,
                                               GAsyncResult* _res_);
static void boxes_assistant_on_create_button_clicked_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
VALA_EXTERN BoxesVMCreator* boxes_installer_media_get_vm_creator (BoxesInstallerMedia* self);
VALA_EXTERN GType boxes_collection_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesCollectionItem, g_object_unref)
VALA_EXTERN GType boxes_machine_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesMachine, g_object_unref)
VALA_EXTERN GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesLibvirtMachine, g_object_unref)
VALA_EXTERN void boxes_vm_creator_create_vm (BoxesVMCreator* self,
                                 GCancellable* cancellable,
                                 gboolean clone,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_);
VALA_EXTERN BoxesLibvirtMachine* boxes_vm_creator_create_vm_finish (BoxesVMCreator* self,
                                                        GAsyncResult* _res_,
                                                        GError** error);
VALA_EXTERN const gchar* boxes_vm_name_row_get_text (BoxesVMNameRow* self);
VALA_EXTERN void boxes_libvirt_machine_set_title (BoxesLibvirtMachine* self,
                                      const gchar* value);
VALA_EXTERN GVirDomain* boxes_libvirt_machine_get_domain (BoxesLibvirtMachine* self);
VALA_EXTERN guint64 boxes_memory_row_get_memory (BoxesMemoryRow* self);
VALA_EXTERN GVirStorageVol* boxes_libvirt_machine_get_storage_volume (BoxesLibvirtMachine* self);
VALA_EXTERN gboolean boxes_firmware_row_get_is_uefi (BoxesFirmwareRow* self);
VALA_EXTERN void boxes_installer_media_set_uefi_firmware (BoxesInstallerMedia* self,
                                              GVirConfigDomain* domain,
                                              gboolean use_uefi);
VALA_EXTERN BoxesAppWindow* boxes_app_get_main_window (BoxesApp* self);
VALA_EXTERN void boxes_app_window_select_item (BoxesAppWindow* self,
                                   BoxesCollectionItem* item);
VALA_EXTERN void boxes_vm_creator_launch_vm (BoxesVMCreator* self,
                                 BoxesLibvirtMachine* machine,
                                 gint64 access_last_time,
                                 gboolean clone,
                                 GError** error);
static void _boxes_assistant_on_create_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                   gpointer self);
static void boxes_assistant_real_destroy (GtkWidget* base);
static void boxes_assistant_finalize (GObject * obj);
static GType boxes_assistant_get_type_once (void);
static void _vala_boxes_assistant_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);

static inline gpointer
boxes_assistant_get_instance_private (BoxesAssistant* self)
{
	return G_STRUCT_MEMBER_P (self, BoxesAssistant_private_offset);
}

BoxesAssistant*
boxes_assistant_construct (GType object_type,
                           BoxesAppWindow* app_window,
                           const gchar* path)
{
	BoxesAssistant * self = NULL;
	g_return_val_if_fail (app_window != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	self = (BoxesAssistant*) g_object_new (object_type, NULL);
	gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) app_window);
	boxes_assistant_setup (self, path, NULL, NULL);
	return self;
}

BoxesAssistant*
boxes_assistant_new (BoxesAppWindow* app_window,
                     const gchar* path)
{
	return boxes_assistant_construct (BOXES_TYPE_ASSISTANT, app_window, path);
}

static void
boxes_assistant_setup_data_free (gpointer _data)
{
	BoxesAssistantSetupData* _data_;
	_data_ = _data;
	_g_free0 (_data_->path);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAssistantSetupData, _data_);
}

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

static void
boxes_assistant_setup (BoxesAssistant* self,
                       const gchar* path,
                       GAsyncReadyCallback _callback_,
                       gpointer _user_data_)
{
	BoxesAssistantSetupData* _data_;
	BoxesAssistant* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_data_ = g_slice_new0 (BoxesAssistantSetupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_assistant_setup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (path);
	_g_free0 (_data_->path);
	_data_->path = _tmp1_;
	boxes_assistant_setup_co (_data_);
}

static void
boxes_assistant_setup_finish (BoxesAssistant* self,
                              GAsyncResult* _res_)
{
	BoxesAssistantSetupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
boxes_assistant_setup_ready (GObject* source_object,
                             GAsyncResult* _res_,
                             gpointer _user_data_)
{
	BoxesAssistantSetupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_assistant_setup_co (_data_);
}

static gboolean
boxes_assistant_setup_co (BoxesAssistantSetupData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	boxes_check_libvirt_kvm (boxes_assistant_setup_ready, _data_);
	return FALSE;
	_state_1:
	if (!boxes_check_libvirt_kvm_finish (_data_->_res_)) {
		boxes_assistant_show_error (_data_->self, "No KVM!\n");
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 2;
	boxes_assistant_prepare_for_path (_data_->self, _data_->path, boxes_assistant_setup_ready, _data_);
	return FALSE;
	_state_2:
	boxes_assistant_prepare_for_path_finish (_data_->self, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_assistant_create_installer_media_data_free (gpointer _data)
{
	BoxesAssistantCreateInstallerMediaData* _data_;
	_data_ = _data;
	_g_free0 (_data_->path);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAssistantCreateInstallerMediaData, _data_);
}

static void
boxes_assistant_create_installer_media (BoxesAssistant* self,
                                        const gchar* path,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	BoxesAssistantCreateInstallerMediaData* _data_;
	BoxesAssistant* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_data_ = g_slice_new0 (BoxesAssistantCreateInstallerMediaData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_assistant_create_installer_media_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (path);
	_g_free0 (_data_->path);
	_data_->path = _tmp1_;
	boxes_assistant_create_installer_media_co (_data_);
}

static BoxesInstallerMedia*
boxes_assistant_create_installer_media_finish (BoxesAssistant* self,
                                               GAsyncResult* _res_)
{
	BoxesInstallerMedia* result;
	BoxesAssistantCreateInstallerMediaData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_assistant_create_installer_media_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	BoxesAssistantCreateInstallerMediaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_assistant_create_installer_media_co (_data_);
}

static gboolean
boxes_assistant_create_installer_media_co (BoxesAssistantCreateInstallerMediaData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_media_manager_get_default ();
	_data_->media_manager = _data_->_tmp0_;
	_data_->media = NULL;
	{
		_data_->_tmp2_ = _data_->self->priv->cancellable;
		_data_->_state_ = 1;
		boxes_media_manager_create_installer_media_for_path (_data_->media_manager, _data_->path, _data_->_tmp2_, boxes_assistant_create_installer_media_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = boxes_media_manager_create_installer_media_for_path_finish (_data_->media_manager, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->_tmp1_;
		_data_->_tmp1_ = NULL;
		_g_object_unref0 (_data_->media);
		_data_->media = _data_->_tmp4_;
		_g_object_unref0 (_data_->_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp5_ = _data_->_error_;
		_data_->_tmp6_ = _data_->_tmp5_->message;
		boxes_assistant_show_error (_data_->self, _data_->_tmp6_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->media);
		_g_object_unref0 (_data_->media_manager);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->media;
	_g_object_unref0 (_data_->media_manager);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_assistant_prepare_for_path_data_free (gpointer _data)
{
	BoxesAssistantPrepareForPathData* _data_;
	_data_ = _data;
	_g_free0 (_data_->path);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAssistantPrepareForPathData, _data_);
}

static void
boxes_assistant_prepare_for_path (BoxesAssistant* self,
                                  const gchar* path,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	BoxesAssistantPrepareForPathData* _data_;
	BoxesAssistant* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_data_ = g_slice_new0 (BoxesAssistantPrepareForPathData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_assistant_prepare_for_path_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (path);
	_g_free0 (_data_->path);
	_data_->path = _tmp1_;
	boxes_assistant_prepare_for_path_co (_data_);
}

static void
boxes_assistant_prepare_for_path_finish (BoxesAssistant* self,
                                         GAsyncResult* _res_)
{
	BoxesAssistantPrepareForPathData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
boxes_assistant_prepare_for_path_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	BoxesAssistantPrepareForPathData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_assistant_prepare_for_path_co (_data_);
}

static gboolean
boxes_assistant_prepare_for_path_co (BoxesAssistantPrepareForPathData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	boxes_assistant_create_installer_media (_data_->self, _data_->path, boxes_assistant_prepare_for_path_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = boxes_assistant_create_installer_media_finish (_data_->self, _data_->_res_);
	_g_object_unref0 (_data_->self->priv->installer_media);
	_data_->self->priv->installer_media = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->self->priv->installer_media;
	if (_data_->_tmp1_ == NULL) {
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp2_ = _data_->self->priv->installer_media;
	_data_->_tmp3_ = _data_->_tmp2_->os;
	if (_data_->_tmp3_ != NULL) {
		_data_->_tmp4_ = _data_->self->priv->os_chooser_row;
		_data_->_tmp5_ = boxes_assistant_get_os (_data_->self);
		_data_->_tmp6_ = _data_->_tmp5_;
		boxes_os_chooser_row_select_os (_data_->_tmp4_, _data_->_tmp6_);
		_data_->_tmp7_ = _data_->self->priv->os_chooser_row;
		_data_->_tmp8_ = boxes_assistant_get_os (_data_->self);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = osinfo_product_get_name ((OsinfoProduct*) _data_->_tmp9_);
		hdy_expander_row_set_subtitle ((HdyExpanderRow*) _data_->_tmp7_, _data_->_tmp10_);
	} else {
		_data_->_tmp11_ = _data_->self->priv->os_chooser_row;
		hdy_expander_row_set_expanded ((HdyExpanderRow*) _data_->_tmp11_, TRUE);
	}
	boxes_assistant_update_rows (_data_->self);
	_data_->_tmp12_ = _data_->self->priv->pages;
	_data_->_tmp13_ = _data_->self->priv->editing_page;
	gtk_stack_set_visible_child (_data_->_tmp12_, (GtkWidget*) _data_->_tmp13_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_assistant_update_rows (BoxesAssistant* self)
{
	BoxesVMNameRow* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	BoxesInstallerMedia* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	BoxesFirmwareRow* _tmp10_;
	OsinfoOs* _tmp11_;
	OsinfoOs* _tmp12_;
	BoxesExpressInstallRow* _tmp17_;
	BoxesInstallerMedia* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_entry;
	_tmp1_ = self->priv->installer_media;
	_tmp2_ = _tmp1_->label;
	boxes_vm_name_row_set_text (_tmp0_, _tmp2_);
	_tmp4_ = self->priv->installer_media;
	_tmp5_ = boxes_installer_media_get_supports_efi (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		BoxesInstallerMedia* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = self->priv->installer_media;
		_tmp8_ = boxes_installer_media_get_requires_efi (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp3_ = !_tmp9_;
	} else {
		_tmp3_ = FALSE;
	}
	_tmp10_ = self->priv->firmware_row;
	gtk_widget_set_visible ((GtkWidget*) _tmp10_, _tmp3_);
	_tmp11_ = boxes_assistant_get_os (self);
	_tmp12_ = _tmp11_;
	if (_tmp12_ != NULL) {
		BoxesOsChooserRow* _tmp13_;
		OsinfoOs* _tmp14_;
		OsinfoOs* _tmp15_;
		const gchar* _tmp16_;
		_tmp13_ = self->priv->os_chooser_row;
		_tmp14_ = boxes_assistant_get_os (self);
		_tmp15_ = _tmp14_;
		_tmp16_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp15_);
		hdy_expander_row_set_subtitle ((HdyExpanderRow*) _tmp13_, _tmp16_);
	}
	boxes_assistant_setup_resource_rows (self);
	_tmp17_ = self->priv->express_install_row;
	_tmp18_ = self->priv->installer_media;
	_tmp19_ = boxes_installer_media_get_supports_express_install (_tmp18_);
	_tmp20_ = _tmp19_;
	gtk_widget_set_visible ((GtkWidget*) _tmp17_, _tmp20_);
}

static void
_vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self)
{
	g_boxed_free (gvir_storage_pool_info_get_type (), self);
}

static void
boxes_assistant_setup_resource_rows (BoxesAssistant* self)
{
	OsinfoResources* resources = NULL;
	OsinfoOs* _tmp0_;
	OsinfoOs* _tmp1_;
	OsinfoResources* _tmp5_;
	BoxesRamRow* _tmp7_;
	OsinfoResources* _tmp8_;
	gint64 _tmp9_;
	gint64 _tmp10_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	resources = NULL;
	_tmp0_ = boxes_assistant_get_os (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		OsinfoOs* _tmp2_;
		OsinfoOs* _tmp3_;
		OsinfoResources* _tmp4_;
		_tmp2_ = boxes_assistant_get_os (self);
		_tmp3_ = _tmp2_;
		_tmp4_ = boxes_os_database_get_recommended_resources_for_os (_tmp3_, NULL);
		_g_object_unref0 (resources);
		resources = _tmp4_;
	}
	_tmp5_ = resources;
	if (_tmp5_ == NULL) {
		OsinfoResources* _tmp6_;
		_tmp6_ = boxes_os_database_get_default_resources ();
		_g_object_unref0 (resources);
		resources = _tmp6_;
	}
	_tmp7_ = self->priv->ram_row;
	_tmp8_ = resources;
	_tmp9_ = osinfo_resources_get_ram (_tmp8_);
	_tmp10_ = _tmp9_;
	boxes_memory_row_set_memory ((BoxesMemoryRow*) _tmp7_, (guint64) (_tmp10_ / OSINFO_KIBIBYTES));
	{
		GVirStoragePool* storage_pool = NULL;
		BoxesApp* _tmp11_;
		GVirConnection* _tmp12_;
		GVirConnection* _tmp13_;
		GVirConnection* _tmp14_;
		GVirStoragePool* _tmp15_;
		GVirStoragePool* _tmp16_;
		GVirStoragePoolInfo* pool_info = NULL;
		GVirStoragePoolInfo* _tmp17_;
		gdouble max_storage = 0.0;
		BoxesMemoryRow* _tmp18_;
		GtkSpinButton* _tmp19_;
		BoxesMemoryRow* _tmp20_;
		GtkSpinButton* _tmp21_;
		BoxesMemoryRow* _tmp22_;
		GtkSpinButton* _tmp23_;
		BoxesMemoryRow* _tmp24_;
		OsinfoResources* _tmp25_;
		gint64 _tmp26_;
		gint64 _tmp27_;
		_tmp11_ = boxes_app_app;
		_tmp12_ = boxes_app_get_default_connection (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_;
		_tmp15_ = boxes_get_storage_pool (_tmp14_);
		_tmp16_ = _tmp15_;
		_g_object_unref0 (_tmp14_);
		storage_pool = _tmp16_;
		_tmp17_ = gvir_storage_pool_get_info (storage_pool, &_inner_error0_);
		pool_info = _tmp17_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (storage_pool);
			goto __catch0_g_error;
		}
		_tmp18_ = self->priv->storage_limit_row;
		_tmp19_ = _tmp18_->spin_button;
		max_storage = gtk_spin_button_get_value (_tmp19_) + pool_info->available;
		_tmp20_ = self->priv->storage_limit_row;
		_tmp21_ = _tmp20_->spin_button;
		gtk_spin_button_set_increments (_tmp21_, (gdouble) ((256 * 1000) * 1000), max_storage);
		_tmp22_ = self->priv->storage_limit_row;
		_tmp23_ = _tmp22_->spin_button;
		gtk_spin_button_set_range (_tmp23_, (gdouble) 0, max_storage);
		_tmp24_ = self->priv->storage_limit_row;
		_tmp25_ = resources;
		_tmp26_ = osinfo_resources_get_storage (_tmp25_);
		_tmp27_ = _tmp26_;
		boxes_memory_row_set_memory (_tmp24_, (guint64) (_tmp27_ / OSINFO_KIBIBYTES));
		__vala_GVirStoragePoolInfo_free0 (pool_info);
		_g_object_unref0 (storage_pool);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp28_;
		const gchar* _tmp29_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp28_ = _error_;
		_tmp29_ = _tmp28_->message;
		g_warning ("assistant.vala:125: Failed to estimate maximum available storage: %s", _tmp29_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (resources);
		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;
	}
	_g_object_unref0 (resources);
}

static void
___lambda47_ (BoxesAssistant* self)
{
	GtkButton* _tmp0_;
	BoxesExpressInstallRow* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->create_button;
	_tmp1_ = self->priv->express_install_row;
	_tmp2_ = boxes_express_install_row_get_ready_to_install (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp3_);
}

static void
____lambda47__boxes_express_install_row_credentials_changed (BoxesExpressInstallRow* _sender,
                                                             gpointer self)
{
	___lambda47_ ((BoxesAssistant*) self);
}

static void
boxes_assistant_setup_express_install_row (BoxesAssistant* self)
{
	BoxesExpressInstallRow* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->express_install_row;
	_tmp1_ = boxes_express_install_row_get_enabled (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	{
		BoxesInstallerMedia* _tmp3_ = NULL;
		BoxesInstallerMedia* _tmp4_;
		BoxesInstallerMedia* _tmp5_;
		BoxesUnattendedInstaller* _tmp6_;
		BoxesExpressInstallRow* _tmp7_;
		BoxesUnattendedInstaller* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		BoxesExpressInstallRow* _tmp11_;
		BoxesUnattendedInstaller* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		GtkButton* _tmp15_;
		BoxesExpressInstallRow* _tmp16_;
		gboolean _tmp17_;
		gboolean _tmp18_;
		BoxesExpressInstallRow* _tmp19_;
		_tmp4_ = self->priv->installer_media;
		_tmp5_ = boxes_media_manager_create_unattended_installer (_tmp4_, &_inner_error0_);
		_tmp3_ = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, BOXES_TYPE_UNATTENDED_INSTALLER, BoxesUnattendedInstaller));
		_g_object_unref0 (self->priv->unattended_installer);
		self->priv->unattended_installer = _tmp6_;
		_tmp7_ = self->priv->express_install_row;
		_tmp8_ = self->priv->unattended_installer;
		_tmp9_ = boxes_unattended_installer_get_needs_password (_tmp8_);
		_tmp10_ = _tmp9_;
		boxes_express_install_row_set_needs_password (_tmp7_, _tmp10_);
		_tmp11_ = self->priv->express_install_row;
		_tmp12_ = self->priv->unattended_installer;
		_tmp13_ = boxes_unattended_installer_get_product_key_format (_tmp12_);
		_tmp14_ = _tmp13_;
		boxes_express_install_row_set_product_key_format (_tmp11_, _tmp14_);
		_g_free0 (_tmp14_);
		_tmp15_ = self->priv->create_button;
		_tmp16_ = self->priv->express_install_row;
		_tmp17_ = boxes_express_install_row_get_ready_to_install (_tmp16_);
		_tmp18_ = _tmp17_;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, _tmp18_);
		_tmp19_ = self->priv->express_install_row;
		g_signal_connect_object (_tmp19_, "credentials-changed", (GCallback) ____lambda47__boxes_express_install_row_credentials_changed, self, 0);
		_g_object_unref0 (_tmp3_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp20_ = _error_;
		_tmp21_ = _tmp20_->message;
		_tmp22_ = g_strdup_printf (_ ("Failed to prepare express installation: %s"), _tmp21_);
		_tmp23_ = _tmp22_;
		boxes_assistant_show_error (self, _tmp23_);
		_g_free0 (_tmp23_);
		_g_error_free0 (_error_);
	}
	__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
_boxes_assistant_setup_express_install_row_g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self)
{
	boxes_assistant_setup_express_install_row ((BoxesAssistant*) self);
}

static void
boxes_assistant_on_os_selected_cb (BoxesAssistant* self,
                                   OsinfoOs* os)
{
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->installer_media;
	_tmp1_ = _g_object_ref0 (os);
	_g_object_unref0 (_tmp0_->os);
	_tmp0_->os = _tmp1_;
	boxes_assistant_update_rows (self);
}

static void
_boxes_assistant_on_os_selected_cb_boxes_os_chooser_row_os_selected (BoxesOsChooserRow* _sender,
                                                                     OsinfoOs* os,
                                                                     gpointer self)
{
	boxes_assistant_on_os_selected_cb ((BoxesAssistant*) self, os);
}

static Block58Data*
block58_data_ref (Block58Data* _data58_)
{
	g_atomic_int_inc (&_data58_->_ref_count_);
	return _data58_;
}

static void
block58_data_unref (void * _userdata_)
{
	Block58Data* _data58_;
	_data58_ = (Block58Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data58_->_ref_count_)) {
		BoxesAssistant* self;
		self = _data58_->self;
		_g_object_unref0 (_data58_->progress);
		_g_object_unref0 (self);
		g_slice_free (Block58Data, _data58_);
	}
}

static void
__lambda48_ (Block58Data* _data58_)
{
	BoxesAssistant* self;
	gdouble _tmp0_;
	gdouble _tmp1_;
	GtkProgressBar* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	self = _data58_->self;
	_tmp0_ = boxes_activity_progress_get_progress (_data58_->progress);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->progress_bar;
	_tmp3_ = gtk_progress_bar_get_fraction (_tmp2_);
	_tmp4_ = _tmp3_;
	if ((_tmp1_ - _tmp4_) >= 0.01) {
		GtkProgressBar* _tmp5_;
		gdouble _tmp6_;
		gdouble _tmp7_;
		_tmp5_ = self->priv->progress_bar;
		_tmp6_ = boxes_activity_progress_get_progress (_data58_->progress);
		_tmp7_ = _tmp6_;
		gtk_progress_bar_set_fraction (_tmp5_, _tmp7_);
	}
}

static void
___lambda48__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda48_ (self);
}

static BoxesActivityProgress*
boxes_assistant_create_preparation_progress (BoxesAssistant* self)
{
	Block58Data* _data58_;
	BoxesActivityProgress* _tmp0_;
	GtkProgressBar* _tmp1_;
	BoxesActivityProgress* _tmp2_;
	BoxesActivityProgress* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data58_ = g_slice_new0 (Block58Data);
	_data58_->_ref_count_ = 1;
	_data58_->self = g_object_ref (self);
	_tmp0_ = boxes_activity_progress_new ();
	_data58_->progress = _tmp0_;
	g_signal_connect_data ((GObject*) _data58_->progress, "notify::progress", (GCallback) ___lambda48__g_object_notify, block58_data_ref (_data58_), (GClosureNotify) block58_data_unref, 0);
	_tmp1_ = self->priv->progress_bar;
	boxes_activity_progress_set_progress (_data58_->progress, (gdouble) 0);
	gtk_progress_bar_set_fraction (_tmp1_, (gdouble) 0);
	_tmp2_ = _g_object_ref0 (_data58_->progress);
	result = _tmp2_;
	block58_data_unref (_data58_);
	_data58_ = NULL;
	return result;
}

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

static void
boxes_assistant_on_create_button_clicked (BoxesAssistant* self,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	BoxesAssistantOnCreateButtonClickedData* _data_;
	BoxesAssistant* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (BoxesAssistantOnCreateButtonClickedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_assistant_on_create_button_clicked_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_assistant_on_create_button_clicked_co (_data_);
}

static void
boxes_assistant_on_create_button_clicked_finish (BoxesAssistant* self,
                                                 GAsyncResult* _res_)
{
	BoxesAssistantOnCreateButtonClickedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
boxes_assistant_on_create_button_clicked_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	BoxesAssistantOnCreateButtonClickedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_assistant_on_create_button_clicked_co (_data_);
}

static gboolean
boxes_assistant_on_create_button_clicked_co (BoxesAssistantOnCreateButtonClickedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->create_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp0_, FALSE);
	{
		_data_->_tmp1_ = _data_->self->priv->express_install_row;
		_data_->_tmp2_ = boxes_express_install_row_get_enabled (_data_->_tmp1_);
		_data_->_tmp3_ = _data_->_tmp2_;
		if (_data_->_tmp3_) {
			_data_->_tmp4_ = _data_->self->priv->unattended_installer;
			_data_->_tmp5_ = _g_object_ref0 ((BoxesInstallerMedia*) _data_->_tmp4_);
			_g_object_unref0 (_data_->self->priv->installer_media);
			_data_->self->priv->installer_media = _data_->_tmp5_;
			_data_->_tmp6_ = _data_->self->priv->unattended_installer;
			_data_->_tmp7_ = _data_->self->priv->express_install_row;
			_data_->_tmp8_ = boxes_express_install_row_get_username (_data_->_tmp7_);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = g_strdup (_data_->_tmp9_);
			_g_free0 (_data_->_tmp6_->username);
			_data_->_tmp6_->username = _data_->_tmp10_;
			_data_->_tmp11_ = _data_->self->priv->unattended_installer;
			_data_->_tmp12_ = _data_->self->priv->express_install_row;
			_data_->_tmp13_ = boxes_express_install_row_get_password (_data_->_tmp12_);
			_data_->_tmp14_ = _data_->_tmp13_;
			_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
			_g_free0 (_data_->_tmp11_->password);
			_data_->_tmp11_->password = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->self->priv->unattended_installer;
			_data_->_tmp17_ = _data_->self->priv->express_install_row;
			_data_->_tmp18_ = boxes_express_install_row_get_product_key (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp20_ = g_strdup (_data_->_tmp19_);
			_g_free0 (_data_->_tmp16_->product_key);
			_data_->_tmp16_->product_key = _data_->_tmp20_;
			_data_->_tmp21_ = _data_->self->priv->pages;
			_data_->_tmp22_ = _data_->self->priv->creating_page;
			gtk_stack_set_visible_child (_data_->_tmp21_, (GtkWidget*) _data_->_tmp22_);
			_data_->_tmp23_ = boxes_assistant_create_preparation_progress (_data_->self);
			_data_->progress = _data_->_tmp23_;
			_data_->_tmp24_ = _data_->progress;
			_data_->_tmp25_ = _data_->self->priv->creating_status_page;
			g_object_bind_property_with_closures ((GObject*) _data_->_tmp24_, "info", (GObject*) _data_->_tmp25_, "description", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
			_data_->_tmp26_ = _data_->self->priv->installer_media;
			_data_->_tmp27_ = _data_->progress;
			_data_->_tmp28_ = _data_->self->priv->cancellable;
			_data_->_state_ = 1;
			boxes_installer_media_prepare (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, boxes_assistant_on_create_button_clicked_ready, _data_);
			return FALSE;
			_state_1:
			if (!boxes_installer_media_prepare_finish (_data_->_tmp26_, _data_->_res_)) {
				_data_->_tmp29_ = _data_->self->priv->create_button;
				gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp29_, TRUE);
				_g_object_unref0 (_data_->progress);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_g_object_unref0 (_data_->progress);
		}
		_data_->_tmp30_ = _data_->self->priv->installer_media;
		_data_->_tmp31_ = boxes_installer_media_get_vm_creator (_data_->_tmp30_);
		_data_->vm_creator = _data_->_tmp31_;
		_data_->_tmp32_ = _data_->vm_creator;
		_data_->_tmp33_ = _data_->self->priv->cancellable;
		_data_->_state_ = 2;
		boxes_vm_creator_create_vm (_data_->_tmp32_, _data_->_tmp33_, FALSE, boxes_assistant_on_create_button_clicked_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp34_ = boxes_vm_creator_create_vm_finish (_data_->_tmp32_, _data_->_res_, &_data_->_inner_error0_);
		_data_->machine = _data_->_tmp34_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->vm_creator);
			goto __catch0_g_error;
		}
		_data_->_tmp35_ = _data_->machine;
		_data_->_tmp36_ = _data_->self->priv->name_entry;
		_data_->_tmp37_ = boxes_vm_name_row_get_text (_data_->_tmp36_);
		_data_->_tmp38_ = _data_->_tmp37_;
		boxes_libvirt_machine_set_title (_data_->_tmp35_, _data_->_tmp38_);
		_data_->_tmp39_ = _data_->machine;
		_data_->_tmp40_ = boxes_libvirt_machine_get_domain (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->_tmp40_;
		_data_->_tmp42_ = gvir_domain_get_config (_data_->_tmp41_, (guint) GVIR_DOMAIN_XML_INACTIVE, &_data_->_inner_error0_);
		_data_->config = _data_->_tmp42_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->machine);
			_g_object_unref0 (_data_->vm_creator);
			goto __catch0_g_error;
		}
		_data_->_tmp43_ = _data_->config;
		_data_->_tmp44_ = _data_->self->priv->ram_row;
		_data_->_tmp45_ = boxes_memory_row_get_memory ((BoxesMemoryRow*) _data_->_tmp44_);
		_data_->_tmp46_ = _data_->_tmp45_;
		gvir_config_domain_set_memory (_data_->_tmp43_, _data_->_tmp46_);
		_data_->_tmp47_ = _data_->config;
		_data_->_tmp48_ = G_OBJECT_GET_CLASS ((GObject*) _data_->_tmp47_);
		_data_->_tmp49_ = g_object_class_find_property (_data_->_tmp48_, "current-memory");
		if (_data_->_tmp49_ != NULL) {
			_data_->_tmp50_ = _data_->config;
			_data_->_tmp51_ = _data_->config;
			_data_->_tmp52_ = gvir_config_domain_get_memory (_data_->_tmp51_);
			_data_->_tmp53_ = _data_->_tmp52_;
			g_object_set ((GObject*) _data_->_tmp50_, "current-memory", _data_->_tmp53_, NULL);
		}
		_data_->_tmp54_ = _data_->machine;
		_data_->_tmp55_ = boxes_libvirt_machine_get_storage_volume (_data_->_tmp54_);
		_data_->_tmp56_ = _data_->_tmp55_;
		_data_->_tmp57_ = _data_->self->priv->storage_limit_row;
		_data_->_tmp58_ = boxes_memory_row_get_memory (_data_->_tmp57_);
		_data_->_tmp59_ = _data_->_tmp58_;
		gvir_storage_vol_resize (_data_->_tmp56_, _data_->_tmp59_ * OSINFO_KIBIBYTES, GVIR_STORAGE_VOL_RESIZE_SHRINK, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->machine);
			_g_object_unref0 (_data_->vm_creator);
			goto __catch0_g_error;
		}
		_data_->_tmp60_ = _data_->self->priv->firmware_row;
		_data_->_tmp61_ = boxes_firmware_row_get_is_uefi (_data_->_tmp60_);
		_data_->_tmp62_ = _data_->_tmp61_;
		if (_data_->_tmp62_) {
			_data_->_tmp63_ = _data_->self->priv->installer_media;
			_data_->_tmp64_ = _data_->config;
			boxes_installer_media_set_uefi_firmware (_data_->_tmp63_, _data_->_tmp64_, TRUE);
		}
		_data_->_tmp65_ = _data_->machine;
		_data_->_tmp66_ = boxes_libvirt_machine_get_domain (_data_->_tmp65_);
		_data_->_tmp67_ = _data_->_tmp66_;
		_data_->_tmp68_ = _data_->config;
		gvir_domain_set_config (_data_->_tmp67_, _data_->_tmp68_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->machine);
			_g_object_unref0 (_data_->vm_creator);
			goto __catch0_g_error;
		}
		_data_->_tmp69_ = _data_->self->priv->progress_bar;
		gtk_progress_bar_set_fraction (_data_->_tmp69_, 1.0);
		_data_->_tmp70_ = _data_->self->priv->installer_media;
		if (BOXES_IS_UNATTENDED_INSTALLER (_data_->_tmp70_)) {
			_data_->_tmp71_ = _data_->machine;
			_data_->_tmp72_ = boxes_libvirt_machine_get_domain (_data_->_tmp71_);
			_data_->_tmp73_ = _data_->_tmp72_;
			gvir_domain_start (_data_->_tmp73_, (guint) 0, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->config);
				_g_object_unref0 (_data_->machine);
				_g_object_unref0 (_data_->vm_creator);
				goto __catch0_g_error;
			}
		} else {
			_data_->_tmp74_ = boxes_app_app;
			_data_->_tmp75_ = boxes_app_get_main_window (_data_->_tmp74_);
			_data_->_tmp76_ = _data_->_tmp75_;
			_data_->_tmp77_ = _data_->machine;
			boxes_app_window_select_item (_data_->_tmp76_, (BoxesCollectionItem*) _data_->_tmp77_);
		}
		_data_->_tmp78_ = _data_->vm_creator;
		_data_->_tmp79_ = _data_->machine;
		boxes_vm_creator_launch_vm (_data_->_tmp78_, _data_->_tmp79_, (gint64) -1, FALSE, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->machine);
			_g_object_unref0 (_data_->vm_creator);
			goto __catch0_g_error;
		}
		gtk_window_close ((GtkWindow*) _data_->self);
		_g_object_unref0 (_data_->config);
		_g_object_unref0 (_data_->machine);
		_g_object_unref0 (_data_->vm_creator);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp80_ = _data_->_error_;
		_data_->_tmp81_ = _data_->_tmp80_->message;
		g_debug ("assistant.vala:219: Failed to create virtual machine: %s", _data_->_tmp81_);
		_data_->_tmp82_ = _data_->_error_;
		_data_->_tmp83_ = _data_->_tmp82_->message;
		boxes_assistant_show_error (_data_->self, _data_->_tmp83_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp84_ = _data_->self->priv->create_button;
	gtk_widget_set_sensitive ((GtkWidget*) _data_->_tmp84_, TRUE);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_boxes_assistant_on_create_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                              gpointer self)
{
	boxes_assistant_on_create_button_clicked ((BoxesAssistant*) self, NULL, NULL);
}

static void
boxes_assistant_show_error (BoxesAssistant* self,
                            const gchar* reason)
{
	GtkStack* _tmp0_;
	GtkBox* _tmp1_;
	GtkButton* _tmp2_;
	HdyStatusPage* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (reason != NULL);
	_tmp0_ = self->priv->pages;
	_tmp1_ = self->priv->error_page;
	gtk_stack_set_visible_child (_tmp0_, (GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->create_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
	_tmp3_ = self->priv->error_status_page;
	hdy_status_page_set_description (_tmp3_, reason);
}

static void
boxes_assistant_real_destroy (GtkWidget* base)
{
	BoxesAssistant * self;
	GCancellable* _tmp0_;
	self = (BoxesAssistant*) base;
	_tmp0_ = self->priv->cancellable;
	g_cancellable_cancel (_tmp0_);
	GTK_WIDGET_CLASS (boxes_assistant_parent_class)->destroy ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, hdy_window_get_type (), HdyWindow));
}

static OsinfoOs*
boxes_assistant_get_os (BoxesAssistant* self)
{
	OsinfoOs* result;
	BoxesInstallerMedia* _tmp0_;
	OsinfoOs* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->installer_media;
	_tmp1_ = _tmp0_->os;
	result = _tmp1_;
	return result;
}

static void
boxes_assistant_class_init (BoxesAssistantClass * klass,
                            gpointer klass_data)
{
	boxes_assistant_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BoxesAssistant_private_offset);
	((GtkWidgetClass *) klass)->destroy = (void (*) (GtkWidget*)) boxes_assistant_real_destroy;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_assistant_get_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_assistant_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/assistant/assistant.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "pages", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, pages));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "creating_page", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, creating_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "error_page", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, error_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "error_status_page", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, error_status_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "editing_page", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, editing_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "create_button", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, create_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "name_entry", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, name_entry));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "os_chooser_row", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, os_chooser_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "firmware_row", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, firmware_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "express_install_row", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, express_install_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "ram_row", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, ram_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "storage_limit_row", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, storage_limit_row));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "creating_status_page", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, creating_status_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "progress_bar", FALSE, BoxesAssistant_private_offset + G_STRUCT_OFFSET (BoxesAssistantPrivate, progress_bar));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "setup_express_install_row", G_CALLBACK(_boxes_assistant_setup_express_install_row_g_object_notify));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_os_selected_cb", G_CALLBACK(_boxes_assistant_on_os_selected_cb_boxes_os_chooser_row_os_selected));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_create_button_clicked", G_CALLBACK(_boxes_assistant_on_create_button_clicked_gtk_button_clicked));
}

static void
boxes_assistant_instance_init (BoxesAssistant * self,
                               gpointer klass)
{
	GCancellable* _tmp0_;
	self->priv = boxes_assistant_get_instance_private (self);
	_tmp0_ = g_cancellable_new ();
	self->priv->cancellable = _tmp0_;
	g_type_ensure (BOXES_TYPE_VM_NAME_ROW);
	g_type_ensure (BOXES_TYPE_OS_CHOOSER_ROW);
	g_type_ensure (BOXES_TYPE_FIRMWARE_ROW);
	g_type_ensure (BOXES_TYPE_EXPRESS_INSTALL_ROW);
	g_type_ensure (BOXES_TYPE_RAM_ROW);
	g_type_ensure (BOXES_TYPE_MEMORY_ROW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
boxes_assistant_finalize (GObject * obj)
{
	BoxesAssistant * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_ASSISTANT, BoxesAssistant);
	_g_object_unref0 (self->priv->installer_media);
	_g_object_unref0 (self->priv->unattended_installer);
	_g_object_unref0 (self->priv->cancellable);
	G_OBJECT_CLASS (boxes_assistant_parent_class)->finalize (obj);
}

static GType
boxes_assistant_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesAssistantClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_assistant_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesAssistant), 0, (GInstanceInitFunc) boxes_assistant_instance_init, NULL };
	GType boxes_assistant_type_id;
	boxes_assistant_type_id = g_type_register_static (hdy_window_get_type (), "BoxesAssistant", &g_define_type_info, 0);
	BoxesAssistant_private_offset = g_type_add_instance_private (boxes_assistant_type_id, sizeof (BoxesAssistantPrivate));
	return boxes_assistant_type_id;
}

GType
boxes_assistant_get_type (void)
{
	static volatile gsize boxes_assistant_type_id__once = 0;
	if (g_once_init_enter (&boxes_assistant_type_id__once)) {
		GType boxes_assistant_type_id;
		boxes_assistant_type_id = boxes_assistant_get_type_once ();
		g_once_init_leave (&boxes_assistant_type_id__once, boxes_assistant_type_id);
	}
	return boxes_assistant_type_id__once;
}

static void
_vala_boxes_assistant_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	BoxesAssistant * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_ASSISTANT, BoxesAssistant);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

