/* SectionItemRow.c generated by valac 0.56.19, the Vala compiler
 * generated from SectionItemRow.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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <float.h>
#include <math.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 WIDGETS_TYPE_SECTION_ITEM_ROW (widgets_section_item_row_get_type ())
#define WIDGETS_SECTION_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRow))
#define WIDGETS_SECTION_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRowClass))
#define WIDGETS_IS_SECTION_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SECTION_ITEM_ROW))
#define WIDGETS_IS_SECTION_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SECTION_ITEM_ROW))
#define WIDGETS_SECTION_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRowClass))

typedef struct _WidgetsSectionItemRow WidgetsSectionItemRow;
typedef struct _WidgetsSectionItemRowClass WidgetsSectionItemRowClass;
typedef struct _WidgetsSectionItemRowPrivate WidgetsSectionItemRowPrivate;

#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  {
	WIDGETS_SECTION_ITEM_ROW_0_PROPERTY,
	WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY,
	WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY,
	WIDGETS_SECTION_ITEM_ROW_IS_INBOX_SECTION_PROPERTY,
	WIDGETS_SECTION_ITEM_ROW_NUM_PROPERTIES
};
static GParamSpec* widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_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))
typedef struct _Block59Data Block59Data;

#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 _Block60Data Block60Data;
enum  {
	WIDGETS_SECTION_ITEM_ROW_UPDATE_SECTION_SIGNAL,
	WIDGETS_SECTION_ITEM_ROW_NUM_SIGNALS
};
static guint widgets_section_item_row_signals[WIDGETS_SECTION_ITEM_ROW_NUM_SIGNALS] = {0};

struct _WidgetsSectionItemRow {
	GtkListBoxRow parent_instance;
	WidgetsSectionItemRowPrivate * priv;
};

struct _WidgetsSectionItemRowClass {
	GtkListBoxRowClass parent_class;
};

struct _WidgetsSectionItemRowPrivate {
	ObjectsSection* _section;
	gchar* _widget_type;
	GtkLabel* name_label;
	GtkGrid* handle_grid;
	WidgetsReorderChild* reorder_child;
	GtkRevealer* main_revealer;
	GeeHashMap* signal_map;
};

struct _Block59Data {
	int _ref_count_;
	WidgetsSectionItemRow* self;
	GtkPopover* menu_popover;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block60Data {
	int _ref_count_;
	WidgetsSectionItemRow* self;
	GtkRevealer* selected_revealer;
};

static gint WidgetsSectionItemRow_private_offset;
static gpointer widgets_section_item_row_parent_class = NULL;

VALA_EXTERN GType widgets_section_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsSectionItemRow, 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 WidgetsSectionItemRow* widgets_section_item_row_new (ObjectsSection* section,
                                                     const gchar* widget_type);
VALA_EXTERN WidgetsSectionItemRow* widgets_section_item_row_construct (GType object_type,
                                                           ObjectsSection* section,
                                                           const gchar* widget_type);
VALA_EXTERN void widgets_section_item_row_hide_destroy (WidgetsSectionItemRow* self);
static gboolean __lambda582_ (WidgetsSectionItemRow* self);
static gboolean ___lambda582__gsource_func (gpointer self);
static GtkPopover* widgets_section_item_row_build_context_menu (WidgetsSectionItemRow* self);
static Block59Data* block59_data_ref (Block59Data* _data59_);
static void block59_data_unref (void * _userdata_);
static void __lambda583_ (Block59Data* _data59_);
VALA_EXTERN ObjectsSection* widgets_section_item_row_get_section (WidgetsSectionItemRow* self);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN Planify* planify_get_instance (void);
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static void ___lambda583__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda584_ (Block59Data* _data59_);
static void ___lambda584__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN void widgets_section_item_row_clean_up (WidgetsSectionItemRow* self);
VALA_EXTERN void widgets_reorder_child_clean_up (WidgetsReorderChild* self);
static void widgets_section_item_row_set_section (WidgetsSectionItemRow* self,
                                           ObjectsSection* value);
VALA_EXTERN const gchar* widgets_section_item_row_get_widget_type (WidgetsSectionItemRow* self);
static void widgets_section_item_row_set_widget_type (WidgetsSectionItemRow* self,
                                               const gchar* value);
VALA_EXTERN gboolean widgets_section_item_row_get_is_inbox_section (WidgetsSectionItemRow* self);
static GObject * widgets_section_item_row_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties);
static Block60Data* block60_data_ref (Block60Data* _data60_);
static void block60_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);
static gboolean _widgets_section_item_row___lambda585_ (WidgetsSectionItemRow* self);
static gboolean __widgets_section_item_row___lambda585__gsource_func (gpointer self);
static void _widgets_section_item_row____lambda586_ (WidgetsSectionItemRow* self);
static void __widgets_section_item_row____lambda586__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                         gint n_press,
                                                                         gdouble x,
                                                                         gdouble y,
                                                                         gpointer self);
static void _widgets_section_item_row____lambda587_ (Block60Data* _data60_,
                                              ServicesEventBus* type,
                                              const gchar* id);
static void __widgets_section_item_row____lambda587__services_event_bus_section_picker_changed (ServicesEventBus* _sender,
                                                                                         const gchar* id,
                                                                                         gpointer self);
VALA_EXTERN void widgets_reorder_child_build_drag_and_drop (WidgetsReorderChild* self);
static void _widgets_section_item_row____lambda588_ (WidgetsSectionItemRow* self);
static void __widgets_section_item_row____lambda588__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                                 GtkListBox* listbox,
                                                                                 gpointer self);
static void _widgets_section_item_row____lambda589_ (WidgetsSectionItemRow* self);
VALA_EXTERN void widgets_reorder_child_draw_motion_widgets (WidgetsReorderChild* self);
static void __widgets_section_item_row____lambda589__g_object_notify (GObject* _sender,
                                                               GParamSpec* pspec,
                                                               gpointer self);
static void _widgets_section_item_row____lambda590_ (WidgetsSectionItemRow* self);
static void __widgets_section_item_row____lambda590__objects_base_object_unarchived (ObjectsBaseObject* _sender,
                                                                              gpointer self);
static void _widgets_section_item_row___lambda591_ (WidgetsSectionItemRow* self);
static void __widgets_section_item_row___lambda591__objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                                          gpointer self);
static void _widgets_section_item_row___lambda592_ (WidgetsSectionItemRow* self);
static void __widgets_section_item_row___lambda592__gtk_widget_destroy (GtkWidget* _sender,
                                                                 gpointer self);
static void widgets_section_item_row_finalize (GObject * obj);
static GType widgets_section_item_row_get_type_once (void);
static void _vala_widgets_section_item_row_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_widgets_section_item_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
widgets_section_item_row_get_instance_private (WidgetsSectionItemRow* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsSectionItemRow_private_offset);
}

WidgetsSectionItemRow*
widgets_section_item_row_construct (GType object_type,
                                    ObjectsSection* section,
                                    const gchar* widget_type)
{
	WidgetsSectionItemRow * self = NULL;
	g_return_val_if_fail (section != NULL, NULL);
	g_return_val_if_fail (widget_type != NULL, NULL);
	self = (WidgetsSectionItemRow*) g_object_new (object_type, "section", section, "widget-type", widget_type, NULL);
	return self;
}

WidgetsSectionItemRow*
widgets_section_item_row_new (ObjectsSection* section,
                              const gchar* widget_type)
{
	return widgets_section_item_row_construct (WIDGETS_TYPE_SECTION_ITEM_ROW, section, widget_type);
}

static gboolean
__lambda582_ (WidgetsSectionItemRow* 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
___lambda582__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda582_ ((WidgetsSectionItemRow*) self);
	return result;
}

void
widgets_section_item_row_hide_destroy (WidgetsSectionItemRow* 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);
	_tmp1_ = self->priv->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda582__gsource_func, g_object_ref (self), g_object_unref);
}

static Block59Data*
block59_data_ref (Block59Data* _data59_)
{
	g_atomic_int_inc (&_data59_->_ref_count_);
	return _data59_;
}

static void
block59_data_unref (void * _userdata_)
{
	Block59Data* _data59_;
	_data59_ = (Block59Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data59_->_ref_count_)) {
		WidgetsSectionItemRow* self;
		self = _data59_->self;
		_g_object_unref0 (_data59_->menu_popover);
		_g_object_unref0 (self);
		g_slice_free (Block59Data, _data59_);
	}
}

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

static void
__lambda583_ (Block59Data* _data59_)
{
	WidgetsSectionItemRow* self;
	ObjectsSection* _tmp0_;
	Planify* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	self = _data59_->self;
	gtk_popover_popdown (_data59_->menu_popover);
	_tmp0_ = self->priv->_section;
	_tmp1_ = planify_get_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->main_window;
	objects_section_delete_section (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow));
}

static void
___lambda583__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda583_ (self);
}

static void
__lambda584_ (Block59Data* _data59_)
{
	WidgetsSectionItemRow* self;
	ObjectsSection* _tmp0_;
	self = _data59_->self;
	gtk_popover_popdown (_data59_->menu_popover);
	_tmp0_ = self->priv->_section;
	objects_section_unarchive_section (_tmp0_);
}

static void
___lambda584__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda584_ (self);
}

static GtkPopover*
widgets_section_item_row_build_context_menu (WidgetsSectionItemRow* self)
{
	Block59Data* _data59_;
	WidgetsContextMenuMenuItem* unarchive_item = NULL;
	WidgetsContextMenuMenuItem* _tmp0_;
	WidgetsContextMenuMenuItem* delete_item = NULL;
	WidgetsContextMenuMenuItem* _tmp1_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp2_;
	GtkWidget* _tmp3_;
	GtkPopover* _tmp4_ = NULL;
	GeeHashMap* _tmp5_;
	gulong _tmp6_;
	GeeHashMap* _tmp7_;
	gulong _tmp8_;
	GtkPopover* _tmp9_;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data59_ = g_slice_new0 (Block59Data);
	_data59_->_ref_count_ = 1;
	_data59_->self = g_object_ref (self);
	_tmp0_ = widgets_context_menu_menu_item_new (_ ("Unarchive"), "shoe-box-symbolic");
	g_object_ref_sink (_tmp0_);
	unarchive_item = _tmp0_;
	_tmp1_ = widgets_context_menu_menu_item_new (_ ("Delete Section"), "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*) unarchive_item);
	gtk_box_append (menu_box, (GtkWidget*) delete_item);
	_tmp3_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp4_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp4_, FALSE);
	gtk_popover_set_child (_tmp4_, _tmp3_);
	_g_object_unref0 (_tmp3_);
	gtk_popover_set_position (_tmp4_, GTK_POS_BOTTOM);
	g_object_set ((GtkWidget*) _tmp4_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp4_);
	_data59_->menu_popover = _tmp4_;
	_tmp5_ = self->priv->signal_map;
	_tmp6_ = g_signal_connect_data ((GtkButton*) delete_item, "clicked", (GCallback) ___lambda583__gtk_button_clicked, block59_data_ref (_data59_), (GClosureNotify) block59_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) _tmp6_), (GObject*) delete_item);
	_tmp7_ = self->priv->signal_map;
	_tmp8_ = g_signal_connect_data ((GtkButton*) unarchive_item, "clicked", (GCallback) ___lambda584__gtk_button_clicked, block59_data_ref (_data59_), (GClosureNotify) block59_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) _tmp8_), (GObject*) unarchive_item);
	_tmp9_ = _g_object_ref0 (_data59_->menu_popover);
	result = _tmp9_;
	_g_object_unref0 (menu_box);
	_g_object_unref0 (delete_item);
	_g_object_unref0 (unarchive_item);
	block59_data_unref (_data59_);
	_data59_ = NULL;
	return result;
}

void
widgets_section_item_row_clean_up (WidgetsSectionItemRow* 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_child;
	if (_tmp16_ != NULL) {
		WidgetsReorderChild* _tmp17_;
		_tmp17_ = self->priv->reorder_child;
		widgets_reorder_child_clean_up (_tmp17_);
		_g_object_unref0 (self->priv->reorder_child);
		self->priv->reorder_child = NULL;
	}
}

ObjectsSection*
widgets_section_item_row_get_section (WidgetsSectionItemRow* self)
{
	ObjectsSection* result;
	ObjectsSection* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_section;
	result = _tmp0_;
	return result;
}

static void
widgets_section_item_row_set_section (WidgetsSectionItemRow* self,
                                      ObjectsSection* value)
{
	ObjectsSection* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_section_item_row_get_section (self);
	if (old_value != value) {
		ObjectsSection* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_section);
		self->priv->_section = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY]);
	}
}

const gchar*
widgets_section_item_row_get_widget_type (WidgetsSectionItemRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_widget_type;
	result = _tmp0_;
	return result;
}

static void
widgets_section_item_row_set_widget_type (WidgetsSectionItemRow* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = widgets_section_item_row_get_widget_type (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_widget_type);
		self->priv->_widget_type = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY]);
	}
}

gboolean
widgets_section_item_row_get_is_inbox_section (WidgetsSectionItemRow* self)
{
	gboolean result;
	ObjectsSection* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_section;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = g_strcmp0 (_tmp2_, "") == 0;
	return result;
}

static Block60Data*
block60_data_ref (Block60Data* _data60_)
{
	g_atomic_int_inc (&_data60_->_ref_count_);
	return _data60_;
}

static void
block60_data_unref (void * _userdata_)
{
	Block60Data* _data60_;
	_data60_ = (Block60Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data60_->_ref_count_)) {
		WidgetsSectionItemRow* self;
		self = _data60_->self;
		_g_object_unref0 (_data60_->selected_revealer);
		_g_object_unref0 (self);
		g_slice_free (Block60Data, _data60_);
	}
}

static gboolean
_widgets_section_item_row___lambda585_ (WidgetsSectionItemRow* 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
__widgets_section_item_row___lambda585__gsource_func (gpointer self)
{
	gboolean result;
	result = _widgets_section_item_row___lambda585_ ((WidgetsSectionItemRow*) self);
	return result;
}

static void
_widgets_section_item_row____lambda586_ (WidgetsSectionItemRow* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsSection* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_section;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	g_signal_emit_by_name (_tmp1_, "section-picker-changed", _tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
__widgets_section_item_row____lambda586__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                    gint n_press,
                                                                    gdouble x,
                                                                    gdouble y,
                                                                    gpointer self)
{
	_widgets_section_item_row____lambda586_ ((WidgetsSectionItemRow*) self);
}

static void
_widgets_section_item_row____lambda587_ (Block60Data* _data60_,
                                         ServicesEventBus* type,
                                         const gchar* id)
{
	WidgetsSectionItemRow* self;
	GtkRevealer* _tmp0_;
	ObjectsSection* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	self = _data60_->self;
	g_return_if_fail (type != NULL);
	g_return_if_fail (id != NULL);
	_tmp0_ = _data60_->selected_revealer;
	_tmp1_ = self->priv->_section;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	gtk_revealer_set_reveal_child (_tmp0_, g_strcmp0 (_tmp3_, id) == 0);
}

static void
__widgets_section_item_row____lambda587__services_event_bus_section_picker_changed (ServicesEventBus* _sender,
                                                                                    const gchar* id,
                                                                                    gpointer self)
{
	_widgets_section_item_row____lambda587_ (self, _sender, id);
}

static void
_widgets_section_item_row____lambda588_ (WidgetsSectionItemRow* self)
{
	g_signal_emit (self, widgets_section_item_row_signals[WIDGETS_SECTION_ITEM_ROW_UPDATE_SECTION_SIGNAL], 0);
}

static void
__widgets_section_item_row____lambda588__widgets_reorder_child_on_drop_end (WidgetsReorderChild* _sender,
                                                                            GtkListBox* listbox,
                                                                            gpointer self)
{
	_widgets_section_item_row____lambda588_ ((WidgetsSectionItemRow*) self);
}

static void
_widgets_section_item_row____lambda589_ (WidgetsSectionItemRow* self)
{
	WidgetsReorderChild* _tmp0_;
	_tmp0_ = self->priv->reorder_child;
	widgets_reorder_child_draw_motion_widgets (_tmp0_);
}

static void
__widgets_section_item_row____lambda589__g_object_notify (GObject* _sender,
                                                          GParamSpec* pspec,
                                                          gpointer self)
{
	_widgets_section_item_row____lambda589_ ((WidgetsSectionItemRow*) self);
}

static void
_widgets_section_item_row____lambda590_ (WidgetsSectionItemRow* self)
{
	widgets_section_item_row_hide_destroy (self);
}

static void
__widgets_section_item_row____lambda590__objects_base_object_unarchived (ObjectsBaseObject* _sender,
                                                                         gpointer self)
{
	_widgets_section_item_row____lambda590_ ((WidgetsSectionItemRow*) self);
}

static void
_widgets_section_item_row___lambda591_ (WidgetsSectionItemRow* self)
{
	widgets_section_item_row_hide_destroy (self);
}

static void
__widgets_section_item_row___lambda591__objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                                     gpointer self)
{
	_widgets_section_item_row___lambda591_ ((WidgetsSectionItemRow*) self);
}

static void
_widgets_section_item_row___lambda592_ (WidgetsSectionItemRow* self)
{
	widgets_section_item_row_clean_up (self);
}

static void
__widgets_section_item_row___lambda592__gtk_widget_destroy (GtkWidget* _sender,
                                                            gpointer self)
{
	_widgets_section_item_row___lambda592_ ((WidgetsSectionItemRow*) self);
}

static GObject *
widgets_section_item_row_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsSectionItemRow * self;
	Block60Data* _data60_;
	ObjectsSection* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkImage* selected_icon = NULL;
	GtkImage* _tmp4_ = NULL;
	GtkImage* _tmp5_;
	GtkImage* _tmp6_;
	GtkWidget* _tmp7_;
	GtkRevealer* _tmp8_ = NULL;
	GtkImage* order_icon = NULL;
	gchar* _tmp9_;
	gchar** _tmp10_;
	GtkImage* _tmp11_ = NULL;
	GtkMenuButton* menu_button = NULL;
	GtkPopover* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	GtkMenuButton* _tmp16_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp17_ = NULL;
	const gchar* _tmp18_;
	const gchar* _tmp25_;
	const gchar* _tmp30_;
	GtkGrid* _tmp38_;
	GtkGrid* _tmp39_;
	GtkBox* _tmp40_;
	GtkGrid* _tmp41_;
	WidgetsReorderChild* _tmp42_;
	WidgetsReorderChild* _tmp43_;
	GtkWidget* _tmp44_;
	GtkRevealer* _tmp45_ = NULL;
	GtkRevealer* _tmp46_;
	GtkRevealer* _tmp47_;
	guint _tmp48_;
	guint _tmp49_;
	const gchar* _tmp50_;
	const gchar* _tmp64_;
	const gchar* _tmp73_;
	ObjectsSection* _tmp78_;
	parent_class = G_OBJECT_CLASS (widgets_section_item_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRow);
	_data60_ = g_slice_new0 (Block60Data);
	_data60_->_ref_count_ = 1;
	_data60_->self = g_object_ref (self);
	gtk_widget_add_css_class ((GtkWidget*) self, "no-selectable");
	gtk_widget_add_css_class ((GtkWidget*) self, "transition");
	_tmp0_ = self->priv->_section;
	_tmp1_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	gtk_label_set_ellipsize (_tmp3_, PANGO_ELLIPSIZE_END);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp3_;
	_tmp4_ = (GtkImage*) gtk_image_new_from_icon_name ("checkmark-small-symbolic");
	gtk_image_set_pixel_size (_tmp4_, 16);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_END);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp4_, 3);
	g_object_ref_sink (_tmp4_);
	selected_icon = _tmp4_;
	_tmp5_ = selected_icon;
	gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "color-primary");
	_tmp6_ = selected_icon;
	_tmp7_ = _g_object_ref0 ((GtkWidget*) _tmp6_);
	_tmp8_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp8_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	gtk_revealer_set_child (_tmp8_, _tmp7_);
	_g_object_unref0 (_tmp7_);
	g_object_ref_sink (_tmp8_);
	_data60_->selected_revealer = _tmp8_;
	_tmp9_ = g_strdup ("dimmed");
	_tmp10_ = g_new0 (gchar*, 1 + 1);
	_tmp10_[0] = _tmp9_;
	_tmp11_ = (GtkImage*) gtk_image_new_from_icon_name ("list-drag-handle-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp10_);
	_tmp10_ = (_vala_array_free (_tmp10_, 1, (GDestroyNotify) g_free), NULL);
	gtk_image_set_pixel_size (_tmp11_, 12);
	g_object_ref_sink (_tmp11_);
	order_icon = _tmp11_;
	_tmp12_ = widgets_section_item_row_build_context_menu (self);
	_tmp13_ = g_strdup ("view-more-symbolic");
	_tmp14_ = g_strdup ("flat");
	_tmp15_ = g_new0 (gchar*, 1 + 1);
	_tmp15_[0] = _tmp14_;
	_tmp16_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp16_, GTK_ALIGN_END);
	gtk_menu_button_set_popover (_tmp16_, _tmp12_);
	_g_object_unref0 (_tmp12_);
	gtk_menu_button_set_icon_name (_tmp16_, _tmp13_);
	_g_free0 (_tmp13_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp16_, _tmp15_);
	_tmp15_ = (_vala_array_free (_tmp15_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp16_);
	menu_button = _tmp16_;
	_tmp17_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, 9);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp17_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp17_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp17_, 9);
	g_object_ref_sink (_tmp17_);
	content_box = _tmp17_;
	_tmp18_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp18_, "order") == 0) {
		gboolean _tmp19_;
		gboolean _tmp20_;
		GtkBox* _tmp23_;
		GtkLabel* _tmp24_;
		_tmp19_ = widgets_section_item_row_get_is_inbox_section (self);
		_tmp20_ = _tmp19_;
		if (!_tmp20_) {
			GtkBox* _tmp21_;
			GtkImage* _tmp22_;
			_tmp21_ = content_box;
			_tmp22_ = order_icon;
			gtk_box_append (_tmp21_, (GtkWidget*) _tmp22_);
		}
		_tmp23_ = content_box;
		_tmp24_ = self->priv->name_label;
		gtk_box_append (_tmp23_, (GtkWidget*) _tmp24_);
	}
	_tmp25_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp25_, "picker") == 0) {
		GtkBox* _tmp26_;
		GtkLabel* _tmp27_;
		GtkBox* _tmp28_;
		GtkRevealer* _tmp29_;
		_tmp26_ = content_box;
		_tmp27_ = self->priv->name_label;
		gtk_box_append (_tmp26_, (GtkWidget*) _tmp27_);
		_tmp28_ = content_box;
		_tmp29_ = _data60_->selected_revealer;
		gtk_box_append (_tmp28_, (GtkWidget*) _tmp29_);
	}
	_tmp30_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp30_, "menu") == 0) {
		GtkBox* _tmp31_;
		GtkBox* _tmp32_;
		GtkBox* _tmp33_;
		GtkBox* _tmp34_;
		GtkLabel* _tmp35_;
		GtkBox* _tmp36_;
		GtkMenuButton* _tmp37_;
		_tmp31_ = content_box;
		gtk_widget_set_margin_top ((GtkWidget*) _tmp31_, 3);
		_tmp32_ = content_box;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp32_, 3);
		_tmp33_ = content_box;
		gtk_widget_set_margin_end ((GtkWidget*) _tmp33_, 3);
		_tmp34_ = content_box;
		_tmp35_ = self->priv->name_label;
		gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
		_tmp36_ = content_box;
		_tmp37_ = menu_button;
		gtk_box_append (_tmp36_, (GtkWidget*) _tmp37_);
	}
	_tmp38_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp38_);
	_g_object_unref0 (self->priv->handle_grid);
	self->priv->handle_grid = _tmp38_;
	_tmp39_ = self->priv->handle_grid;
	_tmp40_ = content_box;
	gtk_grid_attach (_tmp39_, (GtkWidget*) _tmp40_, 0, 0, 1, 1);
	_tmp41_ = self->priv->handle_grid;
	_tmp42_ = widgets_reorder_child_new ((GtkWidget*) _tmp41_, (GtkListBoxRow*) self);
	g_object_ref_sink (_tmp42_);
	_g_object_unref0 (self->priv->reorder_child);
	self->priv->reorder_child = _tmp42_;
	_tmp43_ = self->priv->reorder_child;
	_tmp44_ = _g_object_ref0 ((GtkWidget*) _tmp43_);
	_tmp45_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp45_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp45_, _tmp44_);
	_g_object_unref0 (_tmp44_);
	g_object_ref_sink (_tmp45_);
	_g_object_unref0 (self->priv->main_revealer);
	self->priv->main_revealer = _tmp45_;
	_tmp46_ = self->priv->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp46_);
	_tmp47_ = self->priv->main_revealer;
	_tmp48_ = gtk_revealer_get_transition_duration (_tmp47_);
	_tmp49_ = _tmp48_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp49_, __widgets_section_item_row___lambda585__gsource_func, g_object_ref (self), g_object_unref);
	_tmp50_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp50_, "picker") == 0) {
		GtkGestureClick* select_gesture = NULL;
		GtkGestureClick* _tmp51_;
		GtkGestureClick* _tmp52_;
		GtkEventController* _tmp53_;
		GeeHashMap* _tmp54_;
		GtkGestureClick* _tmp55_;
		gulong _tmp56_;
		GtkGestureClick* _tmp57_;
		GeeHashMap* _tmp58_;
		ServicesEventBus* _tmp59_;
		ServicesEventBus* _tmp60_;
		gulong _tmp61_;
		ServicesEventBus* _tmp62_;
		ServicesEventBus* _tmp63_;
		_tmp51_ = (GtkGestureClick*) gtk_gesture_click_new ();
		select_gesture = _tmp51_;
		_tmp52_ = select_gesture;
		_tmp53_ = _g_object_ref0 ((GtkEventController*) _tmp52_);
		gtk_widget_add_controller ((GtkWidget*) self, _tmp53_);
		_tmp54_ = self->priv->signal_map;
		_tmp55_ = select_gesture;
		_tmp56_ = g_signal_connect_object (_tmp55_, "pressed", (GCallback) __widgets_section_item_row____lambda586__gtk_gesture_click_pressed, self, 0);
		_tmp57_ = select_gesture;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp54_, (gpointer) ((guintptr) _tmp56_), (GObject*) _tmp57_);
		_tmp58_ = self->priv->signal_map;
		_tmp59_ = services_event_bus_get_default ();
		_tmp60_ = _tmp59_;
		_tmp61_ = g_signal_connect_data (_tmp60_, "section-picker-changed", (GCallback) __widgets_section_item_row____lambda587__services_event_bus_section_picker_changed, block60_data_ref (_data60_), (GClosureNotify) block60_data_unref, 0);
		_tmp62_ = services_event_bus_get_default ();
		_tmp63_ = _tmp62_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp58_, (gpointer) ((guintptr) _tmp61_), (GObject*) _tmp63_);
		_g_object_unref0 (_tmp63_);
		_g_object_unref0 (_tmp60_);
		_g_object_unref0 (select_gesture);
	}
	_tmp64_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp64_, "order") == 0) {
		gboolean _tmp65_;
		gboolean _tmp66_;
		GeeHashMap* _tmp68_;
		WidgetsReorderChild* _tmp69_;
		gulong _tmp70_;
		WidgetsReorderChild* _tmp71_;
		GtkRevealer* _tmp72_;
		_tmp65_ = widgets_section_item_row_get_is_inbox_section (self);
		_tmp66_ = _tmp65_;
		if (!_tmp66_) {
			WidgetsReorderChild* _tmp67_;
			_tmp67_ = self->priv->reorder_child;
			widgets_reorder_child_build_drag_and_drop (_tmp67_);
		}
		_tmp68_ = self->priv->signal_map;
		_tmp69_ = self->priv->reorder_child;
		_tmp70_ = g_signal_connect_object (_tmp69_, "on-drop-end", (GCallback) __widgets_section_item_row____lambda588__widgets_reorder_child_on_drop_end, self, 0);
		_tmp71_ = self->priv->reorder_child;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp68_, (gpointer) ((guintptr) _tmp70_), (GObject*) _tmp71_);
		_tmp72_ = self->priv->main_revealer;
		g_signal_connect_object ((GObject*) _tmp72_, "notify::child-revealed", (GCallback) __widgets_section_item_row____lambda589__g_object_notify, self, 0);
	}
	_tmp73_ = self->priv->_widget_type;
	if (g_strcmp0 (_tmp73_, "menu") == 0) {
		GeeHashMap* _tmp74_;
		ObjectsSection* _tmp75_;
		gulong _tmp76_;
		ObjectsSection* _tmp77_;
		_tmp74_ = self->priv->signal_map;
		_tmp75_ = self->priv->_section;
		_tmp76_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp75_, "unarchived", (GCallback) __widgets_section_item_row____lambda590__objects_base_object_unarchived, self, 0);
		_tmp77_ = self->priv->_section;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp74_, (gpointer) ((guintptr) _tmp76_), (GObject*) _tmp77_);
	}
	_tmp78_ = self->priv->_section;
	g_signal_connect_object ((ObjectsBaseObject*) _tmp78_, "deleted", (GCallback) __widgets_section_item_row___lambda591__objects_base_object_deleted, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __widgets_section_item_row___lambda592__gtk_widget_destroy, self, 0);
	_g_object_unref0 (content_box);
	_g_object_unref0 (menu_button);
	_g_object_unref0 (order_icon);
	_g_object_unref0 (selected_icon);
	block60_data_unref (_data60_);
	_data60_ = NULL;
	return obj;
}

static void
widgets_section_item_row_class_init (WidgetsSectionItemRowClass * klass,
                                     gpointer klass_data)
{
	widgets_section_item_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsSectionItemRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_section_item_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_section_item_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_section_item_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_section_item_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY, widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY] = g_param_spec_object ("section", "section", "section", OBJECTS_TYPE_SECTION, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY, widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY] = g_param_spec_string ("widget-type", "widget-type", "widget-type", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_SECTION_ITEM_ROW_IS_INBOX_SECTION_PROPERTY, widgets_section_item_row_properties[WIDGETS_SECTION_ITEM_ROW_IS_INBOX_SECTION_PROPERTY] = g_param_spec_boolean ("is-inbox-section", "is-inbox-section", "is-inbox-section", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	widgets_section_item_row_signals[WIDGETS_SECTION_ITEM_ROW_UPDATE_SECTION_SIGNAL] = g_signal_new ("update-section", WIDGETS_TYPE_SECTION_ITEM_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
widgets_section_item_row_instance_init (WidgetsSectionItemRow * self,
                                        gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = widgets_section_item_row_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp0_;
}

static void
widgets_section_item_row_finalize (GObject * obj)
{
	WidgetsSectionItemRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRow);
	g_debug ("SectionItemRow.vala:49: Destroying - Widgets.SectionItemRow\n");
	_g_object_unref0 (self->priv->_section);
	_g_free0 (self->priv->_widget_type);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->handle_grid);
	_g_object_unref0 (self->priv->reorder_child);
	_g_object_unref0 (self->priv->main_revealer);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (widgets_section_item_row_parent_class)->finalize (obj);
}

static GType
widgets_section_item_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsSectionItemRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_section_item_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsSectionItemRow), 0, (GInstanceInitFunc) widgets_section_item_row_instance_init, NULL };
	GType widgets_section_item_row_type_id;
	widgets_section_item_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "WidgetsSectionItemRow", &g_define_type_info, 0);
	WidgetsSectionItemRow_private_offset = g_type_add_instance_private (widgets_section_item_row_type_id, sizeof (WidgetsSectionItemRowPrivate));
	return widgets_section_item_row_type_id;
}

GType
widgets_section_item_row_get_type (void)
{
	static volatile gsize widgets_section_item_row_type_id__once = 0;
	if (g_once_init_enter (&widgets_section_item_row_type_id__once)) {
		GType widgets_section_item_row_type_id;
		widgets_section_item_row_type_id = widgets_section_item_row_get_type_once ();
		g_once_init_leave (&widgets_section_item_row_type_id__once, widgets_section_item_row_type_id);
	}
	return widgets_section_item_row_type_id__once;
}

static void
_vala_widgets_section_item_row_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	WidgetsSectionItemRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRow);
	switch (property_id) {
		case WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY:
		g_value_set_object (value, widgets_section_item_row_get_section (self));
		break;
		case WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY:
		g_value_set_string (value, widgets_section_item_row_get_widget_type (self));
		break;
		case WIDGETS_SECTION_ITEM_ROW_IS_INBOX_SECTION_PROPERTY:
		g_value_set_boolean (value, widgets_section_item_row_get_is_inbox_section (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_section_item_row_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	WidgetsSectionItemRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_SECTION_ITEM_ROW, WidgetsSectionItemRow);
	switch (property_id) {
		case WIDGETS_SECTION_ITEM_ROW_SECTION_PROPERTY:
		widgets_section_item_row_set_section (self, g_value_get_object (value));
		break;
		case WIDGETS_SECTION_ITEM_ROW_WIDGET_TYPE_PROPERTY:
		widgets_section_item_row_set_widget_type (self, g_value_get_string (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);
}

