/* properties-window.c generated by valac 0.37.1.4-3591e, the Vala compiler
 * generated from properties-window.vala, do not modify */

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

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


#define BOXES_TYPE_PROPS_WINDOW_PAGE (boxes_props_window_page_get_type ())

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

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#define BOXES_TYPE_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;
typedef struct _BoxesPropertiesWindowPrivate BoxesPropertiesWindowPrivate;

#define BOXES_TYPE_PROPERTIES (boxes_properties_get_type ())
#define BOXES_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES, BoxesProperties))
#define BOXES_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))
#define BOXES_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES))
#define BOXES_IS_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES))
#define BOXES_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

#define BOXES_TYPE_TROUBLESHOOT_LOG (boxes_troubleshoot_log_get_type ())
#define BOXES_TROUBLESHOOT_LOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TROUBLESHOOT_LOG, BoxesTroubleshootLog))
#define BOXES_TROUBLESHOOT_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TROUBLESHOOT_LOG, BoxesTroubleshootLogClass))
#define BOXES_IS_TROUBLESHOOT_LOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TROUBLESHOOT_LOG))
#define BOXES_IS_TROUBLESHOOT_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TROUBLESHOOT_LOG))
#define BOXES_TROUBLESHOOT_LOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TROUBLESHOOT_LOG, BoxesTroubleshootLogClass))

typedef struct _BoxesTroubleshootLog BoxesTroubleshootLog;
typedef struct _BoxesTroubleshootLogClass BoxesTroubleshootLogClass;

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

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define 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_PROPERTIES_WINDOW_DUMMY_PROPERTY,
	BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE,
	BOXES_PROPERTIES_WINDOW_UI_STATE,
	BOXES_PROPERTIES_WINDOW_PAGE,
	BOXES_PROPERTIES_WINDOW_LAST_PROPERTY
};
static GParamSpec* boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _BoxesTroubleshootLogPrivate BoxesTroubleshootLogPrivate;
typedef struct _Block74Data Block74Data;
#define _g_free0(var) (var = (g_free (var), NULL))

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

typedef enum  {
	BOXES_PROPS_WINDOW_PAGE_MAIN,
	BOXES_PROPS_WINDOW_PAGE_TROUBLESHOOTING_LOG,
	BOXES_PROPS_WINDOW_PAGE_FILE_CHOOSER
} BoxesPropsWindowPage;

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 _BoxesPropertiesWindow {
	GtkWindow parent_instance;
	BoxesPropertiesWindowPrivate * priv;
	GtkStack* view;
	BoxesProperties* properties;
	BoxesTroubleshootLog* troubleshoot_log;
	GtkFileChooserWidget* file_chooser;
	BoxesPropertiesToolbar* topbar;
	BoxesNotificationbar* notificationbar;
};

struct _BoxesPropertiesWindowClass {
	GtkWindowClass parent_class;
};

struct _BoxesPropertiesWindowPrivate {
	BoxesUIState _previous_ui_state;
	BoxesUIState _ui_state;
	BoxesPropsWindowPage _page;
	BoxesAppWindow* app_window;
};

struct _BoxesTroubleshootLog {
	GtkScrolledWindow parent_instance;
	BoxesTroubleshootLogPrivate * priv;
	GtkTextView* view;
};

struct _BoxesTroubleshootLogClass {
	GtkScrolledWindowClass parent_class;
};

typedef void (*BoxesPropertiesWindowFileChosenFunc) (const gchar* path, void* user_data);
struct _Block74Data {
	int _ref_count_;
	BoxesPropertiesWindow* self;
	gulong activated_id;
	BoxesPropertiesWindowFileChosenFunc file_chosen_func;
	gpointer file_chosen_func_target;
	GDestroyNotify file_chosen_func_target_destroy_notify;
};

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;


static gpointer boxes_properties_window_parent_class = NULL;
static BoxesUIIface * boxes_properties_window_boxes_ui_parent_iface = NULL;

