/* properties-toolbar.c generated by valac 0.26.0.50-d9a75, the Vala compiler
 * generated from properties-toolbar.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>


#define BOXES_TYPE_PROPERTIES_TOOLBAR (boxes_properties_toolbar_get_type ())
#define BOXES_PROPERTIES_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar))
#define BOXES_PROPERTIES_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarClass))
#define BOXES_IS_PROPERTIES_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR))
#define BOXES_IS_PROPERTIES_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES_TOOLBAR))
#define BOXES_PROPERTIES_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarClass))

typedef struct _BoxesPropertiesToolbar BoxesPropertiesToolbar;
typedef struct _BoxesPropertiesToolbarClass BoxesPropertiesToolbarClass;
typedef struct _BoxesPropertiesToolbarPrivate BoxesPropertiesToolbarPrivate;

#define BOXES_TYPE_EDITABLE_ENTRY (boxes_editable_entry_get_type ())
#define BOXES_EDITABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_EDITABLE_ENTRY, BoxesEditableEntry))
#define BOXES_EDITABLE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_EDITABLE_ENTRY, BoxesEditableEntryClass))
#define BOXES_IS_EDITABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_EDITABLE_ENTRY))
#define BOXES_IS_EDITABLE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_EDITABLE_ENTRY))
#define BOXES_EDITABLE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_EDITABLE_ENTRY, BoxesEditableEntryClass))

typedef struct _BoxesEditableEntry BoxesEditableEntry;
typedef struct _BoxesEditableEntryClass BoxesEditableEntryClass;

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

#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_MACHINE_TYPE_MACHINE_STATE (boxes_machine_machine_state_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 ())

struct _BoxesPropertiesToolbar {
	GtkHeaderBar parent_instance;
	BoxesPropertiesToolbarPrivate * priv;
	GtkButton* back_button;
};

struct _BoxesPropertiesToolbarClass {
	GtkHeaderBarClass parent_class;
};

struct _BoxesPropertiesToolbarPrivate {
	BoxesEditableEntry* title_entry;
	BoxesAppWindow* window;
	BoxesCollectionItem* item;
	gulong item_name_id;
};

typedef enum  {
	BOXES_MACHINE_MACHINE_STATE_UNKNOWN,
	BOXES_MACHINE_MACHINE_STATE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_FORCE_STOPPED,
	BOXES_MACHINE_MACHINE_STATE_RUNNING,
	BOXES_MACHINE_MACHINE_STATE_PAUSED,
	BOXES_MACHINE_MACHINE_STATE_SAVED,
	BOXES_MACHINE_MACHINE_STATE_SLEEPING
} BoxesMachineMachineState;

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


static gpointer boxes_properties_toolbar_parent_class = NULL;

GType boxes_properties_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_editable_entry_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
#define BOXES_PROPERTIES_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarPrivate))
enum  {
	BOXES_PROPERTIES_TOOLBAR_DUMMY_PROPERTY
};
void boxes_properties_toolbar_setup_ui (BoxesPropertiesToolbar* self, BoxesAppWindow* window);
static void boxes_properties_toolbar_ui_state_changed (BoxesPropertiesToolbar* self);
static void _boxes_properties_toolbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void boxes_properties_toolbar_on_back_clicked (BoxesPropertiesToolbar* self);
BoxesCollectionItem* boxes_app_window_get_current_item (BoxesAppWindow* self);
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_machine_machine_state_get_type (void) G_GNUC_CONST;
BoxesMachineMachineState boxes_machine_get_state (BoxesMachine* self);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
static void _boxes_properties_toolbar_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void boxes_properties_toolbar_on_title_entry_changed (BoxesPropertiesToolbar* self);
const gchar* boxes_editable_entry_get_text (BoxesEditableEntry* self);
void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value);
static void _boxes_properties_toolbar_on_title_entry_changed_boxes_editable_entry_editing_done (BoxesEditableEntry* _sender, gpointer self);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
static void ___lambda39_ (BoxesPropertiesToolbar* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
void boxes_editable_entry_set_text (BoxesEditableEntry* self, const gchar* value);
static void ____lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
BoxesPropertiesToolbar* boxes_properties_toolbar_new (void);
BoxesPropertiesToolbar* boxes_properties_toolbar_construct (GType object_type);
static GObject * boxes_properties_toolbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_properties_toolbar_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return self ? g_object_ref (self) : NULL;
#line 164 "properties-toolbar.c"
}


static void _boxes_properties_toolbar_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_ui_state_changed ((BoxesPropertiesToolbar*) self);
#line 171 "properties-toolbar.c"
}


void boxes_properties_toolbar_setup_ui (BoxesPropertiesToolbar* self, BoxesAppWindow* window) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesAppWindow* _tmp2_ = NULL;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (window != NULL);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = window;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self->priv->window = _tmp1_;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = window;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_signal_connect_object ((GObject*) _tmp2_, "notify::ui-state", (GCallback) _boxes_properties_toolbar_ui_state_changed_g_object_notify, self, 0);
#line 195 "properties-toolbar.c"
}


static void boxes_properties_toolbar_on_back_clicked (BoxesPropertiesToolbar* self) {
	gboolean _tmp0_ = FALSE;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesCollectionItem* _tmp3_ = NULL;
	BoxesMachineMachineState _tmp4_ = 0;
	BoxesMachineMachineState _tmp5_ = 0;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = self->priv->window;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = boxes_app_window_get_current_item (_tmp1_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = _tmp2_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = boxes_machine_get_state (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp3_) : NULL);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp5_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
#line 220 "properties-toolbar.c"
		BoxesAppWindow* _tmp6_ = NULL;
		BoxesUIState _tmp7_ = 0;
		BoxesUIState _tmp8_ = 0;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp6_ = self->priv->window;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp7_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp6_);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp8_ = _tmp7_;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp0_ = _tmp8_ == BOXES_UI_STATE_DISPLAY;
#line 232 "properties-toolbar.c"
	} else {
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp0_ = FALSE;
#line 236 "properties-toolbar.c"
	}
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp0_) {
#line 240 "properties-toolbar.c"
		BoxesAppWindow* _tmp9_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp9_ = self->priv->window;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp9_, BOXES_UI_STATE_COLLECTION);
#line 246 "properties-toolbar.c"
	} else {
		BoxesAppWindow* _tmp10_ = NULL;
		BoxesAppWindow* _tmp11_ = NULL;
		BoxesUIState _tmp12_ = 0;
		BoxesUIState _tmp13_ = 0;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp10_ = self->priv->window;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp11_ = self->priv->window;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp12_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp11_);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp13_ = _tmp12_;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp10_, _tmp13_);
#line 262 "properties-toolbar.c"
	}
}


static void _boxes_properties_toolbar_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_on_back_clicked ((BoxesPropertiesToolbar*) self);
#line 270 "properties-toolbar.c"
}


static void boxes_properties_toolbar_on_title_entry_changed (BoxesPropertiesToolbar* self) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesEditableEntry* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = self->priv->title_entry;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = boxes_editable_entry_get_text (_tmp3_);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_collection_item_set_name (_tmp2_, _tmp5_);
#line 297 "properties-toolbar.c"
}


static void _boxes_properties_toolbar_on_title_entry_changed_boxes_editable_entry_editing_done (BoxesEditableEntry* _sender, gpointer self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_on_title_entry_changed ((BoxesPropertiesToolbar*) self);
#line 304 "properties-toolbar.c"
}


static void ___lambda39_ (BoxesPropertiesToolbar* self) {
	BoxesEditableEntry* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->title_entry;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = self->priv->item;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = boxes_collection_item_get_name (_tmp1_);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = _tmp2_;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_editable_entry_set_text (_tmp0_, _tmp3_);
#line 323 "properties-toolbar.c"
}


static void ____lambda39__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	___lambda39_ ((BoxesPropertiesToolbar*) self);
#line 330 "properties-toolbar.c"
}


static void boxes_properties_toolbar_ui_state_changed (BoxesPropertiesToolbar* self) {
	gulong _tmp0_ = 0UL;
	BoxesAppWindow* _tmp3_ = NULL;
	BoxesUIState _tmp4_ = 0;
	BoxesUIState _tmp5_ = 0;
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->item_name_id;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp0_ != ((gulong) 0)) {
#line 345 "properties-toolbar.c"
		BoxesCollectionItem* _tmp1_ = NULL;
		gulong _tmp2_ = 0UL;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp1_ = self->priv->item;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp2_ = self->priv->item_name_id;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item_name_id = (gulong) 0;
#line 356 "properties-toolbar.c"
	}
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = self->priv->window;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp3_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp5_ == BOXES_UI_STATE_PROPERTIES) {
#line 366 "properties-toolbar.c"
		BoxesAppWindow* _tmp6_ = NULL;
		BoxesCollectionItem* _tmp7_ = NULL;
		BoxesCollectionItem* _tmp8_ = NULL;
		BoxesCollectionItem* _tmp9_ = NULL;
		BoxesCollectionItem* _tmp10_ = NULL;
		gulong _tmp11_ = 0UL;
		BoxesEditableEntry* _tmp12_ = NULL;
		BoxesCollectionItem* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp6_ = self->priv->window;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp7_ = boxes_app_window_get_current_item (_tmp6_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp8_ = _tmp7_;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_g_object_unref0 (self->priv->item);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item = _tmp9_;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp10_ = self->priv->item;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp11_ = g_signal_connect_object ((GObject*) _tmp10_, "notify::name", (GCallback) ____lambda39__g_object_notify, self, 0);
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item_name_id = _tmp11_;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp12_ = self->priv->title_entry;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp13_ = self->priv->item;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp14_ = boxes_collection_item_get_name (_tmp13_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp15_ = _tmp14_;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		boxes_editable_entry_set_text (_tmp12_, _tmp15_);
#line 405 "properties-toolbar.c"
	}
}


BoxesPropertiesToolbar* boxes_properties_toolbar_construct (GType object_type) {
	BoxesPropertiesToolbar * self = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = (BoxesPropertiesToolbar*) g_object_new (object_type, NULL);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return self;
#line 416 "properties-toolbar.c"
}


BoxesPropertiesToolbar* boxes_properties_toolbar_new (void) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return boxes_properties_toolbar_construct (BOXES_TYPE_PROPERTIES_TOOLBAR);
#line 423 "properties-toolbar.c"
}


static GObject * boxes_properties_toolbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesPropertiesToolbar * self;
	BoxesEditableEntry* _tmp0_ = NULL;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	parent_class = G_OBJECT_CLASS (boxes_properties_toolbar_parent_class);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->title_entry;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_header_bar_set_custom_title ((GtkHeaderBar*) self, (GtkWidget*) _tmp0_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return obj;
#line 444 "properties-toolbar.c"
}


static void boxes_properties_toolbar_class_init (BoxesPropertiesToolbarClass * klass) {
	gint BoxesPropertiesToolbar_private_offset;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesPropertiesToolbarPrivate));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_properties_toolbar_constructor;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_properties_toolbar_finalize;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	BoxesPropertiesToolbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/properties-toolbar.ui");
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_button", FALSE, G_STRUCT_OFFSET (BoxesPropertiesToolbar, back_button));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "title_entry", FALSE, BoxesPropertiesToolbar_private_offset + G_STRUCT_OFFSET (BoxesPropertiesToolbarPrivate, title_entry));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_back_clicked", G_CALLBACK(_boxes_properties_toolbar_on_back_clicked_gtk_button_clicked));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_title_entry_changed", G_CALLBACK(_boxes_properties_toolbar_on_title_entry_changed_boxes_editable_entry_editing_done));
#line 470 "properties-toolbar.c"
}


static void boxes_properties_toolbar_instance_init (BoxesPropertiesToolbar * self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self->priv = BOXES_PROPERTIES_TOOLBAR_GET_PRIVATE (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_type_ensure (BOXES_TYPE_EDITABLE_ENTRY);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 481 "properties-toolbar.c"
}


static void boxes_properties_toolbar_finalize (GObject* obj) {
	BoxesPropertiesToolbar * self;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->back_button);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->title_entry);
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->item);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (boxes_properties_toolbar_parent_class)->finalize (obj);
#line 499 "properties-toolbar.c"
}


GType boxes_properties_toolbar_get_type (void) {
	static volatile gsize boxes_properties_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_properties_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesPropertiesToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_properties_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesPropertiesToolbar), 0, (GInstanceInitFunc) boxes_properties_toolbar_instance_init, NULL };
		GType boxes_properties_toolbar_type_id;
		boxes_properties_toolbar_type_id = g_type_register_static (gtk_header_bar_get_type (), "BoxesPropertiesToolbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_properties_toolbar_type_id__volatile, boxes_properties_toolbar_type_id);
	}
	return boxes_properties_toolbar_type_id__volatile;
}



