/* ManageProjects.c generated by valac 0.56.19, the Vala compiler
 * generated from ManageProjects.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 <gtk/gtk.h>
#include <gee.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include "planify.h"
#include <stdlib.h>
#include <string.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 DIALOGS_TYPE_MANAGE_PROJECTS (dialogs_manage_projects_get_type ())
#define DIALOGS_MANAGE_PROJECTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_MANAGE_PROJECTS, DialogsManageProjects))
#define DIALOGS_MANAGE_PROJECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_MANAGE_PROJECTS, DialogsManageProjectsClass))
#define DIALOGS_IS_MANAGE_PROJECTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_MANAGE_PROJECTS))
#define DIALOGS_IS_MANAGE_PROJECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_MANAGE_PROJECTS))
#define DIALOGS_MANAGE_PROJECTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_MANAGE_PROJECTS, DialogsManageProjectsClass))

typedef struct _DialogsManageProjects DialogsManageProjects;
typedef struct _DialogsManageProjectsClass DialogsManageProjectsClass;
typedef struct _DialogsManageProjectsPrivate DialogsManageProjectsPrivate;

#define WIDGETS_TYPE_SCROLLED_WINDOW (widgets_scrolled_window_get_type ())
#define WIDGETS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindow))
#define WIDGETS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))
#define WIDGETS_IS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_IS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SCROLLED_WINDOW))
#define WIDGETS_SCROLLED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SCROLLED_WINDOW, WidgetsScrolledWindowClass))

typedef struct _WidgetsScrolledWindow WidgetsScrolledWindow;
typedef struct _WidgetsScrolledWindowClass WidgetsScrolledWindowClass;
enum  {
	DIALOGS_MANAGE_PROJECTS_0_PROPERTY,
	DIALOGS_MANAGE_PROJECTS_NUM_PROPERTIES
};
static GParamSpec* dialogs_manage_projects_properties[DIALOGS_MANAGE_PROJECTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define WIDGETS_TYPE_PROJECT_ITEM_ROW (widgets_project_item_row_get_type ())
#define WIDGETS_PROJECT_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_PROJECT_ITEM_ROW, WidgetsProjectItemRow))
#define WIDGETS_PROJECT_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_PROJECT_ITEM_ROW, WidgetsProjectItemRowClass))
#define WIDGETS_IS_PROJECT_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_PROJECT_ITEM_ROW))
#define WIDGETS_IS_PROJECT_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_PROJECT_ITEM_ROW))
#define WIDGETS_PROJECT_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_PROJECT_ITEM_ROW, WidgetsProjectItemRowClass))

typedef struct _WidgetsProjectItemRow WidgetsProjectItemRow;
typedef struct _WidgetsProjectItemRowClass WidgetsProjectItemRowClass;

struct _DialogsManageProjects {
	AdwDialog parent_instance;
	DialogsManageProjectsPrivate * priv;
};

struct _DialogsManageProjectsClass {
	AdwDialogClass parent_class;
};

struct _DialogsManageProjectsPrivate {
	GtkListBox* listbox;
	WidgetsScrolledWindow* scrolled_window;
	GeeHashMap* signal_map;
};

static gint DialogsManageProjects_private_offset;
static gpointer dialogs_manage_projects_parent_class = NULL;

VALA_EXTERN GType dialogs_manage_projects_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsManageProjects, g_object_unref)
VALA_EXTERN GType widgets_scrolled_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsScrolledWindow, g_object_unref)
VALA_EXTERN DialogsManageProjects* dialogs_manage_projects_new (void);
VALA_EXTERN DialogsManageProjects* dialogs_manage_projects_construct (GType object_type);
VALA_EXTERN void dialogs_manage_projects_clean_up (DialogsManageProjects* self);
VALA_EXTERN GType widgets_project_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsProjectItemRow, g_object_unref)
VALA_EXTERN void widgets_project_item_row_clean_up (WidgetsProjectItemRow* self);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static GObject * dialogs_manage_projects_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties);
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_new (GtkWidget* widget,
                                                    GtkOrientation orientation);
VALA_EXTERN WidgetsScrolledWindow* widgets_scrolled_window_construct (GType object_type,
                                                          GtkWidget* widget,
                                                          GtkOrientation orientation);
VALA_EXTERN WidgetsProjectItemRow* widgets_project_item_row_new (ObjectsProject* project,
                                                     const gchar* widget_type);
VALA_EXTERN WidgetsProjectItemRow* widgets_project_item_row_construct (GType object_type,
                                                           ObjectsProject* project,
                                                           const gchar* widget_type);
static void _dialogs_manage_projects___lambda944_ (DialogsManageProjects* self);
static void __dialogs_manage_projects___lambda944__services_store_project_unarchived (ServicesStore* _sender,
                                                                               ObjectsProject* project,
                                                                               gpointer self);
static void _dialogs_manage_projects___lambda945_ (DialogsManageProjects* self);
static void __dialogs_manage_projects___lambda945__adw_dialog_closed (AdwDialog* _sender,
                                                               gpointer self);
static void dialogs_manage_projects_finalize (GObject * obj);
static GType dialogs_manage_projects_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
dialogs_manage_projects_get_instance_private (DialogsManageProjects* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsManageProjects_private_offset);
}

DialogsManageProjects*
dialogs_manage_projects_construct (GType object_type)
{
	DialogsManageProjects * self = NULL;
	self = (DialogsManageProjects*) g_object_new (object_type, "title", _ ("Archived Projects"), "content-width", 320, "content-height", 420, NULL);
	return self;
}

DialogsManageProjects*
dialogs_manage_projects_new (void)
{
	return dialogs_manage_projects_construct (DIALOGS_TYPE_MANAGE_PROJECTS);
}

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
dialogs_manage_projects_clean_up (DialogsManageProjects* self)
{
	GeeHashMap* _tmp15_;
	Util* _tmp16_;
	Util* _tmp17_;
	GtkListBox* _tmp18_;
	GList* _tmp19_;
	GList* _tmp20_;
	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_ = util_get_default ();
	_tmp17_ = _tmp16_;
	_tmp18_ = self->priv->listbox;
	_tmp19_ = util_get_children (_tmp17_, _tmp18_);
	_tmp20_ = _tmp19_;
	_g_object_unref0 (_tmp17_);
	{
		GList* child_collection = NULL;
		GList* child_it = NULL;
		child_collection = _tmp20_;
		for (child_it = child_collection; child_it != NULL; child_it = child_it->next) {
			GtkWidget* child = NULL;
			child = (GtkWidget*) ((GtkListBoxRow*) child_it->data);
			{
				GtkWidget* _tmp21_;
				_tmp21_ = child;
				widgets_project_item_row_clean_up (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, WIDGETS_TYPE_PROJECT_ITEM_ROW, WidgetsProjectItemRow));
			}
		}
		(child_collection == NULL) ? NULL : (child_collection = (_g_list_free__g_object_unref0_ (child_collection), NULL));
	}
}

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

static void
_dialogs_manage_projects___lambda944_ (DialogsManageProjects* self)
{
	ServicesStore* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp5_;
	_tmp0_ = services_store_instance ();
	_tmp1_ = services_store_get_all_projects_archived (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_ <= 0;
	_g_object_unref0 (_tmp2_);
	if (_tmp5_) {
		adw_dialog_close ((AdwDialog*) self);
	}
}

static void
__dialogs_manage_projects___lambda944__services_store_project_unarchived (ServicesStore* _sender,
                                                                          ObjectsProject* project,
                                                                          gpointer self)
{
	_dialogs_manage_projects___lambda944_ ((DialogsManageProjects*) self);
}

static void
_dialogs_manage_projects___lambda945_ (DialogsManageProjects* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	dialogs_manage_projects_clean_up (self);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	g_signal_emit_by_name (_tmp1_, "connect-typing-accel");
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_manage_projects___lambda945__adw_dialog_closed (AdwDialog* _sender,
                                                          gpointer self)
{
	_dialogs_manage_projects___lambda945_ ((DialogsManageProjects*) self);
}

static GObject *
dialogs_manage_projects_constructor (GType type,
                                     guint n_construct_properties,
                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsManageProjects * self;
	AdwHeaderBar* headerbar = NULL;
	AdwHeaderBar* _tmp0_;
	AdwHeaderBar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	GtkListBox* _tmp4_ = NULL;
	AdwBin* listbox_card = NULL;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkListBox* _tmp7_;
	GtkWidget* _tmp8_;
	AdwBin* _tmp9_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	AdwBin* _tmp12_;
	GtkBox* _tmp13_;
	WidgetsScrolledWindow* _tmp14_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp15_;
	AdwToolbarView* _tmp16_;
	AdwHeaderBar* _tmp17_;
	AdwToolbarView* _tmp18_;
	WidgetsScrolledWindow* _tmp19_;
	AdwToolbarView* _tmp20_;
	ServicesEventBus* _tmp21_;
	ServicesEventBus* _tmp22_;
	GeeHashMap* _tmp39_;
	ServicesStore* _tmp40_;
	gulong _tmp41_;
	ServicesStore* _tmp42_;
	parent_class = G_OBJECT_CLASS (dialogs_manage_projects_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_MANAGE_PROJECTS, DialogsManageProjects);
	_tmp0_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp0_);
	headerbar = _tmp0_;
	_tmp1_ = headerbar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "flat");
	_tmp2_ = g_strdup ("listbox-background");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	_tmp4_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp4_, _tmp3_);
	_tmp3_ = (_vala_array_free (_tmp3_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp4_;
	_tmp5_ = g_strdup ("card");
	_tmp6_ = g_new0 (gchar*, 1 + 1);
	_tmp6_[0] = _tmp5_;
	_tmp7_ = self->priv->listbox;
	_tmp8_ = _g_object_ref0 ((GtkWidget*) _tmp7_);
	_tmp9_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp9_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp9_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp9_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, 3);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp9_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 1, (GDestroyNotify) g_free), NULL);
	adw_bin_set_child (_tmp9_, _tmp8_);
	_g_object_unref0 (_tmp8_);
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp9_);
	listbox_card = _tmp9_;
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp10_);
	content_box = _tmp10_;
	_tmp11_ = content_box;
	_tmp12_ = listbox_card;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = content_box;
	_tmp14_ = widgets_scrolled_window_new ((GtkWidget*) _tmp13_, GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp14_);
	_g_object_unref0 (self->priv->scrolled_window);
	self->priv->scrolled_window = _tmp14_;
	_tmp15_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp15_);
	toolbar_view = _tmp15_;
	_tmp16_ = toolbar_view;
	_tmp17_ = headerbar;
	adw_toolbar_view_add_top_bar (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = toolbar_view;
	_tmp19_ = self->priv->scrolled_window;
	adw_toolbar_view_set_content (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = toolbar_view;
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) _tmp20_);
	_tmp21_ = services_event_bus_get_default ();
	_tmp22_ = _tmp21_;
	g_signal_emit_by_name (_tmp22_, "disconnect-typing-accel");
	_g_object_unref0 (_tmp22_);
	{
		GeeArrayList* _project_list = NULL;
		ServicesStore* _tmp23_;
		GeeArrayList* _tmp24_;
		gint _project_size = 0;
		GeeArrayList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		gint _project_index = 0;
		_tmp23_ = services_store_instance ();
		_tmp24_ = services_store_get_all_projects_archived (_tmp23_);
		_project_list = _tmp24_;
		_tmp25_ = _project_list;
		_tmp26_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_project_size = _tmp27_;
		_project_index = -1;
		while (TRUE) {
			gint _tmp28_;
			gint _tmp29_;
			ObjectsProject* project = NULL;
			GeeArrayList* _tmp30_;
			gpointer _tmp31_;
			ObjectsProject* _tmp32_;
			gboolean _tmp33_;
			gboolean _tmp34_;
			_project_index = _project_index + 1;
			_tmp28_ = _project_index;
			_tmp29_ = _project_size;
			if (!(_tmp28_ < _tmp29_)) {
				break;
			}
			_tmp30_ = _project_list;
			_tmp31_ = gee_abstract_list_get ((GeeAbstractList*) _tmp30_, _project_index);
			project = (ObjectsProject*) _tmp31_;
			_tmp32_ = project;
			_tmp33_ = objects_project_get_is_archived (_tmp32_);
			_tmp34_ = _tmp33_;
			if (_tmp34_) {
				GtkListBox* _tmp35_;
				ObjectsProject* _tmp36_;
				WidgetsProjectItemRow* _tmp37_;
				WidgetsProjectItemRow* _tmp38_;
				_tmp35_ = self->priv->listbox;
				_tmp36_ = project;
				_tmp37_ = widgets_project_item_row_new (_tmp36_, "menu");
				g_object_ref_sink (_tmp37_);
				_tmp38_ = _tmp37_;
				gtk_list_box_append (_tmp35_, (GtkWidget*) _tmp38_);
				_g_object_unref0 (_tmp38_);
			}
			_g_object_unref0 (project);
		}
		_g_object_unref0 (_project_list);
	}
	_tmp39_ = self->priv->signal_map;
	_tmp40_ = services_store_instance ();
	_tmp41_ = g_signal_connect_object (_tmp40_, "project-unarchived", (GCallback) __dialogs_manage_projects___lambda944__services_store_project_unarchived, self, 0);
	_tmp42_ = services_store_instance ();
	gee_abstract_map_set ((GeeAbstractMap*) _tmp39_, (gpointer) ((guintptr) _tmp41_), (GObject*) _tmp42_);
	g_signal_connect_object ((AdwDialog*) self, "closed", (GCallback) __dialogs_manage_projects___lambda945__adw_dialog_closed, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_box);
	_g_object_unref0 (listbox_card);
	_g_object_unref0 (headerbar);
	return obj;
}

static void
dialogs_manage_projects_class_init (DialogsManageProjectsClass * klass,
                                    gpointer klass_data)
{
	dialogs_manage_projects_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsManageProjects_private_offset);
	G_OBJECT_CLASS (klass)->constructor = dialogs_manage_projects_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_manage_projects_finalize;
}

static void
dialogs_manage_projects_instance_init (DialogsManageProjects * self,
                                       gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dialogs_manage_projects_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
dialogs_manage_projects_finalize (GObject * obj)
{
	DialogsManageProjects * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_MANAGE_PROJECTS, DialogsManageProjects);
	g_debug ("ManageProjects.vala:36: Destroying - Dialogs.ManageProjects\n");
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->scrolled_window);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (dialogs_manage_projects_parent_class)->finalize (obj);
}

static GType
dialogs_manage_projects_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsManageProjectsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_manage_projects_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsManageProjects), 0, (GInstanceInitFunc) dialogs_manage_projects_instance_init, NULL };
	GType dialogs_manage_projects_type_id;
	dialogs_manage_projects_type_id = g_type_register_static (adw_dialog_get_type (), "DialogsManageProjects", &g_define_type_info, 0);
	DialogsManageProjects_private_offset = g_type_add_instance_private (dialogs_manage_projects_type_id, sizeof (DialogsManageProjectsPrivate));
	return dialogs_manage_projects_type_id;
}

GType
dialogs_manage_projects_get_type (void)
{
	static volatile gsize dialogs_manage_projects_type_id__once = 0;
	if (g_once_init_enter (&dialogs_manage_projects_type_id__once)) {
		GType dialogs_manage_projects_type_id;
		dialogs_manage_projects_type_id = dialogs_manage_projects_get_type_once ();
		g_once_init_leave (&dialogs_manage_projects_type_id__once, dialogs_manage_projects_type_id);
	}
	return dialogs_manage_projects_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);
}

