/* topbar.c generated by valac 0.37.1.4-3591e, the Vala compiler
 * generated from topbar.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 <gio/gio.h>
#include <glib/gi18n-lib.h>


#define BOXES_TYPE_TOPBAR_PAGE (boxes_topbar_page_get_type ())

#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 ())

#define BOXES_TYPE_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;
typedef struct _BoxesTopbarPrivate BoxesTopbarPrivate;

#define BOXES_TYPE_COLLECTION_TOOLBAR (boxes_collection_toolbar_get_type ())
#define BOXES_COLLECTION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_TOOLBAR, BoxesCollectionToolbar))
#define BOXES_COLLECTION_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_TOOLBAR, BoxesCollectionToolbarClass))
#define BOXES_IS_COLLECTION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_TOOLBAR))
#define BOXES_IS_COLLECTION_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_TOOLBAR))
#define BOXES_COLLECTION_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_TOOLBAR, BoxesCollectionToolbarClass))

typedef struct _BoxesCollectionToolbar BoxesCollectionToolbar;
typedef struct _BoxesCollectionToolbarClass BoxesCollectionToolbarClass;

#define BOXES_TYPE_SELECTION_TOOLBAR (boxes_selection_toolbar_get_type ())
#define BOXES_SELECTION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTION_TOOLBAR, BoxesSelectionToolbar))
#define BOXES_SELECTION_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTION_TOOLBAR, BoxesSelectionToolbarClass))
#define BOXES_IS_SELECTION_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTION_TOOLBAR))
#define BOXES_IS_SELECTION_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTION_TOOLBAR))
#define BOXES_SELECTION_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTION_TOOLBAR, BoxesSelectionToolbarClass))

typedef struct _BoxesSelectionToolbar BoxesSelectionToolbar;
typedef struct _BoxesSelectionToolbarClass BoxesSelectionToolbarClass;

#define BOXES_TYPE_DISPLAY_TOOLBAR (boxes_display_toolbar_get_type ())
#define BOXES_DISPLAY_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbar))
#define BOXES_DISPLAY_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbarClass))
#define BOXES_IS_DISPLAY_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_TOOLBAR))
#define BOXES_IS_DISPLAY_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_TOOLBAR))
#define BOXES_DISPLAY_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_TOOLBAR, BoxesDisplayToolbarClass))

typedef struct _BoxesDisplayToolbar BoxesDisplayToolbar;
typedef struct _BoxesDisplayToolbarClass BoxesDisplayToolbarClass;

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

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
enum  {
	BOXES_TOPBAR_DUMMY_PROPERTY,
	BOXES_TOPBAR_PREVIOUS_UI_STATE,
	BOXES_TOPBAR_UI_STATE,
	BOXES_TOPBAR_STATUS,
	BOXES_TOPBAR_PAGE,
	BOXES_TOPBAR_LAST_PROPERTY
};
static GParamSpec* boxes_topbar_properties[BOXES_TOPBAR_LAST_PROPERTY];
#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 _Block85Data Block85Data;
typedef struct _BoxesAppWindowPrivate BoxesAppWindowPrivate;

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

#define BOXES_TYPE_PROPERTIES_WINDOW (boxes_properties_window_get_type ())
#define BOXES_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindow))
#define BOXES_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindowClass))
#define BOXES_IS_PROPERTIES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES_WINDOW))
#define BOXES_IS_PROPERTIES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES_WINDOW))
#define BOXES_PROPERTIES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindowClass))

typedef struct _BoxesPropertiesWindow BoxesPropertiesWindow;
typedef struct _BoxesPropertiesWindowClass BoxesPropertiesWindowClass;

#define BOXES_TYPE_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

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

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

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

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_EMPTY_BOXES (boxes_empty_boxes_get_type ())
#define BOXES_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxes))
#define BOXES_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))
#define BOXES_IS_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_IS_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_EMPTY_BOXES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))

typedef struct _BoxesEmptyBoxes BoxesEmptyBoxes;
typedef struct _BoxesEmptyBoxesClass BoxesEmptyBoxesClass;
typedef struct _BoxesDisplayPagePrivate BoxesDisplayPagePrivate;

typedef enum  {
	BOXES_TOPBAR_PAGE_COLLECTION,
	BOXES_TOPBAR_PAGE_SELECTION,
	BOXES_TOPBAR_PAGE_DISPLAY
} BoxesTopbarPage;

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 _BoxesTopbar {
	GtkStack parent_instance;
	BoxesTopbarPrivate * priv;
	gchar* _status;
};

struct _BoxesTopbarClass {
	GtkStackClass parent_class;
};

struct _BoxesTopbarPrivate {
	BoxesUIState _previous_ui_state;
	BoxesUIState _ui_state;
	BoxesCollectionToolbar* collection_toolbar;
	BoxesSelectionToolbar* selection_toolbar;
	BoxesDisplayToolbar* display_toolbar;
	BoxesAppWindow* window;
	BoxesTopbarPage _page;
};

struct _Block85Data {
	int _ref_count_;
	BoxesTopbar* self;
	BoxesAppWindow* window;
};

struct _BoxesAppWindow {
	GtkApplicationWindow parent_instance;
	BoxesAppWindowPrivate * priv;
	BoxesWizardWindow* wizard_window;
	BoxesPropertiesWindow* props_window;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesSelectionbar* selectionbar;
	BoxesDisplayPage* display_page;
	BoxesEmptyBoxes* empty_boxes;
	GtkStack* below_bin;
	GSettings* settings;
};

struct _BoxesAppWindowClass {
	GtkApplicationWindowClass parent_class;
};

struct _BoxesDisplayPage {
	GtkBox parent_instance;
	BoxesDisplayPagePrivate * priv;
	BoxesDisplayToolbar* toolbar;
	GtkLabel* size_label;
};

struct _BoxesDisplayPageClass {
	GtkBoxClass parent_class;
};


static gpointer boxes_topbar_parent_class = NULL;
static BoxesUIIface * boxes_topbar_boxes_ui_parent_iface = NULL;

GType boxes_topbar_page_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_collection_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_selection_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_display_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_TOPBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_TOPBAR, BoxesTopbarPrivate))
void boxes_topbar_click_back_button (BoxesTopbar* self);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_collection_toolbar_click_back_button (BoxesCollectionToolbar* self);
void boxes_topbar_click_cancel_button (BoxesTopbar* self);
gboolean boxes_app_window_get_selection_mode (BoxesAppWindow* self);
void boxes_app_window_set_selection_mode (BoxesAppWindow* self, gboolean value);
void boxes_topbar_click_new_button (BoxesTopbar* self);
void boxes_collection_toolbar_click_new_button (BoxesCollectionToolbar* self);
void boxes_topbar_click_search_button (BoxesTopbar* self);
void boxes_collection_toolbar_click_search_button (BoxesCollectionToolbar* self);
void boxes_topbar_setup_ui (BoxesTopbar* self, BoxesAppWindow* window);
static Block85Data* block85_data_ref (Block85Data* _data85_);
static void block85_data_unref (void * _userdata_);
static void __lambda12_ (Block85Data* _data85_);
void boxes_topbar_set_page (BoxesTopbar* self, BoxesTopbarPage value);
static void ___lambda12__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GType boxes_wizard_window_get_type (void) G_GNUC_CONST;
GType boxes_properties_window_get_type (void) G_GNUC_CONST;
GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_empty_boxes_get_type (void) G_GNUC_CONST;
void boxes_collection_toolbar_setup_ui (BoxesCollectionToolbar* self, BoxesAppWindow* window);
void boxes_selection_toolbar_setup_ui (BoxesSelectionToolbar* self, BoxesAppWindow* window);
void boxes_display_toolbar_setup_ui (BoxesDisplayToolbar* self, BoxesAppWindow* window);
void boxes_topbar_set_status (BoxesTopbar* self, const gchar* value);
static void boxes_topbar_ui_state_changed (BoxesTopbar* self);
BoxesTopbar* boxes_topbar_new (void);
BoxesTopbar* boxes_topbar_construct (GType object_type);
const gchar* boxes_topbar_get_status (BoxesTopbar* self);
BoxesTopbarPage boxes_topbar_get_page (BoxesTopbar* self);
static GObject * boxes_topbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _boxes_topbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void boxes_topbar_finalize (GObject * obj);
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
static void _vala_boxes_topbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void boxes_ui_set_previous_ui_state (BoxesUI* self, BoxesUIState value);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void _vala_boxes_topbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);

static const gchar* BOXES_TOPBAR_page_names[3] = {"collection", "selection", "display"};

GType boxes_topbar_page_get_type (void) {
	static volatile gsize boxes_topbar_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_topbar_page_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_TOPBAR_PAGE_COLLECTION, "BOXES_TOPBAR_PAGE_COLLECTION", "collection"}, {BOXES_TOPBAR_PAGE_SELECTION, "BOXES_TOPBAR_PAGE_SELECTION", "selection"}, {BOXES_TOPBAR_PAGE_DISPLAY, "BOXES_TOPBAR_PAGE_DISPLAY", "display"}, {0, NULL, NULL}};
		GType boxes_topbar_page_type_id;
		boxes_topbar_page_type_id = g_enum_register_static ("BoxesTopbarPage", values);
		g_once_init_leave (&boxes_topbar_page_type_id__volatile, boxes_topbar_page_type_id);
	}
	return boxes_topbar_page_type_id__volatile;
}


void boxes_topbar_click_back_button (BoxesTopbar* self) {
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 27 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->window;
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = _tmp1_;
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	switch (_tmp2_) {
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_UI_STATE_PROPERTIES:
#line 314 "topbar.c"
		{
#line 30 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 318 "topbar.c"
		}
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_UI_STATE_CREDS:
#line 322 "topbar.c"
		{
			BoxesCollectionToolbar* _tmp3_;
#line 32 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			_tmp3_ = self->priv->collection_toolbar;
#line 32 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			boxes_collection_toolbar_click_back_button (_tmp3_);
#line 33 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 331 "topbar.c"
		}
		default:
#line 28 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 336 "topbar.c"
	}
}


void boxes_topbar_click_cancel_button (BoxesTopbar* self) {
	gboolean _tmp0_ = FALSE;
	BoxesAppWindow* _tmp1_;
	BoxesUIState _tmp2_;
	BoxesUIState _tmp3_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = self->priv->window;
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp1_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp3_ = _tmp2_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (_tmp3_ == BOXES_UI_STATE_COLLECTION) {
#line 356 "topbar.c"
		BoxesAppWindow* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp4_ = self->priv->window;
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp5_ = boxes_app_window_get_selection_mode (_tmp4_);
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp6_ = _tmp5_;
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = _tmp6_;
#line 368 "topbar.c"
	} else {
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = FALSE;
#line 372 "topbar.c"
	}
#line 39 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (_tmp0_) {
#line 376 "topbar.c"
		BoxesAppWindow* _tmp7_;
#line 40 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp7_ = self->priv->window;
#line 40 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_app_window_set_selection_mode (_tmp7_, FALSE);
#line 382 "topbar.c"
	}
}


void boxes_topbar_click_new_button (BoxesTopbar* self) {
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 44 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->window;
#line 44 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = _tmp1_;
#line 44 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (_tmp2_ == BOXES_UI_STATE_COLLECTION) {
#line 401 "topbar.c"
		BoxesCollectionToolbar* _tmp3_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp3_ = self->priv->collection_toolbar;
#line 45 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_collection_toolbar_click_new_button (_tmp3_);
#line 407 "topbar.c"
	}
}


void boxes_topbar_click_search_button (BoxesTopbar* self) {
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 49 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->window;
#line 49 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 49 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = _tmp1_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (_tmp2_ == BOXES_UI_STATE_COLLECTION) {
#line 426 "topbar.c"
		BoxesCollectionToolbar* _tmp3_;
#line 50 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp3_ = self->priv->collection_toolbar;
#line 50 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_collection_toolbar_click_search_button (_tmp3_);
#line 432 "topbar.c"
	}
}


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


static Block85Data* block85_data_ref (Block85Data* _data85_) {
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_atomic_int_inc (&_data85_->_ref_count_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return _data85_;
#line 449 "topbar.c"
}


static void block85_data_unref (void * _userdata_) {
	Block85Data* _data85_;
	_data85_ = (Block85Data*) _userdata_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (g_atomic_int_dec_and_test (&_data85_->_ref_count_)) {
#line 458 "topbar.c"
		BoxesTopbar* self;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		self = _data85_->self;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_g_object_unref0 (_data85_->window);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_g_object_unref0 (self);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_slice_free (Block85Data, _data85_);
#line 468 "topbar.c"
	}
}


static void __lambda12_ (Block85Data* _data85_) {
	BoxesTopbar* self;
	BoxesTopbarPage _tmp0_ = 0;
	BoxesAppWindow* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = _data85_->self;
#line 83 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = _data85_->window;
#line 83 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = boxes_app_window_get_selection_mode (_tmp1_);
#line 83 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp3_ = _tmp2_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (_tmp3_) {
#line 84 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = BOXES_TOPBAR_PAGE_SELECTION;
#line 491 "topbar.c"
	} else {
#line 84 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_topbar_set_page (self, BOXES_TOPBAR_PAGE_COLLECTION);
#line 84 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = BOXES_TOPBAR_PAGE_COLLECTION;
#line 497 "topbar.c"
	}
#line 83 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_topbar_set_page (self, _tmp0_);
#line 501 "topbar.c"
}


static void ___lambda12__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 82 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	__lambda12_ (self);
#line 508 "topbar.c"
}


void boxes_topbar_setup_ui (BoxesTopbar* self, BoxesAppWindow* window) {
	Block85Data* _data85_;
	BoxesAppWindow* _tmp0_;
	BoxesAppWindow* _tmp1_;
	BoxesAppWindow* _tmp2_;
	BoxesAppWindow* _tmp3_;
	BoxesAppWindow* _tmp4_;
	BoxesDisplayToolbar* toolbar = NULL;
	BoxesAppWindow* _tmp5_;
	BoxesDisplayPage* _tmp6_;
	BoxesDisplayToolbar* _tmp7_;
	BoxesDisplayToolbar* _tmp8_;
	BoxesDisplayToolbar* _tmp9_;
	BoxesDisplayToolbar* _tmp10_;
	BoxesCollectionToolbar* _tmp11_;
	BoxesAppWindow* _tmp12_;
	BoxesSelectionToolbar* _tmp13_;
	BoxesAppWindow* _tmp14_;
	BoxesDisplayToolbar* _tmp15_;
	BoxesAppWindow* _tmp16_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (window != NULL);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_data85_ = g_slice_new0 (Block85Data);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_data85_->_ref_count_ = 1;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_data85_->self = g_object_ref (self);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = window;
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (_data85_->window);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_data85_->window = _tmp1_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = _data85_->window;
#line 80 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (self->priv->window);
#line 80 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self->priv->window = _tmp3_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp4_ = _data85_->window;
#line 82 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_signal_connect_data ((GObject*) _tmp4_, "notify::selection-mode", (GCallback) ___lambda12__g_object_notify, block85_data_ref (_data85_), (GClosureNotify) block85_data_unref, 0);
#line 87 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp5_ = _data85_->window;
#line 87 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp6_ = _tmp5_->display_page;
#line 87 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp7_ = _tmp6_->toolbar;
#line 87 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 87 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	toolbar = _tmp8_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp9_ = self->priv->display_toolbar;
#line 88 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_bind_property_with_closures ((GObject*) toolbar, "title", (GObject*) _tmp9_, "title", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 89 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp10_ = self->priv->display_toolbar;
#line 89 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_bind_property_with_closures ((GObject*) toolbar, "subtitle", (GObject*) _tmp10_, "subtitle", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
#line 91 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp11_ = self->priv->collection_toolbar;
#line 91 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp12_ = _data85_->window;
#line 91 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_collection_toolbar_setup_ui (_tmp11_, _tmp12_);
#line 92 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp13_ = self->priv->selection_toolbar;
#line 92 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp14_ = _data85_->window;
#line 92 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_selection_toolbar_setup_ui (_tmp13_, _tmp14_);
#line 93 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp15_ = self->priv->display_toolbar;
#line 93 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp16_ = _data85_->window;
#line 93 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_display_toolbar_setup_ui (_tmp15_, _tmp16_);
#line 94 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_topbar_set_status (self, _ ("Boxes"));
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (toolbar);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	block85_data_unref (_data85_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_data85_ = NULL;
#line 606 "topbar.c"
}


static void boxes_topbar_ui_state_changed (BoxesTopbar* self) {
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
#line 97 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = boxes_ui_get_ui_state ((BoxesUI*) self);
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = _tmp0_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	switch (_tmp1_) {
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_UI_STATE_COLLECTION:
#line 623 "topbar.c"
		{
#line 100 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			boxes_topbar_set_page (self, BOXES_TOPBAR_PAGE_COLLECTION);
#line 101 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 629 "topbar.c"
		}
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_UI_STATE_CREDS:
#line 633 "topbar.c"
		{
#line 104 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			boxes_topbar_set_page (self, BOXES_TOPBAR_PAGE_COLLECTION);
#line 105 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 639 "topbar.c"
		}
#line 98 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_UI_STATE_DISPLAY:
#line 643 "topbar.c"
		{
#line 108 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			boxes_topbar_set_page (self, BOXES_TOPBAR_PAGE_DISPLAY);
#line 109 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 649 "topbar.c"
		}
		default:
		{
#line 112 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
			break;
#line 655 "topbar.c"
		}
	}
}


BoxesTopbar* boxes_topbar_construct (GType object_type) {
	BoxesTopbar * self = NULL;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = (BoxesTopbar*) g_object_new (object_type, NULL);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return self;
#line 667 "topbar.c"
}


BoxesTopbar* boxes_topbar_new (void) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return boxes_topbar_construct (BOXES_TYPE_TOPBAR);
#line 674 "topbar.c"
}


static BoxesUIState boxes_topbar_real_get_previous_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesTopbar* self;
	BoxesUIState _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = (BoxesTopbar*) base;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->_previous_ui_state;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	result = _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return result;
#line 690 "topbar.c"
}


static void boxes_topbar_real_set_previous_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesTopbar* self;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = (BoxesTopbar*) base;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (boxes_topbar_real_get_previous_ui_state (base) != value) {
#line 700 "topbar.c"
		BoxesUIState _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = value;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		self->priv->_previous_ui_state = _tmp0_;
#line 14 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_topbar_properties[BOXES_TOPBAR_PREVIOUS_UI_STATE]);
#line 708 "topbar.c"
	}
}


static BoxesUIState boxes_topbar_real_get_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesTopbar* self;
	BoxesUIState _tmp0_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = (BoxesTopbar*) base;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->_ui_state;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	result = _tmp0_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return result;
#line 725 "topbar.c"
}


static void boxes_topbar_real_set_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesTopbar* self;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = (BoxesTopbar*) base;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	if (boxes_topbar_real_get_ui_state (base) != value) {
#line 735 "topbar.c"
		BoxesUIState _tmp0_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		_tmp0_ = value;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		self->priv->_ui_state = _tmp0_;
#line 15 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_topbar_properties[BOXES_TOPBAR_UI_STATE]);
#line 743 "topbar.c"
	}
}


const gchar* boxes_topbar_get_status (BoxesTopbar* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->_status;
#line 55 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	result = _tmp0_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return result;
#line 759 "topbar.c"
}


void boxes_topbar_set_status (BoxesTopbar* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	BoxesCollectionToolbar* _tmp2_;
	const gchar* _tmp3_;
	BoxesDisplayToolbar* _tmp4_;
	const gchar* _tmp5_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 57 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = value;
#line 57 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 57 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_free0 (self->_status);
#line 57 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self->_status = _tmp1_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = self->priv->collection_toolbar;
#line 58 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp3_ = self->_status;
#line 58 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_header_bar_set_title ((GtkHeaderBar*) _tmp2_, _tmp3_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp4_ = self->priv->display_toolbar;
#line 59 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp5_ = self->_status;
#line 59 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_header_bar_set_title ((GtkHeaderBar*) _tmp4_, _tmp5_);
#line 56 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_topbar_properties[BOXES_TOPBAR_STATUS]);
#line 794 "topbar.c"
}


BoxesTopbarPage boxes_topbar_get_page (BoxesTopbar* self) {
	BoxesTopbarPage result;
	BoxesTopbarPage _tmp0_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 65 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = self->priv->_page;
#line 65 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	result = _tmp0_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return result;
#line 809 "topbar.c"
}


void boxes_topbar_set_page (BoxesTopbar* self, BoxesTopbarPage value) {
	BoxesTopbarPage _tmp0_;
	BoxesTopbarPage _tmp1_;
	const gchar* _tmp2_;
#line 66 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_return_if_fail (self != NULL);
#line 67 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp0_ = value;
#line 67 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self->priv->_page = _tmp0_;
#line 69 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp1_ = value;
#line 69 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_tmp2_ = BOXES_TOPBAR_page_names[_tmp1_];
#line 69 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_stack_set_visible_child_name ((GtkStack*) self, _tmp2_);
#line 66 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_topbar_properties[BOXES_TOPBAR_PAGE]);
#line 831 "topbar.c"
}


static void _boxes_topbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 74 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_topbar_ui_state_changed ((BoxesTopbar*) self);
#line 838 "topbar.c"
}


static GObject * boxes_topbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesTopbar * self;
#line 73 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	parent_class = G_OBJECT_CLASS (boxes_topbar_parent_class);
#line 73 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 73 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_TOPBAR, BoxesTopbar);
#line 74 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_signal_connect_object ((GObject*) self, "notify::ui-state", (GCallback) _boxes_topbar_ui_state_changed_g_object_notify, self, 0);
#line 76 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_stack_set_transition_type ((GtkStack*) self, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
#line 73 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	return obj;
#line 858 "topbar.c"
}


static void boxes_topbar_class_init (BoxesTopbarClass * klass) {
	gint BoxesTopbar_private_offset;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_topbar_parent_class = g_type_class_peek_parent (klass);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesTopbarPrivate));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_topbar_get_property;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_topbar_set_property;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_topbar_constructor;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_topbar_finalize;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TOPBAR_PREVIOUS_UI_STATE, boxes_topbar_properties[BOXES_TOPBAR_PREVIOUS_UI_STATE] = g_param_spec_enum ("previous-ui-state", "previous-ui-state", "previous-ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TOPBAR_UI_STATE, boxes_topbar_properties[BOXES_TOPBAR_UI_STATE] = g_param_spec_enum ("ui-state", "ui-state", "ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TOPBAR_STATUS, boxes_topbar_properties[BOXES_TOPBAR_STATUS] = g_param_spec_string ("status", "status", "status", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_TOPBAR_PAGE, boxes_topbar_properties[BOXES_TOPBAR_PAGE] = g_param_spec_enum ("page", "page", "page", BOXES_TYPE_TOPBAR_PAGE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	BoxesTopbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/topbar.ui");
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collection_toolbar", FALSE, BoxesTopbar_private_offset + G_STRUCT_OFFSET (BoxesTopbarPrivate, collection_toolbar));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "selection_toolbar", FALSE, BoxesTopbar_private_offset + G_STRUCT_OFFSET (BoxesTopbarPrivate, selection_toolbar));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "display_toolbar", FALSE, BoxesTopbar_private_offset + G_STRUCT_OFFSET (BoxesTopbarPrivate, display_toolbar));
#line 894 "topbar.c"
}


static void boxes_topbar_boxes_ui_interface_init (BoxesUIIface * iface) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	boxes_topbar_boxes_ui_parent_iface = g_type_interface_peek_parent (iface);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	iface->get_previous_ui_state = boxes_topbar_real_get_previous_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	iface->set_previous_ui_state = boxes_topbar_real_set_previous_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	iface->get_ui_state = boxes_topbar_real_get_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	iface->set_ui_state = boxes_topbar_real_set_ui_state;
#line 909 "topbar.c"
}


static void boxes_topbar_instance_init (BoxesTopbar * self) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self->priv = BOXES_TOPBAR_GET_PRIVATE (self);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_type_ensure (BOXES_TYPE_COLLECTION_TOOLBAR);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_type_ensure (BOXES_TYPE_SELECTION_TOOLBAR);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	g_type_ensure (BOXES_TYPE_DISPLAY_TOOLBAR);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 924 "topbar.c"
}


static void boxes_topbar_finalize (GObject * obj) {
	BoxesTopbar * self;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_TOPBAR, BoxesTopbar);
#line 18 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (self->priv->collection_toolbar);
#line 20 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (self->priv->selection_toolbar);
#line 22 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (self->priv->display_toolbar);
#line 24 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_object_unref0 (self->priv->window);
#line 53 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	_g_free0 (self->_status);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	G_OBJECT_CLASS (boxes_topbar_parent_class)->finalize (obj);
#line 944 "topbar.c"
}


GType boxes_topbar_get_type (void) {
	static volatile gsize boxes_topbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_topbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesTopbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_topbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesTopbar), 0, (GInstanceInitFunc) boxes_topbar_instance_init, NULL };
		static const GInterfaceInfo boxes_ui_info = { (GInterfaceInitFunc) boxes_topbar_boxes_ui_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_topbar_type_id;
		boxes_topbar_type_id = g_type_register_static (gtk_stack_get_type (), "BoxesTopbar", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_topbar_type_id, BOXES_TYPE_UI, &boxes_ui_info);
		g_once_init_leave (&boxes_topbar_type_id__volatile, boxes_topbar_type_id);
	}
	return boxes_topbar_type_id__volatile;
}


static void _vala_boxes_topbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesTopbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_TOPBAR, BoxesTopbar);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	switch (property_id) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_PREVIOUS_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_value_set_enum (value, boxes_ui_get_previous_ui_state ((BoxesUI*) self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_value_set_enum (value, boxes_ui_get_ui_state ((BoxesUI*) self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_STATUS:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_value_set_string (value, boxes_topbar_get_status (self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_PAGE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		g_value_set_enum (value, boxes_topbar_get_page (self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 991 "topbar.c"
		default:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 997 "topbar.c"
	}
}


static void _vala_boxes_topbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesTopbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_TOPBAR, BoxesTopbar);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
	switch (property_id) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_PREVIOUS_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_ui_set_previous_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_ui_set_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_STATUS:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_topbar_set_status (self, g_value_get_string (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		case BOXES_TOPBAR_PAGE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		boxes_topbar_set_page (self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 1031 "topbar.c"
		default:
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 11 "/home/fborges/checkout/gnome-boxes/src/topbar.vala"
		break;
#line 1037 "topbar.c"
	}
}