GType boxes_props_window_page_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_properties_window_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_troubleshoot_log_get_type (void) G_GNUC_CONST;
GType boxes_properties_toolbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_PROPERTIES_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindowPrivate))
BoxesPropertiesWindow* boxes_properties_window_new (BoxesAppWindow* app_window);
BoxesPropertiesWindow* boxes_properties_window_construct (GType object_type, BoxesAppWindow* app_window);
void boxes_properties_setup_ui (BoxesProperties* self, BoxesAppWindow* window, BoxesPropertiesWindow* dialog);
void boxes_properties_toolbar_setup_ui (BoxesPropertiesToolbar* self, BoxesAppWindow* window, BoxesPropertiesWindow* props_window);
static void boxes_properties_window_ui_state_changed (BoxesPropertiesWindow* self);
static void _boxes_properties_window_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_properties_window_show_troubleshoot_log (BoxesPropertiesWindow* self, const gchar* log);
void boxes_properties_window_set_page (BoxesPropertiesWindow* self, BoxesPropsWindowPage value);
void boxes_properties_window_show_file_chooser (BoxesPropertiesWindow* self, BoxesPropertiesWindowFileChosenFunc file_chosen_func, void* file_chosen_func_target, GDestroyNotify file_chosen_func_target_destroy_notify);
static Block74Data* block74_data_ref (Block74Data* _data74_);
static void block74_data_unref (void * _userdata_);
static void __lambda120_ (Block74Data* _data74_);
static void ___lambda120__gtk_file_chooser_file_activated (GtkFileChooser* _sender, gpointer self);
void boxes_properties_window_copy_troubleshoot_log_to_clipboard (BoxesPropertiesWindow* self);
void boxes_properties_window_revert_state (BoxesPropertiesWindow* self);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
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);
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
static gboolean boxes_properties_window_on_key_pressed (BoxesPropertiesWindow* self, GtkWidget* widget, GdkEventKey* event);
void boxes_properties_toolbar_click_back_button (BoxesPropertiesToolbar* self);
static gboolean _boxes_properties_window_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
static gboolean boxes_properties_window_on_delete_event (BoxesPropertiesWindow* self);
static gboolean _boxes_properties_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
BoxesPropsWindowPage boxes_properties_window_get_page (BoxesPropertiesWindow* self);
void boxes_properties_toolbar_set_page (BoxesPropertiesToolbar* self, BoxesPropsWindowPage value);
static void boxes_properties_window_finalize (GObject * obj);
static void _vala_boxes_properties_window_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void boxes_ui_set_previous_ui_state (BoxesUI* self, BoxesUIState value);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void _vala_boxes_properties_window_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);

const gchar* BOXES_PROPERTIES_WINDOW_page_names[3] = {"main", "troubleshoot_log", "file_chooser"};

GType boxes_props_window_page_get_type (void) {
	static volatile gsize boxes_props_window_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_props_window_page_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_PROPS_WINDOW_PAGE_MAIN, "BOXES_PROPS_WINDOW_PAGE_MAIN", "main"}, {BOXES_PROPS_WINDOW_PAGE_TROUBLESHOOTING_LOG, "BOXES_PROPS_WINDOW_PAGE_TROUBLESHOOTING_LOG", "troubleshooting-log"}, {BOXES_PROPS_WINDOW_PAGE_FILE_CHOOSER, "BOXES_PROPS_WINDOW_PAGE_FILE_CHOOSER", "file-chooser"}, {0, NULL, NULL}};
		GType boxes_props_window_page_type_id;
		boxes_props_window_page_type_id = g_enum_register_static ("BoxesPropsWindowPage", values);
		g_once_init_leave (&boxes_props_window_page_type_id__volatile, boxes_props_window_page_type_id);
	}
	return boxes_props_window_page_type_id__volatile;
}


static void _boxes_properties_window_ui_state_changed_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 57 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_ui_state_changed ((BoxesPropertiesWindow*) self);
#line 264 "properties-window.c"
}


