/* pieList.c generated by valac 0.56.18, the Vala compiler
 * generated from pieList.vala, do not modify */

/*///////////////////////////////////////////////////////////////////////*/
/* Copyright 2011-2021 Simon Schneegans*/
/**/
/* Permission is hereby granted, free of charge, to any person obtaining*/
/* a copy of this software and associated documentation files (the*/
/* "Software"), to deal in the Software without restriction, including*/
/* without limitation the rights to use, copy, modify, merge, publish,*/
/* distribute, sublicense, and/or sell copies of the Software, and to*/
/* permit persons to whom the Software is furnished to do so, subject to*/
/* the following conditions:*/
/* */
/* The above copyright notice and this permission notice shall be*/
/* included in all copies or substantial portions of the Software.*/
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,*/
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF*/
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,*/
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE*/
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
/*///////////////////////////////////////////////////////////////////////*/

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <gee.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GNOME_PIE_TYPE_PIE_LIST (gnome_pie_pie_list_get_type ())
#define GNOME_PIE_PIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieList))
#define GNOME_PIE_PIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieListClass))
#define GNOME_PIE_IS_PIE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE_LIST))
#define GNOME_PIE_IS_PIE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE_LIST))
#define GNOME_PIE_PIE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE_LIST, GnomePiePieListClass))

typedef struct _GnomePiePieList GnomePiePieList;
typedef struct _GnomePiePieListClass GnomePiePieListClass;
typedef struct _GnomePiePieListPrivate GnomePiePieListPrivate;
enum  {
	GNOME_PIE_PIE_LIST_0_PROPERTY,
	GNOME_PIE_PIE_LIST_NUM_PROPERTIES
};
static GParamSpec* gnome_pie_pie_list_properties[GNOME_PIE_PIE_LIST_NUM_PROPERTIES];
typedef enum  {
	GNOME_PIE_PIE_LIST_DATA_POS_ICON,
	GNOME_PIE_PIE_LIST_DATA_POS_ICON_NAME,
	GNOME_PIE_PIE_LIST_DATA_POS_NAME,
	GNOME_PIE_PIE_LIST_DATA_POS_ID
} GnomePiePieListDataPos;

#define GNOME_PIE_PIE_LIST_TYPE_DATA_POS (gnome_pie_pie_list_data_pos_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_GtkTreeIter_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreeIter_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GNOME_PIE_TYPE_PIE (gnome_pie_pie_get_type ())
#define GNOME_PIE_PIE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_PIE, GnomePiePie))
#define GNOME_PIE_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_PIE, GnomePiePieClass))
#define GNOME_PIE_IS_PIE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_IS_PIE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_PIE))
#define GNOME_PIE_PIE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_PIE, GnomePiePieClass))

typedef struct _GnomePiePie GnomePiePie;
typedef struct _GnomePiePieClass GnomePiePieClass;
typedef struct _Block7Data Block7Data;

#define GNOME_PIE_TYPE_IMAGE (gnome_pie_image_get_type ())
#define GNOME_PIE_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_IMAGE, GnomePieImage))
#define GNOME_PIE_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_IMAGE, GnomePieImageClass))
#define GNOME_PIE_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_IMAGE))
#define GNOME_PIE_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_IMAGE))
#define GNOME_PIE_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_IMAGE, GnomePieImageClass))

typedef struct _GnomePieImage GnomePieImage;
typedef struct _GnomePieImageClass GnomePieImageClass;

#define GNOME_PIE_TYPE_ICON (gnome_pie_icon_get_type ())
#define GNOME_PIE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ICON, GnomePieIcon))
#define GNOME_PIE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ICON, GnomePieIconClass))
#define GNOME_PIE_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ICON))
#define GNOME_PIE_IS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ICON))
#define GNOME_PIE_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ICON, GnomePieIconClass))

typedef struct _GnomePieIcon GnomePieIcon;
typedef struct _GnomePieIconClass GnomePieIconClass;
typedef struct _Block8Data Block8Data;
#define __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))

#define GNOME_PIE_TYPE_ACTION (gnome_pie_action_get_type ())
#define GNOME_PIE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_PIE_TYPE_ACTION, GnomePieAction))
#define GNOME_PIE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_PIE_TYPE_ACTION, GnomePieActionClass))
#define GNOME_PIE_IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_PIE_TYPE_ACTION))
#define GNOME_PIE_IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_PIE_TYPE_ACTION))
#define GNOME_PIE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_PIE_TYPE_ACTION, GnomePieActionClass))

typedef struct _GnomePieAction GnomePieAction;
typedef struct _GnomePieActionClass GnomePieActionClass;
enum  {
	GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL,
	GNOME_PIE_PIE_LIST_ON_ACTIVATE_SIGNAL,
	GNOME_PIE_PIE_LIST_NUM_SIGNALS
};
static guint gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_NUM_SIGNALS] = {0};

struct _GnomePiePieList {
	GtkTreeView parent_instance;
	GnomePiePieListPrivate * priv;
};

struct _GnomePiePieListClass {
	GtkTreeViewClass parent_class;
};

struct _GnomePiePieListPrivate {
	GtkListStore* data;
	GtkTreeIter* drag_start;
	guint last_hover;
};

struct _Block7Data {
	int _ref_count_;
	GnomePiePieList* self;
	gchar* id;
};

struct _Block8Data {
	int _ref_count_;
	GnomePiePieList* self;
	GtkTreePath* path;
	guint time;
};

