/* properties-toolbar.c generated by valac 0.25.2.7-aa52, 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 {
	GtkImage* back_image;
	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;
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
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 ___lambda98_ (BoxesPropertiesToolbar* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
void boxes_editable_entry_set_text (BoxesEditableEntry* self, const gchar* value);
static void ____lambda98__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 26 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	return self ? g_object_ref (self) : NULL;
#line 165 "properties-toolbar.c"
}


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


void boxes_properties_toolbar_setup_ui (BoxesPropertiesToolbar* self, BoxesAppWindow* window) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesAppWindow* _tmp2_ = NULL;
#line 25 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 25 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (window != NULL);
#line 26 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = window;
#line 26 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 26 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	self->priv->window = _tmp1_;
#line 27 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = window;
#line 27 "/home/mclasen/Sources/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 196 "properties-toolbar.c"
}


static void boxes_properties_toolbar_on_back_clicked (BoxesPropertiesToolbar* self) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesMachineMachineState _tmp3_ = 0;
	BoxesMachineMachineState _tmp4_ = 0;
#line 31 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = boxes_machine_get_state (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = _tmp3_;
#line 32 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp4_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
#line 220 "properties-toolbar.c"
		BoxesAppWindow* _tmp5_ = NULL;
#line 33 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp5_ = self->priv->window;
#line 33 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp5_, BOXES_UI_STATE_COLLECTION);
#line 226 "properties-toolbar.c"
	} else {
		BoxesAppWindow* _tmp6_ = NULL;
		BoxesAppWindow* _tmp7_ = NULL;
		BoxesUIState _tmp8_ = 0;
		BoxesUIState _tmp9_ = 0;
#line 35 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp6_ = self->priv->window;
#line 35 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp7_ = self->priv->window;
#line 35 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp8_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp7_);
#line 35 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp9_ = _tmp8_;
#line 35 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp6_, _tmp9_);
#line 242 "properties-toolbar.c"
	}
}


static void _boxes_properties_toolbar_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_on_back_clicked ((BoxesPropertiesToolbar*) self);
#line 250 "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 39 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->window;
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = _tmp1_;
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = self->priv->title_entry;
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = boxes_editable_entry_get_text (_tmp3_);
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 40 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	boxes_collection_item_set_name (_tmp2_, _tmp5_);
#line 277 "properties-toolbar.c"
}


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


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


static void ____lambda98__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 52 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	___lambda98_ ((BoxesPropertiesToolbar*) self);
#line 310 "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 43 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 44 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->item_name_id;
#line 44 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp0_ != ((gulong) 0)) {
#line 325 "properties-toolbar.c"
		BoxesCollectionItem* _tmp1_ = NULL;
		gulong _tmp2_ = 0UL;
#line 45 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp1_ = self->priv->item;
#line 45 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp2_ = self->priv->item_name_id;
#line 45 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		g_signal_handler_disconnect ((GObject*) _tmp1_, _tmp2_);
#line 46 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item_name_id = (gulong) 0;
#line 336 "properties-toolbar.c"
	}
#line 49 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = self->priv->window;
#line 49 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp4_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp3_);
#line 49 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp5_ = _tmp4_;
#line 49 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp5_ == BOXES_UI_STATE_PROPERTIES) {
#line 346 "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 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp6_ = self->priv->window;
#line 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp7_ = boxes_app_window_get_current_item (_tmp6_);
#line 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp8_ = _tmp7_;
#line 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_g_object_unref0 (self->priv->item);
#line 50 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item = _tmp9_;
#line 52 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp10_ = self->priv->item;
#line 52 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp11_ = g_signal_connect_object ((GObject*) _tmp10_, "notify::name", (GCallback) ____lambda98__g_object_notify, self, 0);
#line 52 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		self->priv->item_name_id = _tmp11_;
#line 55 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp12_ = self->priv->title_entry;
#line 55 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp13_ = self->priv->item;
#line 55 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp14_ = boxes_collection_item_get_name (_tmp13_);
#line 55 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		_tmp15_ = _tmp14_;
#line 55 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
		boxes_editable_entry_set_text (_tmp12_, _tmp15_);
#line 385 "properties-toolbar.c"
	}
}


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


BoxesPropertiesToolbar* boxes_properties_toolbar_new (void) {
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	return boxes_properties_toolbar_construct (BOXES_TYPE_PROPERTIES_TOOLBAR);
#line 403 "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;
	GtkImage* _tmp0_ = NULL;
	BoxesEditableEntry* _tmp1_ = NULL;
#line 18 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	parent_class = G_OBJECT_CLASS (boxes_properties_toolbar_parent_class);
#line 18 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 18 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 19 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = self->priv->back_image;
#line 19 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_object_set (_tmp0_, "icon-name", "go-previous-symbolic", NULL);
#line 22 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = self->priv->title_entry;
#line 22 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	gtk_header_bar_set_custom_title ((GtkHeaderBar*) self, (GtkWidget*) _tmp1_);
#line 18 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	return obj;
#line 429 "properties-toolbar.c"
}


static void boxes_properties_toolbar_class_init (BoxesPropertiesToolbarClass * klass) {
	gint BoxesPropertiesToolbar_private_offset;
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesPropertiesToolbarPrivate));
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_properties_toolbar_constructor;
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_properties_toolbar_finalize;
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	BoxesPropertiesToolbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/mclasen/Sources/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/mclasen/Sources/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/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_image", FALSE, BoxesPropertiesToolbar_private_offset + G_STRUCT_OFFSET (BoxesPropertiesToolbarPrivate, back_image));
#line 5 "/home/mclasen/Sources/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/mclasen/Sources/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/mclasen/Sources/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 457 "properties-toolbar.c"
}


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


static void boxes_properties_toolbar_finalize (GObject* obj) {
	BoxesPropertiesToolbar * self;
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 7 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->back_button);
#line 9 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->back_image);
#line 11 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->title_entry);
#line 13 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->window);
#line 15 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->item);
#line 5 "/home/mclasen/Sources/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (boxes_properties_toolbar_parent_class)->finalize (obj);
#line 488 "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;
}