BoxesPropertiesWindow* boxes_properties_window_construct (GType object_type, BoxesAppWindow* app_window) {
	BoxesPropertiesWindow * self = NULL;
	BoxesAppWindow* _tmp0_;
	BoxesProperties* _tmp1_;
	BoxesAppWindow* _tmp2_;
	BoxesPropertiesToolbar* _tmp3_;
	BoxesAppWindow* _tmp4_;
	GtkFileChooserWidget* _tmp5_;
	GtkFileFilter* _tmp6_;
	GtkFileFilter* _tmp7_;
	GtkFileChooserWidget* _tmp8_;
	GtkFileFilter* _tmp9_;
	GtkFileFilter* _tmp10_;
	BoxesAppWindow* _tmp11_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (app_window != NULL, NULL);
#line 45 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = (BoxesPropertiesWindow*) g_object_new (object_type, NULL);
#line 46 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = app_window;
#line 46 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self->priv->app_window = _tmp0_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = self->properties;
#line 48 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = app_window;
#line 48 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_setup_ui (_tmp1_, _tmp2_, self);
#line 49 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = self->topbar;
#line 49 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = app_window;
#line 49 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_toolbar_setup_ui (_tmp3_, _tmp4_, self);
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp5_ = self->file_chooser;
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp6_ = gtk_file_filter_new ();
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_ref_sink (_tmp6_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp7_ = _tmp6_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_file_chooser_set_filter ((GtkFileChooser*) _tmp5_, _tmp7_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (_tmp7_);
#line 53 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp8_ = self->file_chooser;
#line 53 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp9_ = gtk_file_chooser_get_filter ((GtkFileChooser*) _tmp8_);
#line 53 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp10_ = _tmp9_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_file_filter_add_mime_type (_tmp10_, "application/x-cd-image");
#line 55 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp11_ = app_window;
#line 55 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) _tmp11_);
#line 57 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_signal_connect_object ((GObject*) self, "notify::ui-state", (GCallback) _boxes_properties_window_ui_state_changed_g_object_notify, self, 0);
#line 45 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return self;
#line 330 "properties-window.c"
}


BoxesPropertiesWindow* boxes_properties_window_new (BoxesAppWindow* app_window) {
#line 45 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return boxes_properties_window_construct (BOXES_TYPE_PROPERTIES_WINDOW, app_window);
#line 337 "properties-window.c"
}


void boxes_properties_window_show_troubleshoot_log (BoxesPropertiesWindow* self, const gchar* log) {
	BoxesTroubleshootLog* _tmp0_;
	GtkTextView* _tmp1_;
	GtkTextBuffer* _tmp2_;
	GtkTextBuffer* _tmp3_;
	const gchar* _tmp4_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 60 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (log != NULL);
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->troubleshoot_log;
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = _tmp0_->view;
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = gtk_text_view_get_buffer (_tmp1_);
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = _tmp2_;
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = log;
#line 61 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_set (_tmp3_, "text", _tmp4_, NULL);
#line 62 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_set_page (self, BOXES_PROPS_WINDOW_PAGE_TROUBLESHOOTING_LOG);
#line 365 "properties-window.c"
}


static Block74Data* block74_data_ref (Block74Data* _data74_) {
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_atomic_int_inc (&_data74_->_ref_count_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return _data74_;
#line 374 "properties-window.c"
}


static void block74_data_unref (void * _userdata_) {
	Block74Data* _data74_;
	_data74_ = (Block74Data*) _userdata_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (g_atomic_int_dec_and_test (&_data74_->_ref_count_)) {
#line 383 "properties-window.c"
		BoxesPropertiesWindow* self;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		self = _data74_->self;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		(_data74_->file_chosen_func_target_destroy_notify == NULL) ? NULL : (_data74_->file_chosen_func_target_destroy_notify (_data74_->file_chosen_func_target), NULL);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_data74_->file_chosen_func = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_data74_->file_chosen_func_target = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_data74_->file_chosen_func_target_destroy_notify = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_g_object_unref0 (self);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_slice_free (Block74Data, _data74_);
#line 399 "properties-window.c"
	}
}


static void __lambda120_ (Block74Data* _data74_) {
	BoxesPropertiesWindow* self;
	gchar* path = NULL;
	GtkFileChooserWidget* _tmp0_;
	gchar* _tmp1_;
	BoxesPropertiesWindowFileChosenFunc _tmp2_;
	void* _tmp2__target;
	GtkFileChooserWidget* _tmp3_;
	gulong _tmp4_;
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = _data74_->self;
#line 68 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->file_chooser;
#line 68 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp0_);
#line 68 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	path = _tmp1_;
#line 69 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = _data74_->file_chosen_func;
#line 69 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2__target = _data74_->file_chosen_func_target;
#line 69 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ (path, _tmp2__target);
#line 70 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = self->file_chooser;
#line 70 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = _data74_->activated_id;
#line 70 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_signal_handler_disconnect ((GObject*) _tmp3_, _tmp4_);
#line 72 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_set_page (self, BOXES_PROPS_WINDOW_PAGE_MAIN);
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_free0 (path);
#line 437 "properties-window.c"
}


static void ___lambda120__gtk_file_chooser_file_activated (GtkFileChooser* _sender, gpointer self) {
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	__lambda120_ (self);
#line 444 "properties-window.c"
}


void boxes_properties_window_show_file_chooser (BoxesPropertiesWindow* self, BoxesPropertiesWindowFileChosenFunc file_chosen_func, void* file_chosen_func_target, GDestroyNotify file_chosen_func_target_destroy_notify) {
	Block74Data* _data74_;
	BoxesPropertiesWindowFileChosenFunc _tmp0_;
	void* _tmp0__target;
	GtkFileChooserWidget* _tmp1_;
	gulong _tmp2_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_ = g_slice_new0 (Block74Data);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->_ref_count_ = 1;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->self = g_object_ref (self);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = file_chosen_func;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0__target = file_chosen_func_target;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	(_data74_->file_chosen_func_target_destroy_notify == NULL) ? NULL : (_data74_->file_chosen_func_target_destroy_notify (_data74_->file_chosen_func_target), NULL);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func_target = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func_target_destroy_notify = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func = _tmp0_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func_target = _tmp0__target;
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->file_chosen_func_target_destroy_notify = file_chosen_func_target_destroy_notify;
#line 66 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->activated_id = (gulong) 0;
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = self->file_chooser;
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = g_signal_connect_data ((GtkFileChooser*) _tmp1_, "file-activated", (GCallback) ___lambda120__gtk_file_chooser_file_activated, block74_data_ref (_data74_), (GClosureNotify) block74_data_unref, 0);
#line 67 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_->activated_id = _tmp2_;
#line 74 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_set_page (self, BOXES_PROPS_WINDOW_PAGE_FILE_CHOOSER);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	block74_data_unref (_data74_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_data74_ = NULL;
#line 494 "properties-window.c"
}


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


void boxes_properties_window_copy_troubleshoot_log_to_clipboard (BoxesPropertiesWindow* self) {
	gchar* log = NULL;
	BoxesTroubleshootLog* _tmp0_;
	GtkTextView* _tmp1_;
	GtkTextBuffer* _tmp2_;
	GtkTextBuffer* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkClipboard* clipboard = NULL;
	GdkDisplay* _tmp6_;
	GtkClipboard* _tmp7_;
	GtkClipboard* _tmp8_;
#line 77 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->troubleshoot_log;
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = _tmp0_->view;
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = gtk_text_view_get_buffer (_tmp1_);
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = _tmp2_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_get (_tmp3_, "text", &_tmp4_, NULL);
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp5_ = _tmp4_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	log = _tmp5_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp6_ = gtk_widget_get_display ((GtkWidget*) self);
#line 79 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp7_ = gtk_clipboard_get_for_display (_tmp6_, GDK_SELECTION_CLIPBOARD);
#line 79 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp8_ = _g_object_ref0 (_tmp7_);
#line 79 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	clipboard = _tmp8_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_clipboard_set_text (clipboard, log, -1);
#line 77 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (clipboard);
#line 77 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_free0 (log);
#line 547 "properties-window.c"
}


void boxes_properties_window_revert_state (BoxesPropertiesWindow* self) {
	gboolean _tmp0_ = FALSE;
	BoxesAppWindow* _tmp1_;
	BoxesCollectionItem* _tmp2_;
	BoxesCollectionItem* _tmp3_;
	BoxesMachineMachineState _tmp4_;
	BoxesMachineMachineState _tmp5_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = self->priv->app_window;
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = boxes_app_window_get_current_item (_tmp1_);
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = _tmp2_;
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = boxes_machine_get_state (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp3_) : NULL);
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp5_ = _tmp4_;
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp5_ != BOXES_MACHINE_MACHINE_STATE_RUNNING) {
#line 572 "properties-window.c"
		BoxesAppWindow* _tmp6_;
		BoxesUIState _tmp7_;
		BoxesUIState _tmp8_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp6_ = self->priv->app_window;
#line 86 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp7_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp6_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp8_ = _tmp7_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp0_ = _tmp8_ == BOXES_UI_STATE_DISPLAY;
#line 584 "properties-window.c"
	} else {
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp0_ = FALSE;
#line 588 "properties-window.c"
	}
#line 85 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp0_) {
#line 592 "properties-window.c"
		BoxesAppWindow* _tmp9_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp9_ = self->priv->app_window;
#line 87 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp9_, BOXES_UI_STATE_COLLECTION);
#line 598 "properties-window.c"
	} else {
		BoxesAppWindow* _tmp10_;
		BoxesAppWindow* _tmp11_;
		BoxesUIState _tmp12_;
		BoxesUIState _tmp13_;
#line 89 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp10_ = self->priv->app_window;
#line 89 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp11_ = self->priv->app_window;
#line 89 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp12_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp11_);
#line 89 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp13_ = _tmp12_;
#line 89 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_ui_set_state ((BoxesUI*) _tmp10_, _tmp13_);
#line 614 "properties-window.c"
	}
#line 91 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_set_page (self, BOXES_PROPS_WINDOW_PAGE_MAIN);
#line 618 "properties-window.c"
}


