/* collection-view.c generated by valac 0.17.7, the Vala compiler
 * generated from collection-view.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 <clutter-gtk/clutter-gtk.h>
#include <libgd/gd.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libcommon.h>


#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_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;
typedef struct _BoxesCollectionViewPrivate BoxesCollectionViewPrivate;

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

#define BOXES_COLLECTION_VIEW_TYPE_MODEL_COLUMNS (boxes_collection_view_model_columns_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_CATEGORY_TYPE_KIND (boxes_category_kind_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;

#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 _gtk_tree_path_free0(var) ((var == NULL) ? NULL : (var = (gtk_tree_path_free (var), NULL)))
typedef struct _Block6Data Block6Data;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

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

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

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

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

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

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_REVEALER (boxes_revealer_get_type ())
#define BOXES_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_REVEALER, BoxesRevealer))
#define BOXES_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_REVEALER, BoxesRevealerClass))
#define BOXES_IS_REVEALER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_REVEALER))
#define BOXES_IS_REVEALER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_REVEALER))
#define BOXES_REVEALER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_REVEALER, BoxesRevealerClass))

typedef struct _BoxesRevealer BoxesRevealer;
typedef struct _BoxesRevealerClass BoxesRevealerClass;

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

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#define BOXES_TYPE_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

#define BOXES_TYPE_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

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

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

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

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

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

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;
typedef struct _Block7Data Block7Data;

#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;
typedef struct _BoxesCategoryPrivate BoxesCategoryPrivate;
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;

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

typedef struct _BoxesIPropertiesProvider BoxesIPropertiesProvider;
typedef struct _BoxesIPropertiesProviderIface BoxesIPropertiesProviderIface;

#define BOXES_TYPE_PROPERTIES_PAGE (boxes_properties_page_get_type ())

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

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

#define BOXES_TYPE_MACHINE_ACTOR (boxes_machine_actor_get_type ())
#define BOXES_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActor))
#define BOXES_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))
#define BOXES_IS_MACHINE_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_IS_MACHINE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE_ACTOR))
#define BOXES_MACHINE_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE_ACTOR, BoxesMachineActorClass))

typedef struct _BoxesMachineActor BoxesMachineActor;
typedef struct _BoxesMachineActorClass BoxesMachineActorClass;
#define _gtk_icon_info_free0(var) ((var == NULL) ? NULL : (var = (gtk_icon_info_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block8Data Block8Data;
typedef struct _Block9Data Block9Data;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

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 _BoxesCollectionView {
	BoxesUI parent_instance;
	BoxesCollectionViewPrivate * priv;
};

struct _BoxesCollectionViewClass {
	BoxesUIClass parent_class;
};

struct _BoxesCollectionViewPrivate {
	GtkClutterActor* gtkactor;
	BoxesCategory* _category;
	GdMainIconView* icon_view;
	GtkListStore* model;
	GtkTreeModelFilter* model_filter;
	gchar* button_press_item_path;
};

typedef enum  {
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT = GD_MAIN_COLUMN_ICON,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE = GD_MAIN_COLUMN_PRIMARY_TEXT,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_INFO = GD_MAIN_COLUMN_SECONDARY_TEXT,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED = GD_MAIN_COLUMN_SELECTED,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM = GD_MAIN_COLUMN_LAST,
	BOXES_COLLECTION_VIEW_MODEL_COLUMNS_LAST
} BoxesCollectionViewModelColumns;

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

struct _Block6Data {
	int _ref_count_;
	BoxesCollectionView * self;
	BoxesCollectionItem* current_item;
};

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

struct _BoxesAppClass {
	BoxesUIClass parent_class;
};

struct _Block7Data {
	int _ref_count_;
	Block6Data * _data6_;
	ClutterActor* actor;
	gulong id;
	gulong completed_id;
};

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

struct _BoxesCategoryClass {
	GObjectClass parent_class;
};

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

struct _BoxesCollectionItemClass {
	BoxesUIClass parent_class;
};

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

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

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

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

struct _Block8Data {
	int _ref_count_;
	BoxesCollectionView * self;
	BoxesMachine* machine;
	GtkTreeIter iter;
	BoxesCollectionItem* item;
};

struct _Block9Data {
	int _ref_count_;
	BoxesCollectionView * self;
	GList* selected;
};


static gpointer boxes_collection_view_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
GType boxes_category_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewPrivate))
enum  {
	BOXES_COLLECTION_VIEW_DUMMY_PROPERTY,
	BOXES_COLLECTION_VIEW_ACTOR,
	BOXES_COLLECTION_VIEW_CATEGORY,
	BOXES_COLLECTION_VIEW_VISIBLE
};
static GType boxes_collection_view_model_columns_get_type (void) G_GNUC_UNUSED;
BoxesCollectionView* boxes_collection_view_new (void);
BoxesCollectionView* boxes_collection_view_construct (GType object_type);
BoxesUI* boxes_ui_construct (GType object_type);
GType boxes_category_kind_get_type (void) G_GNUC_CONST;
BoxesCategory* boxes_category_new (const gchar* name, BoxesCategoryKind kind);
BoxesCategory* boxes_category_construct (GType object_type, const gchar* name, BoxesCategoryKind kind);
void boxes_collection_view_set_category (BoxesCollectionView* self, BoxesCategory* value);
static void boxes_collection_view_setup_view (BoxesCollectionView* self);
GType boxes_app_get_type (void) G_GNUC_CONST;
static void __lambda102_ (BoxesCollectionView* self);
gboolean boxes_app_get_selection_mode (BoxesApp* self);
static void ___lambda102__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
static void boxes_collection_view_get_item_pos (BoxesCollectionView* self, BoxesCollectionItem* item, gfloat* x, gfloat* y);
static GtkTreePath* boxes_collection_view_get_path_for_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static void boxes_collection_view_real_ui_state_changed (BoxesUI* base);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_revealer_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
#define BOXES_MACHINE_SCREENSHOT_WIDTH 180
static void ____lambda103_ (Block7Data* _data7_, GtkAllocation* allocation);
static gboolean __lambda104_ (Block7Data* _data7_);
static gboolean ___lambda104__gsource_func (gpointer self);
static void _____lambda103__gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self);
static void ____lambda105_ (Block7Data* _data7_);
void boxes_actor_remove (ClutterActor* actor);
static void _____lambda105__clutter_actor_transitions_completed (ClutterActor* _sender, gpointer self);
#define BOXES_MACHINE_SCREENSHOT_HEIGHT 134
void boxes_fade_actor (ClutterActor* actor, guint opacity);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
void boxes_collection_view_update_item_visible (BoxesCollectionView* self, BoxesCollectionItem* item);
GType boxes_machine_get_type (void) G_GNUC_CONST;
BoxesCategory* boxes_collection_view_get_category (BoxesCollectionView* self);
GType boxes_properties_page_get_type (void) G_GNUC_CONST;
GType boxes_property_get_type (void) G_GNUC_CONST;
GType boxes_iproperties_provider_get_type (void) G_GNUC_CONST;
GType boxes_machine_actor_get_type (void) G_GNUC_CONST;
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
static void boxes_collection_view_update_screenshot (BoxesCollectionView* self, GtkTreeIter* iter);
GdkPixbuf* boxes_machine_get_pixbuf (BoxesMachine* self);
GIcon* boxes_create_symbolic_emblem (const gchar* name);
static void _vala_array_add1 (GIcon*** array, int* length, int* size, GIcon* value);
static void boxes_collection_view_append (BoxesCollectionView* self, const gchar* title, const gchar* info, BoxesCollectionItem* item, GtkTreeIter* result);
static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self);
void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
const gchar* boxes_machine_get_info (BoxesMachine* self);
static void __lambda106_ (Block8Data* _data8_);
static void ___lambda106__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda107_ (Block8Data* _data8_);
static void ___lambda107__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda108_ (Block8Data* _data8_);
static void ___lambda108__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void __lambda109_ (Block8Data* _data8_);
static void ___lambda109__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static void block9_data_unref (void * _userdata_);
static gboolean __lambda40_ (Block9Data* _data9_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter);
static gboolean ___lambda40__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item);
static BoxesCollectionItem* boxes_collection_view_get_item_for_iter (BoxesCollectionView* self, GtkTreeIter* iter);
static BoxesCollectionItem* boxes_collection_view_get_item_for_path (BoxesCollectionView* self, GtkTreePath* path);
static gboolean boxes_collection_view_model_visible (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* iter);
gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item);
void boxes_collection_view_refilter (BoxesCollectionView* self);
void boxes_collection_view_activate (BoxesCollectionView* self);
static gint __lambda7_ (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b);
static gint ___lambda7__gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self);
static void __lambda8_ (BoxesCollectionView* self);
static void ___lambda8__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self);
static void __lambda9_ (BoxesCollectionView* self);
static void ___lambda9__gtk_tree_model_row_inserted (GtkTreeModel* _sender, GtkTreePath* path, GtkTreeIter* iter, gpointer self);
static gboolean _boxes_collection_view_model_visible_gtk_tree_model_filter_visible_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self);
static gboolean boxes_collection_view_on_button_press_event (BoxesCollectionView* self, GtkWidget* view, GdkEventButton* event);
static gboolean _boxes_collection_view_on_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static gboolean boxes_collection_view_on_button_release_event (BoxesCollectionView* self, GtkWidget* view, GdkEventButton* event);
static gboolean _boxes_collection_view_on_button_release_event_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
void boxes_icon_view_activate_on_single_click (GtkIconView* icon_view, gboolean should_activate);
static void __lambda11_ (BoxesCollectionView* self, GtkIconView* view, GtkTreePath* path);
void boxes_app_select_item (BoxesApp* self, BoxesCollectionItem* item);
static void ___lambda11__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self);
void boxes_app_set_selection_mode (BoxesApp* self, gboolean value);
static gboolean boxes_collection_view_on_button_release_selection_mode (BoxesCollectionView* self, GdkEventButton* event, gboolean entered_mode, GtkTreePath* path);
void boxes_collection_view_set_visible (BoxesCollectionView* self, gboolean value);
static void boxes_collection_view_finalize (GObject* obj);
static void _vala_boxes_collection_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_collection_view_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);


static GType boxes_collection_view_model_columns_get_type (void) {
	static volatile gsize boxes_collection_view_model_columns_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_view_model_columns_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT", "screenshot"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE", "title"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_INFO, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_INFO", "info"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED", "selected"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM", "item"}, {BOXES_COLLECTION_VIEW_MODEL_COLUMNS_LAST, "BOXES_COLLECTION_VIEW_MODEL_COLUMNS_LAST", "last"}, {0, NULL, NULL}};
		GType boxes_collection_view_model_columns_type_id;
		boxes_collection_view_model_columns_type_id = g_enum_register_static ("BoxesCollectionViewModelColumns", values);
		g_once_init_leave (&boxes_collection_view_model_columns_type_id__volatile, boxes_collection_view_model_columns_type_id);
	}
	return boxes_collection_view_model_columns_type_id__volatile;
}


static void __lambda102_ (BoxesCollectionView* self) {
	GdMainIconView* _tmp0_;
	BoxesApp* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = boxes_app_app;
	_tmp2_ = boxes_app_get_selection_mode (_tmp1_);
	_tmp3_ = _tmp2_;
	gd_main_view_generic_set_selection_mode ((GdMainViewGeneric*) _tmp0_, _tmp3_);
}


static void ___lambda102__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda102_ (self);
}


BoxesCollectionView* boxes_collection_view_construct (GType object_type) {
	BoxesCollectionView * self = NULL;
	const gchar* _tmp0_ = NULL;
	BoxesCategory* _tmp1_;
	BoxesCategory* _tmp2_;
	BoxesApp* _tmp3_;
	self = (BoxesCollectionView*) boxes_ui_construct (object_type);
	_tmp0_ = _ ("New and Recent");
	_tmp1_ = boxes_category_new (_tmp0_, BOXES_CATEGORY_KIND_NEW);
	_tmp2_ = _tmp1_;
	boxes_collection_view_set_category (self, _tmp2_);
	_g_object_unref0 (_tmp2_);
	boxes_collection_view_setup_view (self);
	_tmp3_ = boxes_app_app;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::selection-mode", (GCallback) ___lambda102__g_object_notify, self, 0);
	return self;
}


BoxesCollectionView* boxes_collection_view_new (void) {
	return boxes_collection_view_construct (BOXES_TYPE_COLLECTION_VIEW);
}


static void boxes_collection_view_get_item_pos (BoxesCollectionView* self, BoxesCollectionItem* item, gfloat* x, gfloat* y) {
	gfloat _vala_x = 0.0F;
	gfloat _vala_y = 0.0F;
	GdkRectangle rect = {0};
	BoxesCollectionItem* _tmp0_;
	GtkTreePath* _tmp1_ = NULL;
	GtkTreePath* path;
	GtkTreePath* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	_tmp1_ = boxes_collection_view_get_path_for_item (self, _tmp0_);
	path = _tmp1_;
	_tmp2_ = path;
	if (_tmp2_ != NULL) {
		GdMainIconView* _tmp3_;
		GtkTreePath* _tmp4_;
		GdkRectangle _tmp5_ = {0};
		GdkRectangle _tmp6_;
		gint _tmp7_;
		GdkRectangle _tmp8_;
		gint _tmp9_;
		_tmp3_ = self->priv->icon_view;
		_tmp4_ = path;
		gtk_icon_view_get_cell_rect ((GtkIconView*) _tmp3_, _tmp4_, NULL, &_tmp5_);
		rect = _tmp5_;
		_tmp6_ = rect;
		_tmp7_ = _tmp6_.x;
		_vala_x = (gfloat) _tmp7_;
		_tmp8_ = rect;
		_tmp9_ = _tmp8_.y;
		_vala_y = (gfloat) _tmp9_;
	} else {
		_vala_x = 0.0f;
		_vala_y = 0.0f;
	}
	_gtk_tree_path_free0 (path);
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->current_item);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}


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


static Block7Data* block7_data_ref (Block7Data* _data7_) {
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}


static void block7_data_unref (void * _userdata_) {
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data7_->_data6_->self;
		_g_object_unref0 (_data7_->actor);
		block6_data_unref (_data7_->_data6_);
		_data7_->_data6_ = NULL;
		g_slice_free (Block7Data, _data7_);
	}
}


static gboolean __lambda104_ (Block7Data* _data7_) {
	Block6Data* _data6_;
	BoxesCollectionView * self;
	gboolean result = FALSE;
	gfloat item_x2 = 0.0F;
	gfloat item_y2 = 0.0F;
	BoxesCollectionItem* _tmp0_;
	gfloat _tmp1_ = 0.0F;
	gfloat _tmp2_ = 0.0F;
	ClutterActor* _tmp3_;
	ClutterActor* _tmp4_;
	_data6_ = _data7_->_data6_;
	self = _data6_->self;
	_tmp0_ = _data6_->current_item;
	boxes_collection_view_get_item_pos (self, _tmp0_, &_tmp1_, &_tmp2_);
	item_x2 = _tmp1_;
	item_y2 = _tmp2_;
	_tmp3_ = _data7_->actor;
	clutter_actor_set_x (_tmp3_, item_x2);
	_tmp4_ = _data7_->actor;
	clutter_actor_set_y (_tmp4_, item_y2);
	result = FALSE;
	return result;
}


static gboolean ___lambda104__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda104_ (self);
	return result;
}


static void ____lambda103_ (Block7Data* _data7_, GtkAllocation* allocation) {
	Block6Data* _data6_;
	BoxesCollectionView * self;
	_data6_ = _data7_->_data6_;
	self = _data6_->self;
	g_return_if_fail (allocation != NULL);
	g_idle_add_full (G_PRIORITY_HIGH, ___lambda104__gsource_func, block7_data_ref (_data7_), block7_data_unref);
}


static void _____lambda103__gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
	____lambda103_ (self, allocation);
}


static void ____lambda105_ (Block7Data* _data7_) {
	Block6Data* _data6_;
	BoxesCollectionView * self;
	ClutterActor* _tmp0_;
	gulong _tmp1_;
	GdMainIconView* _tmp2_;
	gulong _tmp3_;
	gboolean _tmp4_ = FALSE;
	BoxesApp* _tmp5_;
	BoxesUIState _tmp6_;
	BoxesUIState _tmp7_;
	gboolean _tmp13_;
	_data6_ = _data7_->_data6_;
	self = _data6_->self;
	_tmp0_ = _data7_->actor;
	_tmp1_ = _data7_->completed_id;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
	_tmp2_ = self->priv->icon_view;
	_tmp3_ = _data7_->id;
	g_signal_handler_disconnect ((GObject*) _tmp2_, _tmp3_);
	_tmp5_ = boxes_app_app;
	_tmp6_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ == BOXES_UI_STATE_COLLECTION) {
		_tmp4_ = TRUE;
	} else {
		BoxesApp* _tmp8_;
		BoxesCollectionItem* _tmp9_;
		ClutterActor* _tmp10_;
		ClutterActor* _tmp11_;
		ClutterActor* _tmp12_;
		_tmp8_ = boxes_app_app;
		_tmp9_ = _tmp8_->current_item;
		_tmp10_ = boxes_ui_get_actor ((BoxesUI*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _data7_->actor;
		_tmp4_ = _tmp11_ != _tmp12_;
	}
	_tmp13_ = _tmp4_;
	if (_tmp13_) {
		ClutterActor* _tmp14_;
		_tmp14_ = _data7_->actor;
		boxes_actor_remove (_tmp14_);
	}
}


static void _____lambda105__clutter_actor_transitions_completed (ClutterActor* _sender, gpointer self) {
	____lambda105_ (self);
}


static void boxes_collection_view_real_ui_state_changed (BoxesUI* base) {
	BoxesCollectionView * self;
	Block6Data* _data6_;
	guint opacity;
	BoxesApp* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	BoxesCollectionItem* _tmp2_;
	BoxesUIState _tmp3_;
	BoxesUIState _tmp4_;
	ClutterActor* _tmp65_;
	ClutterActor* _tmp66_;
	guint _tmp67_;
	BoxesCollectionItem* _tmp68_;
	self = (BoxesCollectionView*) base;
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	opacity = (guint) 0;
	_tmp0_ = boxes_app_app;
	_tmp1_ = _tmp0_->current_item;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data6_->current_item = _tmp2_;
	_tmp3_ = boxes_ui_get_ui_state ((BoxesUI*) self);
	_tmp4_ = _tmp3_;
	switch (_tmp4_) {
		case BOXES_UI_STATE_COLLECTION:
		{
			GdMainIconView* _tmp5_;
			BoxesCollectionItem* _tmp6_;
			opacity = (guint) 255;
			_tmp5_ = self->priv->icon_view;
			g_signal_emit_by_name ((GtkIconView*) _tmp5_, "unselect-all");
			_tmp6_ = _data6_->current_item;
			if (_tmp6_ != NULL) {
				Block7Data* _data7_;
				BoxesCollectionItem* _tmp7_;
				ClutterActor* _tmp8_;
				ClutterActor* _tmp9_;
				ClutterActor* _tmp10_;
				ClutterActor* _tmp11_;
				ClutterActor* _tmp12_;
				gfloat item_x = 0.0F;
				gfloat item_y = 0.0F;
				BoxesCollectionItem* _tmp13_;
				gfloat _tmp14_ = 0.0F;
				gfloat _tmp15_ = 0.0F;
				ClutterActor* _tmp16_;
				gfloat _tmp17_;
				ClutterActor* _tmp18_;
				gfloat _tmp19_;
				ClutterActor* _tmp20_;
				ClutterActor* _tmp21_;
				ClutterActor* _tmp22_;
				BoxesApp* _tmp23_;
				guint _tmp24_;
				GdMainIconView* _tmp25_;
				gulong _tmp26_ = 0UL;
				ClutterActor* _tmp27_;
				gulong _tmp28_ = 0UL;
				_data7_ = g_slice_new0 (Block7Data);
				_data7_->_ref_count_ = 1;
				_data7_->_data6_ = block6_data_ref (_data6_);
				_tmp7_ = _data6_->current_item;
				_tmp8_ = boxes_ui_get_actor ((BoxesUI*) _tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = _g_object_ref0 (_tmp9_);
				_data7_->actor = _tmp10_;
				_tmp11_ = _data7_->actor;
				clutter_actor_set_easing_duration (_tmp11_, (guint) 0);
				_tmp12_ = _data7_->actor;
				clutter_actor_show (_tmp12_);
				_tmp13_ = _data6_->current_item;
				boxes_collection_view_get_item_pos (self, _tmp13_, &_tmp14_, &_tmp15_);
				item_x = _tmp14_;
				item_y = _tmp15_;
				_tmp16_ = _data7_->actor;
				_tmp17_ = item_x;
				g_object_set (_tmp16_, "fixed-x", _tmp17_, NULL);
				_tmp18_ = _data7_->actor;
				_tmp19_ = item_y;
				g_object_set (_tmp18_, "fixed-y", _tmp19_, NULL);
				_tmp20_ = _data7_->actor;
				_tmp21_ = _data7_->actor;
				g_object_set (_tmp21_, "natural-width", (gfloat) BOXES_MACHINE_SCREENSHOT_WIDTH, NULL);
				g_object_set (_tmp20_, "min-width", (gfloat) BOXES_MACHINE_SCREENSHOT_WIDTH, NULL);
				_tmp22_ = _data7_->actor;
				_tmp23_ = boxes_app_app;
				_tmp24_ = _tmp23_->duration;
				clutter_actor_set_easing_duration (_tmp22_, _tmp24_);
				_tmp25_ = self->priv->icon_view;
				_tmp26_ = g_signal_connect_data ((GtkWidget*) _tmp25_, "size-allocate", (GCallback) _____lambda103__gtk_widget_size_allocate, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
				_data7_->id = _tmp26_;
				_data7_->completed_id = (gulong) 0;
				_tmp27_ = _data7_->actor;
				_tmp28_ = g_signal_connect_data (_tmp27_, "transitions-completed", (GCallback) _____lambda105__clutter_actor_transitions_completed, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
				_data7_->completed_id = _tmp28_;
				block7_data_unref (_data7_);
				_data7_ = NULL;
			}
			break;
		}
		case BOXES_UI_STATE_CREDS:
		{
			BoxesCollectionItem* _tmp29_;
			ClutterActor* _tmp30_;
			ClutterActor* _tmp31_;
			ClutterActor* _tmp32_;
			ClutterActor* actor;
			ClutterActor* _tmp33_;
			ClutterActor* _tmp34_ = NULL;
			ClutterActor* _tmp50_;
			ClutterActor* _tmp51_;
			ClutterActor* _tmp52_;
			ClutterActor* _tmp53_;
			ClutterActor* _tmp54_;
			ClutterActor* _tmp55_;
			BoxesApp* _tmp56_;
			guint _tmp57_;
			_tmp29_ = _data6_->current_item;
			_tmp30_ = boxes_ui_get_actor ((BoxesUI*) _tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = _g_object_ref0 (_tmp31_);
			actor = _tmp32_;
			_tmp33_ = actor;
			_tmp34_ = clutter_actor_get_parent (_tmp33_);
			if (_tmp34_ == NULL) {
				BoxesApp* _tmp35_;
				ClutterActor* _tmp36_;
				ClutterActor* _tmp37_;
				ClutterActor* _tmp38_;
				ClutterActor* _tmp39_;
				gfloat item_x = 0.0F;
				gfloat item_y = 0.0F;
				BoxesCollectionItem* _tmp40_;
				gfloat _tmp41_ = 0.0F;
				gfloat _tmp42_ = 0.0F;
				gfloat _tmp43_;
				gfloat _tmp44_;
				gfloat _tmp45_;
				gfloat _tmp46_;
				ClutterActorBox _tmp47_ = {0};
				ClutterActorBox box;
				ClutterActor* _tmp48_;
				ClutterActorBox _tmp49_;
				_tmp35_ = boxes_app_app;
				_tmp36_ = _tmp35_->overlay_bin_actor;
				_tmp37_ = actor;
				clutter_actor_add_child (_tmp36_, _tmp37_);
				_tmp38_ = actor;
				clutter_actor_set_easing_mode (_tmp38_, CLUTTER_LINEAR);
				_tmp39_ = actor;
				clutter_actor_set_easing_duration (_tmp39_, (guint) 0);
				_tmp40_ = _data6_->current_item;
				boxes_collection_view_get_item_pos (self, _tmp40_, &_tmp41_, &_tmp42_);
				item_x = _tmp41_;
				item_y = _tmp42_;
				_tmp43_ = item_x;
				_tmp44_ = item_y;
				_tmp45_ = item_x;
				_tmp46_ = item_y;
				_tmp47_.x1 = _tmp43_;
				_tmp47_.y1 = _tmp44_;
				_tmp47_.x2 = _tmp45_ + BOXES_MACHINE_SCREENSHOT_WIDTH;
				_tmp47_.y2 = _tmp46_ + (BOXES_MACHINE_SCREENSHOT_HEIGHT * 2);
				box = _tmp47_;
				_tmp48_ = actor;
				_tmp49_ = box;
				clutter_actor_allocate (_tmp48_, &_tmp49_, 0);
			}
			_tmp50_ = actor;
			_tmp51_ = actor;
			g_object_set (_tmp51_, "natural-width", (gfloat) (BOXES_MACHINE_SCREENSHOT_WIDTH * 2), NULL);
			g_object_set (_tmp50_, "min-width", (gfloat) (BOXES_MACHINE_SCREENSHOT_WIDTH * 2), NULL);
			_tmp52_ = actor;
			clutter_actor_set_fixed_position_set (_tmp52_, FALSE);
			_tmp53_ = actor;
			clutter_actor_set_x_align (_tmp53_, CLUTTER_ACTOR_ALIGN_CENTER);
			_tmp54_ = actor;
			clutter_actor_set_y_align (_tmp54_, CLUTTER_ACTOR_ALIGN_CENTER);
			_tmp55_ = actor;
			_tmp56_ = boxes_app_app;
			_tmp57_ = _tmp56_->duration;
			clutter_actor_set_easing_duration (_tmp55_, _tmp57_);
			_g_object_unref0 (actor);
			break;
		}
		case BOXES_UI_STATE_WIZARD:
		{
			BoxesCollectionItem* _tmp58_;
			_tmp58_ = _data6_->current_item;
			if (_tmp58_ != NULL) {
				BoxesCollectionItem* _tmp59_;
				ClutterActor* _tmp60_;
				ClutterActor* _tmp61_;
				_tmp59_ = _data6_->current_item;
				_tmp60_ = boxes_ui_get_actor ((BoxesUI*) _tmp59_);
				_tmp61_ = _tmp60_;
				boxes_actor_remove (_tmp61_);
			}
			break;
		}
		case BOXES_UI_STATE_PROPERTIES:
		{
			BoxesCollectionItem* _tmp62_;
			ClutterActor* _tmp63_;
			ClutterActor* _tmp64_;
			_tmp62_ = _data6_->current_item;
			_tmp63_ = boxes_ui_get_actor ((BoxesUI*) _tmp62_);
			_tmp64_ = _tmp63_;
			clutter_actor_hide (_tmp64_);
			break;
		}
		default:
		break;
	}
	_tmp65_ = boxes_ui_get_actor ((BoxesUI*) self);
	_tmp66_ = _tmp65_;
	_tmp67_ = opacity;
	boxes_fade_actor (_tmp66_, _tmp67_);
	_tmp68_ = _data6_->current_item;
	if (_tmp68_ != NULL) {
		BoxesCollectionItem* _tmp69_;
		BoxesUIState _tmp70_;
		BoxesUIState _tmp71_;
		_tmp69_ = _data6_->current_item;
		_tmp70_ = boxes_ui_get_ui_state ((BoxesUI*) self);
		_tmp71_ = _tmp70_;
		boxes_ui_set_ui_state ((BoxesUI*) _tmp69_, _tmp71_);
	}
	block6_data_unref (_data6_);
	_data6_ = NULL;
}


static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


void boxes_collection_view_update_item_visible (BoxesCollectionView* self, BoxesCollectionItem* item) {
	gboolean visible;
	BoxesCollectionItem* _tmp0_;
	BoxesCollectionItem* _tmp14_;
	ClutterActor* _tmp15_;
	ClutterActor* _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	visible = FALSE;
	_tmp0_ = item;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_MACHINE)) {
		BoxesCollectionItem* _tmp1_;
		BoxesMachine* _tmp2_;
		BoxesMachine* machine;
		BoxesCategory* _tmp3_;
		BoxesCategory* _tmp4_;
		BoxesCategoryKind _tmp5_;
		_tmp1_ = item;
		_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp1_) : NULL);
		machine = _tmp2_;
		_tmp3_ = boxes_collection_view_get_category (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_->kind;
		switch (_tmp5_) {
			case BOXES_CATEGORY_KIND_USER:
			{
				BoxesCategory* _tmp6_;
				BoxesCategory* _tmp7_;
				const gchar* _tmp8_;
				BoxesMachine* _tmp9_;
				BoxesDisplayConfig* _tmp10_;
				gchar** _tmp11_;
				gint _tmp11__length1;
				gchar** _tmp12_;
				gint _tmp12__length1;
				gchar** _tmp13_;
				gint _tmp13__length1;
				_tmp6_ = boxes_collection_view_get_category (self);
				_tmp7_ = _tmp6_;
				_tmp8_ = _tmp7_->name;
				_tmp9_ = machine;
				_tmp10_ = _tmp9_->config;
				_tmp11_ = boxes_display_config_get_categories (_tmp10_, &_tmp11__length1);
				_tmp12_ = _tmp11_;
				_tmp12__length1 = _tmp11__length1;
				_tmp13_ = _tmp12_;
				_tmp13__length1 = _tmp12__length1;
				visible = _vala_string_array_contains (_tmp13_, _tmp12__length1, _tmp8_);
				_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
				break;
			}
			case BOXES_CATEGORY_KIND_NEW:
			{
				visible = TRUE;
				break;
			}
			default:
			break;
		}
		_g_object_unref0 (machine);
	}
	_tmp14_ = item;
	_tmp15_ = boxes_ui_get_actor ((BoxesUI*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = visible;
	g_object_set (_tmp16_, "visible", _tmp17_, NULL);
}


static void _vala_array_add1 (GIcon*** array, int* length, int* size, GIcon* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GIcon*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void boxes_collection_view_update_screenshot (BoxesCollectionView* self, GtkTreeIter* iter) {
	BoxesCollectionItem* item = NULL;
	GIcon** _tmp0_ = NULL;
	GIcon** emblem_icons;
	gint emblem_icons_length1;
	gint _emblem_icons_size_;
	GtkListStore* _tmp1_;
	GtkTreeIter _tmp2_;
	BoxesCollectionItem* _tmp3_;
	BoxesMachine* _tmp4_;
	BoxesMachine* machine;
	BoxesMachine* _tmp5_;
	BoxesMachine* _tmp6_;
	GdkPixbuf* _tmp7_;
	GdkPixbuf* _tmp8_;
	GdkPixbuf* _tmp9_;
	GdkPixbuf* pixbuf;
	BoxesMachine* _tmp10_;
	BoxesDisplayConfig* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gchar** _tmp13_;
	gint _tmp13__length1;
	gchar** _tmp14_;
	gint _tmp14__length1;
	gboolean _tmp15_;
	GIcon** _tmp18_;
	gint _tmp18__length1;
	GtkListStore* _tmp47_;
	GtkTreeIter _tmp48_;
	GdkPixbuf* _tmp49_;
	GdMainIconView* _tmp50_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (iter != NULL);
	_tmp0_ = g_new0 (GIcon*, 0 + 1);
	emblem_icons = _tmp0_;
	emblem_icons_length1 = 0;
	_emblem_icons_size_ = emblem_icons_length1;
	_tmp1_ = self->priv->model;
	_tmp2_ = *iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp1_, &_tmp2_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item, -1);
	_tmp3_ = item;
	_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp3_) : NULL);
	machine = _tmp4_;
	_tmp5_ = machine;
	g_return_if_fail (_tmp5_ != NULL);
	_tmp6_ = machine;
	_tmp7_ = boxes_machine_get_pixbuf (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _g_object_ref0 (_tmp8_);
	pixbuf = _tmp9_;
	_tmp10_ = machine;
	_tmp11_ = _tmp10_->config;
	_tmp12_ = boxes_display_config_get_categories (_tmp11_, &_tmp12__length1);
	_tmp13_ = _tmp12_;
	_tmp13__length1 = _tmp12__length1;
	_tmp14_ = _tmp13_;
	_tmp14__length1 = _tmp13__length1;
	_tmp15_ = _vala_string_array_contains (_tmp14_, _tmp13__length1, "favorite");
	_tmp14_ = (_vala_array_free (_tmp14_, _tmp14__length1, (GDestroyNotify) g_free), NULL);
	if (_tmp15_) {
		GIcon** _tmp16_;
		gint _tmp16__length1;
		GIcon* _tmp17_ = NULL;
		_tmp16_ = emblem_icons;
		_tmp16__length1 = emblem_icons_length1;
		_tmp17_ = boxes_create_symbolic_emblem ("emblem-favorite");
		_vala_array_add1 (&emblem_icons, &emblem_icons_length1, &_emblem_icons_size_, _tmp17_);
	}
	_tmp18_ = emblem_icons;
	_tmp18__length1 = emblem_icons_length1;
	if (_tmp18__length1 > 0) {
		GdkPixbuf* _tmp19_;
		GEmblemedIcon* _tmp20_;
		GEmblemedIcon* emblemed_icon;
		GIcon** _tmp21_;
		gint _tmp21__length1;
		GtkIconTheme* _tmp27_ = NULL;
		GtkIconTheme* _tmp28_;
		GtkIconTheme* theme;
		_tmp19_ = pixbuf;
		_tmp20_ = (GEmblemedIcon*) g_emblemed_icon_new ((GIcon*) _tmp19_, NULL);
		emblemed_icon = _tmp20_;
		_tmp21_ = emblem_icons;
		_tmp21__length1 = emblem_icons_length1;
		{
			GIcon** emblem_icon_collection = NULL;
			gint emblem_icon_collection_length1 = 0;
			gint _emblem_icon_collection_size_ = 0;
			gint emblem_icon_it = 0;
			emblem_icon_collection = _tmp21_;
			emblem_icon_collection_length1 = _tmp21__length1;
			for (emblem_icon_it = 0; emblem_icon_it < _tmp21__length1; emblem_icon_it = emblem_icon_it + 1) {
				GIcon* _tmp22_;
				GIcon* emblem_icon = NULL;
				_tmp22_ = _g_object_ref0 (emblem_icon_collection[emblem_icon_it]);
				emblem_icon = _tmp22_;
				{
					GEmblemedIcon* _tmp23_;
					GIcon* _tmp24_;
					GEmblem* _tmp25_;
					GEmblem* _tmp26_;
					_tmp23_ = emblemed_icon;
					_tmp24_ = emblem_icon;
					_tmp25_ = g_emblem_new (_tmp24_);
					_tmp26_ = _tmp25_;
					g_emblemed_icon_add_emblem (_tmp23_, _tmp26_);
					_g_object_unref0 (_tmp26_);
					_g_object_unref0 (emblem_icon);
				}
			}
		}
		_tmp27_ = gtk_icon_theme_get_default ();
		_tmp28_ = _g_object_ref0 (_tmp27_);
		theme = _tmp28_;
		{
			GdkPixbuf* _tmp29_;
			gint _tmp30_;
			gint _tmp31_;
			GdkPixbuf* _tmp32_;
			gint _tmp33_;
			gint _tmp34_;
			gint _tmp35_ = 0;
			gint size;
			GtkIconTheme* _tmp36_;
			GEmblemedIcon* _tmp37_;
			gint _tmp38_;
			GtkIconInfo* _tmp39_ = NULL;
			GtkIconInfo* icon_info;
			GtkIconInfo* _tmp40_;
			GdkPixbuf* _tmp41_ = NULL;
			GdkPixbuf* _tmp42_;
			_tmp29_ = pixbuf;
			_tmp30_ = gdk_pixbuf_get_width (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = pixbuf;
			_tmp33_ = gdk_pixbuf_get_height (_tmp32_);
			_tmp34_ = _tmp33_;
			_tmp35_ = MAX (_tmp31_, _tmp34_);
			size = _tmp35_;
			_tmp36_ = theme;
			_tmp37_ = emblemed_icon;
			_tmp38_ = size;
			_tmp39_ = gtk_icon_theme_lookup_by_gicon (_tmp36_, (GIcon*) _tmp37_, _tmp38_, GTK_ICON_LOOKUP_FORCE_SIZE);
			icon_info = _tmp39_;
			_tmp40_ = icon_info;
			_tmp41_ = gtk_icon_info_load_icon (_tmp40_, &_inner_error_);
			_tmp42_ = _tmp41_;
			if (_inner_error_ != NULL) {
				_gtk_icon_info_free0 (icon_info);
				goto __catch7_g_error;
			}
			_g_object_unref0 (pixbuf);
			pixbuf = _tmp42_;
			_gtk_icon_info_free0 (icon_info);
		}
		goto __finally7;
		__catch7_g_error:
		{
			GError* _error_ = NULL;
			GError* _tmp43_;
			const gchar* _tmp44_;
			gchar* _tmp45_;
			gchar* _tmp46_;
			_error_ = _inner_error_;
			_inner_error_ = NULL;
			_tmp43_ = _error_;
			_tmp44_ = _tmp43_->message;
			_tmp45_ = g_strconcat ("Unable to render the emblem: ", _tmp44_, NULL);
			_tmp46_ = _tmp45_;
			g_warning ("collection-view.vala:179: %s", _tmp46_);
			_g_free0 (_tmp46_);
			_g_error_free0 (_error_);
		}
		__finally7:
		if (_inner_error_ != NULL) {
			_g_object_unref0 (theme);
			_g_object_unref0 (emblemed_icon);
			_g_object_unref0 (pixbuf);
			_g_object_unref0 (machine);
			emblem_icons = (_vala_array_free (emblem_icons, emblem_icons_length1, (GDestroyNotify) g_object_unref), NULL);
			_g_object_unref0 (item);
			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;
		}
		_g_object_unref0 (theme);
		_g_object_unref0 (emblemed_icon);
	}
	_tmp47_ = self->priv->model;
	_tmp48_ = *iter;
	_tmp49_ = pixbuf;
	gtk_list_store_set (_tmp47_, &_tmp48_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SCREENSHOT, _tmp49_, -1);
	_tmp50_ = self->priv->icon_view;
	gtk_widget_queue_draw ((GtkWidget*) _tmp50_);
	_g_object_unref0 (pixbuf);
	_g_object_unref0 (machine);
	emblem_icons = (_vala_array_free (emblem_icons, emblem_icons_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (item);
}


static GtkTreeIter* _gtk_tree_iter_dup (GtkTreeIter* self) {
	GtkTreeIter* dup;
	dup = g_new0 (GtkTreeIter, 1);
	memcpy (dup, self, sizeof (GtkTreeIter));
	return dup;
}


static gpointer __gtk_tree_iter_dup0 (gpointer self) {
	return self ? _gtk_tree_iter_dup (self) : NULL;
}


static void boxes_collection_view_append (BoxesCollectionView* self, const gchar* title, const gchar* info, BoxesCollectionItem* item, GtkTreeIter* result) {
	GtkTreeIter iter = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	GtkListStore* _tmp2_;
	GtkTreeIter _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GtkListStore* _tmp9_;
	GtkTreeIter _tmp10_;
	GtkListStore* _tmp11_;
	GtkTreeIter _tmp12_;
	BoxesCollectionItem* _tmp13_;
	GtkTreeIter _tmp14_;
	BoxesCollectionItem* _tmp15_;
	GtkTreeIter _tmp16_;
	GtkTreeIter* _tmp17_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->model;
	gtk_list_store_append (_tmp0_, &_tmp1_);
	iter = _tmp1_;
	_tmp2_ = self->priv->model;
	_tmp3_ = iter;
	_tmp4_ = title;
	gtk_list_store_set (_tmp2_, &_tmp3_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE, _tmp4_, -1);
	_tmp5_ = info;
	if (_tmp5_ != NULL) {
		GtkListStore* _tmp6_;
		GtkTreeIter _tmp7_;
		const gchar* _tmp8_;
		_tmp6_ = self->priv->model;
		_tmp7_ = iter;
		_tmp8_ = info;
		gtk_list_store_set (_tmp6_, &_tmp7_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_INFO, _tmp8_, -1);
	}
	_tmp9_ = self->priv->model;
	_tmp10_ = iter;
	gtk_list_store_set (_tmp9_, &_tmp10_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, FALSE, -1);
	_tmp11_ = self->priv->model;
	_tmp12_ = iter;
	_tmp13_ = item;
	gtk_list_store_set (_tmp11_, &_tmp12_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, _tmp13_, -1);
	_tmp14_ = iter;
	boxes_collection_view_update_screenshot (self, &_tmp14_);
	_tmp15_ = item;
	_tmp16_ = iter;
	_tmp17_ = __gtk_tree_iter_dup0 (&_tmp16_);
	g_object_set_data_full ((GObject*) _tmp15_, "iter", _tmp17_, g_free);
	*result = iter;
	return;
}


static Block8Data* block8_data_ref (Block8Data* _data8_) {
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}


static void block8_data_unref (void * _userdata_) {
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->machine);
		_g_object_unref0 (_data8_->item);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}


static void __lambda106_ (Block8Data* _data8_) {
	BoxesCollectionView * self;
	GtkTreeIter _tmp0_;
	self = _data8_->self;
	_tmp0_ = _data8_->iter;
	boxes_collection_view_update_screenshot (self, &_tmp0_);
}


static void ___lambda106__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda106_ (self);
}


static void __lambda107_ (Block8Data* _data8_) {
	BoxesCollectionView * self;
	GtkTreeIter _tmp0_;
	self = _data8_->self;
	_tmp0_ = _data8_->iter;
	boxes_collection_view_update_screenshot (self, &_tmp0_);
}


static void ___lambda107__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda107_ (self);
}


static void __lambda108_ (Block8Data* _data8_) {
	BoxesCollectionView * self;
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_;
	BoxesCollectionItem* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GdMainIconView* _tmp5_;
	self = _data8_->self;
	_tmp0_ = self->priv->model;
	_tmp1_ = _data8_->iter;
	_tmp2_ = _data8_->item;
	_tmp3_ = boxes_collection_item_get_name (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_list_store_set (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_TITLE, _tmp4_, -1);
	_tmp5_ = self->priv->icon_view;
	gtk_widget_queue_draw ((GtkWidget*) _tmp5_);
}


static void ___lambda108__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda108_ (self);
}


static void __lambda109_ (Block8Data* _data8_) {
	BoxesCollectionView * self;
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_;
	BoxesMachine* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GdMainIconView* _tmp5_;
	self = _data8_->self;
	_tmp0_ = self->priv->model;
	_tmp1_ = _data8_->iter;
	_tmp2_ = _data8_->machine;
	_tmp3_ = boxes_machine_get_info (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_list_store_set (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_INFO, _tmp4_, -1);
	_tmp5_ = self->priv->icon_view;
	gtk_widget_queue_draw ((GtkWidget*) _tmp5_);
}


static void ___lambda109__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda109_ (self);
}


void boxes_collection_view_add_item (BoxesCollectionView* self, BoxesCollectionItem* item) {
	Block8Data* _data8_;
	BoxesCollectionItem* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	BoxesCollectionItem* _tmp2_;
	BoxesMachine* _tmp3_;
	BoxesMachine* _tmp4_;
	BoxesMachine* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	BoxesMachine* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	BoxesCollectionItem* _tmp13_;
	GtkTreeIter _tmp14_ = {0};
	BoxesMachine* _tmp15_;
	gulong _tmp16_ = 0UL;
	gulong pixbuf_id;
	BoxesCollectionItem* _tmp17_;
	gulong _tmp18_;
	BoxesMachine* _tmp19_;
	BoxesDisplayConfig* _tmp20_;
	gulong _tmp21_ = 0UL;
	gulong categories_id;
	BoxesCollectionItem* _tmp22_;
	gulong _tmp23_;
	BoxesCollectionItem* _tmp24_;
	gulong _tmp25_ = 0UL;
	gulong name_id;
	BoxesCollectionItem* _tmp26_;
	gulong _tmp27_;
	BoxesMachine* _tmp28_;
	gulong _tmp29_ = 0UL;
	gulong info_id;
	BoxesCollectionItem* _tmp30_;
	gulong _tmp31_;
	BoxesCollectionItem* _tmp32_;
	BoxesApp* _tmp33_;
	BoxesUIState _tmp34_;
	BoxesUIState _tmp35_;
	BoxesCollectionItem* _tmp36_;
	ClutterActor* _tmp37_;
	ClutterActor* _tmp38_;
	BoxesCollectionItem* _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_tmp0_ = item;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data8_->item);
	_data8_->item = _tmp1_;
	_tmp2_ = _data8_->item;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
	_data8_->machine = _tmp3_;
	_tmp4_ = _data8_->machine;
	if (_tmp4_ == NULL) {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		_tmp5_ = g_strdup_printf ("Cannot add item %p", &_data8_->item);
		_tmp6_ = _tmp5_;
		g_warning ("collection-view.vala:209: %s", _tmp6_);
		_g_free0 (_tmp6_);
		block8_data_unref (_data8_);
		_data8_ = NULL;
		return;
	}
	_tmp7_ = _data8_->machine;
	_tmp8_ = boxes_collection_item_get_name ((BoxesCollectionItem*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _data8_->machine;
	_tmp11_ = boxes_machine_get_info (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = _data8_->item;
	boxes_collection_view_append (self, _tmp9_, _tmp12_, _tmp13_, &_tmp14_);
	_data8_->iter = _tmp14_;
	_tmp15_ = _data8_->machine;
	_tmp16_ = g_signal_connect_data ((GObject*) _tmp15_, "notify::pixbuf", (GCallback) ___lambda106__g_object_notify, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	pixbuf_id = _tmp16_;
	_tmp17_ = _data8_->item;
	_tmp18_ = pixbuf_id;
	g_object_set_data_full ((GObject*) _tmp17_, "pixbuf_id", (gpointer) ((guintptr) _tmp18_), NULL);
	_tmp19_ = _data8_->machine;
	_tmp20_ = _tmp19_->config;
	_tmp21_ = g_signal_connect_data ((GObject*) _tmp20_, "notify::categories", (GCallback) ___lambda107__g_object_notify, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	categories_id = _tmp21_;
	_tmp22_ = _data8_->item;
	_tmp23_ = categories_id;
	g_object_set_data_full ((GObject*) _tmp22_, "categories_id", (gpointer) ((guintptr) _tmp23_), NULL);
	_tmp24_ = _data8_->item;
	_tmp25_ = g_signal_connect_data ((GObject*) _tmp24_, "notify::name", (GCallback) ___lambda108__g_object_notify, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	name_id = _tmp25_;
	_tmp26_ = _data8_->item;
	_tmp27_ = name_id;
	g_object_set_data_full ((GObject*) _tmp26_, "name_id", (gpointer) ((guintptr) _tmp27_), NULL);
	_tmp28_ = _data8_->machine;
	_tmp29_ = g_signal_connect_data ((GObject*) _tmp28_, "notify::info", (GCallback) ___lambda109__g_object_notify, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	info_id = _tmp29_;
	_tmp30_ = _data8_->item;
	_tmp31_ = info_id;
	g_object_set_data_full ((GObject*) _tmp30_, "info_id", (gpointer) ((guintptr) _tmp31_), NULL);
	_tmp32_ = _data8_->item;
	_tmp33_ = boxes_app_app;
	_tmp34_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp33_);
	_tmp35_ = _tmp34_;
	boxes_ui_set_ui_state ((BoxesUI*) _tmp32_, _tmp35_);
	_tmp36_ = _data8_->item;
	_tmp37_ = boxes_ui_get_actor ((BoxesUI*) _tmp36_);
	_tmp38_ = _tmp37_;
	boxes_actor_remove (_tmp38_);
	_tmp39_ = _data8_->item;
	boxes_collection_view_update_item_visible (self, _tmp39_);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}


static Block9Data* block9_data_ref (Block9Data* _data9_) {
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}


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


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 block9_data_unref (void * _userdata_) {
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		BoxesCollectionView * self;
		self = _data9_->self;
		__g_list_free__g_object_unref0_0 (_data9_->selected);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}


static gboolean __lambda40_ (Block9Data* _data9_, GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter) {
	BoxesCollectionView * self;
	gboolean result = FALSE;
	BoxesCollectionItem* item = NULL;
	gboolean is_selected = FALSE;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	gboolean _tmp5_;
	self = _data9_->self;
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = model;
	_tmp1_ = *iter;
	gtk_tree_model_get (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, &is_selected, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item, -1);
	_tmp3_ = is_selected;
	if (_tmp3_) {
		BoxesCollectionItem* _tmp4_;
		_tmp4_ = item;
		_tmp2_ = _tmp4_ != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	_tmp5_ = _tmp2_;
	if (_tmp5_) {
		BoxesCollectionItem* _tmp6_;
		BoxesCollectionItem* _tmp7_;
		_tmp6_ = item;
		_tmp7_ = _g_object_ref0 (_tmp6_);
		_data9_->selected = g_list_append (_data9_->selected, _tmp7_);
	}
	result = FALSE;
	_g_object_unref0 (item);
	return result;
}


static gboolean ___lambda40__gtk_tree_model_foreach_func (GtkTreeModel* model, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = __lambda40_ (self, model, path, iter);
	return result;
}


GList* boxes_collection_view_get_selected_items (BoxesCollectionView* self) {
	GList* result = NULL;
	Block9Data* _data9_;
	GtkListStore* _tmp0_;
	GList* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_data9_->selected = NULL;
	_tmp0_ = self->priv->model;
	gtk_tree_model_foreach ((GtkTreeModel*) _tmp0_, ___lambda40__gtk_tree_model_foreach_func, _data9_);
	_tmp1_ = _data9_->selected;
	_data9_->selected = NULL;
	result = _tmp1_;
	block9_data_unref (_data9_);
	_data9_ = NULL;
	return result;
}


void boxes_collection_view_remove_item (BoxesCollectionView* self, BoxesCollectionItem* item) {
	BoxesCollectionItem* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	GtkTreeIter* _tmp2_;
	GtkTreeIter* iter;
	GtkTreeIter* _tmp3_;
	GtkListStore* _tmp4_;
	GtkTreeIter* _tmp5_;
	GtkTreeIter _tmp6_;
	BoxesCollectionItem* _tmp7_;
	BoxesCollectionItem* _tmp8_;
	gconstpointer _tmp9_ = NULL;
	gulong pixbuf_id;
	BoxesCollectionItem* _tmp10_;
	gulong _tmp11_;
	BoxesCollectionItem* _tmp12_;
	gconstpointer _tmp13_ = NULL;
	gulong name_id;
	BoxesCollectionItem* _tmp14_;
	gulong _tmp15_;
	BoxesCollectionItem* _tmp16_;
	gconstpointer _tmp17_ = NULL;
	gulong info_id;
	BoxesCollectionItem* _tmp18_;
	gulong _tmp19_;
	BoxesCollectionItem* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = item;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "iter");
	_tmp2_ = __gtk_tree_iter_dup0 ((GtkTreeIter*) _tmp1_);
	iter = _tmp2_;
	_tmp3_ = iter;
	if (_tmp3_ == NULL) {
		g_debug ("collection-view.vala:268: item not in view or already removed");
		_g_free0 (iter);
		return;
	}
	_tmp4_ = self->priv->model;
	_tmp5_ = iter;
	_tmp6_ = *_tmp5_;
	gtk_list_store_remove (_tmp4_, &_tmp6_);
	_tmp7_ = item;
	g_object_set_data_full ((GObject*) _tmp7_, "iter", NULL, g_free);
	_tmp8_ = item;
	_tmp9_ = g_object_get_data ((GObject*) _tmp8_, "pixbuf_id");
	pixbuf_id = (gulong) ((guintptr) _tmp9_);
	_tmp10_ = item;
	_tmp11_ = pixbuf_id;
	g_signal_handler_disconnect ((GObject*) _tmp10_, _tmp11_);
	_tmp12_ = item;
	_tmp13_ = g_object_get_data ((GObject*) _tmp12_, "name_id");
	name_id = (gulong) ((guintptr) _tmp13_);
	_tmp14_ = item;
	_tmp15_ = name_id;
	g_signal_handler_disconnect ((GObject*) _tmp14_, _tmp15_);
	_tmp16_ = item;
	_tmp17_ = g_object_get_data ((GObject*) _tmp16_, "info_id");
	info_id = (gulong) ((guintptr) _tmp17_);
	_tmp18_ = item;
	_tmp19_ = info_id;
	g_signal_handler_disconnect ((GObject*) _tmp18_, _tmp19_);
	_tmp20_ = item;
	if ((G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp20_) : NULL) != NULL) {
		BoxesCollectionItem* _tmp21_;
		BoxesMachine* _tmp22_;
		BoxesMachine* machine;
		BoxesCollectionItem* _tmp23_;
		gconstpointer _tmp24_ = NULL;
		gulong categories_id;
		BoxesMachine* _tmp25_;
		BoxesDisplayConfig* _tmp26_;
		gulong _tmp27_;
		_tmp21_ = item;
		_tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp21_) : NULL);
		machine = _tmp22_;
		_tmp23_ = item;
		_tmp24_ = g_object_get_data ((GObject*) _tmp23_, "categories_id");
		categories_id = (gulong) ((guintptr) _tmp24_);
		_tmp25_ = machine;
		_tmp26_ = _tmp25_->config;
		_tmp27_ = categories_id;
		g_signal_handler_disconnect ((GObject*) _tmp26_, _tmp27_);
		_g_object_unref0 (machine);
	}
	_g_free0 (iter);
}


static GtkTreePath* boxes_collection_view_get_path_for_item (BoxesCollectionView* self, BoxesCollectionItem* item) {
	GtkTreePath* result = NULL;
	BoxesCollectionItem* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	GtkTreeIter* _tmp2_;
	GtkTreeIter* iter;
	GtkTreeIter* _tmp3_;
	GtkTreeIter filter_iter = {0};
	GtkTreeModelFilter* _tmp4_;
	GtkTreeIter* _tmp5_;
	GtkTreeIter _tmp6_ = {0};
	GtkTreeIter _tmp7_;
	gboolean _tmp8_ = FALSE;
	GtkTreeModelFilter* _tmp9_;
	GtkTreeIter _tmp10_;
	GtkTreePath* _tmp11_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = item;
	_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "iter");
	_tmp2_ = __gtk_tree_iter_dup0 ((GtkTreeIter*) _tmp1_);
	iter = _tmp2_;
	_tmp3_ = iter;
	if (_tmp3_ == NULL) {
		result = NULL;
		_g_free0 (iter);
		return result;
	}
	_tmp4_ = self->priv->model_filter;
	_tmp5_ = iter;
	_tmp7_ = *_tmp5_;
	_tmp8_ = gtk_tree_model_filter_convert_child_iter_to_iter (_tmp4_, &_tmp6_, &_tmp7_);
	filter_iter = _tmp6_;
	if (!_tmp8_) {
		result = NULL;
		_g_free0 (iter);
		return result;
	}
	_tmp9_ = self->priv->model_filter;
	_tmp10_ = filter_iter;
	_tmp11_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp9_, &_tmp10_);
	result = _tmp11_;
	_g_free0 (iter);
	return result;
}


static BoxesCollectionItem* boxes_collection_view_get_item_for_iter (BoxesCollectionView* self, GtkTreeIter* iter) {
	BoxesCollectionItem* result = NULL;
	GValue value = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_;
	GValue _tmp2_ = {0};
	GValue _tmp3_;
	BoxesCollectionItem* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (iter != NULL, NULL);
	_tmp0_ = self->priv->model;
	_tmp1_ = *iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _tmp0_, &_tmp1_, (gint) BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &_tmp2_);
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	value = _tmp2_;
	_tmp3_ = value;
	_tmp4_ = _g_object_ref0 (g_value_get_object (&_tmp3_));
	result = _tmp4_;
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	return result;
}


static BoxesCollectionItem* boxes_collection_view_get_item_for_path (BoxesCollectionView* self, GtkTreePath* path) {
	BoxesCollectionItem* result = NULL;
	GtkTreeIter filter_iter = {0};
	GtkTreeIter iter = {0};
	GtkTreeModelFilter* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	GtkTreeModelFilter* _tmp3_;
	GtkTreeIter _tmp4_;
	GtkTreeIter _tmp5_ = {0};
	GtkTreeIter _tmp6_;
	BoxesCollectionItem* _tmp7_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = self->priv->model_filter;
	_tmp1_ = path;
	gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
	filter_iter = _tmp2_;
	_tmp3_ = self->priv->model_filter;
	_tmp4_ = filter_iter;
	gtk_tree_model_filter_convert_iter_to_child_iter (_tmp3_, &_tmp5_, &_tmp4_);
	iter = _tmp5_;
	_tmp6_ = iter;
	_tmp7_ = boxes_collection_view_get_item_for_iter (self, &_tmp6_);
	result = _tmp7_;
	return result;
}


static gboolean boxes_collection_view_model_visible (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* iter) {
	gboolean result = FALSE;
	GtkTreeIter _tmp0_;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* item;
	BoxesCollectionItem* _tmp2_;
	BoxesApp* _tmp3_;
	BoxesCollectionFilter* _tmp4_;
	BoxesCollectionItem* _tmp5_;
	gboolean _tmp6_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = *iter;
	_tmp1_ = boxes_collection_view_get_item_for_iter (self, &_tmp0_);
	item = _tmp1_;
	_tmp2_ = item;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_g_object_unref0 (item);
		return result;
	}
	_tmp3_ = boxes_app_app;
	_tmp4_ = _tmp3_->filter;
	_tmp5_ = item;
	_tmp6_ = boxes_collection_filter_filter (_tmp4_, _tmp5_);
	result = _tmp6_;
	_g_object_unref0 (item);
	return result;
}


void boxes_collection_view_refilter (BoxesCollectionView* self) {
	GtkTreeModelFilter* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->model_filter;
	gtk_tree_model_filter_refilter (_tmp0_);
}


void boxes_collection_view_activate (BoxesCollectionView* self) {
	GtkTreeModelFilter* _tmp0_;
	gint _tmp1_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->model_filter;
	_tmp1_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) _tmp0_, NULL);
	if (_tmp1_ == 1) {
		GtkTreePath* _tmp2_;
		GtkTreePath* path;
		GdMainIconView* _tmp3_;
		GtkTreePath* _tmp4_;
		_tmp2_ = gtk_tree_path_new_from_string ("0");
		path = _tmp2_;
		_tmp3_ = self->priv->icon_view;
		_tmp4_ = path;
		gtk_icon_view_item_activated ((GtkIconView*) _tmp3_, _tmp4_);
		_gtk_tree_path_free0 (path);
	}
}


static gint __lambda7_ (BoxesCollectionView* self, GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b) {
	gint result = 0;
	BoxesCollectionItem* item_a = NULL;
	BoxesCollectionItem* item_b = NULL;
	GtkTreeModel* _tmp0_;
	GtkTreeIter _tmp1_;
	GtkTreeModel* _tmp2_;
	GtkTreeIter _tmp3_;
	gboolean _tmp4_ = FALSE;
	BoxesCollectionItem* _tmp5_;
	gboolean _tmp7_;
	BoxesCollectionItem* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	BoxesCollectionItem* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gint _tmp14_ = 0;
	g_return_val_if_fail (model != NULL, 0);
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	_tmp0_ = model;
	_tmp1_ = *a;
	gtk_tree_model_get (_tmp0_, &_tmp1_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item_a, -1);
	_tmp2_ = model;
	_tmp3_ = *b;
	gtk_tree_model_get (_tmp2_, &_tmp3_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_ITEM, &item_b, -1);
	_tmp5_ = item_a;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		BoxesCollectionItem* _tmp6_;
		_tmp6_ = item_b;
		_tmp4_ = _tmp6_ == NULL;
	}
	_tmp7_ = _tmp4_;
	if (_tmp7_) {
		result = 0;
		_g_object_unref0 (item_b);
		_g_object_unref0 (item_a);
		return result;
	}
	_tmp8_ = item_a;
	_tmp9_ = boxes_collection_item_get_name (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = item_b;
	_tmp12_ = boxes_collection_item_get_name (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_utf8_collate (_tmp10_, _tmp13_);
	result = _tmp14_;
	_g_object_unref0 (item_b);
	_g_object_unref0 (item_a);
	return result;
}


static gint ___lambda7__gtk_tree_iter_compare_func (GtkTreeModel* model, GtkTreeIter* a, GtkTreeIter* b, gpointer self) {
	gint result;
	result = __lambda7_ (self, model, a, b);
	return result;
}


static void __lambda8_ (BoxesCollectionView* self) {
	BoxesApp* _tmp0_;
	_tmp0_ = boxes_app_app;
	g_object_notify ((GObject*) _tmp0_, "selected-items");
}


static void ___lambda8__gtk_tree_model_row_deleted (GtkTreeModel* _sender, GtkTreePath* path, gpointer self) {
	__lambda8_ (self);
}


static void __lambda9_ (BoxesCollectionView* self) {
	BoxesApp* _tmp0_;
	_tmp0_ = boxes_app_app;
	g_object_notify ((GObject*) _tmp0_, "selected-items");
}


static void ___lambda9__gtk_tree_model_row_inserted (GtkTreeModel* _sender, GtkTreePath* path, GtkTreeIter* iter, gpointer self) {
	__lambda9_ (self);
}


static gboolean _boxes_collection_view_model_visible_gtk_tree_model_filter_visible_func (GtkTreeModel* model, GtkTreeIter* iter, gpointer self) {
	gboolean result;
	result = boxes_collection_view_model_visible (self, model, iter);
	return result;
}


static gboolean _boxes_collection_view_on_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = boxes_collection_view_on_button_press_event (self, _sender, event);
	return result;
}


static gboolean _boxes_collection_view_on_button_release_event_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = boxes_collection_view_on_button_release_event (self, _sender, event);
	return result;
}


static void __lambda11_ (BoxesCollectionView* self, GtkIconView* view, GtkTreePath* path) {
	GtkTreePath* _tmp0_;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* item;
	BoxesApp* _tmp2_;
	g_return_if_fail (view != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = path;
	_tmp1_ = boxes_collection_view_get_item_for_path (self, _tmp0_);
	item = _tmp1_;
	_tmp2_ = boxes_app_app;
	boxes_app_select_item (_tmp2_, item);
	_g_object_unref0 (item);
}


static void ___lambda11__gtk_icon_view_item_activated (GtkIconView* _sender, GtkTreePath* path, gpointer self) {
	__lambda11_ (self, _sender, path);
}


static void boxes_collection_view_setup_view (BoxesCollectionView* self) {
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkListStore* _tmp2_;
	GtkListStore* _tmp3_;
	GtkListStore* _tmp4_;
	GtkListStore* _tmp5_;
	GtkTreeModelFilter* _tmp6_;
	GtkTreeModelFilter* _tmp7_;
	GdMainIconView* _tmp8_;
	GdMainIconView* _tmp9_;
	GtkTreeModelFilter* _tmp10_;
	GdMainIconView* _tmp11_;
	GtkStyleContext* _tmp12_ = NULL;
	GdMainIconView* _tmp13_;
	GdMainIconView* _tmp14_;
	GdMainIconView* _tmp15_;
	GdMainIconView* _tmp16_;
	GtkScrolledWindow* _tmp17_;
	GtkScrolledWindow* scrolled_window;
	GdMainIconView* _tmp18_;
	GtkClutterActor* _tmp19_;
	GtkClutterActor* _tmp20_;
	GtkWidget* _tmp21_ = NULL;
	GtkStyleContext* _tmp22_ = NULL;
	GtkClutterActor* _tmp23_;
	GtkClutterActor* _tmp24_;
	GtkClutterActor* _tmp25_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_list_store_new ((gint) BOXES_COLLECTION_VIEW_MODEL_COLUMNS_LAST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_LONG, G_TYPE_BOOLEAN, BOXES_TYPE_COLLECTION_ITEM);
	_g_object_unref0 (self->priv->model);
	self->priv->model = _tmp0_;
	_tmp1_ = self->priv->model;
	gtk_tree_sortable_set_default_sort_func ((GtkTreeSortable*) _tmp1_, ___lambda7__gtk_tree_iter_compare_func, g_object_ref (self), g_object_unref);
	_tmp2_ = self->priv->model;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp2_, GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
	_tmp3_ = self->priv->model;
	g_signal_connect_object ((GtkTreeModel*) _tmp3_, "row-deleted", (GCallback) ___lambda8__gtk_tree_model_row_deleted, self, 0);
	_tmp4_ = self->priv->model;
	g_signal_connect_object ((GtkTreeModel*) _tmp4_, "row-inserted", (GCallback) ___lambda9__gtk_tree_model_row_inserted, self, 0);
	_tmp5_ = self->priv->model;
	_tmp6_ = (GtkTreeModelFilter*) gtk_tree_model_filter_new ((GtkTreeModel*) _tmp5_, NULL);
	_g_object_unref0 (self->priv->model_filter);
	self->priv->model_filter = _tmp6_;
	_tmp7_ = self->priv->model_filter;
	gtk_tree_model_filter_set_visible_func (_tmp7_, _boxes_collection_view_model_visible_gtk_tree_model_filter_visible_func, g_object_ref (self), g_object_unref);
	_tmp8_ = (GdMainIconView*) gd_main_icon_view_new ();
	g_object_ref_sink (_tmp8_);
	_g_object_unref0 (self->priv->icon_view);
	self->priv->icon_view = _tmp8_;
	_tmp9_ = self->priv->icon_view;
	_tmp10_ = self->priv->model_filter;
	gd_main_view_generic_set_model ((GdMainViewGeneric*) _tmp9_, (GtkTreeModel*) _tmp10_);
	_tmp11_ = self->priv->icon_view;
	_tmp12_ = gtk_widget_get_style_context ((GtkWidget*) _tmp11_);
	gtk_style_context_add_class (_tmp12_, "boxes-icon-view");
	_tmp13_ = self->priv->icon_view;
	g_signal_connect_object ((GtkWidget*) _tmp13_, "button-press-event", (GCallback) _boxes_collection_view_on_button_press_event_gtk_widget_button_press_event, self, 0);
	_tmp14_ = self->priv->icon_view;
	g_signal_connect_object ((GtkWidget*) _tmp14_, "button-release-event", (GCallback) _boxes_collection_view_on_button_release_event_gtk_widget_button_release_event, self, 0);
	_tmp15_ = self->priv->icon_view;
	boxes_icon_view_activate_on_single_click ((GtkIconView*) _tmp15_, TRUE);
	_tmp16_ = self->priv->icon_view;
	g_signal_connect_object ((GtkIconView*) _tmp16_, "item-activated", (GCallback) ___lambda11__gtk_icon_view_item_activated, self, 0);
	_tmp17_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp17_);
	scrolled_window = _tmp17_;
	_tmp18_ = self->priv->icon_view;
	gtk_container_add ((GtkContainer*) scrolled_window, (GtkWidget*) _tmp18_);
	gtk_widget_show_all ((GtkWidget*) scrolled_window);
	_tmp19_ = (GtkClutterActor*) gtk_clutter_actor_new_with_contents ((GtkWidget*) scrolled_window);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->gtkactor);
	self->priv->gtkactor = _tmp19_;
	_tmp20_ = self->priv->gtkactor;
	_tmp21_ = gtk_clutter_actor_get_widget (_tmp20_);
	_tmp22_ = gtk_widget_get_style_context (_tmp21_);
	gtk_style_context_add_class (_tmp22_, "boxes-bg");
	_tmp23_ = self->priv->gtkactor;
	clutter_actor_set_name ((ClutterActor*) _tmp23_, "collection-view");
	_tmp24_ = self->priv->gtkactor;
	clutter_actor_set_x_align ((ClutterActor*) _tmp24_, CLUTTER_ACTOR_ALIGN_FILL);
	_tmp25_ = self->priv->gtkactor;
	clutter_actor_set_y_align ((ClutterActor*) _tmp25_, CLUTTER_ACTOR_ALIGN_FILL);
	_g_object_unref0 (scrolled_window);
}


static gboolean boxes_collection_view_on_button_press_event (BoxesCollectionView* self, GtkWidget* view, GdkEventButton* event) {
	gboolean result = FALSE;
	GdMainIconView* _tmp0_;
	GdkEventButton _tmp1_;
	gdouble _tmp2_;
	GdkEventButton _tmp3_;
	gdouble _tmp4_;
	GtkTreePath* _tmp5_ = NULL;
	GtkTreePath* path;
	GtkTreePath* _tmp6_;
	gboolean _tmp10_ = FALSE;
	BoxesApp* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp15_;
	GtkTreePath* _tmp16_;
	BoxesCollectionItem* _tmp17_ = NULL;
	BoxesCollectionItem* item;
	BoxesCollectionItem* _tmp18_;
	gboolean found;
	gboolean _tmp19_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (view != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = *event;
	_tmp2_ = _tmp1_.x;
	_tmp3_ = *event;
	_tmp4_ = _tmp3_.y;
	_tmp5_ = gd_main_view_generic_get_path_at_pos ((GdMainViewGeneric*) _tmp0_, (gint) _tmp2_, (gint) _tmp4_);
	path = _tmp5_;
	_tmp6_ = path;
	if (_tmp6_ != NULL) {
		GtkTreePath* _tmp7_;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		_tmp7_ = path;
		_tmp8_ = gtk_tree_path_to_string (_tmp7_);
		_tmp9_ = g_strdup (_tmp8_);
		_g_free0 (self->priv->button_press_item_path);
		self->priv->button_press_item_path = _tmp9_;
	}
	_tmp11_ = boxes_app_app;
	_tmp12_ = boxes_app_get_selection_mode (_tmp11_);
	_tmp13_ = _tmp12_;
	if (!_tmp13_) {
		_tmp10_ = TRUE;
	} else {
		GtkTreePath* _tmp14_;
		_tmp14_ = path;
		_tmp10_ = _tmp14_ == NULL;
	}
	_tmp15_ = _tmp10_;
	if (_tmp15_) {
		result = FALSE;
		_gtk_tree_path_free0 (path);
		return result;
	}
	_tmp16_ = path;
	_tmp17_ = boxes_collection_view_get_item_for_path (self, _tmp16_);
	item = _tmp17_;
	_tmp18_ = item;
	found = _tmp18_ != NULL;
	_tmp19_ = found;
	result = !_tmp19_;
	_g_object_unref0 (item);
	_gtk_tree_path_free0 (path);
	return result;
}


static gboolean boxes_collection_view_on_button_release_event (BoxesCollectionView* self, GtkWidget* view, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEventButton _tmp0_;
	GdkEventType _tmp1_;
	GdMainIconView* _tmp2_;
	GdkEventButton _tmp3_;
	gdouble _tmp4_;
	GdkEventButton _tmp5_;
	gdouble _tmp6_;
	GtkTreePath* _tmp7_ = NULL;
	GtkTreePath* path;
	gboolean same_item;
	GtkTreePath* _tmp8_;
	gboolean _tmp14_;
	gboolean entered_mode;
	BoxesApp* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	BoxesApp* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (view != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = *event;
	_tmp1_ = _tmp0_.type;
	if (_tmp1_ != GDK_BUTTON_RELEASE) {
		result = TRUE;
		return result;
	}
	_tmp2_ = self->priv->icon_view;
	_tmp3_ = *event;
	_tmp4_ = _tmp3_.x;
	_tmp5_ = *event;
	_tmp6_ = _tmp5_.y;
	_tmp7_ = gd_main_view_generic_get_path_at_pos ((GdMainViewGeneric*) _tmp2_, (gint) _tmp4_, (gint) _tmp6_);
	path = _tmp7_;
	same_item = FALSE;
	_tmp8_ = path;
	if (_tmp8_ != NULL) {
		GtkTreePath* _tmp9_;
		const gchar* _tmp10_ = NULL;
		gchar* _tmp11_;
		gchar* button_release_item_path;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp9_ = path;
		_tmp10_ = gtk_tree_path_to_string (_tmp9_);
		_tmp11_ = g_strdup (_tmp10_);
		button_release_item_path = _tmp11_;
		_tmp12_ = self->priv->button_press_item_path;
		_tmp13_ = button_release_item_path;
		same_item = g_strcmp0 (_tmp12_, _tmp13_) == 0;
		_g_free0 (button_release_item_path);
	}
	_g_free0 (self->priv->button_press_item_path);
	self->priv->button_press_item_path = NULL;
	_tmp14_ = same_item;
	if (!_tmp14_) {
		result = FALSE;
		_gtk_tree_path_free0 (path);
		return result;
	}
	entered_mode = FALSE;
	_tmp15_ = boxes_app_app;
	_tmp16_ = boxes_app_get_selection_mode (_tmp15_);
	_tmp17_ = _tmp16_;
	if (!_tmp17_) {
		gboolean _tmp18_ = FALSE;
		GdkEventButton _tmp19_;
		guint _tmp20_;
		gboolean _tmp27_;
		_tmp19_ = *event;
		_tmp20_ = _tmp19_.button;
		if (_tmp20_ == ((guint) 3)) {
			_tmp18_ = TRUE;
		} else {
			gboolean _tmp21_ = FALSE;
			GdkEventButton _tmp22_;
			guint _tmp23_;
			gboolean _tmp26_;
			_tmp22_ = *event;
			_tmp23_ = _tmp22_.button;
			if (_tmp23_ == ((guint) 1)) {
				GdkEventButton _tmp24_;
				GdkModifierType _tmp25_;
				_tmp24_ = *event;
				_tmp25_ = _tmp24_.state;
				_tmp21_ = (_tmp25_ & GDK_CONTROL_MASK) == GDK_CONTROL_MASK;
			} else {
				_tmp21_ = FALSE;
			}
			_tmp26_ = _tmp21_;
			_tmp18_ = _tmp26_;
		}
		_tmp27_ = _tmp18_;
		if (_tmp27_) {
			BoxesApp* _tmp28_;
			_tmp28_ = boxes_app_app;
			boxes_app_set_selection_mode (_tmp28_, TRUE);
			entered_mode = TRUE;
		}
	}
	_tmp29_ = boxes_app_app;
	_tmp30_ = boxes_app_get_selection_mode (_tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_) {
		GdkEventButton _tmp32_;
		gboolean _tmp33_;
		GtkTreePath* _tmp34_;
		gboolean _tmp35_ = FALSE;
		_tmp32_ = *event;
		_tmp33_ = entered_mode;
		_tmp34_ = path;
		_tmp35_ = boxes_collection_view_on_button_release_selection_mode (self, &_tmp32_, _tmp33_, _tmp34_);
		result = _tmp35_;
		_gtk_tree_path_free0 (path);
		return result;
	}
	result = FALSE;
	_gtk_tree_path_free0 (path);
	return result;
}


static gboolean boxes_collection_view_on_button_release_selection_mode (BoxesCollectionView* self, GdkEventButton* event, gboolean entered_mode, GtkTreePath* path) {
	gboolean result = FALSE;
	GtkTreeIter filter_iter = {0};
	GtkTreeIter iter = {0};
	GtkTreeModelFilter* _tmp0_;
	GtkTreePath* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_ = FALSE;
	GtkTreeModelFilter* _tmp4_;
	GtkTreeIter _tmp5_;
	GtkTreeIter _tmp6_ = {0};
	gboolean selected = FALSE;
	GtkListStore* _tmp7_;
	GtkTreeIter _tmp8_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_;
	gboolean _tmp12_;
	GdMainIconView* _tmp18_;
	BoxesApp* _tmp19_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	_tmp0_ = self->priv->model_filter;
	_tmp1_ = path;
	_tmp3_ = gtk_tree_model_get_iter ((GtkTreeModel*) _tmp0_, &_tmp2_, _tmp1_);
	filter_iter = _tmp2_;
	if (!_tmp3_) {
		result = FALSE;
		return result;
	}
	_tmp4_ = self->priv->model_filter;
	_tmp5_ = filter_iter;
	gtk_tree_model_filter_convert_iter_to_child_iter (_tmp4_, &_tmp6_, &_tmp5_);
	iter = _tmp6_;
	_tmp7_ = self->priv->model;
	_tmp8_ = iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp7_, &_tmp8_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, &selected, -1);
	_tmp10_ = selected;
	if (_tmp10_) {
		gboolean _tmp11_;
		_tmp11_ = entered_mode;
		_tmp9_ = !_tmp11_;
	} else {
		_tmp9_ = FALSE;
	}
	_tmp12_ = _tmp9_;
	if (_tmp12_) {
		GtkListStore* _tmp13_;
		GtkTreeIter _tmp14_;
		_tmp13_ = self->priv->model;
		_tmp14_ = iter;
		gtk_list_store_set (_tmp13_, &_tmp14_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, FALSE, -1);
	} else {
		gboolean _tmp15_;
		_tmp15_ = selected;
		if (!_tmp15_) {
			GtkListStore* _tmp16_;
			GtkTreeIter _tmp17_;
			_tmp16_ = self->priv->model;
			_tmp17_ = iter;
			gtk_list_store_set (_tmp16_, &_tmp17_, BOXES_COLLECTION_VIEW_MODEL_COLUMNS_SELECTED, TRUE, -1);
		}
	}
	_tmp18_ = self->priv->icon_view;
	gtk_widget_queue_draw ((GtkWidget*) _tmp18_);
	_tmp19_ = boxes_app_app;
	g_object_notify ((GObject*) _tmp19_, "selected-items");
	result = FALSE;
	return result;
}


static ClutterActor* boxes_collection_view_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesCollectionView* self;
	GtkClutterActor* _tmp0_;
	self = (BoxesCollectionView*) base;
	_tmp0_ = self->priv->gtkactor;
	result = (ClutterActor*) _tmp0_;
	return result;
}


BoxesCategory* boxes_collection_view_get_category (BoxesCollectionView* self) {
	BoxesCategory* result;
	BoxesCategory* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_category;
	result = _tmp0_;
	return result;
}


void boxes_collection_view_set_category (BoxesCollectionView* self, BoxesCategory* value) {
	BoxesCategory* _tmp0_;
	BoxesCategory* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_category);
	self->priv->_category = _tmp1_;
	g_object_notify ((GObject *) self, "category");
}


void boxes_collection_view_set_visible (BoxesCollectionView* self, gboolean value) {
	GdMainIconView* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_view;
	_tmp1_ = value;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp1_);
	g_object_notify ((GObject *) self, "visible");
}


static void boxes_collection_view_class_init (BoxesCollectionViewClass * klass) {
	boxes_collection_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesCollectionViewPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_collection_view_real_ui_state_changed;
	BOXES_UI_CLASS (klass)->get_actor = boxes_collection_view_real_get_actor;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_VIEW_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_COLLECTION_VIEW_CATEGORY, g_param_spec_object ("category", "category", "category", BOXES_TYPE_CATEGORY, 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_COLLECTION_VIEW_VISIBLE, g_param_spec_boolean ("visible", "visible", "visible", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
}


static void boxes_collection_view_instance_init (BoxesCollectionView * self) {
	self->priv = BOXES_COLLECTION_VIEW_GET_PRIVATE (self);
}


static void boxes_collection_view_finalize (GObject* obj) {
	BoxesCollectionView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView);
	_g_object_unref0 (self->priv->gtkactor);
	_g_object_unref0 (self->priv->_category);
	_g_object_unref0 (self->priv->icon_view);
	_g_object_unref0 (self->priv->model);
	_g_object_unref0 (self->priv->model_filter);
	_g_free0 (self->priv->button_press_item_path);
	G_OBJECT_CLASS (boxes_collection_view_parent_class)->finalize (obj);
}


GType boxes_collection_view_get_type (void) {
	static volatile gsize boxes_collection_view_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionView), 0, (GInstanceInitFunc) boxes_collection_view_instance_init, NULL };
		GType boxes_collection_view_type_id;
		boxes_collection_view_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesCollectionView", &g_define_type_info, 0);
		g_once_init_leave (&boxes_collection_view_type_id__volatile, boxes_collection_view_type_id);
	}
	return boxes_collection_view_type_id__volatile;
}


static void _vala_boxes_collection_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollectionView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView);
	switch (property_id) {
		case BOXES_COLLECTION_VIEW_ACTOR:
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
		break;
		case BOXES_COLLECTION_VIEW_CATEGORY:
		g_value_set_object (value, boxes_collection_view_get_category (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_collection_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesCollectionView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView);
	switch (property_id) {
		case BOXES_COLLECTION_VIEW_CATEGORY:
		boxes_collection_view_set_category (self, g_value_get_object (value));
		break;
		case BOXES_COLLECTION_VIEW_VISIBLE:
		boxes_collection_view_set_visible (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);
}



