/* wizard-source.c generated by valac 0.15.1.24-8065, 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 <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.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_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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#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 _Block23Data Block23Data;

typedef enum  {
	BOXES_SOURCE_PAGE_MAIN,
	BOXES_SOURCE_PAGE_URL,
	BOXES_SOURCE_PAGE_FILE,
	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;
	BoxesMenuBox* menubox;
	GtkNotebook* notebook;
	GtkLabel* url_label;
	GtkImage* url_image;
};

struct _Block23Data {
	int _ref_count_;
	BoxesWizardSource * self;
	BoxesMenuBoxItem* item;
	ClickedFunc clicked;
	gpointer clicked_target;
};


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_menu_box_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
};
BoxesWizardSource* boxes_wizard_source_new (void);
BoxesWizardSource* boxes_wizard_source_construct (GType object_type);
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);
static void __lambda44_ (BoxesWizardSource* self);
void boxes_wizard_source_set_page (BoxesWizardSource* self, BoxesSourcePage value);
static void ___lambda44__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 __lambda45_ (BoxesWizardSource* self);
static void ___lambda45__clicked_func (gpointer self);
void boxes_wizard_source_update_url_page (BoxesWizardSource* self, const gchar* title, const gchar* text, const gchar* icon_name);
GType boxes_menu_box_item_get_type (void) G_GNUC_CONST;
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_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 ___lambda43_ (Block23Data* _data23_, GtkWidget* widget);
static void ____lambda43__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self);
void boxes_wizard_source_set_uri (BoxesWizardSource* self, const gchar* value);
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);
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_FILE, "BOXES_SOURCE_PAGE_FILE", "file"}, {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 void __lambda44_ (BoxesWizardSource* self) {
	boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
}


static void ___lambda44__clicked_func (gpointer self) {
	__lambda44_ (self);
}


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


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


static void ___lambda45__clicked_func (gpointer self) {
	__lambda45_ (self);
}


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


BoxesWizardSource* boxes_wizard_source_new (void) {
	return boxes_wizard_source_construct (BOXES_TYPE_WIZARD_SOURCE);
}


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 Block23Data* block23_data_ref (Block23Data* _data23_) {
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}


static void block23_data_unref (void * _userdata_) {
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		BoxesWizardSource * self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->item);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}


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


static void ____lambda43__boxes_menu_box_selected (BoxesMenuBox* _sender, GtkWidget* widget, gpointer self) {
	___lambda43_ (self, widget);
}


static GtkHBox* boxes_wizard_source_add_entry (BoxesWizardSource* self, BoxesMenuBox* box, ClickedFunc clicked, void* clicked_target) {
	GtkHBox* result = NULL;
	Block23Data* _data23_;
	ClickedFunc _tmp0_;
	void* _tmp0__target;
	GtkHBox* _tmp1_;
	GtkHBox* _tmp2_;
	GtkHBox* hbox;
	GtkHBox* _tmp3_;
	BoxesMenuBoxItem* _tmp4_;
	BoxesMenuBoxItem* _tmp5_;
	BoxesMenuBox* _tmp6_;
	BoxesMenuBoxItem* _tmp7_;
	GtkHBox* _tmp8_;
	GtkHBox* _tmp9_;
	GtkHBox* _tmp10_;
	GtkHBox* _tmp11_;
	ClickedFunc _tmp12_;
	void* _tmp12__target;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (box != NULL, NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = clicked;
	_tmp0__target = clicked_target;
	_data23_->clicked = _tmp0_;
	_data23_->clicked_target = _tmp0__target;
	_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_);
	_data23_->item = _tmp5_;
	_tmp6_ = box;
	_tmp7_ = _data23_->item;
	gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = hbox;
	_tmp9_ = hbox;
	gtk_widget_set_margin_right ((GtkWidget*) _tmp9_, 20);
	gtk_widget_set_margin_left ((GtkWidget*) _tmp8_, 20);
	_tmp10_ = hbox;
	_tmp11_ = hbox;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp11_, 10);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp10_, 10);
	_tmp12_ = _data23_->clicked;
	_tmp12__target = _data23_->clicked_target;
	if (_tmp12_ != NULL) {
		BoxesMenuBoxItem* _tmp13_;
		BoxesMenuBox* _tmp14_;
		_tmp13_ = _data23_->item;
		boxes_menu_box_item_set_selectable (_tmp13_, TRUE);
		_tmp14_ = box;
		g_signal_connect_data (_tmp14_, "selected", (GCallback) ____lambda43__boxes_menu_box_selected, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
	}
	result = hbox;
	block23_data_unref (_data23_);
	_data23_ = 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_;
	gint _tmp6_ = 0;
	GtkFileChooserDialog* _tmp10_;
	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_dialog_run ((GtkDialog*) _tmp5_);
	if (_tmp6_ == ((gint) GTK_RESPONSE_ACCEPT)) {
		GtkFileChooserDialog* _tmp7_;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		_tmp7_ = dialog;
		_tmp8_ = gtk_file_chooser_get_uri ((GtkFileChooser*) _tmp7_);
		_tmp9_ = _tmp8_;
		boxes_wizard_source_set_uri (self, _tmp9_);
		_g_free0 (_tmp9_);
		boxes_wizard_source_set_page (self, BOXES_SOURCE_PAGE_URL);
	}
	_tmp10_ = dialog;
	gtk_widget_hide ((GtkWidget*) _tmp10_);
	_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_;
			_tmp6_ = self->priv->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");
}


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


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->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_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;
		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;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