static void boxes_properties_window_ui_state_changed (BoxesPropertiesWindow* self) {
	BoxesProperties* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	BoxesUIState _tmp3_;
	BoxesUIState _tmp4_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 95 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->properties;
#line 95 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) self);
#line 95 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = _tmp1_;
#line 95 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp0_, _tmp2_);
#line 97 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = boxes_ui_get_ui_state ((BoxesUI*) self);
#line 97 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = _tmp3_;
#line 97 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_set_visible ((GtkWidget*) self, _tmp4_ == BOXES_UI_STATE_PROPERTIES);
#line 644 "properties-window.c"
}


static gboolean boxes_properties_window_on_key_pressed (BoxesPropertiesWindow* self, GtkWidget* widget, GdkEventKey* event) {
	gboolean result = FALSE;
	GdkModifierType default_modifiers = 0;
	GdkModifierType _tmp0_;
	GtkTextDirection direction = 0;
	GtkTextDirection _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	GtkTextDirection _tmp5_;
#line 101 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 101 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 101 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 102 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = gtk_accelerator_get_default_mod_mask ();
#line 102 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	default_modifiers = _tmp0_;
#line 103 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = gtk_widget_get_direction ((GtkWidget*) self);
#line 103 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	direction = _tmp1_;
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp5_ = direction;
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp5_ == GTK_TEXT_DIR_LTR) {
#line 676 "properties-window.c"
		GdkEventKey* _tmp6_;
		guint _tmp7_;
#line 106 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp6_ = event;
#line 106 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp7_ = _tmp6_->keyval;
#line 106 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp4_ = _tmp7_ == ((guint) GDK_KEY_Left);
#line 685 "properties-window.c"
	} else {
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp4_ = FALSE;
#line 689 "properties-window.c"
	}
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp4_) {
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp3_ = TRUE;
#line 695 "properties-window.c"
	} else {
		gboolean _tmp8_ = FALSE;
		GtkTextDirection _tmp9_;
#line 107 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp9_ = direction;
#line 107 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		if (_tmp9_ == GTK_TEXT_DIR_RTL) {
#line 703 "properties-window.c"
			GdkEventKey* _tmp10_;
			guint _tmp11_;
#line 108 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			_tmp10_ = event;
#line 108 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			_tmp11_ = _tmp10_->keyval;
#line 108 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			_tmp8_ = _tmp11_ == ((guint) GDK_KEY_Right);
#line 712 "properties-window.c"
		} else {
#line 107 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			_tmp8_ = FALSE;
#line 716 "properties-window.c"
		}
