/* wizard-toolbar.c generated by valac 0.36.1.38-6532, the Vala compiler
 * generated from wizard-toolbar.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>


#define BOXES_TYPE_WIZARD_TOOLBAR (boxes_wizard_toolbar_get_type ())
#define BOXES_WIZARD_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbar))
#define BOXES_WIZARD_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbarClass))
#define BOXES_IS_WIZARD_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD_TOOLBAR))
#define BOXES_IS_WIZARD_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD_TOOLBAR))
#define BOXES_WIZARD_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbarClass))

typedef struct _BoxesWizardToolbar BoxesWizardToolbar;
typedef struct _BoxesWizardToolbarClass BoxesWizardToolbarClass;
typedef struct _BoxesWizardToolbarPrivate BoxesWizardToolbarPrivate;

#define BOXES_TYPE_WIZARD_WINDOW_PAGE (boxes_wizard_window_page_get_type ())

#define BOXES_TYPE_WIZARD_WINDOW (boxes_wizard_window_get_type ())
#define BOXES_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindow))
#define BOXES_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))
#define BOXES_IS_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_IS_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_WIZARD_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))

typedef struct _BoxesWizardWindow BoxesWizardWindow;
typedef struct _BoxesWizardWindowClass BoxesWizardWindowClass;
enum  {
	BOXES_WIZARD_TOOLBAR_DUMMY_PROPERTY,
	BOXES_WIZARD_TOOLBAR_PAGE,
	BOXES_WIZARD_TOOLBAR_LAST_PROPERTY
};
static GParamSpec* boxes_wizard_toolbar_properties[BOXES_WIZARD_TOOLBAR_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block98Data Block98Data;

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _BoxesWizardWindowPrivate BoxesWizardWindowPrivate;

#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_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 _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_WIZARD_PAGE (boxes_wizard_page_get_type ())
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _BoxesWizardToolbar {
	GtkStack parent_instance;
	BoxesWizardToolbarPrivate * priv;
	GtkButton* cancel_btn;
	GtkButton* back_btn;
	GtkButton* continue_btn;
	GtkButton* create_btn;
};

struct _BoxesWizardToolbarClass {
	GtkStackClass parent_class;
};

typedef enum  {
	BOXES_WIZARD_WINDOW_PAGE_MAIN,
	BOXES_WIZARD_WINDOW_PAGE_CUSTOMIZATION,
	BOXES_WIZARD_WINDOW_PAGE_FILE_CHOOSER
} BoxesWizardWindowPage;

struct _BoxesWizardToolbarPrivate {
	BoxesWizardWindowPage _page;
	GtkHeaderBar* main;
	GtkButton* file_chooser_open_button;
	BoxesWizardWindow* wizard_window;
};

struct _Block98Data {
	int _ref_count_;
	BoxesWizardToolbar* self;
	GtkFileChooserWidget* file_chooser;
};

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

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

struct _BoxesWizardWindow {
	GtkWindow parent_instance;
	BoxesWizardWindowPrivate * priv;
	GtkStack* view;
	BoxesWizard* wizard;
	GtkGrid* customization_grid;
	GtkFileChooserWidget* file_chooser;
	BoxesWizardToolbar* topbar;
	BoxesNotificationbar* notificationbar;
};

struct _BoxesWizardWindowClass {
	GtkWindowClass parent_class;
};

typedef enum  {
	BOXES_WIZARD_PAGE_SOURCE,
	BOXES_WIZARD_PAGE_PREPARATION,
	BOXES_WIZARD_PAGE_SETUP,
	BOXES_WIZARD_PAGE_REVIEW,
	BOXES_WIZARD_PAGE_LAST
} BoxesWizardPage;


static gpointer boxes_wizard_toolbar_parent_class = NULL;

GType boxes_wizard_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_window_page_get_type (void) G_GNUC_CONST;
GType boxes_wizard_window_get_type (void) G_GNUC_CONST;
#define BOXES_WIZARD_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbarPrivate))
void boxes_wizard_toolbar_setup_ui (BoxesWizardToolbar* self, BoxesWizardWindow* wizard_window);
static Block98Data* block98_data_ref (Block98Data* _data98_);
static void block98_data_unref (void * _userdata_);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
static void __lambda137_ (Block98Data* _data98_);
static void ___lambda137__gtk_file_chooser_selection_changed (GtkFileChooser* _sender, gpointer self);
void boxes_wizard_toolbar_click_back_button (BoxesWizardToolbar* self);
void boxes_wizard_toolbar_click_forward_button (BoxesWizardToolbar* self);
GType boxes_wizard_page_get_type (void) G_GNUC_CONST;
void boxes_wizard_toolbar_set_title_for_page (BoxesWizardToolbar* self, BoxesWizardPage page);
static void boxes_wizard_toolbar_on_customization_back_clicked (BoxesWizardToolbar* self);
BoxesWizardWindowPage boxes_wizard_toolbar_get_page (BoxesWizardToolbar* self);
void boxes_wizard_window_set_page (BoxesWizardWindow* self, BoxesWizardWindowPage value);
static void _boxes_wizard_toolbar_on_customization_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_wizard_toolbar_on_file_chooser_cancel_clicked (BoxesWizardToolbar* self);
static void _boxes_wizard_toolbar_on_file_chooser_cancel_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_wizard_toolbar_on_file_chooser_open_clicked (BoxesWizardToolbar* self);
static void _boxes_wizard_toolbar_on_file_chooser_open_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
BoxesWizardToolbar* boxes_wizard_toolbar_new (void);
BoxesWizardToolbar* boxes_wizard_toolbar_construct (GType object_type);
void boxes_wizard_toolbar_set_page (BoxesWizardToolbar* self, BoxesWizardWindowPage value);
static void boxes_wizard_toolbar_finalize (GObject * obj);
static void _vala_boxes_wizard_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_wizard_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);

static const gchar* BOXES_WIZARD_TOOLBAR_page_titles[5] = {N_ ("Source Selection"), N_ ("Box Preparation"), N_ ("Box Setup"), N_ ("Review"), ""};
extern const gchar* BOXES_WIZARD_WINDOW_page_names[3];

static Block98Data* block98_data_ref (Block98Data* _data98_) {
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_atomic_int_inc (&_data98_->_ref_count_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	return _data98_;
#line 200 "wizard-toolbar.c"
}


static void block98_data_unref (void * _userdata_) {
	Block98Data* _data98_;
	_data98_ = (Block98Data*) _userdata_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	if (g_atomic_int_dec_and_test (&_data98_->_ref_count_)) {
#line 209 "wizard-toolbar.c"
		BoxesWizardToolbar* self;
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		self = _data98_->self;
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		_g_object_unref0 (_data98_->file_chooser);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		_g_object_unref0 (self);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		g_slice_free (Block98Data, _data98_);
#line 219 "wizard-toolbar.c"
	}
}


static gpointer _g_object_ref0 (gpointer self) {
#line 42 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	return self ? g_object_ref (self) : NULL;
#line 227 "wizard-toolbar.c"
}


static void __lambda137_ (Block98Data* _data98_) {
	BoxesWizardToolbar* self;
	gchar* path = NULL;
	gchar* _tmp0_;
	GtkButton* _tmp1_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self = _data98_->self;
#line 44 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _data98_->file_chooser);
#line 44 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	path = _tmp0_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = self->priv->file_chooser_open_button;
#line 46 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, path != NULL);
#line 43 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_free0 (path);
#line 248 "wizard-toolbar.c"
}


static void ___lambda137__gtk_file_chooser_selection_changed (GtkFileChooser* _sender, gpointer self) {
#line 43 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	__lambda137_ (self);
#line 255 "wizard-toolbar.c"
}


void boxes_wizard_toolbar_setup_ui (BoxesWizardToolbar* self, BoxesWizardWindow* wizard_window) {
	Block98Data* _data98_;
	BoxesWizardWindow* _tmp0_;
	BoxesWizardWindow* _tmp1_;
	GtkFileChooserWidget* _tmp2_;
	GtkFileChooserWidget* _tmp3_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (wizard_window != NULL);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_data98_ = g_slice_new0 (Block98Data);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_data98_->_ref_count_ = 1;
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_data98_->self = g_object_ref (self);
#line 40 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = wizard_window;
#line 40 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self->priv->wizard_window = _tmp0_;
#line 42 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = wizard_window;
#line 42 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = _tmp1_->file_chooser;
#line 42 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 42 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_data98_->file_chooser = _tmp3_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_signal_connect_data ((GtkFileChooser*) _data98_->file_chooser, "selection-changed", (GCallback) ___lambda137__gtk_file_chooser_selection_changed, block98_data_ref (_data98_), (GClosureNotify) block98_data_unref, 0);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	block98_data_unref (_data98_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_data98_ = NULL;
#line 293 "wizard-toolbar.c"
}


void boxes_wizard_toolbar_click_back_button (BoxesWizardToolbar* self) {
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
#line 50 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 51 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = self->back_btn;
#line 51 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
#line 51 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	if (_tmp2_) {
#line 311 "wizard-toolbar.c"
		GtkButton* _tmp3_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		_tmp3_ = self->back_btn;
#line 52 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		gtk_button_clicked (_tmp3_);
#line 317 "wizard-toolbar.c"
	}
}


void boxes_wizard_toolbar_click_forward_button (BoxesWizardToolbar* self) {
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 56 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = self->continue_btn;
#line 56 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
#line 56 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	if (_tmp2_) {
#line 336 "wizard-toolbar.c"
		GtkButton* _tmp3_;
#line 57 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		_tmp3_ = self->continue_btn;
#line 57 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		gtk_button_clicked (_tmp3_);
#line 342 "wizard-toolbar.c"
	}
}


void boxes_wizard_toolbar_set_title_for_page (BoxesWizardToolbar* self, BoxesWizardPage page) {
	GtkHeaderBar* _tmp0_;
	BoxesWizardPage _tmp1_;
	const gchar* _tmp2_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 61 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = self->priv->main;
#line 61 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = page;
#line 61 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = BOXES_WIZARD_TOOLBAR_page_titles[_tmp1_];
#line 61 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_header_bar_set_title (_tmp0_, _ (_tmp2_));
#line 361 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_on_customization_back_clicked (BoxesWizardToolbar* self) {
	BoxesWizardWindowPage _tmp0_;
	BoxesWizardWindowPage _tmp1_;
	BoxesWizardWindow* _tmp2_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 65 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = boxes_wizard_toolbar_get_page (self);
#line 65 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = _tmp0_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_vala_return_if_fail (_tmp1_ == BOXES_WIZARD_WINDOW_PAGE_CUSTOMIZATION, "page == WizardWindowPage.CUSTOMIZATION");
#line 66 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = self->priv->wizard_window;
#line 66 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_window_set_page (_tmp2_, BOXES_WIZARD_WINDOW_PAGE_MAIN);
#line 381 "wizard-toolbar.c"
}


static void _boxes_wizard_toolbar_on_customization_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_toolbar_on_customization_back_clicked ((BoxesWizardToolbar*) self);
#line 388 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_on_file_chooser_cancel_clicked (BoxesWizardToolbar* self) {
	BoxesWizardWindowPage _tmp0_;
	BoxesWizardWindowPage _tmp1_;
	BoxesWizardWindow* _tmp2_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 70 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = boxes_wizard_toolbar_get_page (self);
#line 70 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = _tmp0_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_vala_return_if_fail (_tmp1_ == BOXES_WIZARD_WINDOW_PAGE_FILE_CHOOSER, "page == WizardWindowPage.FILE_CHOOSER");
#line 71 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = self->priv->wizard_window;
#line 71 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_window_set_page (_tmp2_, BOXES_WIZARD_WINDOW_PAGE_MAIN);
#line 408 "wizard-toolbar.c"
}


static void _boxes_wizard_toolbar_on_file_chooser_cancel_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_toolbar_on_file_chooser_cancel_clicked ((BoxesWizardToolbar*) self);
#line 415 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_on_file_chooser_open_clicked (BoxesWizardToolbar* self) {
	BoxesWizardWindowPage _tmp0_;
	BoxesWizardWindowPage _tmp1_;
	GtkFileChooserWidget* file_chooser = NULL;
	BoxesWizardWindow* _tmp2_;
	GtkFileChooserWidget* _tmp3_;
	GtkFileChooserWidget* _tmp4_;
	GFile* file = NULL;
	GtkFileChooserWidget* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GFileType file_type = 0;
	GFile* _tmp8_;
	GFileType _tmp9_;
	GFileType _tmp10_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = boxes_wizard_toolbar_get_page (self);
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = _tmp0_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_vala_return_if_fail (_tmp1_ == BOXES_WIZARD_WINDOW_PAGE_FILE_CHOOSER, "page == WizardWindowPage.FILE_CHOOSER");
#line 76 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = self->priv->wizard_window;
#line 76 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp3_ = _tmp2_->file_chooser;
#line 76 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 76 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	file_chooser = _tmp4_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp5_ = file_chooser;
#line 77 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp6_ = gtk_file_chooser_get_file ((GtkFileChooser*) _tmp5_);
#line 77 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	file = _tmp6_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp7_ = file;
#line 78 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_vala_assert (_tmp7_ != NULL, "file != null");
#line 79 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp8_ = file;
#line 79 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp9_ = g_file_query_file_type (_tmp8_, G_FILE_QUERY_INFO_NONE, NULL);
#line 79 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	file_type = _tmp9_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp10_ = file_type;
#line 81 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	switch (_tmp10_) {
#line 81 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		case G_FILE_TYPE_REGULAR:
#line 81 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		case G_FILE_TYPE_SYMBOLIC_LINK:
#line 474 "wizard-toolbar.c"
		{
			GtkFileChooserWidget* _tmp11_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_tmp11_ = file_chooser;
#line 84 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			g_signal_emit_by_name ((GtkFileChooser*) _tmp11_, "file-activated");
#line 85 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			break;
#line 483 "wizard-toolbar.c"
		}
#line 81 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		case G_FILE_TYPE_DIRECTORY:
#line 487 "wizard-toolbar.c"
		{
			GtkFileChooserWidget* _tmp12_;
			GFile* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_tmp12_ = file_chooser;
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_tmp13_ = file;
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_tmp14_ = g_file_get_path (_tmp13_);
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_tmp15_ = _tmp14_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp12_, _tmp15_);
#line 88 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			_g_free0 (_tmp15_);
#line 89 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			break;
#line 507 "wizard-toolbar.c"
		}
		default:
		{
#line 92 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			g_debug ("wizard-toolbar.vala:92: Unknown file type selected");
#line 93 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
			break;
#line 515 "wizard-toolbar.c"
		}
	}
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (file);
#line 75 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (file_chooser);
#line 522 "wizard-toolbar.c"
}


static void _boxes_wizard_toolbar_on_file_chooser_open_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_toolbar_on_file_chooser_open_clicked ((BoxesWizardToolbar*) self);
#line 529 "wizard-toolbar.c"
}


BoxesWizardToolbar* boxes_wizard_toolbar_construct (GType object_type) {
	BoxesWizardToolbar * self = NULL;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self = (BoxesWizardToolbar*) g_object_new (object_type, NULL);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	return self;
#line 539 "wizard-toolbar.c"
}


BoxesWizardToolbar* boxes_wizard_toolbar_new (void) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	return boxes_wizard_toolbar_construct (BOXES_TYPE_WIZARD_TOOLBAR);
#line 546 "wizard-toolbar.c"
}


BoxesWizardWindowPage boxes_wizard_toolbar_get_page (BoxesWizardToolbar* self) {
	BoxesWizardWindowPage result;
	BoxesWizardWindowPage _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 14 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = self->priv->_page;
#line 14 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	result = _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	return result;
#line 561 "wizard-toolbar.c"
}


void boxes_wizard_toolbar_set_page (BoxesWizardToolbar* self, BoxesWizardWindowPage value) {
	BoxesWizardWindowPage _tmp0_;
	BoxesWizardWindowPage _tmp1_;
	const gchar* _tmp2_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 16 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp0_ = value;
#line 16 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self->priv->_page = _tmp0_;
#line 18 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp1_ = value;
#line 18 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_tmp2_ = BOXES_WIZARD_WINDOW_page_names[_tmp1_];
#line 18 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_stack_set_visible_child_name ((GtkStack*) self, _tmp2_);
#line 15 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_wizard_toolbar_properties[BOXES_WIZARD_TOOLBAR_PAGE]);
#line 583 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_class_init (BoxesWizardToolbarClass * klass) {
	gint BoxesWizardToolbar_private_offset;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	boxes_wizard_toolbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesWizardToolbarPrivate));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_wizard_toolbar_get_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_wizard_toolbar_set_property;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_wizard_toolbar_finalize;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_WIZARD_TOOLBAR_PAGE, boxes_wizard_toolbar_properties[BOXES_WIZARD_TOOLBAR_PAGE] = g_param_spec_enum ("page", "page", "page", BOXES_TYPE_WIZARD_WINDOW_PAGE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	BoxesWizardToolbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/wizard-toolbar.ui");
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main", FALSE, BoxesWizardToolbar_private_offset + G_STRUCT_OFFSET (BoxesWizardToolbarPrivate, main));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_btn", FALSE, G_STRUCT_OFFSET (BoxesWizardToolbar, cancel_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_btn", FALSE, G_STRUCT_OFFSET (BoxesWizardToolbar, back_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "continue_btn", FALSE, G_STRUCT_OFFSET (BoxesWizardToolbar, continue_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "create_btn", FALSE, G_STRUCT_OFFSET (BoxesWizardToolbar, create_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "file_chooser_open_button", FALSE, BoxesWizardToolbar_private_offset + G_STRUCT_OFFSET (BoxesWizardToolbarPrivate, file_chooser_open_button));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_customization_back_clicked", G_CALLBACK(_boxes_wizard_toolbar_on_customization_back_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_file_chooser_cancel_clicked", G_CALLBACK(_boxes_wizard_toolbar_on_file_chooser_cancel_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_file_chooser_open_clicked", G_CALLBACK(_boxes_wizard_toolbar_on_file_chooser_open_clicked_gtk_button_clicked));
#line 623 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_instance_init (BoxesWizardToolbar * self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self->priv = BOXES_WIZARD_TOOLBAR_GET_PRIVATE (self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 632 "wizard-toolbar.c"
}


static void boxes_wizard_toolbar_finalize (GObject * obj) {
	BoxesWizardToolbar * self;
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbar);
#line 23 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->priv->main);
#line 26 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->cancel_btn);
#line 28 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->back_btn);
#line 30 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->continue_btn);
#line 32 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->create_btn);
#line 35 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	_g_object_unref0 (self->priv->file_chooser_open_button);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	G_OBJECT_CLASS (boxes_wizard_toolbar_parent_class)->finalize (obj);
#line 654 "wizard-toolbar.c"
}


GType boxes_wizard_toolbar_get_type (void) {
	static volatile gsize boxes_wizard_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_wizard_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesWizardToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_wizard_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesWizardToolbar), 0, (GInstanceInitFunc) boxes_wizard_toolbar_instance_init, NULL };
		GType boxes_wizard_toolbar_type_id;
		boxes_wizard_toolbar_type_id = g_type_register_static (gtk_stack_get_type (), "BoxesWizardToolbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_wizard_toolbar_type_id__volatile, boxes_wizard_toolbar_type_id);
	}
	return boxes_wizard_toolbar_type_id__volatile;
}


static void _vala_boxes_wizard_toolbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesWizardToolbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbar);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		case BOXES_WIZARD_TOOLBAR_PAGE:
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		g_value_set_enum (value, boxes_wizard_toolbar_get_page (self));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		break;
#line 681 "wizard-toolbar.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		break;
#line 687 "wizard-toolbar.c"
	}
}


static void _vala_boxes_wizard_toolbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesWizardToolbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_WIZARD_TOOLBAR, BoxesWizardToolbar);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
	switch (property_id) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		case BOXES_WIZARD_TOOLBAR_PAGE:
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		boxes_wizard_toolbar_set_page (self, g_value_get_enum (value));
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		break;
#line 703 "wizard-toolbar.c"
		default:
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/fborges/checkout/gnome-boxes/src/wizard-toolbar.vala"
		break;
#line 709 "wizard-toolbar.c"
	}
}