static gint GnomePiePieList_private_offset;
static gpointer gnome_pie_pie_list_parent_class = NULL;

VALA_EXTERN GType gnome_pie_pie_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePieList, g_object_unref)
static GType gnome_pie_pie_list_data_pos_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void _vala_GtkTreeIter_free (GtkTreeIter* self);
VALA_EXTERN GnomePiePieList* gnome_pie_pie_list_new (void);
VALA_EXTERN GnomePiePieList* gnome_pie_pie_list_construct (GType object_type);
static void gnome_pie_pie_list_on_dnd_source (GnomePiePieList* self,
                                       GdkDragContext* context,
                                       GtkSelectionData* selection_data,
                                       guint info,
                                       guint time_);
static void _gnome_pie_pie_list_on_dnd_source_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                                 GdkDragContext* context,
                                                                 GtkSelectionData* selection_data,
                                                                 guint info,
                                                                 guint time_,
                                                                 gpointer self);
static void gnome_pie_pie_list_on_dnd_received (GnomePiePieList* self,
                                         GdkDragContext* context,
                                         gint x,
                                         gint y,
                                         GtkSelectionData* selection_data,
                                         guint info,
                                         guint time_);
static void _gnome_pie_pie_list_on_dnd_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                        GdkDragContext* context,
                                                                        gint x,
                                                                        gint y,
                                                                        GtkSelectionData* selection_data,
                                                                        guint info,
                                                                        guint time_,
                                                                        gpointer self);
static void gnome_pie_pie_list_on_start_drag (GnomePiePieList* self,
                                       GdkDragContext* ctx);
static void _gnome_pie_pie_list_on_start_drag_gtk_widget_drag_begin (GtkWidget* _sender,
                                                              GdkDragContext* context,
                                                              gpointer self);
static gboolean gnome_pie_pie_list_on_drag_move (GnomePiePieList* self,
                                          GdkDragContext* context,
                                          gint x,
                                          gint y,
                                          guint time);
static gboolean _gnome_pie_pie_list_on_drag_move_gtk_widget_drag_motion (GtkWidget* _sender,
                                                                  GdkDragContext* context,
                                                                  gint x,
                                                                  gint y,
                                                                  guint time_,
                                                                  gpointer self);
static void __lambda68_ (GnomePiePieList* self);
static void ___lambda68__gtk_widget_drag_leave (GtkWidget* _sender,
                                         GdkDragContext* context,
                                         guint time_,
                                         gpointer self);
static void __lambda69_ (GnomePiePieList* self);
static void ___lambda69__gtk_tree_view_row_activated (GtkTreeView* _sender,
                                               GtkTreePath* path,
                                               GtkTreeViewColumn* column,
                                               gpointer self);
static void __lambda70_ (GnomePiePieList* self);
static void ___lambda70__gtk_tree_selection_changed (GtkTreeSelection* _sender,
                                              gpointer self);
VALA_EXTERN void gnome_pie_pie_list_reload_all (GnomePiePieList* self);
VALA_EXTERN GType gnome_pie_pie_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePiePie, g_object_unref)
VALA_EXTERN GeeHashMap* gnome_pie_pie_manager_get_all_pies (void);
static void gnome_pie_pie_list_load_pie (GnomePiePieList* self,
                                  GnomePiePie* pie);
VALA_EXTERN void gnome_pie_pie_list_select (GnomePiePieList* self,
                                const gchar* id);
VALA_EXTERN void gnome_pie_pie_list_select_first (GnomePiePieList* self);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static gboolean __lambda71_ (Block7Data* _data7_,
                      GtkTreeModel* model,
                      GtkTreePath* path,
                      GtkTreeIter* iter);
static gboolean ___lambda71__gtk_tree_model_foreach_func (GtkTreeModel* model,
                                                   GtkTreePath* path,
                                                   GtkTreeIter* iter,
                                                   gpointer self);
VALA_EXTERN const gchar* gnome_pie_pie_get_id (GnomePiePie* self);
VALA_EXTERN GType gnome_pie_image_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieImage, g_object_unref)
VALA_EXTERN GType gnome_pie_icon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieIcon, g_object_unref)
VALA_EXTERN const gchar* gnome_pie_pie_get_icon (GnomePiePie* self);
VALA_EXTERN GnomePieIcon* gnome_pie_icon_new (const gchar* icon_name,
                                  gint size);
VALA_EXTERN GnomePieIcon* gnome_pie_icon_construct (GType object_type,
                                        const gchar* icon_name,
                                        gint size);
VALA_EXTERN GdkPixbuf* gnome_pie_image_to_pixbuf (GnomePieImage* self);
VALA_EXTERN const gchar* gnome_pie_pie_get_name (GnomePiePie* self);
VALA_EXTERN gchar* gnome_pie_pie_manager_get_accelerator_label_of (const gchar* id);
VALA_EXTERN const gchar* gnome_pie_paths_get_launchers (void);
static GtkTreeIter* _vala_GtkTreeIter_copy (GtkTreeIter* self);
VALA_EXTERN gint gnome_pie_icon_size (GnomePieIcon* self);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void _vala_GtkTreePath_free (GtkTreePath* self);
static void block8_data_unref (void * _userdata_);
static gboolean __lambda67_ (Block8Data* _data8_);
static gboolean ___lambda67__gsource_func (gpointer self);
VALA_EXTERN GType gnome_pie_action_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GnomePieAction, g_object_unref)
VALA_EXTERN void gnome_pie_pie_add_action (GnomePiePie* self,
                               GnomePieAction* action,
                               gint at_position);