#line 107 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp3_ = _tmp8_;
#line 720 "properties-window.c"
	}
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp3_) {
#line 724 "properties-window.c"
		GdkEventKey* _tmp12_;
		GdkModifierType _tmp13_;
		GdkModifierType _tmp14_;
#line 109 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp12_ = event;
#line 109 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp13_ = _tmp12_->state;
#line 109 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp14_ = default_modifiers;
#line 109 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp2_ = (_tmp13_ & _tmp14_) == GDK_MOD1_MASK;
#line 736 "properties-window.c"
	} else {
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp2_ = FALSE;
#line 740 "properties-window.c"
	}
#line 105 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (_tmp2_) {
#line 744 "properties-window.c"
		BoxesPropertiesToolbar* _tmp15_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp15_ = self->topbar;
#line 110 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_properties_toolbar_click_back_button (_tmp15_);
#line 112 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		result = TRUE;
#line 112 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		return result;
#line 754 "properties-window.c"
	} else {
		GdkEventKey* _tmp16_;
		guint _tmp17_;
#line 113 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp16_ = event;
#line 113 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp17_ = _tmp16_->keyval;
#line 113 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		if (_tmp17_ == ((guint) GDK_KEY_Escape)) {
#line 114 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			boxes_properties_window_revert_state (self);
#line 116 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			result = TRUE;
#line 116 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
			return result;
#line 770 "properties-window.c"
		}
	}
