/* Labels.c generated by valac 0.56.19, the Vala compiler
 * generated from Labels.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 <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include "planify.h"
#include <glib/gi18n-lib.h>
#include <gio/gio.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 VIEWS_TYPE_LABELS (views_labels_get_type ())
#define VIEWS_LABELS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEWS_TYPE_LABELS, ViewsLabels))
#define VIEWS_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEWS_TYPE_LABELS, ViewsLabelsClass))
#define VIEWS_IS_LABELS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEWS_TYPE_LABELS))
#define VIEWS_IS_LABELS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEWS_TYPE_LABELS))
#define VIEWS_LABELS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEWS_TYPE_LABELS, ViewsLabelsClass))

typedef struct _ViewsLabels ViewsLabels;
typedef struct _ViewsLabelsClass ViewsLabelsClass;
typedef struct _ViewsLabelsPrivate ViewsLabelsPrivate;

#define VIEWS_TYPE_LABEL_SOURCE_ROW (views_label_source_row_get_type ())
#define VIEWS_LABEL_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEWS_TYPE_LABEL_SOURCE_ROW, ViewsLabelSourceRow))
#define VIEWS_LABEL_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEWS_TYPE_LABEL_SOURCE_ROW, ViewsLabelSourceRowClass))
#define VIEWS_IS_LABEL_SOURCE_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEWS_TYPE_LABEL_SOURCE_ROW))
#define VIEWS_IS_LABEL_SOURCE_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEWS_TYPE_LABEL_SOURCE_ROW))
#define VIEWS_LABEL_SOURCE_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEWS_TYPE_LABEL_SOURCE_ROW, ViewsLabelSourceRowClass))

typedef struct _ViewsLabelSourceRow ViewsLabelSourceRow;
typedef struct _ViewsLabelSourceRowClass ViewsLabelSourceRowClass;

#define LAYOUTS_TYPE_HEADER_BAR (layouts_header_bar_get_type ())
#define LAYOUTS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBar))
#define LAYOUTS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))
#define LAYOUTS_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_HEADER_BAR))
#define LAYOUTS_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_HEADER_BAR, LayoutsHeaderBarClass))

typedef struct _LayoutsHeaderBar LayoutsHeaderBar;
typedef struct _LayoutsHeaderBarClass LayoutsHeaderBarClass;
enum  {
	VIEWS_LABELS_0_PROPERTY,
	VIEWS_LABELS_NUM_PROPERTIES
};
static GParamSpec* views_labels_properties[VIEWS_LABELS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block72Data Block72Data;
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_TYPE_QUICK_ADD (dialogs_quick_add_get_type ())
#define DIALOGS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAdd))
#define DIALOGS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))
#define DIALOGS_IS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_IS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_QUICK_ADD))
#define DIALOGS_QUICK_ADD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_QUICK_ADD, DialogsQuickAddClass))

typedef struct _DialogsQuickAdd DialogsQuickAdd;
typedef struct _DialogsQuickAddClass DialogsQuickAddClass;

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

#define WIDGETS_TYPE_MAGIC_BUTTON (widgets_magic_button_get_type ())
#define WIDGETS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButton))
#define WIDGETS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))
#define WIDGETS_IS_MAGIC_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_IS_MAGIC_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_MAGIC_BUTTON))
#define WIDGETS_MAGIC_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_MAGIC_BUTTON, WidgetsMagicButtonClass))

typedef struct _WidgetsMagicButton WidgetsMagicButton;
typedef struct _WidgetsMagicButtonClass WidgetsMagicButtonClass;

struct _ViewsLabels {
	AdwBin parent_instance;
	ViewsLabelsPrivate * priv;
	GeeHashMap* sources_hashmap;
};

struct _ViewsLabelsClass {
	AdwBinClass parent_class;
};

struct _ViewsLabelsPrivate {
	LayoutsHeaderBar* headerbar;
	GtkListBox* sources_listbox;
	GeeHashMap* signal_map;
};

struct _Block72Data {
	int _ref_count_;
	ViewsLabels* self;
	WidgetsContextMenuMenuSwitch* show_active_only_item;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block73Data {
	int _ref_count_;
	ViewsLabels* self;
	GtkImage* title_icon;
	GtkScrolledWindow* scrolled_window;
};

static gint ViewsLabels_private_offset;
static gpointer views_labels_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType views_labels_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewsLabels, g_object_unref)
VALA_EXTERN GType views_label_source_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ViewsLabelSourceRow, g_object_unref)
VALA_EXTERN GType layouts_header_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsHeaderBar, g_object_unref)
static void views_labels_add_source_row (ViewsLabels* self,
                                  ObjectsSource* source);
VALA_EXTERN ViewsLabelSourceRow* views_label_source_row_new (ObjectsSource* source);
VALA_EXTERN ViewsLabelSourceRow* views_label_source_row_construct (GType object_type,
                                                       ObjectsSource* source);
static GtkPopover* views_labels_build_view_setting_popover (ViewsLabels* self);
static Block72Data* block72_data_ref (Block72Data* _data72_);
static void block72_data_unref (void * _userdata_);
static void __lambda865_ (Block72Data* _data72_);
static void ___lambda865__widgets_context_menu_menu_switch_activate_item (WidgetsContextMenuMenuSwitch* _sender,
                                                                   gpointer self);
VALA_EXTERN void views_labels_prepare_new_item (ViewsLabels* self,
                                    const gchar* content);
VALA_EXTERN GType dialogs_quick_add_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsQuickAdd, g_object_unref)
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_new (void);
VALA_EXTERN DialogsQuickAdd* dialogs_quick_add_construct (GType object_type);
VALA_EXTERN void dialogs_quick_add_update_content (DialogsQuickAdd* self,
                                       const gchar* content);
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)
VALA_EXTERN void views_labels_clean_up (ViewsLabels* self);
VALA_EXTERN void views_label_source_row_clean_up (ViewsLabelSourceRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN void layouts_header_bar_clean_up (LayoutsHeaderBar* self);
VALA_EXTERN ViewsLabels* views_labels_new (void);
VALA_EXTERN ViewsLabels* views_labels_construct (GType object_type);
static GObject * views_labels_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties);
static Block73Data* block73_data_ref (Block73Data* _data73_);
static void block73_data_unref (void * _userdata_);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_new (void);
VALA_EXTERN LayoutsHeaderBar* layouts_header_bar_construct (GType object_type);
VALA_EXTERN void layouts_header_bar_set_title (LayoutsHeaderBar* self,
                                   const gchar* value);
VALA_EXTERN void layouts_header_bar_pack_end (LayoutsHeaderBar* self,
                                  GtkWidget* widget);
static void _views_labels___lambda866_ (Block73Data* _data73_);
static void __views_labels___lambda866__services_event_bus_theme_changed (ServicesEventBus* _sender,
                                                                   gpointer self);
VALA_EXTERN GType widgets_magic_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsMagicButton, g_object_unref)
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_new (void);
VALA_EXTERN WidgetsMagicButton* widgets_magic_button_construct (GType object_type);
static void _views_labels___lambda867_ (ViewsLabels* self,
                                 ObjectsSource* source);
VALA_EXTERN void views_label_source_row_hide_destroy (ViewsLabelSourceRow* self);
static void __views_labels___lambda867__services_store_source_deleted (ServicesStore* _sender,
                                                                ObjectsSource* source,
                                                                gpointer self);
static void _views_labels_add_source_row_services_store_source_added (ServicesStore* _sender,
                                                               ObjectsSource* source,
                                                               gpointer self);
static void _views_labels___lambda868_ (Block73Data* _data73_);
VALA_EXTERN void layouts_header_bar_revealer_title_box (LayoutsHeaderBar* self,
                                            gboolean reveal);
static void __views_labels___lambda868__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                               gpointer self);
static void _views_labels___lambda869_ (ViewsLabels* self);
static void __views_labels___lambda869__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                               gpointer self);
static void views_labels_finalize (GObject * obj);
static GType views_labels_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
views_labels_get_instance_private (ViewsLabels* self)
{
	return G_STRUCT_MEMBER_P (self, ViewsLabels_private_offset);
}

static void
views_labels_add_source_row (ViewsLabels* self,
                             ObjectsSource* source)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source != NULL);
	_tmp0_ = self->sources_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
	_tmp2_ = _tmp1_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		ViewsLabelSourceRow* _tmp6_;
		ViewsLabelSourceRow* _tmp7_;
		GtkListBox* _tmp8_;
		GeeHashMap* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gpointer _tmp12_;
		ViewsLabelSourceRow* _tmp13_;
		_tmp3_ = self->sources_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp5_ = _tmp4_;
		_tmp6_ = views_label_source_row_new (source);
		g_object_ref_sink (_tmp6_);
		_tmp7_ = _tmp6_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp5_, _tmp7_);
		_g_object_unref0 (_tmp7_);
		_tmp8_ = self->priv->sources_listbox;
		_tmp9_ = self->sources_hashmap;
		_tmp10_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp11_ = _tmp10_;
		_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, _tmp11_);
		_tmp13_ = (ViewsLabelSourceRow*) _tmp12_;
		gtk_list_box_append (_tmp8_, (GtkWidget*) _tmp13_);
		_g_object_unref0 (_tmp13_);
	}
}

static Block72Data*
block72_data_ref (Block72Data* _data72_)
{
	g_atomic_int_inc (&_data72_->_ref_count_);
	return _data72_;
}

static void
block72_data_unref (void * _userdata_)
{
	Block72Data* _data72_;
	_data72_ = (Block72Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data72_->_ref_count_)) {
		ViewsLabels* self;
		self = _data72_->self;
		_g_object_unref0 (_data72_->show_active_only_item);
		_g_object_unref0 (self);
		g_slice_free (Block72Data, _data72_);
	}
}

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

static void
__lambda865_ (Block72Data* _data72_)
{
	ViewsLabels* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	self = _data72_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = widgets_context_menu_menu_switch_get_active (_data72_->show_active_only_item);
	_tmp4_ = _tmp3_;
	g_settings_set_boolean (_tmp2_, "labels-show-active-only", _tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda865__widgets_context_menu_menu_switch_activate_item (WidgetsContextMenuMenuSwitch* _sender,
                                                              gpointer self)
{
	__lambda865_ (self);
}

static GtkPopover*
views_labels_build_view_setting_popover (ViewsLabels* self)
{
	Block72Data* _data72_;
	gchar* _tmp0_;
	WidgetsContextMenuMenuSwitch* _tmp1_ = NULL;
	ServicesSettings* _tmp2_;
	ServicesSettings* _tmp3_;
	GSettings* _tmp4_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp5_ = NULL;
	GtkPopover* popover = NULL;
	GtkWidget* _tmp6_;
	GtkPopover* _tmp7_ = NULL;
	GeeHashMap* _tmp8_;
	gulong _tmp9_;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data72_ = g_slice_new0 (Block72Data);
	_data72_->_ref_count_ = 1;
	_data72_->self = g_object_ref (self);
	_tmp0_ = g_strdup (_ ("Only show labels used by tasks in active (non-archived) projects"));
	_tmp1_ = widgets_context_menu_menu_switch_new (_ ("Only Active Projects"), "funnel-outline-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _tmp0_);
	_g_free0 (_tmp0_);
	g_object_ref_sink (_tmp1_);
	_data72_->show_active_only_item = _tmp1_;
	_tmp2_ = services_settings_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_->settings;
	widgets_context_menu_menu_switch_set_active (_data72_->show_active_only_item, g_settings_get_boolean (_tmp4_, "labels-show-active-only"));
	_g_object_unref0 (_tmp3_);
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp5_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp5_, 3);
	g_object_ref_sink (_tmp5_);
	menu_box = _tmp5_;
	gtk_box_append (menu_box, (GtkWidget*) _data72_->show_active_only_item);
	_tmp6_ = _g_object_ref0 ((GtkWidget*) menu_box);
	_tmp7_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp7_, FALSE);
	gtk_popover_set_position (_tmp7_, GTK_POS_BOTTOM);
	gtk_popover_set_child (_tmp7_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	g_object_set ((GtkWidget*) _tmp7_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp7_);
	popover = _tmp7_;
	_tmp8_ = self->priv->signal_map;
	_tmp9_ = g_signal_connect_data (_data72_->show_active_only_item, "activate-item", (GCallback) ___lambda865__widgets_context_menu_menu_switch_activate_item, block72_data_ref (_data72_), (GClosureNotify) block72_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, (gpointer) ((guintptr) _tmp9_), (GObject*) _data72_->show_active_only_item);
	result = popover;
	_g_object_unref0 (menu_box);
	block72_data_unref (_data72_);
	_data72_ = NULL;
	return result;
}

void
views_labels_prepare_new_item (ViewsLabels* self,
                               const gchar* content)
{
	DialogsQuickAdd* dialog = NULL;
	DialogsQuickAdd* _tmp0_;
	Planify* _tmp1_;
	MainWindow* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = dialogs_quick_add_new ();
	g_object_ref_sink (_tmp0_);
	dialog = _tmp0_;
	dialogs_quick_add_update_content (dialog, content);
	_tmp1_ = planify__instance;
	_tmp2_ = _tmp1_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp2_);
	_g_object_unref0 (dialog);
}

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

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

void
views_labels_clean_up (ViewsLabels* self)
{
	Util* _tmp0_;
	Util* _tmp1_;
	GtkListBox* _tmp2_;
	GList* _tmp3_;
	GList* _tmp4_;
	GeeHashMap* _tmp22_;
	LayoutsHeaderBar* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = util_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->sources_listbox;
	_tmp3_ = util_get_children (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp1_);
	{
		GList* row_collection = NULL;
		GList* row_it = NULL;
		row_collection = _tmp4_;
		for (row_it = row_collection; row_it != NULL; row_it = row_it->next) {
			GtkListBoxRow* _tmp5_;
			GtkListBoxRow* row = NULL;
			_tmp5_ = _g_object_ref0 ((GtkListBoxRow*) row_it->data);
			row = _tmp5_;
			{
				GtkListBoxRow* _tmp6_;
				_tmp6_ = row;
				views_label_source_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, VIEWS_TYPE_LABEL_SOURCE_ROW, ViewsLabelSourceRow));
				_g_object_unref0 (row);
			}
		}
		(row_collection == NULL) ? NULL : (row_collection = (_g_list_free__g_object_unref0_ (row_collection), NULL));
	}
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp7_;
		GeeSet* _tmp8_;
		GeeSet* _tmp9_;
		GeeSet* _tmp10_;
		GeeIterator* _tmp11_;
		GeeIterator* _tmp12_;
		_tmp7_ = self->priv->signal_map;
		_tmp8_ = gee_abstract_map_get_entries ((GeeAbstractMap*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_;
		_tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
		_tmp12_ = _tmp11_;
		_g_object_unref0 (_tmp10_);
		_entry_it = _tmp12_;
		while (TRUE) {
			GeeIterator* _tmp13_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp14_;
			gpointer _tmp15_;
			GeeMapEntry* _tmp16_;
			gconstpointer _tmp17_;
			gconstpointer _tmp18_;
			GeeMapEntry* _tmp19_;
			gconstpointer _tmp20_;
			gconstpointer _tmp21_;
			_tmp13_ = _entry_it;
			if (!gee_iterator_next (_tmp13_)) {
				break;
			}
			_tmp14_ = _entry_it;
			_tmp15_ = gee_iterator_get (_tmp14_);
			entry = (GeeMapEntry*) _tmp15_;
			_tmp16_ = entry;
			_tmp17_ = gee_map_entry_get_value (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = entry;
			_tmp20_ = gee_map_entry_get_key (_tmp19_);
			_tmp21_ = _tmp20_;
			g_signal_handler_disconnect ((GObject*) _tmp18_, (gulong) ((guintptr) _tmp21_));
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	_tmp22_ = self->priv->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp22_);
	_tmp23_ = self->priv->headerbar;
	layouts_header_bar_clean_up (_tmp23_);
}

ViewsLabels*
views_labels_construct (GType object_type)
{
	ViewsLabels * self = NULL;
	self = (ViewsLabels*) g_object_new (object_type, NULL);
	return self;
}

ViewsLabels*
views_labels_new (void)
{
	return views_labels_construct (VIEWS_TYPE_LABELS);
}

static Block73Data*
block73_data_ref (Block73Data* _data73_)
{
	g_atomic_int_inc (&_data73_->_ref_count_);
	return _data73_;
}

static void
block73_data_unref (void * _userdata_)
{
	Block73Data* _data73_;
	_data73_ = (Block73Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data73_->_ref_count_)) {
		ViewsLabels* self;
		self = _data73_->self;
		_g_object_unref0 (_data73_->scrolled_window);
		_g_object_unref0 (_data73_->title_icon);
		_g_object_unref0 (self);
		g_slice_free (Block73Data, _data73_);
	}
}

static void
_views_labels___lambda866_ (Block73Data* _data73_)
{
	ViewsLabels* self;
	Util* _tmp0_;
	Util* _tmp1_;
	ObjectsFiltersLabels* _tmp2_;
	ObjectsFiltersLabels* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkImage* _tmp6_;
	self = _data73_->self;
	_tmp0_ = util_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_filters_labels_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = objects_base_object_theme_color ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _data73_->title_icon;
	util_set_widget_color (_tmp1_, _tmp5_, (GtkWidget*) _tmp6_);
	_g_free0 (_tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
__views_labels___lambda866__services_event_bus_theme_changed (ServicesEventBus* _sender,
                                                              gpointer self)
{
	_views_labels___lambda866_ (self);
}

static void
_views_labels___lambda867_ (ViewsLabels* self,
                            ObjectsSource* source)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (source != NULL);
	_tmp0_ = self->sources_hashmap;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
	_tmp2_ = _tmp1_;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp2_)) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		gpointer _tmp6_;
		ViewsLabelSourceRow* _tmp7_;
		_tmp3_ = self->sources_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) source);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _tmp5_);
		_tmp7_ = (ViewsLabelSourceRow*) _tmp6_;
		views_label_source_row_hide_destroy (_tmp7_);
		_g_object_unref0 (_tmp7_);
	}
}

static void
__views_labels___lambda867__services_store_source_deleted (ServicesStore* _sender,
                                                           ObjectsSource* source,
                                                           gpointer self)
{
	_views_labels___lambda867_ ((ViewsLabels*) self, source);
}

static void
_views_labels_add_source_row_services_store_source_added (ServicesStore* _sender,
                                                          ObjectsSource* source,
                                                          gpointer self)
{
	views_labels_add_source_row ((ViewsLabels*) self, source);
}

static void
_views_labels___lambda868_ (Block73Data* _data73_)
{
	ViewsLabels* self;
	LayoutsHeaderBar* _tmp0_;
	GtkScrolledWindow* _tmp1_;
	GtkAdjustment* _tmp2_;
	GtkAdjustment* _tmp3_;
	gdouble _tmp4_;
	gdouble _tmp5_;
	self = _data73_->self;
	_tmp0_ = self->priv->headerbar;
	_tmp1_ = _data73_->scrolled_window;
	_tmp2_ = gtk_scrolled_window_get_vadjustment (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_adjustment_get_value (_tmp3_);
	_tmp5_ = _tmp4_;
	layouts_header_bar_revealer_title_box (_tmp0_, _tmp5_ >= ((gdouble) CONSTANTS_HEADERBAR_TITLE_SCROLL_THRESHOLD));
}

static void
__views_labels___lambda868__gtk_adjustment_value_changed (GtkAdjustment* _sender,
                                                          gpointer self)
{
	_views_labels___lambda868_ (self);
}

static void
_views_labels___lambda869_ (ViewsLabels* self)
{
	views_labels_prepare_new_item (self, "");
}

static void
__views_labels___lambda869__widgets_magic_button_clicked (WidgetsMagicButton* _sender,
                                                          gpointer self)
{
	_views_labels___lambda869_ ((ViewsLabels*) self);
}

static GObject *
views_labels_constructor (GType type,
                          guint n_construct_properties,
                          GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ViewsLabels * self;
	Block73Data* _data73_;
	ObjectsFiltersLabels* _tmp0_;
	ObjectsFiltersLabels* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	LayoutsHeaderBar* _tmp5_ = NULL;
	GtkMenuButton* view_setting_button = NULL;
	GtkPopover* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gchar* _tmp10_;
	GtkMenuButton* _tmp11_ = NULL;
	LayoutsHeaderBar* _tmp12_;
	GtkMenuButton* _tmp13_;
	ObjectsFiltersLabels* _tmp14_;
	ObjectsFiltersLabels* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkImage* _tmp20_ = NULL;
	GtkImage* _tmp21_;
	Util* _tmp22_;
	Util* _tmp23_;
	ObjectsFiltersLabels* _tmp24_;
	ObjectsFiltersLabels* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	GtkImage* _tmp28_;
	GeeHashMap* _tmp29_;
	ServicesEventBus* _tmp30_;
	ServicesEventBus* _tmp31_;
	gulong _tmp32_;
	ServicesEventBus* _tmp33_;
	ServicesEventBus* _tmp34_;
	GtkLabel* title_label = NULL;
	ObjectsFiltersLabels* _tmp35_;
	ObjectsFiltersLabels* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar** _tmp41_;
	GtkLabel* _tmp42_ = NULL;
	GtkLabel* _tmp43_;
	GtkBox* title_box = NULL;
	GtkBox* _tmp44_;
	GtkBox* _tmp45_;
	GtkImage* _tmp46_;
	GtkBox* _tmp47_;
	GtkLabel* _tmp48_;
	gchar* _tmp49_;
	gchar** _tmp50_;
	GtkListBox* _tmp51_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp52_ = NULL;
	GtkBox* _tmp53_;
	GtkBox* _tmp54_;
	GtkBox* _tmp55_;
	GtkListBox* _tmp56_;
	AdwClamp* content_clamp = NULL;
	GtkBox* _tmp57_;
	GtkWidget* _tmp58_;
	AdwClamp* _tmp59_ = NULL;
	AdwClamp* _tmp60_;
	GtkWidget* _tmp61_;
	GtkScrolledWindow* _tmp62_ = NULL;
	WidgetsMagicButton* magic_button = NULL;
	WidgetsMagicButton* _tmp63_;
	GtkOverlay* content_overlay = NULL;
	GtkScrolledWindow* _tmp64_;
	GtkWidget* _tmp65_;
	GtkOverlay* _tmp66_ = NULL;
	GtkOverlay* _tmp67_;
	WidgetsMagicButton* _tmp68_;
	AdwToolbarView* toolbar_view = NULL;
	GtkOverlay* _tmp69_;
	GtkWidget* _tmp70_;
	AdwToolbarView* _tmp71_ = NULL;
	AdwToolbarView* _tmp72_;
	LayoutsHeaderBar* _tmp73_;
	AdwToolbarView* _tmp74_;
	GeeHashMap* _tmp86_;
	ServicesStore* _tmp87_;
	gulong _tmp88_;
	ServicesStore* _tmp89_;
	GeeHashMap* _tmp90_;
	ServicesStore* _tmp91_;
	gulong _tmp92_;
	ServicesStore* _tmp93_;
	GeeHashMap* _tmp94_;
	GtkScrolledWindow* _tmp95_;
	GtkAdjustment* _tmp96_;
	GtkAdjustment* _tmp97_;
	gulong _tmp98_;
	GtkScrolledWindow* _tmp99_;
	GtkAdjustment* _tmp100_;
	GtkAdjustment* _tmp101_;
	GeeHashMap* _tmp102_;
	WidgetsMagicButton* _tmp103_;
	gulong _tmp104_;
	WidgetsMagicButton* _tmp105_;
	parent_class = G_OBJECT_CLASS (views_labels_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_LABELS, ViewsLabels);
	_data73_ = g_slice_new0 (Block73Data);
	_data73_->_ref_count_ = 1;
	_data73_->self = g_object_ref (self);
	_tmp0_ = objects_filters_labels_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strdup (_tmp3_);
	_tmp5_ = layouts_header_bar_new ();
	layouts_header_bar_set_title (_tmp5_, _tmp4_);
	_g_free0 (_tmp4_);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->headerbar);
	self->priv->headerbar = _tmp5_;
	_g_object_unref0 (_tmp1_);
	_tmp6_ = views_labels_build_view_setting_popover (self);
	_tmp7_ = g_strdup ("view-sort-descending-rtl-symbolic");
	_tmp8_ = g_strdup ("flat");
	_tmp9_ = g_new0 (gchar*, 1 + 1);
	_tmp9_[0] = _tmp8_;
	_tmp10_ = g_strdup (_ ("View Option Menu"));
	_tmp11_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp11_, 12);
	gtk_menu_button_set_popover (_tmp11_, _tmp6_);
	_g_object_unref0 (_tmp6_);
	gtk_menu_button_set_icon_name (_tmp11_, _tmp7_);
	_g_free0 (_tmp7_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp11_, _tmp9_);
	_tmp9_ = (_vala_array_free (_tmp9_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, _tmp10_);
	_g_free0 (_tmp10_);
	g_object_ref_sink (_tmp11_);
	view_setting_button = _tmp11_;
	_tmp12_ = self->priv->headerbar;
	_tmp13_ = view_setting_button;
	layouts_header_bar_pack_end (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = objects_filters_labels_get_default ();
	_tmp15_ = _tmp14_;
	_tmp16_ = objects_base_object_get_icon_name ((ObjectsBaseObject*) _tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = g_strdup ("view-icon");
	_tmp19_ = g_new0 (gchar*, 1 + 1);
	_tmp19_[0] = _tmp18_;
	_tmp20_ = (GtkImage*) gtk_image_new_from_icon_name (_tmp17_);
	gtk_image_set_pixel_size (_tmp20_, 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp20_);
	_tmp21_ = _tmp20_;
	_g_object_unref0 (_tmp15_);
	_data73_->title_icon = _tmp21_;
	_tmp22_ = util_get_default ();
	_tmp23_ = _tmp22_;
	_tmp24_ = objects_filters_labels_get_default ();
	_tmp25_ = _tmp24_;
	_tmp26_ = objects_base_object_theme_color ((ObjectsBaseObject*) _tmp25_);
	_tmp27_ = _tmp26_;
	_tmp28_ = _data73_->title_icon;
	util_set_widget_color (_tmp23_, _tmp27_, (GtkWidget*) _tmp28_);
	_g_free0 (_tmp27_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (_tmp23_);
	_tmp29_ = self->priv->signal_map;
	_tmp30_ = services_event_bus_get_default ();
	_tmp31_ = _tmp30_;
	_tmp32_ = g_signal_connect_data (_tmp31_, "theme-changed", (GCallback) __views_labels___lambda866__services_event_bus_theme_changed, block73_data_ref (_data73_), (GClosureNotify) block73_data_unref, 0);
	_tmp33_ = services_event_bus_get_default ();
	_tmp34_ = _tmp33_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp29_, (gpointer) ((guintptr) _tmp32_), (GObject*) _tmp34_);
	_g_object_unref0 (_tmp34_);
	_g_object_unref0 (_tmp31_);
	_tmp35_ = objects_filters_labels_get_default ();
	_tmp36_ = _tmp35_;
	_tmp37_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = g_strdup ("font-bold");
	_tmp40_ = g_strdup ("title-2");
	_tmp41_ = g_new0 (gchar*, 2 + 1);
	_tmp41_[0] = _tmp39_;
	_tmp41_[1] = _tmp40_;
	_tmp42_ = (GtkLabel*) gtk_label_new (_tmp38_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp42_, _tmp41_);
	_tmp41_ = (_vala_array_free (_tmp41_, 2, (GDestroyNotify) g_free), NULL);
	gtk_label_set_ellipsize (_tmp42_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_halign ((GtkWidget*) _tmp42_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp42_);
	_tmp43_ = _tmp42_;
	_g_object_unref0 (_tmp36_);
	title_label = _tmp43_;
	_tmp44_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp44_);
	title_box = _tmp44_;
	_tmp45_ = title_box;
	_tmp46_ = _data73_->title_icon;
	gtk_box_append (_tmp45_, (GtkWidget*) _tmp46_);
	_tmp47_ = title_box;
	_tmp48_ = title_label;
	gtk_box_append (_tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = g_strdup ("listbox-background");
	_tmp50_ = g_new0 (gchar*, 1 + 1);
	_tmp50_[0] = _tmp49_;
	_tmp51_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp51_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp51_, _tmp50_);
	_tmp50_ = (_vala_array_free (_tmp50_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp51_);
	_g_object_unref0 (self->priv->sources_listbox);
	self->priv->sources_listbox = _tmp51_;
	_tmp52_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp52_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp52_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp52_, 24);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp52_, 24);
	g_object_ref_sink (_tmp52_);
	content_box = _tmp52_;
	_tmp53_ = content_box;
	_tmp54_ = title_box;
	gtk_box_append (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = content_box;
	_tmp56_ = self->priv->sources_listbox;
	gtk_box_append (_tmp55_, (GtkWidget*) _tmp56_);
	_tmp57_ = content_box;
	_tmp58_ = _g_object_ref0 ((GtkWidget*) _tmp57_);
	_tmp59_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp59_, 864);
	adw_clamp_set_tightening_threshold (_tmp59_, 600);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp59_, 64);
	adw_clamp_set_child (_tmp59_, _tmp58_);
	_g_object_unref0 (_tmp58_);
	g_object_ref_sink (_tmp59_);
	content_clamp = _tmp59_;
	_tmp60_ = content_clamp;
	_tmp61_ = _g_object_ref0 ((GtkWidget*) _tmp60_);
	_tmp62_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_set (_tmp62_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp62_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp62_, TRUE);
	gtk_scrolled_window_set_child (_tmp62_, _tmp61_);
	_g_object_unref0 (_tmp61_);
	g_object_ref_sink (_tmp62_);
	_data73_->scrolled_window = _tmp62_;
	_tmp63_ = widgets_magic_button_new ();
	g_object_ref_sink (_tmp63_);
	magic_button = _tmp63_;
	_tmp64_ = _data73_->scrolled_window;
	_tmp65_ = _g_object_ref0 ((GtkWidget*) _tmp64_);
	_tmp66_ = (GtkOverlay*) gtk_overlay_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp66_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp66_, TRUE);
	gtk_overlay_set_child (_tmp66_, _tmp65_);
	_g_object_unref0 (_tmp65_);
	g_object_ref_sink (_tmp66_);
	content_overlay = _tmp66_;
	_tmp67_ = content_overlay;
	_tmp68_ = magic_button;
	gtk_overlay_add_overlay (_tmp67_, (GtkWidget*) _tmp68_);
	_tmp69_ = content_overlay;
	_tmp70_ = _g_object_ref0 ((GtkWidget*) _tmp69_);
	_tmp71_ = (AdwToolbarView*) adw_toolbar_view_new ();
	adw_toolbar_view_set_content (_tmp71_, _tmp70_);
	_g_object_unref0 (_tmp70_);
	g_object_ref_sink (_tmp71_);
	toolbar_view = _tmp71_;
	_tmp72_ = toolbar_view;
	_tmp73_ = self->priv->headerbar;
	adw_toolbar_view_add_top_bar (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = toolbar_view;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp74_);
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp75_;
		GeeArrayList* _tmp76_;
		GeeArrayList* _tmp77_;
		gint _source_size = 0;
		GeeArrayList* _tmp78_;
		gint _tmp79_;
		gint _tmp80_;
		gint _source_index = 0;
		_tmp75_ = services_store_instance ();
		_tmp76_ = services_store_get_sources (_tmp75_);
		_tmp77_ = _tmp76_;
		_source_list = _tmp77_;
		_tmp78_ = _source_list;
		_tmp79_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp78_);
		_tmp80_ = _tmp79_;
		_source_size = _tmp80_;
		_source_index = -1;
		while (TRUE) {
			gint _tmp81_;
			gint _tmp82_;
			ObjectsSource* source = NULL;
			GeeArrayList* _tmp83_;
			gpointer _tmp84_;
			ObjectsSource* _tmp85_;
			_source_index = _source_index + 1;
			_tmp81_ = _source_index;
			_tmp82_ = _source_size;
			if (!(_tmp81_ < _tmp82_)) {
				break;
			}
			_tmp83_ = _source_list;
			_tmp84_ = gee_abstract_list_get ((GeeAbstractList*) _tmp83_, _source_index);
			source = (ObjectsSource*) _tmp84_;
			_tmp85_ = source;
			views_labels_add_source_row (self, _tmp85_);
			_g_object_unref0 (source);
		}
	}
	_tmp86_ = self->priv->signal_map;
	_tmp87_ = services_store_instance ();
	_tmp88_ = g_signal_connect_object (_tmp87_, "source-deleted", (GCallback) __views_labels___lambda867__services_store_source_deleted, self, 0);
	_tmp89_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp86_, (gpointer) ((guintptr) _tmp88_), (GObject*) _tmp89_);
	_tmp90_ = self->priv->signal_map;
	_tmp91_ = services_store_instance ();
	_tmp92_ = g_signal_connect_object (_tmp91_, "source-added", (GCallback) _views_labels_add_source_row_services_store_source_added, self, 0);
	_tmp93_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp90_, (gpointer) ((guintptr) _tmp92_), (GObject*) _tmp93_);
	_tmp94_ = self->priv->signal_map;
	_tmp95_ = _data73_->scrolled_window;
	_tmp96_ = gtk_scrolled_window_get_vadjustment (_tmp95_);
	_tmp97_ = _tmp96_;
	_tmp98_ = g_signal_connect_data (_tmp97_, "value-changed", (GCallback) __views_labels___lambda868__gtk_adjustment_value_changed, block73_data_ref (_data73_), (GClosureNotify) block73_data_unref, 0);
	_tmp99_ = _data73_->scrolled_window;
	_tmp100_ = gtk_scrolled_window_get_vadjustment (_tmp99_);
	_tmp101_ = _tmp100_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp94_, (gpointer) ((guintptr) _tmp98_), (GObject*) _tmp101_);
	_tmp102_ = self->priv->signal_map;
	_tmp103_ = magic_button;
	_tmp104_ = g_signal_connect_object (_tmp103_, "clicked", (GCallback) __views_labels___lambda869__widgets_magic_button_clicked, self, 0);
	_tmp105_ = magic_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp102_, (gpointer) ((guintptr) _tmp104_), (GObject*) _tmp105_);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_overlay);
	_g_object_unref0 (magic_button);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content_box);
	_g_object_unref0 (title_box);
	_g_object_unref0 (title_label);
	_g_object_unref0 (view_setting_button);
	block73_data_unref (_data73_);
	_data73_ = NULL;
	return obj;
}

static void
views_labels_class_init (ViewsLabelsClass * klass,
                         gpointer klass_data)
{
	views_labels_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ViewsLabels_private_offset);
	G_OBJECT_CLASS (klass)->constructor = views_labels_constructor;
	G_OBJECT_CLASS (klass)->finalize = views_labels_finalize;
}

static void
views_labels_instance_init (ViewsLabels * self,
                            gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = views_labels_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VIEWS_TYPE_LABEL_SOURCE_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->sources_hashmap = _tmp0_;
	_tmp1_ = 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 = _tmp1_;
}

static void
views_labels_finalize (GObject * obj)
{
	ViewsLabels * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEWS_TYPE_LABELS, ViewsLabels);
	g_debug ("Labels.vala:30: Destroying - Views.Labels\n");
	_g_object_unref0 (self->priv->headerbar);
	_g_object_unref0 (self->priv->sources_listbox);
	_g_object_unref0 (self->sources_hashmap);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (views_labels_parent_class)->finalize (obj);
}

static GType
views_labels_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ViewsLabelsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) views_labels_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewsLabels), 0, (GInstanceInitFunc) views_labels_instance_init, NULL };
	GType views_labels_type_id;
	views_labels_type_id = g_type_register_static (adw_bin_get_type (), "ViewsLabels", &g_define_type_info, 0);
	ViewsLabels_private_offset = g_type_add_instance_private (views_labels_type_id, sizeof (ViewsLabelsPrivate));
	return views_labels_type_id;
}

GType
views_labels_get_type (void)
{
	static volatile gsize views_labels_type_id__once = 0;
	if (g_once_init_enter (&views_labels_type_id__once)) {
		GType views_labels_type_id;
		views_labels_type_id = views_labels_get_type_once ();
		g_once_init_leave (&views_labels_type_id__once, views_labels_type_id);
	}
	return views_labels_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