VALA_EXTERN GnomePieAction* gnome_pie_action_registry_new_for_uri (const gchar* uri,
                                                       const gchar* name);
static void gnome_pie_pie_list_finalize (GObject * obj);
static GType gnome_pie_pie_list_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
gnome_pie_pie_list_get_instance_private (GnomePiePieList* self)
{
	return G_STRUCT_MEMBER_P (self, GnomePiePieList_private_offset);
}

static GType
gnome_pie_pie_list_data_pos_get_type_once (void)
{
	static const GEnumValue values[] = {{GNOME_PIE_PIE_LIST_DATA_POS_ICON, "GNOME_PIE_PIE_LIST_DATA_POS_ICON", "icon"}, {GNOME_PIE_PIE_LIST_DATA_POS_ICON_NAME, "GNOME_PIE_PIE_LIST_DATA_POS_ICON_NAME", "icon-name"}, {GNOME_PIE_PIE_LIST_DATA_POS_NAME, "GNOME_PIE_PIE_LIST_DATA_POS_NAME", "name"}, {GNOME_PIE_PIE_LIST_DATA_POS_ID, "GNOME_PIE_PIE_LIST_DATA_POS_ID", "id"}, {0, NULL, NULL}};
	GType gnome_pie_pie_list_data_pos_type_id;
	gnome_pie_pie_list_data_pos_type_id = g_enum_register_static ("GnomePiePieListDataPos", values);
	return gnome_pie_pie_list_data_pos_type_id;
}

static GType
gnome_pie_pie_list_data_pos_get_type (void)
{
	static volatile gsize gnome_pie_pie_list_data_pos_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_pie_list_data_pos_type_id__once)) {
		GType gnome_pie_pie_list_data_pos_type_id;
		gnome_pie_pie_list_data_pos_type_id = gnome_pie_pie_list_data_pos_get_type_once ();
		g_once_init_leave (&gnome_pie_pie_list_data_pos_type_id__once, gnome_pie_pie_list_data_pos_type_id);
	}
	return gnome_pie_pie_list_data_pos_type_id__once;
}

static void
_vala_GtkTreeIter_free (GtkTreeIter* self)
{
	g_boxed_free (gtk_tree_iter_get_type (), self);
}

static void
_gnome_pie_pie_list_on_dnd_source_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                            GdkDragContext* context,
                                                            GtkSelectionData* selection_data,
                                                            guint info,
                                                            guint time_,
                                                            gpointer self)
{
	gnome_pie_pie_list_on_dnd_source ((GnomePiePieList*) self, context, selection_data, info, time_);
}

static void
_gnome_pie_pie_list_on_dnd_received_gtk_widget_drag_data_received (GtkWidget* _sender,
                                                                   GdkDragContext* context,
                                                                   gint x,
                                                                   gint y,
                                                                   GtkSelectionData* selection_data,
                                                                   guint info,
                                                                   guint time_,
                                                                   gpointer self)
{
	gnome_pie_pie_list_on_dnd_received ((GnomePiePieList*) self, context, x, y, selection_data, info, time_);
}

static void
_gnome_pie_pie_list_on_start_drag_gtk_widget_drag_begin (GtkWidget* _sender,
                                                         GdkDragContext* context,
                                                         gpointer self)
{
	gnome_pie_pie_list_on_start_drag ((GnomePiePieList*) self, context);
}

static gboolean
_gnome_pie_pie_list_on_drag_move_gtk_widget_drag_motion (GtkWidget* _sender,
                                                         GdkDragContext* context,
                                                         gint x,
                                                         gint y,
                                                         guint time_,
                                                         gpointer self)
{
	gboolean result;
	result = gnome_pie_pie_list_on_drag_move ((GnomePiePieList*) self, context, x, y, time_);
	return result;
}

static void
__lambda68_ (GnomePiePieList* self)
{
	self->priv->last_hover = (guint) 0;
}

static void
___lambda68__gtk_widget_drag_leave (GtkWidget* _sender,
                                    GdkDragContext* context,
                                    guint time_,
                                    gpointer self)
{
	__lambda68_ ((GnomePiePieList*) self);
}

static void
__lambda69_ (GnomePiePieList* self)
{
	g_signal_emit (self, gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_ACTIVATE_SIGNAL], 0);
}

static void
___lambda69__gtk_tree_view_row_activated (GtkTreeView* _sender,
                                          GtkTreePath* path,
                                          GtkTreeViewColumn* column,
                                          gpointer self)
{
	__lambda69_ ((GnomePiePieList*) self);
}

static void
__lambda70_ (GnomePiePieList* self)
{
	GtkTreeIter active = {0};
	GtkTreeSelection* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	_tmp0_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
	_tmp2_ = gtk_tree_selection_get_selected (_tmp0_, NULL, &_tmp1_);
	active = _tmp1_;
	if (_tmp2_) {
		gchar* id = NULL;
		gchar* _tmp3_;
		GtkListStore* _tmp4_;
		GtkTreeIter _tmp5_;
		gchar* _tmp6_ = NULL;
		const gchar* _tmp7_;
		_tmp3_ = g_strdup ("");
		id = _tmp3_;
		_tmp4_ = self->priv->data;
		_tmp5_ = active;
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp6_, -1);
		_g_free0 (id);
		id = _tmp6_;
		_tmp7_ = id;
		g_signal_emit (self, gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL], 0, _tmp7_);
		_g_free0 (id);
	}
}