#line 119 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	result = FALSE;
#line 119 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 777 "properties-window.c"
}


static gboolean _boxes_properties_window_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = boxes_properties_window_on_key_pressed ((BoxesPropertiesWindow*) self, _sender, event);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 786 "properties-window.c"
}


static gboolean boxes_properties_window_on_delete_event (BoxesPropertiesWindow* self) {
	gboolean result = FALSE;
#line 123 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 124 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_revert_state (self);
#line 126 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	result = TRUE;
#line 126 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 800 "properties-window.c"
}


static gboolean _boxes_properties_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = boxes_properties_window_on_delete_event ((BoxesPropertiesWindow*) self);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 809 "properties-window.c"
}


static BoxesUIState boxes_properties_window_real_get_previous_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesPropertiesWindow* self;
	BoxesUIState _tmp0_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = (BoxesPropertiesWindow*) base;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->priv->_previous_ui_state;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	result = _tmp0_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 825 "properties-window.c"
}


static void boxes_properties_window_real_set_previous_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesPropertiesWindow* self;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = (BoxesPropertiesWindow*) base;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (boxes_properties_window_real_get_previous_ui_state (base) != value) {
#line 835 "properties-window.c"
		BoxesUIState _tmp0_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp0_ = value;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		self->priv->_previous_ui_state = _tmp0_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE]);
#line 843 "properties-window.c"
	}
}


static BoxesUIState boxes_properties_window_real_get_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesPropertiesWindow* self;
	BoxesUIState _tmp0_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = (BoxesPropertiesWindow*) base;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->priv->_ui_state;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	result = _tmp0_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 860 "properties-window.c"
}


static void boxes_properties_window_real_set_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesPropertiesWindow* self;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = (BoxesPropertiesWindow*) base;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	if (boxes_properties_window_real_get_ui_state (base) != value) {
#line 870 "properties-window.c"
		BoxesUIState _tmp0_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		_tmp0_ = value;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		self->priv->_ui_state = _tmp0_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_UI_STATE]);
#line 878 "properties-window.c"
	}
}


BoxesPropsWindowPage boxes_properties_window_get_page (BoxesPropertiesWindow* self) {
	BoxesPropsWindowPage result;
	BoxesPropsWindowPage _tmp0_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 21 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = self->priv->_page;
#line 21 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	result = _tmp0_;
#line 21 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	return result;
#line 894 "properties-window.c"
}


void boxes_properties_window_set_page (BoxesPropertiesWindow* self, BoxesPropsWindowPage value) {
	BoxesPropsWindowPage _tmp0_;
	GtkStack* _tmp1_;
	BoxesPropsWindowPage _tmp2_;
	const gchar* _tmp3_;
	BoxesPropertiesToolbar* _tmp4_;
	BoxesPropsWindowPage _tmp5_;
#line 22 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_return_if_fail (self != NULL);
#line 23 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp0_ = value;
#line 23 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self->priv->_page = _tmp0_;
#line 25 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp1_ = self->view;
#line 25 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp2_ = value;
#line 25 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp3_ = BOXES_PROPERTIES_WINDOW_page_names[_tmp2_];
#line 25 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_stack_set_visible_child_name (_tmp1_, _tmp3_);
#line 26 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp4_ = self->topbar;
#line 26 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_tmp5_ = value;
#line 26 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_toolbar_set_page (_tmp4_, _tmp5_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_PAGE]);
#line 927 "properties-window.c"
}


