/* app.c generated by valac 0.17.5.2-8558, the Vala compiler
 * generated from app.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <gtk/gtk.h>
#include <clutter-gtk/clutter-gtk.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <libcommon.h>
#include <glib/gi18n-lib.h>
#include <version.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <float.h>
#include <math.h>
#include <config.h>
#include <gdk/gdk.h>


#define BOXES_TYPE_APP_PAGE (boxes_app_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_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_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 _BoxesAppPrivate BoxesAppPrivate;

#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_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_REVEALER (boxes_revealer_get_type ())
#define BOXES_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_REVEALER, BoxesRevealer))
#define BOXES_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_REVEALER, BoxesRevealerClass))
#define BOXES_IS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_REVEALER))
#define BOXES_IS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_REVEALER))
#define BOXES_REVEALER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_REVEALER, BoxesRevealerClass))

typedef struct _BoxesRevealer BoxesRevealer;
typedef struct _BoxesRevealerClass BoxesRevealerClass;

#define BOXES_TYPE_SIDEBAR (boxes_sidebar_get_type ())
#define BOXES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebar))
#define BOXES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))
#define BOXES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SIDEBAR))
#define BOXES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SIDEBAR))
#define BOXES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#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_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

#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_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_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_COLLECTION_FILTER (boxes_collection_filter_get_type ())
#define BOXES_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter))
#define BOXES_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))
#define BOXES_IS_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_IS_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_COLLECTION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;

#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_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

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

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_LIBVIRT_MACHINE (boxes_libvirt_machine_get_type ())
#define BOXES_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachine))
#define BOXES_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))
#define BOXES_IS_LIBVIRT_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_IS_LIBVIRT_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MACHINE))
#define BOXES_LIBVIRT_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MACHINE, BoxesLibvirtMachineClass))

typedef struct _BoxesLibvirtMachine BoxesLibvirtMachine;
typedef struct _BoxesLibvirtMachineClass BoxesLibvirtMachineClass;
typedef struct _BoxesCollectionPrivate BoxesCollectionPrivate;
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 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_TYPE_MACHINE_ACTOR (boxes_machine_actor_get_type ())
#define BOXES_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActor))
#define BOXES_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))
#define BOXES_IS_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_IS_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_MACHINE_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))

typedef struct _BoxesMachineActor BoxesMachineActor;
typedef struct _BoxesMachineActorClass BoxesMachineActorClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _BoxesLibvirtMachinePrivate BoxesLibvirtMachinePrivate;

#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
#define _boxes_vm_creator_unref0(var) ((var == NULL) ? NULL : (var = (boxes_vm_creator_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesAppSetupLibvirtData BoxesAppSetupLibvirtData;

#define BOXES_TYPE_REMOTE_MACHINE (boxes_remote_machine_get_type ())
#define BOXES_REMOTE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_REMOTE_MACHINE, BoxesRemoteMachine))
#define BOXES_REMOTE_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_REMOTE_MACHINE, BoxesRemoteMachineClass))
#define BOXES_IS_REMOTE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_REMOTE_MACHINE))
#define BOXES_IS_REMOTE_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_REMOTE_MACHINE))
#define BOXES_REMOTE_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_REMOTE_MACHINE, BoxesRemoteMachineClass))

typedef struct _BoxesRemoteMachine BoxesRemoteMachine;
typedef struct _BoxesRemoteMachineClass BoxesRemoteMachineClass;
typedef struct _BoxesAppAddCollectionSourceData BoxesAppAddCollectionSourceData;
typedef struct _BoxesAppSetupSourcesData BoxesAppSetupSourcesData;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _BoxesRevealerPrivate BoxesRevealerPrivate;
typedef struct _Block2Data Block2Data;
typedef struct _Block3Data Block3Data;

typedef enum  {
	BOXES_APP_PAGE_MAIN,
	BOXES_APP_PAGE_DISPLAY
} BoxesAppPage;

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

struct _BoxesApp {
	BoxesUI parent_instance;
	BoxesAppPrivate * priv;
	GtkApplicationWindow* window;
	GtkNotebook* notebook;
	GtkClutterEmbed* embed;
	ClutterStage* stage;
	ClutterBinLayout* stage_bin;
	ClutterActor* overlay_bin_actor;
	ClutterBinLayout* overlay_bin;
	BoxesCollectionItem* current_item;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesRevealer* sidebar_revealer;
	BoxesRevealer* searchbar_revealer;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	BoxesCollectionFilter* filter;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
	GSimpleAction* action_shutdown;
	BoxesCollectionView* view;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

struct _BoxesAppPrivate {
	gchar* _uri;
	GtkApplication* application;
	GHashTable* connections;
	GHashTable* sources;
	guint configure_id;
	gulong status_id;
	gboolean _selection_mode;
};

struct _BoxesCollection {
	GObject parent_instance;
	BoxesCollectionPrivate * priv;
	GPtrArray* items;
};

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionItem {
	BoxesUI parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_PROPERTIES_PAGE_LOGIN,
	BOXES_PROPERTIES_PAGE_SYSTEM,
	BOXES_PROPERTIES_PAGE_DISPLAY,
	BOXES_PROPERTIES_PAGE_DEVICES,
	BOXES_PROPERTIES_PAGE_LAST
} BoxesPropertiesPage;

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

struct _BoxesMachine {
	BoxesCollectionItem parent_instance;
	BoxesMachinePrivate * priv;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean stay_on_display;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	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);
	void (*connect_display) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connect_display_finish) (BoxesMachine* self, GAsyncResult* _res_);
	void (*disconnect_display) (BoxesMachine* self);
	void (*delete) (BoxesMachine* self, gboolean by_user);
};

struct _BoxesLibvirtMachine {
	BoxesMachine parent_instance;
	BoxesLibvirtMachinePrivate * priv;
	GVirDomain* domain;
	GVirConfigDomain* domain_config;
	GVirConnection* connection;
	GVirStorageVol* storage_volume;
	BoxesVMCreator* vm_creator;
	gdouble* cpu_stats;
	gint cpu_stats_length1;
	gint _cpu_stats_size_;
	gdouble* io_stats;
	gint io_stats_length1;
	gint _io_stats_size_;
	gdouble* net_stats;
	gint net_stats_length1;
	gint _net_stats_size_;
};

struct _BoxesLibvirtMachineClass {
	BoxesMachineClass parent_class;
};

struct _Block1Data {
	int _ref_count_;
	BoxesApp * self;
	BoxesCollectionSource* source;
	gpointer _async_data_;
};

struct _BoxesAppSetupLibvirtData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesApp* self;
	BoxesCollectionSource* source;
	Block1Data* _data1_;
	BoxesCollectionSource* _tmp0_;
	GHashTable* _tmp1_;
	BoxesCollectionSource* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gconstpointer _tmp6_;
	gboolean _tmp7_;
	BoxesCollectionSource* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GVirConnection* _tmp12_;
	GVirConnection* _tmp13_;
	GVirConnection* connection;
	GVirConnection* _tmp14_;
	GVirConnection* _tmp15_;
	GVirConnection* _tmp16_;
	GVirConnection* _tmp17_;
	GVirStoragePool* _tmp18_;
	GVirStoragePool* pool;
	GVirStoragePool* _tmp19_;
	GVirStoragePool* _tmp20_;
	GError* _error_;
	GError* _tmp21_;
	const gchar* _tmp22_;
	GHashTable* _tmp23_;
	BoxesCollectionSource* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GVirConnection* _tmp27_;
	GVirConnection* _tmp28_;
	GHashTable* _tmp29_;
	BoxesCollectionSource* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	BoxesCollectionSource* _tmp33_;
	BoxesCollectionSource* _tmp34_;
	BoxesCollectionSource* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gboolean _tmp39_;
	GVirConnection* _tmp40_;
	GList* _tmp41_;
	GList* domain_collection;
	GList* domain_it;
	GVirDomain* _tmp42_;
	GVirDomain* domain;
	BoxesCollectionSource* _tmp43_;
	GVirConnection* _tmp44_;
	GVirDomain* _tmp45_;
	GVirConnection* _tmp46_;
	GVirConnection* _tmp47_;
	GError * _inner_error_;
};

struct _BoxesAppAddCollectionSourceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesApp* self;
	BoxesCollectionSource* source;
	BoxesCollectionSource* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	BoxesCollectionSource* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GQuark _tmp8_;
	BoxesCollectionSource* _tmp9_;
	BoxesCollectionSource* _tmp10_;
	BoxesRemoteMachine* _tmp11_;
	BoxesRemoteMachine* machine;
	BoxesCollection* _tmp12_;
	BoxesRemoteMachine* _tmp13_;
	BoxesCollectionSource* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
};

struct _BoxesAppSetupSourcesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesApp* self;
	gboolean _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	GFile* src;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GFile* _tmp7_;
	GFile* _tmp8_;
	GFile* dst;
	GFile* _tmp9_;
	GFile* _tmp10_;
	GError* _error_;
	GError* _tmp11_;
	const gchar* _tmp12_;
	BoxesCollectionSource* _tmp13_;
	BoxesCollectionSource* source;
	GError* _vala1__error_;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GVirConnection* _tmp16_;
	GVirConnection* _tmp17_;
	GtkApplication* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	GFile* _tmp21_;
	GFile* _tmp22_;
	GFile* dir;
	GError * _inner_error_;
};

struct _BoxesRevealer {
	ClutterActor parent_instance;
	BoxesRevealerPrivate * priv;
	guint duration;
	gboolean resize;
};

struct _BoxesRevealerClass {
	ClutterActorClass parent_class;
};

struct _Block2Data {
	int _ref_count_;
	BoxesApp * self;
	GList* selected_items;
};

typedef void (*BoxesNotificationbarOKFunc) (void* user_data);
typedef void (*BoxesNotificationbarCancelFunc) (void* user_data);
struct _Block3Data {
	int _ref_count_;
	BoxesApp * self;
	BoxesMachine* machine;
};


static gpointer boxes_app_parent_class = NULL;
extern BoxesApp* boxes_app_app;
BoxesApp* boxes_app_app = NULL;

GType boxes_app_page_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_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_revealer_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
#define BOXES_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_APP, BoxesAppPrivate))
enum  {
	BOXES_APP_DUMMY_PROPERTY,
	BOXES_APP_ACTOR,
	BOXES_APP_FULLSCREEN,
	BOXES_APP_URI,
	BOXES_APP_DEFAULT_CONNECTION,
	BOXES_APP_DEFAULT_SOURCE,
	BOXES_APP_SELECTION_MODE,
	BOXES_APP_SELECTED_ITEMS
};
#define BOXES_APP_configure_id_timeout ((guint) 100)
BoxesApp* boxes_app_new (void);
BoxesApp* boxes_app_construct (GType object_type);
BoxesUI* boxes_ui_construct (GType object_type);
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
BoxesCollectionFilter* boxes_collection_filter_new (void);
BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type);
static void __lambda135_ (BoxesApp* self);
gboolean boxes_app_quit (BoxesApp* self);
static void ___lambda135__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda136_ (BoxesApp* self);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void ___lambda136__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda137_ (BoxesApp* self);
void boxes_app_set_fullscreen (BoxesApp* self, gboolean value);
static void ___lambda137__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda138_ (BoxesApp* self);
static void ___lambda138__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda139_ (BoxesApp* self);
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST;
void boxes_libvirt_machine_force_shutdown (BoxesLibvirtMachine* self, gboolean confirm);
static void ___lambda139__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda140_ (BoxesApp* self);
static void ___lambda140__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda141_ (BoxesApp* self, GApplication* app);
BoxesCollection* boxes_collection_new (void);
BoxesCollection* boxes_collection_construct (GType object_type);
static void boxes_app_setup_ui (BoxesApp* self);
static void __lambda146_ (BoxesApp* self, BoxesCollectionItem* item);
void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static void ___lambda146__boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void __lambda147_ (BoxesApp* self, BoxesCollectionItem* item);
void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static void ___lambda147__boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void boxes_app_setup_sources (BoxesApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_app_setup_sources_finish (BoxesApp* self, GAsyncResult* _res_);
static void __lambda149_ (BoxesApp* self, GObject* obj, GAsyncResult* _result_);
static void ___lambda149__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
void boxes_check_cpu_vt_capability (GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean boxes_check_cpu_vt_capability_finish (GAsyncResult* _res_);
void boxes_check_module_kvm_loaded (GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean boxes_check_module_kvm_loaded_finish (GAsyncResult* _res_);
static void ___lambda141__g_application_startup (GApplication* _sender, gpointer self);
static void __lambda150_ (BoxesApp* self, GApplication* app);
static void ___lambda150__g_application_activate (GApplication* _sender, gpointer self);
gint boxes_app_run (BoxesApp* self);
void boxes_app_open (BoxesApp* self, const gchar* name);
void boxes_collection_view_set_visible (BoxesCollectionView* self, gboolean value);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
void boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item);
gboolean boxes_app_open_uuid (BoxesApp* self, const gchar* uuid);
GType boxes_properties_page_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_actor_get_type (void) G_GNUC_CONST;
BoxesLibvirtMachine* boxes_app_add_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesLibvirtMachine* boxes_libvirt_machine_new (BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesLibvirtMachine* boxes_libvirt_machine_construct (GType object_type, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain, GError** error);
void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item);
static void boxes_app_try_add_new_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain);
static void boxes_app_try_add_existing_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain);
gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
gboolean boxes_vm_configurator_is_install_config (GVirConfigDomain* domain);
gboolean boxes_vm_configurator_is_live_config (GVirConfigDomain* domain);
BoxesVMCreator* boxes_vm_creator_new_for_install_completion (BoxesLibvirtMachine* machine);
BoxesVMCreator* boxes_vm_creator_construct_for_install_completion (GType object_type, BoxesLibvirtMachine* machine);
void boxes_app_delete_machine (BoxesApp* self, BoxesMachine* machine, gboolean by_user);
void boxes_machine_delete (BoxesMachine* self, gboolean by_user);
void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item);
static void boxes_app_setup_libvirt_data_free (gpointer _data);
static void boxes_app_setup_libvirt (BoxesApp* self, BoxesCollectionSource* source, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_app_setup_libvirt_finish (BoxesApp* self, GAsyncResult* _res_);
static gboolean boxes_app_setup_libvirt_co (BoxesAppSetupLibvirtData* _data_);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void boxes_app_setup_libvirt_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_list_free__g_object_unref0_ (GList* self);
static void __lambda127_ (BoxesApp* self, GVirConnection* connection, GVirDomain* domain);
static void ___lambda127__gvir_connection_domain_removed (GVirConnection* _sender, GVirDomain* dom, gpointer self);
static void __lambda128_ (Block1Data* _data1_, GVirConnection* connection, GVirDomain* domain);
static void ___lambda128__gvir_connection_domain_added (GVirConnection* _sender, GVirDomain* dom, gpointer self);
static void boxes_app_add_collection_source_data_free (gpointer _data);
void boxes_app_add_collection_source (BoxesApp* self, BoxesCollectionSource* source, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_app_add_collection_source_finish (BoxesApp* self, GAsyncResult* _res_);
static gboolean boxes_app_add_collection_source_co (BoxesAppAddCollectionSourceData* _data_);
static void boxes_app_add_collection_source_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
BoxesRemoteMachine* boxes_remote_machine_new (BoxesCollectionSource* source);
BoxesRemoteMachine* boxes_remote_machine_construct (GType object_type, BoxesCollectionSource* source);
GType boxes_remote_machine_get_type (void) G_GNUC_CONST;
static void boxes_app_setup_sources_data_free (gpointer _data);
static gboolean boxes_app_setup_sources_co (BoxesAppSetupSourcesData* _data_);
static void boxes_app_setup_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GVirConnection* boxes_app_get_default_connection (BoxesApp* self);
static gboolean __lambda148_ (BoxesApp* self, const gchar* filename, GError** error);
static gboolean ___lambda148__boxes_foreach_filename_from_dir_func (const gchar* filename, gpointer self, GError** error);
static void boxes_app_save_window_geometry (BoxesApp* self);
static gboolean boxes_app_get_maximized (BoxesApp* self);
static GVariant* _variant_new1 (gint* value, gint value_length1);
static GVariant* _variant_new2 (gint* value, gint value_length1);
static gint _variant_get3 (GVariant* value);
static gint _variant_get4 (GVariant* value);
static gint _variant_get5 (GVariant* value);
static gint _variant_get6 (GVariant* value);
static gboolean __lambda142_ (BoxesApp* self);
gboolean boxes_app_get_fullscreen (BoxesApp* self);
static gboolean __lambda143_ (BoxesApp* self);
static gboolean ___lambda143__gsource_func (gpointer self);
static gboolean ___lambda142__gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
static gboolean __lambda144_ (BoxesApp* self);
static gboolean ___lambda144__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
BoxesDisplayPage* boxes_display_page_new (void);
BoxesDisplayPage* boxes_display_page_construct (GType object_type);
GtkWidget* boxes_display_page_get_widget (BoxesDisplayPage* self);
void boxes_gdk_rgba_to_clutter_color (GdkRGBA* gdk_rgba, ClutterColor* result);
void boxes_get_boxes_bg_color (GdkRGBA* result);
static gboolean __lambda145_ (BoxesApp* self);
static gboolean ___lambda145__gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self);
static gboolean boxes_app_on_key_pressed (BoxesApp* self, GtkWidget* widget, GdkEventKey* event);
static gboolean _boxes_app_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
BoxesSidebar* boxes_sidebar_new (void);
BoxesSidebar* boxes_sidebar_construct (GType object_type);
BoxesCollectionView* boxes_collection_view_new (void);
BoxesCollectionView* boxes_collection_view_construct (GType object_type);
BoxesSearchbar* boxes_searchbar_new (void);
BoxesSearchbar* boxes_searchbar_construct (GType object_type);
BoxesTopbar* boxes_topbar_new (void);
BoxesTopbar* boxes_topbar_construct (GType object_type);
BoxesNotificationbar* boxes_notificationbar_new (void);
BoxesNotificationbar* boxes_notificationbar_construct (GType object_type);
BoxesSelectionbar* boxes_selectionbar_new (void);
BoxesSelectionbar* boxes_selectionbar_construct (GType object_type);
BoxesWizard* boxes_wizard_new (void);
BoxesWizard* boxes_wizard_construct (GType object_type);
BoxesProperties* boxes_properties_new (void);
BoxesProperties* boxes_properties_construct (GType object_type);
BoxesRevealer* boxes_revealer_new (gboolean horizontal);
BoxesRevealer* boxes_revealer_construct (GType object_type, gboolean horizontal);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
void boxes_revealer_unreveal (BoxesRevealer* self);
ClutterActor* boxes_notificationbar_get_actor (BoxesNotificationbar* self);
ClutterActor* boxes_selectionbar_get_actor (BoxesSelectionbar* self);
static void boxes_app_set_main_ui_state (BoxesApp* self);
static void boxes_app_real_ui_state_changed (BoxesUI* base);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_machine_disconnect_display (BoxesMachine* self);
gboolean boxes_searchbar_get_visible (BoxesSearchbar* self);
void boxes_revealer_set_revealed (BoxesRevealer* self, gboolean value);
const gchar* boxes_ui_state_to_string (BoxesUIState self);
void boxes_notificationbar_cancel (BoxesNotificationbar* self);
void boxes_libvirt_machine_suspend (BoxesLibvirtMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_libvirt_machine_suspend_finish (BoxesLibvirtMachine* self, GAsyncResult* _res_, GError** error);
void boxes_wizard_cleanup (BoxesWizard* self);
void boxes_app_remove_selected_items (BoxesApp* self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self);
static void __lambda111_ (Block2Data* _data2_);
static void ___lambda111__boxes_notificationbar_ok_func (gpointer self);
static void __lambda112_ (Block2Data* _data2_);
static void ___lambda112__boxes_notificationbar_cancel_func (gpointer self);
void boxes_notificationbar_display_for_action (BoxesNotificationbar* self, const gchar* message, const gchar* action_label, BoxesNotificationbarOKFunc action_func, void* action_func_target, GDestroyNotify action_func_target_destroy_notify, BoxesNotificationbarCancelFunc ignore_func, void* ignore_func_target, GDestroyNotify ignore_func_target_destroy_notify);
gboolean boxes_app_get_selection_mode (BoxesApp* self);
void boxes_app_set_selection_mode (BoxesApp* self, gboolean value);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void ____lambda98_ (Block3Data* _data3_);
void boxes_topbar_set_status (BoxesTopbar* self, const gchar* text);
const gchar* boxes_machine_get_status (BoxesMachine* self);
static void _____lambda98__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_machine_connect_display (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_machine_connect_display_finish (BoxesMachine* self, GAsyncResult* _res_);
const gchar* boxes_app_get_uri (BoxesApp* self);
void boxes_app_set_uri (BoxesApp* self, const gchar* value);
BoxesCollectionSource* boxes_app_get_default_source (BoxesApp* self);
GList* boxes_app_get_selected_items (BoxesApp* self);
static void boxes_app_finalize (GObject* obj);
static void _vala_boxes_app_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_app_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
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);


GType boxes_app_page_get_type (void) {
	static volatile gsize boxes_app_page_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_app_page_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_APP_PAGE_MAIN, "BOXES_APP_PAGE_MAIN", "main"}, {BOXES_APP_PAGE_DISPLAY, "BOXES_APP_PAGE_DISPLAY", "display"}, {0, NULL, NULL}};
		GType boxes_app_page_type_id;
		boxes_app_page_type_id = g_enum_register_static ("BoxesAppPage", values);
		g_once_init_leave (&boxes_app_page_type_id__volatile, boxes_app_page_type_id);
	}
	return boxes_app_page_type_id__volatile;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void __lambda135_ (BoxesApp* self) {
	boxes_app_quit (self);
}


static void ___lambda135__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda135_ (self);
}


static void __lambda136_ (BoxesApp* self) {
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_WIZARD);
}


static void ___lambda136__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda136_ (self);
}


static void __lambda137_ (BoxesApp* self) {
	boxes_app_set_fullscreen (self, TRUE);
}


static void ___lambda137__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda137_ (self);
}


static void __lambda138_ (BoxesApp* self) {
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_PROPERTIES);
}


static void ___lambda138__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda138_ (self);
}


static void __lambda139_ (BoxesApp* self) {
	BoxesCollectionItem* _tmp0_;
	_tmp0_ = self->current_item;
	boxes_libvirt_machine_force_shutdown (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_LIBVIRT_MACHINE) ? ((BoxesLibvirtMachine*) _tmp0_) : NULL, TRUE);
}


static void ___lambda139__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda139_ (self);
}


static void __lambda140_ (BoxesApp* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_ = NULL;
	gchar** authors;
	gint authors_length1;
	gint _authors_size_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_ = NULL;
	gchar** artists;
	gint artists_length1;
	gint _artists_size_;
	GtkApplicationWindow* _tmp8_;
	const gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	_tmp0_ = g_strdup ("Alexander Larsson <alexl@redhat.com>");
	_tmp1_ = g_strdup ("Christophe Fergeau <cfergeau@redhat.com>");
	_tmp2_ = g_strdup ("Marc-André Lureau <marcandre.lureau@gmail.com>");
	_tmp3_ = g_strdup ("Zeeshan Ali (Khattak) <zeeshanak@gnome.org>");
	_tmp4_ = g_new0 (gchar*, 4 + 1);
	_tmp4_[0] = _tmp0_;
	_tmp4_[1] = _tmp1_;
	_tmp4_[2] = _tmp2_;
	_tmp4_[3] = _tmp3_;
	authors = _tmp4_;
	authors_length1 = 4;
	_authors_size_ = authors_length1;
	_tmp5_ = g_strdup ("Jon McCann <jmccann@redhat.com>");
	_tmp6_ = g_strdup ("Jakub Steiner <jsteiner@redhat.com>");
	_tmp7_ = g_new0 (gchar*, 2 + 1);
	_tmp7_[0] = _tmp5_;
	_tmp7_[1] = _tmp6_;
	artists = _tmp7_;
	artists_length1 = 2;
	_artists_size_ = artists_length1;
	_tmp8_ = self->window;
	_tmp9_ = _ ("translator-credits");
	_tmp10_ = _ ("A simple GNOME 3 application to access remote or virtual systems");
	gtk_show_about_dialog ((GtkWindow*) _tmp8_, "artists", artists, "authors", authors, "translator-credits", _tmp9_, "comments", _tmp10_, "copyright", "Copyright 2011 Red Hat, Inc.", "license-type", GTK_LICENSE_LGPL_2_1, "logo-icon-name", "gnome-boxes", "version", BUILD_VERSION, "website", "http://live.gnome.org/Boxes", "wrap-license", TRUE, NULL);
	artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL);
	authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
}


static void ___lambda140__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
	__lambda140_ (self);
}


static void __lambda146_ (BoxesApp* self, BoxesCollectionItem* item) {
	BoxesCollectionView* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->view;
	_tmp1_ = item;
	boxes_collection_view_add_item (_tmp0_, _tmp1_);
}


static void ___lambda146__boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
	__lambda146_ (self, item);
}


static void __lambda147_ (BoxesApp* self, BoxesCollectionItem* item) {
	BoxesCollectionView* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	g_return_if_fail (item != NULL);
	_tmp0_ = self->view;
	_tmp1_ = item;
	boxes_collection_view_remove_item (_tmp0_, _tmp1_);
}


static void ___lambda147__boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
	__lambda147_ (self, item);
}


static gint g_ptr_array_get_length (GPtrArray* self) {
	gint result;
	guint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->len;
	result = (gint) _tmp0_;
	return result;
}


static void g_ptr_array_set_length (GPtrArray* self, gint value) {
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	g_ptr_array_set_size (self, _tmp0_);
}


static void __lambda149_ (BoxesApp* self, GObject* obj, GAsyncResult* _result_) {
	GAsyncResult* _tmp0_;
	BoxesCollection* _tmp1_;
	GPtrArray* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean no_items;
	g_return_if_fail (_result_ != NULL);
	_tmp0_ = _result_;
	boxes_app_setup_sources_finish (self, _tmp0_);
	_tmp1_ = self->collection;
	_tmp2_ = _tmp1_->items;
	_tmp3_ = g_ptr_array_get_length (_tmp2_);
	_tmp4_ = _tmp3_;
	no_items = _tmp4_ == 0;
	g_signal_emit_by_name (self, "ready", no_items);
}


static void ___lambda149__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda149_ (self, source_object, res);
	g_object_unref (self);
}


static void __lambda141_ (BoxesApp* self, GApplication* app) {
	GMenu* _tmp0_;
	GMenu* menu;
	const gchar* _tmp1_ = NULL;
	GMenu* _tmp2_;
	GMenu* display_section;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	GtkApplication* _tmp8_;
	BoxesCollection* _tmp9_;
	GSettings* _tmp10_;
	gint _tmp11_ = 0;
	BoxesCollection* _tmp12_;
	BoxesCollection* _tmp13_;
	g_return_if_fail (app != NULL);
	_tmp0_ = g_menu_new ();
	menu = _tmp0_;
	_tmp1_ = _ ("New");
	g_menu_append (menu, _tmp1_, "app.new");
	_tmp2_ = g_menu_new ();
	display_section = _tmp2_;
	_tmp3_ = _ ("Properties");
	g_menu_append (display_section, _tmp3_, "app.display.properties");
	_tmp4_ = _ ("Fullscreen");
	g_menu_append (display_section, _tmp4_, "app.display.fullscreen");
	_tmp5_ = _ ("Force shutdown");
	g_menu_append (display_section, _tmp5_, "app.display.shutdown");
	g_menu_append_section (menu, NULL, (GMenuModel*) display_section);
	_tmp6_ = _ ("About Boxes");
	g_menu_append (menu, _tmp6_, "app.about");
	_tmp7_ = _ ("Quit");
	g_menu_append (menu, _tmp7_, "app.quit");
	_tmp8_ = self->priv->application;
	gtk_application_set_app_menu (_tmp8_, (GMenuModel*) menu);
	_tmp9_ = boxes_collection_new ();
	_g_object_unref0 (self->collection);
	self->collection = _tmp9_;
	_tmp10_ = self->settings;
	_tmp11_ = g_settings_get_int (_tmp10_, "animation-duration");
	self->duration = (guint) _tmp11_;
	boxes_app_setup_ui (self);
	_tmp12_ = self->collection;
	g_signal_connect_object (_tmp12_, "item-added", (GCallback) ___lambda146__boxes_collection_item_added, self, 0);
	_tmp13_ = self->collection;
	g_signal_connect_object (_tmp13_, "item-removed", (GCallback) ___lambda147__boxes_collection_item_removed, self, 0);
	boxes_app_setup_sources (self, ___lambda149__gasync_ready_callback, g_object_ref (self));
	boxes_check_cpu_vt_capability (NULL, NULL);
	boxes_check_module_kvm_loaded (NULL, NULL);
	_g_object_unref0 (display_section);
	_g_object_unref0 (menu);
}


static void ___lambda141__g_application_startup (GApplication* _sender, gpointer self) {
	__lambda141_ (self, _sender);
}


static void __lambda150_ (BoxesApp* self, GApplication* app) {
	GtkApplicationWindow* _tmp0_;
	g_return_if_fail (app != NULL);
	_tmp0_ = self->window;
	gtk_window_present ((GtkWindow*) _tmp0_);
}


static void ___lambda150__g_application_activate (GApplication* _sender, gpointer self) {
	__lambda150_ (self, _sender);
}


BoxesApp* boxes_app_construct (GType object_type) {
	BoxesApp * self = NULL;
	BoxesApp* _tmp0_;
	GtkApplication* _tmp1_;
	GSettings* _tmp2_;
	GHashFunc _tmp3_;
	GEqualFunc _tmp4_;
	GHashTable* _tmp5_;
	GHashFunc _tmp6_;
	GEqualFunc _tmp7_;
	GHashTable* _tmp8_;
	BoxesCollectionFilter* _tmp9_;
	GSimpleAction* _tmp10_;
	GSimpleAction* action;
	GSimpleAction* _tmp11_;
	GtkApplication* _tmp12_;
	GSimpleAction* _tmp13_;
	GSimpleAction* _tmp14_;
	GSimpleAction* _tmp15_;
	GtkApplication* _tmp16_;
	GSimpleAction* _tmp17_;
	GSimpleAction* _tmp18_;
	GSimpleAction* _tmp19_;
	GtkApplication* _tmp20_;
	GSimpleAction* _tmp21_;
	GSimpleAction* _tmp22_;
	GSimpleAction* _tmp23_;
	GtkApplication* _tmp24_;
	GSimpleAction* _tmp25_;
	GSimpleAction* _tmp26_;
	GSimpleAction* _tmp27_;
	GtkApplication* _tmp28_;
	GSimpleAction* _tmp29_;
	GSimpleAction* _tmp30_;
	GSimpleAction* _tmp31_;
	GtkApplication* _tmp32_;
	GSimpleAction* _tmp33_;
	GtkApplication* _tmp34_;
	GtkApplication* _tmp35_;
	self = (BoxesApp*) boxes_ui_construct (object_type);
	_tmp0_ = _g_object_ref0 (self);
	_g_object_unref0 (boxes_app_app);
	boxes_app_app = _tmp0_;
	_tmp1_ = gtk_application_new ("org.gnome.Boxes", 0);
	_g_object_unref0 (self->priv->application);
	self->priv->application = _tmp1_;
	_tmp2_ = g_settings_new ("org.gnome.boxes");
	_g_object_unref0 (self->settings);
	self->settings = _tmp2_;
	_tmp3_ = g_str_hash;
	_tmp4_ = g_str_equal;
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->connections);
	self->priv->connections = _tmp5_;
	_tmp6_ = g_str_hash;
	_tmp7_ = g_str_equal;
	_tmp8_ = g_hash_table_new_full (_tmp6_, _tmp7_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->sources);
	self->priv->sources = _tmp8_;
	_tmp9_ = boxes_collection_filter_new ();
	_g_object_unref0 (self->filter);
	self->filter = _tmp9_;
	_tmp10_ = g_simple_action_new ("quit", NULL);
	action = _tmp10_;
	_tmp11_ = action;
	g_signal_connect_object (_tmp11_, "activate", (GCallback) ___lambda135__g_simple_action_activate, self, 0);
	_tmp12_ = self->priv->application;
	_tmp13_ = action;
	g_action_map_add_action ((GActionMap*) _tmp12_, (GAction*) _tmp13_);
	_tmp14_ = g_simple_action_new ("new", NULL);
	_g_object_unref0 (action);
	action = _tmp14_;
	_tmp15_ = action;
	g_signal_connect_object (_tmp15_, "activate", (GCallback) ___lambda136__g_simple_action_activate, self, 0);
	_tmp16_ = self->priv->application;
	_tmp17_ = action;
	g_action_map_add_action ((GActionMap*) _tmp16_, (GAction*) _tmp17_);
	_tmp18_ = g_simple_action_new ("display.fullscreen", NULL);
	_g_object_unref0 (self->action_fullscreen);
	self->action_fullscreen = _tmp18_;
	_tmp19_ = self->action_fullscreen;
	g_signal_connect_object (_tmp19_, "activate", (GCallback) ___lambda137__g_simple_action_activate, self, 0);
	_tmp20_ = self->priv->application;
	_tmp21_ = self->action_fullscreen;
	g_action_map_add_action ((GActionMap*) _tmp20_, (GAction*) _tmp21_);
	_tmp22_ = g_simple_action_new ("display.properties", NULL);
	_g_object_unref0 (self->action_properties);
	self->action_properties = _tmp22_;
	_tmp23_ = self->action_properties;
	g_signal_connect_object (_tmp23_, "activate", (GCallback) ___lambda138__g_simple_action_activate, self, 0);
	_tmp24_ = self->priv->application;
	_tmp25_ = self->action_properties;
	g_action_map_add_action ((GActionMap*) _tmp24_, (GAction*) _tmp25_);
	_tmp26_ = g_simple_action_new ("display.shutdown", NULL);
	_g_object_unref0 (self->action_shutdown);
	self->action_shutdown = _tmp26_;
	_tmp27_ = self->action_shutdown;
	g_signal_connect_object (_tmp27_, "activate", (GCallback) ___lambda139__g_simple_action_activate, self, 0);
	_tmp28_ = self->priv->application;
	_tmp29_ = self->action_shutdown;
	g_action_map_add_action ((GActionMap*) _tmp28_, (GAction*) _tmp29_);
	_tmp30_ = g_simple_action_new ("about", NULL);
	_g_object_unref0 (action);
	action = _tmp30_;
	_tmp31_ = action;
	g_signal_connect_object (_tmp31_, "activate", (GCallback) ___lambda140__g_simple_action_activate, self, 0);
	_tmp32_ = self->priv->application;
	_tmp33_ = action;
	g_action_map_add_action ((GActionMap*) _tmp32_, (GAction*) _tmp33_);
	_tmp34_ = self->priv->application;
	g_signal_connect_object ((GApplication*) _tmp34_, "startup", (GCallback) ___lambda141__g_application_startup, self, G_CONNECT_AFTER);
	_tmp35_ = self->priv->application;
	g_signal_connect_object ((GApplication*) _tmp35_, "activate", (GCallback) ___lambda150__g_application_activate, self, G_CONNECT_AFTER);
	_g_object_unref0 (action);
	return self;
}


BoxesApp* boxes_app_new (void) {
	return boxes_app_construct (BOXES_TYPE_APP);
}


gint boxes_app_run (BoxesApp* self) {
	gint result = 0;
	GtkApplication* _tmp0_;
	gint _tmp1_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->application;
	_tmp1_ = g_application_run ((GApplication*) _tmp0_, 0, NULL);
	result = _tmp1_;
	return result;
}


void boxes_app_open (BoxesApp* self, const gchar* name) {
	BoxesCollectionView* _tmp0_;
	BoxesCollection* _tmp1_;
	GPtrArray* _tmp2_;
	gpointer* _tmp3_;
	gint _tmp3__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_COLLECTION);
	_tmp0_ = self->view;
	boxes_collection_view_set_visible (_tmp0_, FALSE);
	_tmp1_ = self->collection;
	_tmp2_ = _tmp1_->items;
	_tmp3_ = _tmp2_->pdata;
	_tmp3__length1 = (gint) _tmp2_->len;
	{
		BoxesCollectionItem** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp3_;
		item_collection_length1 = _tmp3__length1;
		for (item_it = 0; item_it < _tmp3__length1; item_it = item_it + 1) {
			BoxesCollectionItem* _tmp4_;
			BoxesCollectionItem* item = NULL;
			_tmp4_ = _g_object_ref0 (item_collection[item_it]);
			item = _tmp4_;
			{
				BoxesCollectionItem* _tmp5_;
				const gchar* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				_tmp5_ = item;
				_tmp6_ = boxes_collection_item_get_name (_tmp5_);
				_tmp7_ = _tmp6_;
				_tmp8_ = name;
				if (g_strcmp0 (_tmp7_, _tmp8_) == 0) {
					BoxesCollectionItem* _tmp9_;
					_tmp9_ = item;
					boxes_app_select_item (self, _tmp9_);
					_g_object_unref0 (item);
					break;
				}
				_g_object_unref0 (item);
			}
		}
	}
}


gboolean boxes_app_open_uuid (BoxesApp* self, const gchar* uuid) {
	gboolean result = FALSE;
	BoxesCollectionView* _tmp0_;
	BoxesCollection* _tmp1_;
	GPtrArray* _tmp2_;
	gpointer* _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uuid != NULL, FALSE);
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_COLLECTION);
	_tmp0_ = self->view;
	boxes_collection_view_set_visible (_tmp0_, FALSE);
	_tmp1_ = self->collection;
	_tmp2_ = _tmp1_->items;
	_tmp3_ = _tmp2_->pdata;
	_tmp3__length1 = (gint) _tmp2_->len;
	{
		BoxesCollectionItem** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp3_;
		item_collection_length1 = _tmp3__length1;
		for (item_it = 0; item_it < _tmp3__length1; item_it = item_it + 1) {
			BoxesCollectionItem* _tmp4_;
			BoxesCollectionItem* item = NULL;
			_tmp4_ = _g_object_ref0 (item_collection[item_it]);
			item = _tmp4_;
			{
				BoxesCollectionItem* _tmp5_;
				BoxesCollectionItem* _tmp6_;
				BoxesMachine* _tmp7_;
				BoxesMachine* machine;
				BoxesMachine* _tmp8_;
				BoxesDisplayConfig* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
				const gchar* _tmp13_;
				gboolean _tmp14_;
				BoxesCollectionItem* _tmp15_;
				_tmp5_ = item;
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, BOXES_TYPE_MACHINE)) {
					_g_object_unref0 (item);
					continue;
				}
				_tmp6_ = item;
				_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp6_) : NULL);
				machine = _tmp7_;
				_tmp8_ = machine;
				_tmp9_ = _tmp8_->config;
				_tmp10_ = boxes_display_config_get_uuid (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = _tmp11_;
				_tmp13_ = uuid;
				_tmp14_ = g_strcmp0 (_tmp12_, _tmp13_) != 0;
				_g_free0 (_tmp12_);
				if (_tmp14_) {
					_g_object_unref0 (machine);
					_g_object_unref0 (item);
					continue;
				}
				_tmp15_ = item;
				boxes_app_select_item (self, _tmp15_);
				result = TRUE;
				_g_object_unref0 (machine);
				_g_object_unref0 (item);
				return result;
			}
		}
	}
	result = FALSE;
	return result;
}


BoxesLibvirtMachine* boxes_app_add_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain, GError** error) {
	BoxesLibvirtMachine* result = NULL;
	GVirDomain* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_;
	BoxesLibvirtMachine* machine;
	BoxesLibvirtMachine* _tmp3_;
	BoxesCollectionSource* _tmp4_;
	GVirConnection* _tmp5_;
	GVirDomain* _tmp6_;
	BoxesLibvirtMachine* _tmp7_;
	BoxesLibvirtMachine* _tmp8_;
	BoxesCollection* _tmp9_;
	BoxesLibvirtMachine* _tmp10_;
	GVirDomain* _tmp11_;
	BoxesLibvirtMachine* _tmp12_;
	BoxesLibvirtMachine* _tmp13_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (connection != NULL, NULL);
	g_return_val_if_fail (domain != NULL, NULL);
	_tmp0_ = domain;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "machine");
	_tmp2_ = _g_object_ref0 ((BoxesLibvirtMachine*) _tmp1_);
	machine = _tmp2_;
	_tmp3_ = machine;
	if (_tmp3_ != NULL) {
		result = machine;
		return result;
	}
	_tmp4_ = source;
	_tmp5_ = connection;
	_tmp6_ = domain;
	_tmp7_ = boxes_libvirt_machine_new (_tmp4_, _tmp5_, _tmp6_, &_inner_error_);
	_tmp8_ = _tmp7_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (machine);
		return NULL;
	}
	_g_object_unref0 (machine);
	machine = _tmp8_;
	_tmp9_ = self->collection;
	_tmp10_ = machine;
	boxes_collection_add_item (_tmp9_, (BoxesCollectionItem*) _tmp10_);
	_tmp11_ = domain;
	_tmp12_ = machine;
	_tmp13_ = _g_object_ref0 (_tmp12_);
	g_object_set_data_full ((GObject*) _tmp11_, "machine", _tmp13_, g_object_unref);
	result = machine;
	return result;
}


static void boxes_app_try_add_new_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (connection != NULL);
	g_return_if_fail (domain != NULL);
	{
		BoxesCollectionSource* _tmp0_;
		GVirConnection* _tmp1_;
		GVirDomain* _tmp2_;
		BoxesLibvirtMachine* _tmp3_ = NULL;
		BoxesLibvirtMachine* _tmp4_;
		_tmp0_ = source;
		_tmp1_ = connection;
		_tmp2_ = domain;
		_tmp3_ = boxes_app_add_domain (self, _tmp0_, _tmp1_, _tmp2_, &_inner_error_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp4_);
		if (_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		BoxesCollectionSource* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GError* _tmp9_;
		const gchar* _tmp10_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp5_ = source;
		_tmp6_ = boxes_collection_source_get_name (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = _error_;
		_tmp10_ = _tmp9_->message;
		g_warning ("app.vala:219: Failed to create source '%s': %s", _tmp8_, _tmp10_);
		_g_free0 (_tmp8_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void boxes_app_try_add_existing_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (connection != NULL);
	g_return_if_fail (domain != NULL);
	{
		BoxesCollectionSource* _tmp0_;
		GVirConnection* _tmp1_;
		GVirDomain* _tmp2_;
		BoxesLibvirtMachine* _tmp3_ = NULL;
		BoxesLibvirtMachine* machine;
		GVirConfigDomain* _tmp4_;
		GVirConfigDomain* _tmp5_;
		GVirConfigDomain* config;
		gboolean _tmp6_ = FALSE;
		GVirConfigDomain* _tmp7_;
		gboolean _tmp8_ = FALSE;
		gboolean _tmp11_;
		_tmp0_ = source;
		_tmp1_ = connection;
		_tmp2_ = domain;
		_tmp3_ = boxes_app_add_domain (self, _tmp0_, _tmp1_, _tmp2_, &_inner_error_);
		machine = _tmp3_;
		if (_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_tmp4_ = machine->domain_config;
		_tmp5_ = _g_object_ref0 (_tmp4_);
		config = _tmp5_;
		_tmp7_ = config;
		_tmp8_ = boxes_vm_configurator_is_install_config (_tmp7_);
		if (_tmp8_) {
			_tmp6_ = TRUE;
		} else {
			GVirConfigDomain* _tmp9_;
			gboolean _tmp10_ = FALSE;
			_tmp9_ = config;
			_tmp10_ = boxes_vm_configurator_is_live_config (_tmp9_);
			_tmp6_ = _tmp10_;
		}
		_tmp11_ = _tmp6_;
		if (_tmp11_) {
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			BoxesVMCreator* _tmp14_;
			BoxesVMCreator* _tmp15_;
			_tmp12_ = boxes_collection_item_get_name ((BoxesCollectionItem*) machine);
			_tmp13_ = _tmp12_;
			g_debug ("app.vala:230: Continuing installation/live session for '%s', ..", _tmp13_);
			_tmp14_ = boxes_vm_creator_new_for_install_completion (machine);
			_tmp15_ = _tmp14_;
			_boxes_vm_creator_unref0 (_tmp15_);
		}
		_g_object_unref0 (config);
		_g_object_unref0 (machine);
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* _error_ = NULL;
		BoxesCollectionSource* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		GError* _tmp20_;
		const gchar* _tmp21_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp16_ = source;
		_tmp17_ = boxes_collection_source_get_name (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_;
		_tmp20_ = _error_;
		_tmp21_ = _tmp20_->message;
		g_warning ("app.vala:234: Failed to create source '%s': %s", _tmp19_, _tmp21_);
		_g_free0 (_tmp19_);
		_g_error_free0 (_error_);
	}
	__finally1:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return;
	}
}


void boxes_app_delete_machine (BoxesApp* self, BoxesMachine* machine, gboolean by_user) {
	BoxesMachine* _tmp0_;
	gboolean _tmp1_;
	BoxesCollection* _tmp2_;
	BoxesMachine* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (machine != NULL);
	_tmp0_ = machine;
	_tmp1_ = by_user;
	boxes_machine_delete (_tmp0_, _tmp1_);
	_tmp2_ = self->collection;
	_tmp3_ = machine;
	boxes_collection_remove_item (_tmp2_, (BoxesCollectionItem*) _tmp3_);
}


static void boxes_app_setup_libvirt_data_free (gpointer _data) {
	BoxesAppSetupLibvirtData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAppSetupLibvirtData, _data_);
}


static void boxes_app_setup_libvirt (BoxesApp* self, BoxesCollectionSource* source, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesAppSetupLibvirtData* _data_;
	BoxesApp* _tmp0_;
	BoxesCollectionSource* _tmp1_;
	BoxesCollectionSource* _tmp2_;
	_data_ = g_slice_new0 (BoxesAppSetupLibvirtData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_app_setup_libvirt);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_app_setup_libvirt_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = source;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->source = _tmp2_;
	boxes_app_setup_libvirt_co (_data_);
}


static void boxes_app_setup_libvirt_finish (BoxesApp* self, GAsyncResult* _res_) {
	BoxesAppSetupLibvirtData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		BoxesApp * self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->source);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}


static void boxes_app_setup_libvirt_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesAppSetupLibvirtData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_app_setup_libvirt_co (_data_);
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


static void __lambda127_ (BoxesApp* self, GVirConnection* connection, GVirDomain* domain) {
	GVirDomain* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_;
	BoxesLibvirtMachine* machine;
	BoxesLibvirtMachine* _tmp3_;
	BoxesLibvirtMachine* _tmp4_;
	g_return_if_fail (connection != NULL);
	g_return_if_fail (domain != NULL);
	_tmp0_ = domain;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "machine");
	_tmp2_ = _g_object_ref0 ((BoxesLibvirtMachine*) _tmp1_);
	machine = _tmp2_;
	_tmp3_ = machine;
	if (_tmp3_ == NULL) {
		_g_object_unref0 (machine);
		return;
	}
	_tmp4_ = machine;
	boxes_app_delete_machine (self, (BoxesMachine*) _tmp4_, FALSE);
	_g_object_unref0 (machine);
}


static void ___lambda127__gvir_connection_domain_removed (GVirConnection* _sender, GVirDomain* dom, gpointer self) {
	__lambda127_ (self, _sender, dom);
}


static void __lambda128_ (Block1Data* _data1_, GVirConnection* connection, GVirDomain* domain) {
	BoxesApp * self;
	GVirDomain* _tmp0_;
	const gchar* _tmp1_ = NULL;
	BoxesCollectionSource* _tmp2_;
	GVirConnection* _tmp3_;
	GVirDomain* _tmp4_;
	self = _data1_->self;
	g_return_if_fail (connection != NULL);
	g_return_if_fail (domain != NULL);
	_tmp0_ = domain;
	_tmp1_ = gvir_domain_get_name (_tmp0_);
	g_debug ("app.vala:280: New domain '%s'", _tmp1_);
	_tmp2_ = _data1_->source;
	_tmp3_ = connection;
	_tmp4_ = domain;
	boxes_app_try_add_new_domain (self, _tmp2_, _tmp3_, _tmp4_);
}


static void ___lambda128__gvir_connection_domain_added (GVirConnection* _sender, GVirDomain* dom, gpointer self) {
	__lambda128_ (self, _sender, dom);
}


static gboolean boxes_app_setup_libvirt_co (BoxesAppSetupLibvirtData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data1_ = g_slice_new0 (Block1Data);
	_data_->_data1_->_ref_count_ = 1;
	_data_->_data1_->self = g_object_ref (_data_->self);
	_data_->_tmp0_ = _data_->source;
	_data_->_data1_->source = _data_->_tmp0_;
	_data_->_data1_->_async_data_ = _data_;
	_data_->_tmp1_ = _data_->self->priv->connections;
	_data_->_tmp2_ = _data_->_data1_->source;
	_data_->_tmp3_ = boxes_collection_source_get_name (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = g_hash_table_lookup (_data_->_tmp1_, _data_->_tmp5_);
	_data_->_tmp7_ = ((GVirConnection*) _data_->_tmp6_) != NULL;
	_g_free0 (_data_->_tmp5_);
	if (_data_->_tmp7_) {
		block1_data_unref (_data_->_data1_);
		_data_->_data1_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp8_ = _data_->_data1_->source;
	_data_->_tmp9_ = boxes_collection_source_get_uri (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = gvir_connection_new (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_g_free0 (_data_->_tmp11_);
	_data_->connection = _data_->_tmp13_;
	{
		_data_->_tmp14_ = _data_->connection;
		_data_->_state_ = 1;
		gvir_connection_open_async (_data_->_tmp14_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_1:
		gvir_connection_open_finish (_data_->_tmp14_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch2_g_error;
		}
		_data_->_tmp15_ = _data_->connection;
		_data_->_state_ = 2;
		gvir_connection_fetch_domains_async (_data_->_tmp15_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_2:
		gvir_connection_fetch_domains_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch2_g_error;
		}
		_data_->_tmp16_ = _data_->connection;
		_data_->_state_ = 3;
		gvir_connection_fetch_storage_pools_async (_data_->_tmp16_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_3:
		gvir_connection_fetch_storage_pools_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch2_g_error;
		}
		_data_->_tmp17_ = _data_->connection;
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = gvir_connection_find_storage_pool_by_name (_data_->_tmp17_, PACKAGE_TARNAME);
		_data_->pool = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->pool;
		if (_data_->_tmp19_ != NULL) {
			_data_->_tmp20_ = _data_->pool;
			_data_->_state_ = 4;
			gvir_storage_pool_refresh_async (_data_->_tmp20_, NULL, boxes_app_setup_libvirt_ready, _data_);
			return FALSE;
			_state_4:
			gvir_storage_pool_refresh_finish (_data_->_tmp20_, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->pool);
				goto __catch2_g_error;
			}
		}
		_g_object_unref0 (_data_->pool);
	}
	goto __finally2;
	__catch2_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp21_ = _data_->_error_;
		_data_->_tmp22_ = _data_->_tmp21_->message;
		g_warning ("app.vala:258: %s", _data_->_tmp22_);
		_g_error_free0 (_data_->_error_);
	}
	__finally2:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->connection);
		block1_data_unref (_data_->_data1_);
		_data_->_data1_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp23_ = _data_->self->priv->connections;
	_data_->_tmp24_ = _data_->_data1_->source;
	_data_->_tmp25_ = boxes_collection_source_get_name (_data_->_tmp24_);
	_data_->_tmp26_ = _data_->_tmp25_;
	_data_->_tmp27_ = _data_->connection;
	_data_->_tmp28_ = _g_object_ref0 (_data_->_tmp27_);
	g_hash_table_insert (_data_->_tmp23_, _data_->_tmp26_, _data_->_tmp28_);
	_data_->_tmp29_ = _data_->self->priv->sources;
	_data_->_tmp30_ = _data_->_data1_->source;
	_data_->_tmp31_ = boxes_collection_source_get_name (_data_->_tmp30_);
	_data_->_tmp32_ = _data_->_tmp31_;
	_data_->_tmp33_ = _data_->_data1_->source;
	_data_->_tmp34_ = _g_object_ref0 (_data_->_tmp33_);
	g_hash_table_insert (_data_->_tmp29_, _data_->_tmp32_, _data_->_tmp34_);
	_data_->_tmp35_ = _data_->_data1_->source;
	_data_->_tmp36_ = boxes_collection_source_get_name (_data_->_tmp35_);
	_data_->_tmp37_ = _data_->_tmp36_;
	_data_->_tmp38_ = _data_->_tmp37_;
	_data_->_tmp39_ = g_strcmp0 (_data_->_tmp38_, "QEMU Session") == 0;
	_g_free0 (_data_->_tmp38_);
	if (_data_->_tmp39_) {
		g_object_notify ((GObject*) _data_->self, "default-connection");
		g_object_notify ((GObject*) _data_->self, "default-source");
	}
	_data_->_tmp40_ = _data_->connection;
	_data_->_tmp41_ = NULL;
	_data_->_tmp41_ = gvir_connection_get_domains (_data_->_tmp40_);
	{
		_data_->domain_collection = _data_->_tmp41_;
		for (_data_->domain_it = _data_->domain_collection; _data_->domain_it != NULL; _data_->domain_it = _data_->domain_it->next) {
			_data_->_tmp42_ = _g_object_ref0 ((GVirDomain*) _data_->domain_it->data);
			_data_->domain = _data_->_tmp42_;
			{
				_data_->_tmp43_ = _data_->_data1_->source;
				_data_->_tmp44_ = _data_->connection;
				_data_->_tmp45_ = _data_->domain;
				boxes_app_try_add_existing_domain (_data_->self, _data_->_tmp43_, _data_->_tmp44_, _data_->_tmp45_);
				_g_object_unref0 (_data_->domain);
			}
		}
		__g_list_free__g_object_unref0_0 (_data_->domain_collection);
	}
	_data_->_tmp46_ = _data_->connection;
	g_signal_connect_object (_data_->_tmp46_, "domain-removed", (GCallback) ___lambda127__gvir_connection_domain_removed, _data_->self, 0);
	_data_->_tmp47_ = _data_->connection;
	g_signal_connect_data (_data_->_tmp47_, "domain-added", (GCallback) ___lambda128__gvir_connection_domain_added, block1_data_ref (_data_->_data1_), (GClosureNotify) block1_data_unref, 0);
	_g_object_unref0 (_data_->connection);
	block1_data_unref (_data_->_data1_);
	_data_->_data1_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void boxes_app_add_collection_source_data_free (gpointer _data) {
	BoxesAppAddCollectionSourceData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->source);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAppAddCollectionSourceData, _data_);
}


void boxes_app_add_collection_source (BoxesApp* self, BoxesCollectionSource* source, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesAppAddCollectionSourceData* _data_;
	BoxesApp* _tmp0_;
	BoxesCollectionSource* _tmp1_;
	BoxesCollectionSource* _tmp2_;
	_data_ = g_slice_new0 (BoxesAppAddCollectionSourceData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_app_add_collection_source);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_app_add_collection_source_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = source;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->source = _tmp2_;
	boxes_app_add_collection_source_co (_data_);
}


void boxes_app_add_collection_source_finish (BoxesApp* self, GAsyncResult* _res_) {
	BoxesAppAddCollectionSourceData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_app_add_collection_source_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesAppAddCollectionSourceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_app_add_collection_source_co (_data_);
}


static gboolean boxes_app_add_collection_source_co (BoxesAppAddCollectionSourceData* _data_) {
	static GQuark _tmp7_label0 = 0;
	static GQuark _tmp7_label1 = 0;
	static GQuark _tmp7_label2 = 0;
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->source;
	_data_->_tmp1_ = boxes_collection_source_get_enabled (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	if (!_data_->_tmp2_) {
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->source;
	_data_->_tmp4_ = boxes_collection_source_get_source_type (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp8_ = 0U;
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp8_ = (NULL == _data_->_tmp6_) ? 0 : g_quark_from_string (_data_->_tmp6_);
	g_free (_data_->_tmp6_);
	if (_data_->_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("libvirt")))) {
		switch (0) {
			default:
			{
				_data_->_tmp9_ = _data_->source;
				_data_->_state_ = 1;
				boxes_app_setup_libvirt (_data_->self, _data_->_tmp9_, boxes_app_add_collection_source_ready, _data_);
				return FALSE;
				_state_1:
				boxes_app_setup_libvirt_finish (_data_->self, _data_->_res_);
				break;
			}
		}
	} else if ((_data_->_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("vnc")))) || (_data_->_tmp8_ == ((0 != _tmp7_label2) ? _tmp7_label2 : (_tmp7_label2 = g_quark_from_static_string ("spice"))))) {
		switch (0) {
			default:
			{
				_data_->_tmp10_ = _data_->source;
				_data_->_tmp11_ = boxes_remote_machine_new (_data_->_tmp10_);
				_data_->machine = _data_->_tmp11_;
				_data_->_tmp12_ = _data_->self->collection;
				_data_->_tmp13_ = _data_->machine;
				boxes_collection_add_item (_data_->_tmp12_, (BoxesCollectionItem*) _data_->_tmp13_);
				_g_object_unref0 (_data_->machine);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				_data_->_tmp14_ = _data_->source;
				_data_->_tmp15_ = boxes_collection_source_get_source_type (_data_->_tmp14_);
				_data_->_tmp16_ = _data_->_tmp15_;
				_data_->_tmp17_ = _data_->_tmp16_;
				g_warning ("app.vala:301: Unsupported source type %s", _data_->_tmp17_);
				_g_free0 (_data_->_tmp17_);
				break;
			}
		}
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void boxes_app_setup_sources_data_free (gpointer _data) {
	BoxesAppSetupSourcesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAppSetupSourcesData, _data_);
}


static void boxes_app_setup_sources (BoxesApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesAppSetupSourcesData* _data_;
	BoxesApp* _tmp0_;
	_data_ = g_slice_new0 (BoxesAppSetupSourcesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_app_setup_sources);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_app_setup_sources_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	boxes_app_setup_sources_co (_data_);
}


static void boxes_app_setup_sources_finish (BoxesApp* self, GAsyncResult* _res_) {
	BoxesAppSetupSourcesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void boxes_app_setup_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesAppSetupSourcesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_app_setup_sources_co (_data_);
}


static gboolean __lambda148_ (BoxesApp* self, const gchar* filename, GError** error) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	BoxesCollectionSource* _tmp1_;
	BoxesCollectionSource* source;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (filename != NULL, FALSE);
	_tmp0_ = filename;
	_tmp1_ = boxes_collection_source_new_with_file (_tmp0_, &_inner_error_);
	source = _tmp1_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	boxes_app_add_collection_source (self, source, NULL, NULL);
	result = FALSE;
	_g_object_unref0 (source);
	return result;
}


static gboolean ___lambda148__boxes_foreach_filename_from_dir_func (const gchar* filename, gpointer self, GError** error) {
	gboolean result;
	result = __lambda148_ (self, filename, error);
	return result;
}


static gboolean boxes_app_setup_sources_co (BoxesAppSetupSourcesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = boxes_has_user_pkgconfig_sources ();
	if (!_data_->_tmp0_) {
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = boxes_get_pkgdata_source ("QEMU_Session");
		_data_->_tmp2_ = _data_->_tmp1_;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = g_file_new_for_path (_data_->_tmp2_);
		_data_->_tmp4_ = _data_->_tmp3_;
		_g_free0 (_data_->_tmp2_);
		_data_->src = _data_->_tmp4_;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = boxes_get_user_pkgconfig_source ("QEMU Session");
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = g_file_new_for_path (_data_->_tmp6_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_g_free0 (_data_->_tmp6_);
		_data_->dst = _data_->_tmp8_;
		{
			_data_->_tmp9_ = _data_->src;
			_data_->_tmp10_ = _data_->dst;
			_data_->_state_ = 1;
			g_file_copy_async (_data_->_tmp9_, _data_->_tmp10_, G_FILE_COPY_NONE, G_PRIORITY_DEFAULT, NULL, NULL, NULL, boxes_app_setup_sources_ready, _data_);
			return FALSE;
			_state_1:
			g_file_copy_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch3_g_error;
			}
		}
		goto __finally3;
		__catch3_g_error:
		{
			_data_->_error_ = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp11_ = _data_->_error_;
			_data_->_tmp12_ = _data_->_tmp11_->message;
			g_critical ("app.vala:314: Can't setup default sources: %s", _data_->_tmp12_);
			_g_error_free0 (_data_->_error_);
		}
		__finally3:
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->dst);
			_g_object_unref0 (_data_->src);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
		_g_object_unref0 (_data_->dst);
		_g_object_unref0 (_data_->src);
	}
	{
		_data_->_tmp13_ = boxes_collection_source_new_with_file ("QEMU Session", &_data_->_inner_error_);
		_data_->source = _data_->_tmp13_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		_data_->_state_ = 2;
		boxes_app_add_collection_source (_data_->self, _data_->source, boxes_app_setup_sources_ready, _data_);
		return FALSE;
		_state_2:
		boxes_app_add_collection_source_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->source);
	}
	goto __finally4;
	__catch4_g_error:
	{
		_data_->_vala1__error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp14_ = _data_->_vala1__error_;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_warning ("app.vala:322: %s", _data_->_tmp15_);
		_g_error_free0 (_data_->_vala1__error_);
	}
	__finally4:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp16_ = boxes_app_get_default_connection (_data_->self);
	_data_->_tmp17_ = _data_->_tmp16_;
	if (_data_->_tmp17_ == NULL) {
		g_printerr ("error: missing or failing default libvirt connection");
		_data_->_tmp18_ = _data_->self->priv->application;
		g_application_release ((GApplication*) _data_->_tmp18_);
	}
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = boxes_get_user_pkgconfig_source (NULL);
	_data_->_tmp20_ = _data_->_tmp19_;
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = g_file_new_for_path (_data_->_tmp20_);
	_data_->_tmp22_ = _data_->_tmp21_;
	_g_free0 (_data_->_tmp20_);
	_data_->dir = _data_->_tmp22_;
	_data_->_state_ = 3;
	boxes_foreach_filename_from_dir (_data_->dir, ___lambda148__boxes_foreach_filename_from_dir_func, _data_->self, boxes_app_setup_sources_ready, _data_);
	return FALSE;
	_state_3:
	boxes_foreach_filename_from_dir_finish (_data_->_res_);
	_g_object_unref0 (_data_->dir);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static GVariant* _variant_new1 (gint* value, gint value_length1) {
	gint* _tmp10_;
	GVariantBuilder _tmp11_;
	int _tmp12_;
	_tmp10_ = value;
	g_variant_builder_init (&_tmp11_, G_VARIANT_TYPE ("ai"));
	for (_tmp12_ = 0; _tmp12_ < value_length1; _tmp12_++) {
		g_variant_builder_add_value (&_tmp11_, g_variant_new_int32 (*_tmp10_));
		_tmp10_++;
	}
	return g_variant_ref_sink (g_variant_builder_end (&_tmp11_));
}


static GVariant* _variant_new2 (gint* value, gint value_length1) {
	gint* _tmp22_;
	GVariantBuilder _tmp23_;
	int _tmp24_;
	_tmp22_ = value;
	g_variant_builder_init (&_tmp23_, G_VARIANT_TYPE ("ai"));
	for (_tmp24_ = 0; _tmp24_ < value_length1; _tmp24_++) {
		g_variant_builder_add_value (&_tmp23_, g_variant_new_int32 (*_tmp22_));
		_tmp22_++;
	}
	return g_variant_ref_sink (g_variant_builder_end (&_tmp23_));
}


static void boxes_app_save_window_geometry (BoxesApp* self) {
	gint width = 0;
	gint height = 0;
	gint x = 0;
	gint y = 0;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GtkApplicationWindow* _tmp2_;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GSettings* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint* _tmp8_ = NULL;
	gint* _tmp9_;
	gint _tmp9__length1;
	GVariant* _tmp13_;
	GtkApplicationWindow* _tmp14_;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	GSettings* _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	gint* _tmp20_ = NULL;
	gint* _tmp21_;
	gint _tmp21__length1;
	GVariant* _tmp25_;
	g_return_if_fail (self != NULL);
	_tmp0_ = boxes_app_get_maximized (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->window;
	gtk_window_get_size ((GtkWindow*) _tmp2_, &_tmp3_, &_tmp4_);
	width = _tmp3_;
	height = _tmp4_;
	_tmp5_ = self->settings;
	_tmp6_ = width;
	_tmp7_ = height;
	_tmp8_ = g_new0 (gint, 2);
	_tmp8_[0] = _tmp6_;
	_tmp8_[1] = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp9__length1 = 2;
	_tmp13_ = _variant_new1 (_tmp9_, 2);
	g_settings_set_value (_tmp5_, "window-size", _tmp13_);
	_tmp9_ = (g_free (_tmp9_), NULL);
	_tmp14_ = self->window;
	gtk_window_get_position ((GtkWindow*) _tmp14_, &_tmp15_, &_tmp16_);
	x = _tmp15_;
	y = _tmp16_;
	_tmp17_ = self->settings;
	_tmp18_ = x;
	_tmp19_ = y;
	_tmp20_ = g_new0 (gint, 2);
	_tmp20_[0] = _tmp18_;
	_tmp20_[1] = _tmp19_;
	_tmp21_ = _tmp20_;
	_tmp21__length1 = 2;
	_tmp25_ = _variant_new2 (_tmp21_, 2);
	g_settings_set_value (_tmp17_, "window-position", _tmp25_);
	_tmp21_ = (g_free (_tmp21_), NULL);
}


static gint _variant_get3 (GVariant* value) {
	return g_variant_get_int32 (value);
}


static gint _variant_get4 (GVariant* value) {
	return g_variant_get_int32 (value);
}


static gint _variant_get5 (GVariant* value) {
	return g_variant_get_int32 (value);
}


static gint _variant_get6 (GVariant* value) {
	return g_variant_get_int32 (value);
}


static gboolean __lambda143_ (BoxesApp* self) {
	gboolean result = FALSE;
	self->priv->configure_id = (guint) 0;
	boxes_app_save_window_geometry (self);
	result = FALSE;
	return result;
}


static gboolean ___lambda143__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda143_ (self);
	return result;
}


static gboolean __lambda142_ (BoxesApp* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	guint _tmp2_;
	guint _tmp4_ = 0U;
	_tmp0_ = boxes_app_get_fullscreen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->priv->configure_id;
	if (_tmp2_ != ((guint) 0)) {
		guint _tmp3_;
		_tmp3_ = self->priv->configure_id;
		g_source_remove (_tmp3_);
	}
	_tmp4_ = g_timeout_add_full (G_PRIORITY_DEFAULT, BOXES_APP_configure_id_timeout, ___lambda143__gsource_func, g_object_ref (self), g_object_unref);
	self->priv->configure_id = _tmp4_;
	result = FALSE;
	return result;
}


static gboolean ___lambda142__gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
	gboolean result;
	result = __lambda142_ (self);
	return result;
}


static gboolean __lambda144_ (BoxesApp* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GSettings* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	_tmp0_ = boxes_app_get_fullscreen (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		result = FALSE;
		return result;
	}
	_tmp2_ = self->settings;
	_tmp3_ = boxes_app_get_maximized (self);
	_tmp4_ = _tmp3_;
	g_settings_set_boolean (_tmp2_, "window-maximized", _tmp4_);
	result = FALSE;
	return result;
}


static gboolean ___lambda144__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
	gboolean result;
	result = __lambda144_ (self);
	return result;
}


static gboolean __lambda145_ (BoxesApp* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	_tmp0_ = boxes_app_quit (self);
	result = _tmp0_;
	return result;
}


static gboolean ___lambda145__gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = __lambda145_ (self);
	return result;
}


static gboolean _boxes_app_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = boxes_app_on_key_pressed (self, _sender, event);
	return result;
}


static void boxes_app_setup_ui (BoxesApp* self) {
	GtkApplication* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	GtkApplicationWindow* _tmp2_;
	GtkApplicationWindow* _tmp3_;
	GSettings* _tmp4_;
	GVariant* _tmp5_ = NULL;
	GVariant* size;
	GVariant* _tmp6_;
	gsize _tmp7_ = 0UL;
	GSettings* _tmp21_;
	gboolean _tmp22_ = FALSE;
	GSettings* _tmp24_;
	GVariant* _tmp25_ = NULL;
	GVariant* position;
	GVariant* _tmp26_;
	gsize _tmp27_ = 0UL;
	GtkApplicationWindow* _tmp41_;
	GtkApplicationWindow* _tmp42_;
	GtkNotebook* _tmp43_;
	GtkNotebook* _tmp44_;
	GtkNotebook* _tmp45_;
	GtkApplicationWindow* _tmp46_;
	GtkNotebook* _tmp47_;
	GtkClutterEmbed* _tmp48_;
	GtkNotebook* _tmp49_;
	GtkClutterEmbed* _tmp50_;
	BoxesDisplayPage* _tmp51_;
	GtkNotebook* _tmp52_;
	BoxesDisplayPage* _tmp53_;
	GtkWidget* _tmp54_;
	GtkWidget* _tmp55_;
	GtkClutterEmbed* _tmp56_;
	ClutterActor* _tmp57_ = NULL;
	ClutterStage* _tmp58_;
	ClutterStage* _tmp59_;
	GdkRGBA _tmp60_ = {0};
	ClutterColor _tmp61_ = {0};
	GtkApplicationWindow* _tmp62_;
	GtkApplicationWindow* _tmp63_;
	ClutterBinLayout* _tmp64_;
	ClutterStage* _tmp65_;
	ClutterBinLayout* _tmp66_;
	ClutterStage* _tmp67_;
	GtkClutterTexture* _tmp68_;
	GtkClutterTexture* background;
	GtkClutterTexture* _tmp69_;
	GtkClutterTexture* _tmp76_;
	ClutterBinLayout* _tmp77_;
	GtkClutterTexture* _tmp78_;
	BoxesSidebar* _tmp79_;
	BoxesCollectionView* _tmp80_;
	BoxesSearchbar* _tmp81_;
	BoxesTopbar* _tmp82_;
	BoxesNotificationbar* _tmp83_;
	BoxesSelectionbar* _tmp84_;
	BoxesWizard* _tmp85_;
	BoxesProperties* _tmp86_;
	ClutterActor* _tmp87_;
	ClutterActor* vbox_actor;
	ClutterBoxLayout* _tmp88_;
	ClutterBoxLayout* vbox;
	ClutterBinLayout* _tmp89_;
	BoxesRevealer* _tmp90_;
	BoxesRevealer* topbar_revealer;
	BoxesTopbar* _tmp91_;
	ClutterActor* _tmp92_;
	ClutterActor* _tmp93_;
	BoxesRevealer* _tmp94_;
	BoxesRevealer* _tmp95_;
	BoxesRevealer* _tmp96_;
	BoxesRevealer* _tmp97_;
	BoxesRevealer* _tmp98_;
	BoxesRevealer* _tmp99_;
	BoxesSearchbar* _tmp100_;
	ClutterActor* _tmp101_;
	ClutterActor* _tmp102_;
	ClutterActor* _tmp103_;
	ClutterActor* below_bin_actor;
	ClutterBinLayout* _tmp104_;
	ClutterBinLayout* below_bin;
	BoxesCollectionView* _tmp105_;
	ClutterActor* _tmp106_;
	ClutterActor* _tmp107_;
	ClutterActor* _tmp108_;
	ClutterActor* hbox_actor;
	ClutterBoxLayout* _tmp109_;
	ClutterBoxLayout* hbox;
	ClutterActor* _tmp110_;
	ClutterActor* _tmp111_;
	ClutterBinLayout* _tmp112_;
	ClutterActor* _tmp113_;
	ClutterBinLayout* _tmp114_;
	ClutterActor* _tmp115_;
	BoxesRevealer* _tmp116_;
	BoxesRevealer* _tmp117_;
	BoxesRevealer* _tmp118_;
	BoxesRevealer* _tmp119_;
	BoxesRevealer* _tmp120_;
	BoxesSidebar* _tmp121_;
	ClutterActor* _tmp122_;
	ClutterActor* _tmp123_;
	ClutterActor* _tmp124_;
	ClutterActor* content_bin_actor;
	ClutterBinLayout* _tmp125_;
	ClutterBinLayout* content_bin;
	BoxesNotificationbar* _tmp126_;
	ClutterActor* _tmp127_;
	ClutterActor* _tmp128_;
	BoxesSelectionbar* _tmp129_;
	ClutterActor* _tmp130_;
	ClutterActor* _tmp131_;
	BoxesWizard* _tmp132_;
	ClutterActor* _tmp133_;
	ClutterActor* _tmp134_;
	BoxesProperties* _tmp135_;
	ClutterActor* _tmp136_;
	ClutterActor* _tmp137_;
	BoxesProperties* _tmp138_;
	ClutterActor* _tmp139_;
	ClutterActor* _tmp140_;
	BoxesSelectionbar* _tmp141_;
	ClutterActor* _tmp142_;
	ClutterActor* _tmp143_;
	GtkNotebook* _tmp144_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->application;
	_tmp1_ = (GtkApplicationWindow*) gtk_application_window_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->window);
	self->window = _tmp1_;
	_tmp2_ = self->window;
	gtk_application_window_set_show_menubar (_tmp2_, FALSE);
	_tmp3_ = self->window;
	gtk_window_set_hide_titlebar_when_maximized ((GtkWindow*) _tmp3_, TRUE);
	_tmp4_ = self->settings;
	_tmp5_ = g_settings_get_value (_tmp4_, "window-size");
	size = _tmp5_;
	_tmp6_ = size;
	_tmp7_ = g_variant_n_children (_tmp6_);
	if (_tmp7_ == ((gsize) 2)) {
		GVariant* _tmp8_;
		GVariant* _tmp9_ = NULL;
		GVariant* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gint width;
		GVariant* _tmp13_;
		GVariant* _tmp14_ = NULL;
		GVariant* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint height;
		GtkApplicationWindow* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		_tmp8_ = size;
		_tmp9_ = g_variant_get_child_value (_tmp8_, (gsize) 0);
		_tmp10_ = _tmp9_;
		_tmp11_ = _variant_get3 (_tmp10_);
		_tmp12_ = _tmp11_;
		_g_variant_unref0 (_tmp10_);
		width = _tmp12_;
		_tmp13_ = size;
		_tmp14_ = g_variant_get_child_value (_tmp13_, (gsize) 1);
		_tmp15_ = _tmp14_;
		_tmp16_ = _variant_get4 (_tmp15_);
		_tmp17_ = _tmp16_;
		_g_variant_unref0 (_tmp15_);
		height = _tmp17_;
		_tmp18_ = self->window;
		_tmp19_ = width;
		_tmp20_ = height;
		gtk_window_set_default_size ((GtkWindow*) _tmp18_, _tmp19_, _tmp20_);
	}
	_tmp21_ = self->settings;
	_tmp22_ = g_settings_get_boolean (_tmp21_, "window-maximized");
	if (_tmp22_) {
		GtkApplicationWindow* _tmp23_;
		_tmp23_ = self->window;
		gtk_window_maximize ((GtkWindow*) _tmp23_);
	}
	_tmp24_ = self->settings;
	_tmp25_ = g_settings_get_value (_tmp24_, "window-position");
	position = _tmp25_;
	_tmp26_ = position;
	_tmp27_ = g_variant_n_children (_tmp26_);
	if (_tmp27_ == ((gsize) 2)) {
		GVariant* _tmp28_;
		GVariant* _tmp29_ = NULL;
		GVariant* _tmp30_;
		gint _tmp31_;
		gint _tmp32_;
		gint x;
		GVariant* _tmp33_;
		GVariant* _tmp34_ = NULL;
		GVariant* _tmp35_;
		gint _tmp36_;
		gint _tmp37_;
		gint y;
		GtkApplicationWindow* _tmp38_;
		gint _tmp39_;
		gint _tmp40_;
		_tmp28_ = position;
		_tmp29_ = g_variant_get_child_value (_tmp28_, (gsize) 0);
		_tmp30_ = _tmp29_;
		_tmp31_ = _variant_get5 (_tmp30_);
		_tmp32_ = _tmp31_;
		_g_variant_unref0 (_tmp30_);
		x = _tmp32_;
		_tmp33_ = position;
		_tmp34_ = g_variant_get_child_value (_tmp33_, (gsize) 1);
		_tmp35_ = _tmp34_;
		_tmp36_ = _variant_get6 (_tmp35_);
		_tmp37_ = _tmp36_;
		_g_variant_unref0 (_tmp35_);
		y = _tmp37_;
		_tmp38_ = self->window;
		_tmp39_ = x;
		_tmp40_ = y;
		gtk_window_move ((GtkWindow*) _tmp38_, _tmp39_, _tmp40_);
	}
	_tmp41_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp41_, "configure-event", (GCallback) ___lambda142__gtk_widget_configure_event, self, 0);
	_tmp42_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp42_, "window-state-event", (GCallback) ___lambda144__gtk_widget_window_state_event, self, 0);
	_tmp43_ = (GtkNotebook*) gtk_notebook_new ();
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (self->notebook);
	self->notebook = _tmp43_;
	_tmp44_ = self->notebook;
	gtk_notebook_set_show_border (_tmp44_, FALSE);
	_tmp45_ = self->notebook;
	gtk_notebook_set_show_tabs (_tmp45_, FALSE);
	_tmp46_ = self->window;
	_tmp47_ = self->notebook;
	gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = (GtkClutterEmbed*) gtk_clutter_embed_new ();
	g_object_ref_sink (_tmp48_);
	_g_object_unref0 (self->embed);
	self->embed = _tmp48_;
	_tmp49_ = self->notebook;
	_tmp50_ = self->embed;
	gtk_notebook_append_page (_tmp49_, (GtkWidget*) _tmp50_, NULL);
	_tmp51_ = boxes_display_page_new ();
	_g_object_unref0 (self->display_page);
	self->display_page = _tmp51_;
	_tmp52_ = self->notebook;
	_tmp53_ = self->display_page;
	_tmp54_ = boxes_display_page_get_widget (_tmp53_);
	_tmp55_ = _tmp54_;
	gtk_notebook_append_page (_tmp52_, _tmp55_, NULL);
	_tmp56_ = self->embed;
	_tmp57_ = gtk_clutter_embed_get_stage (_tmp56_);
	_tmp58_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, clutter_stage_get_type ()) ? ((ClutterStage*) _tmp57_) : NULL);
	_g_object_unref0 (self->stage);
	self->stage = _tmp58_;
	_tmp59_ = self->stage;
	boxes_get_boxes_bg_color (&_tmp60_);
	boxes_gdk_rgba_to_clutter_color (&_tmp60_, &_tmp61_);
	clutter_actor_set_background_color ((ClutterActor*) _tmp59_, &_tmp61_);
	_tmp62_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp62_, "delete-event", (GCallback) ___lambda145__gtk_widget_delete_event, self, 0);
	_tmp63_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp63_, "key-press-event", (GCallback) _boxes_app_on_key_pressed_gtk_widget_key_press_event, self, 0);
	_tmp64_ = (ClutterBinLayout*) clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FIXED, CLUTTER_BIN_ALIGNMENT_FIXED);
	g_object_ref_sink (_tmp64_);
	_g_object_unref0 (self->stage_bin);
	self->stage_bin = _tmp64_;
	_tmp65_ = self->stage;
	_tmp66_ = self->stage_bin;
	clutter_actor_set_layout_manager ((ClutterActor*) _tmp65_, (ClutterLayoutManager*) _tmp66_);
	_tmp67_ = self->stage;
	clutter_actor_set_name ((ClutterActor*) _tmp67_, "boxes-stage");
	_tmp68_ = (GtkClutterTexture*) gtk_clutter_texture_new ();
	g_object_ref_sink (_tmp68_);
	background = _tmp68_;
	_tmp69_ = background;
	clutter_actor_set_name ((ClutterActor*) _tmp69_, "background");
	{
		gchar* _tmp70_ = NULL;
		gchar* _tmp71_;
		GdkPixbuf* _tmp72_;
		GdkPixbuf* _tmp73_;
		GdkPixbuf* pixbuf;
		GtkClutterTexture* _tmp74_;
		GdkPixbuf* _tmp75_;
		_tmp70_ = boxes_get_style ("assets/boxes-dark.png");
		_tmp71_ = _tmp70_;
		_tmp72_ = gdk_pixbuf_new_from_file (_tmp71_, &_inner_error_);
		_tmp73_ = _tmp72_;
		_g_free0 (_tmp71_);
		pixbuf = _tmp73_;
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
		_tmp74_ = background;
		_tmp75_ = pixbuf;
		gtk_clutter_texture_set_from_pixbuf (_tmp74_, _tmp75_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (pixbuf);
			goto __catch5_g_error;
		}
		_g_object_unref0 (pixbuf);
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (e);
	}
	__finally5:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (background);
		_g_variant_unref0 (position);
		_g_variant_unref0 (size);
		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);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp76_ = background;
	clutter_texture_set_repeat ((ClutterTexture*) _tmp76_, TRUE, TRUE);
	_tmp77_ = self->stage_bin;
	_tmp78_ = background;
	clutter_bin_layout_add (_tmp77_, (ClutterActor*) _tmp78_, CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp79_ = boxes_sidebar_new ();
	_g_object_unref0 (self->sidebar);
	self->sidebar = _tmp79_;
	_tmp80_ = boxes_collection_view_new ();
	_g_object_unref0 (self->view);
	self->view = _tmp80_;
	_tmp81_ = boxes_searchbar_new ();
	_g_object_unref0 (self->searchbar);
	self->searchbar = _tmp81_;
	_tmp82_ = boxes_topbar_new ();
	_g_object_unref0 (self->topbar);
	self->topbar = _tmp82_;
	_tmp83_ = boxes_notificationbar_new ();
	_g_object_unref0 (self->notificationbar);
	self->notificationbar = _tmp83_;
	_tmp84_ = boxes_selectionbar_new ();
	_g_object_unref0 (self->selectionbar);
	self->selectionbar = _tmp84_;
	_tmp85_ = boxes_wizard_new ();
	_g_object_unref0 (self->wizard);
	self->wizard = _tmp85_;
	_tmp86_ = boxes_properties_new ();
	_g_object_unref0 (self->properties);
	self->properties = _tmp86_;
	_tmp87_ = clutter_actor_new ();
	g_object_ref_sink (_tmp87_);
	vbox_actor = _tmp87_;
	clutter_actor_set_name (vbox_actor, "top-vbox");
	_tmp88_ = (ClutterBoxLayout*) clutter_box_layout_new ();
	g_object_ref_sink (_tmp88_);
	vbox = _tmp88_;
	clutter_actor_set_layout_manager (vbox_actor, (ClutterLayoutManager*) vbox);
	clutter_box_layout_set_vertical (vbox, TRUE);
	_tmp89_ = self->stage_bin;
	clutter_bin_layout_add (_tmp89_, vbox_actor, CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp90_ = boxes_revealer_new (TRUE);
	g_object_ref_sink (_tmp90_);
	topbar_revealer = _tmp90_;
	clutter_actor_set_name ((ClutterActor*) topbar_revealer, "topbar-revealer");
	clutter_box_layout_pack (vbox, (ClutterActor*) topbar_revealer, FALSE, TRUE, TRUE, CLUTTER_BOX_ALIGNMENT_START, CLUTTER_BOX_ALIGNMENT_START);
	_tmp91_ = self->topbar;
	_tmp92_ = boxes_ui_get_actor ((BoxesUI*) _tmp91_);
	_tmp93_ = _tmp92_;
	clutter_container_add ((ClutterContainer*) topbar_revealer, _tmp93_, NULL);
	_tmp94_ = boxes_revealer_new (TRUE);
	g_object_ref_sink (_tmp94_);
	_g_object_unref0 (self->searchbar_revealer);
	self->searchbar_revealer = _tmp94_;
	_tmp95_ = self->searchbar_revealer;
	_tmp95_->resize = TRUE;
	_tmp96_ = self->searchbar_revealer;
	boxes_revealer_unreveal (_tmp96_);
	_tmp97_ = self->searchbar_revealer;
	clutter_actor_set_name ((ClutterActor*) _tmp97_, "searchbar-revealer");
	_tmp98_ = self->searchbar_revealer;
	clutter_box_layout_pack (vbox, (ClutterActor*) _tmp98_, FALSE, TRUE, TRUE, CLUTTER_BOX_ALIGNMENT_START, CLUTTER_BOX_ALIGNMENT_START);
	_tmp99_ = self->searchbar_revealer;
	_tmp100_ = self->searchbar;
	_tmp101_ = boxes_ui_get_actor ((BoxesUI*) _tmp100_);
	_tmp102_ = _tmp101_;
	clutter_container_add ((ClutterContainer*) _tmp99_, _tmp102_, NULL);
	_tmp103_ = clutter_actor_new ();
	g_object_ref_sink (_tmp103_);
	below_bin_actor = _tmp103_;
	clutter_actor_set_name (below_bin_actor, "below-bin");
	_tmp104_ = (ClutterBinLayout*) clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FIXED, CLUTTER_BIN_ALIGNMENT_FIXED);
	g_object_ref_sink (_tmp104_);
	below_bin = _tmp104_;
	clutter_actor_set_layout_manager (below_bin_actor, (ClutterLayoutManager*) below_bin);
	clutter_box_layout_pack (vbox, below_bin_actor, TRUE, TRUE, TRUE, CLUTTER_BOX_ALIGNMENT_START, CLUTTER_BOX_ALIGNMENT_START);
	_tmp105_ = self->view;
	_tmp106_ = boxes_ui_get_actor ((BoxesUI*) _tmp105_);
	_tmp107_ = _tmp106_;
	clutter_bin_layout_add (below_bin, _tmp107_, CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp108_ = clutter_actor_new ();
	g_object_ref_sink (_tmp108_);
	hbox_actor = _tmp108_;
	clutter_actor_set_name (hbox_actor, "top-hbox");
	_tmp109_ = (ClutterBoxLayout*) clutter_box_layout_new ();
	g_object_ref_sink (_tmp109_);
	hbox = _tmp109_;
	clutter_actor_set_layout_manager (hbox_actor, (ClutterLayoutManager*) hbox);
	clutter_bin_layout_add (below_bin, hbox_actor, CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp110_ = clutter_actor_new ();
	g_object_ref_sink (_tmp110_);
	_g_object_unref0 (self->overlay_bin_actor);
	self->overlay_bin_actor = _tmp110_;
	_tmp111_ = self->overlay_bin_actor;
	clutter_actor_set_name (_tmp111_, "overlay-bin");
	_tmp112_ = (ClutterBinLayout*) clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FIXED, CLUTTER_BIN_ALIGNMENT_FIXED);
	g_object_ref_sink (_tmp112_);
	_g_object_unref0 (self->overlay_bin);
	self->overlay_bin = _tmp112_;
	_tmp113_ = self->overlay_bin_actor;
	_tmp114_ = self->overlay_bin;
	clutter_actor_set_layout_manager (_tmp113_, (ClutterLayoutManager*) _tmp114_);
	_tmp115_ = self->overlay_bin_actor;
	clutter_bin_layout_add (below_bin, _tmp115_, CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	_tmp116_ = boxes_revealer_new (FALSE);
	g_object_ref_sink (_tmp116_);
	_g_object_unref0 (self->sidebar_revealer);
	self->sidebar_revealer = _tmp116_;
	_tmp117_ = self->sidebar_revealer;
	clutter_actor_set_name ((ClutterActor*) _tmp117_, "sidebar-revealer");
	_tmp118_ = self->sidebar_revealer;
	clutter_box_layout_pack (hbox, (ClutterActor*) _tmp118_, FALSE, TRUE, TRUE, CLUTTER_BOX_ALIGNMENT_START, CLUTTER_BOX_ALIGNMENT_START);
	_tmp119_ = self->sidebar_revealer;
	boxes_revealer_unreveal (_tmp119_);
	_tmp120_ = self->sidebar_revealer;
	_tmp121_ = self->sidebar;
	_tmp122_ = boxes_ui_get_actor ((BoxesUI*) _tmp121_);
	_tmp123_ = _tmp122_;
	clutter_container_add ((ClutterContainer*) _tmp120_, _tmp123_, NULL);
	_tmp124_ = clutter_actor_new ();
	g_object_ref_sink (_tmp124_);
	content_bin_actor = _tmp124_;
	clutter_actor_set_name (content_bin_actor, "content-bin");
	_tmp125_ = (ClutterBinLayout*) clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL, CLUTTER_BIN_ALIGNMENT_FILL);
	g_object_ref_sink (_tmp125_);
	content_bin = _tmp125_;
	clutter_actor_set_layout_manager (content_bin_actor, (ClutterLayoutManager*) content_bin);
	clutter_box_layout_pack (hbox, content_bin_actor, TRUE, TRUE, TRUE, CLUTTER_BOX_ALIGNMENT_START, CLUTTER_BOX_ALIGNMENT_START);
	_tmp126_ = self->notificationbar;
	_tmp127_ = boxes_notificationbar_get_actor (_tmp126_);
	_tmp128_ = _tmp127_;
	clutter_bin_layout_add (below_bin, _tmp128_, CLUTTER_BIN_ALIGNMENT_CENTER, CLUTTER_BIN_ALIGNMENT_START);
	_tmp129_ = self->selectionbar;
	_tmp130_ = boxes_selectionbar_get_actor (_tmp129_);
	_tmp131_ = _tmp130_;
	clutter_bin_layout_add (content_bin, _tmp131_, CLUTTER_BIN_ALIGNMENT_CENTER, CLUTTER_BIN_ALIGNMENT_END);
	_tmp132_ = self->wizard;
	_tmp133_ = boxes_ui_get_actor ((BoxesUI*) _tmp132_);
	_tmp134_ = _tmp133_;
	clutter_container_add ((ClutterContainer*) content_bin_actor, _tmp134_, NULL);
	_tmp135_ = self->properties;
	_tmp136_ = boxes_ui_get_actor ((BoxesUI*) _tmp135_);
	_tmp137_ = _tmp136_;
	clutter_container_add ((ClutterContainer*) content_bin_actor, _tmp137_, NULL);
	_tmp138_ = self->properties;
	_tmp139_ = boxes_ui_get_actor ((BoxesUI*) _tmp138_);
	_tmp140_ = _tmp139_;
	clutter_actor_hide (_tmp140_);
	_tmp141_ = self->selectionbar;
	_tmp142_ = boxes_selectionbar_get_actor (_tmp141_);
	_tmp143_ = _tmp142_;
	clutter_actor_hide (_tmp143_);
	_tmp144_ = self->notebook;
	gtk_widget_show_all ((GtkWidget*) _tmp144_);
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_COLLECTION);
	_g_object_unref0 (content_bin);
	_g_object_unref0 (content_bin_actor);
	_g_object_unref0 (hbox);
	_g_object_unref0 (hbox_actor);
	_g_object_unref0 (below_bin);
	_g_object_unref0 (below_bin_actor);
	_g_object_unref0 (topbar_revealer);
	_g_object_unref0 (vbox);
	_g_object_unref0 (vbox_actor);
	_g_object_unref0 (background);
	_g_variant_unref0 (position);
	_g_variant_unref0 (size);
}


static void boxes_app_set_main_ui_state (BoxesApp* self) {
	GtkNotebook* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->notebook;
	g_object_set (_tmp0_, "page", (gint) BOXES_APP_PAGE_MAIN, NULL);
}


static void boxes_app_real_ui_state_changed (BoxesUI* base) {
	BoxesApp * self;
	GSimpleAction* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	GSimpleAction* _tmp3_;
	BoxesUIState _tmp4_;
	BoxesUIState _tmp5_;
	gboolean _tmp6_ = FALSE;
	BoxesUIState _tmp7_;
	BoxesUIState _tmp8_;
	GSimpleAction* _tmp10_;
	gboolean _tmp11_;
	BoxesSidebar* _tmp12_;
	BoxesUI* _tmp13_;
	BoxesSearchbar* _tmp14_;
	BoxesUI* _tmp15_;
	BoxesTopbar* _tmp16_;
	BoxesUI* _tmp17_;
	BoxesCollectionView* _tmp18_;
	BoxesUI* _tmp19_;
	BoxesProperties* _tmp20_;
	BoxesUI* _tmp21_;
	BoxesWizard* _tmp22_;
	BoxesUI* _tmp23_;
	BoxesUI** _tmp24_ = NULL;
	BoxesUIState _tmp29_;
	BoxesUIState _tmp30_;
	self = (BoxesApp*) base;
	_tmp0_ = self->action_fullscreen;
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp2_ = _tmp1_;
	g_simple_action_set_enabled (_tmp0_, _tmp2_ == BOXES_UI_STATE_DISPLAY);
	_tmp3_ = self->action_properties;
	_tmp4_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp5_ = _tmp4_;
	g_simple_action_set_enabled (_tmp3_, _tmp5_ == BOXES_UI_STATE_DISPLAY);
	_tmp7_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp8_ = _tmp7_;
	if (_tmp8_ == BOXES_UI_STATE_DISPLAY) {
		BoxesCollectionItem* _tmp9_;
		_tmp9_ = self->current_item;
		_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, BOXES_TYPE_LIBVIRT_MACHINE);
	} else {
		_tmp6_ = FALSE;
	}
	_tmp10_ = self->action_shutdown;
	_tmp11_ = _tmp6_;
	g_simple_action_set_enabled (_tmp10_, _tmp11_);
	_tmp12_ = self->sidebar;
	_tmp13_ = _g_object_ref0 ((BoxesUI*) _tmp12_);
	_tmp14_ = self->searchbar;
	_tmp15_ = _g_object_ref0 ((BoxesUI*) _tmp14_);
	_tmp16_ = self->topbar;
	_tmp17_ = _g_object_ref0 ((BoxesUI*) _tmp16_);
	_tmp18_ = self->view;
	_tmp19_ = _g_object_ref0 ((BoxesUI*) _tmp18_);
	_tmp20_ = self->properties;
	_tmp21_ = _g_object_ref0 ((BoxesUI*) _tmp20_);
	_tmp22_ = self->wizard;
	_tmp23_ = _g_object_ref0 ((BoxesUI*) _tmp22_);
	_tmp24_ = g_new0 (BoxesUI*, 6 + 1);
	_tmp24_[0] = _tmp13_;
	_tmp24_[1] = _tmp15_;
	_tmp24_[2] = _tmp17_;
	_tmp24_[3] = _tmp19_;
	_tmp24_[4] = _tmp21_;
	_tmp24_[5] = _tmp23_;
	{
		BoxesUI** ui_collection = NULL;
		gint ui_collection_length1 = 0;
		gint _ui_collection_size_ = 0;
		gint ui_it = 0;
		ui_collection = _tmp24_;
		ui_collection_length1 = 6;
		for (ui_it = 0; ui_it < 6; ui_it = ui_it + 1) {
			BoxesUI* _tmp25_;
			BoxesUI* ui = NULL;
			_tmp25_ = _g_object_ref0 (ui_collection[ui_it]);
			ui = _tmp25_;
			{
				BoxesUI* _tmp26_;
				BoxesUIState _tmp27_;
				BoxesUIState _tmp28_;
				_tmp26_ = ui;
				_tmp27_ = boxes_ui_get_ui_state ((BoxesUI*) self);
				_tmp28_ = _tmp27_;
				boxes_ui_set_ui_state (_tmp26_, _tmp28_);
				_g_object_unref0 (ui);
			}
		}
		ui_collection = (_vala_array_free (ui_collection, ui_collection_length1, (GDestroyNotify) g_object_unref), NULL);
	}
	_tmp29_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp30_ = _tmp29_;
	switch (_tmp30_) {
		case BOXES_UI_STATE_COLLECTION:
		{
			BoxesCollectionItem* _tmp31_;
			BoxesCollectionView* _tmp38_;
			BoxesRevealer* _tmp39_;
			BoxesSearchbar* _tmp40_;
			gboolean _tmp41_;
			gboolean _tmp42_;
			boxes_app_set_main_ui_state (self);
			_tmp31_ = self->current_item;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, BOXES_TYPE_MACHINE)) {
				BoxesCollectionItem* _tmp32_;
				BoxesMachine* _tmp33_;
				BoxesMachine* machine;
				gulong _tmp34_;
				BoxesMachine* _tmp37_;
				_tmp32_ = self->current_item;
				_tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp32_) : NULL);
				machine = _tmp33_;
				_tmp34_ = self->priv->status_id;
				if (_tmp34_ != ((gulong) 0)) {
					BoxesMachine* _tmp35_;
					gulong _tmp36_;
					_tmp35_ = machine;
					_tmp36_ = self->priv->status_id;
					g_signal_handler_disconnect ((GObject*) _tmp35_, _tmp36_);
					self->priv->status_id = (gulong) 0;
				}
				_tmp37_ = machine;
				boxes_machine_disconnect_display (_tmp37_);
				_g_object_unref0 (machine);
			}
			boxes_app_set_fullscreen (self, FALSE);
			_tmp38_ = self->view;
			boxes_collection_view_set_visible (_tmp38_, TRUE);
			_tmp39_ = self->searchbar_revealer;
			_tmp40_ = self->searchbar;
			_tmp41_ = boxes_searchbar_get_visible (_tmp40_);
			_tmp42_ = _tmp41_;
			boxes_revealer_set_revealed (_tmp39_, _tmp42_);
			break;
		}
		case BOXES_UI_STATE_CREDS:
		case BOXES_UI_STATE_PROPERTIES:
		case BOXES_UI_STATE_WIZARD:
		{
			BoxesRevealer* _tmp43_;
			_tmp43_ = self->searchbar_revealer;
			boxes_revealer_set_revealed (_tmp43_, FALSE);
			boxes_app_set_main_ui_state (self);
			break;
		}
		case BOXES_UI_STATE_DISPLAY:
		{
			break;
		}
		default:
		{
			BoxesUIState _tmp44_;
			BoxesUIState _tmp45_;
			GEnumValue* _tmp46_;
			gchar* _tmp47_ = NULL;
			gchar* _tmp48_;
			_tmp44_ = boxes_ui_get_ui_state ((BoxesUI*) self);
			_tmp45_ = _tmp44_;
			_tmp46_ = g_enum_get_value (g_type_class_ref (BOXES_TYPE_UI_STATE), _tmp45_);
			_tmp47_ = g_strdup_printf ("Unhandled UI state %s", (_tmp46_ != NULL) ? _tmp46_->value_name : NULL);
			_tmp48_ = _tmp47_;
			g_warning ("app.vala:564: %s", _tmp48_);
			_g_free0 (_tmp48_);
			break;
		}
	}
}


gboolean boxes_app_quit (BoxesApp* self) {
	gboolean result = FALSE;
	BoxesNotificationbar* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	BoxesCollection* _tmp2_;
	GPtrArray* _tmp3_;
	gpointer* _tmp4_;
	gint _tmp4__length1;
	BoxesWizard* _tmp14_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->notificationbar;
	boxes_notificationbar_cancel (_tmp0_);
	boxes_app_save_window_geometry (self);
	_tmp1_ = self->window;
	gtk_widget_destroy ((GtkWidget*) _tmp1_);
	_tmp2_ = self->collection;
	_tmp3_ = _tmp2_->items;
	_tmp4_ = _tmp3_->pdata;
	_tmp4__length1 = (gint) _tmp3_->len;
	{
		BoxesCollectionItem** item_collection = NULL;
		gint item_collection_length1 = 0;
		gint _item_collection_size_ = 0;
		gint item_it = 0;
		item_collection = _tmp4_;
		item_collection_length1 = _tmp4__length1;
		for (item_it = 0; item_it < _tmp4__length1; item_it = item_it + 1) {
			BoxesCollectionItem* _tmp5_;
			BoxesCollectionItem* item = NULL;
			_tmp5_ = _g_object_ref0 (item_collection[item_it]);
			item = _tmp5_;
			{
				BoxesCollectionItem* _tmp6_;
				_tmp6_ = item;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, BOXES_TYPE_LIBVIRT_MACHINE)) {
					BoxesCollectionItem* _tmp7_;
					BoxesLibvirtMachine* _tmp8_;
					BoxesLibvirtMachine* machine;
					BoxesLibvirtMachine* _tmp9_;
					GVirConnection* _tmp10_;
					GVirConnection* _tmp11_;
					GVirConnection* _tmp12_;
					_tmp7_ = item;
					_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, BOXES_TYPE_LIBVIRT_MACHINE) ? ((BoxesLibvirtMachine*) _tmp7_) : NULL);
					machine = _tmp8_;
					_tmp9_ = machine;
					_tmp10_ = _tmp9_->connection;
					_tmp11_ = boxes_app_get_default_connection (self);
					_tmp12_ = _tmp11_;
					if (_tmp10_ == _tmp12_) {
						BoxesLibvirtMachine* _tmp13_;
						_tmp13_ = machine;
						boxes_libvirt_machine_suspend (_tmp13_, NULL, NULL);
					}
					_g_object_unref0 (machine);
				}
				_g_object_unref0 (item);
			}
		}
	}
	_tmp14_ = self->wizard;
	boxes_wizard_cleanup (_tmp14_);
	result = FALSE;
	return result;
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		BoxesApp * self;
		self = _data2_->self;
		__g_list_free__g_object_unref0_0 (_data2_->selected_items);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static void __lambda111_ (Block2Data* _data2_) {
	BoxesApp * self;
	GList* _tmp0_;
	self = _data2_->self;
	g_debug ("app.vala:614: Box deletion cancelled by user, re-adding to view");
	_tmp0_ = _data2_->selected_items;
	{
		GList* selected_collection = NULL;
		GList* selected_it = NULL;
		selected_collection = _tmp0_;
		for (selected_it = selected_collection; selected_it != NULL; selected_it = selected_it->next) {
			BoxesCollectionItem* _tmp1_;
			BoxesCollectionItem* selected = NULL;
			_tmp1_ = _g_object_ref0 ((BoxesCollectionItem*) selected_it->data);
			selected = _tmp1_;
			{
				BoxesCollection* _tmp2_;
				BoxesCollectionItem* _tmp3_;
				_tmp2_ = self->collection;
				_tmp3_ = selected;
				boxes_collection_add_item (_tmp2_, _tmp3_);
				_g_object_unref0 (selected);
			}
		}
	}
}


static void ___lambda111__boxes_notificationbar_ok_func (gpointer self) {
	__lambda111_ (self);
}


static void __lambda112_ (Block2Data* _data2_) {
	BoxesApp * self;
	GList* _tmp0_;
	self = _data2_->self;
	g_debug ("app.vala:621: Box deletion, deleting now");
	_tmp0_ = _data2_->selected_items;
	{
		GList* selected_collection = NULL;
		GList* selected_it = NULL;
		selected_collection = _tmp0_;
		for (selected_it = selected_collection; selected_it != NULL; selected_it = selected_it->next) {
			BoxesCollectionItem* _tmp1_;
			BoxesCollectionItem* selected = NULL;
			_tmp1_ = _g_object_ref0 ((BoxesCollectionItem*) selected_it->data);
			selected = _tmp1_;
			{
				BoxesCollectionItem* _tmp2_;
				BoxesMachine* _tmp3_;
				BoxesMachine* machine;
				BoxesMachine* _tmp4_;
				_tmp2_ = selected;
				_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
				machine = _tmp3_;
				_tmp4_ = machine;
				if (_tmp4_ != NULL) {
					BoxesMachine* _tmp5_;
					_tmp5_ = machine;
					boxes_machine_delete (_tmp5_, TRUE);
				}
				_g_object_unref0 (machine);
				_g_object_unref0 (selected);
			}
		}
	}
}


static void ___lambda112__boxes_notificationbar_cancel_func (gpointer self) {
	__lambda112_ (self);
}


void boxes_app_remove_selected_items (BoxesApp* self) {
	Block2Data* _data2_;
	BoxesCollectionView* _tmp0_;
	GList* _tmp1_ = NULL;
	GList* _tmp2_;
	guint _tmp3_ = 0U;
	guint num_selected;
	guint _tmp4_;
	gchar* _tmp5_ = NULL;
	guint _tmp6_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* message;
	GList* _tmp19_;
	BoxesNotificationbarOKFunc undo;
	void* undo_target;
	GDestroyNotify undo_target_destroy_notify;
	BoxesNotificationbarCancelFunc really_remove;
	void* really_remove_target;
	GDestroyNotify really_remove_target_destroy_notify;
	BoxesNotificationbar* _tmp23_;
	const gchar* _tmp24_;
	BoxesNotificationbarOKFunc _tmp25_;
	void* _tmp25__target;
	GDestroyNotify _tmp25__target_destroy_notify;
	BoxesNotificationbarCancelFunc _tmp26_;
	void* _tmp26__target;
	GDestroyNotify _tmp26__target_destroy_notify;
	g_return_if_fail (self != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = self->view;
	_tmp1_ = boxes_collection_view_get_selected_items (_tmp0_);
	_data2_->selected_items = _tmp1_;
	_tmp2_ = _data2_->selected_items;
	_tmp3_ = g_list_length (_tmp2_);
	num_selected = _tmp3_;
	_tmp4_ = num_selected;
	if (_tmp4_ == ((guint) 0)) {
		block2_data_unref (_data2_);
		_data2_ = NULL;
		return;
	}
	_tmp6_ = num_selected;
	if (_tmp6_ == ((guint) 1)) {
		const gchar* _tmp7_ = NULL;
		GList* _tmp8_;
		gconstpointer _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_ = NULL;
		_tmp7_ = _ ("Box '%s' has been deleted");
		_tmp8_ = _data2_->selected_items;
		_tmp9_ = _tmp8_->data;
		_tmp10_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = g_strdup_printf (_tmp7_, _tmp11_);
		_g_free0 (_tmp5_);
		_tmp5_ = _tmp12_;
	} else {
		guint _tmp13_;
		const gchar* _tmp14_ = NULL;
		guint _tmp15_;
		gchar* _tmp16_ = NULL;
		_tmp13_ = num_selected;
		_tmp14_ = ngettext ("%u box has been deleted", "%u boxes have been deleted", (gulong) _tmp13_);
		_tmp15_ = num_selected;
		_tmp16_ = g_strdup_printf (_tmp14_, _tmp15_);
		_g_free0 (_tmp5_);
		_tmp5_ = _tmp16_;
	}
	_tmp17_ = _tmp5_;
	_tmp18_ = g_strdup (_tmp17_);
	message = _tmp18_;
	_tmp19_ = _data2_->selected_items;
	{
		GList* item_collection = NULL;
		GList* item_it = NULL;
		item_collection = _tmp19_;
		for (item_it = item_collection; item_it != NULL; item_it = item_it->next) {
			BoxesCollectionItem* _tmp20_;
			BoxesCollectionItem* item = NULL;
			_tmp20_ = _g_object_ref0 ((BoxesCollectionItem*) item_it->data);
			item = _tmp20_;
			{
				BoxesCollection* _tmp21_;
				BoxesCollectionItem* _tmp22_;
				_tmp21_ = self->collection;
				_tmp22_ = item;
				boxes_collection_remove_item (_tmp21_, _tmp22_);
				_g_object_unref0 (item);
			}
		}
	}
	undo = ___lambda111__boxes_notificationbar_ok_func;
	undo_target = block2_data_ref (_data2_);
	undo_target_destroy_notify = block2_data_unref;
	really_remove = ___lambda112__boxes_notificationbar_cancel_func;
	really_remove_target = block2_data_ref (_data2_);
	really_remove_target_destroy_notify = block2_data_unref;
	_tmp23_ = self->notificationbar;
	_tmp24_ = message;
	_tmp25_ = undo;
	_tmp25__target = undo_target;
	_tmp25__target_destroy_notify = undo_target_destroy_notify;
	undo_target_destroy_notify = NULL;
	_tmp26_ = really_remove;
	_tmp26__target = really_remove_target;
	_tmp26__target_destroy_notify = really_remove_target_destroy_notify;
	really_remove_target_destroy_notify = NULL;
	boxes_notificationbar_display_for_action (_tmp23_, _tmp24_, GTK_STOCK_UNDO, _tmp25_, _tmp25__target, _tmp25__target_destroy_notify, _tmp26_, _tmp26__target, _tmp26__target_destroy_notify);
	(really_remove_target_destroy_notify == NULL) ? NULL : (really_remove_target_destroy_notify (really_remove_target), NULL);
	really_remove = NULL;
	really_remove_target = NULL;
	really_remove_target_destroy_notify = NULL;
	(undo_target_destroy_notify == NULL) ? NULL : (undo_target_destroy_notify (undo_target), NULL);
	undo = NULL;
	undo_target = NULL;
	undo_target_destroy_notify = NULL;
	_g_free0 (message);
	_g_free0 (_tmp5_);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}


static gboolean boxes_app_on_key_pressed (BoxesApp* self, GtkWidget* widget, GdkEventKey* event) {
	gboolean result = FALSE;
	GdkEventKey _tmp0_;
	guint _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.keyval;
	if (_tmp1_ == ((guint) GDK_KEY_F11)) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = boxes_app_get_fullscreen (self);
		_tmp3_ = _tmp2_;
		boxes_app_set_fullscreen (self, !_tmp3_);
		result = TRUE;
		return result;
	} else {
		GdkEventKey _tmp4_;
		guint _tmp5_;
		_tmp4_ = *event;
		_tmp5_ = _tmp4_.keyval;
		if (_tmp5_ == ((guint) GDK_KEY_Escape)) {
			gboolean _tmp6_ = FALSE;
			gboolean _tmp7_;
			gboolean _tmp8_;
			gboolean _tmp11_;
			_tmp7_ = boxes_app_get_selection_mode (self);
			_tmp8_ = _tmp7_;
			if (_tmp8_) {
				BoxesUIState _tmp9_;
				BoxesUIState _tmp10_;
				_tmp9_ = boxes_ui_get_ui_state ((BoxesUI*) self);
				_tmp10_ = _tmp9_;
				_tmp6_ = _tmp10_ == BOXES_UI_STATE_COLLECTION;
			} else {
				_tmp6_ = FALSE;
			}
			_tmp11_ = _tmp6_;
			if (_tmp11_) {
				boxes_app_set_selection_mode (self, FALSE);
			}
		}
	}
	result = FALSE;
	return result;
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		BoxesApp * self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->machine);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void ____lambda98_ (Block3Data* _data3_) {
	BoxesApp * self;
	BoxesTopbar* _tmp0_;
	BoxesMachine* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	self = _data3_->self;
	_tmp0_ = self->topbar;
	_tmp1_ = _data3_->machine;
	_tmp2_ = boxes_machine_get_status (_tmp1_);
	_tmp3_ = _tmp2_;
	boxes_topbar_set_status (_tmp0_, _tmp3_);
}


static void _____lambda98__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	____lambda98_ (self);
}


void boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item) {
	gboolean _tmp0_ = FALSE;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == BOXES_UI_STATE_COLLECTION) {
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = boxes_app_get_selection_mode (self);
		_tmp4_ = _tmp3_;
		_tmp0_ = !_tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp5_ = _tmp0_;
	if (_tmp5_) {
		BoxesCollectionItem* _tmp6_;
		BoxesCollectionItem* _tmp7_;
		BoxesCollectionItem* _tmp8_;
		BoxesCollectionItem* _tmp14_;
		_tmp6_ = item;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (self->current_item);
		self->current_item = _tmp7_;
		_tmp8_ = self->current_item;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, BOXES_TYPE_MACHINE)) {
			Block3Data* _data3_;
			BoxesCollectionItem* _tmp9_;
			BoxesMachine* _tmp10_;
			BoxesMachine* _tmp11_;
			gulong _tmp12_ = 0UL;
			BoxesMachine* _tmp13_;
			_data3_ = g_slice_new0 (Block3Data);
			_data3_->_ref_count_ = 1;
			_data3_->self = g_object_ref (self);
			_tmp9_ = self->current_item;
			_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp9_) : NULL);
			_data3_->machine = _tmp10_;
			_tmp11_ = _data3_->machine;
			_tmp12_ = g_signal_connect_data ((GObject*) _tmp11_, "notify::status", (GCallback) _____lambda98__g_object_notify, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
			self->priv->status_id = _tmp12_;
			_tmp13_ = _data3_->machine;
			boxes_machine_connect_display (_tmp13_, NULL, NULL);
			boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_CREDS);
			block3_data_unref (_data3_);
			_data3_ = NULL;
		} else {
			g_warning ("app.vala:658: unknown item, fix your code");
		}
		_tmp14_ = item;
		g_signal_emit_by_name (self, "item-selected", _tmp14_);
	} else {
		BoxesUIState _tmp15_;
		BoxesUIState _tmp16_;
		_tmp15_ = boxes_ui_get_ui_state ((BoxesUI*) self);
		_tmp16_ = _tmp15_;
		if (_tmp16_ == BOXES_UI_STATE_WIZARD) {
			BoxesCollectionItem* _tmp17_;
			BoxesCollectionItem* _tmp18_;
			_tmp17_ = item;
			_tmp18_ = _g_object_ref0 (_tmp17_);
			_g_object_unref0 (self->current_item);
			self->current_item = _tmp18_;
			boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_PROPERTIES);
		}
	}
}


static ClutterActor* boxes_app_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesApp* self;
	ClutterStage* _tmp0_;
	self = (BoxesApp*) base;
	_tmp0_ = self->stage;
	result = (ClutterActor*) _tmp0_;
	return result;
}


gboolean boxes_app_get_fullscreen (BoxesApp* self) {
	gboolean result;
	GtkApplicationWindow* _tmp0_;
	GdkWindow* _tmp1_ = NULL;
	GdkWindowState _tmp2_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->window;
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) _tmp0_);
	_tmp2_ = gdk_window_get_state (_tmp1_);
	result = (_tmp2_ & GDK_WINDOW_STATE_FULLSCREEN) == GDK_WINDOW_STATE_FULLSCREEN;
	return result;
}


void boxes_app_set_fullscreen (BoxesApp* self, gboolean value) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	if (_tmp0_) {
		GtkApplicationWindow* _tmp1_;
		_tmp1_ = self->window;
		gtk_window_fullscreen ((GtkWindow*) _tmp1_);
	} else {
		GtkApplicationWindow* _tmp2_;
		_tmp2_ = self->window;
		gtk_window_unfullscreen ((GtkWindow*) _tmp2_);
	}
	g_object_notify ((GObject *) self, "fullscreen");
}


static gboolean boxes_app_get_maximized (BoxesApp* self) {
	gboolean result;
	GtkApplicationWindow* _tmp0_;
	GdkWindow* _tmp1_ = NULL;
	GdkWindowState _tmp2_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->window;
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) _tmp0_);
	_tmp2_ = gdk_window_get_state (_tmp1_);
	result = (_tmp2_ & GDK_WINDOW_STATE_MAXIMIZED) == GDK_WINDOW_STATE_MAXIMIZED;
	return result;
}


const gchar* boxes_app_get_uri (BoxesApp* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uri;
	result = _tmp0_;
	return result;
}


void boxes_app_set_uri (BoxesApp* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_uri);
	self->priv->_uri = _tmp1_;
	g_object_notify ((GObject *) self, "uri");
}


GVirConnection* boxes_app_get_default_connection (BoxesApp* self) {
	GVirConnection* result;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->connections;
	_tmp1_ = g_hash_table_lookup (_tmp0_, "QEMU Session");
	result = (GVirConnection*) _tmp1_;
	return result;
}


BoxesCollectionSource* boxes_app_get_default_source (BoxesApp* self) {
	BoxesCollectionSource* result;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->sources;
	_tmp1_ = g_hash_table_lookup (_tmp0_, "QEMU Session");
	result = (BoxesCollectionSource*) _tmp1_;
	return result;
}


gboolean boxes_app_get_selection_mode (BoxesApp* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_selection_mode;
	result = _tmp0_;
	return result;
}


void boxes_app_set_selection_mode (BoxesApp* self, gboolean value) {
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp1_ = _tmp0_;
	g_return_if_fail (_tmp1_ == BOXES_UI_STATE_COLLECTION);
	_tmp2_ = value;
	self->priv->_selection_mode = _tmp2_;
	g_object_notify ((GObject *) self, "selection-mode");
}


GList* boxes_app_get_selected_items (BoxesApp* self) {
	GList* result;
	BoxesCollectionView* _tmp0_;
	GList* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->view;
	_tmp1_ = boxes_collection_view_get_selected_items (_tmp0_);
	result = _tmp1_;
	return result;
}


static void boxes_app_class_init (BoxesAppClass * klass) {
	boxes_app_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesAppPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_app_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_app_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_app_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_app_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_app_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_ACTOR, g_param_spec_object ("actor", "actor", "actor", clutter_actor_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_FULLSCREEN, g_param_spec_boolean ("fullscreen", "fullscreen", "fullscreen", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_DEFAULT_CONNECTION, g_param_spec_object ("default-connection", "default-connection", "default-connection", gvir_connection_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_DEFAULT_SOURCE, g_param_spec_object ("default-source", "default-source", "default-source", BOXES_TYPE_COLLECTION_SOURCE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_SELECTION_MODE, g_param_spec_boolean ("selection-mode", "selection-mode", "selection-mode", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_APP_SELECTED_ITEMS, g_param_spec_pointer ("selected-items", "selected-items", "selected-items", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_signal_new ("ready", BOXES_TYPE_APP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	g_signal_new ("item_selected", BOXES_TYPE_APP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, BOXES_TYPE_COLLECTION_ITEM);
}


static void boxes_app_instance_init (BoxesApp * self) {
	self->priv = BOXES_APP_GET_PRIVATE (self);
}


static void boxes_app_finalize (GObject* obj) {
	BoxesApp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_APP, BoxesApp);
	_g_object_unref0 (self->window);
	_g_object_unref0 (self->notebook);
	_g_object_unref0 (self->embed);
	_g_object_unref0 (self->stage);
	_g_object_unref0 (self->stage_bin);
	_g_object_unref0 (self->overlay_bin_actor);
	_g_object_unref0 (self->overlay_bin);
	_g_object_unref0 (self->current_item);
	_g_object_unref0 (self->searchbar);
	_g_object_unref0 (self->topbar);
	_g_object_unref0 (self->notificationbar);
	_g_object_unref0 (self->sidebar_revealer);
	_g_object_unref0 (self->searchbar_revealer);
	_g_object_unref0 (self->sidebar);
	_g_object_unref0 (self->selectionbar);
	_g_object_unref0 (self->settings);
	_g_object_unref0 (self->wizard);
	_g_object_unref0 (self->properties);
	_g_object_unref0 (self->display_page);
	_g_free0 (self->priv->_uri);
	_g_object_unref0 (self->collection);
	_g_object_unref0 (self->filter);
	_g_object_unref0 (self->action_properties);
	_g_object_unref0 (self->action_fullscreen);
	_g_object_unref0 (self->action_shutdown);
	_g_object_unref0 (self->priv->application);
	_g_object_unref0 (self->view);
	_g_hash_table_unref0 (self->priv->connections);
	_g_hash_table_unref0 (self->priv->sources);
	G_OBJECT_CLASS (boxes_app_parent_class)->finalize (obj);
}


GType boxes_app_get_type (void) {
	static volatile gsize boxes_app_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_app_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesApp), 0, (GInstanceInitFunc) boxes_app_instance_init, NULL };
		GType boxes_app_type_id;
		boxes_app_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesApp", &g_define_type_info, 0);
		g_once_init_leave (&boxes_app_type_id__volatile, boxes_app_type_id);
	}
	return boxes_app_type_id__volatile;
}


static void _vala_boxes_app_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesApp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_APP, BoxesApp);
	switch (property_id) {
		case BOXES_APP_ACTOR:
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
		break;
		case BOXES_APP_FULLSCREEN:
		g_value_set_boolean (value, boxes_app_get_fullscreen (self));
		break;
		case BOXES_APP_URI:
		g_value_set_string (value, boxes_app_get_uri (self));
		break;
		case BOXES_APP_DEFAULT_CONNECTION:
		g_value_set_object (value, boxes_app_get_default_connection (self));
		break;
		case BOXES_APP_DEFAULT_SOURCE:
		g_value_set_object (value, boxes_app_get_default_source (self));
		break;
		case BOXES_APP_SELECTION_MODE:
		g_value_set_boolean (value, boxes_app_get_selection_mode (self));
		break;
		case BOXES_APP_SELECTED_ITEMS:
		g_value_set_pointer (value, boxes_app_get_selected_items (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_app_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesApp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_APP, BoxesApp);
	switch (property_id) {
		case BOXES_APP_FULLSCREEN:
		boxes_app_set_fullscreen (self, g_value_get_boolean (value));
		break;
		case BOXES_APP_URI:
		boxes_app_set_uri (self, g_value_get_string (value));
		break;
		case BOXES_APP_SELECTION_MODE:
		boxes_app_set_selection_mode (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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



