/* wizard-source.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from wizard-source.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <osinfo/osinfo.h>
#include <clutter/clutter.h>
#include <clutter-gtk/clutter-gtk.h>


#define BOXES_TYPE_SOURCE_PAGE (boxes_source_page_get_type ())

#define BOXES_TYPE_WIZARD_SOURCE (boxes_wizard_source_get_type ())
#define BOXES_WIZARD_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD_SOURCE, BoxesWizardSource))
#define BOXES_WIZARD_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD_SOURCE, BoxesWizardSourceClass))
#define BOXES_IS_WIZARD_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD_SOURCE))
#define BOXES_IS_WIZARD_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD_SOURCE))
#define BOXES_WIZARD_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD_SOURCE, BoxesWizardSourceClass))

typedef struct _BoxesWizardSource BoxesWizardSource;
typedef struct _BoxesWizardSourceClass BoxesWizardSourceClass;
typedef struct _BoxesWizardSourcePrivate BoxesWizardSourcePrivate;

#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_MENU_BOX (boxes_menu_box_get_type ())
#define BOXES_MENU_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MENU_BOX, BoxesMenuBox))
#define BOXES_MENU_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MENU_BOX, BoxesMenuBoxClass))
#define BOXES_IS_MENU_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MENU_BOX))
#define BOXES_IS_MENU_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MENU_BOX))
#define BOXES_MENU_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MENU_BOX, BoxesMenuBoxClass))

typedef struct _BoxesMenuBox BoxesMenuBox;
typedef struct _BoxesMenuBoxClass BoxesMenuBoxClass;

#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 BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;

#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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesWizardSourceAddMediaEntriesData BoxesWizardSourceAddMediaEntriesData;
typedef struct _Block37Data Block37Data;

#define BOXES_MENU_BOX_TYPE_ITEM (boxes_menu_box_item_get_type ())
#define BOXES_MENU_BOX_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_MENU_BOX_TYPE_ITEM, BoxesMenuBoxItem))
#define BOXES_MENU_BOX_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_MENU_BOX_TYPE_ITEM, BoxesMenuBoxItemClass))
#define BOXES_MENU_BOX_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_MENU_BOX_TYPE_ITEM))
#define BOXES_MENU_BOX_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_MENU_BOX_TYPE_ITEM))
#define BOXES_MENU_BOX_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_MENU_BOX_TYPE_ITEM, BoxesMenuBoxItemClass))

typedef struct _BoxesMenuBoxItem BoxesMenuBoxItem;
typedef struct _BoxesMenuBoxItemClass BoxesMenuBoxItemClass;
typedef struct _Block38Data Block38Data;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#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_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_SIDEBAR (boxes_sidebar_get_type ())
#define BOXES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebar))
#define BOXES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))
#define BOXES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SIDEBAR))
#define BOXES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SIDEBAR))
#define BOXES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#define BOXES_TYPE_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

#define BOXES_TYPE_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

#define BOXES_TYPE_PROPERTIES (boxes_properties_get_type ())
#define BOXES_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES, BoxesProperties))
#define BOXES_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))
#define BOXES_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES))
#define BOXES_IS_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES))
#define BOXES_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

#define BOXES_TYPE_DISPLAY_PAGE (boxes_display_page_get_type ())
#define BOXES_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPage))
#define BOXES_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))
#define BOXES_IS_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_IS_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_DISPLAY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

typedef enum  {
	BOXES_SOURCE_PAGE_MAIN,
	BOXES_SOURCE_PAGE_URL,
	BOXES_SOURCE_PAGE_LAST
} BoxesSourcePage;

typedef void (*ClickedFunc) (void* user_data);
struct _BoxesWizardSource {
	GObject parent_instance;
	BoxesWizardSourcePrivate * priv;
	GtkEntry* url_entry;
};

struct _BoxesWizardSourceClass {
	GObjectClass parent_class;
};

struct _BoxesWizardSourcePrivate {
	BoxesSourcePage _page;
	BoxesInstallerMedia* _install_media;
	BoxesMenuBox* main_menubox;
	GtkNotebook* notebook;
	GtkLabel* url_label;
	GtkImage* url_image;
	BoxesMediaManager* media_manager;
	BoxesApp* app;
};

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

struct _BoxesWizardSourceAddMediaEntriesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesWizardSource* self;
	BoxesMediaManager* _tmp0_;
	GList* _tmp1_;
	GList* medias;
	BoxesMenuBox* _tmp2_;
	GList* _tmp3_;
	GList* child_collection;
	GList* child_it;
	GtkWidget* child;
	gboolean _tmp4_;
	GtkWidget* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkWidget* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	gboolean obsolete;
	GList* _tmp13_;
	GList* media_collection;
	GList* media_it;
	BoxesInstallerMedia* _tmp14_;
	BoxesInstallerMedia* media;
	GtkWidget* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	BoxesInstallerMedia* _tmp18_;
	const gchar* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	BoxesMenuBox* _tmp22_;
	GtkWidget* _tmp23_;
	GList* _tmp24_;
	GList* _vala1_media_collection;
	GList* _vala1_media_it;
	BoxesInstallerMedia* _tmp25_;
	BoxesInstallerMedia* _vala1_media;
	gboolean nouveau;
	BoxesMenuBox* _tmp26_;
	GList* _tmp27_;
	GList* _vala1_child_collection;
	GList* _vala1_child_it;
	GtkWidget* _vala1_child;
	gboolean _tmp28_;
	GtkWidget* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	GtkWidget* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	BoxesInstallerMedia* _tmp35_;
	const gchar* _tmp36_;
	gboolean _tmp37_;
	gboolean _tmp38_;
	gboolean _tmp39_;
	BoxesInstallerMedia* _tmp40_;
};

struct _Block37Data {
	int _ref_count_;
	BoxesWizardSource * self;
	BoxesInstallerMedia* media;
};

struct _Block38Data {
	int _ref_count_;
	BoxesWizardSource * self;
	BoxesMenuBoxItem* item;
	ClickedFunc clicked;
	gpointer clicked_target;
	GDestroyNotify clicked_target_destroy_notify;
};

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

struct _BoxesApp {
	BoxesUI parent_instance;
	BoxesAppPrivate * priv;
	GtkApplicationWindow* window;
	GtkNotebook* notebook;
	GtkClutterEmbed* embed;
	ClutterStage* stage;
	ClutterState* state;
	ClutterBox* box;
	BoxesCollectionItem* current_item;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};


static gpointer boxes_wizard_source_parent_class = NULL;

GType boxes_source_page_get_type (void) G_GNUC_CONST;
GType boxes_wizard_source_get_type (void) G_GNUC_CONST;
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GType boxes_menu_box_get_type (void) G_GNUC_CONST;
GType boxes_media_manager_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
#define BOXES_WIZARD_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_WIZARD_SOURCE, BoxesWizardSourcePrivate))
enum  {
	BOXES_WIZARD_SOURCE_DUMMY_PROPERTY,
	BOXES_WIZARD_SOURCE_WIDGET,
	BOXES_WIZARD_SOURCE_PAGE,
	BOXES_WIZARD_SOURCE_URI,
	BOXES_WIZARD_SOURCE_INSTALL_MEDIA
};
BoxesWizardSource* boxes_wizard_source_new (BoxesApp* app, BoxesMediaManager* media_manager);
BoxesWizardSource* boxes_wizard_source_construct (GType object_type, BoxesApp* app, BoxesMediaManager* media_manager);
BoxesMenuBox* boxes_menu_box_new (GtkOrientation orientation, gint spacing);
BoxesMenuBox* boxes_menu_box_construct (GType object_type, GtkOrientation orientation, gint spacing);
static GtkHBox* boxes_wizard_source_add_entry (BoxesWizardSource* self, BoxesMenuBox* box, ClickedFunc clicked, void* clicked_target, GDestroyNotify clicked_target_destroy_notify, gint h_margin, gint v_margin, gboolean beginning, const gchar* name);
static void __lambda52_ (BoxesWizardSource* self);
void boxes_wizard_source_set_page (BoxesWizardSource* self, BoxesSourcePage value);
static void ___lambda52__clicked_func (gpointer self);
static void boxes_wizard_source_launch_file_selection_dialog (BoxesWizardSource* self);
static void _boxes_wizard_source_launch_file_selection_dialog_clicked_func (gpointer self);
static void __lambda54_ (BoxesWizardSource* self);
static void ___lambda54__clicked_func (gpointer self);
static void boxes_wizard_source_add_media_entries (BoxesWizardSource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_wizard_source_add_media_entries_finish (BoxesWizardSource* self, GAsyncResult* _res_);
void boxes_wizard_source_update_url_page (BoxesWizardSource* self, const gchar* title, const gchar* text, const gchar* icon_name);
static void boxes_wizard_source_add_media_entries_data_free (gpointer _data);
static gboolean boxes_wizard_source_add_media_entries_co (BoxesWizardSourceAddMediaEntriesData* _data_);
void boxes_media_manager_list_installer_medias (BoxesMediaManager* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* boxes_media_manager_list_installer_medias_finish (BoxesMediaManager* self, GAsyncResult* _res_);
static void boxes_wizard_source_add_media_entries_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_wizard_source_add_media_entry (BoxesWizardSource* self, BoxesInstallerMedia* media);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static Block37Data* block37_data_ref (Block37Data* _data37_);
static void block37_data_unref (void * _userdata_);
static void __lambda53_ (Block37Data* _data37_);
static void boxes_wizard_source_set_install_media (BoxesWizardSource* self, BoxesInstallerMedia* value);
void boxes_wizard_source_set_uri (BoxesWizardSource* self, const gchar* value);
static void ___lambda53__clicked_func (gpointer self);
GtkImage* boxes_get_os_logo (OsinfoOs* os, gint size);
GType boxes_menu_box_item_get_type (void) G_GNUC_CONST;
static Block38Data* block38_data_ref (Block38Data* _data38_);
static void block38_data_unref (void * _userdata_);
BoxesMenuBoxItem* boxes_menu_box_item_new (GtkWidget* child, gboolean selectable);
BoxesMenuBoxItem* boxes_menu_box_item_construct (GType object_type, GtkWidget* child, gboolean selectable);
void boxes_menu_box_item_set_selectable (BoxesMenuBoxItem* self, gboolean value);
static void ___lambda51_ (Block38Data* _data38_, GtkWidget* widget);
static void ____lambda51__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GtkWidget* boxes_wizard_source_get_widget (BoxesWizardSource* self);
BoxesSourcePage boxes_wizard_source_get_page (BoxesWizardSource* self);
const gchar* boxes_wizard_source_get_uri (BoxesWizardSource* self);
BoxesInstallerMedia* boxes_wizard_source_get_install_media (BoxesWizardSource* self);
static void boxes_wizard_source_finalize (GObject* obj);
static void _vala_boxes_wizard_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_wizard_source_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType boxes_source_page_get_type (void) {
	static volatile gsize boxes_source_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_source_page_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_SOURCE_PAGE_MAIN, "BOXES_SOURCE_PAGE_MAIN", "main"}, {BOXES_SOURCE_PAGE_URL, "BOXES_SOURCE_PAGE_URL", "url"}, {BOXES_SOURCE_PAGE_LAST, "BOXES_SOURCE_PAGE_LAST", "last"}, {0, NULL, NULL}};
		GType boxes_source_page_type_id;
		boxes_source_page_type_id = g_enum_register_static ("BoxesSourcePage", values);
		g_once_init_leave (&boxes_source_page_type_id__volatile, boxes_source_page_type_id);
	}
	return boxes_source_page_type_id__volatile;
}


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


static void __lambda52_ (BoxesWizardSource* self) {
	boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
}


static void ___lambda52__clicked_func (gpointer self) {
	__lambda52_ (self);
}


static void _boxes_wizard_source_launch_file_selection_dialog_clicked_func (gpointer self) {
	boxes_wizard_source_launch_file_selection_dialog (self);
}


static void __lambda54_ (BoxesWizardSource* self) {
	boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_MAIN);
}


static void ___lambda54__clicked_func (gpointer self) {
	__lambda54_ (self);
}


BoxesWizardSource* boxes_wizard_source_construct (GType object_type, BoxesApp* app, BoxesMediaManager* media_manager) {
	BoxesWizardSource * self = NULL;
	BoxesApp* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesMediaManager* _tmp2_;
	BoxesMediaManager* _tmp3_;
	GtkNotebook* _tmp4_;
	GtkNotebook* _tmp5_;
	GtkNotebook* _tmp6_;
	GtkNotebook* _tmp7_;
	GtkStyleContext* _tmp8_ = NULL;
	GtkNotebook* _tmp9_;
	BoxesMenuBox* _tmp10_;
	BoxesMenuBox* _tmp11_;
	BoxesMenuBox* _tmp12_;
	BoxesMenuBox* _tmp13_;
	BoxesMenuBox* _tmp14_;
	GtkNotebook* _tmp15_;
	BoxesMenuBox* _tmp16_;
	BoxesMenuBox* _tmp17_;
	GtkHBox* _tmp18_ = NULL;
	GtkHBox* hbox;
	const gchar* _tmp19_ = NULL;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_;
	GtkLabel* label;
	GtkLabel* _tmp22_;
	GtkHBox* _tmp23_;
	GtkLabel* _tmp24_;
	GtkLabel* _tmp25_;
	GtkLabel* _tmp26_;
	GtkLabel* next;
	GtkHBox* _tmp27_;
	GtkLabel* _tmp28_;
	GtkSeparator* _tmp29_;
	GtkSeparator* _tmp30_;
	GtkSeparator* separator;
	BoxesMenuBox* _tmp31_;
	GtkSeparator* _tmp32_;
	BoxesMenuBox* _tmp33_;
	GtkHBox* _tmp34_ = NULL;
	const gchar* _tmp35_ = NULL;
	GtkLabel* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	GtkHBox* _tmp39_;
	GtkLabel* _tmp40_;
	GtkLabel* _tmp41_;
	GtkLabel* _tmp42_;
	GtkHBox* _tmp43_;
	GtkLabel* _tmp44_;
	BoxesMenuBox* _tmp45_;
	BoxesMenuBox* _tmp46_;
	BoxesMenuBox* url_menubox;
	GtkNotebook* _tmp47_;
	GtkHBox* _tmp48_ = NULL;
	GtkLabel* _tmp49_;
	GtkLabel* _tmp50_;
	GtkLabel* prev;
	GtkHBox* _tmp51_;
	const gchar* _tmp52_ = NULL;
	GtkLabel* _tmp53_;
	GtkLabel* _tmp54_;
	GtkLabel* _tmp55_;
	GtkStyleContext* _tmp56_ = NULL;
	GtkHBox* _tmp57_;
	GtkLabel* _tmp58_;
	GtkSeparator* _tmp59_;
	GtkSeparator* _tmp60_;
	GtkSeparator* _tmp61_;
	GtkHBox* _tmp62_ = NULL;
	GtkEntry* _tmp63_;
	GtkEntry* _tmp64_;
	GtkHBox* _tmp65_;
	GtkEntry* _tmp66_;
	GtkHBox* _tmp67_ = NULL;
	GtkImage* _tmp68_;
	GtkImage* _tmp69_;
	GtkImage* _tmp70_;
	GtkHBox* _tmp71_;
	GtkImage* _tmp72_;
	GtkLabel* _tmp73_;
	GtkLabel* _tmp74_;
	GtkLabel* _tmp75_;
	GtkLabel* _tmp76_;
	const gchar* _tmp77_ = NULL;
	GtkLabel* _tmp78_;
	GtkLabel* _tmp79_;
	GtkHBox* _tmp80_;
	GtkLabel* _tmp81_;
	GtkNotebook* _tmp82_;
	g_return_val_if_fail (app != NULL, NULL);
	g_return_val_if_fail (media_manager != NULL, NULL);
	self = (BoxesWizardSource*) g_object_new (object_type, NULL);
	_tmp0_ = app;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->app);
	self->priv->app = _tmp1_;
	_tmp2_ = media_manager;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->media_manager);
	self->priv->media_manager = _tmp3_;
	_tmp4_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->notebook);
	self->priv->notebook = _tmp5_;
	_tmp6_ = self->priv->notebook;
	g_object_set ((GtkWidget*) _tmp6_, "width-request", 500, NULL);
	_tmp7_ = self->priv->notebook;
	_tmp8_ = gtk_widget_get_style_context ((GtkWidget*) _tmp7_);
	gtk_style_context_add_class (_tmp8_, "boxes-source-nb");
	_tmp9_ = self->priv->notebook;
	gtk_notebook_set_show_tabs (_tmp9_, FALSE);
	_tmp10_ = boxes_menu_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp11_ = g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->main_menubox);
	self->priv->main_menubox = _tmp11_;
	_tmp12_ = self->priv->main_menubox;
	_tmp13_ = self->priv->main_menubox;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 15);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp12_, 15);
	_tmp14_ = self->priv->main_menubox;
	gtk_widget_grab_focus ((GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->notebook;
	_tmp16_ = self->priv->main_menubox;
	gtk_notebook_append_page (_tmp15_, (GtkWidget*) _tmp16_, NULL);
	_tmp17_ = self->priv->main_menubox;
	_tmp18_ = boxes_wizard_source_add_entry (self, _tmp17_, ___lambda52__clicked_func, g_object_ref (self), g_object_unref, 20, 10, FALSE, NULL);
	hbox = _tmp18_;
	_tmp19_ = _ ("Enter URL");
	_tmp20_ = (GtkLabel*) gtk_label_new (_tmp19_);
	_tmp21_ = g_object_ref_sink (_tmp20_);
	label = _tmp21_;
	_tmp22_ = label;
	g_object_set ((GtkMisc*) _tmp22_, "xalign", 0.0f, NULL);
	_tmp23_ = hbox;
	_tmp24_ = label;
	gtk_box_pack_start ((GtkBox*) _tmp23_, (GtkWidget*) _tmp24_, TRUE, TRUE, (guint) 0);
	_tmp25_ = (GtkLabel*) gtk_label_new ("▶");
	_tmp26_ = g_object_ref_sink (_tmp25_);
	next = _tmp26_;
	_tmp27_ = hbox;
	_tmp28_ = next;
	gtk_box_pack_start ((GtkBox*) _tmp27_, (GtkWidget*) _tmp28_, FALSE, FALSE, (guint) 0);
	_tmp29_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	_tmp30_ = g_object_ref_sink (_tmp29_);
	separator = _tmp30_;
	_tmp31_ = self->priv->main_menubox;
	_tmp32_ = separator;
	gtk_box_pack_start ((GtkBox*) _tmp31_, (GtkWidget*) _tmp32_, FALSE, FALSE, (guint) 0);
	_tmp33_ = self->priv->main_menubox;
	_tmp34_ = boxes_wizard_source_add_entry (self, _tmp33_, _boxes_wizard_source_launch_file_selection_dialog_clicked_func, g_object_ref (self), g_object_unref, 20, 10, FALSE, NULL);
	_g_object_unref0 (hbox);
	hbox = _tmp34_;
	_tmp35_ = _ ("Select a file");
	_tmp36_ = (GtkLabel*) gtk_label_new (_tmp35_);
	_tmp37_ = g_object_ref_sink (_tmp36_);
	_g_object_unref0 (label);
	label = _tmp37_;
	_tmp38_ = label;
	g_object_set ((GtkMisc*) _tmp38_, "xalign", 0.0f, NULL);
	_tmp39_ = hbox;
	_tmp40_ = label;
	gtk_box_pack_start ((GtkBox*) _tmp39_, (GtkWidget*) _tmp40_, TRUE, TRUE, (guint) 0);
	_tmp41_ = (GtkLabel*) gtk_label_new ("▶");
	_tmp42_ = g_object_ref_sink (_tmp41_);
	_g_object_unref0 (next);
	next = _tmp42_;
	_tmp43_ = hbox;
	_tmp44_ = next;
	gtk_box_pack_start ((GtkBox*) _tmp43_, (GtkWidget*) _tmp44_, FALSE, FALSE, (guint) 0);
	_tmp45_ = boxes_menu_box_new (GTK_ORIENTATION_VERTICAL, 0);
	_tmp46_ = g_object_ref_sink (_tmp45_);
	url_menubox = _tmp46_;
	gtk_widget_set_margin_bottom ((GtkWidget*) url_menubox, 15);
	gtk_widget_set_margin_top ((GtkWidget*) url_menubox, 15);
	_tmp47_ = self->priv->notebook;
	gtk_notebook_append_page (_tmp47_, (GtkWidget*) url_menubox, NULL);
	_tmp48_ = boxes_wizard_source_add_entry (self, url_menubox, ___lambda54__clicked_func, g_object_ref (self), g_object_unref, 20, 10, FALSE, NULL);
	_g_object_unref0 (hbox);
	hbox = _tmp48_;
	_tmp49_ = (GtkLabel*) gtk_label_new ("◀");
	_tmp50_ = g_object_ref_sink (_tmp49_);
	prev = _tmp50_;
	_tmp51_ = hbox;
	gtk_box_pack_start ((GtkBox*) _tmp51_, (GtkWidget*) prev, FALSE, FALSE, (guint) 0);
	_tmp52_ = _ ("Enter URL");
	_tmp53_ = (GtkLabel*) gtk_label_new (_tmp52_);
	_tmp54_ = g_object_ref_sink (_tmp53_);
	_g_object_unref0 (label);
	label = _tmp54_;
	_tmp55_ = label;
	_tmp56_ = gtk_widget_get_style_context ((GtkWidget*) _tmp55_);
	gtk_style_context_add_class (_tmp56_, "boxes-source-label");
	_tmp57_ = hbox;
	_tmp58_ = label;
	gtk_box_pack_start ((GtkBox*) _tmp57_, (GtkWidget*) _tmp58_, TRUE, TRUE, (guint) 0);
	_tmp59_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	_tmp60_ = g_object_ref_sink (_tmp59_);
	_g_object_unref0 (separator);
	separator = _tmp60_;
	_tmp61_ = separator;
	gtk_container_add ((GtkContainer*) url_menubox, (GtkWidget*) _tmp61_);
	_tmp62_ = boxes_wizard_source_add_entry (self, url_menubox, NULL, NULL, NULL, 20, 10, FALSE, NULL);
	_g_object_unref0 (hbox);
	hbox = _tmp62_;
	_tmp63_ = (GtkEntry*) gtk_entry_new ();
	_tmp64_ = g_object_ref_sink (_tmp63_);
	_g_object_unref0 (self->url_entry);
	self->url_entry = _tmp64_;
	_tmp65_ = hbox;
	_tmp66_ = self->url_entry;
	gtk_container_add ((GtkContainer*) _tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = boxes_wizard_source_add_entry (self, url_menubox, NULL, NULL, NULL, 20, 10, FALSE, NULL);
	_g_object_unref0 (hbox);
	hbox = _tmp67_;
	_tmp68_ = (GtkImage*) gtk_image_new_from_icon_name ("network-workgroup", 0);
	_tmp69_ = g_object_ref_sink (_tmp68_);
	_g_object_unref0 (self->priv->url_image);
	self->priv->url_image = _tmp69_;
	_tmp70_ = self->priv->url_image;
	gtk_image_set_pixel_size (_tmp70_, 96);
	_tmp71_ = hbox;
	_tmp72_ = self->priv->url_image;
	gtk_box_pack_start ((GtkBox*) _tmp71_, (GtkWidget*) _tmp72_, FALSE, FALSE, (guint) 0);
	_tmp73_ = (GtkLabel*) gtk_label_new (NULL);
	_tmp74_ = g_object_ref_sink (_tmp73_);
	_g_object_unref0 (self->priv->url_label);
	self->priv->url_label = _tmp74_;
	_tmp75_ = self->priv->url_label;
	g_object_set ((GtkMisc*) _tmp75_, "xalign", 0.0f, NULL);
	_tmp76_ = self->priv->url_label;
	_tmp77_ = _ ("<b>Desktop Access</b>\n" \
"\n" \
"Will add boxes for all systems available from this account.");
	gtk_label_set_markup (_tmp76_, _tmp77_);
	_tmp78_ = self->priv->url_label;
	gtk_label_set_use_markup (_tmp78_, TRUE);
	_tmp79_ = self->priv->url_label;
	g_object_set (_tmp79_, "wrap", TRUE, NULL);
	_tmp80_ = hbox;
	_tmp81_ = self->priv->url_label;
	gtk_box_pack_start ((GtkBox*) _tmp80_, (GtkWidget*) _tmp81_, TRUE, TRUE, (guint) 0);
	_tmp82_ = self->priv->notebook;
	gtk_widget_show_all ((GtkWidget*) _tmp82_);
	boxes_wizard_source_add_media_entries (self, NULL, NULL);
	_g_object_unref0 (prev);
	_g_object_unref0 (url_menubox);
	_g_object_unref0 (separator);
	_g_object_unref0 (next);
	_g_object_unref0 (label);
	_g_object_unref0 (hbox);
	return self;
}


BoxesWizardSource* boxes_wizard_source_new (BoxesApp* app, BoxesMediaManager* media_manager) {
	return boxes_wizard_source_construct (BOXES_TYPE_WIZARD_SOURCE, app, media_manager);
}


void boxes_wizard_source_update_url_page (BoxesWizardSource* self, const gchar* title, const gchar* text, const gchar* icon_name) {
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkImage* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (text != NULL);
	g_return_if_fail (icon_name != NULL);
	_tmp0_ = self->priv->url_label;
	_tmp1_ = title;
	_tmp2_ = g_strconcat ("<b>", _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, "</b>\n\n", NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = text;
	_tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	gtk_label_set_markup (_tmp0_, _tmp8_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_tmp9_ = self->priv->url_image;
	_tmp10_ = icon_name;
	g_object_set (_tmp9_, "icon-name", _tmp10_, NULL);
}


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


static void boxes_wizard_source_add_media_entries (BoxesWizardSource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesWizardSourceAddMediaEntriesData* _data_;
	BoxesWizardSource* _tmp0_;
	_data_ = g_slice_new0 (BoxesWizardSourceAddMediaEntriesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_wizard_source_add_media_entries);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_wizard_source_add_media_entries_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_wizard_source_add_media_entries_co (_data_);
}


static void boxes_wizard_source_add_media_entries_finish (BoxesWizardSource* self, GAsyncResult* _res_) {
	BoxesWizardSourceAddMediaEntriesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_wizard_source_add_media_entries_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesWizardSourceAddMediaEntriesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_wizard_source_add_media_entries_co (_data_);
}


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


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


static gboolean boxes_wizard_source_add_media_entries_co (BoxesWizardSourceAddMediaEntriesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->media_manager;
	_data_->_state_ = 1;
	boxes_media_manager_list_installer_medias (_data_->_tmp0_, boxes_wizard_source_add_media_entries_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = boxes_media_manager_list_installer_medias_finish (_data_->_tmp0_, _data_->_res_);
	_data_->medias = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->self->priv->main_menubox;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = gtk_container_get_children ((GtkContainer*) _data_->_tmp2_);
	{
		_data_->child_collection = _data_->_tmp3_;
		for (_data_->child_it = _data_->child_collection; _data_->child_it != NULL; _data_->child_it = _data_->child_it->next) {
			_data_->child = (GtkWidget*) _data_->child_it->data;
			{
				_data_->_tmp5_ = _data_->child;
				_data_->_tmp6_ = gtk_widget_get_name (_data_->_tmp5_);
				_data_->_tmp7_ = _data_->_tmp6_;
				if (_data_->_tmp7_ == NULL) {
					_data_->_tmp4_ = TRUE;
				} else {
					_data_->_tmp8_ = _data_->child;
					_data_->_tmp9_ = gtk_widget_get_name (_data_->_tmp8_);
					_data_->_tmp10_ = _data_->_tmp9_;
					_data_->_tmp11_ = FALSE;
					_data_->_tmp11_ = g_str_has_prefix (_data_->_tmp10_, "installer-");
					_data_->_tmp4_ = !_data_->_tmp11_;
				}
				_data_->_tmp12_ = _data_->_tmp4_;
				if (_data_->_tmp12_) {
					continue;
				}
				_data_->obsolete = TRUE;
				_data_->_tmp13_ = _data_->medias;
				{
					_data_->media_collection = _data_->_tmp13_;
					for (_data_->media_it = _data_->media_collection; _data_->media_it != NULL; _data_->media_it = _data_->media_it->next) {
						_data_->_tmp14_ = _g_object_ref0 ((BoxesInstallerMedia*) _data_->media_it->data);
						_data_->media = _data_->_tmp14_;
						{
							_data_->_tmp15_ = _data_->child;
							_data_->_tmp16_ = gtk_widget_get_name (_data_->_tmp15_);
							_data_->_tmp17_ = _data_->_tmp16_;
							_data_->_tmp18_ = _data_->media;
							_data_->_tmp19_ = _data_->_tmp18_->device_file;
							_data_->_tmp20_ = FALSE;
							_data_->_tmp20_ = string_contains (_data_->_tmp17_, _data_->_tmp19_);
							if (_data_->_tmp20_) {
								_data_->obsolete = FALSE;
								_g_object_unref0 (_data_->media);
								break;
							}
							_g_object_unref0 (_data_->media);
						}
					}
				}
				_data_->_tmp21_ = _data_->obsolete;
				if (_data_->_tmp21_) {
					_data_->_tmp22_ = _data_->self->priv->main_menubox;
					_data_->_tmp23_ = _data_->child;
					gtk_container_remove ((GtkContainer*) _data_->_tmp22_, _data_->_tmp23_);
				}
			}
		}
		_g_list_free0 (_data_->child_collection);
	}
	_data_->_tmp24_ = _data_->medias;
	{
		_data_->_vala1_media_collection = _data_->_tmp24_;
		for (_data_->_vala1_media_it = _data_->_vala1_media_collection; _data_->_vala1_media_it != NULL; _data_->_vala1_media_it = _data_->_vala1_media_it->next) {
			_data_->_tmp25_ = _g_object_ref0 ((BoxesInstallerMedia*) _data_->_vala1_media_it->data);
			_data_->_vala1_media = _data_->_tmp25_;
			{
				_data_->nouveau = TRUE;
				_data_->_tmp26_ = _data_->self->priv->main_menubox;
				_data_->_tmp27_ = NULL;
				_data_->_tmp27_ = gtk_container_get_children ((GtkContainer*) _data_->_tmp26_);
				{
					_data_->_vala1_child_collection = _data_->_tmp27_;
					for (_data_->_vala1_child_it = _data_->_vala1_child_collection; _data_->_vala1_child_it != NULL; _data_->_vala1_child_it = _data_->_vala1_child_it->next) {
						_data_->_vala1_child = (GtkWidget*) _data_->_vala1_child_it->data;
						{
							_data_->_tmp29_ = _data_->_vala1_child;
							_data_->_tmp30_ = gtk_widget_get_name (_data_->_tmp29_);
							_data_->_tmp31_ = _data_->_tmp30_;
							if (_data_->_tmp31_ != NULL) {
								_data_->_tmp32_ = _data_->_vala1_child;
								_data_->_tmp33_ = gtk_widget_get_name (_data_->_tmp32_);
								_data_->_tmp34_ = _data_->_tmp33_;
								_data_->_tmp35_ = _data_->_vala1_media;
								_data_->_tmp36_ = _data_->_tmp35_->device_file;
								_data_->_tmp37_ = FALSE;
								_data_->_tmp37_ = string_contains (_data_->_tmp34_, _data_->_tmp36_);
								_data_->_tmp28_ = _data_->_tmp37_;
							} else {
								_data_->_tmp28_ = FALSE;
							}
							_data_->_tmp38_ = _data_->_tmp28_;
							if (_data_->_tmp38_) {
								_data_->nouveau = FALSE;
								break;
							}
						}
					}
					_g_list_free0 (_data_->_vala1_child_collection);
				}
				_data_->_tmp39_ = _data_->nouveau;
				if (_data_->_tmp39_) {
					_data_->_tmp40_ = _data_->_vala1_media;
					boxes_wizard_source_add_media_entry (_data_->self, _data_->_tmp40_);
				}
				_g_object_unref0 (_data_->_vala1_media);
			}
		}
	}
	__g_list_free__g_object_unref0_0 (_data_->medias);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static Block37Data* block37_data_ref (Block37Data* _data37_) {
	g_atomic_int_inc (&_data37_->_ref_count_);
	return _data37_;
}


static void block37_data_unref (void * _userdata_) {
	Block37Data* _data37_;
	_data37_ = (Block37Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data37_->_ref_count_)) {
		BoxesWizardSource * self;
		self = _data37_->self;
		_g_object_unref0 (_data37_->media);
		_g_object_unref0 (self);
		g_slice_free (Block37Data, _data37_);
	}
}


static void __lambda53_ (Block37Data* _data37_) {
	BoxesWizardSource * self;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	const gchar* _tmp2_;
	GtkEntry* _tmp3_;
	self = _data37_->self;
	_tmp0_ = _data37_->media;
	boxes_wizard_source_set_install_media (self, _tmp0_);
	_tmp1_ = _data37_->media;
	_tmp2_ = _tmp1_->device_file;
	boxes_wizard_source_set_uri (self, _tmp2_);
	_tmp3_ = self->url_entry;
	g_signal_emit_by_name (_tmp3_, "activate");
	boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
}


static void ___lambda53__clicked_func (gpointer self) {
	__lambda53_ (self);
}


static void boxes_wizard_source_add_media_entry (BoxesWizardSource* self, BoxesInstallerMedia* media) {
	Block37Data* _data37_;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	BoxesMenuBox* _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	GtkHBox* _tmp9_ = NULL;
	GtkHBox* _tmp10_;
	GtkHBox* hbox;
	BoxesInstallerMedia* _tmp11_;
	OsinfoOs* _tmp12_;
	GtkImage* _tmp13_ = NULL;
	GtkImage* image;
	GtkHBox* _tmp14_;
	GtkImage* _tmp15_;
	GtkVBox* _tmp16_;
	GtkVBox* _tmp17_;
	GtkVBox* vbox;
	GtkHBox* _tmp18_;
	GtkVBox* _tmp19_;
	BoxesInstallerMedia* _tmp20_;
	const gchar* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* label;
	GtkLabel* _tmp24_;
	GtkStyleContext* _tmp25_ = NULL;
	GtkLabel* _tmp26_;
	GtkVBox* _tmp27_;
	GtkLabel* _tmp28_;
	BoxesInstallerMedia* _tmp29_;
	OsinfoMedia* _tmp30_;
	GtkSeparator* _tmp74_;
	GtkSeparator* _tmp75_;
	GtkSeparator* separator;
	BoxesInstallerMedia* _tmp76_;
	const gchar* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	BoxesMenuBox* _tmp82_;
	BoxesMenuBox* _tmp83_;
	BoxesMenuBox* _tmp84_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (media != NULL);
	_data37_ = g_slice_new0 (Block37Data);
	_data37_->_ref_count_ = 1;
	_data37_->self = g_object_ref (self);
	_tmp0_ = media;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data37_->media = _tmp1_;
	_tmp2_ = self->priv->main_menubox;
	_tmp3_ = _data37_->media;
	_tmp4_ = _tmp3_->device_file;
	_tmp5_ = g_strconcat ("installer-", _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, "-item", NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = boxes_wizard_source_add_entry (self, _tmp2_, ___lambda53__clicked_func, block37_data_ref (_data37_), block37_data_unref, 15, 5, TRUE, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	hbox = _tmp10_;
	_tmp11_ = _data37_->media;
	_tmp12_ = _tmp11_->os;
	_tmp13_ = boxes_get_os_logo (_tmp12_, 64);
	image = _tmp13_;
	_tmp14_ = hbox;
	_tmp15_ = image;
	gtk_box_pack_start ((GtkBox*) _tmp14_, (GtkWidget*) _tmp15_, FALSE, FALSE, (guint) 0);
	_tmp16_ = (GtkVBox*) gtk_vbox_new (TRUE, 5);
	_tmp17_ = g_object_ref_sink (_tmp16_);
	vbox = _tmp17_;
	_tmp18_ = hbox;
	_tmp19_ = vbox;
	gtk_box_pack_start ((GtkBox*) _tmp18_, (GtkWidget*) _tmp19_, TRUE, TRUE, (guint) 0);
	_tmp20_ = _data37_->media;
	_tmp21_ = _tmp20_->label;
	_tmp22_ = (GtkLabel*) gtk_label_new (_tmp21_);
	_tmp23_ = g_object_ref_sink (_tmp22_);
	label = _tmp23_;
	_tmp24_ = label;
	_tmp25_ = gtk_widget_get_style_context ((GtkWidget*) _tmp24_);
	gtk_style_context_add_class (_tmp25_, "boxes-source-label");
	_tmp26_ = label;
	g_object_set ((GtkMisc*) _tmp26_, "xalign", 0.0f, NULL);
	_tmp27_ = vbox;
	_tmp28_ = label;
	gtk_box_pack_start ((GtkBox*) _tmp27_, (GtkWidget*) _tmp28_, TRUE, TRUE, (guint) 0);
	_tmp29_ = _data37_->media;
	_tmp30_ = _tmp29_->os_media;
	if (_tmp30_ != NULL) {
		const gchar* _tmp31_ = NULL;
		gboolean _tmp32_ = FALSE;
		BoxesInstallerMedia* _tmp33_;
		OsinfoMedia* _tmp34_;
		gchar* _tmp35_ = NULL;
		gchar* _tmp36_;
		gchar* _tmp37_;
		gboolean _tmp38_;
		gboolean _tmp44_;
		const gchar* _tmp47_;
		gchar* _tmp48_;
		gchar* architecture;
		const gchar* _tmp49_;
		GtkLabel* _tmp50_;
		GtkLabel* _tmp51_;
		GtkLabel* _tmp52_;
		GtkStyleContext* _tmp53_ = NULL;
		GtkLabel* _tmp54_;
		GtkVBox* _tmp55_;
		GtkLabel* _tmp56_;
		BoxesInstallerMedia* _tmp57_;
		OsinfoOs* _tmp58_;
		const gchar* _tmp59_;
		const gchar* _tmp60_;
		_tmp33_ = _data37_->media;
		_tmp34_ = _tmp33_->os_media;
		g_object_get (_tmp34_, "architecture", &_tmp35_, NULL);
		_tmp36_ = _tmp35_;
		_tmp37_ = _tmp36_;
		_tmp38_ = g_strcmp0 (_tmp37_, "i386") == 0;
		_g_free0 (_tmp37_);
		if (_tmp38_) {
			_tmp32_ = TRUE;
		} else {
			BoxesInstallerMedia* _tmp39_;
			OsinfoMedia* _tmp40_;
			gchar* _tmp41_ = NULL;
			gchar* _tmp42_;
			gchar* _tmp43_;
			_tmp39_ = _data37_->media;
			_tmp40_ = _tmp39_->os_media;
			g_object_get (_tmp40_, "architecture", &_tmp41_, NULL);
			_tmp42_ = _tmp41_;
			_tmp43_ = _tmp42_;
			_tmp32_ = g_strcmp0 (_tmp43_, "i686") == 0;
			_g_free0 (_tmp43_);
		}
		_tmp44_ = _tmp32_;
		if (_tmp44_) {
			const gchar* _tmp45_ = NULL;
			_tmp45_ = _ ("32-bit x86 system");
			_tmp31_ = _tmp45_;
		} else {
			const gchar* _tmp46_ = NULL;
			_tmp46_ = _ ("64-bit x86 system");
			_tmp31_ = _tmp46_;
		}
		_tmp47_ = _tmp31_;
		_tmp48_ = g_strdup (_tmp47_);
		architecture = _tmp48_;
		_tmp49_ = architecture;
		_tmp50_ = (GtkLabel*) gtk_label_new (_tmp49_);
		_tmp51_ = g_object_ref_sink (_tmp50_);
		_g_object_unref0 (label);
		label = _tmp51_;
		_tmp52_ = label;
		_tmp53_ = gtk_widget_get_style_context ((GtkWidget*) _tmp52_);
		gtk_style_context_add_class (_tmp53_, "boxes-step-label");
		_tmp54_ = label;
		g_object_set ((GtkMisc*) _tmp54_, "xalign", 0.0f, NULL);
		_tmp55_ = vbox;
		_tmp56_ = label;
		gtk_box_pack_start ((GtkBox*) _tmp55_, (GtkWidget*) _tmp56_, TRUE, TRUE, (guint) 0);
		_tmp57_ = _data37_->media;
		_tmp58_ = _tmp57_->os;
		_tmp59_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp58_);
		_tmp60_ = _tmp59_;
		if (_tmp60_ != NULL) {
			GtkLabel* _tmp61_;
			GtkLabel* _tmp62_;
			const gchar* _tmp63_;
			const gchar* _tmp64_;
			const gchar* _tmp65_ = NULL;
			BoxesInstallerMedia* _tmp66_;
			OsinfoOs* _tmp67_;
			const gchar* _tmp68_;
			const gchar* _tmp69_;
			gchar* _tmp70_ = NULL;
			gchar* _tmp71_;
			gchar* _tmp72_;
			gchar* _tmp73_;
			_tmp61_ = label;
			_tmp62_ = label;
			_tmp63_ = gtk_label_get_label (_tmp62_);
			_tmp64_ = _tmp63_;
			_tmp65_ = _ (" from %s");
			_tmp66_ = _data37_->media;
			_tmp67_ = _tmp66_->os;
			_tmp68_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp67_);
			_tmp69_ = _tmp68_;
			_tmp70_ = g_strdup_printf (_tmp65_, _tmp69_);
			_tmp71_ = _tmp70_;
			_tmp72_ = g_strconcat (_tmp64_, _tmp71_, NULL);
			_tmp73_ = _tmp72_;
			gtk_label_set_label (_tmp62_, _tmp73_);
			_g_free0 (_tmp73_);
			_g_free0 (_tmp71_);
		}
		_g_free0 (architecture);
	}
	_tmp74_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	_tmp75_ = g_object_ref_sink (_tmp74_);
	separator = _tmp75_;
	_tmp76_ = _data37_->media;
	_tmp77_ = _tmp76_->device_file;
	_tmp78_ = g_strconcat ("installer-", _tmp77_, NULL);
	_tmp79_ = _tmp78_;
	_tmp80_ = g_strconcat (_tmp79_, "-separator", NULL);
	_tmp81_ = _tmp80_;
	gtk_widget_set_name ((GtkWidget*) separator, _tmp81_);
	_g_free0 (_tmp81_);
	_g_free0 (_tmp79_);
	_tmp82_ = self->priv->main_menubox;
	gtk_box_pack_start ((GtkBox*) _tmp82_, (GtkWidget*) separator, FALSE, FALSE, (guint) 0);
	_tmp83_ = self->priv->main_menubox;
	gtk_box_reorder_child ((GtkBox*) _tmp83_, (GtkWidget*) separator, 1);
	_tmp84_ = self->priv->main_menubox;
	gtk_widget_show_all ((GtkWidget*) _tmp84_);
	_g_object_unref0 (separator);
	_g_object_unref0 (label);
	_g_object_unref0 (vbox);
	_g_object_unref0 (image);
	_g_object_unref0 (hbox);
	block37_data_unref (_data37_);
	_data37_ = NULL;
}


static Block38Data* block38_data_ref (Block38Data* _data38_) {
	g_atomic_int_inc (&_data38_->_ref_count_);
	return _data38_;
}


static void block38_data_unref (void * _userdata_) {
	Block38Data* _data38_;
	_data38_ = (Block38Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data38_->_ref_count_)) {
		BoxesWizardSource * self;
		self = _data38_->self;
		_g_object_unref0 (_data38_->item);
		(_data38_->clicked_target_destroy_notify == NULL) ? NULL : (_data38_->clicked_target_destroy_notify (_data38_->clicked_target), NULL);
		_data38_->clicked = NULL;
		_data38_->clicked_target = NULL;
		_data38_->clicked_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block38Data, _data38_);
	}
}


static void ___lambda51_ (Block38Data* _data38_, GtkWidget* widget) {
	BoxesWizardSource * self;
	GtkWidget* _tmp0_;
	BoxesMenuBoxItem* _tmp1_;
	self = _data38_->self;
	g_return_if_fail (widget != NULL);
	_tmp0_ = widget;
	_tmp1_ = _data38_->item;
	if (_tmp0_ == GTK_WIDGET (_tmp1_)) {
		ClickedFunc _tmp2_;
		void* _tmp2__target;
		_tmp2_ = _data38_->clicked;
		_tmp2__target = _data38_->clicked_target;
		_tmp2_ (_tmp2__target);
	}
}


static void ____lambda51__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self) {
	___lambda51_ (self, widget);
}


static GtkHBox* boxes_wizard_source_add_entry (BoxesWizardSource* self, BoxesMenuBox* box, ClickedFunc clicked, void* clicked_target, GDestroyNotify clicked_target_destroy_notify, gint h_margin, gint v_margin, gboolean beginning, const gchar* name) {
	GtkHBox* result = NULL;
	Block38Data* _data38_;
	ClickedFunc _tmp0_;
	void* _tmp0__target;
	GtkHBox* _tmp1_;
	GtkHBox* _tmp2_;
	GtkHBox* hbox;
	GtkHBox* _tmp3_;
	BoxesMenuBoxItem* _tmp4_;
	BoxesMenuBoxItem* _tmp5_;
	BoxesMenuBox* _tmp6_;
	BoxesMenuBoxItem* _tmp7_;
	gboolean _tmp8_;
	const gchar* _tmp11_;
	GtkHBox* _tmp14_;
	GtkHBox* _tmp15_;
	gint _tmp16_;
	GtkHBox* _tmp17_;
	GtkHBox* _tmp18_;
	gint _tmp19_;
	ClickedFunc _tmp20_;
	void* _tmp20__target;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (box != NULL, NULL);
	_data38_ = g_slice_new0 (Block38Data);
	_data38_->_ref_count_ = 1;
	_data38_->self = g_object_ref (self);
	_tmp0_ = clicked;
	_tmp0__target = clicked_target;
	(_data38_->clicked_target_destroy_notify == NULL) ? NULL : (_data38_->clicked_target_destroy_notify (_data38_->clicked_target), NULL);
	_data38_->clicked = NULL;
	_data38_->clicked_target = NULL;
	_data38_->clicked_target_destroy_notify = NULL;
	_data38_->clicked = _tmp0_;
	_data38_->clicked_target = _tmp0__target;
	_data38_->clicked_target_destroy_notify = clicked_target_destroy_notify;
	_tmp1_ = (GtkHBox*) gtk_hbox_new (FALSE, 20);
	_tmp2_ = g_object_ref_sink (_tmp1_);
	hbox = _tmp2_;
	_tmp3_ = hbox;
	_tmp4_ = boxes_menu_box_item_new ((GtkWidget*) _tmp3_, FALSE);
	_tmp5_ = g_object_ref_sink (_tmp4_);
	_data38_->item = _tmp5_;
	_tmp6_ = box;
	_tmp7_ = _data38_->item;
	gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = beginning;
	if (_tmp8_) {
		BoxesMenuBox* _tmp9_;
		BoxesMenuBoxItem* _tmp10_;
		_tmp9_ = self->priv->main_menubox;
		_tmp10_ = _data38_->item;
		gtk_box_reorder_child ((GtkBox*) _tmp9_, (GtkWidget*) _tmp10_, 0);
	}
	_tmp11_ = name;
	if (_tmp11_ != NULL) {
		BoxesMenuBoxItem* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = _data38_->item;
		_tmp13_ = name;
		gtk_widget_set_name ((GtkWidget*) _tmp12_, _tmp13_);
	}
	_tmp14_ = hbox;
	_tmp15_ = hbox;
	_tmp16_ = h_margin;
	gtk_widget_set_margin_right ((GtkWidget*) _tmp15_, _tmp16_);
	gtk_widget_set_margin_left ((GtkWidget*) _tmp14_, _tmp16_);
	_tmp17_ = hbox;
	_tmp18_ = hbox;
	_tmp19_ = v_margin;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp18_, _tmp19_);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, _tmp19_);
	_tmp20_ = _data38_->clicked;
	_tmp20__target = _data38_->clicked_target;
	if (_tmp20_ != NULL) {
		BoxesMenuBoxItem* _tmp21_;
		BoxesMenuBox* _tmp22_;
		_tmp21_ = _data38_->item;
		boxes_menu_box_item_set_selectable (_tmp21_, TRUE);
		_tmp22_ = box;
		g_signal_connect_data (_tmp22_, "selected", (GCallback) ____lambda51__boxes_menu_box_selected, block38_data_ref (_data38_), (GClosureNotify) block38_data_unref, 0);
	}
	result = hbox;
	block38_data_unref (_data38_);
	_data38_ = NULL;
	return result;
}


static void boxes_wizard_source_launch_file_selection_dialog (BoxesWizardSource* self) {
	const gchar* _tmp0_ = NULL;
	BoxesApp* _tmp1_;
	GtkApplicationWindow* _tmp2_;
	GtkFileChooserDialog* _tmp3_;
	GtkFileChooserDialog* _tmp4_;
	GtkFileChooserDialog* dialog;
	GtkFileChooserDialog* _tmp5_;
	GtkFileChooserDialog* _tmp6_;
	GtkFileChooserDialog* _tmp7_;
	GtkFileFilter* _tmp8_;
	GtkFileFilter* _tmp9_;
	GtkFileChooserDialog* _tmp10_;
	GtkFileFilter* _tmp11_;
	GtkFileFilter* _tmp12_;
	GtkFileChooserDialog* _tmp13_;
	gint _tmp14_ = 0;
	GtkFileChooserDialog* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _ ("Select a device or ISO file");
	_tmp1_ = self->priv->app;
	_tmp2_ = _tmp1_->window;
	_tmp3_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, (GtkWindow*) _tmp2_, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
	_tmp4_ = g_object_ref_sink (_tmp3_);
	dialog = _tmp4_;
	_tmp5_ = dialog;
	gtk_file_chooser_set_show_hidden ((GtkFileChooser*) _tmp5_, FALSE);
	_tmp6_ = dialog;
	gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp6_, TRUE);
	_tmp7_ = dialog;
	_tmp8_ = gtk_file_filter_new ();
	_tmp9_ = g_object_ref_sink (_tmp8_);
	gtk_file_chooser_set_filter ((GtkFileChooser*) _tmp7_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = dialog;
	_tmp11_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _tmp10_);
	_tmp12_ = _tmp11_;
	gtk_file_filter_add_mime_type (_tmp12_, "application/x-cd-image");
	_tmp13_ = dialog;
	_tmp14_ = gtk_dialog_run ((GtkDialog*) _tmp13_);
	if (_tmp14_ == ((gint) GTK_RESPONSE_ACCEPT)) {
		GtkFileChooserDialog* _tmp15_;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_;
		GtkEntry* _tmp18_;
		_tmp15_ = dialog;
		_tmp16_ = gtk_file_chooser_get_uri ((GtkFileChooser*) _tmp15_);
		_tmp17_ = _tmp16_;
		boxes_wizard_source_set_uri (self, _tmp17_);
		_g_free0 (_tmp17_);
		_tmp18_ = self->url_entry;
		g_signal_emit_by_name (_tmp18_, "activate");
		boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
	}
	_tmp19_ = dialog;
	gtk_widget_hide ((GtkWidget*) _tmp19_);
	_g_object_unref0 (dialog);
}


GtkWidget* boxes_wizard_source_get_widget (BoxesWizardSource* self) {
	GtkWidget* result;
	GtkNotebook* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->notebook;
	result = (GtkWidget*) _tmp0_;
	return result;
}


BoxesSourcePage boxes_wizard_source_get_page (BoxesWizardSource* self) {
	BoxesSourcePage result;
	BoxesSourcePage _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_page;
	result = _tmp0_;
	return result;
}


void boxes_wizard_source_set_page (BoxesWizardSource* self, BoxesSourcePage value) {
	BoxesSourcePage _tmp0_;
	GtkNotebook* _tmp1_;
	BoxesSourcePage _tmp2_;
	BoxesSourcePage _tmp3_;
	BoxesSourcePage _tmp4_;
	BoxesSourcePage _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_page = _tmp0_;
	_tmp1_ = self->priv->notebook;
	_tmp2_ = boxes_wizard_source_get_page (self);
	_tmp3_ = _tmp2_;
	gtk_notebook_set_current_page (_tmp1_, (gint) _tmp3_);
	_tmp4_ = boxes_wizard_source_get_page (self);
	_tmp5_ = _tmp4_;
	switch (_tmp5_) {
		case BOXES_SOURCE_PAGE_MAIN:
		{
			BoxesMenuBox* _tmp6_;
			boxes_wizard_source_add_media_entries (self, NULL, NULL);
			_tmp6_ = self->priv->main_menubox;
			gtk_widget_grab_focus ((GtkWidget*) _tmp6_);
			break;
		}
		case BOXES_SOURCE_PAGE_URL:
		{
			GtkEntry* _tmp7_;
			GtkEntry* _tmp8_;
			_tmp7_ = self->url_entry;
			g_signal_emit_by_name ((GtkEditable*) _tmp7_, "changed");
			_tmp8_ = self->url_entry;
			gtk_widget_grab_focus ((GtkWidget*) _tmp8_);
			break;
		}
		default:
		break;
	}
	g_object_notify ((GObject *) self, "page");
}


const gchar* boxes_wizard_source_get_uri (BoxesWizardSource* self) {
	const gchar* result;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->url_entry;
	_tmp1_ = gtk_entry_get_text (_tmp0_);
	result = _tmp1_;
	return result;
}


void boxes_wizard_source_set_uri (BoxesWizardSource* self, const gchar* value) {
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->url_entry;
	_tmp1_ = value;
	gtk_entry_set_text (_tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "uri");
}


BoxesInstallerMedia* boxes_wizard_source_get_install_media (BoxesWizardSource* self) {
	BoxesInstallerMedia* result;
	BoxesInstallerMedia* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_install_media;
	result = _tmp0_;
	return result;
}


static void boxes_wizard_source_set_install_media (BoxesWizardSource* self, BoxesInstallerMedia* value) {
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_install_media);
	self->priv->_install_media = _tmp1_;
	g_object_notify ((GObject *) self, "install-media");
}


static void boxes_wizard_source_class_init (BoxesWizardSourceClass * klass) {
	boxes_wizard_source_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesWizardSourcePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_wizard_source_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_wizard_source_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_wizard_source_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_WIZARD_SOURCE_WIDGET, g_param_spec_object ("widget", "widget", "widget", GTK_TYPE_WIDGET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_WIZARD_SOURCE_PAGE, g_param_spec_enum ("page", "page", "page", BOXES_TYPE_SOURCE_PAGE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_WIZARD_SOURCE_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_WIZARD_SOURCE_INSTALL_MEDIA, g_param_spec_object ("install-media", "install-media", "install-media", BOXES_TYPE_INSTALLER_MEDIA, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void boxes_wizard_source_instance_init (BoxesWizardSource * self) {
	self->priv = BOXES_WIZARD_SOURCE_GET_PRIVATE (self);
}


static void boxes_wizard_source_finalize (GObject* obj) {
	BoxesWizardSource * self;
	self = BOXES_WIZARD_SOURCE (obj);
	_g_object_unref0 (self->priv->_install_media);
	_g_object_unref0 (self->priv->main_menubox);
	_g_object_unref0 (self->priv->notebook);
	_g_object_unref0 (self->priv->url_label);
	_g_object_unref0 (self->priv->url_image);
	_g_object_unref0 (self->url_entry);
	_g_object_unref0 (self->priv->media_manager);
	_g_object_unref0 (self->priv->app);
	G_OBJECT_CLASS (boxes_wizard_source_parent_class)->finalize (obj);
}


GType boxes_wizard_source_get_type (void) {
	static volatile gsize boxes_wizard_source_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_wizard_source_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesWizardSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_wizard_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesWizardSource), 0, (GInstanceInitFunc) boxes_wizard_source_instance_init, NULL };
		GType boxes_wizard_source_type_id;
		boxes_wizard_source_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesWizardSource", &g_define_type_info, 0);
		g_once_init_leave (&boxes_wizard_source_type_id__volatile, boxes_wizard_source_type_id);
	}
	return boxes_wizard_source_type_id__volatile;
}


static void _vala_boxes_wizard_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesWizardSource * self;
	self = BOXES_WIZARD_SOURCE (object);
	switch (property_id) {
		case BOXES_WIZARD_SOURCE_WIDGET:
		g_value_set_object (value, boxes_wizard_source_get_widget (self));
		break;
		case BOXES_WIZARD_SOURCE_PAGE:
		g_value_set_enum (value, boxes_wizard_source_get_page (self));
		break;
		case BOXES_WIZARD_SOURCE_URI:
		g_value_set_string (value, boxes_wizard_source_get_uri (self));
		break;
		case BOXES_WIZARD_SOURCE_INSTALL_MEDIA:
		g_value_set_object (value, boxes_wizard_source_get_install_media (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_wizard_source_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesWizardSource * self;
	self = BOXES_WIZARD_SOURCE (object);
	switch (property_id) {
		case BOXES_WIZARD_SOURCE_PAGE:
		boxes_wizard_source_set_page (self, g_value_get_enum (value));
		break;
		case BOXES_WIZARD_SOURCE_URI:
		boxes_wizard_source_set_uri (self, g_value_get_string (value));
		break;
		case BOXES_WIZARD_SOURCE_INSTALL_MEDIA:
		boxes_wizard_source_set_install_media (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



