/* app.c generated by valac 0.17.1.6-d284, 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 <glib/gi18n-lib.h>
#include <version.h>
#include <config.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <libvirt-gconfig/libvirt-gconfig.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_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_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_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 BOXES_TYPE_COLLECTION_SOURCE (boxes_collection_source_get_type ())
#define BOXES_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSource))
#define BOXES_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))
#define BOXES_IS_COLLECTION_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_IS_COLLECTION_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_SOURCE))
#define BOXES_COLLECTION_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_SOURCE, BoxesCollectionSourceClass))

typedef struct _BoxesCollectionSource BoxesCollectionSource;
typedef struct _BoxesCollectionSourceClass BoxesCollectionSourceClass;
#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)))
typedef struct _BoxesCollectionPrivate BoxesCollectionPrivate;

#define BOXES_TYPE_CATEGORY (boxes_category_get_type ())
#define BOXES_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_CATEGORY, BoxesCategory))
#define BOXES_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_CATEGORY, BoxesCategoryClass))
#define BOXES_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_CATEGORY))
#define BOXES_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_CATEGORY))
#define BOXES_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_CATEGORY, BoxesCategoryClass))

typedef struct _BoxesCategory BoxesCategory;
typedef struct _BoxesCategoryClass BoxesCategoryClass;
typedef struct _BoxesTopbarPrivate BoxesTopbarPrivate;
typedef struct _BoxesCategoryPrivate BoxesCategoryPrivate;

#define BOXES_CATEGORY_TYPE_KIND (boxes_category_kind_get_type ())

#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;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (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;
typedef struct _BoxesAppGetSourcesFromDirData BoxesAppGetSourcesFromDirData;
typedef struct _Block2Data Block2Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _BoxesSidebarPrivate BoxesSidebarPrivate;
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_PAIR (boxes_pair_get_type ())
#define BOXES_PAIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PAIR, BoxesPair))
#define BOXES_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PAIR, BoxesPairClass))
#define BOXES_IS_PAIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PAIR))
#define BOXES_IS_PAIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PAIR))
#define BOXES_PAIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PAIR, BoxesPairClass))

typedef struct _BoxesPair BoxesPair;
typedef struct _BoxesPairClass BoxesPairClass;
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 BOXES_TYPE_DISPLAY_CONFIG (boxes_display_config_get_type ())
#define BOXES_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfig))
#define BOXES_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))
#define BOXES_IS_DISPLAY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_IS_DISPLAY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_CONFIG))
#define BOXES_DISPLAY_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_CONFIG, BoxesDisplayConfigClass))

typedef struct _BoxesDisplayConfig BoxesDisplayConfig;
typedef struct _BoxesDisplayConfigClass BoxesDisplayConfigClass;
typedef struct _BoxesLibvirtMachinePrivate BoxesLibvirtMachinePrivate;
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;
	ClutterState* state;
	ClutterBox* box;
	BoxesCollectionItem* current_item;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesSidebar* sidebar;
	BoxesSelectionbar* selectionbar;
	guint duration;
	GSettings* settings;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesCollection* collection;
	GSimpleAction* action_properties;
	GSimpleAction* action_fullscreen;
};

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

struct _BoxesAppPrivate {
	gchar* _uri;
	GtkApplication* application;
	ClutterTableLayout* box_table;
	BoxesCollectionView* view;
	GHashTable* connections;
	GHashTable* sources;
	guint configure_id;
	gboolean _selection_mode;
};

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

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};

struct _BoxesTopbar {
	BoxesUI parent_instance;
	BoxesTopbarPrivate * priv;
	GtkLabel* label;
	GtkNotebook* notebook;
};

struct _BoxesTopbarClass {
	BoxesUIClass parent_class;
};

typedef enum  {
	BOXES_CATEGORY_KIND_USER,
	BOXES_CATEGORY_KIND_NEW,
	BOXES_CATEGORY_KIND_FAVORITES,
	BOXES_CATEGORY_KIND_PRIVATE,
	BOXES_CATEGORY_KIND_SHARED
} BoxesCategoryKind;

struct _BoxesCategory {
	GObject parent_instance;
	BoxesCategoryPrivate * priv;
	gchar* name;
	BoxesCategoryKind kind;
};

struct _BoxesCategoryClass {
	GObjectClass 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_;
	BoxesCollectionSource* _tmp1_;
	GHashTable* _tmp2_;
	BoxesCollectionSource* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gconstpointer _tmp7_;
	gboolean _tmp8_;
	BoxesCollectionSource* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GVirConnection* _tmp13_;
	GVirConnection* _tmp14_;
	GVirConnection* connection;
	GVirConnection* _tmp15_;
	GVirConnection* _tmp16_;
	GVirConnection* _tmp17_;
	GVirConnection* _tmp18_;
	GVirStoragePool* _tmp19_;
	GVirStoragePool* pool;
	GVirStoragePool* _tmp20_;
	GVirStoragePool* _tmp21_;
	GError* _error_;
	GError* _tmp22_;
	const gchar* _tmp23_;
	GHashTable* _tmp24_;
	BoxesCollectionSource* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	GVirConnection* _tmp28_;
	GVirConnection* _tmp29_;
	GHashTable* _tmp30_;
	BoxesCollectionSource* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	BoxesCollectionSource* _tmp34_;
	BoxesCollectionSource* _tmp35_;
	BoxesCollectionSource* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gboolean _tmp40_;
	GVirConnection* _tmp41_;
	GList* _tmp42_;
	GList* domain_collection;
	GList* domain_it;
	GVirDomain* _tmp43_;
	GVirDomain* domain;
	BoxesCollectionSource* _tmp44_;
	GVirConnection* _tmp45_;
	GVirDomain* _tmp46_;
	BoxesLibvirtMachine* _tmp47_;
	BoxesLibvirtMachine* _tmp48_;
	GVirConnection* _tmp49_;
	GVirConnection* _tmp50_;
	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 _BoxesAppGetSourcesFromDirData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	BoxesApp* self;
	GFile* dir;
	GFile* _tmp0_;
	GFileEnumerator* _tmp1_;
	GFileEnumerator* enumerator;
	GFileEnumerator* _tmp2_;
	GList* _tmp3_;
	GList* files;
	GList* _tmp4_;
	GList* _tmp5_;
	GList* file_collection;
	GList* file_it;
	GFileInfo* _tmp6_;
	GFileInfo* file;
	GFileInfo* _tmp7_;
	const gchar* _tmp8_;
	BoxesCollectionSource* _tmp9_;
	BoxesCollectionSource* source;
	BoxesCollectionSource* _tmp10_;
	GError* _error_;
	GError* _tmp11_;
	const gchar* _tmp12_;
	GError * _inner_error_;
};

struct _Block2Data {
	int _ref_count_;
	BoxesApp * self;
	ClutterBindConstraint* yconstraint;
};

struct _BoxesSidebar {
	BoxesUI parent_instance;
	BoxesSidebarPrivate * priv;
	GtkNotebook* notebook;
	GtkTreeView* default_tree_view;
	GtkTreeView* user_tree_view;
	BoxesCategory* category;
};

struct _BoxesSidebarClass {
	BoxesUIClass 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;
	BoxesApp* app;
	BoxesMachineActor* machine_actor;
	BoxesCollectionSource* source;
	BoxesDisplayConfig* config;
	gboolean deleted;
};

struct _BoxesMachineClass {
	BoxesCollectionItemClass parent_class;
	gchar* (*get_screenshot_filename) (BoxesMachine* self, const gchar* ext);
	void (*take_screenshot) (BoxesMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*take_screenshot_finish) (BoxesMachine* self, GAsyncResult* _res_, GError** error);
	GList* (*get_properties) (BoxesMachine* self, BoxesPropertiesPage page);
	gchar* (*get_screenshot_prefix) (BoxesMachine* self);
	void (*connect_display) (BoxesMachine* self);
	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;
	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 _Block3Data {
	int _ref_count_;
	BoxesApp * self;
	GList* selected_items;
};

typedef void (*BoxesNotificationbarOKFunc) (void* user_data);
typedef void (*BoxesNotificationbarCancelFunc) (void* user_data);

static gpointer boxes_app_parent_class = 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_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_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_view_get_type (void) G_GNUC_CONST;
GType boxes_collection_source_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);
static void __lambda114_ (BoxesApp* self);
gboolean boxes_app_quit (BoxesApp* self);
static void ___lambda114__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self);
static void __lambda115_ (BoxesApp* self);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void ___lambda115__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self);
static void __lambda116_ (BoxesApp* self);
void boxes_app_set_fullscreen (BoxesApp* self, gboolean value);
static void ___lambda116__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self);
static void __lambda117_ (BoxesApp* self);
static void ___lambda117__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self);
static void __lambda118_ (BoxesApp* self);
static void ___lambda118__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self);
static void __lambda119_ (BoxesApp* self, GApplication* app);
BoxesCollection* boxes_collection_new (BoxesApp* app);
BoxesCollection* boxes_collection_construct (GType object_type, BoxesApp* app);
static void boxes_app_setup_ui (BoxesApp* self);
static void __lambda126_ (BoxesApp* self, BoxesCollectionItem* item);
void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static void ___lambda126__boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self);
static void __lambda127_ (BoxesApp* self, BoxesCollectionItem* item);
void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static void ___lambda127__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 __lambda128_ (BoxesApp* self, GObject* obj, GAsyncResult* _result_);
static void ___lambda128__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 ___lambda119__g_application_startup (GApplication* _sender, gpointer self);
static void __lambda129_ (BoxesApp* self, GApplication* app);
static void ___lambda129__g_application_activate (GApplication* _sender, gpointer self);
gint boxes_app_run (BoxesApp* self);
GType boxes_category_get_type (void) G_GNUC_CONST;
void boxes_app_set_category (BoxesApp* self, BoxesCategory* category);
GType boxes_category_kind_get_type (void) G_GNUC_CONST;
void boxes_collection_view_set_category (BoxesCollectionView* self, BoxesCategory* value);
GType boxes_machine_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_machine_get_type (void) G_GNUC_CONST;
BoxesLibvirtMachine* boxes_app_add_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain);
BoxesLibvirtMachine* boxes_libvirt_machine_new (BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error);
BoxesLibvirtMachine* boxes_libvirt_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app, GVirConnection* connection, GVirDomain* domain, GError** error);
void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item);
gchar* boxes_collection_source_get_name (BoxesCollectionSource* self);
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_);
gchar* boxes_collection_source_get_uri (BoxesCollectionSource* self);
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 __lambda90_ (BoxesApp* self, GVirConnection* connection, GVirDomain* domain);
void boxes_machine_delete (BoxesMachine* self, gboolean by_user);
void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item);
static void ___lambda90__gvir_connection_domain_removed (GVirConnection* _sender, GVirDomain* dom, gpointer self);
static void __lambda91_ (Block1Data* _data1_, GVirConnection* connection, GVirDomain* domain);
static void ___lambda91__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_);
gboolean boxes_collection_source_get_enabled (BoxesCollectionSource* self);
gchar* boxes_collection_source_get_source_type (BoxesCollectionSource* self);
static void boxes_app_add_collection_source_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
BoxesRemoteMachine* boxes_remote_machine_new (BoxesCollectionSource* source, BoxesApp* app);
BoxesRemoteMachine* boxes_remote_machine_construct (GType object_type, BoxesCollectionSource* source, BoxesApp* app);
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_);
gboolean boxes_has_pkgconfig_sources (void);
gchar* boxes_get_pkgdata_source (const gchar* file_name);
gchar* boxes_get_pkgconfig_source (const gchar* file_name);
static void boxes_app_setup_sources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
BoxesCollectionSource* boxes_collection_source_new_with_file (const gchar* filename, GError** error);
BoxesCollectionSource* boxes_collection_source_construct_with_file (GType object_type, const gchar* filename, GError** error);
GVirConnection* boxes_app_get_default_connection (BoxesApp* self);
static void boxes_app_get_sources_from_dir (BoxesApp* self, GFile* dir, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void boxes_app_get_sources_from_dir_finish (BoxesApp* self, GAsyncResult* _res_);
static void boxes_app_get_sources_from_dir_data_free (gpointer _data);
static gboolean boxes_app_get_sources_from_dir_co (BoxesAppGetSourcesFromDirData* _data_);
static void boxes_app_get_sources_from_dir_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
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 Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
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 __lambda120_ (BoxesApp* self);
gboolean boxes_app_get_fullscreen (BoxesApp* self);
static gboolean __lambda121_ (BoxesApp* self);
static gboolean ___lambda121__gsource_func (gpointer self);
static gboolean ___lambda120__gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
static gboolean __lambda122_ (BoxesApp* self);
static gboolean ___lambda122__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self);
BoxesDisplayPage* boxes_display_page_new (BoxesApp* app);
BoxesDisplayPage* boxes_display_page_construct (GType object_type, BoxesApp* app);
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 __lambda123_ (BoxesApp* self);
static gboolean ___lambda123__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 (BoxesApp* app);
BoxesSidebar* boxes_sidebar_construct (GType object_type, BoxesApp* app);
BoxesCollectionView* boxes_collection_view_new (BoxesApp* app, BoxesCategory* category);
BoxesCollectionView* boxes_collection_view_construct (GType object_type, BoxesApp* app, BoxesCategory* category);
BoxesTopbar* boxes_topbar_new (BoxesApp* app);
BoxesTopbar* boxes_topbar_construct (GType object_type, BoxesApp* app);
BoxesNotificationbar* boxes_notificationbar_new (BoxesApp* app);
BoxesNotificationbar* boxes_notificationbar_construct (GType object_type, BoxesApp* app);
ClutterActor* boxes_notificationbar_get_actor (BoxesNotificationbar* self);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
#define BOXES_TOPBAR_height ((guint) 50)
static void __lambda124_ (Block2Data* _data2_);
static void ___lambda124__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
BoxesSelectionbar* boxes_selectionbar_new (BoxesApp* app);
BoxesSelectionbar* boxes_selectionbar_construct (GType object_type, BoxesApp* app);
ClutterActor* boxes_selectionbar_get_actor (BoxesSelectionbar* self);
#define BOXES_SELECTIONBAR_spacing 60.0f
static void __lambda125_ (Block2Data* _data2_);
static void ___lambda125__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
BoxesWizard* boxes_wizard_new (BoxesApp* app);
BoxesWizard* boxes_wizard_construct (GType object_type, BoxesApp* app);
BoxesProperties* boxes_properties_new (BoxesApp* app);
BoxesProperties* boxes_properties_construct (GType object_type, BoxesApp* app);
static void boxes_app_set_main_ui_state (BoxesApp* self, const gchar* clutter_state);
static void boxes_app_real_ui_state_changed (BoxesUI* base);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_actor_unpin (ClutterActor* actor);
void boxes_actor_remove (ClutterActor* actor);
void boxes_machine_disconnect_display (BoxesMachine* self);
void boxes_machine_update_screenshot (BoxesMachine* self, gint width, gint height, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_machine_update_screenshot_finish (BoxesMachine* self, GAsyncResult* _res_);
#define BOXES_MACHINE_SCREENSHOT_WIDTH 180
#define BOXES_MACHINE_SCREENSHOT_HEIGHT 134
const gchar* boxes_ui_state_to_string (BoxesUIState self);
void boxes_notificationbar_cancel (BoxesNotificationbar* self);
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
gpointer boxes_pair_ref (gpointer instance);
void boxes_pair_unref (gpointer instance);
GParamSpec* boxes_param_spec_pair (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_pair (GValue* value, gpointer v_object);
void boxes_value_take_pair (GValue* value, gpointer v_object);
gpointer boxes_value_get_pair (const GValue* value);
GType boxes_pair_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;
GType boxes_display_config_get_type (void) G_GNUC_CONST;
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_app_remove_selected_items (BoxesApp* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
static void __lambda109_ (Block3Data* _data3_);
static void ___lambda109__boxes_notificationbar_ok_func (gpointer self);
static void __lambda110_ (Block3Data* _data3_);
static void ___lambda110__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);
#define BOXES_F11_KEY ((guint) 0xffc8)
gboolean boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item);
gboolean boxes_app_get_selection_mode (BoxesApp* self);
void boxes_machine_connect_display (BoxesMachine* self);
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);
void boxes_app_set_selection_mode (BoxesApp* self, gboolean value);
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 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 __lambda114_ (BoxesApp* self) {
	boxes_app_quit (self);
}


static void ___lambda114__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self) {
	__lambda114_ (self);
}


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


static void ___lambda115__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self) {
	__lambda115_ (self);
}


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


static void ___lambda116__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self) {
	__lambda116_ (self);
}


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


static void ___lambda117__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self) {
	__lambda117_ (self);
}


static void __lambda118_ (BoxesApp* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_ = NULL;
	gchar** authors;
	gint authors_length1;
	gint _authors_size_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_ = NULL;
	gchar** artists;
	gint artists_length1;
	gint _artists_size_;
	GtkApplicationWindow* _tmp6_;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	_tmp0_ = g_strdup ("Zeeshan Ali (Khattak) <zeeshanak@gnome.org>");
	_tmp1_ = g_strdup ("Marc-André Lureau <marcandre.lureau@gmail.com>");
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	authors = _tmp2_;
	authors_length1 = 2;
	_authors_size_ = authors_length1;
	_tmp3_ = g_strdup ("Jon McCann <jmccann@redhat.com>");
	_tmp4_ = g_strdup ("Jakub Steiner <jsteiner@redhat.com>");
	_tmp5_ = g_new0 (gchar*, 2 + 1);
	_tmp5_[0] = _tmp3_;
	_tmp5_[1] = _tmp4_;
	artists = _tmp5_;
	artists_length1 = 2;
	_artists_size_ = artists_length1;
	_tmp6_ = self->window;
	_tmp7_ = _ ("translator-credits");
	_tmp8_ = _ ("A simple GNOME 3 application to access remote or virtual systems");
	gtk_show_about_dialog ((GtkWindow*) _tmp6_, "artists", artists, "authors", authors, "translator-credits", _tmp7_, "comments", _tmp8_, "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 ___lambda118__g_simple_action_activate (GSimpleAction* _sender, GVariant* p0, gpointer self) {
	__lambda118_ (self);
}


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


static void ___lambda126__boxes_collection_item_added (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
	__lambda126_ (self, item);
}


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


static void ___lambda127__boxes_collection_item_removed (BoxesCollection* _sender, BoxesCollectionItem* item, gpointer self) {
	__lambda127_ (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 __lambda128_ (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 ___lambda128__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda128_ (self, source_object, res);
	g_object_unref (self);
}


static void __lambda119_ (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;
	GtkApplication* _tmp7_;
	BoxesCollection* _tmp8_;
	GSettings* _tmp9_;
	gint _tmp10_ = 0;
	BoxesCollection* _tmp11_;
	BoxesCollection* _tmp12_;
	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");
	g_menu_append_section (menu, NULL, (GMenuModel*) display_section);
	_tmp5_ = _ ("About Boxes");
	g_menu_append (menu, _tmp5_, "app.about");
	_tmp6_ = _ ("Quit");
	g_menu_append (menu, _tmp6_, "app.quit");
	_tmp7_ = self->priv->application;
	gtk_application_set_app_menu (_tmp7_, (GMenuModel*) menu);
	_tmp8_ = boxes_collection_new (self);
	_g_object_unref0 (self->collection);
	self->collection = _tmp8_;
	_tmp9_ = self->settings;
	_tmp10_ = g_settings_get_int (_tmp9_, "animation-duration");
	self->duration = (guint) _tmp10_;
	boxes_app_setup_ui (self);
	_tmp11_ = self->collection;
	g_signal_connect_object (_tmp11_, "item-added", (GCallback) ___lambda126__boxes_collection_item_added, self, 0);
	_tmp12_ = self->collection;
	g_signal_connect_object (_tmp12_, "item-removed", (GCallback) ___lambda127__boxes_collection_item_removed, self, 0);
	boxes_app_setup_sources (self, ___lambda128__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 ___lambda119__g_application_startup (GApplication* _sender, gpointer self) {
	__lambda119_ (self, _sender);
}


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


static void ___lambda129__g_application_activate (GApplication* _sender, gpointer self) {
	__lambda129_ (self, _sender);
}


BoxesApp* boxes_app_construct (GType object_type) {
	BoxesApp * self = NULL;
	GtkApplication* _tmp0_;
	GSettings* _tmp1_;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GHashTable* _tmp4_;
	GHashFunc _tmp5_;
	GEqualFunc _tmp6_;
	GHashTable* _tmp7_;
	GSimpleAction* _tmp8_;
	GSimpleAction* action;
	GSimpleAction* _tmp9_;
	GtkApplication* _tmp10_;
	GSimpleAction* _tmp11_;
	GSimpleAction* _tmp12_;
	GSimpleAction* _tmp13_;
	GtkApplication* _tmp14_;
	GSimpleAction* _tmp15_;
	GSimpleAction* _tmp16_;
	GSimpleAction* _tmp17_;
	GtkApplication* _tmp18_;
	GSimpleAction* _tmp19_;
	GSimpleAction* _tmp20_;
	GSimpleAction* _tmp21_;
	GtkApplication* _tmp22_;
	GSimpleAction* _tmp23_;
	GSimpleAction* _tmp24_;
	GSimpleAction* _tmp25_;
	GtkApplication* _tmp26_;
	GSimpleAction* _tmp27_;
	GtkApplication* _tmp28_;
	GtkApplication* _tmp29_;
	self = (BoxesApp*) boxes_ui_construct (object_type);
	_tmp0_ = gtk_application_new ("org.gnome.Boxes", 0);
	_g_object_unref0 (self->priv->application);
	self->priv->application = _tmp0_;
	_tmp1_ = g_settings_new ("org.gnome.boxes");
	_g_object_unref0 (self->settings);
	self->settings = _tmp1_;
	_tmp2_ = g_str_hash;
	_tmp3_ = g_str_equal;
	_tmp4_ = g_hash_table_new_full (_tmp2_, _tmp3_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->connections);
	self->priv->connections = _tmp4_;
	_tmp5_ = g_str_hash;
	_tmp6_ = g_str_equal;
	_tmp7_ = g_hash_table_new_full (_tmp5_, _tmp6_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->sources);
	self->priv->sources = _tmp7_;
	_tmp8_ = g_simple_action_new ("quit", NULL);
	action = _tmp8_;
	_tmp9_ = action;
	g_signal_connect_object (_tmp9_, "activate", (GCallback) ___lambda114__g_simple_action_activate, self, 0);
	_tmp10_ = self->priv->application;
	_tmp11_ = action;
	g_action_map_add_action ((GActionMap*) _tmp10_, (GAction*) _tmp11_);
	_tmp12_ = g_simple_action_new ("new", NULL);
	_g_object_unref0 (action);
	action = _tmp12_;
	_tmp13_ = action;
	g_signal_connect_object (_tmp13_, "activate", (GCallback) ___lambda115__g_simple_action_activate, self, 0);
	_tmp14_ = self->priv->application;
	_tmp15_ = action;
	g_action_map_add_action ((GActionMap*) _tmp14_, (GAction*) _tmp15_);
	_tmp16_ = g_simple_action_new ("display.fullscreen", NULL);
	_g_object_unref0 (self->action_fullscreen);
	self->action_fullscreen = _tmp16_;
	_tmp17_ = self->action_fullscreen;
	g_signal_connect_object (_tmp17_, "activate", (GCallback) ___lambda116__g_simple_action_activate, self, 0);
	_tmp18_ = self->priv->application;
	_tmp19_ = self->action_fullscreen;
	g_action_map_add_action ((GActionMap*) _tmp18_, (GAction*) _tmp19_);
	_tmp20_ = g_simple_action_new ("display.properties", NULL);
	_g_object_unref0 (self->action_properties);
	self->action_properties = _tmp20_;
	_tmp21_ = self->action_properties;
	g_signal_connect_object (_tmp21_, "activate", (GCallback) ___lambda117__g_simple_action_activate, self, 0);
	_tmp22_ = self->priv->application;
	_tmp23_ = self->action_properties;
	g_action_map_add_action ((GActionMap*) _tmp22_, (GAction*) _tmp23_);
	_tmp24_ = g_simple_action_new ("about", NULL);
	_g_object_unref0 (action);
	action = _tmp24_;
	_tmp25_ = action;
	g_signal_connect_object (_tmp25_, "activate", (GCallback) ___lambda118__g_simple_action_activate, self, 0);
	_tmp26_ = self->priv->application;
	_tmp27_ = action;
	g_action_map_add_action ((GActionMap*) _tmp26_, (GAction*) _tmp27_);
	_tmp28_ = self->priv->application;
	g_signal_connect_object ((GApplication*) _tmp28_, "startup", (GCallback) ___lambda119__g_application_startup, self, G_CONNECT_AFTER);
	_tmp29_ = self->priv->application;
	g_signal_connect_object ((GApplication*) _tmp29_, "activate", (GCallback) ___lambda129__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_set_category (BoxesApp* self, BoxesCategory* category) {
	BoxesTopbar* _tmp0_;
	GtkLabel* _tmp1_;
	BoxesCategory* _tmp2_;
	const gchar* _tmp3_;
	BoxesCollectionView* _tmp4_;
	BoxesCategory* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (category != NULL);
	_tmp0_ = self->topbar;
	_tmp1_ = _tmp0_->label;
	_tmp2_ = category;
	_tmp3_ = _tmp2_->name;
	gtk_label_set_text (_tmp1_, _tmp3_);
	_tmp4_ = self->priv->view;
	_tmp5_ = category;
	boxes_collection_view_set_category (_tmp4_, _tmp5_);
}


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


BoxesLibvirtMachine* boxes_app_add_domain (BoxesApp* self, BoxesCollectionSource* source, GVirConnection* connection, GVirDomain* domain) {
	BoxesLibvirtMachine* result = NULL;
	GVirDomain* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_;
	BoxesLibvirtMachine* machine;
	BoxesLibvirtMachine* _tmp3_;
	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;
	}
	{
		BoxesCollectionSource* _tmp4_;
		GVirConnection* _tmp5_;
		GVirDomain* _tmp6_;
		BoxesLibvirtMachine* _tmp7_;
		BoxesLibvirtMachine* _tmp8_;
		BoxesCollection* _tmp9_;
		BoxesLibvirtMachine* _tmp10_;
		GVirDomain* _tmp11_;
		BoxesLibvirtMachine* _tmp12_;
		BoxesLibvirtMachine* _tmp13_;
		_tmp4_ = source;
		_tmp5_ = connection;
		_tmp6_ = domain;
		_tmp7_ = boxes_libvirt_machine_new (_tmp4_, self, _tmp5_, _tmp6_, &_inner_error_);
		_tmp8_ = _tmp7_;
		if (_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_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);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		BoxesCollectionSource* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		GError* _tmp18_;
		const gchar* _tmp19_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp14_ = source;
		_tmp15_ = boxes_collection_source_get_name (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = _tmp16_;
		_tmp18_ = _error_;
		_tmp19_ = _tmp18_->message;
		g_warning ("app.vala:163: Failed to create source '%s': %s", _tmp17_, _tmp19_);
		_g_free0 (_tmp17_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (machine);
		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 NULL;
	}
	result = machine;
	return result;
}


static void boxes_app_setup_libvirt_data_free (gpointer _data) {
	BoxesAppSetupLibvirtData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->source);
	_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 __lambda90_ (BoxesApp* self, GVirConnection* connection, GVirDomain* domain) {
	GVirDomain* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	BoxesLibvirtMachine* _tmp2_;
	BoxesLibvirtMachine* machine;
	BoxesLibvirtMachine* _tmp3_;
	BoxesLibvirtMachine* _tmp4_;
	BoxesCollection* _tmp5_;
	BoxesLibvirtMachine* _tmp6_;
	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_machine_delete ((BoxesMachine*) _tmp4_, FALSE);
	_tmp5_ = self->collection;
	_tmp6_ = machine;
	boxes_collection_remove_item (_tmp5_, (BoxesCollectionItem*) _tmp6_);
	_g_object_unref0 (machine);
}


static void ___lambda90__gvir_connection_domain_removed (GVirConnection* _sender, GVirDomain* dom, gpointer self) {
	__lambda90_ (self, _sender, dom);
}


static void __lambda91_ (Block1Data* _data1_, GVirConnection* connection, GVirDomain* domain) {
	BoxesApp * self;
	GVirDomain* _tmp0_;
	const gchar* _tmp1_ = NULL;
	BoxesCollectionSource* _tmp2_;
	GVirConnection* _tmp3_;
	GVirDomain* _tmp4_;
	BoxesLibvirtMachine* _tmp5_ = NULL;
	BoxesLibvirtMachine* _tmp6_;
	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:207: New domain '%s'", _tmp1_);
	_tmp2_ = _data1_->source;
	_tmp3_ = connection;
	_tmp4_ = domain;
	_tmp5_ = boxes_app_add_domain (self, _tmp2_, _tmp3_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp6_);
}


static void ___lambda91__gvir_connection_domain_added (GVirConnection* _sender, GVirDomain* dom, gpointer self) {
	__lambda91_ (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_->_tmp1_ = _g_object_ref0 (_data_->_tmp0_);
	_data_->_data1_->source = _data_->_tmp1_;
	_data_->_data1_->_async_data_ = _data_;
	_data_->_tmp2_ = _data_->self->priv->connections;
	_data_->_tmp3_ = _data_->_data1_->source;
	_data_->_tmp4_ = boxes_collection_source_get_name (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = g_hash_table_lookup (_data_->_tmp2_, _data_->_tmp6_);
	_data_->_tmp8_ = ((GVirConnection*) _data_->_tmp7_) != NULL;
	_g_free0 (_data_->_tmp6_);
	if (_data_->_tmp8_) {
		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_->_tmp9_ = _data_->_data1_->source;
	_data_->_tmp10_ = boxes_collection_source_get_uri (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = gvir_connection_new (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_g_free0 (_data_->_tmp12_);
	_data_->connection = _data_->_tmp14_;
	{
		_data_->_tmp15_ = _data_->connection;
		_data_->_state_ = 1;
		gvir_connection_open_async (_data_->_tmp15_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_1:
		gvir_connection_open_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_data_->_tmp16_ = _data_->connection;
		_data_->_state_ = 2;
		gvir_connection_fetch_domains_async (_data_->_tmp16_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_2:
		gvir_connection_fetch_domains_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_data_->_tmp17_ = _data_->connection;
		_data_->_state_ = 3;
		gvir_connection_fetch_storage_pools_async (_data_->_tmp17_, NULL, boxes_app_setup_libvirt_ready, _data_);
		return FALSE;
		_state_3:
		gvir_connection_fetch_storage_pools_finish (_data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_data_->_tmp18_ = _data_->connection;
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = gvir_connection_find_storage_pool_by_name (_data_->_tmp18_, PACKAGE_TARNAME);
		_data_->pool = _data_->_tmp19_;
		_data_->_tmp20_ = _data_->pool;
		if (_data_->_tmp20_ != NULL) {
			_data_->_tmp21_ = _data_->pool;
			_data_->_state_ = 4;
			gvir_storage_pool_refresh_async (_data_->_tmp21_, NULL, boxes_app_setup_libvirt_ready, _data_);
			return FALSE;
			_state_4:
			gvir_storage_pool_refresh_finish (_data_->_tmp21_, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->pool);
				goto __catch1_g_error;
			}
		}
		_g_object_unref0 (_data_->pool);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp22_ = _data_->_error_;
		_data_->_tmp23_ = _data_->_tmp22_->message;
		g_warning ("app.vala:184: %s", _data_->_tmp23_);
		_g_error_free0 (_data_->_error_);
	}
	__finally1:
	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_->_tmp24_ = _data_->self->priv->connections;
	_data_->_tmp25_ = _data_->_data1_->source;
	_data_->_tmp26_ = boxes_collection_source_get_name (_data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = _data_->connection;
	_data_->_tmp29_ = _g_object_ref0 (_data_->_tmp28_);
	g_hash_table_insert (_data_->_tmp24_, _data_->_tmp27_, _data_->_tmp29_);
	_data_->_tmp30_ = _data_->self->priv->sources;
	_data_->_tmp31_ = _data_->_data1_->source;
	_data_->_tmp32_ = boxes_collection_source_get_name (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = _data_->_data1_->source;
	_data_->_tmp35_ = _g_object_ref0 (_data_->_tmp34_);
	g_hash_table_insert (_data_->_tmp30_, _data_->_tmp33_, _data_->_tmp35_);
	_data_->_tmp36_ = _data_->_data1_->source;
	_data_->_tmp37_ = boxes_collection_source_get_name (_data_->_tmp36_);
	_data_->_tmp38_ = _data_->_tmp37_;
	_data_->_tmp39_ = _data_->_tmp38_;
	_data_->_tmp40_ = g_strcmp0 (_data_->_tmp39_, "QEMU Session") == 0;
	_g_free0 (_data_->_tmp39_);
	if (_data_->_tmp40_) {
		g_object_notify ((GObject*) _data_->self, "default-connection");
		g_object_notify ((GObject*) _data_->self, "default-source");
	}
	_data_->_tmp41_ = _data_->connection;
	_data_->_tmp42_ = NULL;
	_data_->_tmp42_ = gvir_connection_get_domains (_data_->_tmp41_);
	{
		_data_->domain_collection = _data_->_tmp42_;
		for (_data_->domain_it = _data_->domain_collection; _data_->domain_it != NULL; _data_->domain_it = _data_->domain_it->next) {
			_data_->_tmp43_ = _g_object_ref0 ((GVirDomain*) _data_->domain_it->data);
			_data_->domain = _data_->_tmp43_;
			{
				_data_->_tmp44_ = _data_->_data1_->source;
				_data_->_tmp45_ = _data_->connection;
				_data_->_tmp46_ = _data_->domain;
				_data_->_tmp47_ = NULL;
				_data_->_tmp47_ = boxes_app_add_domain (_data_->self, _data_->_tmp44_, _data_->_tmp45_, _data_->_tmp46_);
				_data_->_tmp48_ = _data_->_tmp47_;
				_g_object_unref0 (_data_->_tmp48_);
				_g_object_unref0 (_data_->domain);
			}
		}
		__g_list_free__g_object_unref0_0 (_data_->domain_collection);
	}
	_data_->_tmp49_ = _data_->connection;
	g_signal_connect_object (_data_->_tmp49_, "domain-removed", (GCallback) ___lambda90__gvir_connection_domain_removed, _data_->self, 0);
	_data_->_tmp50_ = _data_->connection;
	g_signal_connect_data (_data_->_tmp50_, "domain-added", (GCallback) ___lambda91__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_->self);
				_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:228: 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 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_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_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 __catch2_g_error;
			}
		}
		goto __finally2;
		__catch2_g_error:
		{
			_data_->_error_ = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp11_ = _data_->_error_;
			_data_->_tmp12_ = _data_->_tmp11_->message;
			g_critical ("app.vala:241: Can't setup default sources: %s", _data_->_tmp12_);
			_g_error_free0 (_data_->_error_);
		}
		__finally2:
		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 __catch3_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 __finally3;
	__catch3_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:249: %s", _data_->_tmp15_);
		_g_error_free0 (_data_->_vala1__error_);
	}
	__finally3:
	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_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_app_get_sources_from_dir (_data_->self, _data_->dir, boxes_app_setup_sources_ready, _data_);
	return FALSE;
	_state_3:
	boxes_app_get_sources_from_dir_finish (_data_->self, _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 void boxes_app_get_sources_from_dir_data_free (gpointer _data) {
	BoxesAppGetSourcesFromDirData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->dir);
	_g_object_unref0 (_data_->self);
	g_slice_free (BoxesAppGetSourcesFromDirData, _data_);
}


static void boxes_app_get_sources_from_dir (BoxesApp* self, GFile* dir, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesAppGetSourcesFromDirData* _data_;
	BoxesApp* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	_data_ = g_slice_new0 (BoxesAppGetSourcesFromDirData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, boxes_app_get_sources_from_dir);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_app_get_sources_from_dir_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = dir;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->dir = _tmp2_;
	boxes_app_get_sources_from_dir_co (_data_);
}


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


static void boxes_app_get_sources_from_dir_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesAppGetSourcesFromDirData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_app_get_sources_from_dir_co (_data_);
}


static gboolean boxes_app_get_sources_from_dir_co (BoxesAppGetSourcesFromDirData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->dir;
		_data_->_state_ = 1;
		g_file_enumerate_children_async (_data_->_tmp0_, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, G_PRIORITY_DEFAULT, NULL, boxes_app_get_sources_from_dir_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = g_file_enumerate_children_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
		_data_->enumerator = _data_->_tmp1_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		while (TRUE) {
			_data_->_tmp2_ = _data_->enumerator;
			_data_->_state_ = 2;
			g_file_enumerator_next_files_async (_data_->_tmp2_, 10, G_PRIORITY_DEFAULT, NULL, boxes_app_get_sources_from_dir_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp3_ = NULL;
			_data_->_tmp3_ = g_file_enumerator_next_files_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
			_data_->files = _data_->_tmp3_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->enumerator);
				goto __catch4_g_error;
			}
			_data_->_tmp4_ = _data_->files;
			if (_data_->_tmp4_ == NULL) {
				__g_list_free__g_object_unref0_0 (_data_->files);
				break;
			}
			_data_->_tmp5_ = _data_->files;
			{
				_data_->file_collection = _data_->_tmp5_;
				for (_data_->file_it = _data_->file_collection; _data_->file_it != NULL; _data_->file_it = _data_->file_it->next) {
					_data_->_tmp6_ = _g_object_ref0 ((GFileInfo*) _data_->file_it->data);
					_data_->file = _data_->_tmp6_;
					{
						_data_->_tmp7_ = _data_->file;
						_data_->_tmp8_ = NULL;
						_data_->_tmp8_ = g_file_info_get_name (_data_->_tmp7_);
						_data_->_tmp9_ = boxes_collection_source_new_with_file (_data_->_tmp8_, &_data_->_inner_error_);
						_data_->source = _data_->_tmp9_;
						if (_data_->_inner_error_ != NULL) {
							_g_object_unref0 (_data_->file);
							__g_list_free__g_object_unref0_0 (_data_->files);
							_g_object_unref0 (_data_->enumerator);
							goto __catch4_g_error;
						}
						_data_->_tmp10_ = _data_->source;
						boxes_app_add_collection_source (_data_->self, _data_->_tmp10_, NULL, NULL);
						_g_object_unref0 (_data_->source);
						_g_object_unref0 (_data_->file);
					}
				}
			}
			__g_list_free__g_object_unref0_0 (_data_->files);
		}
		_g_object_unref0 (_data_->enumerator);
	}
	goto __finally4;
	__catch4_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp11_ = _data_->_error_;
		_data_->_tmp12_ = _data_->_tmp11_->message;
		g_warning ("app.vala:274: %s", _data_->_tmp12_);
		_g_error_free0 (_data_->_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;
	}
	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 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_object_unref0 (_data2_->yconstraint);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


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 __lambda121_ (BoxesApp* self) {
	gboolean result = FALSE;
	self->priv->configure_id = (guint) 0;
	boxes_app_save_window_geometry (self);
	result = FALSE;
	return result;
}


static gboolean ___lambda121__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda121_ (self);
	return result;
}


static gboolean __lambda120_ (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, ___lambda121__gsource_func, g_object_ref (self), g_object_unref);
	self->priv->configure_id = _tmp4_;
	result = FALSE;
	return result;
}


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


static gboolean __lambda122_ (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 ___lambda122__gtk_widget_window_state_event (GtkWidget* _sender, GdkEventWindowState* event, gpointer self) {
	gboolean result;
	result = __lambda122_ (self);
	return result;
}


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


static gboolean ___lambda123__gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) {
	gboolean result;
	result = __lambda123_ (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 __lambda124_ (Block2Data* _data2_) {
	BoxesApp * self;
	ClutterBindConstraint* _tmp0_;
	BoxesTopbar* _tmp1_;
	self = _data2_->self;
	_tmp0_ = _data2_->yconstraint;
	_tmp1_ = self->topbar;
	clutter_bind_constraint_set_offset (_tmp0_, (gfloat) BOXES_TOPBAR_height);
}


static void ___lambda124__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda124_ (self);
}


static void __lambda125_ (Block2Data* _data2_) {
	BoxesApp * self;
	ClutterBindConstraint* _tmp0_;
	BoxesCollectionView* _tmp1_;
	ClutterActor* _tmp2_;
	ClutterActor* _tmp3_;
	gfloat _tmp4_;
	gfloat _tmp5_;
	BoxesSelectionbar* _tmp6_;
	self = _data2_->self;
	_tmp0_ = _data2_->yconstraint;
	_tmp1_ = self->priv->view;
	_tmp2_ = boxes_ui_get_actor ((BoxesUI*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = clutter_actor_get_height (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = self->selectionbar;
	clutter_bind_constraint_set_offset (_tmp0_, _tmp5_ - BOXES_SELECTIONBAR_spacing);
}


static void ___lambda125__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda125_ (self);
}


static void boxes_app_setup_ui (BoxesApp* self) {
	Block2Data* _data2_;
	GtkApplication* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	GtkApplicationWindow* _tmp2_;
	GtkApplicationWindow* _tmp3_;
	GtkApplicationWindow* _tmp4_;
	GSettings* _tmp5_;
	GVariant* _tmp6_ = NULL;
	GVariant* size;
	GVariant* _tmp7_;
	gsize _tmp8_ = 0UL;
	GSettings* _tmp22_;
	gboolean _tmp23_ = FALSE;
	GSettings* _tmp25_;
	GVariant* _tmp26_ = NULL;
	GVariant* position;
	GVariant* _tmp27_;
	gsize _tmp28_ = 0UL;
	GtkApplicationWindow* _tmp42_;
	GtkApplicationWindow* _tmp43_;
	GtkNotebook* _tmp44_;
	GtkNotebook* _tmp45_;
	GtkNotebook* _tmp46_;
	GtkNotebook* _tmp47_;
	GtkApplicationWindow* _tmp48_;
	GtkNotebook* _tmp49_;
	GtkClutterEmbed* _tmp50_;
	GtkClutterEmbed* _tmp51_;
	GtkNotebook* _tmp52_;
	GtkClutterEmbed* _tmp53_;
	BoxesDisplayPage* _tmp54_;
	GtkNotebook* _tmp55_;
	BoxesDisplayPage* _tmp56_;
	GtkWidget* _tmp57_;
	GtkWidget* _tmp58_;
	GtkClutterEmbed* _tmp59_;
	ClutterActor* _tmp60_ = NULL;
	ClutterStage* _tmp61_;
	ClutterStage* _tmp62_;
	GdkRGBA _tmp63_ = {0};
	ClutterColor _tmp64_ = {0};
	ClutterState* _tmp65_;
	ClutterState* _tmp66_;
	guint _tmp67_;
	GtkApplicationWindow* _tmp68_;
	GtkApplicationWindow* _tmp69_;
	ClutterTableLayout* _tmp70_;
	ClutterTableLayout* _tmp71_;
	ClutterTableLayout* _tmp72_;
	ClutterBox* _tmp73_;
	ClutterBox* _tmp74_;
	ClutterBox* _tmp75_;
	ClutterStage* _tmp76_;
	ClutterBindConstraint* _tmp77_;
	ClutterBindConstraint* _tmp78_;
	ClutterStage* _tmp79_;
	ClutterBox* _tmp80_;
	BoxesSidebar* _tmp81_;
	BoxesSidebar* _tmp82_;
	BoxesCategory* _tmp83_;
	BoxesCollectionView* _tmp84_;
	BoxesTopbar* _tmp85_;
	BoxesNotificationbar* _tmp86_;
	BoxesNotificationbar* _tmp87_;
	ClutterActor* _tmp88_;
	ClutterActor* _tmp89_;
	BoxesCollectionView* _tmp90_;
	ClutterActor* _tmp91_;
	ClutterActor* _tmp92_;
	ClutterAlignConstraint* _tmp93_;
	ClutterAlignConstraint* _tmp94_;
	BoxesTopbar* _tmp95_;
	ClutterActor* _tmp96_;
	ClutterActor* _tmp97_;
	BoxesTopbar* _tmp98_;
	ClutterBindConstraint* _tmp99_;
	ClutterBindConstraint* _tmp100_;
	BoxesNotificationbar* _tmp101_;
	ClutterActor* _tmp102_;
	ClutterActor* _tmp103_;
	ClutterBindConstraint* _tmp104_;
	BoxesTopbar* _tmp105_;
	ClutterActor* _tmp106_;
	ClutterActor* _tmp107_;
	BoxesSelectionbar* _tmp108_;
	BoxesSelectionbar* _tmp109_;
	ClutterActor* _tmp110_;
	ClutterActor* _tmp111_;
	BoxesCollectionView* _tmp112_;
	ClutterActor* _tmp113_;
	ClutterActor* _tmp114_;
	ClutterAlignConstraint* _tmp115_;
	ClutterAlignConstraint* _tmp116_;
	BoxesCollectionView* _tmp117_;
	ClutterActor* _tmp118_;
	ClutterActor* _tmp119_;
	BoxesCollectionView* _tmp120_;
	ClutterActor* _tmp121_;
	ClutterActor* _tmp122_;
	gfloat _tmp123_;
	gfloat _tmp124_;
	BoxesSelectionbar* _tmp125_;
	ClutterBindConstraint* _tmp126_;
	ClutterBindConstraint* _tmp127_;
	BoxesSelectionbar* _tmp128_;
	ClutterActor* _tmp129_;
	ClutterActor* _tmp130_;
	ClutterBindConstraint* _tmp131_;
	BoxesCollectionView* _tmp132_;
	ClutterActor* _tmp133_;
	ClutterActor* _tmp134_;
	GtkNotebook* _tmp135_;
	BoxesWizard* _tmp136_;
	BoxesProperties* _tmp137_;
	g_return_if_fail (self != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = self->priv->application;
	_tmp1_ = (GtkApplicationWindow*) gtk_application_window_new (_tmp0_);
	_tmp2_ = g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->window);
	self->window = _tmp2_;
	_tmp3_ = self->window;
	gtk_application_window_set_show_menubar (_tmp3_, FALSE);
	_tmp4_ = self->window;
	gtk_window_set_hide_titlebar_when_maximized ((GtkWindow*) _tmp4_, TRUE);
	_tmp5_ = self->settings;
	_tmp6_ = g_settings_get_value (_tmp5_, "window-size");
	size = _tmp6_;
	_tmp7_ = size;
	_tmp8_ = g_variant_n_children (_tmp7_);
	if (_tmp8_ == ((gsize) 2)) {
		GVariant* _tmp9_;
		GVariant* _tmp10_ = NULL;
		GVariant* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gint width;
		GVariant* _tmp14_;
		GVariant* _tmp15_ = NULL;
		GVariant* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint height;
		GtkApplicationWindow* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		_tmp9_ = size;
		_tmp10_ = g_variant_get_child_value (_tmp9_, (gsize) 0);
		_tmp11_ = _tmp10_;
		_tmp12_ = _variant_get3 (_tmp11_);
		_tmp13_ = _tmp12_;
		_g_variant_unref0 (_tmp11_);
		width = _tmp13_;
		_tmp14_ = size;
		_tmp15_ = g_variant_get_child_value (_tmp14_, (gsize) 1);
		_tmp16_ = _tmp15_;
		_tmp17_ = _variant_get4 (_tmp16_);
		_tmp18_ = _tmp17_;
		_g_variant_unref0 (_tmp16_);
		height = _tmp18_;
		_tmp19_ = self->window;
		_tmp20_ = width;
		_tmp21_ = height;
		gtk_window_set_default_size ((GtkWindow*) _tmp19_, _tmp20_, _tmp21_);
	}
	_tmp22_ = self->settings;
	_tmp23_ = g_settings_get_boolean (_tmp22_, "window-maximized");
	if (_tmp23_) {
		GtkApplicationWindow* _tmp24_;
		_tmp24_ = self->window;
		gtk_window_maximize ((GtkWindow*) _tmp24_);
	}
	_tmp25_ = self->settings;
	_tmp26_ = g_settings_get_value (_tmp25_, "window-position");
	position = _tmp26_;
	_tmp27_ = position;
	_tmp28_ = g_variant_n_children (_tmp27_);
	if (_tmp28_ == ((gsize) 2)) {
		GVariant* _tmp29_;
		GVariant* _tmp30_ = NULL;
		GVariant* _tmp31_;
		gint _tmp32_;
		gint _tmp33_;
		gint x;
		GVariant* _tmp34_;
		GVariant* _tmp35_ = NULL;
		GVariant* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		gint y;
		GtkApplicationWindow* _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		_tmp29_ = position;
		_tmp30_ = g_variant_get_child_value (_tmp29_, (gsize) 0);
		_tmp31_ = _tmp30_;
		_tmp32_ = _variant_get5 (_tmp31_);
		_tmp33_ = _tmp32_;
		_g_variant_unref0 (_tmp31_);
		x = _tmp33_;
		_tmp34_ = position;
		_tmp35_ = g_variant_get_child_value (_tmp34_, (gsize) 1);
		_tmp36_ = _tmp35_;
		_tmp37_ = _variant_get6 (_tmp36_);
		_tmp38_ = _tmp37_;
		_g_variant_unref0 (_tmp36_);
		y = _tmp38_;
		_tmp39_ = self->window;
		_tmp40_ = x;
		_tmp41_ = y;
		gtk_window_move ((GtkWindow*) _tmp39_, _tmp40_, _tmp41_);
	}
	_tmp42_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp42_, "configure-event", (GCallback) ___lambda120__gtk_widget_configure_event, self, 0);
	_tmp43_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp43_, "window-state-event", (GCallback) ___lambda122__gtk_widget_window_state_event, self, 0);
	_tmp44_ = (GtkNotebook*) gtk_notebook_new ();
	_tmp45_ = g_object_ref_sink (_tmp44_);
	_g_object_unref0 (self->notebook);
	self->notebook = _tmp45_;
	_tmp46_ = self->notebook;
	gtk_notebook_set_show_border (_tmp46_, FALSE);
	_tmp47_ = self->notebook;
	gtk_notebook_set_show_tabs (_tmp47_, FALSE);
	_tmp48_ = self->window;
	_tmp49_ = self->notebook;
	gtk_container_add ((GtkContainer*) _tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = (GtkClutterEmbed*) gtk_clutter_embed_new ();
	_tmp51_ = g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->embed);
	self->embed = _tmp51_;
	_tmp52_ = self->notebook;
	_tmp53_ = self->embed;
	gtk_notebook_append_page (_tmp52_, (GtkWidget*) _tmp53_, NULL);
	_tmp54_ = boxes_display_page_new (self);
	_g_object_unref0 (self->display_page);
	self->display_page = _tmp54_;
	_tmp55_ = self->notebook;
	_tmp56_ = self->display_page;
	_tmp57_ = boxes_display_page_get_widget (_tmp56_);
	_tmp58_ = _tmp57_;
	gtk_notebook_append_page (_tmp55_, _tmp58_, NULL);
	_tmp59_ = self->embed;
	_tmp60_ = gtk_clutter_embed_get_stage (_tmp59_);
	_tmp61_ = _g_object_ref0 (CLUTTER_IS_STAGE (_tmp60_) ? ((ClutterStage*) _tmp60_) : NULL);
	_g_object_unref0 (self->stage);
	self->stage = _tmp61_;
	_tmp62_ = self->stage;
	boxes_get_boxes_bg_color (&_tmp63_);
	boxes_gdk_rgba_to_clutter_color (&_tmp63_, &_tmp64_);
	clutter_stage_set_color (_tmp62_, &_tmp64_);
	_tmp65_ = clutter_state_new ();
	_g_object_unref0 (self->state);
	self->state = _tmp65_;
	_tmp66_ = self->state;
	_tmp67_ = self->duration;
	clutter_state_set_duration (_tmp66_, NULL, NULL, _tmp67_);
	_tmp68_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp68_, "delete-event", (GCallback) ___lambda123__gtk_widget_delete_event, self, 0);
	_tmp69_ = self->window;
	g_signal_connect_object ((GtkWidget*) _tmp69_, "key-press-event", (GCallback) _boxes_app_on_key_pressed_gtk_widget_key_press_event, self, 0);
	_tmp70_ = (ClutterTableLayout*) clutter_table_layout_new ();
	_tmp71_ = g_object_ref_sink (_tmp70_);
	_g_object_unref0 (self->priv->box_table);
	self->priv->box_table = _tmp71_;
	_tmp72_ = self->priv->box_table;
	_tmp73_ = (ClutterBox*) clutter_box_new ((ClutterLayoutManager*) _tmp72_);
	_tmp74_ = g_object_ref_sink (_tmp73_);
	_g_object_unref0 (self->box);
	self->box = _tmp74_;
	_tmp75_ = self->box;
	_tmp76_ = self->stage;
	_tmp77_ = (ClutterBindConstraint*) clutter_bind_constraint_new ((ClutterActor*) _tmp76_, CLUTTER_BIND_SIZE, (gfloat) 0);
	_tmp78_ = g_object_ref_sink (_tmp77_);
	clutter_actor_add_constraint ((ClutterActor*) _tmp75_, (ClutterConstraint*) _tmp78_);
	_g_object_unref0 (_tmp78_);
	_tmp79_ = self->stage;
	_tmp80_ = self->box;
	clutter_container_add_actor ((ClutterContainer*) _tmp79_, (ClutterActor*) _tmp80_);
	_tmp81_ = boxes_sidebar_new (self);
	_g_object_unref0 (self->sidebar);
	self->sidebar = _tmp81_;
	_tmp82_ = self->sidebar;
	_tmp83_ = _tmp82_->category;
	_tmp84_ = boxes_collection_view_new (self, _tmp83_);
	_g_object_unref0 (self->priv->view);
	self->priv->view = _tmp84_;
	_tmp85_ = boxes_topbar_new (self);
	_g_object_unref0 (self->topbar);
	self->topbar = _tmp85_;
	_tmp86_ = boxes_notificationbar_new (self);
	_g_object_unref0 (self->notificationbar);
	self->notificationbar = _tmp86_;
	_tmp87_ = self->notificationbar;
	_tmp88_ = boxes_notificationbar_get_actor (_tmp87_);
	_tmp89_ = _tmp88_;
	_tmp90_ = self->priv->view;
	_tmp91_ = boxes_ui_get_actor ((BoxesUI*) _tmp90_);
	_tmp92_ = _tmp91_;
	_tmp93_ = (ClutterAlignConstraint*) clutter_align_constraint_new (_tmp92_, CLUTTER_ALIGN_X_AXIS, 0.5f);
	_tmp94_ = g_object_ref_sink (_tmp93_);
	clutter_actor_add_constraint (_tmp89_, (ClutterConstraint*) _tmp94_);
	_g_object_unref0 (_tmp94_);
	_tmp95_ = self->topbar;
	_tmp96_ = boxes_ui_get_actor ((BoxesUI*) _tmp95_);
	_tmp97_ = _tmp96_;
	_tmp98_ = self->topbar;
	_tmp99_ = (ClutterBindConstraint*) clutter_bind_constraint_new (_tmp97_, CLUTTER_BIND_Y, (gfloat) BOXES_TOPBAR_height);
	_tmp100_ = g_object_ref_sink (_tmp99_);
	_data2_->yconstraint = _tmp100_;
	_tmp101_ = self->notificationbar;
	_tmp102_ = boxes_notificationbar_get_actor (_tmp101_);
	_tmp103_ = _tmp102_;
	_tmp104_ = _data2_->yconstraint;
	clutter_actor_add_constraint (_tmp103_, (ClutterConstraint*) _tmp104_);
	_tmp105_ = self->topbar;
	_tmp106_ = boxes_ui_get_actor ((BoxesUI*) _tmp105_);
	_tmp107_ = _tmp106_;
	g_signal_connect_data ((GObject*) _tmp107_, "notify::height", (GCallback) ___lambda124__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp108_ = boxes_selectionbar_new (self);
	_g_object_unref0 (self->selectionbar);
	self->selectionbar = _tmp108_;
	_tmp109_ = self->selectionbar;
	_tmp110_ = boxes_selectionbar_get_actor (_tmp109_);
	_tmp111_ = _tmp110_;
	_tmp112_ = self->priv->view;
	_tmp113_ = boxes_ui_get_actor ((BoxesUI*) _tmp112_);
	_tmp114_ = _tmp113_;
	_tmp115_ = (ClutterAlignConstraint*) clutter_align_constraint_new (_tmp114_, CLUTTER_ALIGN_X_AXIS, 0.5f);
	_tmp116_ = g_object_ref_sink (_tmp115_);
	clutter_actor_add_constraint (_tmp111_, (ClutterConstraint*) _tmp116_);
	_g_object_unref0 (_tmp116_);
	_tmp117_ = self->priv->view;
	_tmp118_ = boxes_ui_get_actor ((BoxesUI*) _tmp117_);
	_tmp119_ = _tmp118_;
	_tmp120_ = self->priv->view;
	_tmp121_ = boxes_ui_get_actor ((BoxesUI*) _tmp120_);
	_tmp122_ = _tmp121_;
	_tmp123_ = clutter_actor_get_height (_tmp122_);
	_tmp124_ = _tmp123_;
	_tmp125_ = self->selectionbar;
	_tmp126_ = (ClutterBindConstraint*) clutter_bind_constraint_new (_tmp119_, CLUTTER_BIND_Y, _tmp124_ - BOXES_SELECTIONBAR_spacing);
	_tmp127_ = g_object_ref_sink (_tmp126_);
	_g_object_unref0 (_data2_->yconstraint);
	_data2_->yconstraint = _tmp127_;
	_tmp128_ = self->selectionbar;
	_tmp129_ = boxes_selectionbar_get_actor (_tmp128_);
	_tmp130_ = _tmp129_;
	_tmp131_ = _data2_->yconstraint;
	clutter_actor_add_constraint (_tmp130_, (ClutterConstraint*) _tmp131_);
	_tmp132_ = self->priv->view;
	_tmp133_ = boxes_ui_get_actor ((BoxesUI*) _tmp132_);
	_tmp134_ = _tmp133_;
	g_signal_connect_data ((GObject*) _tmp134_, "notify::height", (GCallback) ___lambda125__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp135_ = self->notebook;
	gtk_widget_show_all ((GtkWidget*) _tmp135_);
	_tmp136_ = boxes_wizard_new (self);
	_g_object_unref0 (self->wizard);
	self->wizard = _tmp136_;
	_tmp137_ = boxes_properties_new (self);
	_g_object_unref0 (self->properties);
	self->properties = _tmp137_;
	boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_COLLECTION);
	_g_variant_unref0 (position);
	_g_variant_unref0 (size);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}


static void boxes_app_set_main_ui_state (BoxesApp* self, const gchar* clutter_state) {
	GtkNotebook* _tmp0_;
	ClutterBox* _tmp1_;
	ClutterTableLayout* _tmp2_;
	ClutterState* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (clutter_state != NULL);
	_tmp0_ = self->notebook;
	g_object_set (_tmp0_, "page", (gint) BOXES_APP_PAGE_MAIN, NULL);
	_tmp1_ = self->box;
	_tmp2_ = self->priv->box_table;
	clutter_box_set_layout_manager (_tmp1_, (ClutterLayoutManager*) _tmp2_);
	_tmp3_ = self->state;
	_tmp4_ = clutter_state;
	clutter_state_set_state (_tmp3_, _tmp4_);
}


static void boxes_app_real_ui_state_changed (BoxesUI* base) {
	BoxesApp * self;
	ClutterBox* _tmp0_;
	ClutterTableLayout* _tmp1_;
	GSimpleAction* _tmp2_;
	BoxesUIState _tmp3_;
	BoxesUIState _tmp4_;
	GSimpleAction* _tmp5_;
	BoxesUIState _tmp6_;
	BoxesUIState _tmp7_;
	BoxesSidebar* _tmp8_;
	BoxesUI* _tmp9_;
	BoxesTopbar* _tmp10_;
	BoxesUI* _tmp11_;
	BoxesCollectionView* _tmp12_;
	BoxesUI* _tmp13_;
	BoxesWizard* _tmp14_;
	BoxesUI* _tmp15_;
	BoxesProperties* _tmp16_;
	BoxesUI* _tmp17_;
	BoxesUI** _tmp18_ = NULL;
	BoxesUIState _tmp23_;
	BoxesUIState _tmp24_;
	self = (BoxesApp*) base;
	_tmp0_ = self->box;
	_tmp1_ = self->priv->box_table;
	clutter_box_set_layout_manager (_tmp0_, (ClutterLayoutManager*) _tmp1_);
	_tmp2_ = self->action_fullscreen;
	_tmp3_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp4_ = _tmp3_;
	g_simple_action_set_enabled (_tmp2_, _tmp4_ == BOXES_UI_STATE_DISPLAY);
	_tmp5_ = self->action_properties;
	_tmp6_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp7_ = _tmp6_;
	g_simple_action_set_enabled (_tmp5_, _tmp7_ == BOXES_UI_STATE_DISPLAY);
	_tmp8_ = self->sidebar;
	_tmp9_ = _g_object_ref0 ((BoxesUI*) _tmp8_);
	_tmp10_ = self->topbar;
	_tmp11_ = _g_object_ref0 ((BoxesUI*) _tmp10_);
	_tmp12_ = self->priv->view;
	_tmp13_ = _g_object_ref0 ((BoxesUI*) _tmp12_);
	_tmp14_ = self->wizard;
	_tmp15_ = _g_object_ref0 ((BoxesUI*) _tmp14_);
	_tmp16_ = self->properties;
	_tmp17_ = _g_object_ref0 ((BoxesUI*) _tmp16_);
	_tmp18_ = g_new0 (BoxesUI*, 5 + 1);
	_tmp18_[0] = _tmp9_;
	_tmp18_[1] = _tmp11_;
	_tmp18_[2] = _tmp13_;
	_tmp18_[3] = _tmp15_;
	_tmp18_[4] = _tmp17_;
	{
		BoxesUI** ui_collection = NULL;
		gint ui_collection_length1 = 0;
		gint _ui_collection_size_ = 0;
		gint ui_it = 0;
		ui_collection = _tmp18_;
		ui_collection_length1 = 5;
		for (ui_it = 0; ui_it < 5; ui_it = ui_it + 1) {
			BoxesUI* _tmp19_;
			BoxesUI* ui = NULL;
			_tmp19_ = _g_object_ref0 (ui_collection[ui_it]);
			ui = _tmp19_;
			{
				BoxesUI* _tmp20_;
				BoxesUIState _tmp21_;
				BoxesUIState _tmp22_;
				_tmp20_ = ui;
				_tmp21_ = boxes_ui_get_ui_state ((BoxesUI*) self);
				_tmp22_ = _tmp21_;
				boxes_ui_set_ui_state (_tmp20_, _tmp22_);
				_g_object_unref0 (ui);
			}
		}
		ui_collection = (_vala_array_free (ui_collection, ui_collection_length1, (GDestroyNotify) g_object_unref), NULL);
	}
	_tmp23_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp24_ = _tmp23_;
	switch (_tmp24_) {
		case BOXES_UI_STATE_DISPLAY:
		{
			ClutterBox* _tmp25_;
			ClutterFixedLayout* _tmp26_;
			ClutterFixedLayout* _tmp27_;
			const gchar* _tmp28_ = NULL;
			gboolean _tmp29_;
			gboolean _tmp30_;
			ClutterState* _tmp31_;
			const gchar* _tmp32_;
			_tmp25_ = self->box;
			_tmp26_ = (ClutterFixedLayout*) clutter_fixed_layout_new ();
			_tmp27_ = g_object_ref_sink (_tmp26_);
			clutter_box_set_layout_manager (_tmp25_, (ClutterLayoutManager*) _tmp27_);
			_g_object_unref0 (_tmp27_);
			_tmp29_ = boxes_app_get_fullscreen (self);
			_tmp30_ = _tmp29_;
			if (_tmp30_) {
				_tmp28_ = "display-fullscreen";
			} else {
				_tmp28_ = "display";
			}
			_tmp31_ = self->state;
			_tmp32_ = _tmp28_;
			clutter_state_set_state (_tmp31_, _tmp32_);
			break;
		}
		case BOXES_UI_STATE_CREDS:
		{
			boxes_app_set_main_ui_state (self, "creds");
			break;
		}
		case BOXES_UI_STATE_COLLECTION:
		{
			BoxesTopbar* _tmp33_;
			ClutterActor* _tmp34_;
			ClutterActor* _tmp35_;
			BoxesCollectionView* _tmp36_;
			ClutterActor* _tmp37_;
			ClutterActor* _tmp38_;
			BoxesTopbar* _tmp39_;
			ClutterActor* _tmp40_;
			ClutterActor* _tmp41_;
			BoxesSidebar* _tmp42_;
			ClutterActor* _tmp43_;
			ClutterActor* _tmp44_;
			BoxesCollectionView* _tmp45_;
			ClutterActor* _tmp46_;
			ClutterActor* _tmp47_;
			ClutterBox* _tmp48_;
			BoxesTopbar* _tmp49_;
			ClutterActor* _tmp50_;
			ClutterActor* _tmp51_;
			ClutterBox* _tmp52_;
			BoxesCollectionView* _tmp53_;
			ClutterActor* _tmp54_;
			ClutterActor* _tmp55_;
			BoxesCollectionItem* _tmp56_;
			boxes_app_set_main_ui_state (self, "collection");
			_tmp33_ = self->topbar;
			_tmp34_ = boxes_ui_get_actor ((BoxesUI*) _tmp33_);
			_tmp35_ = _tmp34_;
			boxes_actor_unpin (_tmp35_);
			_tmp36_ = self->priv->view;
			_tmp37_ = boxes_ui_get_actor ((BoxesUI*) _tmp36_);
			_tmp38_ = _tmp37_;
			boxes_actor_unpin (_tmp38_);
			_tmp39_ = self->topbar;
			_tmp40_ = boxes_ui_get_actor ((BoxesUI*) _tmp39_);
			_tmp41_ = _tmp40_;
			boxes_actor_remove (_tmp41_);
			_tmp42_ = self->sidebar;
			_tmp43_ = boxes_ui_get_actor ((BoxesUI*) _tmp42_);
			_tmp44_ = _tmp43_;
			boxes_actor_remove (_tmp44_);
			_tmp45_ = self->priv->view;
			_tmp46_ = boxes_ui_get_actor ((BoxesUI*) _tmp45_);
			_tmp47_ = _tmp46_;
			boxes_actor_remove (_tmp47_);
			_tmp48_ = self->box;
			_tmp49_ = self->topbar;
			_tmp50_ = boxes_ui_get_actor ((BoxesUI*) _tmp49_);
			_tmp51_ = _tmp50_;
			clutter_box_pack (_tmp48_, _tmp51_, "column", 0, "row", 0, "x-expand", FALSE, "y-expand", FALSE, NULL);
			_tmp52_ = self->box;
			_tmp53_ = self->priv->view;
			_tmp54_ = boxes_ui_get_actor ((BoxesUI*) _tmp53_);
			_tmp55_ = _tmp54_;
			clutter_box_pack (_tmp52_, _tmp55_, "column", 0, "row", 1, "x-expand", TRUE, "y-expand", TRUE, NULL);
			_tmp56_ = self->current_item;
			if (BOXES_IS_MACHINE (_tmp56_)) {
				BoxesCollectionItem* _tmp57_;
				BoxesMachine* _tmp58_;
				BoxesMachine* machine;
				BoxesMachine* _tmp59_;
				BoxesMachine* _tmp60_;
				_tmp57_ = self->current_item;
				_tmp58_ = _g_object_ref0 (BOXES_IS_MACHINE (_tmp57_) ? ((BoxesMachine*) _tmp57_) : NULL);
				machine = _tmp58_;
				_tmp59_ = machine;
				boxes_machine_disconnect_display (_tmp59_);
				_tmp60_ = machine;
				boxes_machine_update_screenshot (_tmp60_, BOXES_MACHINE_SCREENSHOT_WIDTH, BOXES_MACHINE_SCREENSHOT_HEIGHT, NULL, NULL);
				_g_object_unref0 (machine);
			}
			boxes_app_set_fullscreen (self, FALSE);
			break;
		}
		case BOXES_UI_STATE_PROPERTIES:
		case BOXES_UI_STATE_WIZARD:
		{
			BoxesTopbar* _tmp61_;
			ClutterActor* _tmp62_;
			ClutterActor* _tmp63_;
			BoxesSidebar* _tmp64_;
			ClutterActor* _tmp65_;
			ClutterActor* _tmp66_;
			BoxesCollectionView* _tmp67_;
			ClutterActor* _tmp68_;
			ClutterActor* _tmp69_;
			ClutterBox* _tmp70_;
			BoxesTopbar* _tmp71_;
			ClutterActor* _tmp72_;
			ClutterActor* _tmp73_;
			ClutterBox* _tmp74_;
			BoxesSidebar* _tmp75_;
			ClutterActor* _tmp76_;
			ClutterActor* _tmp77_;
			ClutterBox* _tmp78_;
			BoxesCollectionView* _tmp79_;
			ClutterActor* _tmp80_;
			ClutterActor* _tmp81_;
			_tmp61_ = self->topbar;
			_tmp62_ = boxes_ui_get_actor ((BoxesUI*) _tmp61_);
			_tmp63_ = _tmp62_;
			boxes_actor_remove (_tmp63_);
			_tmp64_ = self->sidebar;
			_tmp65_ = boxes_ui_get_actor ((BoxesUI*) _tmp64_);
			_tmp66_ = _tmp65_;
			boxes_actor_remove (_tmp66_);
			_tmp67_ = self->priv->view;
			_tmp68_ = boxes_ui_get_actor ((BoxesUI*) _tmp67_);
			_tmp69_ = _tmp68_;
			boxes_actor_remove (_tmp69_);
			_tmp70_ = self->box;
			_tmp71_ = self->topbar;
			_tmp72_ = boxes_ui_get_actor ((BoxesUI*) _tmp71_);
			_tmp73_ = _tmp72_;
			clutter_box_pack (_tmp70_, _tmp73_, "column", 0, "row", 0, "column-span", 2, "x-expand", FALSE, "y-expand", FALSE, NULL);
			_tmp74_ = self->box;
			_tmp75_ = self->sidebar;
			_tmp76_ = boxes_ui_get_actor ((BoxesUI*) _tmp75_);
			_tmp77_ = _tmp76_;
			clutter_box_pack (_tmp74_, _tmp77_, "column", 0, "row", 1, "x-expand", FALSE, "y-expand", TRUE, NULL);
			_tmp78_ = self->box;
			_tmp79_ = self->priv->view;
			_tmp80_ = boxes_ui_get_actor ((BoxesUI*) _tmp79_);
			_tmp81_ = _tmp80_;
			clutter_box_pack (_tmp78_, _tmp81_, "column", 1, "row", 1, "x-expand", TRUE, "y-expand", TRUE, NULL);
			boxes_app_set_main_ui_state (self, "collection");
			break;
		}
		default:
		{
			BoxesUIState _tmp82_;
			BoxesUIState _tmp83_;
			GEnumValue* _tmp84_;
			gchar* _tmp85_ = NULL;
			gchar* _tmp86_;
			_tmp82_ = boxes_ui_get_ui_state ((BoxesUI*) self);
			_tmp83_ = _tmp82_;
			_tmp84_ = g_enum_get_value (g_type_class_ref (BOXES_TYPE_UI_STATE), _tmp83_);
			_tmp85_ = g_strdup_printf ("Unhandled UI state %s", (_tmp84_ != NULL) ? _tmp84_->value_name : NULL);
			_tmp86_ = _tmp85_;
			g_warning ("app.vala:451: %s", _tmp86_);
			_g_free0 (_tmp86_);
			break;
		}
	}
}


gboolean boxes_app_quit (BoxesApp* self) {
	gboolean result = FALSE;
	BoxesNotificationbar* _tmp0_;
	GtkApplicationWindow* _tmp1_;
	BoxesCollection* _tmp2_;
	GPtrArray* _tmp3_;
	gpointer* _tmp4_;
	gint _tmp4__length1;
	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 (BOXES_IS_LIBVIRT_MACHINE (_tmp6_)) {
					BoxesCollectionItem* _tmp7_;
					BoxesLibvirtMachine* _tmp8_;
					BoxesLibvirtMachine* machine;
					BoxesLibvirtMachine* _tmp9_;
					GVirConnection* _tmp10_;
					GVirConnection* _tmp11_;
					GVirConnection* _tmp12_;
					_tmp7_ = item;
					_tmp8_ = _g_object_ref0 (BOXES_IS_LIBVIRT_MACHINE (_tmp7_) ? ((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);
			}
		}
	}
	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_list_free__g_object_unref0_0 (_data3_->selected_items);
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static void __lambda109_ (Block3Data* _data3_) {
	BoxesApp * self;
	GList* _tmp0_;
	self = _data3_->self;
	g_debug ("app.vala:499: Box deletion cancelled by user, re-adding to view");
	_tmp0_ = _data3_->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_;
			{
				BoxesCollectionView* _tmp2_;
				BoxesCollectionItem* _tmp3_;
				_tmp2_ = self->priv->view;
				_tmp3_ = selected;
				boxes_collection_view_add_item (_tmp2_, _tmp3_);
				_g_object_unref0 (selected);
			}
		}
	}
}


static void ___lambda109__boxes_notificationbar_ok_func (gpointer self) {
	__lambda109_ (self);
}


static void __lambda110_ (Block3Data* _data3_) {
	BoxesApp * self;
	GList* _tmp0_;
	self = _data3_->self;
	g_debug ("app.vala:506: Box deletion, deleting now");
	_tmp0_ = _data3_->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 (BOXES_IS_MACHINE (_tmp2_) ? ((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 ___lambda110__boxes_notificationbar_cancel_func (gpointer self) {
	__lambda110_ (self);
}


void boxes_app_remove_selected_items (BoxesApp* self) {
	Block3Data* _data3_;
	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);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = g_object_ref (self);
	_tmp0_ = self->priv->view;
	_tmp1_ = boxes_collection_view_get_selected_items (_tmp0_);
	_data3_->selected_items = _tmp1_;
	_tmp2_ = _data3_->selected_items;
	_tmp3_ = g_list_length (_tmp2_);
	num_selected = _tmp3_;
	_tmp4_ = num_selected;
	if (_tmp4_ == ((guint) 0)) {
		block3_data_unref (_data3_);
		_data3_ = 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_ = _data3_->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_ = _data3_->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_;
			{
				BoxesCollectionView* _tmp21_;
				BoxesCollectionItem* _tmp22_;
				_tmp21_ = self->priv->view;
				_tmp22_ = item;
				boxes_collection_view_remove_item (_tmp21_, _tmp22_);
				_g_object_unref0 (item);
			}
		}
	}
	undo = ___lambda109__boxes_notificationbar_ok_func;
	undo_target = block3_data_ref (_data3_);
	undo_target_destroy_notify = block3_data_unref;
	really_remove = ___lambda110__boxes_notificationbar_cancel_func;
	really_remove_target = block3_data_ref (_data3_);
	really_remove_target_destroy_notify = block3_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_);
	block3_data_unref (_data3_);
	_data3_ = 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_ == BOXES_F11_KEY) {
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = boxes_app_get_fullscreen (self);
		_tmp3_ = _tmp2_;
		boxes_app_set_fullscreen (self, !_tmp3_);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}


gboolean boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (item != NULL, FALSE);
	_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* _tmp12_;
		_tmp6_ = item;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_g_object_unref0 (self->current_item);
		self->current_item = _tmp7_;
		_tmp8_ = self->current_item;
		if (BOXES_IS_MACHINE (_tmp8_)) {
			BoxesCollectionItem* _tmp9_;
			BoxesMachine* _tmp10_;
			BoxesMachine* machine;
			BoxesMachine* _tmp11_;
			_tmp9_ = self->current_item;
			_tmp10_ = _g_object_ref0 (BOXES_IS_MACHINE (_tmp9_) ? ((BoxesMachine*) _tmp9_) : NULL);
			machine = _tmp10_;
			_tmp11_ = machine;
			boxes_machine_connect_display (_tmp11_);
			boxes_ui_set_ui_state ((BoxesUI*) self, BOXES_UI_STATE_CREDS);
			_g_object_unref0 (machine);
		} else {
			g_warning ("app.vala:537: unknown item, fix your code");
		}
		_tmp12_ = item;
		g_signal_emit_by_name (self, "item-selected", _tmp12_);
	}
	result = FALSE;
	return result;
}


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->priv->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 = BOXES_APP (obj);
	_g_object_unref0 (self->window);
	_g_object_unref0 (self->notebook);
	_g_object_unref0 (self->embed);
	_g_object_unref0 (self->stage);
	_g_object_unref0 (self->state);
	_g_object_unref0 (self->box);
	_g_object_unref0 (self->current_item);
	_g_object_unref0 (self->topbar);
	_g_object_unref0 (self->notificationbar);
	_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->action_properties);
	_g_object_unref0 (self->action_fullscreen);
	_g_object_unref0 (self->priv->application);
	_g_object_unref0 (self->priv->box_table);
	_g_object_unref0 (self->priv->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 = BOXES_APP (object);
	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 = BOXES_APP (object);
	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);
}



