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

/*
 * Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
 *
 * 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 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include "planify.h"
#include <adwaita.h>
#include <gee.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.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 LAYOUTS_TYPE_LABEL_ROW (layouts_label_row_get_type ())
#define LAYOUTS_LABEL_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow))
#define LAYOUTS_LABEL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRowClass))
#define LAYOUTS_IS_LABEL_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_LABEL_ROW))
#define LAYOUTS_IS_LABEL_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_LABEL_ROW))
#define LAYOUTS_LABEL_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRowClass))

typedef struct _LayoutsLabelRow LayoutsLabelRow;
typedef struct _LayoutsLabelRowClass LayoutsLabelRowClass;
typedef struct _LayoutsLabelRowPrivate LayoutsLabelRowPrivate;

#define WIDGETS_TYPE_REORDER_CHILD (widgets_reorder_child_get_type ())
#define WIDGETS_REORDER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChild))
#define WIDGETS_REORDER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChildClass))
#define WIDGETS_IS_REORDER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_REORDER_CHILD))
#define WIDGETS_IS_REORDER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_REORDER_CHILD))
#define WIDGETS_REORDER_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_REORDER_CHILD, WidgetsReorderChildClass))

typedef struct _WidgetsReorderChild WidgetsReorderChild;
typedef struct _WidgetsReorderChildClass WidgetsReorderChildClass;
enum  {
	LAYOUTS_LABEL_ROW_0_PROPERTY,
	LAYOUTS_LABEL_ROW_LABEL_PROPERTY,
	LAYOUTS_LABEL_ROW_NUM_PROPERTIES
};
static GParamSpec* layouts_label_row_properties[LAYOUTS_LABEL_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_TYPE_LABEL (dialogs_label_get_type ())
#define DIALOGS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_LABEL, DialogsLabel))
#define DIALOGS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_LABEL, DialogsLabelClass))
#define DIALOGS_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_LABEL))
#define DIALOGS_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_LABEL))
#define DIALOGS_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_LABEL, DialogsLabelClass))

typedef struct _DialogsLabel DialogsLabel;
typedef struct _DialogsLabelClass DialogsLabelClass;

#define TYPE_PLANIFY (planify_get_type ())
#define PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLANIFY, Planify))
#define PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLANIFY, PlanifyClass))
#define IS_PLANIFY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLANIFY))
#define IS_PLANIFY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLANIFY))
#define PLANIFY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLANIFY, PlanifyClass))

typedef struct _Planify Planify;
typedef struct _PlanifyClass PlanifyClass;
typedef struct _PlanifyPrivate PlanifyPrivate;

#define TYPE_MAIN_WINDOW (main_window_get_type ())
#define MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAIN_WINDOW, MainWindow))
#define MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MAIN_WINDOW, MainWindowClass))
#define IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAIN_WINDOW))
#define IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MAIN_WINDOW))
#define MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MAIN_WINDOW, MainWindowClass))

typedef struct _MainWindow MainWindow;
typedef struct _MainWindowClass MainWindowClass;
typedef struct _Block42Data Block42Data;

struct _LayoutsLabelRow {
	GtkListBoxRow parent_instance;
	LayoutsLabelRowPrivate * priv;
};

struct _LayoutsLabelRowClass {
	GtkListBoxRowClass parent_class;
};

struct _LayoutsLabelRowPrivate {
	ObjectsLabel* _label;
	GtkLabel* name_label;
	GtkLabel* count_label;
	GtkRevealer* count_revealer;
	GtkRevealer* main_revealer;
	GtkImage* widget_color;
	GtkBox* handle_grid;
	WidgetsReorderChild* reorder;
	GeeHashMap* signal_map;
};

struct _Planify {
	AdwApplication parent_instance;
	PlanifyPrivate * priv;
	MainWindow* main_window;
};

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block42Data {
	int _ref_count_;
	LayoutsLabelRow* self;
	WidgetsLoadingButton* loading_button;
};

static gint LayoutsLabelRow_private_offset;
static gpointer layouts_label_row_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType layouts_label_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsLabelRow, g_object_unref)
VALA_EXTERN GType widgets_reorder_child_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsReorderChild, g_object_unref)
VALA_EXTERN LayoutsLabelRow* layouts_label_row_new (ObjectsLabel* label);
VALA_EXTERN LayoutsLabelRow* layouts_label_row_construct (GType object_type,
                                              ObjectsLabel* label);
VALA_EXTERN void layouts_label_row_update_request (LayoutsLabelRow* self);
VALA_EXTERN ObjectsLabel* layouts_label_row_get_label (LayoutsLabelRow* self);
static void layouts_label_row_update_labels_item_order (LayoutsLabelRow* self,
                                                 GtkListBox* listbox);
static GtkPopover* layouts_label_row_build_context_menu (LayoutsLabelRow* self);
static void __lambda838_ (LayoutsLabelRow* self);
VALA_EXTERN GType dialogs_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsLabel, g_object_unref)
VALA_EXTERN DialogsLabel* dialogs_label_new (ObjectsLabel* label);
VALA_EXTERN DialogsLabel* dialogs_label_construct (GType object_type,
                                       ObjectsLabel* label);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void ___lambda838__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda844_ (LayoutsLabelRow* self);
static void ___lambda844__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN void layouts_label_row_hide_destroy (LayoutsLabelRow* self);
VALA_EXTERN void layouts_label_row_clean_up (LayoutsLabelRow* self);
static gboolean __lambda845_ (LayoutsLabelRow* self);
static gboolean ___lambda845__gsource_func (gpointer self);
VALA_EXTERN void widgets_reorder_child_clean_up (WidgetsReorderChild* self);
static void layouts_label_row_set_label (LayoutsLabelRow* self,
                                  ObjectsLabel* value);
static GObject * layouts_label_row_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_new (GtkWidget* widget,
                                                GtkListBoxRow* row);
VALA_EXTERN WidgetsReorderChild* widgets_reorder_child_construct (GType object_type,
                                                      GtkWidget* widget,
                                                      GtkListBoxRow* row);
VALA_EXTERN void widgets_reorder_child_build_drag_and_drop (WidgetsReorderChild* self);
static gboolean _layouts_label_row___lambda846_ (LayoutsLabelRow* self);
static gboolean __layouts_label_row___lambda846__gsource_func (gpointer self);
static void _layouts_label_row___lambda847_ (LayoutsLabelRow* self);
static void __layouts_label_row___lambda847__objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                   const gchar* update_id,
                                                                   gpointer self);
static void _layouts_label_row___lambda848_ (LayoutsLabelRow* self);
static void __layouts_label_row___lambda848__objects_label_label_count_updated (ObjectsLabel* _sender,
                                                                         gpointer self);
static void _layouts_label_row___lambda849_ (LayoutsLabelRow* self,
                                      GtkListBox* listbox);
static void __layouts_label_row___lambda849__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                         GtkListBox* listbox,
                                                                         gpointer self);
static void _layouts_label_row___lambda850_ (Block42Data* _data42_);
static void __layouts_label_row___lambda850__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                          gpointer self);
static void _layouts_label_row___lambda851_ (LayoutsLabelRow* self);
static void __layouts_label_row___lambda851__gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self);
static void _layouts_label_row___lambda852_ (LayoutsLabelRow* self);
VALA_EXTERN void widgets_reorder_child_draw_motion_widgets (WidgetsReorderChild* self);
static void __layouts_label_row___lambda852__g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self);
static void layouts_label_row_finalize (GObject * obj);
static GType layouts_label_row_get_type_once (void);
static void _vala_layouts_label_row_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_layouts_label_row_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
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 inline gpointer
layouts_label_row_get_instance_private (LayoutsLabelRow* self)
{
	return G_STRUCT_MEMBER_P (self, LayoutsLabelRow_private_offset);
}

LayoutsLabelRow*
layouts_label_row_construct (GType object_type,
                             ObjectsLabel* label)
{
	LayoutsLabelRow * self = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	self = (LayoutsLabelRow*) g_object_new (object_type, "label", label, NULL);
	return self;
}

LayoutsLabelRow*
layouts_label_row_new (ObjectsLabel* label)
{
	return layouts_label_row_construct (LAYOUTS_TYPE_LABEL_ROW, label);
}

void
layouts_label_row_update_request (LayoutsLabelRow* self)
{
	GtkLabel* _tmp0_;
	ObjectsLabel* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	Util* _tmp4_;
	Util* _tmp5_;
	Util* _tmp6_;
	Util* _tmp7_;
	ObjectsLabel* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GtkImage* _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_label;
	_tmp1_ = self->priv->_label;
	_tmp2_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_label_set_label (_tmp0_, _tmp3_);
	_tmp4_ = util_get_default ();
	_tmp5_ = _tmp4_;
	_tmp6_ = util_get_default ();
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_label;
	_tmp9_ = objects_base_object_get_color ((ObjectsBaseObject*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = util_get_color (_tmp7_, _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = self->priv->widget_color;
	util_set_widget_color (_tmp5_, _tmp12_, (GtkWidget*) _tmp13_);
	_g_free0 (_tmp12_);
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (_tmp5_);
}

static void
layouts_label_row_update_labels_item_order (LayoutsLabelRow* self,
                                            GtkListBox* listbox)
{
	LayoutsLabelRow* label_row = NULL;
	gint row_index = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	label_row = NULL;
	row_index = 0;
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = TRUE;
		while (TRUE) {
			GtkListBoxRow* _tmp2_;
			LayoutsLabelRow* _tmp3_;
			gint _tmp9_;
			if (!_tmp0_) {
				LayoutsLabelRow* _tmp1_;
				_tmp1_ = label_row;
				if (!(_tmp1_ != NULL)) {
					break;
				}
			}
			_tmp0_ = FALSE;
			_tmp2_ = gtk_list_box_get_row_at_index (listbox, row_index);
			label_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow);
			_tmp3_ = label_row;
			if (_tmp3_ != NULL) {
				LayoutsLabelRow* _tmp4_;
				ObjectsLabel* _tmp5_;
				ServicesStore* _tmp6_;
				LayoutsLabelRow* _tmp7_;
				ObjectsLabel* _tmp8_;
				_tmp4_ = label_row;
				_tmp5_ = _tmp4_->priv->_label;
				objects_label_set_item_order (_tmp5_, row_index);
				_tmp6_ = services_store_instance ();
				_tmp7_ = label_row;
				_tmp8_ = _tmp7_->priv->_label;
				services_store_update_label (_tmp6_, _tmp8_);
			}
			_tmp9_ = row_index;
			row_index = _tmp9_ + 1;
		}
	}
}

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

static void
__lambda838_ (LayoutsLabelRow* self)
{
	DialogsLabel* dialog = NULL;
	ObjectsLabel* _tmp0_;
	DialogsLabel* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	_tmp0_ = self->priv->_label;
	_tmp1_ = dialogs_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	_tmp2_ = planify__instance;
	_tmp3_ = _tmp2_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp3_);
	_g_object_unref0 (dialog);
}

static void
___lambda838__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda838_ ((LayoutsLabelRow*) self);
}

static void
__lambda844_ (LayoutsLabelRow* self)
{
	ObjectsLabel* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	_tmp0_ = self->priv->_label;
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	objects_label_delete_label (_tmp0_, (GtkWindow*) _tmp2_, NULL, NULL);
}

static void
___lambda844__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda844_ ((LayoutsLabelRow*) self);
}

static GtkPopover*
layouts_label_row_build_context_menu (LayoutsLabelRow* self)
{
	WidgetsContextMenuMenuItem* edit_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	WidgetsContextMenuMenuItem* delete_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp2_;
	WidgetsContextMenuMenuSeparator* _tmp3_;
	WidgetsContextMenuMenuSeparator* _tmp4_;
	GtkPopover* menu_popover = NULL;
	GtkWidget* _tmp5_;
	GtkPopover* _tmp6_ = NULL;
	GeeHashMap* _tmp7_;
	gulong _tmp8_;
	GeeHashMap* _tmp9_;
	gulong _tmp10_;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Edit Label"), "edit-symbolic");
	g_object_ref_sink (_tmp0_);
	edit_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Delete Label"), "user-trash-symbolic");
	g_object_ref_sink (_tmp1_);
	delete_item = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) delete_item, "menu-item-danger");
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp2_);
	menu_box = _tmp2_;
	gtk_widget_set_margin_bottom ((GtkWidget*) menu_box, 3);
	gtk_widget_set_margin_top ((GtkWidget*) menu_box, 3);
	gtk_box_append (menu_box, (GtkWidget*) edit_item);
	_tmp3_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_box_append (menu_box, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	gtk_box_append (menu_box, (GtkWidget*) delete_item);
	_tmp5_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp6_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp6_, FALSE);
	gtk_popover_set_child (_tmp6_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	gtk_popover_set_position (_tmp6_, GTK_POS_BOTTOM);
	g_object_set ((GtkWidget*) _tmp6_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp6_);
	menu_popover = _tmp6_;
	_tmp7_ = self->priv->signal_map;
	_tmp8_ = g_signal_connect_object ((GtkButton*) edit_item, "clicked", (GCallback) ___lambda838__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) _tmp8_), (GObject*) edit_item);
	_tmp9_ = self->priv->signal_map;
	_tmp10_ = g_signal_connect_object ((GtkButton*) delete_item, "clicked", (GCallback) ___lambda844__gtk_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, (gpointer) ((guintptr) _tmp10_), (GObject*) delete_item);
	result = menu_popover;
	_g_object_unref0 (menu_box);
	_g_object_unref0 (delete_item);
	_g_object_unref0 (edit_item);
	return result;
}

static gboolean
__lambda845_ (LayoutsLabelRow* self)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	gboolean result;
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp1_ = _tmp0_;
	gtk_list_box_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_list_box_get_type (), GtkListBox), (GtkWidget*) self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda845__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda845_ ((LayoutsLabelRow*) self);
	return result;
}

void
layouts_label_row_hide_destroy (LayoutsLabelRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	layouts_label_row_clean_up (self);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda845__gsource_func, g_object_ref (self), g_object_unref);
}

void
layouts_label_row_clean_up (LayoutsLabelRow* self)
{
	GeeHashMap* _tmp15_;
	WidgetsReorderChild* _tmp16_;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->signal_map;
		_tmp1_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_entry_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			GeeMapEntry* _tmp12_;
			gconstpointer _tmp13_;
			gconstpointer _tmp14_;
			_tmp6_ = _entry_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			entry = (GeeMapEntry*) _tmp8_;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_value (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = entry;
			_tmp13_ = gee_map_entry_get_key (_tmp12_);
			_tmp14_ = _tmp13_;
			g_signal_handler_disconnect ((GObject*) _tmp11_, (gulong) ((guintptr) _tmp14_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp15_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
	_tmp16_ = self->priv->reorder;
	if (_tmp16_ != NULL) {
		WidgetsReorderChild* _tmp17_;
		_tmp17_ = self->priv->reorder;
		widgets_reorder_child_clean_up (_tmp17_);
		_g_object_unref0 (self->priv->reorder);
		self->priv->reorder = NULL;
	}
}

ObjectsLabel*
layouts_label_row_get_label (LayoutsLabelRow* self)
{
	ObjectsLabel* result;
	ObjectsLabel* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_label;
	result = _tmp0_;
	return result;
}

static void
layouts_label_row_set_label (LayoutsLabelRow* self,
                             ObjectsLabel* value)
{
	ObjectsLabel* old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_label_row_get_label (self);
	if (old_value != value) {
		ObjectsLabel* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_label);
		self->priv->_label = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, layouts_label_row_properties[LAYOUTS_LABEL_ROW_LABEL_PROPERTY]);
	}
}

static Block42Data*
block42_data_ref (Block42Data* _data42_)
{
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}

static void
block42_data_unref (void * _userdata_)
{
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		LayoutsLabelRow* self;
		self = _data42_->self;
		_g_object_unref0 (_data42_->loading_button);
		_g_object_unref0 (self);
		g_slice_free (Block42Data, _data42_);
	}
}

static gboolean
_layouts_label_row___lambda846_ (LayoutsLabelRow* self)
{
	GtkRevealer* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, TRUE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__layouts_label_row___lambda846__gsource_func (gpointer self)
{
	gboolean result;
	result = _layouts_label_row___lambda846_ ((LayoutsLabelRow*) self);
	return result;
}

static void
_layouts_label_row___lambda847_ (LayoutsLabelRow* self)
{
	layouts_label_row_update_request (self);
}

static void
__layouts_label_row___lambda847__objects_base_object_updated (ObjectsBaseObject* _sender,
                                                              const gchar* update_id,
                                                              gpointer self)
{
	_layouts_label_row___lambda847_ ((LayoutsLabelRow*) self);
}

static void
_layouts_label_row___lambda848_ (LayoutsLabelRow* self)
{
	GtkLabel* _tmp0_;
	ObjectsLabel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkRevealer* _tmp6_;
	GtkLabel* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	_tmp0_ = self->priv->count_label;
	_tmp1_ = self->priv->_label;
	_tmp2_ = objects_label_get_label_count (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup_printf ("%i", _tmp3_);
	_tmp5_ = _tmp4_;
	gtk_label_set_label (_tmp0_, _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = self->priv->count_revealer;
	_tmp7_ = self->priv->count_label;
	_tmp8_ = gtk_label_get_label (_tmp7_);
	_tmp9_ = _tmp8_;
	gtk_revealer_set_reveal_child (_tmp6_, atoi (_tmp9_) > 0);
}

static void
__layouts_label_row___lambda848__objects_label_label_count_updated (ObjectsLabel* _sender,
                                                                    gpointer self)
{
	_layouts_label_row___lambda848_ ((LayoutsLabelRow*) self);
}

static void
_layouts_label_row___lambda849_ (LayoutsLabelRow* self,
                                 GtkListBox* listbox)
{
	g_return_if_fail (listbox != NULL);
	layouts_label_row_update_labels_item_order (self, listbox);
}

static void
__layouts_label_row___lambda849__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                    GtkListBox* listbox,
                                                                    gpointer self)
{
	_layouts_label_row___lambda849_ ((LayoutsLabelRow*) self, listbox);
}

static void
_layouts_label_row___lambda850_ (Block42Data* _data42_)
{
	LayoutsLabelRow* self;
	WidgetsLoadingButton* _tmp0_;
	ObjectsLabel* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = _data42_->self;
	_tmp0_ = _data42_->loading_button;
	_tmp1_ = self->priv->_label;
	_tmp2_ = objects_base_object_get_loading ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	widgets_loading_button_set_is_loading (_tmp0_, _tmp3_);
}

static void
__layouts_label_row___lambda850__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                     gpointer self)
{
	_layouts_label_row___lambda850_ (self);
}

static void
_layouts_label_row___lambda851_ (LayoutsLabelRow* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsLabel* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_label;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_LABEL, _tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
__layouts_label_row___lambda851__gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self)
{
	_layouts_label_row___lambda851_ ((LayoutsLabelRow*) self);
}

static void
_layouts_label_row___lambda852_ (LayoutsLabelRow* self)
{
	WidgetsReorderChild* _tmp0_;
	_tmp0_ = self->priv->reorder;
	widgets_reorder_child_draw_motion_widgets (_tmp0_);
}

static void
__layouts_label_row___lambda852__g_object_notify (GObject* _sender,
                                                  GParamSpec* pspec,
                                                  gpointer self)
{
	_layouts_label_row___lambda852_ ((LayoutsLabelRow*) self);
}

static GObject *
layouts_label_row_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	LayoutsLabelRow * self;
	Block42Data* _data42_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkImage* _tmp7_ = NULL;
	ObjectsLabel* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GtkLabel* _tmp11_ = NULL;
	ObjectsLabel* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GtkLabel* _tmp17_ = NULL;
	GtkLabel* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GtkLabel* _tmp21_;
	GtkWidget* _tmp22_;
	GtkRevealer* _tmp23_ = NULL;
	GtkMenuButton* menu_button = NULL;
	GtkPopover* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar** _tmp29_;
	GtkMenuButton* _tmp30_ = NULL;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar** _tmp34_;
	WidgetsLoadingButton* _tmp35_ = NULL;
	GtkBox* buttons_box = NULL;
	GtkBox* _tmp36_;
	GtkBox* _tmp37_;
	GtkMenuButton* _tmp38_;
	GtkBox* _tmp39_;
	WidgetsLoadingButton* _tmp40_;
	GtkBox* _tmp41_ = NULL;
	GtkBox* _tmp42_;
	GtkImage* _tmp43_;
	GtkBox* _tmp44_;
	GtkLabel* _tmp45_;
	GtkBox* _tmp46_;
	GtkRevealer* _tmp47_;
	GtkBox* _tmp48_;
	GtkBox* _tmp49_;
	GtkBox* _tmp50_;
	WidgetsReorderChild* _tmp51_;
	WidgetsReorderChild* _tmp52_;
	GtkWidget* _tmp53_;
	GtkRevealer* _tmp54_ = NULL;
	GtkRevealer* _tmp55_;
	WidgetsReorderChild* _tmp56_;
	GtkRevealer* _tmp57_;
	guint _tmp58_;
	guint _tmp59_;
	GeeHashMap* _tmp60_;
	ObjectsLabel* _tmp61_;
	gulong _tmp62_;
	ObjectsLabel* _tmp63_;
	GeeHashMap* _tmp64_;
	ObjectsLabel* _tmp65_;
	gulong _tmp66_;
	ObjectsLabel* _tmp67_;
	GeeHashMap* _tmp68_;
	WidgetsReorderChild* _tmp69_;
	gulong _tmp70_;
	WidgetsReorderChild* _tmp71_;
	GeeHashMap* _tmp72_;
	ObjectsLabel* _tmp73_;
	gulong _tmp74_;
	ObjectsLabel* _tmp75_;
	GeeHashMap* _tmp76_;
	WidgetsLoadingButton* _tmp77_;
	gulong _tmp78_;
	WidgetsLoadingButton* _tmp79_;
	GeeHashMap* _tmp80_;
	GtkRevealer* _tmp81_;
	gulong _tmp82_;
	GtkRevealer* _tmp83_;
	parent_class = G_OBJECT_CLASS (layouts_label_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow);
	_data42_ = g_slice_new0 (Block42Data);
	_data42_->_ref_count_ = 1;
	_data42_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("row");
	_tmp1_ = g_strdup ("transition");
	_tmp2_ = g_strdup ("no-padding");
	_tmp3_ = g_new0 (gchar*, 3 + 1);
	_tmp3_[0] = _tmp0_;
	_tmp3_[1] = _tmp1_;
	_tmp3_[2] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 3;
	gtk_widget_set_css_classes ((GtkWidget*) self, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = g_strdup ("icon-color");
	_tmp6_ = g_new0 (gchar*, 1 + 1);
	_tmp6_[0] = _tmp5_;
	_tmp7_ = (GtkImage*) gtk_image_new_from_icon_name ("tag-outline-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->widget_color);
	self->priv->widget_color = _tmp7_;
	_tmp8_ = self->priv->_label;
	_tmp9_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = (GtkLabel*) gtk_label_new (_tmp10_);
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_label_set_ellipsize (_tmp11_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp11_;
	_tmp12_ = self->priv->_label;
	_tmp13_ = objects_label_get_label_count (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup_printf ("%i", _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp17_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->count_label);
	self->priv->count_label = _tmp17_;
	_g_free0 (_tmp16_);
	_tmp18_ = self->priv->count_label;
	_tmp19_ = gtk_label_get_label (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = self->priv->count_label;
	_tmp22_ = _g_object_ref0 ((GtkWidget*) _tmp21_);
	_tmp23_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_reveal_child (_tmp23_, atoi (_tmp20_) > 0);
	gtk_revealer_set_transition_type (_tmp23_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	gtk_revealer_set_child (_tmp23_, _tmp22_);
	_g_object_unref0 (_tmp22_);
	g_object_ref_sink (_tmp23_);
	_g_object_unref0 (self->priv->count_revealer);
	self->priv->count_revealer = _tmp23_;
	_tmp24_ = layouts_label_row_build_context_menu (self);
	_tmp25_ = g_strdup ("view-more-symbolic");
	_tmp26_ = g_strdup ("flat");
	_tmp27_ = g_strdup ("header-item-button");
	_tmp28_ = g_strdup ("dimmed");
	_tmp29_ = g_new0 (gchar*, 3 + 1);
	_tmp29_[0] = _tmp26_;
	_tmp29_[1] = _tmp27_;
	_tmp29_[2] = _tmp28_;
	_tmp30_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp30_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp30_, GTK_ALIGN_CENTER);
	gtk_menu_button_set_popover (_tmp30_, _tmp24_);
	_g_object_unref0 (_tmp24_);
	gtk_menu_button_set_icon_name (_tmp30_, _tmp25_);
	_g_free0 (_tmp25_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp30_, _tmp29_);
	_tmp29_ = (_vala_array_free (_tmp29_, 3, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp30_);
	menu_button = _tmp30_;
	_tmp31_ = g_strdup ("flat");
	_tmp32_ = g_strdup ("dimmed");
	_tmp33_ = g_strdup ("no-padding");
	_tmp34_ = g_new0 (gchar*, 3 + 1);
	_tmp34_[0] = _tmp31_;
	_tmp34_[1] = _tmp32_;
	_tmp34_[2] = _tmp33_;
	_tmp35_ = widgets_loading_button_new_with_icon ("go-next-symbolic", 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp35_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp35_, _tmp34_);
	_tmp34_ = (_vala_array_free (_tmp34_, 3, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp35_);
	_data42_->loading_button = _tmp35_;
	_tmp36_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp36_);
	buttons_box = _tmp36_;
	_tmp37_ = buttons_box;
	_tmp38_ = menu_button;
	gtk_box_append (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = buttons_box;
	_tmp40_ = _data42_->loading_button;
	gtk_box_append (_tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp41_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp41_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp41_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp41_, 3);
	g_object_ref_sink (_tmp41_);
	_g_object_unref0 (self->priv->handle_grid);
	self->priv->handle_grid = _tmp41_;
	_tmp42_ = self->priv->handle_grid;
	_tmp43_ = self->priv->widget_color;
	gtk_box_append (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = self->priv->handle_grid;
	_tmp45_ = self->priv->name_label;
	gtk_box_append (_tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = self->priv->handle_grid;
	_tmp47_ = self->priv->count_revealer;
	gtk_box_append (_tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = self->priv->handle_grid;
	_tmp49_ = buttons_box;
	gtk_box_append (_tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = self->priv->handle_grid;
	_tmp51_ = widgets_reorder_child_new ((GtkWidget*) _tmp50_, (GtkListBoxRow*) self);
	g_object_ref_sink (_tmp51_);
	_g_object_unref0 (self->priv->reorder);
	self->priv->reorder = _tmp51_;
	_tmp52_ = self->priv->reorder;
	_tmp53_ = _g_object_ref0 ((GtkWidget*) _tmp52_);
	_tmp54_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp54_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp54_, _tmp53_);
	_g_object_unref0 (_tmp53_);
	g_object_ref_sink (_tmp54_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp54_;
	_tmp55_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp55_);
	_tmp56_ = self->priv->reorder;
	widgets_reorder_child_build_drag_and_drop (_tmp56_);
	layouts_label_row_update_request (self);
	_tmp57_ = self->priv->main_revealer;
	_tmp58_ = gtk_revealer_get_transition_duration (_tmp57_);
	_tmp59_ = _tmp58_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp59_, __layouts_label_row___lambda846__gsource_func, g_object_ref (self), g_object_unref);
	_tmp60_ = self->priv->signal_map;
	_tmp61_ = self->priv->_label;
	_tmp62_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp61_, "updated", (GCallback) __layouts_label_row___lambda847__objects_base_object_updated, self, 0);
	_tmp63_ = self->priv->_label;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp60_, (gpointer) ((guintptr) _tmp62_), (GObject*) _tmp63_);
	_tmp64_ = self->priv->signal_map;
	_tmp65_ = self->priv->_label;
	_tmp66_ = g_signal_connect_object (_tmp65_, "label-count-updated", (GCallback) __layouts_label_row___lambda848__objects_label_label_count_updated, self, 0);
	_tmp67_ = self->priv->_label;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp64_, (gpointer) ((guintptr) _tmp66_), (GObject*) _tmp67_);
	_tmp68_ = self->priv->signal_map;
	_tmp69_ = self->priv->reorder;
	_tmp70_ = g_signal_connect_object (_tmp69_, "on-drop-end", (GCallback) __layouts_label_row___lambda849__widgets_reorder_child_on_drop_end, self, 0);
	_tmp71_ = self->priv->reorder;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp68_, (gpointer) ((guintptr) _tmp70_), (GObject*) _tmp71_);
	_tmp72_ = self->priv->signal_map;
	_tmp73_ = self->priv->_label;
	_tmp74_ = g_signal_connect_data ((ObjectsBaseObject*) _tmp73_, "loading-change", (GCallback) __layouts_label_row___lambda850__objects_base_object_loading_change, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
	_tmp75_ = self->priv->_label;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp72_, (gpointer) ((guintptr) _tmp74_), (GObject*) _tmp75_);
	_tmp76_ = self->priv->signal_map;
	_tmp77_ = _data42_->loading_button;
	_tmp78_ = g_signal_connect_object ((GtkButton*) _tmp77_, "clicked", (GCallback) __layouts_label_row___lambda851__gtk_button_clicked, self, 0);
	_tmp79_ = _data42_->loading_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp76_, (gpointer) ((guintptr) _tmp78_), (GObject*) _tmp79_);
	_tmp80_ = self->priv->signal_map;
	_tmp81_ = self->priv->main_revealer;
	_tmp82_ = g_signal_connect_object ((GObject*) _tmp81_, "notify::child-revealed", (GCallback) __layouts_label_row___lambda852__g_object_notify, self, 0);
	_tmp83_ = self->priv->main_revealer;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp80_, (gpointer) ((guintptr) _tmp82_), (GObject*) _tmp83_);
	_g_object_unref0 (buttons_box);
	_g_object_unref0 (menu_button);
	block42_data_unref (_data42_);
	_data42_ = NULL;
	return obj;
}

static void
layouts_label_row_class_init (LayoutsLabelRowClass * klass,
                              gpointer klass_data)
{
	layouts_label_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LayoutsLabelRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_layouts_label_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_layouts_label_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = layouts_label_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = layouts_label_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_LABEL_ROW_LABEL_PROPERTY, layouts_label_row_properties[LAYOUTS_LABEL_ROW_LABEL_PROPERTY] = g_param_spec_object ("label", "label", "label", OBJECTS_TYPE_LABEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
layouts_label_row_instance_init (LayoutsLabelRow * self,
                                 gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = layouts_label_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
}

static void
layouts_label_row_finalize (GObject * obj)
{
	LayoutsLabelRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow);
	g_debug ("LabelRow.vala:42: Destroying - Layouts.LabelRow\n");
	_g_object_unref0 (self->priv->_label);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->count_label);
	_g_object_unref0 (self->priv->count_revealer);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->widget_color);
	_g_object_unref0 (self->priv->handle_grid);
	_g_object_unref0 (self->priv->reorder);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (layouts_label_row_parent_class)->finalize (obj);
}

static GType
layouts_label_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsLabelRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_label_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LayoutsLabelRow), 0, (GInstanceInitFunc) layouts_label_row_instance_init, NULL };
	GType layouts_label_row_type_id;
	layouts_label_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "LayoutsLabelRow", &g_define_type_info, 0);
	LayoutsLabelRow_private_offset = g_type_add_instance_private (layouts_label_row_type_id, sizeof (LayoutsLabelRowPrivate));
	return layouts_label_row_type_id;
}

GType
layouts_label_row_get_type (void)
{
	static volatile gsize layouts_label_row_type_id__once = 0;
	if (g_once_init_enter (&layouts_label_row_type_id__once)) {
		GType layouts_label_row_type_id;
		layouts_label_row_type_id = layouts_label_row_get_type_once ();
		g_once_init_leave (&layouts_label_row_type_id__once, layouts_label_row_type_id);
	}
	return layouts_label_row_type_id__once;
}

static void
_vala_layouts_label_row_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	LayoutsLabelRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow);
	switch (property_id) {
		case LAYOUTS_LABEL_ROW_LABEL_PROPERTY:
		g_value_set_object (value, layouts_label_row_get_label (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_layouts_label_row_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	LayoutsLabelRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_LABEL_ROW, LayoutsLabelRow);
	switch (property_id) {
		case LAYOUTS_LABEL_ROW_LABEL_PROPERTY:
		layouts_label_row_set_label (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