static void
___lambda70__gtk_tree_selection_changed (GtkTreeSelection* _sender,
                                         gpointer self)
{
	__lambda70_ ((GnomePiePieList*) self);
}

GnomePiePieList*
gnome_pie_pie_list_construct (GType object_type)
{
	GnomePiePieList * self = NULL;
	GtkListStore* _tmp0_;
	GtkListStore* _tmp1_;
	GtkListStore* _tmp2_;
	GtkTreeViewColumn* main_column = NULL;
	GtkTreeViewColumn* _tmp3_;
	GtkCellRendererPixbuf* icon_render = NULL;
	GtkCellRendererPixbuf* _tmp4_;
	GtkCellRendererText* name_render = NULL;
	GtkCellRendererText* _tmp5_;
	GtkTargetEntry uri_source = {0};
	GtkTargetEntry _tmp6_ = {0};
	GtkTargetEntry* entries = NULL;
	GtkTargetEntry _tmp7_;
	GtkTargetEntry* _tmp8_;
	gint entries_length1;
	gint _entries_size_;
	GtkTreeSelection* _tmp9_;
	self = (GnomePiePieList*) g_object_new (object_type, NULL);
	_tmp0_ = gtk_list_store_new (4, gdk_pixbuf_get_type (), G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, -1);
	_g_object_unref0 (self->priv->data);
	self->priv->data = _tmp0_;
	_tmp1_ = self->priv->data;
	gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable*) _tmp1_, (gint) GNOME_PIE_PIE_LIST_DATA_POS_NAME, GTK_SORT_ASCENDING);
	_tmp2_ = self->priv->data;
	gtk_tree_view_set_model ((GtkTreeView*) self, (GtkTreeModel*) _tmp2_);
	gtk_tree_view_set_headers_visible ((GtkTreeView*) self, TRUE);
	gtk_tree_view_set_grid_lines ((GtkTreeView*) self, GTK_TREE_VIEW_GRID_LINES_NONE);
	g_object_set ((GtkWidget*) self, "width-request", 170, NULL);
	gtk_tree_view_set_enable_search ((GtkTreeView*) self, FALSE);
	gtk_widget_set_events ((GtkWidget*) self, (gint) GDK_POINTER_MOTION_MASK);
	_tmp3_ = gtk_tree_view_column_new ();
	g_object_ref_sink (_tmp3_);
	main_column = _tmp3_;
	gtk_tree_view_column_set_title (main_column, _ ("Pies"));
	_tmp4_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
	g_object_ref_sink (_tmp4_);
	icon_render = _tmp4_;
	g_object_set ((GtkCellRenderer*) icon_render, "xpad", (guint) 4, NULL);
	g_object_set ((GtkCellRenderer*) icon_render, "ypad", (guint) 4, NULL);
	gtk_cell_layout_pack_start ((GtkCellLayout*) main_column, (GtkCellRenderer*) icon_render, FALSE);
	_tmp5_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
	g_object_ref_sink (_tmp5_);
	name_render = _tmp5_;
	g_object_set ((GtkCellRenderer*) name_render, "xpad", (guint) 6, NULL);
	g_object_set (name_render, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
	g_object_set (name_render, "ellipsize-set", TRUE, NULL);
	gtk_cell_layout_pack_start ((GtkCellLayout*) main_column, (GtkCellRenderer*) name_render, TRUE);
	gtk_tree_view_append_column (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_tree_view_get_type (), GtkTreeView), main_column);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) main_column, (GtkCellRenderer*) icon_render, "pixbuf", (gint) GNOME_PIE_PIE_LIST_DATA_POS_ICON);
	gtk_cell_layout_add_attribute ((GtkCellLayout*) main_column, (GtkCellRenderer*) name_render, "markup", (gint) GNOME_PIE_PIE_LIST_DATA_POS_NAME);
	_tmp6_.target = "text/uri-list";
	_tmp6_.flags = (guint) 0;
	_tmp6_.info = (guint) 0;
	uri_source = _tmp6_;
	_tmp7_ = uri_source;
	_tmp8_ = g_new0 (GtkTargetEntry, 1);
	_tmp8_[0] = _tmp7_;
	entries = _tmp8_;
	entries_length1 = 1;
	_entries_size_ = entries_length1;
	gtk_tree_view_enable_model_drag_source ((GtkTreeView*) self, GDK_BUTTON1_MASK, entries, (gint) entries_length1, GDK_ACTION_LINK);
	gtk_tree_view_enable_model_drag_dest ((GtkTreeView*) self, entries, (gint) entries_length1, (GDK_ACTION_COPY | GDK_ACTION_MOVE) | GDK_ACTION_LINK);
	g_signal_connect_object ((GtkWidget*) self, "drag-data-get", (GCallback) _gnome_pie_pie_list_on_dnd_source_gtk_widget_drag_data_get, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "drag-data-received", (GCallback) _gnome_pie_pie_list_on_dnd_received_gtk_widget_drag_data_received, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "drag-begin", (GCallback) _gnome_pie_pie_list_on_start_drag_gtk_widget_drag_begin, self, G_CONNECT_AFTER);
	g_signal_connect_object ((GtkWidget*) self, "drag-motion", (GCallback) _gnome_pie_pie_list_on_drag_move_gtk_widget_drag_motion, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "drag-leave", (GCallback) ___lambda68__gtk_widget_drag_leave, self, 0);
	g_signal_connect_object ((GtkTreeView*) self, "row-activated", (GCallback) ___lambda69__gtk_tree_view_row_activated, self, 0);
	_tmp9_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
	g_signal_connect_object (_tmp9_, "changed", (GCallback) ___lambda70__gtk_tree_selection_changed, self, 0);
	gnome_pie_pie_list_reload_all (self);
	entries = (g_free (entries), NULL);
	_g_object_unref0 (name_render);
	_g_object_unref0 (icon_render);
	_g_object_unref0 (main_column);
	return self;
}

