/* actions-popover.c generated by valac 0.26.0.50-d9a75, the Vala compiler
 * generated from actions-popover.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 <gio/gio.h>
#include <atk/atk.h>
#include <glib/gi18n-lib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>
#include <stdlib.h>
#include <string.h>
#include <libgd/gd.h>


#define BOXES_TYPE_ACTIONS_POPOVER (boxes_actions_popover_get_type ())
#define BOXES_ACTIONS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ACTIONS_POPOVER, BoxesActionsPopover))
#define BOXES_ACTIONS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ACTIONS_POPOVER, BoxesActionsPopoverClass))
#define BOXES_IS_ACTIONS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ACTIONS_POPOVER))
#define BOXES_IS_ACTIONS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ACTIONS_POPOVER))
#define BOXES_ACTIONS_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ACTIONS_POPOVER, BoxesActionsPopoverClass))

typedef struct _BoxesActionsPopover BoxesActionsPopover;
typedef struct _BoxesActionsPopoverClass BoxesActionsPopoverClass;
typedef struct _BoxesActionsPopoverPrivate BoxesActionsPopoverPrivate;

#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (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_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;

#define BOXES_TYPE_IPROPERTIES_PROVIDER (boxes_iproperties_provider_get_type ())
#define BOXES_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProvider))
#define BOXES_IS_IPROPERTIES_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER))
#define BOXES_IPROPERTIES_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_IPROPERTIES_PROVIDER, BoxesIPropertiesProviderIface))

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

#define TYPE_PROPERTY_CREATION_FLAG (property_creation_flag_get_type ())

#define BOXES_TYPE_PROPERTY (boxes_property_get_type ())
#define BOXES_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTY, BoxesProperty))
#define BOXES_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTY, BoxesPropertyClass))
#define BOXES_IS_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTY))
#define BOXES_IS_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTY))
#define BOXES_PROPERTY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTY, BoxesPropertyClass))

typedef struct _BoxesProperty BoxesProperty;
typedef struct _BoxesPropertyClass BoxesPropertyClass;
typedef struct _BoxesMachinePrivate BoxesMachinePrivate;

#define BOXES_MACHINE_TYPE_CONNECT_FLAGS (boxes_machine_connect_flags_get_type ())

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

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;
typedef struct _Block9Data Block9Data;
typedef struct _BoxesAppWindowPrivate BoxesAppWindowPrivate;

#define BOXES_TYPE_WIZARD_WINDOW (boxes_wizard_window_get_type ())
#define BOXES_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindow))
#define BOXES_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))
#define BOXES_IS_WIZARD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_IS_WIZARD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD_WINDOW))
#define BOXES_WIZARD_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD_WINDOW, BoxesWizardWindowClass))

typedef struct _BoxesWizardWindow BoxesWizardWindow;
typedef struct _BoxesWizardWindowClass BoxesWizardWindowClass;

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

typedef struct _BoxesPropertiesWindow BoxesPropertiesWindow;
typedef struct _BoxesPropertiesWindowClass BoxesPropertiesWindowClass;

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

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

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

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_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_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

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

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

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

typedef struct _BoxesEmptyBoxes BoxesEmptyBoxes;
typedef struct _BoxesEmptyBoxesClass BoxesEmptyBoxesClass;

#define BOXES_TYPE_COLLECTION_VIEW (boxes_collection_view_get_type ())
#define BOXES_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView))
#define BOXES_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))
#define BOXES_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))

typedef struct _BoxesCollectionView BoxesCollectionView;
typedef struct _BoxesCollectionViewClass BoxesCollectionViewClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

struct _BoxesActionsPopover {
	GtkPopover parent_instance;
	BoxesActionsPopoverPrivate * priv;
};

struct _BoxesActionsPopoverClass {
	GtkPopoverClass parent_class;
};

struct _BoxesActionsPopoverPrivate {
	BoxesAppWindow* window;
	GSimpleActionGroup* action_group;
};

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 _BoxesCollectionItem {
	GObject parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	GObjectClass parent_class;
	gint (*compare) (BoxesCollectionItem* self, BoxesCollectionItem* other);
};

typedef enum  {
	BOXES_PROPERTIES_PAGE_GENERAL,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_SNAPSHOTS,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

typedef enum  {
	PROPERTY_CREATION_FLAG_NONE = 1 << 0,
	PROPERTY_CREATION_FLAG_NO_USB = 1 << 1
} PropertyCreationFlag;

struct _BoxesIPropertiesProviderIface {
	GTypeInterface parent_iface;
	GList* (*get_properties) (BoxesIPropertiesProvider* self, BoxesPropertiesPage page, PropertyCreationFlag* flags);
};

typedef enum  {
	BOXES_MACHINE_CONNECT_FLAGS_NONE = 0,
	BOXES_MACHINE_CONNECT_FLAGS_IGNORE_SAVED_STATE = 1 << 0
} BoxesMachineConnectFlags;

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesCollectionSource* source;
	BoxesBoxConfig* config;
	gboolean stay_on_display;
	gboolean suspend_at_exit;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	void (*save_real) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*save_real_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GdkPixbuf* (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page, PropertyCreationFlag* flags);
	void (*connect_display) (BoxesMachine* self, BoxesMachineConnectFlags flags, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connect_display_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	void (*restart) (BoxesMachine* self);
	void (*disconnect_display) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
	gboolean (*get_can_save) (BoxesMachine* self);
	gboolean (*get_should_autosave) (BoxesMachine* self);
};

struct _Block9Data {
	int _ref_count_;
	BoxesActionsPopover* self;
	BoxesMachine* machine;
};

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

struct _BoxesAppWindowClass {
	GtkApplicationWindowClass parent_class;
};

typedef void (*BoxesAppUndoNotifyCallback) (void* user_data);

static gpointer boxes_actions_popover_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_actions_popover_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_ACTIONS_POPOVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_ACTIONS_POPOVER, BoxesActionsPopoverPrivate))
enum  {
	BOXES_ACTIONS_POPOVER_DUMMY_PROPERTY
};
static void boxes_actions_popover_open_in_new_win_activated (BoxesActionsPopover* self);
static void _boxes_actions_popover_open_in_new_win_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void boxes_actions_popover_favorite_activated (BoxesActionsPopover* self);
static void _boxes_actions_popover_favorite_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void boxes_actions_popover_pause_activated (BoxesActionsPopover* self);
static void _boxes_actions_popover_pause_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void boxes_actions_popover_delete_activated (BoxesActionsPopover* self);
static void _boxes_actions_popover_delete_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void boxes_actions_popover_properties_activated (BoxesActionsPopover* self);
static void _boxes_actions_popover_properties_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
BoxesActionsPopover* boxes_actions_popover_new (BoxesAppWindow* window);
BoxesActionsPopover* boxes_actions_popover_construct (GType object_type, BoxesAppWindow* window);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
void boxes_actions_popover_update_for_item (BoxesActionsPopover* self, BoxesCollectionItem* item);
GType boxes_machine_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_page_get_type (void) G_GNUC_CONST;
GType property_creation_flag_get_type (void) G_GNUC_CONST;
GType boxes_property_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_connect_flags_get_type (void) G_GNUC_CONST;
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
gboolean boxes_machine_get_can_save (BoxesMachine* self);
gboolean boxes_machine_get_can_delete (BoxesMachine* self);
void boxes_app_window_set_current_item (BoxesAppWindow* self, BoxesCollectionItem* value);
GType boxes_app_get_type (void) G_GNUC_CONST;
void boxes_app_open_in_new_window (BoxesApp* self, BoxesMachine* machine);
BoxesCollectionItem* boxes_app_window_get_current_item (BoxesAppWindow* self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
void boxes_machine_save (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_machine_save_finish (BoxesMachine* self, GAsyncResult* _res_, GError** error);
static void __lambda53_ (Block9Data* _data9_, GObject* obj, GAsyncResult* _result_);
GType boxes_wizard_window_get_type (void) G_GNUC_CONST;
GType boxes_properties_window_get_type (void) G_GNUC_CONST;
GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_empty_boxes_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
GdNotification* boxes_notificationbar_display_error (BoxesNotificationbar* self, const gchar* message, gint timeout);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
#define BOXES_NOTIFICATIONBAR_DEFAULT_TIMEOUT 6
static void ___lambda53__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
void boxes_app_delete_machines_undoable (BoxesApp* self, GList* items, const gchar* message, BoxesAppUndoNotifyCallback undo_notify_callback, void* undo_notify_callback_target, GDestroyNotify undo_notify_callback_target_destroy_notify);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
void boxes_app_window_show_properties (BoxesAppWindow* self);
static void boxes_actions_popover_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const GActionEntry BOXES_ACTIONS_POPOVER_action_entries[5] = {{"open-in-new-win", _boxes_actions_popover_open_in_new_win_activated_gsimple_action_activate_callback}, {"favorite", _boxes_actions_popover_favorite_activated_gsimple_action_activate_callback}, {"pause", _boxes_actions_popover_pause_activated_gsimple_action_activate_callback}, {"delete", _boxes_actions_popover_delete_activated_gsimple_action_activate_callback}, {"properties", _boxes_actions_popover_properties_activated_gsimple_action_activate_callback}};

static void _boxes_actions_popover_open_in_new_win_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_open_in_new_win_activated ((BoxesActionsPopover*) self);
#line 390 "actions-popover.c"
}


static void _boxes_actions_popover_favorite_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_favorite_activated ((BoxesActionsPopover*) self);
#line 397 "actions-popover.c"
}


static void _boxes_actions_popover_pause_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_pause_activated ((BoxesActionsPopover*) self);
#line 404 "actions-popover.c"
}


static void _boxes_actions_popover_delete_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_delete_activated ((BoxesActionsPopover*) self);
#line 411 "actions-popover.c"
}


static void _boxes_actions_popover_properties_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_properties_activated ((BoxesActionsPopover*) self);
#line 418 "actions-popover.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	return self ? g_object_ref (self) : NULL;
#line 425 "actions-popover.c"
}


BoxesActionsPopover* boxes_actions_popover_construct (GType object_type, BoxesAppWindow* window) {
	BoxesActionsPopover * self = NULL;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	GSimpleActionGroup* _tmp2_ = NULL;
	GSimpleActionGroup* _tmp3_ = NULL;
	GSimpleActionGroup* _tmp4_ = NULL;
	AtkObject* a11y = NULL;
	AtkObject* _tmp5_ = NULL;
	AtkObject* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_val_if_fail (window != NULL, NULL);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self = (BoxesActionsPopover*) g_object_new (object_type, NULL);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = window;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (self->priv->window);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self->priv->window = _tmp1_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = g_simple_action_group_new ();
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (self->priv->action_group);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self->priv->action_group = _tmp2_;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = self->priv->action_group;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_action_map_add_action_entries ((GActionMap*) _tmp3_, BOXES_ACTIONS_POPOVER_action_entries, G_N_ELEMENTS (BOXES_ACTIONS_POPOVER_action_entries), self);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp4_ = self->priv->action_group;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	gtk_widget_insert_action_group ((GtkWidget*) self, "box", (GActionGroup*) _tmp4_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp5_ = gtk_widget_get_accessible ((GtkWidget*) self);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	a11y = _tmp6_;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	a11y->role = ATK_ROLE_POPUP_MENU;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp7_ = _ ("Box actions");
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	a11y->name = _tmp7_;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (a11y);
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	return self;
#line 482 "actions-popover.c"
}


BoxesActionsPopover* boxes_actions_popover_new (BoxesAppWindow* window) {
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	return boxes_actions_popover_construct (BOXES_TYPE_ACTIONS_POPOVER, window);
#line 489 "actions-popover.c"
}


static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
	int i;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	for (i = 0; i < stack_length; i++) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		if (g_strcmp0 (stack[i], needle) == 0) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
			return TRUE;
#line 501 "actions-popover.c"
		}
	}
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	return FALSE;
#line 506 "actions-popover.c"
}


void boxes_actions_popover_update_for_item (BoxesActionsPopover* self, BoxesCollectionItem* item) {
	BoxesCollectionItem* _tmp0_ = NULL;
	BoxesMachine* machine = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesMachine* _tmp2_ = NULL;
	GMenu* menu = NULL;
	GMenu* _tmp3_ = NULL;
	GMenu* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	BoxesMachine* _tmp6_ = NULL;
	BoxesBoxConfig* _tmp7_ = NULL;
	gchar** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	gchar** _tmp9_ = NULL;
	gint _tmp9__length1 = 0;
	gchar** _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	gboolean _tmp11_ = FALSE;
	GMenu* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	GSimpleAction* action = NULL;
	GSimpleActionGroup* _tmp18_ = NULL;
	GAction* _tmp19_ = NULL;
	GSimpleAction* _tmp20_ = NULL;
	GSimpleAction* _tmp21_ = NULL;
	BoxesMachine* _tmp22_ = NULL;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	GMenu* _tmp25_ = NULL;
	const gchar* _tmp26_ = NULL;
	GSimpleActionGroup* _tmp27_ = NULL;
	GAction* _tmp28_ = NULL;
	GSimpleAction* _tmp29_ = NULL;
	GSimpleAction* _tmp30_ = NULL;
	BoxesMachine* _tmp31_ = NULL;
	gboolean _tmp32_ = FALSE;
	gboolean _tmp33_ = FALSE;
	GMenu* section = NULL;
	GMenu* _tmp34_ = NULL;
	const gchar* _tmp35_ = NULL;
	GMenu* _tmp36_ = NULL;
	GMenu* _tmp37_ = NULL;
	BoxesAppWindow* _tmp38_ = NULL;
	BoxesCollectionItem* _tmp39_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (item != NULL);
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = item;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_MACHINE));
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = item;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp1_) : NULL);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	machine = _tmp2_;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = g_menu_new ();
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	menu = _tmp3_;
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp4_ = menu;
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp5_ = _ ("Open in new Window");
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_menu_append (_tmp4_, _tmp5_, "box.open-in-new-win");
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp6_ = machine;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp7_ = _tmp6_->config;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp8_ = boxes_box_config_get_categories (_tmp7_, &_tmp8__length1);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp9_ = _tmp8_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp9__length1 = _tmp8__length1;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp10_ = _tmp9_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp10__length1 = _tmp9__length1;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp11_ = _vala_string_array_contains (_tmp10_, _tmp9__length1, "favorite");
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp10_ = (_vala_array_free (_tmp10_, _tmp10__length1, (GDestroyNotify) g_free), NULL);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	if (_tmp11_) {
#line 598 "actions-popover.c"
		GMenu* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp12_ = menu;
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp13_ = _ ("Remove favorite");
#line 39 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		g_menu_append (_tmp12_, _tmp13_, "box.favorite");
#line 607 "actions-popover.c"
	} else {
		GMenu* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp14_ = menu;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp15_ = _ ("Favorite");
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		g_menu_append (_tmp14_, _tmp15_, "box.favorite");
#line 617 "actions-popover.c"
	}
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp16_ = menu;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp17_ = _ ("Pause");
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_menu_append (_tmp16_, _tmp17_, "box.pause");
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp18_ = self->priv->action_group;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp19_ = g_action_map_lookup_action ((GActionMap*) _tmp18_, "pause");
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp19_) : NULL);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	action = _tmp20_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp21_ = action;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp22_ = machine;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp23_ = boxes_machine_get_can_save (_tmp22_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp24_ = _tmp23_;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_simple_action_set_enabled (_tmp21_, _tmp24_);
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp25_ = menu;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp26_ = _ ("Delete");
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_menu_append (_tmp25_, _tmp26_, "box.delete");
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp27_ = self->priv->action_group;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp28_ = g_action_map_lookup_action ((GActionMap*) _tmp27_, "delete");
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp28_) : NULL);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (action);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	action = _tmp29_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp30_ = action;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp31_ = machine;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp32_ = boxes_machine_get_can_delete (_tmp31_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp33_ = _tmp32_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_simple_action_set_enabled (_tmp30_, _tmp33_);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp34_ = g_menu_new ();
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	section = _tmp34_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp35_ = _ ("Properties");
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_menu_append (section, _tmp35_, "box.properties");
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp36_ = menu;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_menu_append_section (_tmp36_, NULL, (GMenuModel*) section);
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp37_ = menu;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	gtk_popover_bind_model ((GtkPopover*) self, (GMenuModel*) _tmp37_, NULL);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp38_ = self->priv->window;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp39_ = item;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_app_window_set_current_item (_tmp38_, _tmp39_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (section);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (action);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (menu);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (machine);
#line 699 "actions-popover.c"
}


static void boxes_actions_popover_open_in_new_win_activated (BoxesActionsPopover* self) {
	BoxesApp* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesCollectionItem* _tmp3_ = NULL;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = boxes_app_app;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = self->priv->window;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = boxes_app_window_get_current_item (_tmp1_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = _tmp2_;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_app_open_in_new_window (_tmp0_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp3_) : NULL);
#line 720 "actions-popover.c"
}


static void boxes_actions_popover_favorite_activated (BoxesActionsPopover* self) {
	BoxesMachine* machine = NULL;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesMachine* _tmp3_ = NULL;
	gboolean enabled = FALSE;
	BoxesBoxConfig* _tmp4_ = NULL;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	gboolean _tmp8_ = FALSE;
	BoxesBoxConfig* _tmp9_ = NULL;
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = self->priv->window;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = _tmp1_;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	machine = _tmp3_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp4_ = machine->config;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp5_ = boxes_box_config_get_categories (_tmp4_, &_tmp5__length1);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp6_ = _tmp5_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp6__length1 = _tmp5__length1;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp7_ = _tmp6_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp7__length1 = _tmp6__length1;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp8_ = !_vala_string_array_contains (_tmp7_, _tmp6__length1, "favorite");
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	enabled = _tmp8_;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp9_ = machine->config;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_box_config_set_category (_tmp9_, "favorite", enabled);
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (machine);
#line 776 "actions-popover.c"
}


static Block9Data* block9_data_ref (Block9Data* _data9_) {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_atomic_int_inc (&_data9_->_ref_count_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	return _data9_;
#line 785 "actions-popover.c"
}


static void block9_data_unref (void * _userdata_) {
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
#line 794 "actions-popover.c"
		BoxesActionsPopover* self;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		self = _data9_->self;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_g_object_unref0 (_data9_->machine);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_g_object_unref0 (self);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		g_slice_free (Block9Data, _data9_);
#line 804 "actions-popover.c"
	}
}


static void __lambda53_ (Block9Data* _data9_, GObject* obj, GAsyncResult* _result_) {
	BoxesActionsPopover* self;
	GError * _inner_error_ = NULL;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self = _data9_->self;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (_result_ != NULL);
#line 816 "actions-popover.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp0_ = _result_;
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		boxes_machine_save_finish (_data9_->machine, _tmp0_, &_inner_error_);
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 825 "actions-popover.c"
			goto __catch5_g_error;
		}
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
		BoxesAppWindow* _tmp1_ = NULL;
		BoxesNotificationbar* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		GdNotification* _tmp8_ = NULL;
		GdNotification* _tmp9_ = NULL;
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		e = _inner_error_;
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_inner_error_ = NULL;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp1_ = self->priv->window;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp2_ = _tmp1_->notificationbar;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp3_ = _ ("Pausing '%s' failed");
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp4_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _data9_->machine);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp5_ = _tmp4_;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp6_ = g_strdup_printf (_tmp3_, _tmp5_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp7_ = _tmp6_;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp8_ = boxes_notificationbar_display_error (_tmp2_, _tmp7_, BOXES_NOTIFICATIONBAR_DEFAULT_TIMEOUT);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_tmp9_ = _tmp8_;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_g_object_unref0 (_tmp9_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_g_free0 (_tmp7_);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		_g_error_free0 (e);
#line 870 "actions-popover.c"
	}
	__finally5:
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		g_clear_error (&_inner_error_);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
		return;
#line 881 "actions-popover.c"
	}
}


static void ___lambda53__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	__lambda53_ (self, source_object, res);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	block9_data_unref (self);
#line 891 "actions-popover.c"
}


static void boxes_actions_popover_pause_activated (BoxesActionsPopover* self) {
	Block9Data* _data9_;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesMachine* _tmp3_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_data9_ = g_slice_new0 (Block9Data);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_data9_->_ref_count_ = 1;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_data9_->self = g_object_ref (self);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = self->priv->window;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = _tmp1_;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_data9_->machine = _tmp3_;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_machine_save (_data9_->machine, ___lambda53__gasync_ready_callback, block9_data_ref (_data9_));
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	block9_data_unref (_data9_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_data9_ = NULL;
#line 925 "actions-popover.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 932 "actions-popover.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_list_free (self);
#line 941 "actions-popover.c"
}


static void boxes_actions_popover_delete_activated (BoxesActionsPopover* self) {
	BoxesAppWindow* _tmp0_ = NULL;
	GList* items = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesCollectionItem* _tmp3_ = NULL;
	BoxesCollectionItem* _tmp4_ = NULL;
	BoxesApp* _tmp5_ = NULL;
	GList* _tmp6_ = NULL;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = self->priv->window;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp0_, BOXES_UI_STATE_COLLECTION);
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	items = NULL;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp1_ = self->priv->window;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp2_ = boxes_app_window_get_current_item (_tmp1_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp3_ = _tmp2_;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	items = g_list_append (items, _tmp4_);
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp5_ = boxes_app_app;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp6_ = items;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	items = NULL;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_app_delete_machines_undoable (_tmp5_, _tmp6_, NULL, NULL, NULL, NULL);
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	__g_list_free__g_object_unref0_0 (items);
#line 982 "actions-popover.c"
}


static void boxes_actions_popover_properties_activated (BoxesActionsPopover* self) {
	BoxesAppWindow* _tmp0_ = NULL;
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_return_if_fail (self != NULL);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_tmp0_ = self->priv->window;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_app_window_show_properties (_tmp0_);
#line 994 "actions-popover.c"
}


static void boxes_actions_popover_class_init (BoxesActionsPopoverClass * klass) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	boxes_actions_popover_parent_class = g_type_class_peek_parent (klass);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	g_type_class_add_private (klass, sizeof (BoxesActionsPopoverPrivate));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_actions_popover_finalize;
#line 1005 "actions-popover.c"
}


static void boxes_actions_popover_instance_init (BoxesActionsPopover * self) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self->priv = BOXES_ACTIONS_POPOVER_GET_PRIVATE (self);
#line 1012 "actions-popover.c"
}


static void boxes_actions_popover_finalize (GObject* obj) {
	BoxesActionsPopover * self;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_ACTIONS_POPOVER, BoxesActionsPopover);
#line 12 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (self->priv->window);
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	_g_object_unref0 (self->priv->action_group);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/actions-popover.vala"
	G_OBJECT_CLASS (boxes_actions_popover_parent_class)->finalize (obj);
#line 1026 "actions-popover.c"
}


GType boxes_actions_popover_get_type (void) {
	static volatile gsize boxes_actions_popover_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_actions_popover_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesActionsPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_actions_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesActionsPopover), 0, (GInstanceInitFunc) boxes_actions_popover_instance_init, NULL };
		GType boxes_actions_popover_type_id;
		boxes_actions_popover_type_id = g_type_register_static (gtk_popover_get_type (), "BoxesActionsPopover", &g_define_type_info, 0);
		g_once_init_leave (&boxes_actions_popover_type_id__volatile, boxes_actions_popover_type_id);
	}
	return boxes_actions_popover_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



