/* collection-toolbar.c generated by valac 0.36.1.38-6532, the Vala compiler
 * generated from collection-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 <libcommon.h>
#include <gio/gio.h>


#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;
typedef struct _BoxesCollectionToolbarPrivate BoxesCollectionToolbarPrivate;

#define BOXES_TYPE_COLLECTION_FILTER_SWITCHER (boxes_collection_filter_switcher_get_type ())
#define BOXES_COLLECTION_FILTER_SWITCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER_SWITCHER, BoxesCollectionFilterSwitcher))
#define BOXES_COLLECTION_FILTER_SWITCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER_SWITCHER, BoxesCollectionFilterSwitcherClass))
#define BOXES_IS_COLLECTION_FILTER_SWITCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER_SWITCHER))
#define BOXES_IS_COLLECTION_FILTER_SWITCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER_SWITCHER))
#define BOXES_COLLECTION_FILTER_SWITCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER_SWITCHER, BoxesCollectionFilterSwitcherClass))

typedef struct _BoxesCollectionFilterSwitcher BoxesCollectionFilterSwitcher;
typedef struct _BoxesCollectionFilterSwitcherClass BoxesCollectionFilterSwitcherClass;

#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_COLLECTION_TOOLBAR_DUMMY_PROPERTY,
	BOXES_COLLECTION_TOOLBAR_LAST_PROPERTY
};
static GParamSpec* boxes_collection_toolbar_properties[BOXES_COLLECTION_TOOLBAR_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

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

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

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

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_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 _BoxesCollectionPrivate BoxesCollectionPrivate;

struct _BoxesCollectionToolbar {
	GtkHeaderBar parent_instance;
	BoxesCollectionToolbarPrivate * priv;
};

struct _BoxesCollectionToolbarClass {
	GtkHeaderBarClass parent_class;
};

struct _BoxesCollectionToolbarPrivate {
	GtkButton* search_btn;
	GtkButton* select_btn;
	GtkButton* list_btn;
	GtkButton* grid_btn;
	GtkButton* back_btn;
	GtkButton* new_btn;
	BoxesCollectionFilterSwitcher* filter_switcher;
	BoxesAppWindow* window;
};

struct _BoxesApp {
	GtkApplication parent_instance;
	BoxesAppPrivate * priv;
	BoxesCollection* collection;
	BoxesAsyncLauncher* async_launcher;
};

struct _BoxesAppClass {
	GtkApplicationClass parent_class;
};

typedef enum  {
	BOXES_APP_WINDOW_VIEW_TYPE_ICON = 1,
	BOXES_APP_WINDOW_VIEW_TYPE_LIST = 2
} BoxesAppWindowViewType;

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 _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 _BoxesCollection {
	GObject parent_instance;
	BoxesCollectionPrivate * priv;
	GPtrArray* items;
};

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};


static gpointer boxes_collection_toolbar_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_collection_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_collection_filter_switcher_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_TOOLBAR, BoxesCollectionToolbarPrivate))
void boxes_collection_toolbar_setup_ui (BoxesCollectionToolbar* self, BoxesAppWindow* window);
static void boxes_collection_toolbar_update_select_btn (BoxesCollectionToolbar* self);
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
static void _boxes_collection_toolbar_update_select_btn_boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void _boxes_collection_toolbar_update_select_btn_boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void boxes_collection_toolbar_update_search_btn (BoxesCollectionToolbar* self);
static void _boxes_collection_toolbar_update_search_btn_boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void _boxes_collection_toolbar_update_search_btn_boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
GType boxes_app_window_view_type_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_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_topbar_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;
static void boxes_collection_toolbar_update_view_type (BoxesCollectionToolbar* self, BoxesAppWindowViewType view_type);
static void boxes_collection_toolbar_ui_state_changed (BoxesCollectionToolbar* self);
static void _boxes_collection_toolbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_collection_filter_switcher_setup_ui (BoxesCollectionFilterSwitcher* self, BoxesAppWindow* window);
void boxes_collection_toolbar_click_back_button (BoxesCollectionToolbar* self);
void boxes_collection_toolbar_click_new_button (BoxesCollectionToolbar* self);
void boxes_collection_toolbar_click_search_button (BoxesCollectionToolbar* self);
static void boxes_collection_toolbar_on_new_btn_clicked (BoxesCollectionToolbar* self);
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
static void _boxes_collection_toolbar_on_new_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_collection_toolbar_on_back_btn_clicked (BoxesCollectionToolbar* self);
static void _boxes_collection_toolbar_on_back_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_collection_toolbar_on_list_btn_clicked (BoxesCollectionToolbar* self);
static void _boxes_collection_toolbar_on_list_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_collection_toolbar_on_grid_btn_clicked (BoxesCollectionToolbar* self);
static void _boxes_collection_toolbar_on_grid_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_collection_toolbar_on_select_btn_clicked (BoxesCollectionToolbar* self);
void boxes_app_window_set_selection_mode (BoxesAppWindow* self, gboolean value);
static void _boxes_collection_toolbar_on_select_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
void boxes_app_window_set_view_type (BoxesAppWindow* self, BoxesAppWindowViewType value);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
BoxesAppWindowViewType boxes_app_window_get_view_type (BoxesAppWindow* self);
BoxesAppWindow* boxes_app_get_main_window (BoxesApp* self);
BoxesCollectionToolbar* boxes_collection_toolbar_new (void);
BoxesCollectionToolbar* boxes_collection_toolbar_construct (GType object_type);
static void boxes_collection_toolbar_finalize (GObject * obj);


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


static void _boxes_collection_toolbar_update_select_btn_boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
#line 27 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_select_btn ((BoxesCollectionToolbar*) self);
#line 313 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_update_select_btn_boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
#line 28 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_select_btn ((BoxesCollectionToolbar*) self);
#line 320 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_update_search_btn_boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
#line 31 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_search_btn ((BoxesCollectionToolbar*) self);
#line 327 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_update_search_btn_boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_search_btn ((BoxesCollectionToolbar*) self);
#line 334 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 39 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_ui_state_changed ((BoxesCollectionToolbar*) self);
#line 341 "collection-toolbar.c"
}


void boxes_collection_toolbar_setup_ui (BoxesCollectionToolbar* self, BoxesAppWindow* window) {
	BoxesAppWindow* _tmp0_;
	BoxesAppWindow* _tmp1_;
	BoxesApp* _tmp2_;
	BoxesCollection* _tmp3_;
	BoxesApp* _tmp4_;
	BoxesCollection* _tmp5_;
	BoxesApp* _tmp6_;
	BoxesCollection* _tmp7_;
	BoxesApp* _tmp8_;
	BoxesCollection* _tmp9_;
	BoxesAppWindowViewType view_type = 0;
	BoxesAppWindow* _tmp10_;
	GSettings* _tmp11_;
	gint _tmp12_;
	GtkButton* _tmp13_;
	BoxesAppWindow* _tmp14_;
	BoxesSearchbar* _tmp15_;
	BoxesAppWindow* _tmp16_;
	BoxesApp* _tmp17_;
	BoxesCollectionFilterSwitcher* _tmp18_;
	BoxesAppWindow* _tmp19_;
#line 23 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 23 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (window != NULL);
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = window;
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 24 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	self->priv->window = _tmp1_;
#line 26 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_select_btn (self);
#line 27 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp2_ = boxes_app_app;
#line 27 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp3_ = _tmp2_->collection;
#line 27 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object (_tmp3_, "item-added", (GCallback) _boxes_collection_toolbar_update_select_btn_boxes_collection_item_added, self, 0);
#line 28 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp4_ = boxes_app_app;
#line 28 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp5_ = _tmp4_->collection;
#line 28 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object (_tmp5_, "item-removed", (GCallback) _boxes_collection_toolbar_update_select_btn_boxes_collection_item_removed, self, 0);
#line 30 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_search_btn (self);
#line 31 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp6_ = boxes_app_app;
#line 31 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp7_ = _tmp6_->collection;
#line 31 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object (_tmp7_, "item-added", (GCallback) _boxes_collection_toolbar_update_search_btn_boxes_collection_item_added, self, 0);
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp8_ = boxes_app_app;
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp9_ = _tmp8_->collection;
#line 32 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object (_tmp9_, "item-removed", (GCallback) _boxes_collection_toolbar_update_search_btn_boxes_collection_item_removed, self, 0);
#line 34 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp10_ = window;
#line 34 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp11_ = _tmp10_->settings;
#line 34 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp12_ = g_settings_get_enum (_tmp11_, "view");
#line 34 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	view_type = (BoxesAppWindowViewType) _tmp12_;
#line 35 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_view_type (self, view_type);
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp13_ = self->priv->search_btn;
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp14_ = window;
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp15_ = _tmp14_->searchbar;
#line 37 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_object_bind_property_with_closures ((GObject*) _tmp13_, "active", (GObject*) _tmp15_, "search-mode-enabled", G_BINDING_BIDIRECTIONAL, (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 39 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp16_ = window;
#line 39 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object ((GObject*) _tmp16_, "notify::ui-state", (GCallback) _boxes_collection_toolbar_ui_state_changed_g_object_notify, self, 0);
#line 40 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp17_ = boxes_app_app;
#line 40 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_signal_connect_object ((GObject*) _tmp17_, "notify::main-window", (GCallback) _boxes_collection_toolbar_ui_state_changed_g_object_notify, self, 0);
#line 42 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp18_ = self->priv->filter_switcher;
#line 42 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp19_ = window;
#line 42 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_filter_switcher_setup_ui (_tmp18_, _tmp19_);
#line 439 "collection-toolbar.c"
}


void boxes_collection_toolbar_click_back_button (BoxesCollectionToolbar* self) {
	GtkButton* _tmp0_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->back_btn;
#line 46 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_button_clicked (_tmp0_);
#line 451 "collection-toolbar.c"
}


void boxes_collection_toolbar_click_new_button (BoxesCollectionToolbar* self) {
	GtkButton* _tmp0_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 50 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->new_btn;
#line 50 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_button_clicked (_tmp0_);
#line 463 "collection-toolbar.c"
}


void boxes_collection_toolbar_click_search_button (BoxesCollectionToolbar* self) {
	GtkButton* _tmp0_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 54 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->search_btn;
#line 54 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_button_clicked (_tmp0_);
#line 475 "collection-toolbar.c"
}


static void boxes_collection_toolbar_on_new_btn_clicked (BoxesCollectionToolbar* self) {
	BoxesAppWindow* _tmp0_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_WIZARD);
#line 487 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_on_new_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_on_new_btn_clicked ((BoxesCollectionToolbar*) self);
#line 494 "collection-toolbar.c"
}


static void boxes_collection_toolbar_on_back_btn_clicked (BoxesCollectionToolbar* self) {
	BoxesAppWindow* _tmp0_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_COLLECTION);
#line 506 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_on_back_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_on_back_btn_clicked ((BoxesCollectionToolbar*) self);
#line 513 "collection-toolbar.c"
}


static void boxes_collection_toolbar_on_list_btn_clicked (BoxesCollectionToolbar* self) {
#line 68 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 69 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_view_type (self, BOXES_APP_WINDOW_VIEW_TYPE_LIST);
#line 522 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_on_list_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_on_list_btn_clicked ((BoxesCollectionToolbar*) self);
#line 529 "collection-toolbar.c"
}


static void boxes_collection_toolbar_on_grid_btn_clicked (BoxesCollectionToolbar* self) {
#line 73 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_update_view_type (self, BOXES_APP_WINDOW_VIEW_TYPE_ICON);
#line 538 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_on_grid_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_on_grid_btn_clicked ((BoxesCollectionToolbar*) self);
#line 545 "collection-toolbar.c"
}


static void boxes_collection_toolbar_on_select_btn_clicked (BoxesCollectionToolbar* self) {
	BoxesAppWindow* _tmp0_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 79 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_app_window_set_selection_mode (_tmp0_, TRUE);
#line 557 "collection-toolbar.c"
}


static void _boxes_collection_toolbar_on_select_btn_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_on_select_btn_clicked ((BoxesCollectionToolbar*) self);
#line 564 "collection-toolbar.c"
}


static gint g_ptr_array_get_length (GPtrArray* self) {
	gint result;
	guint _tmp0_;
#line 4973 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 4973 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = self->len;
#line 4973 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = (gint) _tmp0_;
#line 4973 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 579 "collection-toolbar.c"
}


static void g_ptr_array_set_length (GPtrArray* self, gint value) {
	gint _tmp0_;
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = value;
#line 4974 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, _tmp0_);
#line 591 "collection-toolbar.c"
}


static void boxes_collection_toolbar_update_search_btn (BoxesCollectionToolbar* self) {
	GtkButton* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesCollection* _tmp2_;
	GPtrArray* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
#line 82 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->search_btn;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp1_ = boxes_app_app;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp2_ = _tmp1_->collection;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp3_ = _tmp2_->items;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp4_ = g_ptr_array_get_length (_tmp3_);
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp5_ != 0);
#line 618 "collection-toolbar.c"
}


static void boxes_collection_toolbar_update_select_btn (BoxesCollectionToolbar* self) {
	GtkButton* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesCollection* _tmp2_;
	GPtrArray* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->select_btn;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp1_ = boxes_app_app;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp2_ = _tmp1_->collection;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp3_ = _tmp2_->items;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp4_ = g_ptr_array_get_length (_tmp3_);
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp5_ != 0);
#line 645 "collection-toolbar.c"
}


static void boxes_collection_toolbar_update_view_type (BoxesCollectionToolbar* self, BoxesAppWindowViewType view_type) {
	BoxesAppWindow* _tmp0_;
	BoxesAppWindowViewType _tmp1_;
	BoxesAppWindow* _tmp2_;
	GSettings* _tmp3_;
	BoxesAppWindowViewType _tmp4_;
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 91 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 91 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp1_ = view_type;
#line 91 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_app_window_set_view_type (_tmp0_, _tmp1_);
#line 92 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp2_ = self->priv->window;
#line 92 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp3_ = _tmp2_->settings;
#line 92 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp4_ = view_type;
#line 92 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_settings_set_enum (_tmp3_, "view", (gint) _tmp4_);
#line 94 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_ui_state_changed (self);
#line 673 "collection-toolbar.c"
}


static void boxes_collection_toolbar_ui_state_changed (BoxesCollectionToolbar* self) {
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
#line 97 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	switch (_tmp2_) {
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
		case BOXES_UI_STATE_COLLECTION:
#line 693 "collection-toolbar.c"
		{
			GtkButton* _tmp3_;
			GtkButton* _tmp4_;
			GtkButton* _tmp5_;
			GtkButton* _tmp6_;
			GtkButton* _tmp7_;
			BoxesAppWindow* _tmp8_;
			BoxesAppWindowViewType _tmp9_;
			BoxesAppWindowViewType _tmp10_;
			GtkButton* _tmp11_;
			BoxesAppWindow* _tmp12_;
			BoxesAppWindowViewType _tmp13_;
			BoxesAppWindowViewType _tmp14_;
			BoxesCollectionFilterSwitcher* _tmp15_;
#line 100 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp3_ = self->priv->back_btn;
#line 100 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp3_);
#line 101 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp4_ = self->priv->select_btn;
#line 101 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_show ((GtkWidget*) _tmp4_);
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp5_ = self->priv->search_btn;
#line 102 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_show ((GtkWidget*) _tmp5_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp6_ = self->priv->new_btn;
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_show ((GtkWidget*) _tmp6_);
#line 104 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp7_ = self->priv->grid_btn;
#line 104 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp8_ = self->priv->window;
#line 104 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp9_ = boxes_app_window_get_view_type (_tmp8_);
#line 104 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp10_ = _tmp9_;
#line 104 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_set_visible ((GtkWidget*) _tmp7_, _tmp10_ != BOXES_APP_WINDOW_VIEW_TYPE_ICON);
#line 105 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp11_ = self->priv->list_btn;
#line 105 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp12_ = self->priv->window;
#line 105 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp13_ = boxes_app_window_get_view_type (_tmp12_);
#line 105 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp14_ = _tmp13_;
#line 105 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_set_visible ((GtkWidget*) _tmp11_, _tmp14_ != BOXES_APP_WINDOW_VIEW_TYPE_LIST);
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp15_ = self->priv->filter_switcher;
#line 106 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_header_bar_set_custom_title ((GtkHeaderBar*) self, (GtkWidget*) _tmp15_);
#line 107 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			break;
#line 750 "collection-toolbar.c"
		}
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
		case BOXES_UI_STATE_CREDS:
#line 754 "collection-toolbar.c"
		{
			GtkButton* _tmp16_;
			GtkButton* _tmp17_;
			BoxesAppWindow* _tmp18_;
			BoxesApp* _tmp19_;
			BoxesAppWindow* _tmp20_;
			BoxesAppWindow* _tmp21_;
			GtkButton* _tmp22_;
			GtkButton* _tmp23_;
			GtkButton* _tmp24_;
			GtkButton* _tmp25_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp16_ = self->priv->new_btn;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp16_);
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp17_ = self->priv->back_btn;
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp18_ = self->priv->window;
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp19_ = boxes_app_app;
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp20_ = boxes_app_get_main_window (_tmp19_);
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp21_ = _tmp20_;
#line 111 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_set_visible ((GtkWidget*) _tmp17_, _tmp18_ == _tmp21_);
#line 112 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp22_ = self->priv->select_btn;
#line 112 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp22_);
#line 113 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp23_ = self->priv->search_btn;
#line 113 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp23_);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp24_ = self->priv->grid_btn;
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp24_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			_tmp25_ = self->priv->list_btn;
#line 115 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_widget_hide ((GtkWidget*) _tmp25_);
#line 116 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			gtk_header_bar_set_custom_title ((GtkHeaderBar*) self, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			break;
#line 802 "collection-toolbar.c"
		}
		default:
		{
#line 120 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
			break;
#line 808 "collection-toolbar.c"
		}
	}
}


BoxesCollectionToolbar* boxes_collection_toolbar_construct (GType object_type) {
	BoxesCollectionToolbar * self = NULL;
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	self = (BoxesCollectionToolbar*) g_object_new (object_type, NULL);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	return self;
#line 820 "collection-toolbar.c"
}


BoxesCollectionToolbar* boxes_collection_toolbar_new (void) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	return boxes_collection_toolbar_construct (BOXES_TYPE_COLLECTION_TOOLBAR);
#line 827 "collection-toolbar.c"
}


static void boxes_collection_toolbar_class_init (BoxesCollectionToolbarClass * klass) {
	gint BoxesCollectionToolbar_private_offset;
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	boxes_collection_toolbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionToolbarPrivate));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_toolbar_finalize;
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	BoxesCollectionToolbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/collection-toolbar.ui");
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "search_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, search_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "select_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, select_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "list_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, list_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "grid_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, grid_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, back_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "new_btn", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, new_btn));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "filter_switcher", FALSE, BoxesCollectionToolbar_private_offset + G_STRUCT_OFFSET (BoxesCollectionToolbarPrivate, filter_switcher));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_new_btn_clicked", G_CALLBACK(_boxes_collection_toolbar_on_new_btn_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_back_btn_clicked", G_CALLBACK(_boxes_collection_toolbar_on_back_btn_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_list_btn_clicked", G_CALLBACK(_boxes_collection_toolbar_on_list_btn_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_grid_btn_clicked", G_CALLBACK(_boxes_collection_toolbar_on_grid_btn_clicked_gtk_button_clicked));
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_select_btn_clicked", G_CALLBACK(_boxes_collection_toolbar_on_select_btn_clicked_gtk_button_clicked));
#line 867 "collection-toolbar.c"
}


static void boxes_collection_toolbar_instance_init (BoxesCollectionToolbar * self) {
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	self->priv = BOXES_COLLECTION_TOOLBAR_GET_PRIVATE (self);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	g_type_ensure (BOXES_TYPE_COLLECTION_FILTER_SWITCHER);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 878 "collection-toolbar.c"
}


static void boxes_collection_toolbar_finalize (GObject * obj) {
	BoxesCollectionToolbar * self;
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_TOOLBAR, BoxesCollectionToolbar);
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->search_btn);
#line 9 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->select_btn);
#line 11 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->list_btn);
#line 13 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->grid_btn);
#line 15 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->back_btn);
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->new_btn);
#line 19 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->filter_switcher);
#line 21 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 5 "/home/fborges/checkout/gnome-boxes/src/collection-toolbar.vala"
	G_OBJECT_CLASS (boxes_collection_toolbar_parent_class)->finalize (obj);
#line 904 "collection-toolbar.c"
}


GType boxes_collection_toolbar_get_type (void) {
	static volatile gsize boxes_collection_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionToolbar), 0, (GInstanceInitFunc) boxes_collection_toolbar_instance_init, NULL };
		GType boxes_collection_toolbar_type_id;
		boxes_collection_toolbar_type_id = g_type_register_static (gtk_header_bar_get_type (), "BoxesCollectionToolbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_collection_toolbar_type_id__volatile, boxes_collection_toolbar_type_id);
	}
	return boxes_collection_toolbar_type_id__volatile;
}