GnomePiePieList*
gnome_pie_pie_list_new (void)
{
	return gnome_pie_pie_list_construct (GNOME_PIE_TYPE_PIE_LIST);
}

void
gnome_pie_pie_list_reload_all (GnomePiePieList* self)
{
	GtkTreeIter active = {0};
	gchar* id = NULL;
	gchar* _tmp0_;
	GtkTreeSelection* _tmp1_;
	GtkTreeIter _tmp2_ = {0};
	gboolean _tmp3_;
	GtkListStore* _tmp7_;
	const gchar* _tmp21_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup ("");
	id = _tmp0_;
	_tmp1_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
	_tmp3_ = gtk_tree_selection_get_selected (_tmp1_, NULL, &_tmp2_);
	active = _tmp2_;
	if (_tmp3_) {
		GtkListStore* _tmp4_;
		GtkTreeIter _tmp5_;
		gchar* _tmp6_ = NULL;
		_tmp4_ = self->priv->data;
		_tmp5_ = active;
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp6_, -1);
		_g_free0 (id);
		id = _tmp6_;
	}
	_tmp7_ = self->priv->data;
	gtk_list_store_clear (_tmp7_);
	{
		GeeIterator* _pie_it = NULL;
		GeeHashMap* _tmp8_;
		GeeHashMap* _tmp9_;
		GeeSet* _tmp10_;
		GeeSet* _tmp11_;
		GeeSet* _tmp12_;
		GeeIterator* _tmp13_;
		GeeIterator* _tmp14_;
		_tmp8_ = gnome_pie_pie_manager_get_all_pies ();
		_tmp9_ = _tmp8_;
		_tmp10_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
		_pie_it = _tmp14_;
		while (TRUE) {
			GeeIterator* _tmp15_;
			GeeMapEntry* pie = NULL;
			GeeIterator* _tmp16_;
			gpointer _tmp17_;
			GeeMapEntry* _tmp18_;
			gconstpointer _tmp19_;
			gconstpointer _tmp20_;
			_tmp15_ = _pie_it;
			if (!gee_iterator_next (_tmp15_)) {
				break;
			}
			_tmp16_ = _pie_it;
			_tmp17_ = gee_iterator_get (_tmp16_);
			pie = (GeeMapEntry*) _tmp17_;
			_tmp18_ = pie;
			_tmp19_ = gee_map_entry_get_value (_tmp18_);
			_tmp20_ = _tmp19_;
			gnome_pie_pie_list_load_pie (self, (GnomePiePie*) _tmp20_);
			_g_object_unref0 (pie);
		}
		_g_object_unref0 (_pie_it);
	}
	_tmp21_ = id;
	gnome_pie_pie_list_select (self, _tmp21_);
	_g_free0 (id);
}