static void boxes_properties_window_class_init (BoxesPropertiesWindowClass * klass) {
	gint BoxesPropertiesWindow_private_offset;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_parent_class = g_type_class_peek_parent (klass);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_type_class_add_private (klass, sizeof (BoxesPropertiesWindowPrivate));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_properties_window_get_property;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_properties_window_set_property;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_properties_window_finalize;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE] = g_param_spec_enum ("previous-ui-state", "previous-ui-state", "previous-ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_PROPERTIES_WINDOW_UI_STATE, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_UI_STATE] = g_param_spec_enum ("ui-state", "ui-state", "ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_PROPERTIES_WINDOW_PAGE, boxes_properties_window_properties[BOXES_PROPERTIES_WINDOW_PAGE] = g_param_spec_enum ("page", "page", "page", BOXES_TYPE_PROPS_WINDOW_PAGE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	BoxesPropertiesWindow_private_offset = g_type_class_get_instance_private_offset (klass);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/properties-window.ui");
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "view", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, view));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "properties", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, properties));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "troubleshoot_log", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, troubleshoot_log));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "file_chooser", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, file_chooser));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "topbar", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, topbar));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notificationbar", FALSE, G_STRUCT_OFFSET (BoxesPropertiesWindow, notificationbar));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_key_pressed", G_CALLBACK(_boxes_properties_window_on_key_pressed_gtk_widget_key_press_event));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_delete_event", G_CALLBACK(_boxes_properties_window_on_delete_event_gtk_widget_delete_event));
#line 969 "properties-window.c"
}


static void boxes_properties_window_boxes_ui_interface_init (BoxesUIIface * iface) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	boxes_properties_window_boxes_ui_parent_iface = g_type_interface_peek_parent (iface);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	iface->get_previous_ui_state = boxes_properties_window_real_get_previous_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	iface->set_previous_ui_state = boxes_properties_window_real_set_previous_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	iface->get_ui_state = boxes_properties_window_real_get_ui_state;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	iface->set_ui_state = boxes_properties_window_real_set_ui_state;
#line 984 "properties-window.c"
}


static void boxes_properties_window_instance_init (BoxesPropertiesWindow * self) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self->priv = BOXES_PROPERTIES_WINDOW_GET_PRIVATE (self);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_type_ensure (BOXES_TYPE_PROPERTIES);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_type_ensure (BOXES_TYPE_TROUBLESHOOT_LOG);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_type_ensure (BOXES_TYPE_PROPERTIES_TOOLBAR);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	g_type_ensure (BOXES_TYPE_NOTIFICATIONBAR);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 1001 "properties-window.c"
}


static void boxes_properties_window_finalize (GObject * obj) {
	BoxesPropertiesWindow * self;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindow);
#line 31 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->view);
#line 33 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->properties);
#line 35 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->troubleshoot_log);
#line 37 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->file_chooser);
#line 39 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->topbar);
#line 41 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	_g_object_unref0 (self->notificationbar);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	G_OBJECT_CLASS (boxes_properties_window_parent_class)->finalize (obj);
#line 1023 "properties-window.c"
}


GType boxes_properties_window_get_type (void) {
	static volatile gsize boxes_properties_window_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_properties_window_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesPropertiesWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_properties_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesPropertiesWindow), 0, (GInstanceInitFunc) boxes_properties_window_instance_init, NULL };
		static const GInterfaceInfo boxes_ui_info = { (GInterfaceInitFunc) boxes_properties_window_boxes_ui_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_properties_window_type_id;
		boxes_properties_window_type_id = g_type_register_static (gtk_window_get_type (), "BoxesPropertiesWindow", &g_define_type_info, 0);
		g_type_add_interface_static (boxes_properties_window_type_id, BOXES_TYPE_UI, &boxes_ui_info);
		g_once_init_leave (&boxes_properties_window_type_id__volatile, boxes_properties_window_type_id);
	}
	return boxes_properties_window_type_id__volatile;
}


static void _vala_boxes_properties_window_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesPropertiesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindow);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	switch (property_id) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_value_set_enum (value, boxes_ui_get_previous_ui_state ((BoxesUI*) self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_value_set_enum (value, boxes_ui_get_ui_state ((BoxesUI*) self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_PAGE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		g_value_set_enum (value, boxes_properties_window_get_page (self));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 1064 "properties-window.c"
		default:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 1070 "properties-window.c"
	}
}


static void _vala_boxes_properties_window_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesPropertiesWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_PROPERTIES_WINDOW, BoxesPropertiesWindow);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
	switch (property_id) {
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_PREVIOUS_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_ui_set_previous_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_UI_STATE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_ui_set_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		case BOXES_PROPERTIES_WINDOW_PAGE:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		boxes_properties_window_set_page (self, g_value_get_enum (value));
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 1098 "properties-window.c"
		default:
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 11 "/home/fborges/checkout/gnome-boxes/src/properties-window.vala"
		break;
#line 1104 "properties-window.c"
	}
}



