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

/*
 * Copyright 2026 Ubuntu Budgie Developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#include "slingshot.h"
#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gdesktopappinfo.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <pango/pango.h>
#include <gdk/gdk.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

#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW (slingshot_widgets_favorites_sidebar_favorite_row_get_type ())
#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRow))
#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRowClass))
#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_IS_FAVORITE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW))
#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_IS_FAVORITE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW))
#define SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRowClass))

typedef struct _SlingshotWidgetsFavoritesSidebarFavoriteRow SlingshotWidgetsFavoritesSidebarFavoriteRow;
typedef struct _SlingshotWidgetsFavoritesSidebarFavoriteRowClass SlingshotWidgetsFavoritesSidebarFavoriteRowClass;
enum  {
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_0_PROPERTY,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_NUM_PROPERTIES
};
static GParamSpec* slingshot_widgets_favorites_sidebar_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef void (*SlingshotWidgetsFavoritesSidebarAction) (gpointer user_data);
typedef struct _Block9Data Block9Data;
typedef struct _Block10Data Block10Data;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block11Data Block11Data;
typedef struct _Block12Data Block12Data;
typedef struct _Block13Data Block13Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block14Data Block14Data;
typedef struct _SlingshotWidgetsFavoritesSidebarFavoriteRowPrivate SlingshotWidgetsFavoritesSidebarFavoriteRowPrivate;
enum  {
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_0_PROPERTY,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_NUM_PROPERTIES
};
static GParamSpec* slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_NUM_PROPERTIES];
enum  {
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_CONTEXT_MENU_REQUESTED_SIGNAL,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_NUM_SIGNALS
};
static guint slingshot_widgets_favorites_sidebar_favorite_row_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_NUM_SIGNALS] = {0};
typedef struct _Block15Data Block15Data;
enum  {
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_SHOW_CONTEXT_MENU_SIGNAL,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL,
	SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_NUM_SIGNALS
};
static guint slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_NUM_SIGNALS] = {0};

struct _SlingshotWidgetsFavoritesSidebarPrivate {
	GtkListBox* favorites_list;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* open_menu_row;
	GtkButton* session_button;
	GtkRevealer* session_revealer;
	gboolean session_expanded;
	SlingshotBackendFavoritesManager* favorites_manager;
	SlingshotBackendAppSystem* app_system;
};

struct _Block9Data {
	int _ref_count_;
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotWidgetsFavoritesSidebarAction action;
	gpointer action_target;
	GDestroyNotify action_target_destroy_notify;
};

struct _Block10Data {
	int _ref_count_;
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* row;
};

struct _Block11Data {
	int _ref_count_;
	SlingshotWidgetsFavoritesSidebar* self;
	gchar* desktop_id_captured;
	GDesktopAppInfo* app_info;
	SlingshotBackendSwitcherooControl* switcheroo;
};

struct _Block12Data {
	int _ref_count_;
	Block11Data * _data11_;
	gchar* action;
};

struct _Block13Data {
	int _ref_count_;
	Block11Data * _data11_;
	gboolean prefers_non_default;
};

struct _Block14Data {
	int _ref_count_;
	SlingshotWidgetsFavoritesSidebarAction action;
	gpointer action_target;
	GDestroyNotify action_target_destroy_notify;
};

struct _SlingshotWidgetsFavoritesSidebarFavoriteRow {
	GtkListBoxRow parent_instance;
	SlingshotWidgetsFavoritesSidebarFavoriteRowPrivate * priv;
};

struct _SlingshotWidgetsFavoritesSidebarFavoriteRowClass {
	GtkListBoxRowClass parent_class;
};

struct _SlingshotWidgetsFavoritesSidebarFavoriteRowPrivate {
	gchar* _desktop_id;
	gchar* _desktop_path;
	GDesktopAppInfo* _app_info;
};

struct _Block15Data {
	int _ref_count_;
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* session_manager;
};

static gint SlingshotWidgetsFavoritesSidebar_private_offset;
static gpointer slingshot_widgets_favorites_sidebar_parent_class = NULL;
static gint SlingshotWidgetsFavoritesSidebarFavoriteRow_private_offset;
static gpointer slingshot_widgets_favorites_sidebar_favorite_row_parent_class = NULL;
static GType slingshot_widgets_favorites_sidebar_favorite_row_type_id = 0;
static GType slingshot_widgets_favorites_sidebar_type_id = 0;

GType slingshot_widgets_favorites_sidebar_favorite_row_register_type (GTypeModule * module);
VALA_EXTERN GType slingshot_widgets_favorites_sidebar_favorite_row_get_type (void) G_GNUC_CONST ;
static void slingshot_widgets_favorites_sidebar_collapse_session (SlingshotWidgetsFavoritesSidebar* self);
static GtkButton* slingshot_widgets_favorites_sidebar_make_session_btn (SlingshotWidgetsFavoritesSidebar* self,
                                                                 const gchar* icon_name,
                                                                 const gchar* label,
                                                                 SlingshotWidgetsFavoritesSidebarAction action,
                                                                 gpointer action_target,
                                                                 GDestroyNotify action_target_destroy_notify);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static void __lambda82_ (Block9Data* _data9_);
static void ___lambda82__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void slingshot_widgets_favorites_sidebar_populate_favorites (SlingshotWidgetsFavoritesSidebar* self);
static void __lambda83_ (SlingshotWidgetsFavoritesSidebar* self,
                  GtkWidget* widget);
static void ___lambda83__gtk_callback (GtkWidget* widget,
                                gpointer self);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static SlingshotWidgetsFavoritesSidebarFavoriteRow* slingshot_widgets_favorites_sidebar_favorite_row_new (const gchar* desktop_id,
                                                                                                   const gchar* desktop_path);
static SlingshotWidgetsFavoritesSidebarFavoriteRow* slingshot_widgets_favorites_sidebar_favorite_row_construct (GType object_type,
                                                                                                         const gchar* desktop_id,
                                                                                                         const gchar* desktop_path);
static void _____lambda84_ (Block10Data* _data10_);
static void slingshot_widgets_favorites_sidebar_emit_context_menu_for_row (SlingshotWidgetsFavoritesSidebar* self,
                                                                    SlingshotWidgetsFavoritesSidebarFavoriteRow* row);
static void ______lambda84__slingshot_widgets_favorites_sidebar_favorite_row_context_menu_requested (SlingshotWidgetsFavoritesSidebarFavoriteRow* _sender,
                                                                                              gpointer self);
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static const gchar* slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_id (SlingshotWidgetsFavoritesSidebarFavoriteRow* self);
static GDesktopAppInfo* slingshot_widgets_favorites_sidebar_favorite_row_get_app_info (SlingshotWidgetsFavoritesSidebarFavoriteRow* self);
static GtkButton* slingshot_widgets_favorites_sidebar_make_menu_btn (const gchar* label,
                                                              SlingshotWidgetsFavoritesSidebarAction action,
                                                              gpointer action_target,
                                                              GDestroyNotify action_target_destroy_notify);
static void __lambda86_ (Block11Data* _data11_);
static void ___lambda86__slingshot_widgets_favorites_sidebar_action (gpointer self);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
static void _____lambda87_ (Block12Data* _data12_);
static void ______lambda87__slingshot_widgets_favorites_sidebar_action (gpointer self);
static Block13Data* block13_data_ref (Block13Data* _data13_);
static void block13_data_unref (void * _userdata_);
static void ___lambda88_ (Block13Data* _data13_);
static void ____lambda88__slingshot_widgets_favorites_sidebar_action (gpointer self);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
static void __lambda85_ (Block14Data* _data14_);
static void ___lambda85__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void g_cclosure_user_marshal_VOID__OBJECT_INT (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data);
static void slingshot_widgets_favorites_sidebar_favorite_row_launch (SlingshotWidgetsFavoritesSidebarFavoriteRow* self);
static void _vala_array_add15 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add16 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add17 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add18 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void _vala_array_add19 (gchar** * array,
                        gint* length,
                        gint* size,
                        gchar* value);
static void ___lambda79_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                   GPid pid,
                   gint _);
static void ____lambda79__gchild_watch_func (GPid pid,
                                      gint wait_status,
                                      gpointer self);
static void slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_id (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                      const gchar* value);
static const gchar* slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_path (SlingshotWidgetsFavoritesSidebarFavoriteRow* self);
static void slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_path (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                        const gchar* value);
static void slingshot_widgets_favorites_sidebar_favorite_row_set_app_info (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                    GDesktopAppInfo* value);
static GObject * slingshot_widgets_favorites_sidebar_favorite_row_constructor (GType type,
                                                                        guint n_construct_properties,
                                                                        GObjectConstructParam * construct_properties);
static gboolean _slingshot_widgets_favorites_sidebar_favorite_row___lambda80_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                        GdkEventButton* ev);
static gboolean __slingshot_widgets_favorites_sidebar_favorite_row___lambda80__gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                                       GdkEventButton* event,
                                                                                                       gpointer self);
static gboolean _slingshot_widgets_favorites_sidebar_favorite_row___lambda81_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                        GdkEventKey* ev);
static gboolean __slingshot_widgets_favorites_sidebar_favorite_row___lambda81__gtk_widget_key_press_event (GtkWidget* _sender,
                                                                                                    GdkEventKey* event,
                                                                                                    gpointer self);
static void slingshot_widgets_favorites_sidebar_favorite_row_finalize (GObject * obj);
static void _vala_slingshot_widgets_favorites_sidebar_favorite_row_get_property (GObject * object,
                                                                          guint property_id,
                                                                          GValue * value,
                                                                          GParamSpec * pspec);
static void _vala_slingshot_widgets_favorites_sidebar_favorite_row_set_property (GObject * object,
                                                                          guint property_id,
                                                                          const GValue * value,
                                                                          GParamSpec * pspec);
static GObject * slingshot_widgets_favorites_sidebar_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties);
static Block15Data* block15_data_ref (Block15Data* _data15_);
static void block15_data_unref (void * _userdata_);
static void _slingshot_widgets_favorites_sidebar___lambda89_ (Block15Data* _data15_);
static void __slingshot_widgets_favorites_sidebar___lambda89__slingshot_widgets_favorites_sidebar_action (gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda90_ (Block15Data* _data15_);
static void __slingshot_widgets_favorites_sidebar___lambda90__slingshot_widgets_favorites_sidebar_action (gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda91_ (Block15Data* _data15_);
static void __slingshot_widgets_favorites_sidebar___lambda91__slingshot_widgets_favorites_sidebar_action (gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda92_ (Block15Data* _data15_);
static void __slingshot_widgets_favorites_sidebar___lambda92__slingshot_widgets_favorites_sidebar_action (gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda93_ (Block15Data* _data15_);
static void __slingshot_widgets_favorites_sidebar___lambda93__slingshot_widgets_favorites_sidebar_action (gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda94_ (SlingshotWidgetsFavoritesSidebar* self);
static void __slingshot_widgets_favorites_sidebar___lambda94__gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda95_ (SlingshotWidgetsFavoritesSidebar* self,
                                                       GtkListBoxRow* row);
static void __slingshot_widgets_favorites_sidebar___lambda95__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                   GtkListBoxRow* row,
                                                                                   gpointer self);
static void _slingshot_widgets_favorites_sidebar___lambda96_ (SlingshotWidgetsFavoritesSidebar* self);
static void __slingshot_widgets_favorites_sidebar___lambda96__slingshot_backend_favorites_manager_favorites_changed (SlingshotBackendFavoritesManager* _sender,
                                                                                                              gpointer self);
static void slingshot_widgets_favorites_sidebar_finalize (GObject * obj);
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
slingshot_widgets_favorites_sidebar_get_instance_private (SlingshotWidgetsFavoritesSidebar* self)
{
	return G_STRUCT_MEMBER_P (self, SlingshotWidgetsFavoritesSidebar_private_offset);
}

static void
slingshot_widgets_favorites_sidebar_collapse_session (SlingshotWidgetsFavoritesSidebar* self)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->session_expanded = FALSE;
	_tmp0_ = self->priv->session_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
}

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

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data9_->self;
		(_data9_->action_target_destroy_notify == NULL) ? NULL : (_data9_->action_target_destroy_notify (_data9_->action_target), NULL);
		_data9_->action = NULL;
		_data9_->action_target = NULL;
		_data9_->action_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static void
__lambda82_ (Block9Data* _data9_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	self = _data9_->self;
	_data9_->action (_data9_->action_target);
}

static void
___lambda82__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda82_ (self);
}

static GtkButton*
slingshot_widgets_favorites_sidebar_make_session_btn (SlingshotWidgetsFavoritesSidebar* self,
                                                      const gchar* icon_name,
                                                      const gchar* label,
                                                      SlingshotWidgetsFavoritesSidebarAction action,
                                                      gpointer action_target,
                                                      GDestroyNotify action_target_destroy_notify)
{
	Block9Data* _data9_;
	GtkButton* btn = NULL;
	GtkButton* _tmp0_;
	GtkImage* img = NULL;
	GtkImage* _tmp1_;
	GtkButton* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (icon_name != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	(_data9_->action_target_destroy_notify == NULL) ? NULL : (_data9_->action_target_destroy_notify (_data9_->action_target), NULL);
	_data9_->action = NULL;
	_data9_->action_target = NULL;
	_data9_->action_target_destroy_notify = NULL;
	_data9_->action = action;
	_data9_->action_target = action_target;
	_data9_->action_target_destroy_notify = action_target_destroy_notify;
	_tmp0_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp0_);
	btn = _tmp0_;
	gtk_button_set_relief (btn, GTK_RELIEF_NONE);
	gtk_widget_set_halign ((GtkWidget*) btn, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) btn, label);
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name (icon_name, (GtkIconSize) GTK_ICON_SIZE_SMALL_TOOLBAR);
	g_object_ref_sink (_tmp1_);
	img = _tmp1_;
	gtk_image_set_pixel_size (img, 16);
	gtk_container_add ((GtkContainer*) btn, (GtkWidget*) img);
	g_signal_connect_data (btn, "clicked", (GCallback) ___lambda82__gtk_button_clicked, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref, 0);
	result = btn;
	_g_object_unref0 (img);
	block9_data_unref (_data9_);
	_data9_ = NULL;
	return result;
}

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

void
slingshot_widgets_favorites_sidebar_set_app_system (SlingshotWidgetsFavoritesSidebar* self,
                                                    SlingshotBackendAppSystem* system)
{
	SlingshotBackendAppSystem* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (system != NULL);
	_tmp0_ = _g_object_ref0 (system);
	_g_object_unref0 (self->priv->app_system);
	self->priv->app_system = _tmp0_;
	slingshot_widgets_favorites_sidebar_populate_favorites (self);
}

void
slingshot_widgets_favorites_sidebar_close_context_menu (SlingshotWidgetsFavoritesSidebar* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->open_menu_row);
	self->priv->open_menu_row = NULL;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
}

void
slingshot_widgets_favorites_sidebar_validate_and_populate (SlingshotWidgetsFavoritesSidebar* self)
{
	SlingshotBackendFavoritesManager* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->favorites_manager;
	slingshot_backend_favorites_manager_validate_favorites (_tmp0_);
	slingshot_widgets_favorites_sidebar_populate_favorites (self);
}

static void
__lambda83_ (SlingshotWidgetsFavoritesSidebar* self,
             GtkWidget* widget)
{
	g_return_if_fail (widget != NULL);
	gtk_widget_destroy (widget);
}

static void
___lambda83__gtk_callback (GtkWidget* widget,
                           gpointer self)
{
	__lambda83_ ((SlingshotWidgetsFavoritesSidebar*) self, widget);
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->row);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

static void
_____lambda84_ (Block10Data* _data10_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp0_;
	self = _data10_->self;
	_tmp0_ = _data10_->row;
	slingshot_widgets_favorites_sidebar_emit_context_menu_for_row (self, _tmp0_);
}

static void
______lambda84__slingshot_widgets_favorites_sidebar_favorite_row_context_menu_requested (SlingshotWidgetsFavoritesSidebarFavoriteRow* _sender,
                                                                                         gpointer self)
{
	_____lambda84_ (self);
}

static void
slingshot_widgets_favorites_sidebar_populate_favorites (SlingshotWidgetsFavoritesSidebar* self)
{
	GtkListBox* _tmp0_;
	SlingshotBackendAppSystem* _tmp1_;
	GeeList* favorites = NULL;
	SlingshotBackendFavoritesManager* _tmp2_;
	GeeList* _tmp3_;
	SynapseDesktopFileService* dfs = NULL;
	SynapseDesktopFileService* _tmp4_;
	GtkListBox* _tmp33_;
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->open_menu_row);
	self->priv->open_menu_row = NULL;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	_tmp0_ = self->priv->favorites_list;
	gtk_container_foreach ((GtkContainer*) _tmp0_, ___lambda83__gtk_callback, self);
	_tmp1_ = self->priv->app_system;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->favorites_manager;
	_tmp3_ = slingshot_backend_favorites_manager_get_favorites (_tmp2_);
	favorites = _tmp3_;
	_tmp4_ = synapse_desktop_file_service_get_default ();
	dfs = _tmp4_;
	{
		GeeList* _desktop_id_list = NULL;
		GeeList* _tmp5_;
		gint _desktop_id_size = 0;
		GeeList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gint _desktop_id_index = 0;
		_tmp5_ = favorites;
		_desktop_id_list = _tmp5_;
		_tmp6_ = _desktop_id_list;
		_tmp7_ = gee_collection_get_size ((GeeCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		_desktop_id_size = _tmp8_;
		_desktop_id_index = -1;
		while (TRUE) {
			gint _tmp9_;
			gint _tmp10_;
			gchar* desktop_id = NULL;
			GeeList* _tmp11_;
			gpointer _tmp12_;
			SynapseDesktopFileInfo* info = NULL;
			SynapseDesktopFileService* _tmp13_;
			const gchar* _tmp14_;
			SynapseDesktopFileInfo* _tmp15_;
			gboolean _tmp16_ = FALSE;
			gboolean _tmp17_ = FALSE;
			SynapseDesktopFileInfo* _tmp18_;
			_desktop_id_index = _desktop_id_index + 1;
			_tmp9_ = _desktop_id_index;
			_tmp10_ = _desktop_id_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _desktop_id_list;
			_tmp12_ = gee_list_get (_tmp11_, _desktop_id_index);
			desktop_id = (gchar*) _tmp12_;
			_tmp13_ = dfs;
			_tmp14_ = desktop_id;
			_tmp15_ = synapse_desktop_file_service_get_desktop_file_for_id (_tmp13_, _tmp14_);
			info = _tmp15_;
			_tmp18_ = info;
			if (_tmp18_ != NULL) {
				SynapseDesktopFileInfo* _tmp19_;
				gboolean _tmp20_;
				gboolean _tmp21_;
				_tmp19_ = info;
				_tmp20_ = synapse_desktop_file_info_get_is_hidden (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp17_ = !_tmp21_;
			} else {
				_tmp17_ = FALSE;
			}
			if (_tmp17_) {
				SynapseDesktopFileInfo* _tmp22_;
				gboolean _tmp23_;
				gboolean _tmp24_;
				_tmp22_ = info;
				_tmp23_ = synapse_desktop_file_info_get_is_valid (_tmp22_);
				_tmp24_ = _tmp23_;
				_tmp16_ = _tmp24_;
			} else {
				_tmp16_ = FALSE;
			}
			if (_tmp16_) {
				Block10Data* _data10_;
				const gchar* _tmp25_;
				SynapseDesktopFileInfo* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp29_;
				SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp30_;
				GtkListBox* _tmp31_;
				SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp32_;
				_data10_ = g_slice_new0 (Block10Data);
				_data10_->_ref_count_ = 1;
				_data10_->self = g_object_ref (self);
				_tmp25_ = desktop_id;
				_tmp26_ = info;
				_tmp27_ = synapse_desktop_file_info_get_filename (_tmp26_);
				_tmp28_ = _tmp27_;
				_tmp29_ = slingshot_widgets_favorites_sidebar_favorite_row_new (_tmp25_, _tmp28_);
				g_object_ref_sink (_tmp29_);
				_data10_->row = _tmp29_;
				_tmp30_ = _data10_->row;
				g_signal_connect_data (_tmp30_, "context-menu-requested", (GCallback) ______lambda84__slingshot_widgets_favorites_sidebar_favorite_row_context_menu_requested, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
				_tmp31_ = self->priv->favorites_list;
				_tmp32_ = _data10_->row;
				gtk_container_add ((GtkContainer*) _tmp31_, (GtkWidget*) _tmp32_);
				block10_data_unref (_data10_);
				_data10_ = NULL;
			}
			_g_object_unref0 (info);
			_g_free0 (desktop_id);
		}
	}
	_tmp33_ = self->priv->favorites_list;
	gtk_widget_show_all ((GtkWidget*) _tmp33_);
	_g_object_unref0 (dfs);
	_g_object_unref0 (favorites);
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->switcheroo);
		_g_object_unref0 (_data11_->app_info);
		_g_free0 (_data11_->desktop_id_captured);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
__lambda86_ (Block11Data* _data11_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendFavoritesManager* _tmp0_;
	const gchar* _tmp1_;
	self = _data11_->self;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	_tmp0_ = self->priv->favorites_manager;
	_tmp1_ = _data11_->desktop_id_captured;
	slingshot_backend_favorites_manager_remove_favorite (_tmp0_, _tmp1_);
}

static void
___lambda86__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	__lambda86_ (self);
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data12_->_data11_->self;
		_g_free0 (_data12_->action);
		block11_data_unref (_data12_->_data11_);
		_data12_->_data11_ = NULL;
		g_slice_free (Block12Data, _data12_);
	}
}

static void
_____lambda87_ (Block12Data* _data12_)
{
	Block11Data* _data11_;
	SlingshotWidgetsFavoritesSidebar* self;
	GDesktopAppInfo* _tmp0_;
	const gchar* _tmp1_;
	GAppLaunchContext* _tmp2_;
	GAppLaunchContext* _tmp3_;
	_data11_ = _data12_->_data11_;
	self = _data11_->self;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	_tmp0_ = _data11_->app_info;
	_tmp1_ = _data12_->action;
	_tmp2_ = g_app_launch_context_new ();
	_tmp3_ = _tmp2_;
	g_desktop_app_info_launch_action (_tmp0_, _tmp1_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
______lambda87__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_____lambda87_ (self);
}

static Block13Data*
block13_data_ref (Block13Data* _data13_)
{
	g_atomic_int_inc (&_data13_->_ref_count_);
	return _data13_;
}

static void
block13_data_unref (void * _userdata_)
{
	Block13Data* _data13_;
	_data13_ = (Block13Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data13_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data13_->_data11_->self;
		block11_data_unref (_data13_->_data11_);
		_data13_->_data11_ = NULL;
		g_slice_free (Block13Data, _data13_);
	}
}

static void
___lambda88_ (Block13Data* _data13_)
{
	Block11Data* _data11_;
	SlingshotWidgetsFavoritesSidebar* self;
	GError* _inner_error0_ = NULL;
	_data11_ = _data13_->_data11_;
	self = _data11_->self;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	{
		GAppLaunchContext* ctx = NULL;
		GAppLaunchContext* _tmp0_;
		SlingshotBackendSwitcherooControl* _tmp1_;
		GDesktopAppInfo* _tmp2_;
		_tmp0_ = g_app_launch_context_new ();
		ctx = _tmp0_;
		_tmp1_ = _data11_->switcheroo;
		slingshot_backend_switcheroo_control_apply_gpu_environment (_tmp1_, ctx, _data13_->prefers_non_default);
		_tmp2_ = _data11_->app_info;
		g_app_info_launch ((GAppInfo*) _tmp2_, NULL, ctx, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (ctx);
			goto __catch0_g_error;
		}
		g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
		_g_object_unref0 (ctx);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_warning ("FavoritesSidebar.vala:217: GPU launch failed: %s", _tmp4_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda88__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	___lambda88_ (self);
}

static void
slingshot_widgets_favorites_sidebar_emit_context_menu_for_row (SlingshotWidgetsFavoritesSidebar* self,
                                                               SlingshotWidgetsFavoritesSidebarFavoriteRow* row)
{
	Block11Data* _data11_;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp0_;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GDesktopAppInfo* _tmp5_;
	GDesktopAppInfo* _tmp6_;
	GDesktopAppInfo* _tmp7_;
	GtkBox* box = NULL;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkStyleContext* _tmp10_;
	GtkBox* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	gchar** actions = NULL;
	GDesktopAppInfo* _tmp14_;
	gchar** _tmp15_;
	gchar** _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gint actions_length1;
	gint _actions_size_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	SlingshotBackendSwitcherooControl* _tmp32_;
	gboolean _tmp33_ = FALSE;
	SlingshotBackendSwitcherooControl* _tmp34_;
	GtkBox* _tmp47_;
	gint _rx = 0;
	gint ry = 0;
	gint _tmp48_ = 0;
	gint _tmp49_ = 0;
	gint y_center = 0;
	GtkBox* _tmp50_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_tmp0_ = self->priv->open_menu_row;
	if (_tmp0_ == row) {
		_g_object_unref0 (self->priv->open_menu_row);
		self->priv->open_menu_row = NULL;
		g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
		block11_data_unref (_data11_);
		_data11_ = NULL;
		return;
	}
	_tmp1_ = _g_object_ref0 (row);
	_g_object_unref0 (self->priv->open_menu_row);
	self->priv->open_menu_row = _tmp1_;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp2_ = slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_id (row);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	_data11_->desktop_id_captured = _tmp4_;
	_tmp5_ = slingshot_widgets_favorites_sidebar_favorite_row_get_app_info (row);
	_tmp6_ = _tmp5_;
	_tmp7_ = _g_object_ref0 (_tmp6_);
	_data11_->app_info = _tmp7_;
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp8_);
	box = _tmp8_;
	_tmp9_ = box;
	_tmp10_ = gtk_widget_get_style_context ((GtkWidget*) _tmp9_);
	gtk_style_context_add_class (_tmp10_, "context-menu");
	_tmp11_ = box;
	_tmp12_ = slingshot_widgets_favorites_sidebar_make_menu_btn (_ ("Remove from Favorites"), ___lambda86__slingshot_widgets_favorites_sidebar_action, block11_data_ref (_data11_), block11_data_unref);
	_tmp13_ = _tmp12_;
	gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = _data11_->app_info;
	_tmp16_ = _tmp15_ = g_desktop_app_info_list_actions (_tmp14_);
	_tmp17_ = (_tmp16_ != NULL) ? _vala_array_dup2 (_tmp16_, _vala_array_length (_tmp15_)) : _tmp16_;
	_tmp17__length1 = _vala_array_length (_tmp15_);
	actions = _tmp17_;
	actions_length1 = _tmp17__length1;
	_actions_size_ = actions_length1;
	_tmp18_ = actions;
	_tmp18__length1 = actions_length1;
	if (_tmp18__length1 > 0) {
		GtkBox* _tmp19_;
		GtkSeparator* _tmp20_;
		GtkSeparator* _tmp21_;
		gchar** _tmp22_;
		gint _tmp22__length1;
		_tmp19_ = box;
		_tmp20_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp20_);
		_tmp21_ = _tmp20_;
		gtk_container_add ((GtkContainer*) _tmp19_, (GtkWidget*) _tmp21_);
		_g_object_unref0 (_tmp21_);
		_tmp22_ = actions;
		_tmp22__length1 = actions_length1;
		{
			gchar** _action_collection = NULL;
			gint _action_collection_length1 = 0;
			gint __action_collection_size_ = 0;
			gint _action_it = 0;
			_action_collection = _tmp22_;
			_action_collection_length1 = _tmp22__length1;
			for (_action_it = 0; _action_it < _action_collection_length1; _action_it = _action_it + 1) {
				const gchar* _action = NULL;
				_action = _action_collection[_action_it];
				{
					Block12Data* _data12_;
					const gchar* _tmp23_;
					gchar* _tmp24_;
					GtkBox* _tmp25_;
					GDesktopAppInfo* _tmp26_;
					const gchar* _tmp27_;
					gchar* _tmp28_;
					gchar* _tmp29_;
					GtkButton* _tmp30_;
					GtkButton* _tmp31_;
					_data12_ = g_slice_new0 (Block12Data);
					_data12_->_ref_count_ = 1;
					_data12_->_data11_ = block11_data_ref (_data11_);
					_tmp23_ = _action;
					_tmp24_ = g_strdup (_tmp23_);
					_data12_->action = _tmp24_;
					_tmp25_ = box;
					_tmp26_ = _data11_->app_info;
					_tmp27_ = _data12_->action;
					_tmp28_ = g_desktop_app_info_get_action_name (_tmp26_, _tmp27_);
					_tmp29_ = _tmp28_;
					_tmp30_ = slingshot_widgets_favorites_sidebar_make_menu_btn (_tmp29_, ______lambda87__slingshot_widgets_favorites_sidebar_action, block12_data_ref (_data12_), block12_data_unref);
					_tmp31_ = _tmp30_;
					gtk_container_add ((GtkContainer*) _tmp25_, (GtkWidget*) _tmp31_);
					_g_object_unref0 (_tmp31_);
					_g_free0 (_tmp29_);
					block12_data_unref (_data12_);
					_data12_ = NULL;
				}
			}
		}
	}
	_tmp32_ = slingshot_backend_switcheroo_control_new ();
	_data11_->switcheroo = _tmp32_;
	_tmp34_ = _data11_->switcheroo;
	if (_tmp34_ != NULL) {
		SlingshotBackendSwitcherooControl* _tmp35_;
		gboolean _tmp36_;
		gboolean _tmp37_;
		_tmp35_ = _data11_->switcheroo;
		_tmp36_ = slingshot_backend_switcheroo_control_get_has_dual_gpu (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp33_ = _tmp37_;
	} else {
		_tmp33_ = FALSE;
	}
	if (_tmp33_) {
		Block13Data* _data13_;
		GDesktopAppInfo* _tmp38_;
		gchar* gpu_name = NULL;
		SlingshotBackendSwitcherooControl* _tmp39_;
		gchar* _tmp40_;
		GtkBox* _tmp41_;
		const gchar* _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
		GtkButton* _tmp45_;
		GtkButton* _tmp46_;
		_data13_ = g_slice_new0 (Block13Data);
		_data13_->_ref_count_ = 1;
		_data13_->_data11_ = block11_data_ref (_data11_);
		_tmp38_ = _data11_->app_info;
		_data13_->prefers_non_default = g_desktop_app_info_get_boolean (_tmp38_, "PrefersNonDefaultGPU");
		_tmp39_ = _data11_->switcheroo;
		_tmp40_ = slingshot_backend_switcheroo_control_get_gpu_name (_tmp39_, _data13_->prefers_non_default);
		gpu_name = _tmp40_;
		_tmp41_ = box;
		_tmp42_ = gpu_name;
		_tmp43_ = g_strdup_printf (_ ("Open with %s Graphics"), _tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = slingshot_widgets_favorites_sidebar_make_menu_btn (_tmp44_, ____lambda88__slingshot_widgets_favorites_sidebar_action, block13_data_ref (_data13_), block13_data_unref);
		_tmp46_ = _tmp45_;
		gtk_container_add ((GtkContainer*) _tmp41_, (GtkWidget*) _tmp46_);
		_g_object_unref0 (_tmp46_);
		_g_free0 (_tmp44_);
		_g_free0 (gpu_name);
		block13_data_unref (_data13_);
		_data13_ = NULL;
	}
	_tmp47_ = box;
	gtk_widget_show_all ((GtkWidget*) _tmp47_);
	gtk_widget_translate_coordinates ((GtkWidget*) row, (GtkWidget*) self, 0, 0, &_tmp48_, &_tmp49_);
	_rx = _tmp48_;
	ry = _tmp49_;
	y_center = ry + (gtk_widget_get_allocated_height ((GtkWidget*) row) / 2);
	_tmp50_ = box;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_SHOW_CONTEXT_MENU_SIGNAL], 0, (GtkWidget*) _tmp50_, y_center);
	actions = (_vala_array_free (actions, actions_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (box);
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		(_data14_->action_target_destroy_notify == NULL) ? NULL : (_data14_->action_target_destroy_notify (_data14_->action_target), NULL);
		_data14_->action = NULL;
		_data14_->action_target = NULL;
		_data14_->action_target_destroy_notify = NULL;
		g_slice_free (Block14Data, _data14_);
	}
}

static void
__lambda85_ (Block14Data* _data14_)
{
	_data14_->action (_data14_->action_target);
}

static void
___lambda85__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda85_ (self);
}

static GtkButton*
slingshot_widgets_favorites_sidebar_make_menu_btn (const gchar* label,
                                                   SlingshotWidgetsFavoritesSidebarAction action,
                                                   gpointer action_target,
                                                   GDestroyNotify action_target_destroy_notify)
{
	Block14Data* _data14_;
	GtkButton* btn = NULL;
	GtkButton* _tmp0_;
	GtkLabel* lbl = NULL;
	GtkWidget* _tmp1_;
	GtkButton* result;
	g_return_val_if_fail (label != NULL, NULL);
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	(_data14_->action_target_destroy_notify == NULL) ? NULL : (_data14_->action_target_destroy_notify (_data14_->action_target), NULL);
	_data14_->action = NULL;
	_data14_->action_target = NULL;
	_data14_->action_target_destroy_notify = NULL;
	_data14_->action = action;
	_data14_->action_target = action_target;
	_data14_->action_target_destroy_notify = action_target_destroy_notify;
	_tmp0_ = (GtkButton*) gtk_button_new_with_label (label);
	g_object_ref_sink (_tmp0_);
	btn = _tmp0_;
	gtk_button_set_relief (btn, GTK_RELIEF_NONE);
	gtk_widget_set_halign ((GtkWidget*) btn, GTK_ALIGN_FILL);
	_tmp1_ = gtk_bin_get_child ((GtkBin*) btn);
	lbl = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_label_get_type (), GtkLabel);
	gtk_widget_set_halign ((GtkWidget*) lbl, GTK_ALIGN_START);
	gtk_label_set_ellipsize (lbl, PANGO_ELLIPSIZE_END);
	g_signal_connect_data (btn, "clicked", (GCallback) ___lambda85__gtk_button_clicked, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	result = btn;
	block14_data_unref (_data14_);
	_data14_ = NULL;
	return result;
}

SlingshotWidgetsFavoritesSidebar*
slingshot_widgets_favorites_sidebar_construct (GType object_type)
{
	SlingshotWidgetsFavoritesSidebar * self = NULL;
	self = (SlingshotWidgetsFavoritesSidebar*) g_object_new (object_type, NULL);
	return self;
}

SlingshotWidgetsFavoritesSidebar*
slingshot_widgets_favorites_sidebar_new (void)
{
	return slingshot_widgets_favorites_sidebar_construct (SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_INT (GClosure * closure,
                                          GValue * return_value,
                                          guint n_param_values,
                                          const GValue * param_values,
                                          gpointer invocation_hint,
                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_INT) (gpointer data1, gpointer arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_int (param_values + 2), data2);
}

static inline gpointer
slingshot_widgets_favorites_sidebar_favorite_row_get_instance_private (SlingshotWidgetsFavoritesSidebarFavoriteRow* self)
{
	return G_STRUCT_MEMBER_P (self, SlingshotWidgetsFavoritesSidebarFavoriteRow_private_offset);
}

static SlingshotWidgetsFavoritesSidebarFavoriteRow*
slingshot_widgets_favorites_sidebar_favorite_row_construct (GType object_type,
                                                            const gchar* desktop_id,
                                                            const gchar* desktop_path)
{
	SlingshotWidgetsFavoritesSidebarFavoriteRow * self = NULL;
	g_return_val_if_fail (desktop_id != NULL, NULL);
	g_return_val_if_fail (desktop_path != NULL, NULL);
	self = (SlingshotWidgetsFavoritesSidebarFavoriteRow*) g_object_new (object_type, "desktop-id", desktop_id, "desktop-path", desktop_path, NULL);
	return self;
}

static SlingshotWidgetsFavoritesSidebarFavoriteRow*
slingshot_widgets_favorites_sidebar_favorite_row_new (const gchar* desktop_id,
                                                      const gchar* desktop_path)
{
	return slingshot_widgets_favorites_sidebar_favorite_row_construct (SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, desktop_id, desktop_path);
}

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

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

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

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

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

static void
___lambda79_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
              GPid pid,
              gint _)
{
	g_spawn_close_pid (pid);
}

static void
____lambda79__gchild_watch_func (GPid pid,
                                 gint wait_status,
                                 gpointer self)
{
	___lambda79_ ((SlingshotWidgetsFavoritesSidebarFavoriteRow*) self, pid, wait_status);
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_launch (SlingshotWidgetsFavoritesSidebarFavoriteRow* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		gchar* cmd = NULL;
		GDesktopAppInfo* _tmp0_;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar** parsed_args = NULL;
		gint parsed_args_length1 = 0;
		gint _parsed_args_size_ = 0;
		const gchar* _tmp3_;
		gchar** _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gboolean _tmp6_ = FALSE;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gint i = 0;
		gchar* wayland_display = NULL;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* xdg_runtime_dir = NULL;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar** argv = NULL;
		gchar* _tmp20_;
		gchar** _tmp21_;
		gint argv_length1;
		gint _argv_size_;
		gchar* _tmp27_;
		gboolean _tmp28_ = FALSE;
		const gchar* _tmp29_;
		gboolean _tmp35_ = FALSE;
		const gchar* _tmp36_;
		GPid child_pid = 0;
		gchar** _tmp48_;
		gint _tmp48__length1;
		gchar** _tmp49_;
		gchar** _tmp50_;
		gchar** _tmp51_;
		gint _tmp51__length1;
		GPid _tmp52_ = 0;
		_tmp0_ = self->priv->_app_info;
		_tmp1_ = g_app_info_get_commandline ((GAppInfo*) _tmp0_);
		_tmp2_ = g_strdup (_tmp1_);
		cmd = _tmp2_;
		_tmp3_ = cmd;
		g_shell_parse_argv (_tmp3_, &_tmp5_, &_tmp4_, &_inner_error0_);
		parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
		parsed_args = _tmp4_;
		parsed_args_length1 = _tmp5_;
		_parsed_args_size_ = parsed_args_length1;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (cmd);
			goto __catch0_g_error;
		}
		_tmp7_ = parsed_args;
		_tmp7__length1 = parsed_args_length1;
		if (_tmp7__length1 == 0) {
			_tmp6_ = TRUE;
		} else {
			gchar** _tmp8_;
			gint _tmp8__length1;
			const gchar* _tmp9_;
			_tmp8_ = parsed_args;
			_tmp8__length1 = parsed_args_length1;
			_tmp9_ = _tmp8_[0];
			_tmp6_ = g_strcmp0 (_tmp9_, "pkexec") != 0;
		}
		if (_tmp6_) {
			GDesktopAppInfo* _tmp10_;
			_tmp10_ = self->priv->_app_info;
			g_app_info_launch ((GAppInfo*) _tmp10_, NULL, NULL, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (cmd);
				goto __catch0_g_error;
			}
			parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (cmd);
			return;
		}
		i = 1;
		while (TRUE) {
			gboolean _tmp11_ = FALSE;
			gchar** _tmp12_;
			gint _tmp12__length1;
			gint _tmp15_;
			_tmp12_ = parsed_args;
			_tmp12__length1 = parsed_args_length1;
			if (i < _tmp12__length1) {
				gchar** _tmp13_;
				gint _tmp13__length1;
				const gchar* _tmp14_;
				_tmp13_ = parsed_args;
				_tmp13__length1 = parsed_args_length1;
				_tmp14_ = _tmp13_[i];
				_tmp11_ = g_str_has_prefix (_tmp14_, "-");
			} else {
				_tmp11_ = FALSE;
			}
			if (!_tmp11_) {
				break;
			}
			_tmp15_ = i;
			i = _tmp15_ + 1;
		}
		_tmp16_ = g_getenv ("WAYLAND_DISPLAY");
		_tmp17_ = g_strdup (_tmp16_);
		wayland_display = _tmp17_;
		_tmp18_ = g_getenv ("XDG_RUNTIME_DIR");
		_tmp19_ = g_strdup (_tmp18_);
		xdg_runtime_dir = _tmp19_;
		_tmp20_ = g_strdup ("pkexec");
		_tmp21_ = g_new0 (gchar*, 1 + 1);
		_tmp21_[0] = _tmp20_;
		argv = _tmp21_;
		argv_length1 = 1;
		_argv_size_ = argv_length1;
		{
			gint j = 0;
			j = 1;
			{
				gboolean _tmp22_ = FALSE;
				_tmp22_ = TRUE;
				while (TRUE) {
					gchar** _tmp24_;
					gint _tmp24__length1;
					const gchar* _tmp25_;
					gchar* _tmp26_;
					if (!_tmp22_) {
						gint _tmp23_;
						_tmp23_ = j;
						j = _tmp23_ + 1;
					}
					_tmp22_ = FALSE;
					if (!(j < i)) {
						break;
					}
					_tmp24_ = parsed_args;
					_tmp24__length1 = parsed_args_length1;
					_tmp25_ = _tmp24_[j];
					_tmp26_ = g_strdup (_tmp25_);
					_vala_array_add15 (&argv, &argv_length1, &_argv_size_, _tmp26_);
				}
			}
		}
		_tmp27_ = g_strdup ("env");
		_vala_array_add16 (&argv, &argv_length1, &_argv_size_, _tmp27_);
		_tmp29_ = wayland_display;
		if (_tmp29_ != NULL) {
			const gchar* _tmp30_;
			gint _tmp31_;
			gint _tmp32_;
			_tmp30_ = wayland_display;
			_tmp31_ = strlen (_tmp30_);
			_tmp32_ = _tmp31_;
			_tmp28_ = _tmp32_ > 0;
		} else {
			_tmp28_ = FALSE;
		}
		if (_tmp28_) {
			const gchar* _tmp33_;
			gchar* _tmp34_;
			_tmp33_ = wayland_display;
			_tmp34_ = g_strdup_printf ("WAYLAND_DISPLAY=%s", _tmp33_);
			_vala_array_add17 (&argv, &argv_length1, &_argv_size_, _tmp34_);
		}
		_tmp36_ = xdg_runtime_dir;
		if (_tmp36_ != NULL) {
			const gchar* _tmp37_;
			gint _tmp38_;
			gint _tmp39_;
			_tmp37_ = xdg_runtime_dir;
			_tmp38_ = strlen (_tmp37_);
			_tmp39_ = _tmp38_;
			_tmp35_ = _tmp39_ > 0;
		} else {
			_tmp35_ = FALSE;
		}
		if (_tmp35_) {
			const gchar* _tmp40_;
			gchar* _tmp41_;
			_tmp40_ = xdg_runtime_dir;
			_tmp41_ = g_strdup_printf ("XDG_RUNTIME_DIR=%s", _tmp40_);
			_vala_array_add18 (&argv, &argv_length1, &_argv_size_, _tmp41_);
		}
		{
			gint j = 0;
			j = i;
			{
				gboolean _tmp42_ = FALSE;
				_tmp42_ = TRUE;
				while (TRUE) {
					gchar** _tmp44_;
					gint _tmp44__length1;
					gchar** _tmp45_;
					gint _tmp45__length1;
					const gchar* _tmp46_;
					gchar* _tmp47_;
					if (!_tmp42_) {
						gint _tmp43_;
						_tmp43_ = j;
						j = _tmp43_ + 1;
					}
					_tmp42_ = FALSE;
					_tmp44_ = parsed_args;
					_tmp44__length1 = parsed_args_length1;
					if (!(j < _tmp44__length1)) {
						break;
					}
					_tmp45_ = parsed_args;
					_tmp45__length1 = parsed_args_length1;
					_tmp46_ = _tmp45_[j];
					_tmp47_ = g_strdup (_tmp46_);
					_vala_array_add19 (&argv, &argv_length1, &_argv_size_, _tmp47_);
				}
			}
		}
		_tmp48_ = argv;
		_tmp48__length1 = argv_length1;
		_tmp50_ = _tmp49_ = g_get_environ ();
		_tmp51_ = _tmp50_;
		_tmp51__length1 = _vala_array_length (_tmp49_);
		g_spawn_async ("/", _tmp48_, _tmp51_, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &_tmp52_, &_inner_error0_);
		child_pid = _tmp52_;
		_tmp51_ = (_vala_array_free (_tmp51_, _tmp51__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (xdg_runtime_dir);
			_g_free0 (wayland_display);
			parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (cmd);
			goto __catch0_g_error;
		}
		g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, child_pid, ____lambda79__gchild_watch_func, g_object_ref (self), g_object_unref);
		argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (xdg_runtime_dir);
		_g_free0 (wayland_display);
		parsed_args = (_vala_array_free (parsed_args, parsed_args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (cmd);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp53_;
		GError* _tmp54_;
		const gchar* _tmp55_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp53_ = self->priv->_desktop_id;
		_tmp54_ = e;
		_tmp55_ = _tmp54_->message;
		g_warning ("FavoritesSidebar.vala:342: Failed to launch '%s': %s", _tmp53_, _tmp55_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static const gchar*
slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_id (SlingshotWidgetsFavoritesSidebarFavoriteRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_desktop_id;
	result = _tmp0_;
	return result;
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_id (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_desktop_id);
		self->priv->_desktop_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY]);
	}
}

static const gchar*
slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_path (SlingshotWidgetsFavoritesSidebarFavoriteRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_desktop_path;
	result = _tmp0_;
	return result;
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_path (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_desktop_path);
		self->priv->_desktop_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY]);
	}
}

static GDesktopAppInfo*
slingshot_widgets_favorites_sidebar_favorite_row_get_app_info (SlingshotWidgetsFavoritesSidebarFavoriteRow* self)
{
	GDesktopAppInfo* result;
	GDesktopAppInfo* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_app_info;
	result = _tmp0_;
	return result;
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_set_app_info (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                               GDesktopAppInfo* value)
{
	GDesktopAppInfo* old_value;
	g_return_if_fail (self != NULL);
	old_value = slingshot_widgets_favorites_sidebar_favorite_row_get_app_info (self);
	if (old_value != value) {
		GDesktopAppInfo* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_app_info);
		self->priv->_app_info = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY]);
	}
}

static gboolean
_slingshot_widgets_favorites_sidebar_favorite_row___lambda80_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                               GdkEventButton* ev)
{
	gboolean result;
	g_return_val_if_fail (ev != NULL, FALSE);
	if (ev->button == ((guint) GDK_BUTTON_SECONDARY)) {
		g_signal_emit (self, slingshot_widgets_favorites_sidebar_favorite_row_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_CONTEXT_MENU_REQUESTED_SIGNAL], 0);
		result = GDK_EVENT_STOP;
		return result;
	}
	result = GDK_EVENT_PROPAGATE;
	return result;
}

static gboolean
__slingshot_widgets_favorites_sidebar_favorite_row___lambda80__gtk_widget_button_press_event (GtkWidget* _sender,
                                                                                              GdkEventButton* event,
                                                                                              gpointer self)
{
	gboolean result;
	result = _slingshot_widgets_favorites_sidebar_favorite_row___lambda80_ ((SlingshotWidgetsFavoritesSidebarFavoriteRow*) self, event);
	return result;
}

static gboolean
_slingshot_widgets_favorites_sidebar_favorite_row___lambda81_ (SlingshotWidgetsFavoritesSidebarFavoriteRow* self,
                                                               GdkEventKey* ev)
{
	gboolean result;
	g_return_val_if_fail (ev != NULL, FALSE);
	if (ev->keyval == GDK_KEY_Menu) {
		g_signal_emit (self, slingshot_widgets_favorites_sidebar_favorite_row_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_CONTEXT_MENU_REQUESTED_SIGNAL], 0);
		result = GDK_EVENT_STOP;
		return result;
	}
	result = GDK_EVENT_PROPAGATE;
	return result;
}

static gboolean
__slingshot_widgets_favorites_sidebar_favorite_row___lambda81__gtk_widget_key_press_event (GtkWidget* _sender,
                                                                                           GdkEventKey* event,
                                                                                           gpointer self)
{
	gboolean result;
	result = _slingshot_widgets_favorites_sidebar_favorite_row___lambda81_ ((SlingshotWidgetsFavoritesSidebarFavoriteRow*) self, event);
	return result;
}

static GObject *
slingshot_widgets_favorites_sidebar_favorite_row_constructor (GType type,
                                                              guint n_construct_properties,
                                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SlingshotWidgetsFavoritesSidebarFavoriteRow * self;
	const gchar* _tmp0_;
	GDesktopAppInfo* _tmp1_;
	GDesktopAppInfo* _tmp2_;
	GIcon* _tmp3_ = NULL;
	GDesktopAppInfo* _tmp4_;
	GIcon* _tmp5_;
	GIcon* _tmp6_;
	GIcon* icon = NULL;
	GIcon* _tmp8_;
	GtkImage* image = NULL;
	GIcon* _tmp9_;
	GtkImage* _tmp10_;
	GtkImage* _tmp11_;
	GtkImage* _tmp12_;
	GtkEventBox* event_box = NULL;
	GtkEventBox* _tmp13_;
	GtkEventBox* _tmp14_;
	GtkImage* _tmp15_;
	GtkEventBox* _tmp16_;
	GtkEventBox* _tmp17_;
	gchar* tooltip_text = NULL;
	GDesktopAppInfo* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* desc = NULL;
	GDesktopAppInfo* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gboolean _tmp24_ = FALSE;
	const gchar* _tmp25_;
	const gchar* _tmp32_;
	GtkEventBox* _tmp33_;
	parent_class = G_OBJECT_CLASS (slingshot_widgets_favorites_sidebar_favorite_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRow);
	_tmp0_ = self->priv->_desktop_id;
	_tmp1_ = g_desktop_app_info_new (_tmp0_);
	_tmp2_ = _tmp1_;
	slingshot_widgets_favorites_sidebar_favorite_row_set_app_info (self, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp4_ = self->priv->_app_info;
	_tmp5_ = g_app_info_get_icon ((GAppInfo*) _tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_tmp3_ = _tmp6_;
	if (_tmp3_ == NULL) {
		GThemedIcon* _tmp7_;
		_tmp7_ = (GThemedIcon*) g_themed_icon_new ("application-default-icon");
		_g_object_unref0 (_tmp3_);
		_tmp3_ = (GIcon*) _tmp7_;
	}
	_tmp8_ = _tmp3_;
	_tmp3_ = NULL;
	icon = _tmp8_;
	_tmp9_ = icon;
	_tmp10_ = (GtkImage*) gtk_image_new_from_gicon (_tmp9_, (GtkIconSize) GTK_ICON_SIZE_INVALID);
	g_object_ref_sink (_tmp10_);
	image = _tmp10_;
	_tmp11_ = image;
	gtk_image_set_pixel_size (_tmp11_, 32);
	_tmp12_ = image;
	g_object_set ((GtkWidget*) _tmp12_, "margin", 8, NULL);
	_tmp13_ = (GtkEventBox*) gtk_event_box_new ();
	g_object_ref_sink (_tmp13_);
	event_box = _tmp13_;
	_tmp14_ = event_box;
	_tmp15_ = image;
	gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = event_box;
	gtk_widget_add_events ((GtkWidget*) _tmp16_, (gint) ((GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK) | GDK_LEAVE_NOTIFY_MASK));
	_tmp17_ = event_box;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp17_);
	_tmp18_ = self->priv->_app_info;
	_tmp19_ = g_app_info_get_display_name ((GAppInfo*) _tmp18_);
	_tmp20_ = g_strdup (_tmp19_);
	tooltip_text = _tmp20_;
	_tmp21_ = self->priv->_app_info;
	_tmp22_ = g_app_info_get_description ((GAppInfo*) _tmp21_);
	_tmp23_ = g_strdup (_tmp22_);
	desc = _tmp23_;
	_tmp25_ = desc;
	if (_tmp25_ != NULL) {
		const gchar* _tmp26_;
		_tmp26_ = desc;
		_tmp24_ = g_strcmp0 (_tmp26_, "") != 0;
	} else {
		_tmp24_ = FALSE;
	}
	if (_tmp24_) {
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp27_ = tooltip_text;
		_tmp28_ = desc;
		_tmp29_ = g_strconcat ("\n", _tmp28_, NULL);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_strconcat (_tmp27_, _tmp30_, NULL);
		_g_free0 (tooltip_text);
		tooltip_text = _tmp31_;
		_g_free0 (_tmp30_);
	}
	_tmp32_ = tooltip_text;
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _tmp32_);
	_tmp33_ = event_box;
	g_signal_connect_object ((GtkWidget*) _tmp33_, "button-press-event", (GCallback) __slingshot_widgets_favorites_sidebar_favorite_row___lambda80__gtk_widget_button_press_event, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "key-press-event", (GCallback) __slingshot_widgets_favorites_sidebar_favorite_row___lambda81__gtk_widget_key_press_event, self, 0);
	_g_free0 (desc);
	_g_free0 (tooltip_text);
	_g_object_unref0 (event_box);
	_g_object_unref0 (image);
	_g_object_unref0 (icon);
	_g_object_unref0 (_tmp3_);
	return obj;
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_class_init (SlingshotWidgetsFavoritesSidebarFavoriteRowClass * klass,
                                                             gpointer klass_data)
{
	slingshot_widgets_favorites_sidebar_favorite_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SlingshotWidgetsFavoritesSidebarFavoriteRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_slingshot_widgets_favorites_sidebar_favorite_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_slingshot_widgets_favorites_sidebar_favorite_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = slingshot_widgets_favorites_sidebar_favorite_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = slingshot_widgets_favorites_sidebar_favorite_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY] = g_param_spec_string ("desktop-id", "desktop-id", "desktop-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY] = g_param_spec_string ("desktop-path", "desktop-path", "desktop-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY, slingshot_widgets_favorites_sidebar_favorite_row_properties[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY] = g_param_spec_object ("app-info", "app-info", "app-info", G_TYPE_DESKTOP_APP_INFO, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	slingshot_widgets_favorites_sidebar_favorite_row_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_CONTEXT_MENU_REQUESTED_SIGNAL] = g_signal_new ("context-menu-requested", SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_instance_init (SlingshotWidgetsFavoritesSidebarFavoriteRow * self,
                                                                gpointer klass)
{
	self->priv = slingshot_widgets_favorites_sidebar_favorite_row_get_instance_private (self);
}

static void
slingshot_widgets_favorites_sidebar_favorite_row_finalize (GObject * obj)
{
	SlingshotWidgetsFavoritesSidebarFavoriteRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRow);
	_g_free0 (self->priv->_desktop_id);
	_g_free0 (self->priv->_desktop_path);
	_g_object_unref0 (self->priv->_app_info);
	G_OBJECT_CLASS (slingshot_widgets_favorites_sidebar_favorite_row_parent_class)->finalize (obj);
}

GType
slingshot_widgets_favorites_sidebar_favorite_row_get_type (void)
{
	return slingshot_widgets_favorites_sidebar_favorite_row_type_id;
}

GType
slingshot_widgets_favorites_sidebar_favorite_row_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotWidgetsFavoritesSidebarFavoriteRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_widgets_favorites_sidebar_favorite_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SlingshotWidgetsFavoritesSidebarFavoriteRow), 0, (GInstanceInitFunc) slingshot_widgets_favorites_sidebar_favorite_row_instance_init, NULL };
	slingshot_widgets_favorites_sidebar_favorite_row_type_id = g_type_module_register_type (module, gtk_list_box_row_get_type (), "SlingshotWidgetsFavoritesSidebarFavoriteRow", &g_define_type_info, 0);
	SlingshotWidgetsFavoritesSidebarFavoriteRow_private_offset = sizeof (SlingshotWidgetsFavoritesSidebarFavoriteRowPrivate);
	return slingshot_widgets_favorites_sidebar_favorite_row_type_id;
}

static void
_vala_slingshot_widgets_favorites_sidebar_favorite_row_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec)
{
	SlingshotWidgetsFavoritesSidebarFavoriteRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRow);
	switch (property_id) {
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY:
		g_value_set_string (value, slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_id (self));
		break;
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY:
		g_value_set_string (value, slingshot_widgets_favorites_sidebar_favorite_row_get_desktop_path (self));
		break;
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY:
		g_value_set_object (value, slingshot_widgets_favorites_sidebar_favorite_row_get_app_info (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_slingshot_widgets_favorites_sidebar_favorite_row_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec)
{
	SlingshotWidgetsFavoritesSidebarFavoriteRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_TYPE_FAVORITE_ROW, SlingshotWidgetsFavoritesSidebarFavoriteRow);
	switch (property_id) {
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_ID_PROPERTY:
		slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_id (self, g_value_get_string (value));
		break;
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_DESKTOP_PATH_PROPERTY:
		slingshot_widgets_favorites_sidebar_favorite_row_set_desktop_path (self, g_value_get_string (value));
		break;
		case SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_FAVORITE_ROW_APP_INFO_PROPERTY:
		slingshot_widgets_favorites_sidebar_favorite_row_set_app_info (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static Block15Data*
block15_data_ref (Block15Data* _data15_)
{
	g_atomic_int_inc (&_data15_->_ref_count_);
	return _data15_;
}

static void
block15_data_unref (void * _userdata_)
{
	Block15Data* _data15_;
	_data15_ = (Block15Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data15_->_ref_count_)) {
		SlingshotWidgetsFavoritesSidebar* self;
		self = _data15_->self;
		_g_object_unref0 (_data15_->session_manager);
		_g_object_unref0 (self);
		g_slice_free (Block15Data, _data15_);
	}
}

static void
_slingshot_widgets_favorites_sidebar___lambda89_ (Block15Data* _data15_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* _tmp0_;
	self = _data15_->self;
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp0_ = _data15_->session_manager;
	slingshot_backend_session_manager_shutdown (_tmp0_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
__slingshot_widgets_favorites_sidebar___lambda89__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda89_ (self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda90_ (Block15Data* _data15_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* _tmp0_;
	self = _data15_->self;
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp0_ = _data15_->session_manager;
	slingshot_backend_session_manager_suspend (_tmp0_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
__slingshot_widgets_favorites_sidebar___lambda90__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda90_ (self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda91_ (Block15Data* _data15_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* _tmp0_;
	self = _data15_->self;
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp0_ = _data15_->session_manager;
	slingshot_backend_session_manager_restart (_tmp0_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
__slingshot_widgets_favorites_sidebar___lambda91__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda91_ (self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda92_ (Block15Data* _data15_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* _tmp0_;
	self = _data15_->self;
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp0_ = _data15_->session_manager;
	slingshot_backend_session_manager_lock (_tmp0_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
__slingshot_widgets_favorites_sidebar___lambda92__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda92_ (self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda93_ (Block15Data* _data15_)
{
	SlingshotWidgetsFavoritesSidebar* self;
	SlingshotBackendSessionManager* _tmp0_;
	self = _data15_->self;
	slingshot_widgets_favorites_sidebar_collapse_session (self);
	_tmp0_ = _data15_->session_manager;
	slingshot_backend_session_manager_logout (_tmp0_);
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
}

static void
__slingshot_widgets_favorites_sidebar___lambda93__slingshot_widgets_favorites_sidebar_action (gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda93_ (self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda94_ (SlingshotWidgetsFavoritesSidebar* self)
{
	GtkRevealer* _tmp0_;
	_g_object_unref0 (self->priv->open_menu_row);
	self->priv->open_menu_row = NULL;
	g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL], 0);
	self->priv->session_expanded = !self->priv->session_expanded;
	_tmp0_ = self->priv->session_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, self->priv->session_expanded);
}

static void
__slingshot_widgets_favorites_sidebar___lambda94__gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda94_ ((SlingshotWidgetsFavoritesSidebar*) self);
}

static void
_slingshot_widgets_favorites_sidebar___lambda95_ (SlingshotWidgetsFavoritesSidebar* self,
                                                  GtkListBoxRow* row)
{
	SlingshotWidgetsFavoritesSidebarFavoriteRow* fav_row = NULL;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp0_;
	SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp1_;
	g_return_if_fail (row != NULL);
	_tmp0_ = _g_object_ref0 (SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_IS_FAVORITE_ROW (row) ? ((SlingshotWidgetsFavoritesSidebarFavoriteRow*) row) : NULL);
	fav_row = _tmp0_;
	_tmp1_ = fav_row;
	if (_tmp1_ != NULL) {
		SlingshotWidgetsFavoritesSidebarFavoriteRow* _tmp2_;
		_tmp2_ = fav_row;
		slingshot_widgets_favorites_sidebar_favorite_row_launch (_tmp2_);
		g_signal_emit (self, slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL], 0);
	}
	_g_object_unref0 (fav_row);
}

static void
__slingshot_widgets_favorites_sidebar___lambda95__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                              GtkListBoxRow* row,
                                                                              gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda95_ ((SlingshotWidgetsFavoritesSidebar*) self, row);
}

static void
_slingshot_widgets_favorites_sidebar___lambda96_ (SlingshotWidgetsFavoritesSidebar* self)
{
	slingshot_widgets_favorites_sidebar_populate_favorites (self);
}

static void
__slingshot_widgets_favorites_sidebar___lambda96__slingshot_backend_favorites_manager_favorites_changed (SlingshotBackendFavoritesManager* _sender,
                                                                                                         gpointer self)
{
	_slingshot_widgets_favorites_sidebar___lambda96_ ((SlingshotWidgetsFavoritesSidebar*) self);
}

static GObject *
slingshot_widgets_favorites_sidebar_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SlingshotWidgetsFavoritesSidebar * self;
	Block15Data* _data15_;
	SlingshotBackendFavoritesManager* _tmp0_;
	GtkScrolledWindow* scrolled = NULL;
	GtkScrolledWindow* _tmp1_;
	GtkScrolledWindow* _tmp2_;
	GtkScrolledWindow* _tmp3_;
	GtkListBox* _tmp4_;
	GtkListBox* _tmp5_;
	GtkListBox* _tmp6_;
	GtkStyleContext* _tmp7_;
	GtkScrolledWindow* _tmp8_;
	GtkListBox* _tmp9_;
	SlingshotBackendSessionManager* _tmp10_;
	GtkBox* session_actions_box = NULL;
	GtkBox* _tmp11_;
	GtkBox* _tmp12_;
	GtkButton* _tmp13_;
	GtkButton* _tmp14_;
	GtkBox* _tmp15_;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	GtkBox* _tmp18_;
	GtkButton* _tmp19_;
	GtkButton* _tmp20_;
	GtkBox* _tmp21_;
	GtkButton* _tmp22_;
	GtkButton* _tmp23_;
	GtkBox* _tmp24_;
	GtkButton* _tmp25_;
	GtkButton* _tmp26_;
	GtkRevealer* _tmp27_;
	GtkRevealer* _tmp28_;
	GtkRevealer* _tmp29_;
	GtkRevealer* _tmp30_;
	GtkBox* _tmp31_;
	GtkRevealer* _tmp32_;
	GtkSeparator* separator = NULL;
	GtkSeparator* _tmp33_;
	GtkButton* _tmp34_;
	GtkButton* _tmp35_;
	GtkButton* _tmp36_;
	GtkButton* _tmp37_;
	GtkButton* _tmp38_;
	GtkImage* session_icon = NULL;
	GtkImage* _tmp39_;
	GtkImage* _tmp40_;
	GtkButton* _tmp41_;
	GtkImage* _tmp42_;
	GtkButton* _tmp43_;
	GtkScrolledWindow* _tmp44_;
	GtkSeparator* _tmp45_;
	GtkRevealer* _tmp46_;
	GtkButton* _tmp47_;
	GtkButton* _tmp48_;
	GtkListBox* _tmp49_;
	SlingshotBackendFavoritesManager* _tmp50_;
	GtkRevealer* _tmp51_;
	parent_class = G_OBJECT_CLASS (slingshot_widgets_favorites_sidebar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR, SlingshotWidgetsFavoritesSidebar);
	_data15_ = g_slice_new0 (Block15Data);
	_data15_->_ref_count_ = 1;
	_data15_->self = g_object_ref (self);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	g_object_set ((GtkWidget*) self, "width-request", 64, NULL);
	_tmp0_ = slingshot_backend_favorites_manager_get_default ();
	_g_object_unref0 (self->priv->favorites_manager);
	self->priv->favorites_manager = _tmp0_;
	_tmp1_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp1_);
	scrolled = _tmp1_;
	_tmp2_ = scrolled;
	g_object_set (_tmp2_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	_tmp3_ = scrolled;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp3_, TRUE);
	_tmp4_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->favorites_list);
	self->priv->favorites_list = _tmp4_;
	_tmp5_ = self->priv->favorites_list;
	gtk_list_box_set_selection_mode (_tmp5_, GTK_SELECTION_NONE);
	_tmp6_ = self->priv->favorites_list;
	_tmp7_ = gtk_widget_get_style_context ((GtkWidget*) _tmp6_);
	gtk_style_context_add_class (_tmp7_, "favorites-list");
	_tmp8_ = scrolled;
	_tmp9_ = self->priv->favorites_list;
	gtk_container_add ((GtkContainer*) _tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = slingshot_backend_session_manager_get_default ();
	_data15_->session_manager = _tmp10_;
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp11_);
	session_actions_box = _tmp11_;
	_tmp12_ = session_actions_box;
	_tmp13_ = slingshot_widgets_favorites_sidebar_make_session_btn (self, "system-shutdown-symbolic", _ ("Shut Down"), __slingshot_widgets_favorites_sidebar___lambda89__slingshot_widgets_favorites_sidebar_action, block15_data_ref (_data15_), block15_data_unref);
	_tmp14_ = _tmp13_;
	gtk_container_add ((GtkContainer*) _tmp12_, (GtkWidget*) _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = session_actions_box;
	_tmp16_ = slingshot_widgets_favorites_sidebar_make_session_btn (self, "system-suspend-symbolic", _ ("Suspend"), __slingshot_widgets_favorites_sidebar___lambda90__slingshot_widgets_favorites_sidebar_action, block15_data_ref (_data15_), block15_data_unref);
	_tmp17_ = _tmp16_;
	gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = session_actions_box;
	_tmp19_ = slingshot_widgets_favorites_sidebar_make_session_btn (self, "system-restart-symbolic", _ ("Restart"), __slingshot_widgets_favorites_sidebar___lambda91__slingshot_widgets_favorites_sidebar_action, block15_data_ref (_data15_), block15_data_unref);
	_tmp20_ = _tmp19_;
	gtk_container_add ((GtkContainer*) _tmp18_, (GtkWidget*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = session_actions_box;
	_tmp22_ = slingshot_widgets_favorites_sidebar_make_session_btn (self, "system-lock-screen-symbolic", _ ("Lock"), __slingshot_widgets_favorites_sidebar___lambda92__slingshot_widgets_favorites_sidebar_action, block15_data_ref (_data15_), block15_data_unref);
	_tmp23_ = _tmp22_;
	gtk_container_add ((GtkContainer*) _tmp21_, (GtkWidget*) _tmp23_);
	_g_object_unref0 (_tmp23_);
	_tmp24_ = session_actions_box;
	_tmp25_ = slingshot_widgets_favorites_sidebar_make_session_btn (self, "system-log-out-symbolic", _ ("Log Out"), __slingshot_widgets_favorites_sidebar___lambda93__slingshot_widgets_favorites_sidebar_action, block15_data_ref (_data15_), block15_data_unref);
	_tmp26_ = _tmp25_;
	gtk_container_add ((GtkContainer*) _tmp24_, (GtkWidget*) _tmp26_);
	_g_object_unref0 (_tmp26_);
	_tmp27_ = (GtkRevealer*) gtk_revealer_new ();
	g_object_ref_sink (_tmp27_);
	_g_object_unref0 (self->priv->session_revealer);
	self->priv->session_revealer = _tmp27_;
	_tmp28_ = self->priv->session_revealer;
	gtk_revealer_set_transition_type (_tmp28_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	_tmp29_ = self->priv->session_revealer;
	gtk_revealer_set_transition_duration (_tmp29_, (guint) 150);
	_tmp30_ = self->priv->session_revealer;
	_tmp31_ = session_actions_box;
	gtk_container_add ((GtkContainer*) _tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = self->priv->session_revealer;
	gtk_revealer_set_reveal_child (_tmp32_, FALSE);
	_tmp33_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp33_);
	separator = _tmp33_;
	_tmp34_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->session_button);
	self->priv->session_button = _tmp34_;
	_tmp35_ = self->priv->session_button;
	gtk_button_set_relief (_tmp35_, GTK_RELIEF_NONE);
	_tmp36_ = self->priv->session_button;
	gtk_widget_set_halign ((GtkWidget*) _tmp36_, GTK_ALIGN_CENTER);
	_tmp37_ = self->priv->session_button;
	gtk_widget_set_valign ((GtkWidget*) _tmp37_, GTK_ALIGN_CENTER);
	_tmp38_ = self->priv->session_button;
	g_object_set ((GtkWidget*) _tmp38_, "margin", 6, NULL);
	_tmp39_ = (GtkImage*) gtk_image_new_from_icon_name ("system-shutdown-symbolic", (GtkIconSize) GTK_ICON_SIZE_LARGE_TOOLBAR);
	g_object_ref_sink (_tmp39_);
	session_icon = _tmp39_;
	_tmp40_ = session_icon;
	gtk_image_set_pixel_size (_tmp40_, 24);
	_tmp41_ = self->priv->session_button;
	_tmp42_ = session_icon;
	gtk_container_add ((GtkContainer*) _tmp41_, (GtkWidget*) _tmp42_);
	_tmp43_ = self->priv->session_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp43_, _ ("Power Options"));
	_tmp44_ = scrolled;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp44_, TRUE, TRUE, (guint) 0);
	_tmp45_ = separator;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp45_, FALSE, FALSE, (guint) 0);
	_tmp46_ = self->priv->session_revealer;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp46_, FALSE, FALSE, (guint) 0);
	_tmp47_ = self->priv->session_button;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp47_, FALSE, FALSE, (guint) 0);
	_tmp48_ = self->priv->session_button;
	g_signal_connect_object (_tmp48_, "clicked", (GCallback) __slingshot_widgets_favorites_sidebar___lambda94__gtk_button_clicked, self, 0);
	_tmp49_ = self->priv->favorites_list;
	g_signal_connect_object (_tmp49_, "row-activated", (GCallback) __slingshot_widgets_favorites_sidebar___lambda95__gtk_list_box_row_activated, self, 0);
	_tmp50_ = self->priv->favorites_manager;
	g_signal_connect_object (_tmp50_, "favorites-changed", (GCallback) __slingshot_widgets_favorites_sidebar___lambda96__slingshot_backend_favorites_manager_favorites_changed, self, 0);
	gtk_widget_show_all ((GtkWidget*) self);
	_tmp51_ = self->priv->session_revealer;
	gtk_revealer_set_reveal_child (_tmp51_, FALSE);
	_g_object_unref0 (session_icon);
	_g_object_unref0 (separator);
	_g_object_unref0 (session_actions_box);
	_g_object_unref0 (scrolled);
	block15_data_unref (_data15_);
	_data15_ = NULL;
	return obj;
}

static void
slingshot_widgets_favorites_sidebar_class_init (SlingshotWidgetsFavoritesSidebarClass * klass,
                                                gpointer klass_data)
{
	slingshot_widgets_favorites_sidebar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SlingshotWidgetsFavoritesSidebar_private_offset);
	G_OBJECT_CLASS (klass)->constructor = slingshot_widgets_favorites_sidebar_constructor;
	G_OBJECT_CLASS (klass)->finalize = slingshot_widgets_favorites_sidebar_finalize;
	slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_APP_LAUNCHED_SIGNAL] = g_signal_new ("app-launched", SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_SHOW_CONTEXT_MENU_SIGNAL] = g_signal_new ("show-context-menu", SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2, gtk_widget_get_type (), G_TYPE_INT);
	slingshot_widgets_favorites_sidebar_signals[SLINGSHOT_WIDGETS_FAVORITES_SIDEBAR_HIDE_CONTEXT_MENU_SIGNAL] = g_signal_new ("hide-context-menu", SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
slingshot_widgets_favorites_sidebar_instance_init (SlingshotWidgetsFavoritesSidebar * self,
                                                   gpointer klass)
{
	self->priv = slingshot_widgets_favorites_sidebar_get_instance_private (self);
	self->priv->open_menu_row = NULL;
	self->priv->session_expanded = FALSE;
}

static void
slingshot_widgets_favorites_sidebar_finalize (GObject * obj)
{
	SlingshotWidgetsFavoritesSidebar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SLINGSHOT_WIDGETS_TYPE_FAVORITES_SIDEBAR, SlingshotWidgetsFavoritesSidebar);
	_g_object_unref0 (self->priv->favorites_list);
	_g_object_unref0 (self->priv->open_menu_row);
	_g_object_unref0 (self->priv->session_button);
	_g_object_unref0 (self->priv->session_revealer);
	_g_object_unref0 (self->priv->favorites_manager);
	_g_object_unref0 (self->priv->app_system);
	G_OBJECT_CLASS (slingshot_widgets_favorites_sidebar_parent_class)->finalize (obj);
}

GType
slingshot_widgets_favorites_sidebar_get_type (void)
{
	return slingshot_widgets_favorites_sidebar_type_id;
}

GType
slingshot_widgets_favorites_sidebar_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SlingshotWidgetsFavoritesSidebarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) slingshot_widgets_favorites_sidebar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SlingshotWidgetsFavoritesSidebar), 0, (GInstanceInitFunc) slingshot_widgets_favorites_sidebar_instance_init, NULL };
	slingshot_widgets_favorites_sidebar_type_id = g_type_module_register_type (module, gtk_box_get_type (), "SlingshotWidgetsFavoritesSidebar", &g_define_type_info, 0);
	SlingshotWidgetsFavoritesSidebar_private_offset = sizeof (SlingshotWidgetsFavoritesSidebarPrivate);
	return slingshot_widgets_favorites_sidebar_type_id;
}

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