void
gnome_pie_pie_list_select_first (GnomePiePieList* self)
{
	GtkTreeIter active = {0};
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->data;
	_tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_);
	active = _tmp1_;
	if (_tmp2_) {
		GtkTreeSelection* _tmp3_;
		GtkTreeIter _tmp4_;
		gchar* id = NULL;
		gchar* _tmp5_;
		GtkListStore* _tmp6_;
		GtkTreeIter _tmp7_;
		gchar* _tmp8_ = NULL;
		const gchar* _tmp9_;
		_tmp3_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
		_tmp4_ = active;
		gtk_tree_selection_select_iter (_tmp3_, &_tmp4_);
		_tmp5_ = g_strdup ("");
		id = _tmp5_;
		_tmp6_ = self->priv->data;
		_tmp7_ = active;
		gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp8_, -1);
		_g_free0 (id);
		id = _tmp8_;
		_tmp9_ = id;
		g_signal_emit (self, gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL], 0, _tmp9_);
		_g_free0 (id);
	} else {
		g_signal_emit (self, gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL], 0, "");
	}
}

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_)) {
		GnomePiePieList* self;
		self = _data7_->self;
		_g_free0 (_data7_->id);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static gboolean
__lambda71_ (Block7Data* _data7_,
             GtkTreeModel* model,
             GtkTreePath* path,
             GtkTreeIter* iter)
{
	GnomePiePieList* self;
	gchar* pie_id = NULL;
	GtkListStore* _tmp0_;
	GtkTreeIter _tmp1_;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	gboolean result;
	self = _data7_->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_ = self->priv->data;
	_tmp1_ = *iter;
	gtk_tree_model_get ((GtkTreeModel*) _tmp0_, &_tmp1_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp2_, -1);
	_g_free0 (pie_id);
	pie_id = _tmp2_;
	_tmp3_ = pie_id;
	if (g_strcmp0 (_data7_->id, _tmp3_) == 0) {
		GtkTreeSelection* _tmp4_;
		GtkTreeIter _tmp5_;
		_tmp4_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
		_tmp5_ = *iter;
		gtk_tree_selection_select_iter (_tmp4_, &_tmp5_);
		result = TRUE;
		_g_free0 (pie_id);
		return result;
	}
	result = FALSE;
	_g_free0 (pie_id);
	return result;
}

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

void
gnome_pie_pie_list_select (GnomePiePieList* self,
                           const gchar* id)
{
	Block7Data* _data7_;
	gchar* _tmp0_;
	GtkListStore* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	_tmp0_ = g_strdup (id);
	_g_free0 (_data7_->id);
	_data7_->id = _tmp0_;
	_tmp1_ = self->priv->data;
	gtk_tree_model_foreach ((GtkTreeModel*) _tmp1_, ___lambda71__gtk_tree_model_foreach_func, _data7_);
	block7_data_unref (_data7_);
	_data7_ = NULL;
}

static void
gnome_pie_pie_list_load_pie (GnomePiePieList* self,
                             GnomePiePie* pie)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (pie != NULL);
	_tmp0_ = gnome_pie_pie_get_id (pie);
	_tmp1_ = _tmp0_;
	_tmp2_ = strlen (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == 3) {
		GtkTreeIter last = {0};
		GtkListStore* _tmp4_;
		GtkTreeIter _tmp5_ = {0};
		GnomePieIcon* icon = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		GnomePieIcon* _tmp8_;
		GtkListStore* _tmp9_;
		GtkTreeIter _tmp10_;
		GnomePieIcon* _tmp11_;
		GdkPixbuf* _tmp12_;
		GdkPixbuf* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		const gchar* _tmp32_;
		const gchar* _tmp33_;
		_tmp4_ = self->priv->data;
		gtk_list_store_append (_tmp4_, &_tmp5_);
		last = _tmp5_;
		_tmp6_ = gnome_pie_pie_get_icon (pie);
		_tmp7_ = _tmp6_;
		_tmp8_ = gnome_pie_icon_new (_tmp7_, 24);
		icon = _tmp8_;
		_tmp9_ = self->priv->data;
		_tmp10_ = last;
		_tmp11_ = icon;
		_tmp12_ = gnome_pie_image_to_pixbuf ((GnomePieImage*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = gnome_pie_pie_get_icon (pie);
		_tmp15_ = _tmp14_;
		_tmp16_ = gnome_pie_pie_get_name (pie);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_markup_escape_text (_tmp17_, (gssize) -1);
		_tmp19_ = _tmp18_;
		_tmp20_ = g_strconcat (_tmp19_, "\n", NULL);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strconcat (_tmp21_, "<span font-size='x-small'>", NULL);
		_tmp23_ = _tmp22_;
		_tmp24_ = gnome_pie_pie_get_id (pie);
		_tmp25_ = _tmp24_;
		_tmp26_ = gnome_pie_pie_manager_get_accelerator_label_of (_tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = g_strconcat (_tmp23_, _tmp27_, NULL);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_strconcat (_tmp29_, "</span>", NULL);
		_tmp31_ = _tmp30_;
		_tmp32_ = gnome_pie_pie_get_id (pie);
		_tmp33_ = _tmp32_;
		gtk_list_store_set (_tmp9_, &_tmp10_, GNOME_PIE_PIE_LIST_DATA_POS_ICON, _tmp13_, GNOME_PIE_PIE_LIST_DATA_POS_ICON_NAME, _tmp15_, GNOME_PIE_PIE_LIST_DATA_POS_NAME, _tmp31_, GNOME_PIE_PIE_LIST_DATA_POS_ID, _tmp33_, -1);
		_g_free0 (_tmp31_);
		_g_free0 (_tmp29_);
		_g_free0 (_tmp27_);
		_g_free0 (_tmp23_);
		_g_free0 (_tmp21_);
		_g_free0 (_tmp19_);
		_g_object_unref0 (_tmp13_);
		_g_object_unref0 (icon);
	}
}

static void
gnome_pie_pie_list_on_dnd_source (GnomePiePieList* self,
                                  GdkDragContext* context,
                                  GtkSelectionData* selection_data,
                                  guint info,
                                  guint time_)
{
	GtkTreeIter* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = self->priv->drag_start;
	if (_tmp0_ != NULL) {
		gchar* id = NULL;
		gchar* _tmp1_;
		GtkListStore* _tmp2_;
		GtkTreeIter* _tmp3_;
		GtkTreeIter _tmp4_;
		gchar* _tmp5_ = NULL;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gchar** _tmp16_;
		gchar** _tmp17_;
		gint _tmp17__length1;
		_tmp1_ = g_strdup ("");
		id = _tmp1_;
		_tmp2_ = self->priv->data;
		_tmp3_ = self->priv->drag_start;
		_tmp4_ = *_tmp3_;
		gtk_tree_model_get ((GtkTreeModel*) _tmp2_, &_tmp4_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp5_, -1);
		_g_free0 (id);
		id = _tmp5_;
		_tmp6_ = gnome_pie_paths_get_launchers ();
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strconcat ("file://", _tmp7_, NULL);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strconcat (_tmp9_, "/", NULL);
		_tmp11_ = _tmp10_;
		_tmp12_ = id;
		_tmp13_ = g_strconcat (_tmp11_, _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strconcat (_tmp14_, ".desktop", NULL);
		_tmp16_ = g_new0 (gchar*, 1 + 1);
		_tmp16_[0] = _tmp15_;
		_tmp17_ = _tmp16_;
		_tmp17__length1 = 1;
		gtk_selection_data_set_uris (selection_data, _tmp17_);
		_tmp17_ = (_vala_array_free (_tmp17_, _tmp17__length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp11_);
		_g_free0 (_tmp9_);
		_g_free0 (id);
	}
}

static GtkTreeIter*
_vala_GtkTreeIter_copy (GtkTreeIter* self)
{
	return g_boxed_copy (gtk_tree_iter_get_type (), self);
}

static gpointer
__vala_GtkTreeIter_copy0 (gpointer self)
{
	return self ? _vala_GtkTreeIter_copy (self) : NULL;
}

static void
gnome_pie_pie_list_on_start_drag (GnomePiePieList* self,
                                  GdkDragContext* ctx)
{
	GtkTreeSelection* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	GtkTreeIter _tmp3_;
	GtkTreeIter* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ctx != NULL);
	_tmp0_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
	_tmp2_ = gtk_tree_selection_get_selected (_tmp0_, NULL, &_tmp1_);
	__vala_GtkTreeIter_free0 (self->priv->drag_start);
	_tmp3_ = _tmp1_;
	_tmp4_ = __vala_GtkTreeIter_copy0 (&_tmp3_);
	self->priv->drag_start = _tmp4_;
	if (_tmp2_) {
		gchar* icon_name = NULL;
		gchar* _tmp5_;
		GtkListStore* _tmp6_;
		GtkTreeIter* _tmp7_;
		GtkTreeIter _tmp8_;
		gchar* _tmp9_ = NULL;
		GnomePieIcon* icon = NULL;
		const gchar* _tmp10_;
		GnomePieIcon* _tmp11_;
		GdkPixbuf* pixbuf = NULL;
		GnomePieIcon* _tmp12_;
		GdkPixbuf* _tmp13_;
		GdkPixbuf* _tmp14_;
		GnomePieIcon* _tmp15_;
		GnomePieIcon* _tmp16_;
		_tmp5_ = g_strdup ("");
		icon_name = _tmp5_;
		_tmp6_ = self->priv->data;
		_tmp7_ = self->priv->drag_start;
		_tmp8_ = *_tmp7_;
		gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp8_, GNOME_PIE_PIE_LIST_DATA_POS_ICON_NAME, &_tmp9_, -1);
		_g_free0 (icon_name);
		icon_name = _tmp9_;
		_tmp10_ = icon_name;
		_tmp11_ = gnome_pie_icon_new (_tmp10_, 48);
		icon = _tmp11_;
		_tmp12_ = icon;
		_tmp13_ = gnome_pie_image_to_pixbuf ((GnomePieImage*) _tmp12_);
		pixbuf = _tmp13_;
		_tmp14_ = pixbuf;
		_tmp15_ = icon;
		_tmp16_ = icon;
		gtk_drag_set_icon_pixbuf (ctx, _tmp14_, gnome_pie_icon_size (_tmp15_) / 2, gnome_pie_icon_size (_tmp16_) / 2);
		_g_object_unref0 (pixbuf);
		_g_object_unref0 (icon);
		_g_free0 (icon_name);
	}
}

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

static void
_vala_GtkTreePath_free (GtkTreePath* self)
{
	g_boxed_free (gtk_tree_path_get_type (), self);
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		GnomePiePieList* self;
		self = _data8_->self;
		__vala_GtkTreePath_free0 (_data8_->path);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static gboolean
__lambda67_ (Block8Data* _data8_)
{
	GnomePiePieList* self;
	gboolean result;
	self = _data8_->self;
	if (self->priv->last_hover == _data8_->time) {
		GtkTreeSelection* _tmp0_;
		GtkTreePath* _tmp1_;
		_tmp0_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
		_tmp1_ = _data8_->path;
		gtk_tree_selection_select_path (_tmp0_, _tmp1_);
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda67__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda67_ (self);
	return result;
}

static gboolean
gnome_pie_pie_list_on_drag_move (GnomePiePieList* self,
                                 GdkDragContext* context,
                                 gint x,
                                 gint y,
                                 guint time)
{
	Block8Data* _data8_;
	GtkTreeViewDropPosition position = 0;
	GtkTreePath* _tmp0_ = NULL;
	GtkTreeViewDropPosition _tmp1_ = 0;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (context != NULL, FALSE);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_data8_->time = time;
	_tmp2_ = gtk_tree_view_get_dest_row_at_pos ((GtkTreeView*) self, x, y, &_tmp0_, &_tmp1_);
	__vala_GtkTreePath_free0 (_data8_->path);
	_data8_->path = _tmp0_;
	position = _tmp1_;
	if (!_tmp2_) {
		result = FALSE;
		block8_data_unref (_data8_);
		_data8_ = NULL;
		return result;
	}
	if (position == GTK_TREE_VIEW_DROP_BEFORE) {
		GtkTreePath* _tmp3_;
		_tmp3_ = _data8_->path;
		gtk_tree_view_set_drag_dest_row ((GtkTreeView*) self, _tmp3_, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
	} else {
		if (position == GTK_TREE_VIEW_DROP_AFTER) {
			GtkTreePath* _tmp4_;
			_tmp4_ = _data8_->path;
			gtk_tree_view_set_drag_dest_row ((GtkTreeView*) self, _tmp4_, GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
		}
	}
	gdk_drag_status (context, gdk_drag_context_get_suggested_action (context), (guint32) _data8_->time);
	self->priv->last_hover = _data8_->time;
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 150, ___lambda67__gsource_func, block8_data_ref (_data8_), block8_data_unref);
	result = TRUE;
	block8_data_unref (_data8_);
	_data8_ = NULL;
	return result;
}

static void
gnome_pie_pie_list_on_dnd_received (GnomePiePieList* self,
                                    GdkDragContext* context,
                                    gint x,
                                    gint y,
                                    GtkSelectionData* selection_data,
                                    guint info,
                                    guint time_)
{
	GtkTreeIter active = {0};
	GtkTreeSelection* _tmp0_;
	GtkTreeIter _tmp1_ = {0};
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (selection_data != NULL);
	_tmp0_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
	_tmp2_ = gtk_tree_selection_get_selected (_tmp0_, NULL, &_tmp1_);
	active = _tmp1_;
	if (_tmp2_) {
		gchar* id = NULL;
		gchar* _tmp3_;
		GtkListStore* _tmp4_;
		GtkTreeIter _tmp5_;
		gchar* _tmp6_ = NULL;
		GnomePiePie* pie = NULL;
		GeeHashMap* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		gpointer _tmp10_;
		gchar** _tmp11_;
		gchar** _tmp12_;
		const gchar* _tmp18_;
		_tmp3_ = g_strdup ("");
		id = _tmp3_;
		_tmp4_ = self->priv->data;
		_tmp5_ = active;
		gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, GNOME_PIE_PIE_LIST_DATA_POS_ID, &_tmp6_, -1);
		_g_free0 (id);
		id = _tmp6_;
		_tmp7_ = gnome_pie_pie_manager_get_all_pies ();
		_tmp8_ = _tmp7_;
		_tmp9_ = id;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp9_);
		pie = (GnomePiePie*) _tmp10_;
		_tmp12_ = _tmp11_ = gtk_selection_data_get_uris (selection_data);
		{
			gchar** uri_collection = NULL;
			gint uri_collection_length1 = 0;
			gint _uri_collection_size_ = 0;
			gint uri_it = 0;
			uri_collection = _tmp12_;
			uri_collection_length1 = _vala_array_length (_tmp11_);
			for (uri_it = 0; uri_it < uri_collection_length1; uri_it = uri_it + 1) {
				gchar* _tmp13_;
				gchar* uri = NULL;
				_tmp13_ = g_strdup (uri_collection[uri_it]);
				uri = _tmp13_;
				{
					GnomePiePie* _tmp14_;
					const gchar* _tmp15_;
					GnomePieAction* _tmp16_;
					GnomePieAction* _tmp17_;
					_tmp14_ = pie;
					_tmp15_ = uri;
					_tmp16_ = gnome_pie_action_registry_new_for_uri (_tmp15_, NULL);
					_tmp17_ = _tmp16_;
					gnome_pie_pie_add_action (_tmp14_, _tmp17_, 0);
					_g_object_unref0 (_tmp17_);
					_g_free0 (uri);
				}
			}
			uri_collection = (_vala_array_free (uri_collection, uri_collection_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp18_ = id;
		g_signal_emit (self, gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL], 0, _tmp18_);
		_g_object_unref0 (pie);
		_g_free0 (id);
	}
}

static void
gnome_pie_pie_list_class_init (GnomePiePieListClass * klass,
                               gpointer klass_data)
{
	gnome_pie_pie_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GnomePiePieList_private_offset);
	G_OBJECT_CLASS (klass)->finalize = gnome_pie_pie_list_finalize;
	gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_SELECT_SIGNAL] = g_signal_new ("on-select", GNOME_PIE_TYPE_PIE_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	gnome_pie_pie_list_signals[GNOME_PIE_PIE_LIST_ON_ACTIVATE_SIGNAL] = g_signal_new ("on-activate", GNOME_PIE_TYPE_PIE_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
gnome_pie_pie_list_instance_init (GnomePiePieList * self,
                                  gpointer klass)
{
	self->priv = gnome_pie_pie_list_get_instance_private (self);
	self->priv->drag_start = NULL;
	self->priv->last_hover = (guint) 0;
}

static void
gnome_pie_pie_list_finalize (GObject * obj)
{
	GnomePiePieList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GNOME_PIE_TYPE_PIE_LIST, GnomePiePieList);
	_g_object_unref0 (self->priv->data);
	__vala_GtkTreeIter_free0 (self->priv->drag_start);
	G_OBJECT_CLASS (gnome_pie_pie_list_parent_class)->finalize (obj);
}

static GType
gnome_pie_pie_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GnomePiePieListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gnome_pie_pie_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GnomePiePieList), 0, (GInstanceInitFunc) gnome_pie_pie_list_instance_init, NULL };
	GType gnome_pie_pie_list_type_id;
	gnome_pie_pie_list_type_id = g_type_register_static (gtk_tree_view_get_type (), "GnomePiePieList", &g_define_type_info, 0);
	GnomePiePieList_private_offset = g_type_add_instance_private (gnome_pie_pie_list_type_id, sizeof (GnomePiePieListPrivate));
	return gnome_pie_pie_list_type_id;
}

GType
gnome_pie_pie_list_get_type (void)
{
	static volatile gsize gnome_pie_pie_list_type_id__once = 0;
	if (g_once_init_enter (&gnome_pie_pie_list_type_id__once)) {
		GType gnome_pie_pie_list_type_id;
		gnome_pie_pie_list_type_id = gnome_pie_pie_list_get_type_once ();
		g_once_init_leave (&gnome_pie_pie_list_type_id__once, gnome_pie_pie_list_type_id);
	}
	return gnome_pie_pie_list_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize 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,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

