/* wizard-source.c generated by valac 0.16.0, 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>


#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 _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 _Block28Data Block28Data;

#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 _Block29Data Block29Data;

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

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 _Block28Data {
	int _ref_count_;
	BoxesWizardSource * self;
	BoxesInstallerMedia* media;
};

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


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;
#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 (BoxesMediaManager* media_manager);
BoxesWizardSource* boxes_wizard_source_construct (GType object_type, 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 __lambda50_ (BoxesWizardSource* self);
void boxes_wizard_source_set_page (BoxesWizardSource* self, BoxesSourcePage value);
static void ___lambda50__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 __lambda52_ (BoxesWizardSource* self);
static void ___lambda52__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 Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void __lambda51_ (Block28Data* _data28_);
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 ___lambda51__clicked_func (gpointer self);
GtkImage* boxes_get_product_logo (OsinfoProduct* product, gint size);
GType boxes_menu_box_item_get_type (void) G_GNUC_CONST;
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_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 ___lambda49_ (Block29Data* _data29_, GtkWidget* widget);
static void ____lambda49__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self);
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 __lambda50_ (BoxesWizardSource* self) {
	boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
}


static void ___lambda50__clicked_func (gpointer self) {
	__lambda50_ (self);
}


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


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


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


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


static void block28_data_unref (void * _userdata_) {
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
		BoxesWizardSource * self;
		self = _data28_->self;
		_g_object_unref0 (_data28_->media);
		_g_object_unref0 (self);
		g_slice_free (Block28Data, _data28_);
	}
}


static void __lambda51_ (Block28Data* _data28_) {
	BoxesWizardSource * self;
	BoxesInstallerMedia* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	const gchar* _tmp2_;
	GtkEntry* _tmp3_;
	self = _data28_->self;
	_tmp0_ = _data28_->media;
	boxes_wizard_source_set_install_media (self, _tmp0_);
	_tmp1_ = _data28_->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 ___lambda51__clicked_func (gpointer self) {
	__lambda51_ (self);
}


static void boxes_wizard_source_add_media_entry (BoxesWizardSource* self, BoxesInstallerMedia* media) {
	Block28Data* _data28_;
	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* _tmp67_;
	GtkSeparator* _tmp68_;
	GtkSeparator* separator;
	BoxesInstallerMedia* _tmp69_;
	const gchar* _tmp70_;
	gchar* _tmp71_;
	gchar* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	BoxesMenuBox* _tmp75_;
	BoxesMenuBox* _tmp76_;
	BoxesMenuBox* _tmp77_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (media != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_data28_->self = g_object_ref (self);
	_tmp0_ = media;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_data28_->media = _tmp1_;
	_tmp2_ = self->priv->main_menubox;
	_tmp3_ = _data28_->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_, ___lambda51__clicked_func, block28_data_ref (_data28_), block28_data_unref, 15, 5, TRUE, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	hbox = _tmp10_;
	_tmp11_ = _data28_->media;
	_tmp12_ = _tmp11_->os;
	_tmp13_ = boxes_get_product_logo ((OsinfoProduct*) _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_ = _data28_->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_ = _data28_->media;
	_tmp30_ = _tmp29_->os_media;
	if (_tmp30_ != NULL) {
		const gchar* _tmp31_ = NULL;
		BoxesInstallerMedia* _tmp32_;
		OsinfoMedia* _tmp33_;
		gchar* _tmp34_ = NULL;
		gchar* _tmp35_;
		gchar* _tmp36_;
		gboolean _tmp37_;
		const gchar* _tmp40_;
		gchar* _tmp41_;
		gchar* architecture;
		const gchar* _tmp42_;
		GtkLabel* _tmp43_;
		GtkLabel* _tmp44_;
		GtkLabel* _tmp45_;
		GtkStyleContext* _tmp46_ = NULL;
		GtkLabel* _tmp47_;
		GtkVBox* _tmp48_;
		GtkLabel* _tmp49_;
		BoxesInstallerMedia* _tmp50_;
		OsinfoOs* _tmp51_;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		_tmp32_ = _data28_->media;
		_tmp33_ = _tmp32_->os_media;
		g_object_get (_tmp33_, "architecture", &_tmp34_, NULL);
		_tmp35_ = _tmp34_;
		_tmp36_ = _tmp35_;
		_tmp37_ = g_strcmp0 (_tmp36_, "i386") == 0;
		_g_free0 (_tmp36_);
		if (_tmp37_) {
			const gchar* _tmp38_ = NULL;
			_tmp38_ = _ ("32-bit x86 system");
			_tmp31_ = _tmp38_;
		} else {
			const gchar* _tmp39_ = NULL;
			_tmp39_ = _ ("64-bit x86 system");
			_tmp31_ = _tmp39_;
		}
		_tmp40_ = _tmp31_;
		_tmp41_ = g_strdup (_tmp40_);
		architecture = _tmp41_;
		_tmp42_ = architecture;
		_tmp43_ = (GtkLabel*) gtk_label_new (_tmp42_);
		_tmp44_ = g_object_ref_sink (_tmp43_);
		_g_object_unref0 (label);
		label = _tmp44_;
		_tmp45_ = label;
		_tmp46_ = gtk_widget_get_style_context ((GtkWidget*) _tmp45_);
		gtk_style_context_add_class (_tmp46_, "boxes-step-label");
		_tmp47_ = label;
		g_object_set ((GtkMisc*) _tmp47_, "xalign", 0.0f, NULL);
		_tmp48_ = vbox;
		_tmp49_ = label;
		gtk_box_pack_start ((GtkBox*) _tmp48_, (GtkWidget*) _tmp49_, TRUE, TRUE, (guint) 0);
		_tmp50_ = _data28_->media;
		_tmp51_ = _tmp50_->os;
		_tmp52_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp51_);
		_tmp53_ = _tmp52_;
		if (_tmp53_ != NULL) {
			GtkLabel* _tmp54_;
			GtkLabel* _tmp55_;
			const gchar* _tmp56_;
			const gchar* _tmp57_;
			const gchar* _tmp58_ = NULL;
			BoxesInstallerMedia* _tmp59_;
			OsinfoOs* _tmp60_;
			const gchar* _tmp61_;
			const gchar* _tmp62_;
			gchar* _tmp63_ = NULL;
			gchar* _tmp64_;
			gchar* _tmp65_;
			gchar* _tmp66_;
			_tmp54_ = label;
			_tmp55_ = label;
			_tmp56_ = gtk_label_get_label (_tmp55_);
			_tmp57_ = _tmp56_;
			_tmp58_ = _ (" from %s");
			_tmp59_ = _data28_->media;
			_tmp60_ = _tmp59_->os;
			_tmp61_ = osinfo_product_get_vendor ((OsinfoProduct*) _tmp60_);
			_tmp62_ = _tmp61_;
			_tmp63_ = g_strdup_printf (_tmp58_, _tmp62_);
			_tmp64_ = _tmp63_;
			_tmp65_ = g_strconcat (_tmp57_, _tmp64_, NULL);
			_tmp66_ = _tmp65_;
			gtk_label_set_label (_tmp55_, _tmp66_);
			_g_free0 (_tmp66_);
			_g_free0 (_tmp64_);
		}
		_g_free0 (architecture);
	}
	_tmp67_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	_tmp68_ = g_object_ref_sink (_tmp67_);
	separator = _tmp68_;
	_tmp69_ = _data28_->media;
	_tmp70_ = _tmp69_->device_file;
	_tmp71_ = g_strconcat ("installer-", _tmp70_, NULL);
	_tmp72_ = _tmp71_;
	_tmp73_ = g_strconcat (_tmp72_, "-separator", NULL);
	_tmp74_ = _tmp73_;
	gtk_widget_set_name ((GtkWidget*) separator, _tmp74_);
	_g_free0 (_tmp74_);
	_g_free0 (_tmp72_);
	_tmp75_ = self->priv->main_menubox;
	gtk_box_pack_start ((GtkBox*) _tmp75_, (GtkWidget*) separator, FALSE, FALSE, (guint) 0);
	_tmp76_ = self->priv->main_menubox;
	gtk_box_reorder_child ((GtkBox*) _tmp76_, (GtkWidget*) separator, 1);
	_tmp77_ = self->priv->main_menubox;
	gtk_widget_show_all ((GtkWidget*) _tmp77_);
	_g_object_unref0 (separator);
	_g_object_unref0 (label);
	_g_object_unref0 (vbox);
	_g_object_unref0 (image);
	_g_object_unref0 (hbox);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}


static Block29Data* block29_data_ref (Block29Data* _data29_) {
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}


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


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


static void ____lambda49__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self) {
	___lambda49_ (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;
	Block29Data* _data29_;
	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);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	_data29_->self = g_object_ref (self);
	_tmp0_ = clicked;
	_tmp0__target = clicked_target;
	(_data29_->clicked_target_destroy_notify == NULL) ? NULL : (_data29_->clicked_target_destroy_notify (_data29_->clicked_target), NULL);
	_data29_->clicked = NULL;
	_data29_->clicked_target = NULL;
	_data29_->clicked_target_destroy_notify = NULL;
	_data29_->clicked = _tmp0_;
	_data29_->clicked_target = _tmp0__target;
	_data29_->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_);
	_data29_->item = _tmp5_;
	_tmp6_ = box;
	_tmp7_ = _data29_->item;
	gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = beginning;
	if (_tmp8_) {
		BoxesMenuBox* _tmp9_;
		BoxesMenuBoxItem* _tmp10_;
		_tmp9_ = self->priv->main_menubox;
		_tmp10_ = _data29_->item;
		gtk_box_reorder_child ((GtkBox*) _tmp9_, (GtkWidget*) _tmp10_, 0);
	}
	_tmp11_ = name;
	if (_tmp11_ != NULL) {
		BoxesMenuBoxItem* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = _data29_->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_ = _data29_->clicked;
	_tmp20__target = _data29_->clicked_target;
	if (_tmp20_ != NULL) {
		BoxesMenuBoxItem* _tmp21_;
		BoxesMenuBox* _tmp22_;
		_tmp21_ = _data29_->item;
		boxes_menu_box_item_set_selectable (_tmp21_, TRUE);
		_tmp22_ = box;
		g_signal_connect_data (_tmp22_, "selected", (GCallback) ____lambda49__boxes_menu_box_selected, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
	}
	result = hbox;
	block29_data_unref (_data29_);
	_data29_ = NULL;
	return result;
}


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



