/* ProjectRow.c generated by valac 0.56.19, the Vala compiler
 * generated from ProjectRow.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 <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "planify.h"
#include <adwaita.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define LAYOUTS_TYPE_PROJECT_ROW (layouts_project_row_get_type ())
#define LAYOUTS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow))
#define LAYOUTS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))
#define LAYOUTS_IS_PROJECT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_IS_PROJECT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_PROJECT_ROW))
#define LAYOUTS_PROJECT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRowClass))

typedef struct _LayoutsProjectRow LayoutsProjectRow;
typedef struct _LayoutsProjectRowClass LayoutsProjectRowClass;
typedef struct _LayoutsProjectRowPrivate LayoutsProjectRowPrivate;
enum  {
	LAYOUTS_PROJECT_ROW_0_PROPERTY,
	LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY,
	LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY,
	LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY,
	LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY,
	LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY,
	LAYOUTS_PROJECT_ROW_NUM_PROPERTIES
};
static GParamSpec* layouts_project_row_properties[LAYOUTS_PROJECT_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define 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;

#define DIALOGS_TYPE_PROJECT (dialogs_project_get_type ())
#define DIALOGS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_TYPE_PROJECT, DialogsProject))
#define DIALOGS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_TYPE_PROJECT, DialogsProjectClass))
#define DIALOGS_IS_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_TYPE_PROJECT))
#define DIALOGS_IS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_TYPE_PROJECT))
#define DIALOGS_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_TYPE_PROJECT, DialogsProjectClass))

typedef struct _DialogsProject DialogsProject;
typedef struct _DialogsProjectClass DialogsProjectClass;

#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 _Block20Data Block20Data;
#define _http_response_unref0(var) ((var == NULL) ? NULL : (var = (http_response_unref (var), NULL)))
typedef struct _Block21Data Block21Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block22Data Block22Data;

#define LAYOUTS_TYPE_ITEM_BASE (layouts_item_base_get_type ())
#define LAYOUTS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBase))
#define LAYOUTS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))
#define LAYOUTS_IS_ITEM_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_IS_ITEM_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BASE))
#define LAYOUTS_ITEM_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BASE, LayoutsItemBaseClass))

typedef struct _LayoutsItemBase LayoutsItemBase;
typedef struct _LayoutsItemBaseClass LayoutsItemBaseClass;

#define LAYOUTS_TYPE_ITEM_ROW (layouts_item_row_get_type ())
#define LAYOUTS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRow))
#define LAYOUTS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))
#define LAYOUTS_IS_ITEM_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_IS_ITEM_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_ROW))
#define LAYOUTS_ITEM_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_ROW, LayoutsItemRowClass))

typedef struct _LayoutsItemRow LayoutsItemRow;
typedef struct _LayoutsItemRowClass LayoutsItemRowClass;

#define LAYOUTS_TYPE_ITEM_BOARD (layouts_item_board_get_type ())
#define LAYOUTS_ITEM_BOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoard))
#define LAYOUTS_ITEM_BOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoardClass))
#define LAYOUTS_IS_ITEM_BOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LAYOUTS_TYPE_ITEM_BOARD))
#define LAYOUTS_IS_ITEM_BOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LAYOUTS_TYPE_ITEM_BOARD))
#define LAYOUTS_ITEM_BOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LAYOUTS_TYPE_ITEM_BOARD, LayoutsItemBoardClass))

typedef struct _LayoutsItemBoard LayoutsItemBoard;
typedef struct _LayoutsItemBoardClass LayoutsItemBoardClass;
typedef struct _Block23Data Block23Data;

#define SERVICES_TYPE_EXPORT_SERVICE (services_export_service_get_type ())
#define SERVICES_EXPORT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SERVICES_TYPE_EXPORT_SERVICE, ServicesExportService))
#define SERVICES_EXPORT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SERVICES_TYPE_EXPORT_SERVICE, ServicesExportServiceClass))
#define SERVICES_IS_EXPORT_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SERVICES_TYPE_EXPORT_SERVICE))
#define SERVICES_IS_EXPORT_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SERVICES_TYPE_EXPORT_SERVICE))
#define SERVICES_EXPORT_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SERVICES_TYPE_EXPORT_SERVICE, ServicesExportServiceClass))

typedef struct _ServicesExportService ServicesExportService;
typedef struct _ServicesExportServiceClass ServicesExportServiceClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _Block24Data Block24Data;

struct _LayoutsProjectRow {
	GtkListBoxRow parent_instance;
	LayoutsProjectRowPrivate * priv;
	GtkBox* main_content;
	GtkRevealer* main_revealer;
	GtkGrid* drop_target_end;
	GtkRevealer* drop_target_end_revealer;
	GeeHashMap* subprojects_hashmap;
};

struct _LayoutsProjectRowClass {
	GtkListBoxRowClass parent_class;
};

struct _LayoutsProjectRowPrivate {
	ObjectsProject* _project;
	gboolean _show_subprojects;
	gboolean _drag_n_drop;
	WidgetsIconColorProject* icon_project;
	GtkLabel* name_label;
	GtkLabel* count_label;
	GtkRevealer* count_revealer;
	GtkButton* arrow_button;
	GtkRevealer* arrow_revealer;
	GtkListBox* listbox;
	AdwBin* handle_grid;
	GtkRevealer* listbox_revealer;
	GtkLabel* due_label;
	GtkStack* menu_stack;
	GtkRevealer* loading_revealer;
	GtkPopover* menu_popover;
	WidgetsContextMenuMenuItem* favorite_item;
	GtkGrid* motion_top_grid;
	GtkRevealer* motion_top_revealer;
	GeeHashMap* signals_map;
};

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

struct _PlanifyClass {
	AdwApplicationClass parent_class;
};

struct _Block20Data {
	int _ref_count_;
	LayoutsProjectRow* self;
	LayoutsProjectRow* picked_widget;
	ObjectsProject* picked_project;
	gchar* old_parent_id;
};

struct _Block21Data {
	int _ref_count_;
	LayoutsProjectRow* self;
	GtkDropControllerMotion* drop_motion_ctrl;
};

struct _Block22Data {
	int _ref_count_;
	LayoutsProjectRow* self;
	ObjectsProject* picked_project;
	gchar* old_parent_id;
};

struct _Block23Data {
	int _ref_count_;
	LayoutsProjectRow* self;
	GtkFileDialog* file_dialog;
};

struct _Block24Data {
	int _ref_count_;
	LayoutsProjectRow* self;
	GtkGestureClick* arrow_gesture;
};

static gint LayoutsProjectRow_private_offset;
static gpointer layouts_project_row_parent_class = NULL;
VALA_EXTERN Planify* planify__instance;

VALA_EXTERN GType layouts_project_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsProjectRow, g_object_unref)
VALA_EXTERN LayoutsProjectRow* layouts_project_row_new (ObjectsProject* project,
                                            gboolean show_subprojects,
                                            gboolean drag_n_drop);
VALA_EXTERN LayoutsProjectRow* layouts_project_row_construct (GType object_type,
                                                  ObjectsProject* project,
                                                  gboolean show_subprojects,
                                                  gboolean drag_n_drop);
static void layouts_project_row_update_count_label (LayoutsProjectRow* self,
                                             gint count);
static void layouts_project_row_build_drag_and_drop (LayoutsProjectRow* self);
static void layouts_project_row_build_drop_motion (LayoutsProjectRow* self);
static void layouts_project_row_build_drag_source (LayoutsProjectRow* self);
VALA_EXTERN GType widgets_magic_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsMagicButton, g_object_unref)
static gboolean __lambda19_ (LayoutsProjectRow* self,
                      GValue* value,
                      gdouble x,
                      gdouble y);
VALA_EXTERN GType dialogs_project_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsProject, g_object_unref)
VALA_EXTERN ObjectsProject* layouts_project_row_get_project (LayoutsProjectRow* self);
VALA_EXTERN DialogsProject* dialogs_project_new_new (const gchar* source_id,
                                         gboolean backend_picker,
                                         const gchar* parent_id);
VALA_EXTERN DialogsProject* dialogs_project_construct_new (GType object_type,
                                               const gchar* source_id,
                                               gboolean backend_picker,
                                               const gchar* parent_id);
VALA_EXTERN GType planify_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Planify, g_object_unref)
VALA_EXTERN GType main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MainWindow, g_object_unref)
static gboolean ___lambda19__gtk_drop_target_drop (GtkDropTarget* _sender,
                                            GValue* value,
                                            gdouble x,
                                            gdouble y,
                                            gpointer self);
static void layouts_project_row_build_drop_project_target (LayoutsProjectRow* self);
static void layouts_project_row_build_drop_item_target (LayoutsProjectRow* self);
static gboolean __lambda232_ (LayoutsProjectRow* self,
                       GValue* value,
                       gdouble x,
                       gdouble y);
static gboolean layouts_project_row_on_order_drop (LayoutsProjectRow* self,
                                            GValue* value,
                                            gdouble x,
                                            gdouble y,
                                            gboolean bottom);
static gboolean ___lambda232__gtk_drop_target_drop (GtkDropTarget* _sender,
                                             GValue* value,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static gboolean __lambda234_ (LayoutsProjectRow* self,
                       GValue* value,
                       gdouble x,
                       gdouble y);
static gboolean ___lambda234__gtk_drop_target_drop (GtkDropTarget* _sender,
                                             GValue* value,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void ____lambda233_ (Block20Data* _data20_,
                     GObject* obj,
                     GAsyncResult* res);
static void _____lambda233__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static void layouts_project_row_update_projects_child_order (LayoutsProjectRow* self,
                                                      GtkListBox* listbox);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void __lambda7_ (Block21Data* _data21_,
                 gdouble x,
                 gdouble y);
static void ___lambda7__gtk_drop_controller_motion_motion (GtkDropControllerMotion* _sender,
                                                    gdouble x,
                                                    gdouble y,
                                                    gpointer self);
static void __lambda8_ (LayoutsProjectRow* self);
static void ___lambda8__gtk_drop_controller_motion_leave (GtkDropControllerMotion* _sender,
                                                   gpointer self);
static GdkContentProvider* __lambda9_ (LayoutsProjectRow* self,
                                GtkDragSource* source,
                                gdouble x,
                                gdouble y);
static GdkContentProvider* ___lambda9__gtk_drag_source_prepare (GtkDragSource* _sender,
                                                         gdouble x,
                                                         gdouble y,
                                                         gpointer self);
static void __lambda10_ (LayoutsProjectRow* self,
                  GtkDragSource* source,
                  GdkDrag* drag);
VALA_EXTERN void layouts_project_row_drag_begin (LayoutsProjectRow* self);
static void ___lambda10__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                              GdkDrag* drag,
                                              gpointer self);
static gboolean __lambda11_ (LayoutsProjectRow* self,
                      GtkDragSource* source,
                      GdkDrag* drag,
                      GdkDragCancelReason reason);
VALA_EXTERN void layouts_project_row_drag_end (LayoutsProjectRow* self);
static gboolean ___lambda11__gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                                   GdkDrag* drag,
                                                   GdkDragCancelReason reason,
                                                   gpointer self);
static void __lambda12_ (LayoutsProjectRow* self,
                  GtkDragSource* source,
                  GdkDrag* drag,
                  gboolean delete_data);
static void ___lambda12__gtk_drag_source_drag_end (GtkDragSource* _sender,
                                            GdkDrag* drag,
                                            gboolean delete_data,
                                            gpointer self);
static gboolean __lambda37_ (LayoutsProjectRow* self,
                      GdkDrop* drop);
static gboolean ___lambda37__gtk_drop_target_accept (GtkDropTarget* _sender,
                                              GdkDrop* drop,
                                              gpointer self);
static gboolean __lambda38_ (LayoutsProjectRow* self,
                      GValue* value,
                      gdouble x,
                      gdouble y);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void ___lambda39_ (Block22Data* _data22_,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda39__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static gboolean ___lambda38__gtk_drop_target_drop (GtkDropTarget* _sender,
                                            GValue* value,
                                            gdouble x,
                                            gdouble y,
                                            gpointer self);
VALA_EXTERN GType layouts_item_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBase, g_object_unref)
VALA_EXTERN GType layouts_item_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemRow, g_object_unref)
static gboolean __lambda228_ (LayoutsProjectRow* self,
                       GdkDrop* drop);
VALA_EXTERN ObjectsItem* layouts_item_base_get_item (LayoutsItemBase* self);
static gboolean ___lambda228__gtk_drop_target_accept (GtkDropTarget* _sender,
                                               GdkDrop* drop,
                                               gpointer self);
static gboolean __lambda229_ (LayoutsProjectRow* self,
                       GValue* value,
                       gdouble x,
                       gdouble y);
VALA_EXTERN GType layouts_item_board_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (LayoutsItemBoard, g_object_unref)
static gboolean ___lambda229__gtk_drop_target_drop (GtkDropTarget* _sender,
                                             GValue* value,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static gboolean __lambda230_ (LayoutsProjectRow* self,
                       GdkDrop* drop);
static gboolean ___lambda230__gtk_drop_target_accept (GtkDropTarget* _sender,
                                               GdkDrop* drop,
                                               gpointer self);
static gboolean __lambda231_ (LayoutsProjectRow* self,
                       GValue* value,
                       gdouble x,
                       gdouble y);
static gboolean ___lambda231__gtk_drop_target_drop (GtkDropTarget* _sender,
                                             GValue* value,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static void layouts_project_row_build_context_menu (LayoutsProjectRow* self,
                                             gdouble x,
                                             gdouble y);
static void __lambda235_ (LayoutsProjectRow* self);
static void ___lambda235__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda236_ (LayoutsProjectRow* self);
VALA_EXTERN DialogsProject* dialogs_project_new (ObjectsProject* project);
VALA_EXTERN DialogsProject* dialogs_project_construct (GType object_type,
                                           ObjectsProject* project);
static void ___lambda236__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda237_ (LayoutsProjectRow* self);
static void layouts_project_row_sync_project (LayoutsProjectRow* self);
static void ___lambda237__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda238_ (LayoutsProjectRow* self);
VALA_EXTERN Planify* planify_get_instance (void);
static void ___lambda238__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda239_ (LayoutsProjectRow* self);
static void ___lambda239__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda240_ (LayoutsProjectRow* self);
static void ___lambda240__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda241_ (LayoutsProjectRow* self);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static void __lambda242_ (Block23Data* _data23_,
                   GObject* obj,
                   GAsyncResult* res);
VALA_EXTERN GType services_export_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ServicesExportService, g_object_unref)
VALA_EXTERN ServicesExportService* services_export_service_get_default (void);
VALA_EXTERN void services_export_service_export_project_pdf (ServicesExportService* self,
                                                 ObjectsProject* project,
                                                 const gchar* output_path);
static void ___lambda242__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda241__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda244_ (LayoutsProjectRow* self);
static void ___lambda244__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda245_ (LayoutsProjectRow* self);
static void ___lambda245__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void layouts_project_row_update_listbox_revealer (LayoutsProjectRow* self);
VALA_EXTERN void layouts_project_row_update_request (LayoutsProjectRow* self);
static void layouts_project_row_check_due_date (LayoutsProjectRow* self);
static void layouts_project_row_add_subprojects (LayoutsProjectRow* self);
VALA_EXTERN void layouts_project_row_add_subproject (LayoutsProjectRow* self,
                                         ObjectsProject* project);
VALA_EXTERN void layouts_project_row_hide_destroy (LayoutsProjectRow* self);
static gboolean __lambda246_ (LayoutsProjectRow* self);
static gboolean ___lambda246__gsource_func (gpointer self);
VALA_EXTERN gboolean layouts_project_row_get_show_subprojects (LayoutsProjectRow* self);
static void layouts_project_row_set_project (LayoutsProjectRow* self,
                                      ObjectsProject* value);
static void layouts_project_row_set_show_subprojects (LayoutsProjectRow* self,
                                               gboolean value);
VALA_EXTERN gboolean layouts_project_row_get_drag_n_drop (LayoutsProjectRow* self);
static void layouts_project_row_set_drag_n_drop (LayoutsProjectRow* self,
                                          gboolean value);
static gboolean layouts_project_row_get_has_subprojects (LayoutsProjectRow* self);
VALA_EXTERN gboolean layouts_project_row_get_reveal_child (LayoutsProjectRow* self);
VALA_EXTERN void layouts_project_row_set_reveal_child (LayoutsProjectRow* self,
                                           gboolean value);
VALA_EXTERN gboolean layouts_project_row_get_is_loading (LayoutsProjectRow* self);
VALA_EXTERN void layouts_project_row_set_is_loading (LayoutsProjectRow* self,
                                         gboolean value);
static GObject * layouts_project_row_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
static gboolean _layouts_project_row___lambda247_ (LayoutsProjectRow* self);
static gboolean __layouts_project_row___lambda247__gsource_func (gpointer self);
static void _layouts_project_row___lambda248_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda248__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                                    gint n_press,
                                                                    gdouble x,
                                                                    gdouble y,
                                                                    gpointer self);
static void _layouts_project_row___lambda249_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda249__gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                                   gpointer self);
static void _layouts_project_row___lambda250_ (LayoutsProjectRow* self,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y);
static void __layouts_project_row___lambda250__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                   gint n_press,
                                                                   gdouble x,
                                                                   gdouble y,
                                                                   gpointer self);
static void _layouts_project_row___lambda251_ (Block24Data* _data24_);
static void __layouts_project_row___lambda251__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                   gint n_press,
                                                                   gdouble x,
                                                                   gdouble y,
                                                                   gpointer self);
static void _layouts_project_row___lambda252_ (LayoutsProjectRow* self,
                                        PaneType pane_type,
                                        const gchar* id);
static void __layouts_project_row___lambda252__services_event_bus_pane_selected (ServicesEventBus* _sender,
                                                                          PaneType panel_type,
                                                                          const gchar* id,
                                                                          gpointer self);
static void _layouts_project_row_update_request_objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                      const gchar* update_id,
                                                                      gpointer self);
static void _layouts_project_row_hide_destroy_objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                                    gpointer self);
static void _layouts_project_row_hide_destroy_objects_base_object_archived (ObjectsBaseObject* _sender,
                                                                     gpointer self);
static void _layouts_project_row___lambda253_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda253__objects_base_object_count_updated (ObjectsBaseObject* _sender,
                                                                           gpointer self);
static void _layouts_project_row___lambda254_ (LayoutsProjectRow* self,
                                        ObjectsProject* subproject);
static void __layouts_project_row___lambda254__objects_project_subproject_added (ObjectsProject* _sender,
                                                                          ObjectsProject* project,
                                                                          gpointer self);
static void _layouts_project_row___lambda255_ (LayoutsProjectRow* self,
                                        ObjectsProject* _project,
                                        const gchar* old_parent_id,
                                        gboolean collapsed);
static void __layouts_project_row___lambda255__services_event_bus_project_parent_changed (ServicesEventBus* _sender,
                                                                                   ObjectsProject* project,
                                                                                   const gchar* old_parent_id,
                                                                                   gboolean collapsed,
                                                                                   gpointer self);
static void _layouts_project_row___lambda256_ (LayoutsProjectRow* self,
                                        GtkWidget* _row,
                                        const gchar* old_parent_id);
static void __layouts_project_row___lambda256__services_event_bus_update_inserted_project_map (ServicesEventBus* _sender,
                                                                                        GtkWidget* row,
                                                                                        const gchar* old_parent_id,
                                                                                        gpointer self);
static void _layouts_project_row___lambda257_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda257__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                            gpointer self);
static void _layouts_project_row___lambda258_ (LayoutsProjectRow* self,
                                        const gchar* source_id);
static void __layouts_project_row___lambda258__services_event_bus_projects_drag_end (ServicesEventBus* _sender,
                                                                              const gchar* source_id,
                                                                              gpointer self);
static void _layouts_project_row___lambda259_ (LayoutsProjectRow* self,
                                        const gchar* source_id);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void __layouts_project_row___lambda259__services_event_bus_projects_drag_begin (ServicesEventBus* _sender,
                                                                                const gchar* source_id,
                                                                                gpointer self);
static void _layouts_project_row___lambda260_ (LayoutsProjectRow* self,
                                        const gchar* source_id);
static void __layouts_project_row___lambda260__services_event_bus_projects_drag_end (ServicesEventBus* _sender,
                                                                              const gchar* source_id,
                                                                              gpointer self);
static void _layouts_project_row___lambda261_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda261__g_settings_changed (GSettings* _sender,
                                                            const gchar* key,
                                                            gpointer self);
static void _layouts_project_row___lambda262_ (LayoutsProjectRow* self);
static void __layouts_project_row___lambda262__gtk_widget_destroy (GtkWidget* _sender,
                                                            gpointer self);
static void layouts_project_row_finalize (GObject * obj);
static GType layouts_project_row_get_type_once (void);
static void _vala_layouts_project_row_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_layouts_project_row_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
layouts_project_row_get_instance_private (LayoutsProjectRow* self)
{
	return G_STRUCT_MEMBER_P (self, LayoutsProjectRow_private_offset);
}

LayoutsProjectRow*
layouts_project_row_construct (GType object_type,
                               ObjectsProject* project,
                               gboolean show_subprojects,
                               gboolean drag_n_drop)
{
	LayoutsProjectRow * self = NULL;
	g_return_val_if_fail (project != NULL, NULL);
	self = (LayoutsProjectRow*) g_object_new (object_type, "project", project, "show-subprojects", show_subprojects, "drag-n-drop", drag_n_drop, NULL);
	return self;
}

LayoutsProjectRow*
layouts_project_row_new (ObjectsProject* project,
                         gboolean show_subprojects,
                         gboolean drag_n_drop)
{
	return layouts_project_row_construct (LAYOUTS_TYPE_PROJECT_ROW, project, show_subprojects, drag_n_drop);
}

static void
layouts_project_row_update_count_label (LayoutsProjectRow* self,
                                        gint count)
{
	gchar* _tmp0_ = NULL;
	GtkLabel* _tmp3_;
	g_return_if_fail (self != NULL);
	if (count <= 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup_printf ("%i", count);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = self->priv->count_label;
	gtk_label_set_label (_tmp3_, _tmp0_);
	_g_free0 (_tmp0_);
}

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

static gboolean
__lambda19_ (LayoutsProjectRow* self,
             GValue* value,
             gdouble x,
             gdouble y)
{
	DialogsProject* dialog = NULL;
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ObjectsProject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	DialogsProject* _tmp6_;
	Planify* _tmp7_;
	MainWindow* _tmp8_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_source_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_project;
	_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = dialogs_project_new_new (_tmp2_, FALSE, _tmp5_);
	g_object_ref_sink (_tmp6_);
	dialog = _tmp6_;
	_tmp7_ = planify__instance;
	_tmp8_ = _tmp7_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp8_);
	result = TRUE;
	_g_object_unref0 (dialog);
	return result;
}

static gboolean
___lambda19__gtk_drop_target_drop (GtkDropTarget* _sender,
                                   GValue* value,
                                   gdouble x,
                                   gdouble y,
                                   gpointer self)
{
	gboolean result;
	result = __lambda19_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static gboolean
__lambda232_ (LayoutsProjectRow* self,
              GValue* value,
              gdouble x,
              gdouble y)
{
	GValue _tmp0_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = *value;
	result = layouts_project_row_on_order_drop (self, &_tmp0_, x, y, FALSE);
	return result;
}

static gboolean
___lambda232__gtk_drop_target_drop (GtkDropTarget* _sender,
                                    GValue* value,
                                    gdouble x,
                                    gdouble y,
                                    gpointer self)
{
	gboolean result;
	result = __lambda232_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static gboolean
__lambda234_ (LayoutsProjectRow* self,
              GValue* value,
              gdouble x,
              gdouble y)
{
	GValue _tmp0_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = *value;
	result = layouts_project_row_on_order_drop (self, &_tmp0_, x, y, TRUE);
	return result;
}

static gboolean
___lambda234__gtk_drop_target_drop (GtkDropTarget* _sender,
                                    GValue* value,
                                    gdouble x,
                                    gdouble y,
                                    gpointer self)
{
	gboolean result;
	result = __lambda234_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static void
layouts_project_row_build_drag_and_drop (LayoutsProjectRow* self)
{
	GtkDropTarget* drop_magic_button_target = NULL;
	GtkDropTarget* _tmp0_;
	AdwBin* _tmp1_;
	GtkEventController* _tmp2_;
	GeeHashMap* _tmp3_;
	gulong _tmp4_;
	GtkDropTarget* drop_order_target = NULL;
	GtkDropTarget* _tmp5_;
	GtkGrid* _tmp6_;
	GtkEventController* _tmp7_;
	GeeHashMap* _tmp8_;
	gulong _tmp9_;
	GtkDropTarget* drop_order_end_target = NULL;
	GtkDropTarget* _tmp10_;
	GtkGrid* _tmp11_;
	GtkEventController* _tmp12_;
	GeeHashMap* _tmp13_;
	gulong _tmp14_;
	g_return_if_fail (self != NULL);
	layouts_project_row_build_drop_motion (self);
	layouts_project_row_build_drag_source (self);
	_tmp0_ = gtk_drop_target_new (WIDGETS_TYPE_MAGIC_BUTTON, GDK_ACTION_MOVE);
	drop_magic_button_target = _tmp0_;
	_tmp1_ = self->priv->handle_grid;
	_tmp2_ = _g_object_ref0 ((GtkEventController*) drop_magic_button_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->signals_map;
	_tmp4_ = g_signal_connect_object (drop_magic_button_target, "drop", (GCallback) ___lambda19__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp4_), (GObject*) drop_magic_button_target);
	layouts_project_row_build_drop_project_target (self);
	layouts_project_row_build_drop_item_target (self);
	_tmp5_ = gtk_drop_target_new (LAYOUTS_TYPE_PROJECT_ROW, GDK_ACTION_MOVE);
	drop_order_target = _tmp5_;
	_tmp6_ = self->priv->motion_top_grid;
	_tmp7_ = _g_object_ref0 ((GtkEventController*) drop_order_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp6_, _tmp7_);
	_tmp8_ = self->priv->signals_map;
	_tmp9_ = g_signal_connect_object (drop_order_target, "drop", (GCallback) ___lambda232__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, (gpointer) ((guintptr) _tmp9_), (GObject*) drop_order_target);
	_tmp10_ = gtk_drop_target_new (LAYOUTS_TYPE_PROJECT_ROW, GDK_ACTION_MOVE);
	drop_order_end_target = _tmp10_;
	_tmp11_ = self->drop_target_end;
	_tmp12_ = _g_object_ref0 ((GtkEventController*) drop_order_end_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp11_, _tmp12_);
	_tmp13_ = self->priv->signals_map;
	_tmp14_ = g_signal_connect_object (drop_order_end_target, "drop", (GCallback) ___lambda234__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, (gpointer) ((guintptr) _tmp14_), (GObject*) drop_order_end_target);
	_g_object_unref0 (drop_order_end_target);
	_g_object_unref0 (drop_order_target);
	_g_object_unref0 (drop_magic_button_target);
}

static Block20Data*
block20_data_ref (Block20Data* _data20_)
{
	g_atomic_int_inc (&_data20_->_ref_count_);
	return _data20_;
}

static void
block20_data_unref (void * _userdata_)
{
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		LayoutsProjectRow* self;
		self = _data20_->self;
		_g_free0 (_data20_->old_parent_id);
		_g_object_unref0 (_data20_->picked_project);
		_g_object_unref0 (_data20_->picked_widget);
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}

static void
____lambda233_ (Block20Data* _data20_,
                GObject* obj,
                GAsyncResult* res)
{
	LayoutsProjectRow* self;
	ServicesTodoist* _tmp0_;
	ServicesTodoist* _tmp1_;
	HttpResponse* _tmp2_;
	HttpResponse* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data20_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = services_todoist_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = services_todoist_move_project_section_finish (_tmp1_, res);
	_tmp3_ = _tmp2_;
	_tmp4_ = http_response_get_status (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_http_response_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	if (_tmp6_) {
		ServicesStore* _tmp7_;
		ObjectsProject* _tmp8_;
		ServicesEventBus* _tmp9_;
		ServicesEventBus* _tmp10_;
		LayoutsProjectRow* _tmp11_;
		const gchar* _tmp12_;
		_tmp7_ = services_store_instance ();
		_tmp8_ = _data20_->picked_project;
		services_store_update_project (_tmp7_, _tmp8_);
		_tmp9_ = services_event_bus_get_default ();
		_tmp10_ = _tmp9_;
		_tmp11_ = _data20_->picked_widget;
		_tmp12_ = _data20_->old_parent_id;
		g_signal_emit_by_name (_tmp10_, "update-inserted-project-map", (GtkWidget*) _tmp11_, _tmp12_);
		_g_object_unref0 (_tmp10_);
	}
}

static void
_____lambda233__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda233_ (self, source_object, res);
	block20_data_unref (self);
}

static gboolean
layouts_project_row_on_order_drop (LayoutsProjectRow* self,
                                   GValue* value,
                                   gdouble x,
                                   gdouble y,
                                   gboolean bottom)
{
	Block20Data* _data20_;
	GValue _tmp0_;
	LayoutsProjectRow* _tmp1_;
	LayoutsProjectRow* target_widget = NULL;
	LayoutsProjectRow* _tmp2_;
	ServicesEventBus* _tmp3_;
	ServicesEventBus* _tmp4_;
	LayoutsProjectRow* _tmp5_;
	ObjectsProject* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	LayoutsProjectRow* _tmp9_;
	ObjectsProject* _tmp10_;
	ObjectsProject* _tmp11_;
	ObjectsProject* target_project = NULL;
	LayoutsProjectRow* _tmp12_;
	ObjectsProject* _tmp13_;
	ObjectsProject* _tmp14_;
	gboolean _tmp15_ = FALSE;
	LayoutsProjectRow* _tmp16_;
	LayoutsProjectRow* _tmp17_;
	gint projects_sort = 0;
	ServicesSettings* _tmp19_;
	ServicesSettings* _tmp20_;
	GSettings* _tmp21_;
	gint _tmp22_;
	GtkListBox* source_list = NULL;
	LayoutsProjectRow* _tmp32_;
	GtkWidget* _tmp33_;
	GtkWidget* _tmp34_;
	GtkListBox* _tmp35_;
	GtkListBox* target_list = NULL;
	LayoutsProjectRow* _tmp36_;
	GtkWidget* _tmp37_;
	GtkWidget* _tmp38_;
	GtkListBox* _tmp39_;
	ObjectsProject* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	ObjectsProject* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	ObjectsProject* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	GtkListBox* _tmp69_;
	LayoutsProjectRow* _tmp70_;
	gint _tmp71_ = 0;
	GtkListBox* _tmp72_;
	LayoutsProjectRow* _tmp73_;
	LayoutsProjectRow* _tmp74_;
	GtkListBox* _tmp75_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (value != NULL, FALSE);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_data20_->self = g_object_ref (self);
	_tmp0_ = *value;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	_data20_->picked_widget = _tmp1_;
	_tmp2_ = _g_object_ref0 (self);
	target_widget = _tmp2_;
	_tmp3_ = services_event_bus_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = target_widget;
	_tmp6_ = _tmp5_->priv->_project;
	_tmp7_ = objects_project_get_source_id (_tmp6_);
	_tmp8_ = _tmp7_;
	g_signal_emit_by_name (_tmp4_, "projects-drag-end", _tmp8_);
	_g_object_unref0 (_tmp4_);
	_tmp9_ = _data20_->picked_widget;
	_tmp10_ = _tmp9_->priv->_project;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	_data20_->picked_project = _tmp11_;
	_tmp12_ = target_widget;
	_tmp13_ = _tmp12_->priv->_project;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	target_project = _tmp14_;
	_tmp16_ = _data20_->picked_widget;
	_tmp17_ = target_widget;
	if (_tmp16_ == _tmp17_) {
		_tmp15_ = TRUE;
	} else {
		LayoutsProjectRow* _tmp18_;
		_tmp18_ = target_widget;
		_tmp15_ = _tmp18_ == NULL;
	}
	if (_tmp15_) {
		result = FALSE;
		_g_object_unref0 (target_project);
		_g_object_unref0 (target_widget);
		block20_data_unref (_data20_);
		_data20_ = NULL;
		return result;
	}
	_tmp19_ = services_settings_get_default ();
	_tmp20_ = _tmp19_;
	_tmp21_ = _tmp20_->settings;
	_tmp22_ = g_settings_get_enum (_tmp21_, "projects-sort-by");
	_g_object_unref0 (_tmp20_);
	projects_sort = _tmp22_;
	if (projects_sort != 0) {
		ServicesSettings* _tmp23_;
		ServicesSettings* _tmp24_;
		GSettings* _tmp25_;
		ServicesEventBus* _tmp26_;
		ServicesEventBus* _tmp27_;
		Util* _tmp28_;
		Util* _tmp29_;
		AdwToast* _tmp30_;
		AdwToast* _tmp31_;
		_tmp23_ = services_settings_get_default ();
		_tmp24_ = _tmp23_;
		_tmp25_ = _tmp24_->settings;
		g_settings_set_enum (_tmp25_, "projects-sort-by", 0);
		_g_object_unref0 (_tmp24_);
		_tmp26_ = services_event_bus_get_default ();
		_tmp27_ = _tmp26_;
		_tmp28_ = util_get_default ();
		_tmp29_ = _tmp28_;
		_tmp30_ = util_create_toast (_tmp29_, _ ("Projects sort changed to 'Custom sort order'"), (guint) 2, ADW_TOAST_PRIORITY_NORMAL);
		_tmp31_ = _tmp30_;
		g_signal_emit_by_name (_tmp27_, "send-toast", _tmp31_);
		_g_object_unref0 (_tmp31_);
		_g_object_unref0 (_tmp29_);
		_g_object_unref0 (_tmp27_);
	}
	_tmp32_ = _data20_->picked_widget;
	_tmp33_ = gtk_widget_get_parent ((GtkWidget*) _tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_list_box_get_type (), GtkListBox));
	source_list = _tmp35_;
	_tmp36_ = target_widget;
	_tmp37_ = gtk_widget_get_parent ((GtkWidget*) _tmp36_);
	_tmp38_ = _tmp37_;
	_tmp39_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_list_box_get_type (), GtkListBox));
	target_list = _tmp39_;
	_tmp40_ = _data20_->picked_project;
	_tmp41_ = objects_project_get_parent_id (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = g_strdup (_tmp42_);
	_data20_->old_parent_id = _tmp43_;
	_tmp44_ = _data20_->picked_project;
	_tmp45_ = objects_project_get_parent_id (_tmp44_);
	_tmp46_ = _tmp45_;
	_tmp47_ = target_project;
	_tmp48_ = objects_project_get_parent_id (_tmp47_);
	_tmp49_ = _tmp48_;
	if (g_strcmp0 (_tmp46_, _tmp49_) != 0) {
		ObjectsProject* _tmp50_;
		ObjectsProject* _tmp51_;
		const gchar* _tmp52_;
		const gchar* _tmp53_;
		ObjectsProject* _tmp54_;
		SourceType _tmp55_;
		SourceType _tmp56_;
		_tmp50_ = _data20_->picked_project;
		_tmp51_ = target_project;
		_tmp52_ = objects_project_get_parent_id (_tmp51_);
		_tmp53_ = _tmp52_;
		objects_project_set_parent_id (_tmp50_, _tmp53_);
		_tmp54_ = _data20_->picked_project;
		_tmp55_ = objects_project_get_source_type (_tmp54_);
		_tmp56_ = _tmp55_;
		if (_tmp56_ == SOURCE_TYPE_TODOIST) {
			ServicesTodoist* _tmp57_;
			ServicesTodoist* _tmp58_;
			ObjectsProject* _tmp59_;
			ObjectsProject* _tmp60_;
			const gchar* _tmp61_;
			const gchar* _tmp62_;
			_tmp57_ = services_todoist_get_default ();
			_tmp58_ = _tmp57_;
			_tmp59_ = _data20_->picked_project;
			_tmp60_ = target_project;
			_tmp61_ = objects_project_get_parent_id (_tmp60_);
			_tmp62_ = _tmp61_;
			services_todoist_move_project_section (_tmp58_, (ObjectsBaseObject*) _tmp59_, _tmp62_, _____lambda233__gasync_ready_callback, block20_data_ref (_data20_));
			_g_object_unref0 (_tmp58_);
		} else {
			ServicesStore* _tmp63_;
			ObjectsProject* _tmp64_;
			ServicesEventBus* _tmp65_;
			ServicesEventBus* _tmp66_;
			LayoutsProjectRow* _tmp67_;
			const gchar* _tmp68_;
			_tmp63_ = services_store_instance ();
			_tmp64_ = _data20_->picked_project;
			services_store_update_project (_tmp63_, _tmp64_);
			_tmp65_ = services_event_bus_get_default ();
			_tmp66_ = _tmp65_;
			_tmp67_ = _data20_->picked_widget;
			_tmp68_ = _data20_->old_parent_id;
			g_signal_emit_by_name (_tmp66_, "update-inserted-project-map", (GtkWidget*) _tmp67_, _tmp68_);
			_g_object_unref0 (_tmp66_);
		}
	}
	_tmp69_ = source_list;
	_tmp70_ = _data20_->picked_widget;
	gtk_list_box_remove (_tmp69_, (GtkWidget*) _tmp70_);
	if (bottom) {
		_tmp71_ = 1;
	} else {
		_tmp71_ = 0;
	}
	_tmp72_ = target_list;
	_tmp73_ = _data20_->picked_widget;
	_tmp74_ = target_widget;
	gtk_list_box_insert (_tmp72_, (GtkWidget*) _tmp73_, gtk_list_box_row_get_index ((GtkListBoxRow*) _tmp74_) + _tmp71_);
	_tmp75_ = target_list;
	layouts_project_row_update_projects_child_order (self, _tmp75_);
	result = TRUE;
	_g_object_unref0 (target_list);
	_g_object_unref0 (source_list);
	_g_object_unref0 (target_project);
	_g_object_unref0 (target_widget);
	block20_data_unref (_data20_);
	_data20_ = NULL;
	return result;
}

static Block21Data*
block21_data_ref (Block21Data* _data21_)
{
	g_atomic_int_inc (&_data21_->_ref_count_);
	return _data21_;
}

static void
block21_data_unref (void * _userdata_)
{
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		LayoutsProjectRow* self;
		self = _data21_->self;
		_g_object_unref0 (_data21_->drop_motion_ctrl);
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}

static void
__lambda7_ (Block21Data* _data21_,
            gdouble x,
            gdouble y)
{
	LayoutsProjectRow* self;
	GdkDrop* drop = NULL;
	GdkDrop* _tmp0_;
	GdkDrop* _tmp1_;
	GError* _inner_error0_ = NULL;
	self = _data21_->self;
	_tmp0_ = gtk_drop_controller_motion_get_drop (_data21_->drop_motion_ctrl);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	drop = _tmp1_;
	{
		GValue value = {0};
		GValue _tmp2_ = {0};
		GdkDrag* _tmp3_;
		GdkDrag* _tmp4_;
		GdkContentProvider* _tmp5_;
		GdkContentProvider* _tmp6_;
		GObject* _tmp7_;
		GObject* _tmp8_;
		gboolean _tmp9_;
		g_value_init (&_tmp2_, gtk_widget_get_type ());
		value = _tmp2_;
		_tmp3_ = gdk_drop_get_drag (drop);
		_tmp4_ = _tmp3_;
		_tmp5_ = gdk_drag_get_content (_tmp4_);
		_tmp6_ = _tmp5_;
		gdk_content_provider_get_value (_tmp6_, &value, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			goto __catch0_g_error;
		}
		_tmp7_ = g_value_dup_object (&value);
		_tmp8_ = _tmp7_;
		_tmp9_ = LAYOUTS_IS_PROJECT_ROW (_tmp8_);
		_g_object_unref0 (_tmp8_);
		if (_tmp9_) {
			LayoutsProjectRow* picked_widget = NULL;
			GValue _tmp10_;
			LayoutsProjectRow* _tmp11_;
			LayoutsProjectRow* _tmp12_;
			ObjectsProject* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			ObjectsProject* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp10_ = value;
			_tmp11_ = _g_object_ref0 (g_value_get_object (&_tmp10_));
			picked_widget = _tmp11_;
			_tmp12_ = picked_widget;
			_tmp13_ = _tmp12_->priv->_project;
			_tmp14_ = objects_project_get_source_id (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = self->priv->_project;
			_tmp17_ = objects_project_get_source_id (_tmp16_);
			_tmp18_ = _tmp17_;
			if (g_strcmp0 (_tmp15_, _tmp18_) == 0) {
				GtkRevealer* _tmp19_;
				gboolean _tmp20_;
				gboolean _tmp21_;
				_tmp19_ = self->priv->motion_top_revealer;
				g_object_get (_data21_->drop_motion_ctrl, "contains-pointer", &_tmp20_, NULL);
				_tmp21_ = _tmp20_;
				gtk_revealer_set_reveal_child (_tmp19_, _tmp21_);
			}
			_g_object_unref0 (picked_widget);
		}
		G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp22_;
		const gchar* _tmp23_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp22_ = e;
		_tmp23_ = _tmp22_->message;
		g_debug ("ProjectRow.vala:490: %s", _tmp23_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (drop);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_object_unref0 (drop);
}

static void
___lambda7__gtk_drop_controller_motion_motion (GtkDropControllerMotion* _sender,
                                               gdouble x,
                                               gdouble y,
                                               gpointer self)
{
	__lambda7_ (self, x, y);
}

static void
__lambda8_ (LayoutsProjectRow* self)
{
	GtkRevealer* _tmp0_;
	_tmp0_ = self->priv->motion_top_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
}

static void
___lambda8__gtk_drop_controller_motion_leave (GtkDropControllerMotion* _sender,
                                              gpointer self)
{
	__lambda8_ ((LayoutsProjectRow*) self);
}

static void
layouts_project_row_build_drop_motion (LayoutsProjectRow* self)
{
	Block21Data* _data21_;
	GtkDropControllerMotion* _tmp0_;
	GtkEventController* _tmp1_;
	GeeHashMap* _tmp2_;
	gulong _tmp3_;
	GeeHashMap* _tmp4_;
	gulong _tmp5_;
	g_return_if_fail (self != NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_tmp0_ = (GtkDropControllerMotion*) gtk_drop_controller_motion_new ();
	_data21_->drop_motion_ctrl = _tmp0_;
	_tmp1_ = _g_object_ref0 ((GtkEventController*) _data21_->drop_motion_ctrl);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp1_);
	_tmp2_ = self->priv->signals_map;
	_tmp3_ = g_signal_connect_data (_data21_->drop_motion_ctrl, "motion", (GCallback) ___lambda7__gtk_drop_controller_motion_motion, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp2_, (gpointer) ((guintptr) _tmp3_), (GObject*) _data21_->drop_motion_ctrl);
	_tmp4_ = self->priv->signals_map;
	_tmp5_ = g_signal_connect_object (_data21_->drop_motion_ctrl, "leave", (GCallback) ___lambda8__gtk_drop_controller_motion_leave, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, (gpointer) ((guintptr) _tmp5_), (GObject*) _data21_->drop_motion_ctrl);
	block21_data_unref (_data21_);
	_data21_ = NULL;
}

static GdkContentProvider*
__lambda9_ (LayoutsProjectRow* self,
            GtkDragSource* source,
            gdouble x,
            gdouble y)
{
	GValue _tmp0_ = {0};
	GdkContentProvider* _tmp1_;
	GdkContentProvider* _tmp2_;
	GdkContentProvider* result;
	g_return_val_if_fail (source != NULL, NULL);
	g_value_init (&_tmp0_, LAYOUTS_TYPE_PROJECT_ROW);
	g_value_set_object (&_tmp0_, self);
	_tmp1_ = gdk_content_provider_new_for_value (&_tmp0_);
	_tmp2_ = _tmp1_;
	G_IS_VALUE (&_tmp0_) ? (g_value_unset (&_tmp0_), NULL) : NULL;
	result = _tmp2_;
	return result;
}

static GdkContentProvider*
___lambda9__gtk_drag_source_prepare (GtkDragSource* _sender,
                                     gdouble x,
                                     gdouble y,
                                     gpointer self)
{
	GdkContentProvider* result;
	result = __lambda9_ ((LayoutsProjectRow*) self, _sender, x, y);
	return result;
}

static void
__lambda10_ (LayoutsProjectRow* self,
             GtkDragSource* source,
             GdkDrag* drag)
{
	GtkWidgetPaintable* paintable = NULL;
	AdwBin* _tmp0_;
	GtkWidgetPaintable* _tmp1_;
	g_return_if_fail (source != NULL);
	g_return_if_fail (drag != NULL);
	_tmp0_ = self->priv->handle_grid;
	_tmp1_ = (GtkWidgetPaintable*) gtk_widget_paintable_new ((GtkWidget*) _tmp0_);
	paintable = _tmp1_;
	gtk_drag_source_set_icon (source, (GdkPaintable*) paintable, 0, 0);
	layouts_project_row_drag_begin (self);
	_g_object_unref0 (paintable);
}

static void
___lambda10__gtk_drag_source_drag_begin (GtkDragSource* _sender,
                                         GdkDrag* drag,
                                         gpointer self)
{
	__lambda10_ ((LayoutsProjectRow*) self, _sender, drag);
}

static gboolean
__lambda11_ (LayoutsProjectRow* self,
             GtkDragSource* source,
             GdkDrag* drag,
             GdkDragCancelReason reason)
{
	gboolean result;
	g_return_val_if_fail (source != NULL, FALSE);
	g_return_val_if_fail (drag != NULL, FALSE);
	layouts_project_row_drag_end (self);
	result = TRUE;
	return result;
}

static gboolean
___lambda11__gtk_drag_source_drag_cancel (GtkDragSource* _sender,
                                          GdkDrag* drag,
                                          GdkDragCancelReason reason,
                                          gpointer self)
{
	gboolean result;
	result = __lambda11_ ((LayoutsProjectRow*) self, _sender, drag, reason);
	return result;
}

static void
__lambda12_ (LayoutsProjectRow* self,
             GtkDragSource* source,
             GdkDrag* drag,
             gboolean delete_data)
{
	g_return_if_fail (source != NULL);
	g_return_if_fail (drag != NULL);
	layouts_project_row_drag_end (self);
}

static void
___lambda12__gtk_drag_source_drag_end (GtkDragSource* _sender,
                                       GdkDrag* drag,
                                       gboolean delete_data,
                                       gpointer self)
{
	__lambda12_ ((LayoutsProjectRow*) self, _sender, drag, delete_data);
}

static void
layouts_project_row_build_drag_source (LayoutsProjectRow* self)
{
	GtkDragSource* drag_source = NULL;
	GtkDragSource* _tmp0_;
	AdwBin* _tmp1_;
	GtkEventController* _tmp2_;
	GeeHashMap* _tmp3_;
	gulong _tmp4_;
	GeeHashMap* _tmp5_;
	gulong _tmp6_;
	GeeHashMap* _tmp7_;
	gulong _tmp8_;
	GeeHashMap* _tmp9_;
	gulong _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_drag_source_new ();
	drag_source = _tmp0_;
	gtk_drag_source_set_actions (drag_source, GDK_ACTION_MOVE);
	_tmp1_ = self->priv->handle_grid;
	_tmp2_ = _g_object_ref0 ((GtkEventController*) drag_source);
	gtk_widget_add_controller ((GtkWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->signals_map;
	_tmp4_ = g_signal_connect_object (drag_source, "prepare", (GCallback) ___lambda9__gtk_drag_source_prepare, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp4_), (GObject*) drag_source);
	_tmp5_ = self->priv->signals_map;
	_tmp6_ = g_signal_connect_object (drag_source, "drag-begin", (GCallback) ___lambda10__gtk_drag_source_drag_begin, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) _tmp6_), (GObject*) drag_source);
	_tmp7_ = self->priv->signals_map;
	_tmp8_ = g_signal_connect_object (drag_source, "drag-cancel", (GCallback) ___lambda11__gtk_drag_source_drag_cancel, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) _tmp8_), (GObject*) drag_source);
	_tmp9_ = self->priv->signals_map;
	_tmp10_ = g_signal_connect_object (drag_source, "drag-end", (GCallback) ___lambda12__gtk_drag_source_drag_end, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, (gpointer) ((guintptr) _tmp10_), (GObject*) drag_source);
	_g_object_unref0 (drag_source);
}

static gboolean
__lambda37_ (LayoutsProjectRow* self,
             GdkDrop* drop)
{
	GValue value = {0};
	GValue _tmp0_ = {0};
	GObject* _tmp8_;
	GObject* _tmp9_;
	gboolean _tmp10_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (drop != NULL, FALSE);
	g_value_init (&_tmp0_, gtk_widget_get_type ());
	value = _tmp0_;
	{
		GdkDrag* _tmp1_;
		GdkDrag* _tmp2_;
		GdkContentProvider* _tmp3_;
		GdkContentProvider* _tmp4_;
		_tmp1_ = gdk_drop_get_drag (drop);
		_tmp2_ = _tmp1_;
		_tmp3_ = gdk_drag_get_content (_tmp2_);
		_tmp4_ = _tmp3_;
		gdk_content_provider_get_value (_tmp4_, &value, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_debug ("ProjectRow.vala:533: %s", _tmp6_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp7_ = FALSE;
		G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp7_;
	}
	_tmp8_ = g_value_dup_object (&value);
	_tmp9_ = _tmp8_;
	_tmp10_ = LAYOUTS_IS_PROJECT_ROW (_tmp9_);
	_g_object_unref0 (_tmp9_);
	if (_tmp10_) {
		LayoutsProjectRow* picked_widget = NULL;
		GValue _tmp11_;
		LayoutsProjectRow* _tmp12_;
		LayoutsProjectRow* _tmp13_;
		ObjectsProject* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		ObjectsProject* _tmp17_;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		_tmp11_ = value;
		_tmp12_ = _g_object_ref0 (g_value_get_object (&_tmp11_));
		picked_widget = _tmp12_;
		_tmp13_ = picked_widget;
		_tmp14_ = _tmp13_->priv->_project;
		_tmp15_ = objects_project_get_source_id (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = self->priv->_project;
		_tmp18_ = objects_project_get_source_id (_tmp17_);
		_tmp19_ = _tmp18_;
		if (g_strcmp0 (_tmp16_, _tmp19_) == 0) {
			result = TRUE;
			_g_object_unref0 (picked_widget);
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			return result;
		}
		_g_object_unref0 (picked_widget);
	}
	result = FALSE;
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	return result;
}

static gboolean
___lambda37__gtk_drop_target_accept (GtkDropTarget* _sender,
                                     GdkDrop* drop,
                                     gpointer self)
{
	gboolean result;
	result = __lambda37_ ((LayoutsProjectRow*) self, drop);
	return result;
}

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		LayoutsProjectRow* self;
		self = _data22_->self;
		_g_free0 (_data22_->old_parent_id);
		_g_object_unref0 (_data22_->picked_project);
		_g_object_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static void
___lambda39_ (Block22Data* _data22_,
              GObject* obj,
              GAsyncResult* res)
{
	LayoutsProjectRow* self;
	ServicesTodoist* _tmp0_;
	ServicesTodoist* _tmp1_;
	HttpResponse* _tmp2_;
	HttpResponse* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	self = _data22_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = services_todoist_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = services_todoist_move_project_section_finish (_tmp1_, res);
	_tmp3_ = _tmp2_;
	_tmp4_ = http_response_get_status (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	_http_response_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	if (_tmp6_) {
		ServicesStore* _tmp7_;
		ObjectsProject* _tmp8_;
		ServicesEventBus* _tmp9_;
		ServicesEventBus* _tmp10_;
		ObjectsProject* _tmp11_;
		const gchar* _tmp12_;
		_tmp7_ = services_store_instance ();
		_tmp8_ = _data22_->picked_project;
		services_store_update_project (_tmp7_, _tmp8_);
		_tmp9_ = services_event_bus_get_default ();
		_tmp10_ = _tmp9_;
		_tmp11_ = _data22_->picked_project;
		_tmp12_ = _data22_->old_parent_id;
		g_signal_emit_by_name (_tmp10_, "project-parent-changed", _tmp11_, _tmp12_, TRUE);
		_g_object_unref0 (_tmp10_);
	}
}

static void
____lambda39__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda39_ (self, source_object, res);
	block22_data_unref (self);
}

static gboolean
__lambda38_ (LayoutsProjectRow* self,
             GValue* value,
             gdouble x,
             gdouble y)
{
	Block22Data* _data22_;
	LayoutsProjectRow* picked_widget = NULL;
	GValue _tmp0_;
	LayoutsProjectRow* _tmp1_;
	LayoutsProjectRow* target_widget = NULL;
	LayoutsProjectRow* _tmp2_;
	ServicesEventBus* _tmp3_;
	ServicesEventBus* _tmp4_;
	LayoutsProjectRow* _tmp5_;
	ObjectsProject* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	LayoutsProjectRow* _tmp9_;
	ObjectsProject* _tmp10_;
	ObjectsProject* _tmp11_;
	ObjectsProject* target_project = NULL;
	LayoutsProjectRow* _tmp12_;
	ObjectsProject* _tmp13_;
	ObjectsProject* _tmp14_;
	gboolean _tmp15_ = FALSE;
	LayoutsProjectRow* _tmp16_;
	LayoutsProjectRow* _tmp17_;
	ObjectsProject* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	ObjectsProject* _tmp23_;
	ObjectsProject* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	ObjectsProject* _tmp27_;
	SourceType _tmp28_;
	SourceType _tmp29_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_data22_->self = g_object_ref (self);
	_tmp0_ = *value;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	picked_widget = _tmp1_;
	_tmp2_ = _g_object_ref0 (self);
	target_widget = _tmp2_;
	_tmp3_ = services_event_bus_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = target_widget;
	_tmp6_ = _tmp5_->priv->_project;
	_tmp7_ = objects_project_get_source_id (_tmp6_);
	_tmp8_ = _tmp7_;
	g_signal_emit_by_name (_tmp4_, "projects-drag-end", _tmp8_);
	_g_object_unref0 (_tmp4_);
	_tmp9_ = picked_widget;
	_tmp10_ = _tmp9_->priv->_project;
	_tmp11_ = _g_object_ref0 (_tmp10_);
	_data22_->picked_project = _tmp11_;
	_tmp12_ = target_widget;
	_tmp13_ = _tmp12_->priv->_project;
	_tmp14_ = _g_object_ref0 (_tmp13_);
	target_project = _tmp14_;
	_tmp16_ = picked_widget;
	_tmp17_ = target_widget;
	if (_tmp16_ == _tmp17_) {
		_tmp15_ = TRUE;
	} else {
		LayoutsProjectRow* _tmp18_;
		_tmp18_ = target_widget;
		_tmp15_ = _tmp18_ == NULL;
	}
	if (_tmp15_) {
		result = FALSE;
		_g_object_unref0 (target_project);
		_g_object_unref0 (target_widget);
		_g_object_unref0 (picked_widget);
		block22_data_unref (_data22_);
		_data22_ = NULL;
		return result;
	}
	_tmp19_ = _data22_->picked_project;
	_tmp20_ = objects_project_get_parent_id (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = g_strdup (_tmp21_);
	_data22_->old_parent_id = _tmp22_;
	_tmp23_ = _data22_->picked_project;
	_tmp24_ = target_project;
	_tmp25_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp24_);
	_tmp26_ = _tmp25_;
	objects_project_set_parent_id (_tmp23_, _tmp26_);
	_tmp27_ = _data22_->picked_project;
	_tmp28_ = objects_project_get_source_type (_tmp27_);
	_tmp29_ = _tmp28_;
	if (_tmp29_ == SOURCE_TYPE_TODOIST) {
		ServicesTodoist* _tmp30_;
		ServicesTodoist* _tmp31_;
		ObjectsProject* _tmp32_;
		ObjectsProject* _tmp33_;
		const gchar* _tmp34_;
		const gchar* _tmp35_;
		_tmp30_ = services_todoist_get_default ();
		_tmp31_ = _tmp30_;
		_tmp32_ = _data22_->picked_project;
		_tmp33_ = target_project;
		_tmp34_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp33_);
		_tmp35_ = _tmp34_;
		services_todoist_move_project_section (_tmp31_, (ObjectsBaseObject*) _tmp32_, _tmp35_, ____lambda39__gasync_ready_callback, block22_data_ref (_data22_));
		_g_object_unref0 (_tmp31_);
	} else {
		ServicesStore* _tmp36_;
		ObjectsProject* _tmp37_;
		ServicesEventBus* _tmp38_;
		ServicesEventBus* _tmp39_;
		ObjectsProject* _tmp40_;
		const gchar* _tmp41_;
		_tmp36_ = services_store_instance ();
		_tmp37_ = _data22_->picked_project;
		services_store_update_project (_tmp36_, _tmp37_);
		_tmp38_ = services_event_bus_get_default ();
		_tmp39_ = _tmp38_;
		_tmp40_ = _data22_->picked_project;
		_tmp41_ = _data22_->old_parent_id;
		g_signal_emit_by_name (_tmp39_, "project-parent-changed", _tmp40_, _tmp41_, TRUE);
		_g_object_unref0 (_tmp39_);
	}
	result = TRUE;
	_g_object_unref0 (target_project);
	_g_object_unref0 (target_widget);
	_g_object_unref0 (picked_widget);
	block22_data_unref (_data22_);
	_data22_ = NULL;
	return result;
}

static gboolean
___lambda38__gtk_drop_target_drop (GtkDropTarget* _sender,
                                   GValue* value,
                                   gdouble x,
                                   gdouble y,
                                   gpointer self)
{
	gboolean result;
	result = __lambda38_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static void
layouts_project_row_build_drop_project_target (LayoutsProjectRow* self)
{
	GtkDropTarget* drop_target = NULL;
	GtkDropTarget* _tmp0_;
	AdwBin* _tmp1_;
	GtkEventController* _tmp2_;
	GeeHashMap* _tmp3_;
	gulong _tmp4_;
	GeeHashMap* _tmp5_;
	gulong _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_drop_target_new (LAYOUTS_TYPE_PROJECT_ROW, GDK_ACTION_MOVE);
	drop_target = _tmp0_;
	_tmp1_ = self->priv->handle_grid;
	_tmp2_ = _g_object_ref0 ((GtkEventController*) drop_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->signals_map;
	_tmp4_ = g_signal_connect_object (drop_target, "accept", (GCallback) ___lambda37__gtk_drop_target_accept, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp4_), (GObject*) drop_target);
	_tmp5_ = self->priv->signals_map;
	_tmp6_ = g_signal_connect_object (drop_target, "drop", (GCallback) ___lambda38__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) _tmp6_), (GObject*) drop_target);
	_g_object_unref0 (drop_target);
}

static gboolean
__lambda228_ (LayoutsProjectRow* self,
              GdkDrop* drop)
{
	LayoutsProjectRow* target_widget = NULL;
	LayoutsProjectRow* _tmp0_;
	LayoutsProjectRow* _tmp1_;
	ObjectsProject* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GValue value = {0};
	GValue _tmp5_ = {0};
	GObject* _tmp13_;
	GObject* _tmp14_;
	gboolean _tmp15_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (drop != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (self);
	target_widget = _tmp0_;
	_tmp1_ = target_widget;
	_tmp2_ = _tmp1_->priv->_project;
	_tmp3_ = objects_project_get_is_deck (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		result = FALSE;
		_g_object_unref0 (target_widget);
		return result;
	}
	g_value_init (&_tmp5_, gtk_widget_get_type ());
	value = _tmp5_;
	{
		GdkDrag* _tmp6_;
		GdkDrag* _tmp7_;
		GdkContentProvider* _tmp8_;
		GdkContentProvider* _tmp9_;
		_tmp6_ = gdk_drop_get_drag (drop);
		_tmp7_ = _tmp6_;
		_tmp8_ = gdk_drag_get_content (_tmp7_);
		_tmp9_ = _tmp8_;
		gdk_content_provider_get_value (_tmp9_, &value, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp10_;
		const gchar* _tmp11_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp10_ = e;
		_tmp11_ = _tmp10_->message;
		g_debug ("ProjectRow.vala:594: %s", _tmp11_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp12_ = FALSE;
		G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
		_g_object_unref0 (target_widget);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp12_;
	}
	_tmp13_ = g_value_dup_object (&value);
	_tmp14_ = _tmp13_;
	_tmp15_ = LAYOUTS_IS_ITEM_ROW (_tmp14_);
	_g_object_unref0 (_tmp14_);
	if (_tmp15_) {
		LayoutsItemRow* picked_widget = NULL;
		GValue _tmp16_;
		LayoutsItemRow* _tmp17_;
		LayoutsItemRow* _tmp18_;
		ObjectsItem* _tmp19_;
		ObjectsItem* _tmp20_;
		ObjectsProject* _tmp21_;
		ObjectsProject* _tmp22_;
		gboolean _tmp23_;
		gboolean _tmp24_;
		LayoutsItemRow* _tmp25_;
		ObjectsItem* _tmp26_;
		ObjectsItem* _tmp27_;
		ObjectsProject* _tmp28_;
		ObjectsProject* _tmp29_;
		const gchar* _tmp30_;
		const gchar* _tmp31_;
		ObjectsProject* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		_tmp16_ = value;
		_tmp17_ = _g_object_ref0 (g_value_get_object (&_tmp16_));
		picked_widget = _tmp17_;
		_tmp18_ = picked_widget;
		_tmp19_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = objects_item_get_project (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = objects_project_get_is_inbox_project (_tmp22_);
		_tmp24_ = _tmp23_;
		if (_tmp24_) {
			result = TRUE;
			_g_object_unref0 (picked_widget);
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			_g_object_unref0 (target_widget);
			return result;
		}
		_tmp25_ = picked_widget;
		_tmp26_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = objects_item_get_project (_tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = objects_project_get_source_id (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = self->priv->_project;
		_tmp33_ = objects_project_get_source_id (_tmp32_);
		_tmp34_ = _tmp33_;
		if (g_strcmp0 (_tmp31_, _tmp34_) == 0) {
			result = TRUE;
			_g_object_unref0 (picked_widget);
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			_g_object_unref0 (target_widget);
			return result;
		}
		_g_object_unref0 (picked_widget);
	}
	result = FALSE;
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	_g_object_unref0 (target_widget);
	return result;
}

static gboolean
___lambda228__gtk_drop_target_accept (GtkDropTarget* _sender,
                                      GdkDrop* drop,
                                      gpointer self)
{
	gboolean result;
	result = __lambda228_ ((LayoutsProjectRow*) self, drop);
	return result;
}

static gboolean
__lambda229_ (LayoutsProjectRow* self,
              GValue* value,
              gdouble x,
              gdouble y)
{
	LayoutsItemBoard* picked_widget = NULL;
	GValue _tmp0_;
	LayoutsItemBoard* _tmp1_;
	LayoutsProjectRow* target_widget = NULL;
	LayoutsProjectRow* _tmp2_;
	LayoutsItemBoard* _tmp3_;
	ObjectsItem* _tmp4_;
	ObjectsItem* _tmp5_;
	ObjectsProject* _tmp6_;
	ObjectsProject* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	LayoutsProjectRow* _tmp10_;
	ObjectsProject* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = *value;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	picked_widget = _tmp1_;
	_tmp2_ = _g_object_ref0 (self);
	target_widget = _tmp2_;
	_tmp3_ = picked_widget;
	_tmp4_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = objects_item_get_project (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = objects_project_get_source_id (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = target_widget;
	_tmp11_ = _tmp10_->priv->_project;
	_tmp12_ = objects_project_get_source_id (_tmp11_);
	_tmp13_ = _tmp12_;
	if (g_strcmp0 (_tmp9_, _tmp13_) != 0) {
		Util* _tmp14_;
		Util* _tmp15_;
		LayoutsItemBoard* _tmp16_;
		ObjectsItem* _tmp17_;
		ObjectsItem* _tmp18_;
		LayoutsProjectRow* _tmp19_;
		ObjectsProject* _tmp20_;
		_tmp14_ = util_get_default ();
		_tmp15_ = _tmp14_;
		_tmp16_ = picked_widget;
		_tmp17_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = target_widget;
		_tmp20_ = _tmp19_->priv->_project;
		util_move_backend_type_item (_tmp15_, _tmp18_, _tmp20_, "", TRUE, NULL, NULL);
		_g_object_unref0 (_tmp15_);
	} else {
		LayoutsItemBoard* _tmp21_;
		ObjectsItem* _tmp22_;
		ObjectsItem* _tmp23_;
		LayoutsProjectRow* _tmp24_;
		ObjectsProject* _tmp25_;
		_tmp21_ = picked_widget;
		_tmp22_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = target_widget;
		_tmp25_ = _tmp24_->priv->_project;
		objects_item_move (_tmp23_, _tmp25_, "", TRUE);
	}
	result = TRUE;
	_g_object_unref0 (target_widget);
	_g_object_unref0 (picked_widget);
	return result;
}

static gboolean
___lambda229__gtk_drop_target_drop (GtkDropTarget* _sender,
                                    GValue* value,
                                    gdouble x,
                                    gdouble y,
                                    gpointer self)
{
	gboolean result;
	result = __lambda229_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static gboolean
__lambda230_ (LayoutsProjectRow* self,
              GdkDrop* drop)
{
	GValue value = {0};
	GValue _tmp0_ = {0};
	GObject* _tmp8_;
	GObject* _tmp9_;
	gboolean _tmp10_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (drop != NULL, FALSE);
	g_value_init (&_tmp0_, gtk_widget_get_type ());
	value = _tmp0_;
	{
		GdkDrag* _tmp1_;
		GdkDrag* _tmp2_;
		GdkContentProvider* _tmp3_;
		GdkContentProvider* _tmp4_;
		_tmp1_ = gdk_drop_get_drag (drop);
		_tmp2_ = _tmp1_;
		_tmp3_ = gdk_drag_get_content (_tmp2_);
		_tmp4_ = _tmp3_;
		gdk_content_provider_get_value (_tmp4_, &value, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_debug ("ProjectRow.vala:633: %s", _tmp6_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp7_ = FALSE;
		G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp7_;
	}
	_tmp8_ = g_value_dup_object (&value);
	_tmp9_ = _tmp8_;
	_tmp10_ = LAYOUTS_IS_ITEM_BOARD (_tmp9_);
	_g_object_unref0 (_tmp9_);
	if (_tmp10_) {
		LayoutsItemBoard* picked_widget = NULL;
		GValue _tmp11_;
		LayoutsItemBoard* _tmp12_;
		LayoutsItemBoard* _tmp13_;
		ObjectsItem* _tmp14_;
		ObjectsItem* _tmp15_;
		ObjectsProject* _tmp16_;
		ObjectsProject* _tmp17_;
		gboolean _tmp18_;
		gboolean _tmp19_;
		LayoutsItemBoard* _tmp20_;
		ObjectsItem* _tmp21_;
		ObjectsItem* _tmp22_;
		ObjectsProject* _tmp23_;
		ObjectsProject* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		ObjectsProject* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		_tmp11_ = value;
		_tmp12_ = _g_object_ref0 (g_value_get_object (&_tmp11_));
		picked_widget = _tmp12_;
		_tmp13_ = picked_widget;
		_tmp14_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = objects_item_get_project (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = objects_project_get_is_inbox_project (_tmp17_);
		_tmp19_ = _tmp18_;
		if (_tmp19_) {
			result = TRUE;
			_g_object_unref0 (picked_widget);
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			return result;
		}
		_tmp20_ = picked_widget;
		_tmp21_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = objects_item_get_project (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = objects_project_get_source_id (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp27_ = self->priv->_project;
		_tmp28_ = objects_project_get_source_id (_tmp27_);
		_tmp29_ = _tmp28_;
		if (g_strcmp0 (_tmp26_, _tmp29_) == 0) {
			result = TRUE;
			_g_object_unref0 (picked_widget);
			G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
			return result;
		}
		_g_object_unref0 (picked_widget);
	}
	result = FALSE;
	G_IS_VALUE (&value) ? (g_value_unset (&value), NULL) : NULL;
	return result;
}

static gboolean
___lambda230__gtk_drop_target_accept (GtkDropTarget* _sender,
                                      GdkDrop* drop,
                                      gpointer self)
{
	gboolean result;
	result = __lambda230_ ((LayoutsProjectRow*) self, drop);
	return result;
}

static gboolean
__lambda231_ (LayoutsProjectRow* self,
              GValue* value,
              gdouble x,
              gdouble y)
{
	LayoutsItemBoard* picked_widget = NULL;
	GValue _tmp0_;
	LayoutsItemBoard* _tmp1_;
	LayoutsProjectRow* target_widget = NULL;
	LayoutsProjectRow* _tmp2_;
	LayoutsItemBoard* _tmp3_;
	ObjectsItem* _tmp4_;
	ObjectsItem* _tmp5_;
	ObjectsProject* _tmp6_;
	ObjectsProject* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	LayoutsProjectRow* _tmp10_;
	ObjectsProject* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = *value;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	picked_widget = _tmp1_;
	_tmp2_ = _g_object_ref0 (self);
	target_widget = _tmp2_;
	_tmp3_ = picked_widget;
	_tmp4_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = objects_item_get_project (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = objects_project_get_source_id (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = target_widget;
	_tmp11_ = _tmp10_->priv->_project;
	_tmp12_ = objects_project_get_source_id (_tmp11_);
	_tmp13_ = _tmp12_;
	if (g_strcmp0 (_tmp9_, _tmp13_) != 0) {
		Util* _tmp14_;
		Util* _tmp15_;
		LayoutsItemBoard* _tmp16_;
		ObjectsItem* _tmp17_;
		ObjectsItem* _tmp18_;
		LayoutsProjectRow* _tmp19_;
		ObjectsProject* _tmp20_;
		_tmp14_ = util_get_default ();
		_tmp15_ = _tmp14_;
		_tmp16_ = picked_widget;
		_tmp17_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = target_widget;
		_tmp20_ = _tmp19_->priv->_project;
		util_move_backend_type_item (_tmp15_, _tmp18_, _tmp20_, "", TRUE, NULL, NULL);
		_g_object_unref0 (_tmp15_);
	} else {
		LayoutsItemBoard* _tmp21_;
		ObjectsItem* _tmp22_;
		ObjectsItem* _tmp23_;
		LayoutsProjectRow* _tmp24_;
		ObjectsProject* _tmp25_;
		_tmp21_ = picked_widget;
		_tmp22_ = layouts_item_base_get_item ((LayoutsItemBase*) _tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = target_widget;
		_tmp25_ = _tmp24_->priv->_project;
		objects_item_move (_tmp23_, _tmp25_, "", TRUE);
	}
	result = TRUE;
	_g_object_unref0 (target_widget);
	_g_object_unref0 (picked_widget);
	return result;
}

static gboolean
___lambda231__gtk_drop_target_drop (GtkDropTarget* _sender,
                                    GValue* value,
                                    gdouble x,
                                    gdouble y,
                                    gpointer self)
{
	gboolean result;
	result = __lambda231_ ((LayoutsProjectRow*) self, value, x, y);
	return result;
}

static void
layouts_project_row_build_drop_item_target (LayoutsProjectRow* self)
{
	GtkDropTarget* drop_row_target = NULL;
	GtkDropTarget* _tmp0_;
	AdwBin* _tmp1_;
	GtkEventController* _tmp2_;
	GeeHashMap* _tmp3_;
	gulong _tmp4_;
	GeeHashMap* _tmp5_;
	gulong _tmp6_;
	GtkDropTarget* drop_board_target = NULL;
	GtkDropTarget* _tmp7_;
	AdwBin* _tmp8_;
	GtkEventController* _tmp9_;
	GeeHashMap* _tmp10_;
	gulong _tmp11_;
	GeeHashMap* _tmp12_;
	gulong _tmp13_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_drop_target_new (LAYOUTS_TYPE_ITEM_ROW, GDK_ACTION_MOVE);
	drop_row_target = _tmp0_;
	_tmp1_ = self->priv->handle_grid;
	_tmp2_ = _g_object_ref0 ((GtkEventController*) drop_row_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp1_, _tmp2_);
	_tmp3_ = self->priv->signals_map;
	_tmp4_ = g_signal_connect_object (drop_row_target, "accept", (GCallback) ___lambda228__gtk_drop_target_accept, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp4_), (GObject*) drop_row_target);
	_tmp5_ = self->priv->signals_map;
	_tmp6_ = g_signal_connect_object (drop_row_target, "drop", (GCallback) ___lambda229__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) _tmp6_), (GObject*) drop_row_target);
	_tmp7_ = gtk_drop_target_new (LAYOUTS_TYPE_ITEM_BOARD, GDK_ACTION_MOVE);
	drop_board_target = _tmp7_;
	_tmp8_ = self->priv->handle_grid;
	_tmp9_ = _g_object_ref0 ((GtkEventController*) drop_board_target);
	gtk_widget_add_controller ((GtkWidget*) _tmp8_, _tmp9_);
	_tmp10_ = self->priv->signals_map;
	_tmp11_ = g_signal_connect_object (drop_board_target, "accept", (GCallback) ___lambda230__gtk_drop_target_accept, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp10_, (gpointer) ((guintptr) _tmp11_), (GObject*) drop_board_target);
	_tmp12_ = self->priv->signals_map;
	_tmp13_ = g_signal_connect_object (drop_board_target, "drop", (GCallback) ___lambda231__gtk_drop_target_drop, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, (gpointer) ((guintptr) _tmp13_), (GObject*) drop_board_target);
	_g_object_unref0 (drop_board_target);
	_g_object_unref0 (drop_row_target);
}

void
layouts_project_row_drag_begin (LayoutsProjectRow* self)
{
	AdwBin* _tmp0_;
	GtkRevealer* _tmp1_;
	GtkRevealer* _tmp2_;
	ServicesEventBus* _tmp3_;
	ServicesEventBus* _tmp4_;
	ObjectsProject* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->handle_grid;
	gtk_widget_add_css_class ((GtkWidget*) _tmp0_, "drop-begin");
	_tmp1_ = self->main_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, FALSE);
	_tmp2_ = self->priv->listbox_revealer;
	gtk_revealer_set_reveal_child (_tmp2_, FALSE);
	_tmp3_ = services_event_bus_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = self->priv->_project;
	_tmp6_ = objects_project_get_source_id (_tmp5_);
	_tmp7_ = _tmp6_;
	g_signal_emit_by_name (_tmp4_, "projects-drag-begin", _tmp7_);
	_g_object_unref0 (_tmp4_);
}

void
layouts_project_row_drag_end (LayoutsProjectRow* self)
{
	AdwBin* _tmp0_;
	GtkRevealer* _tmp1_;
	GtkRevealer* _tmp2_;
	ObjectsProject* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	ServicesEventBus* _tmp6_;
	ServicesEventBus* _tmp7_;
	ObjectsProject* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->handle_grid;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp0_, "drop-begin");
	_tmp1_ = self->main_revealer;
	gtk_revealer_set_reveal_child (_tmp1_, TRUE);
	_tmp2_ = self->priv->listbox_revealer;
	_tmp3_ = self->priv->_project;
	_tmp4_ = objects_project_get_collapsed (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_revealer_set_reveal_child (_tmp2_, _tmp5_);
	_tmp6_ = services_event_bus_get_default ();
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_project;
	_tmp9_ = objects_project_get_source_id (_tmp8_);
	_tmp10_ = _tmp9_;
	g_signal_emit_by_name (_tmp7_, "projects-drag-end", _tmp10_);
	_g_object_unref0 (_tmp7_);
}

static void
layouts_project_row_update_projects_child_order (LayoutsProjectRow* self,
                                                 GtkListBox* listbox)
{
	LayoutsProjectRow* project_row = NULL;
	gint row_index = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (listbox != NULL);
	project_row = NULL;
	row_index = 0;
	{
		gboolean _tmp0_ = FALSE;
		_tmp0_ = TRUE;
		while (TRUE) {
			GtkListBoxRow* _tmp2_;
			LayoutsProjectRow* _tmp3_;
			gint _tmp9_;
			if (!_tmp0_) {
				LayoutsProjectRow* _tmp1_;
				_tmp1_ = project_row;
				if (!(_tmp1_ != NULL)) {
					break;
				}
			}
			_tmp0_ = FALSE;
			_tmp2_ = gtk_list_box_get_row_at_index (listbox, row_index);
			project_row = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow);
			_tmp3_ = project_row;
			if (_tmp3_ != NULL) {
				LayoutsProjectRow* _tmp4_;
				ObjectsProject* _tmp5_;
				ServicesStore* _tmp6_;
				LayoutsProjectRow* _tmp7_;
				ObjectsProject* _tmp8_;
				_tmp4_ = project_row;
				_tmp5_ = _tmp4_->priv->_project;
				objects_project_set_child_order (_tmp5_, row_index);
				_tmp6_ = services_store_instance ();
				_tmp7_ = project_row;
				_tmp8_ = _tmp7_->priv->_project;
				services_store_update_project (_tmp6_, _tmp8_);
			}
			_tmp9_ = row_index;
			row_index = _tmp9_ + 1;
		}
	}
}

static void
__lambda235_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	ObjectsProject* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	ServicesStore* _tmp4_;
	ObjectsProject* _tmp5_;
	ServicesEventBus* _tmp6_;
	ServicesEventBus* _tmp7_;
	ObjectsProject* _tmp8_;
	ObjectsProject* _tmp9_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = self->priv->_project;
	_tmp2_ = objects_project_get_is_favorite (_tmp1_);
	_tmp3_ = _tmp2_;
	objects_project_set_is_favorite (_tmp0_, !_tmp3_);
	_tmp4_ = services_store_instance ();
	_tmp5_ = self->priv->_project;
	services_store_update_project (_tmp4_, _tmp5_);
	_tmp6_ = services_event_bus_get_default ();
	_tmp7_ = _tmp6_;
	_tmp8_ = self->priv->_project;
	g_signal_emit_by_name (_tmp7_, "favorite-toggled", _tmp8_);
	_g_object_unref0 (_tmp7_);
	_tmp9_ = self->priv->_project;
	objects_project_update (_tmp9_, TRUE, TRUE);
}

static void
___lambda235__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda235_ ((LayoutsProjectRow*) self);
}

static void
__lambda236_ (LayoutsProjectRow* self)
{
	DialogsProject* dialog = NULL;
	ObjectsProject* _tmp0_;
	DialogsProject* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = dialogs_project_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	_tmp2_ = planify__instance;
	_tmp3_ = _tmp2_->main_window;
	adw_dialog_present ((AdwDialog*) dialog, (GtkWidget*) _tmp3_);
	_g_object_unref0 (dialog);
}

static void
___lambda236__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda236_ ((LayoutsProjectRow*) self);
}

static void
__lambda237_ (LayoutsProjectRow* self)
{
	layouts_project_row_sync_project (self);
}

static void
___lambda237__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda237_ ((LayoutsProjectRow*) self);
}

static void
__lambda238_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	Planify* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = planify_get_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->main_window;
	objects_project_delete_project (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow));
}

static void
___lambda238__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda238_ ((LayoutsProjectRow*) self);
}

static void
__lambda239_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	_tmp0_ = self->priv->_project;
	objects_project_share_markdown (_tmp0_);
}

static void
___lambda239__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda239_ ((LayoutsProjectRow*) self);
}

static void
__lambda240_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	_tmp0_ = self->priv->_project;
	objects_project_share_mail (_tmp0_);
}

static void
___lambda240__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda240_ ((LayoutsProjectRow*) self);
}

static Block23Data*
block23_data_ref (Block23Data* _data23_)
{
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}

static void
block23_data_unref (void * _userdata_)
{
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		LayoutsProjectRow* self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->file_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}

static void
__lambda242_ (Block23Data* _data23_,
              GObject* obj,
              GAsyncResult* res)
{
	LayoutsProjectRow* self;
	GError* _inner_error0_ = NULL;
	self = _data23_->self;
	g_return_if_fail (res != NULL);
	{
		GFile* file = NULL;
		GFile* _tmp0_;
		ServicesExportService* _tmp1_;
		ServicesExportService* _tmp2_;
		ObjectsProject* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		ServicesEventBus* _tmp6_;
		ServicesEventBus* _tmp7_;
		Util* _tmp8_;
		Util* _tmp9_;
		AdwToast* _tmp10_;
		AdwToast* _tmp11_;
		_tmp0_ = gtk_file_dialog_save_finish (_data23_->file_dialog, res, &_inner_error0_);
		file = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = services_export_service_get_default ();
		_tmp2_ = _tmp1_;
		_tmp3_ = self->priv->_project;
		_tmp4_ = g_file_get_path (file);
		_tmp5_ = _tmp4_;
		services_export_service_export_project_pdf (_tmp2_, _tmp3_, _tmp5_);
		_g_free0 (_tmp5_);
		_g_object_unref0 (_tmp2_);
		_tmp6_ = services_event_bus_get_default ();
		_tmp7_ = _tmp6_;
		_tmp8_ = util_get_default ();
		_tmp9_ = _tmp8_;
		_tmp10_ = util_create_toast (_tmp9_, _ ("Project exported as PDF"), (guint) 2, ADW_TOAST_PRIORITY_NORMAL);
		_tmp11_ = _tmp10_;
		g_signal_emit_by_name (_tmp7_, "send-toast", _tmp11_);
		_g_object_unref0 (_tmp11_);
		_g_object_unref0 (_tmp9_);
		_g_object_unref0 (_tmp7_);
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp12_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp12_ = e;
		if (!g_error_matches (_tmp12_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
			GError* _tmp13_;
			const gchar* _tmp14_;
			_tmp13_ = e;
			_tmp14_ = _tmp13_->message;
			g_warning ("ProjectRow.vala:798: Error exporting PDF: %s", _tmp14_);
		}
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda242__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda242_ (self, source_object, res);
	block23_data_unref (self);
}

static void
__lambda241_ (LayoutsProjectRow* self)
{
	Block23Data* _data23_;
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GtkFileDialog* _tmp4_ = NULL;
	Planify* _tmp5_;
	MainWindow* _tmp6_;
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup_printf ("%s.pdf", _tmp2_);
	_tmp4_ = gtk_file_dialog_new ();
	gtk_file_dialog_set_initial_name (_tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	_data23_->file_dialog = _tmp4_;
	_tmp5_ = planify__instance;
	_tmp6_ = _tmp5_->main_window;
	gtk_file_dialog_save (_data23_->file_dialog, (GtkWindow*) _tmp6_, NULL, ___lambda242__gasync_ready_callback, block23_data_ref (_data23_));
	block23_data_unref (_data23_);
	_data23_ = NULL;
}

static void
___lambda241__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda241_ ((LayoutsProjectRow*) self);
}

static void
__lambda244_ (LayoutsProjectRow* self)
{
	Util* _tmp0_;
	Util* _tmp1_;
	ObjectsProject* _tmp2_;
	ObjectsProject* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	_tmp0_ = util_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_project;
	_tmp3_ = self->priv->_project;
	_tmp4_ = objects_project_get_parent_id (_tmp3_);
	_tmp5_ = _tmp4_;
	util_duplicate_project (_tmp1_, _tmp2_, _tmp5_, NULL, NULL);
	_g_object_unref0 (_tmp1_);
}

static void
___lambda244__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda244_ ((LayoutsProjectRow*) self);
}

static void
__lambda245_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	Planify* _tmp1_;
	Planify* _tmp2_;
	MainWindow* _tmp3_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = planify_get_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->main_window;
	objects_project_archive_project (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_window_get_type (), GtkWindow));
}

static void
___lambda245__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda245_ ((LayoutsProjectRow*) self);
}

static void
layouts_project_row_build_context_menu (LayoutsProjectRow* self,
                                        gdouble x,
                                        gdouble y)
{
	GtkPopover* _tmp0_;
	const gchar* _tmp9_ = NULL;
	ObjectsProject* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	WidgetsContextMenuMenuItem* _tmp13_;
	WidgetsContextMenuMenuItem* edit_item = NULL;
	WidgetsContextMenuMenuItem* _tmp14_;
	WidgetsContextMenuMenuItem* duplicate_item = NULL;
	WidgetsContextMenuMenuItem* _tmp15_;
	WidgetsContextMenuMenuItem* refresh_item = NULL;
	WidgetsContextMenuMenuItem* _tmp16_;
	WidgetsContextMenuMenuItem* archive_item = NULL;
	WidgetsContextMenuMenuItem* _tmp17_;
	WidgetsContextMenuMenuItem* delete_item = NULL;
	WidgetsContextMenuMenuItem* _tmp18_;
	WidgetsContextMenuMenuItem* _tmp19_;
	WidgetsContextMenuMenuItem* share_markdown_item = NULL;
	WidgetsContextMenuMenuItem* _tmp20_;
	WidgetsContextMenuMenuItem* share_email_item = NULL;
	WidgetsContextMenuMenuItem* _tmp21_;
	WidgetsContextMenuMenuItem* export_pdf_item = NULL;
	WidgetsContextMenuMenuItem* _tmp22_;
	GtkBox* menu_box = NULL;
	GtkBox* _tmp23_;
	GtkBox* _tmp24_;
	GtkBox* _tmp25_;
	GtkBox* _tmp26_;
	WidgetsContextMenuMenuItem* _tmp27_;
	gboolean _tmp28_ = FALSE;
	ObjectsProject* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	GtkBox* _tmp37_;
	WidgetsContextMenuMenuItem* _tmp38_;
	GtkBox* _tmp39_;
	WidgetsContextMenuMenuSeparator* _tmp40_;
	WidgetsContextMenuMenuSeparator* _tmp41_;
	gboolean _tmp42_ = FALSE;
	ObjectsProject* _tmp43_;
	SourceType _tmp44_;
	SourceType _tmp45_;
	GtkBox* _tmp54_;
	WidgetsContextMenuMenuItem* _tmp55_;
	GtkBox* _tmp56_;
	WidgetsContextMenuMenuItem* _tmp57_;
	GtkBox* _tmp58_;
	WidgetsContextMenuMenuItem* _tmp59_;
	ObjectsProject* _tmp60_;
	gboolean _tmp61_;
	gboolean _tmp62_;
	GtkBox* _tmp73_;
	GtkWidget* _tmp74_;
	GtkPopover* _tmp75_ = NULL;
	GtkPopover* _tmp76_;
	GtkPopover* _tmp77_;
	GdkRectangle _tmp78_ = {0};
	GtkPopover* _tmp79_;
	WidgetsContextMenuMenuItem* _tmp80_;
	WidgetsContextMenuMenuItem* _tmp81_;
	WidgetsContextMenuMenuItem* _tmp82_;
	WidgetsContextMenuMenuItem* _tmp83_;
	WidgetsContextMenuMenuItem* _tmp84_;
	WidgetsContextMenuMenuItem* _tmp85_;
	WidgetsContextMenuMenuItem* _tmp86_;
	WidgetsContextMenuMenuItem* _tmp87_;
	WidgetsContextMenuMenuItem* _tmp88_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->menu_popover;
	if (_tmp0_ != NULL) {
		const gchar* _tmp1_ = NULL;
		ObjectsProject* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		WidgetsContextMenuMenuItem* _tmp5_;
		GtkPopover* _tmp6_;
		GdkRectangle _tmp7_ = {0};
		GtkPopover* _tmp8_;
		_tmp2_ = self->priv->_project;
		_tmp3_ = objects_project_get_is_favorite (_tmp2_);
		_tmp4_ = _tmp3_;
		if (_tmp4_) {
			_tmp1_ = _ ("Remove From Favorites");
		} else {
			_tmp1_ = _ ("Add to Favorites");
		}
		_tmp5_ = self->priv->favorite_item;
		widgets_context_menu_menu_item_set_title (_tmp5_, _tmp1_);
		_tmp6_ = self->priv->menu_popover;
		_tmp7_.x = (gint) x;
		_tmp7_.y = (gint) y;
		_tmp7_.width = 1;
		_tmp7_.height = 1;
		g_object_set (_tmp6_, "pointing-to", &_tmp7_, NULL);
		_tmp8_ = self->priv->menu_popover;
		gtk_popover_popup (_tmp8_);
		return;
	}
	_tmp10_ = self->priv->_project;
	_tmp11_ = objects_project_get_is_favorite (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_) {
		_tmp9_ = _ ("Remove From Favorites");
	} else {
		_tmp9_ = _ ("Add to Favorites");
	}
	_tmp13_ = widgets_context_menu_menu_item_new (_tmp9_, "star-outline-thick-symbolic");
	g_object_ref_sink (_tmp13_);
	_g_object_unref0 (self->priv->favorite_item);
	self->priv->favorite_item = _tmp13_;
	_tmp14_ = widgets_context_menu_menu_item_new (_ ("Edit Project"), "edit-symbolic");
	g_object_ref_sink (_tmp14_);
	edit_item = _tmp14_;
	_tmp15_ = widgets_context_menu_menu_item_new (_ ("Duplicate"), "tabs-stack-symbolic");
	g_object_ref_sink (_tmp15_);
	duplicate_item = _tmp15_;
	_tmp16_ = widgets_context_menu_menu_item_new (_ ("Refresh"), "update-symbolic");
	g_object_ref_sink (_tmp16_);
	refresh_item = _tmp16_;
	_tmp17_ = widgets_context_menu_menu_item_new (_ ("Archive"), "shoe-box-symbolic");
	g_object_ref_sink (_tmp17_);
	archive_item = _tmp17_;
	_tmp18_ = widgets_context_menu_menu_item_new (_ ("Delete Project"), "user-trash-symbolic");
	g_object_ref_sink (_tmp18_);
	delete_item = _tmp18_;
	_tmp19_ = delete_item;
	gtk_widget_add_css_class ((GtkWidget*) _tmp19_, "menu-item-danger");
	_tmp20_ = widgets_context_menu_menu_item_new (_ ("Share"), "share-alt-symbolic");
	g_object_ref_sink (_tmp20_);
	share_markdown_item = _tmp20_;
	_tmp21_ = widgets_context_menu_menu_item_new (_ ("Send by E-Mail"), "mail-symbolic");
	g_object_ref_sink (_tmp21_);
	share_email_item = _tmp21_;
	_tmp22_ = widgets_context_menu_menu_item_new (_ ("Export as PDF"), "paper-symbolic");
	g_object_ref_sink (_tmp22_);
	export_pdf_item = _tmp22_;
	_tmp23_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp23_);
	menu_box = _tmp23_;
	_tmp24_ = menu_box;
	_tmp25_ = menu_box;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp25_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp24_, 3);
	_tmp26_ = menu_box;
	_tmp27_ = self->priv->favorite_item;
	gtk_box_append (_tmp26_, (GtkWidget*) _tmp27_);
	_tmp29_ = self->priv->_project;
	_tmp30_ = objects_project_get_is_deck (_tmp29_);
	_tmp31_ = _tmp30_;
	if (!_tmp31_) {
		ObjectsProject* _tmp32_;
		gboolean _tmp33_;
		gboolean _tmp34_;
		_tmp32_ = self->priv->_project;
		_tmp33_ = objects_project_get_inbox_project (_tmp32_);
		_tmp34_ = _tmp33_;
		_tmp28_ = !_tmp34_;
	} else {
		_tmp28_ = FALSE;
	}
	if (_tmp28_) {
		GtkBox* _tmp35_;
		WidgetsContextMenuMenuItem* _tmp36_;
		_tmp35_ = menu_box;
		_tmp36_ = edit_item;
		gtk_box_append (_tmp35_, (GtkWidget*) _tmp36_);
	}
	_tmp37_ = menu_box;
	_tmp38_ = duplicate_item;
	gtk_box_append (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = menu_box;
	_tmp40_ = widgets_context_menu_menu_separator_new ();
	g_object_ref_sink (_tmp40_);
	_tmp41_ = _tmp40_;
	gtk_box_append (_tmp39_, (GtkWidget*) _tmp41_);
	_g_object_unref0 (_tmp41_);
	_tmp43_ = self->priv->_project;
	_tmp44_ = objects_project_get_source_type (_tmp43_);
	_tmp45_ = _tmp44_;
	if (_tmp45_ == SOURCE_TYPE_CALDAV) {
		ObjectsProject* _tmp46_;
		gboolean _tmp47_;
		gboolean _tmp48_;
		_tmp46_ = self->priv->_project;
		_tmp47_ = objects_project_get_is_deck (_tmp46_);
		_tmp48_ = _tmp47_;
		_tmp42_ = !_tmp48_;
	} else {
		_tmp42_ = FALSE;
	}
	if (_tmp42_) {
		GtkBox* _tmp49_;
		WidgetsContextMenuMenuItem* _tmp50_;
		GtkBox* _tmp51_;
		WidgetsContextMenuMenuSeparator* _tmp52_;
		WidgetsContextMenuMenuSeparator* _tmp53_;
		_tmp49_ = menu_box;
		_tmp50_ = refresh_item;
		gtk_box_append (_tmp49_, (GtkWidget*) _tmp50_);
		_tmp51_ = menu_box;
		_tmp52_ = widgets_context_menu_menu_separator_new ();
		g_object_ref_sink (_tmp52_);
		_tmp53_ = _tmp52_;
		gtk_box_append (_tmp51_, (GtkWidget*) _tmp53_);
		_g_object_unref0 (_tmp53_);
	}
	_tmp54_ = menu_box;
	_tmp55_ = share_markdown_item;
	gtk_box_append (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = menu_box;
	_tmp57_ = share_email_item;
	gtk_box_append (_tmp56_, (GtkWidget*) _tmp57_);
	_tmp58_ = menu_box;
	_tmp59_ = export_pdf_item;
	gtk_box_append (_tmp58_, (GtkWidget*) _tmp59_);
	_tmp60_ = self->priv->_project;
	_tmp61_ = objects_project_get_inbox_project (_tmp60_);
	_tmp62_ = _tmp61_;
	if (!_tmp62_) {
		GtkBox* _tmp63_;
		WidgetsContextMenuMenuSeparator* _tmp64_;
		WidgetsContextMenuMenuSeparator* _tmp65_;
		GtkBox* _tmp66_;
		WidgetsContextMenuMenuItem* _tmp67_;
		ObjectsProject* _tmp68_;
		gboolean _tmp69_;
		gboolean _tmp70_;
		_tmp63_ = menu_box;
		_tmp64_ = widgets_context_menu_menu_separator_new ();
		g_object_ref_sink (_tmp64_);
		_tmp65_ = _tmp64_;
		gtk_box_append (_tmp63_, (GtkWidget*) _tmp65_);
		_g_object_unref0 (_tmp65_);
		_tmp66_ = menu_box;
		_tmp67_ = archive_item;
		gtk_box_append (_tmp66_, (GtkWidget*) _tmp67_);
		_tmp68_ = self->priv->_project;
		_tmp69_ = objects_project_get_is_deck (_tmp68_);
		_tmp70_ = _tmp69_;
		if (!_tmp70_) {
			GtkBox* _tmp71_;
			WidgetsContextMenuMenuItem* _tmp72_;
			_tmp71_ = menu_box;
			_tmp72_ = delete_item;
			gtk_box_append (_tmp71_, (GtkWidget*) _tmp72_);
		}
	}
	_tmp73_ = menu_box;
	_tmp74_ = _g_object_ref0 ((GtkWidget*) _tmp73_);
	_tmp75_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp75_, FALSE);
	gtk_widget_set_halign ((GtkWidget*) _tmp75_, GTK_ALIGN_START);
	gtk_popover_set_child (_tmp75_, _tmp74_);
	_g_object_unref0 (_tmp74_);
	g_object_set ((GtkWidget*) _tmp75_, "width-request", 250, NULL);
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->menu_popover);
	self->priv->menu_popover = _tmp75_;
	_tmp76_ = self->priv->menu_popover;
	gtk_widget_set_parent ((GtkWidget*) _tmp76_, (GtkWidget*) self);
	_tmp77_ = self->priv->menu_popover;
	_tmp78_.x = (gint) x;
	_tmp78_.y = (gint) y;
	_tmp78_.width = 1;
	_tmp78_.height = 1;
	g_object_set (_tmp77_, "pointing-to", &_tmp78_, NULL);
	_tmp79_ = self->priv->menu_popover;
	gtk_popover_popup (_tmp79_);
	_tmp80_ = self->priv->favorite_item;
	g_signal_connect_object ((GtkButton*) _tmp80_, "clicked", (GCallback) ___lambda235__gtk_button_clicked, self, 0);
	_tmp81_ = edit_item;
	g_signal_connect_object ((GtkButton*) _tmp81_, "clicked", (GCallback) ___lambda236__gtk_button_clicked, self, 0);
	_tmp82_ = refresh_item;
	g_signal_connect_object ((GtkButton*) _tmp82_, "clicked", (GCallback) ___lambda237__gtk_button_clicked, self, 0);
	_tmp83_ = delete_item;
	g_signal_connect_object ((GtkButton*) _tmp83_, "clicked", (GCallback) ___lambda238__gtk_button_clicked, self, 0);
	_tmp84_ = share_markdown_item;
	g_signal_connect_object ((GtkButton*) _tmp84_, "clicked", (GCallback) ___lambda239__gtk_button_clicked, self, 0);
	_tmp85_ = share_email_item;
	g_signal_connect_object ((GtkButton*) _tmp85_, "clicked", (GCallback) ___lambda240__gtk_button_clicked, self, 0);
	_tmp86_ = export_pdf_item;
	g_signal_connect_object ((GtkButton*) _tmp86_, "clicked", (GCallback) ___lambda241__gtk_button_clicked, self, 0);
	_tmp87_ = duplicate_item;
	g_signal_connect_object ((GtkButton*) _tmp87_, "clicked", (GCallback) ___lambda244__gtk_button_clicked, self, 0);
	_tmp88_ = archive_item;
	g_signal_connect_object ((GtkButton*) _tmp88_, "clicked", (GCallback) ___lambda245__gtk_button_clicked, self, 0);
	_g_object_unref0 (menu_box);
	_g_object_unref0 (export_pdf_item);
	_g_object_unref0 (share_email_item);
	_g_object_unref0 (share_markdown_item);
	_g_object_unref0 (delete_item);
	_g_object_unref0 (archive_item);
	_g_object_unref0 (refresh_item);
	_g_object_unref0 (duplicate_item);
	_g_object_unref0 (edit_item);
}

static void
layouts_project_row_sync_project (LayoutsProjectRow* self)
{
	ServicesCalDAVCalDAVClient* caldav_client = NULL;
	ServicesCalDAVCore* _tmp0_;
	ServicesCalDAVCore* _tmp1_;
	ObjectsProject* _tmp2_;
	ObjectsSource* _tmp3_;
	ObjectsSource* _tmp4_;
	ServicesCalDAVCalDAVClient* _tmp5_;
	ServicesCalDAVCalDAVClient* _tmp6_;
	ObjectsProject* _tmp7_;
	GCancellable* _tmp8_;
	GCancellable* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = services_cal_dav_core_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_project_get_source (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = services_cal_dav_core_get_client (_tmp1_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp1_);
	caldav_client = _tmp6_;
	_tmp7_ = self->priv->_project;
	_tmp8_ = g_cancellable_new ();
	_tmp9_ = _tmp8_;
	services_cal_dav_cal_dav_client_sync_tasklist (caldav_client, _tmp7_, _tmp9_, NULL, NULL);
	_g_object_unref0 (_tmp9_);
	_g_object_unref0 (caldav_client);
}

static void
layouts_project_row_update_listbox_revealer (LayoutsProjectRow* self)
{
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->listbox_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		ObjectsProject* _tmp3_;
		GtkButton* _tmp4_;
		_tmp3_ = self->priv->_project;
		objects_project_set_collapsed (_tmp3_, TRUE);
		_tmp4_ = self->priv->arrow_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "opened");
	} else {
		GtkButton* _tmp5_;
		ObjectsProject* _tmp6_;
		_tmp5_ = self->priv->arrow_button;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, "opened");
		_tmp6_ = self->priv->_project;
		objects_project_set_collapsed (_tmp6_, FALSE);
	}
}

void
layouts_project_row_update_request (LayoutsProjectRow* self)
{
	WidgetsIconColorProject* _tmp0_;
	GtkLabel* _tmp1_;
	ObjectsProject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->icon_project;
	widgets_icon_color_project_update_request (_tmp0_);
	_tmp1_ = self->priv->name_label;
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	gtk_label_set_label (_tmp1_, _tmp4_);
	layouts_project_row_check_due_date (self);
}

static void
layouts_project_row_check_due_date (LayoutsProjectRow* self)
{
	gboolean has_due_date = FALSE;
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	GtkStack* _tmp4_;
	GDateTime* datetime = NULL;
	ObjectsProject* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GDateTime* _tmp8_;
	GtkLabel* _tmp9_;
	GDateTime* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gboolean _tmp13_ = FALSE;
	GDateTime* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_due_date (_tmp0_);
	_tmp2_ = _tmp1_;
	has_due_date = g_strcmp0 (_tmp2_, "") != 0;
	if (has_due_date) {
		_tmp3_ = "due_label";
	} else {
		_tmp3_ = "count_revealer";
	}
	_tmp4_ = self->priv->menu_stack;
	gtk_stack_set_visible_child_name (_tmp4_, _tmp3_);
	if (!has_due_date) {
		return;
	}
	_tmp5_ = self->priv->_project;
	_tmp6_ = objects_project_get_due_date (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = utils_datetime_get_date_from_string (_tmp7_);
	datetime = _tmp8_;
	_tmp9_ = self->priv->due_label;
	_tmp10_ = datetime;
	_tmp11_ = utils_datetime_get_relative_time_from_date (_tmp10_);
	_tmp12_ = _tmp11_;
	gtk_label_set_label (_tmp9_, _tmp12_);
	_g_free0 (_tmp12_);
	_tmp14_ = datetime;
	if (utils_datetime_is_today (_tmp14_)) {
		_tmp13_ = TRUE;
	} else {
		GDateTime* _tmp15_;
		_tmp15_ = datetime;
		_tmp13_ = utils_datetime_is_overdue (_tmp15_);
	}
	if (_tmp13_) {
		GtkLabel* _tmp16_;
		_tmp16_ = self->priv->due_label;
		gtk_widget_add_css_class ((GtkWidget*) _tmp16_, "error");
	} else {
		GtkLabel* _tmp17_;
		_tmp17_ = self->priv->due_label;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp17_, "error");
	}
	_g_date_time_unref0 (datetime);
}

static void
layouts_project_row_add_subprojects (LayoutsProjectRow* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _subproject_list = NULL;
		ObjectsProject* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _subproject_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _subproject_index = 0;
		_tmp0_ = self->priv->_project;
		_tmp1_ = objects_project_get_subprojects (_tmp0_);
		_tmp2_ = _tmp1_;
		_subproject_list = _tmp2_;
		_tmp3_ = _subproject_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_subproject_size = _tmp5_;
		_subproject_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsProject* subproject = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsProject* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			_subproject_index = _subproject_index + 1;
			_tmp6_ = _subproject_index;
			_tmp7_ = _subproject_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _subproject_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _subproject_index);
			subproject = (ObjectsProject*) _tmp9_;
			_tmp10_ = subproject;
			_tmp11_ = objects_project_get_is_archived (_tmp10_);
			_tmp12_ = _tmp11_;
			if (!_tmp12_) {
				ObjectsProject* _tmp13_;
				_tmp13_ = subproject;
				layouts_project_row_add_subproject (self, _tmp13_);
			}
			_g_object_unref0 (subproject);
		}
	}
}

static gboolean
__lambda246_ (LayoutsProjectRow* 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
___lambda246__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda246_ ((LayoutsProjectRow*) self);
	return result;
}

void
layouts_project_row_hide_destroy (LayoutsProjectRow* self)
{
	GtkRevealer* _tmp0_;
	GtkRevealer* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->main_revealer;
	_tmp2_ = gtk_revealer_get_transition_duration (_tmp1_);
	_tmp3_ = _tmp2_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp3_, ___lambda246__gsource_func, g_object_ref (self), g_object_unref);
}

void
layouts_project_row_add_subproject (LayoutsProjectRow* self,
                                    ObjectsProject* project)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GeeHashMap* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (project != NULL);
	_tmp2_ = self->subprojects_hashmap;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp4_ = _tmp3_;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, _tmp4_)) {
		gboolean _tmp5_;
		_tmp5_ = self->priv->_show_subprojects;
		_tmp1_ = _tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp6_;
		gboolean _tmp7_;
		_tmp6_ = objects_project_get_is_archived (project);
		_tmp7_ = _tmp6_;
		_tmp0_ = !_tmp7_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		LayoutsProjectRow* _tmp11_;
		LayoutsProjectRow* _tmp12_;
		GtkListBox* _tmp13_;
		GeeHashMap* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		gpointer _tmp17_;
		LayoutsProjectRow* _tmp18_;
		_tmp8_ = self->subprojects_hashmap;
		_tmp9_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
		_tmp10_ = _tmp9_;
		_tmp11_ = layouts_project_row_new (project, TRUE, TRUE);
		g_object_ref_sink (_tmp11_);
		_tmp12_ = _tmp11_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, _tmp10_, _tmp12_);
		_g_object_unref0 (_tmp12_);
		_tmp13_ = self->priv->listbox;
		_tmp14_ = self->subprojects_hashmap;
		_tmp15_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
		_tmp16_ = _tmp15_;
		_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, _tmp16_);
		_tmp18_ = (LayoutsProjectRow*) _tmp17_;
		gtk_list_box_append (_tmp13_, (GtkWidget*) _tmp18_);
		_g_object_unref0 (_tmp18_);
	}
}

ObjectsProject*
layouts_project_row_get_project (LayoutsProjectRow* self)
{
	ObjectsProject* result;
	ObjectsProject* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_project;
	result = _tmp0_;
	return result;
}

static void
layouts_project_row_set_project (LayoutsProjectRow* self,
                                 ObjectsProject* value)
{
	ObjectsProject* old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_row_get_project (self);
	if (old_value != value) {
		ObjectsProject* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_project);
		self->priv->_project = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY]);
	}
}

gboolean
layouts_project_row_get_show_subprojects (LayoutsProjectRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_show_subprojects;
	return result;
}

static void
layouts_project_row_set_show_subprojects (LayoutsProjectRow* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_row_get_show_subprojects (self);
	if (old_value != value) {
		self->priv->_show_subprojects = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY]);
	}
}

gboolean
layouts_project_row_get_drag_n_drop (LayoutsProjectRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_drag_n_drop;
	return result;
}

static void
layouts_project_row_set_drag_n_drop (LayoutsProjectRow* self,
                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_project_row_get_drag_n_drop (self);
	if (old_value != value) {
		self->priv->_drag_n_drop = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY]);
	}
}

static gboolean
layouts_project_row_get_has_subprojects (LayoutsProjectRow* self)
{
	gboolean result;
	ObjectsProject* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_subprojects (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	result = _tmp4_ > 0;
	return result;
}

gboolean
layouts_project_row_get_reveal_child (LayoutsProjectRow* self)
{
	gboolean result;
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->main_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
layouts_project_row_set_reveal_child (LayoutsProjectRow* self,
                                      gboolean value)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->main_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY]);
}

gboolean
layouts_project_row_get_is_loading (LayoutsProjectRow* self)
{
	gboolean result;
	GtkRevealer* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->loading_revealer;
	_tmp1_ = gtk_revealer_get_reveal_child (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
layouts_project_row_set_is_loading (LayoutsProjectRow* self,
                                    gboolean value)
{
	GtkRevealer* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->loading_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY]);
}

static Block24Data*
block24_data_ref (Block24Data* _data24_)
{
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}

static void
block24_data_unref (void * _userdata_)
{
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		LayoutsProjectRow* self;
		self = _data24_->self;
		_g_object_unref0 (_data24_->arrow_gesture);
		_g_object_unref0 (self);
		g_slice_free (Block24Data, _data24_);
	}
}

static gboolean
_layouts_project_row___lambda247_ (LayoutsProjectRow* self)
{
	GtkRevealer* _tmp0_;
	ObjectsProject* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	_tmp0_ = self->main_revealer;
	_tmp1_ = self->priv->_project;
	_tmp2_ = objects_project_get_is_inbox_project (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_revealer_set_reveal_child (_tmp0_, !_tmp3_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__layouts_project_row___lambda247__gsource_func (gpointer self)
{
	gboolean result;
	result = _layouts_project_row___lambda247_ ((LayoutsProjectRow*) self);
	return result;
}

static void
_layouts_project_row___lambda248_ (LayoutsProjectRow* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsProject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_PROJECT, _tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
__layouts_project_row___lambda248__gtk_gesture_click_released (GtkGestureClick* _sender,
                                                               gint n_press,
                                                               gdouble x,
                                                               gdouble y,
                                                               gpointer self)
{
	_layouts_project_row___lambda248_ ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda249_ (LayoutsProjectRow* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	ObjectsProject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	g_signal_emit_by_name (_tmp1_, "pane-selected", PANE_TYPE_PROJECT, _tmp4_);
	_g_object_unref0 (_tmp1_);
}

static void
__layouts_project_row___lambda249__gtk_list_box_row_activate (GtkListBoxRow* _sender,
                                                              gpointer self)
{
	_layouts_project_row___lambda249_ ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda250_ (LayoutsProjectRow* self,
                                   gint n_press,
                                   gdouble x,
                                   gdouble y)
{
	layouts_project_row_build_context_menu (self, x, y);
}

static void
__layouts_project_row___lambda250__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                              gint n_press,
                                                              gdouble x,
                                                              gdouble y,
                                                              gpointer self)
{
	_layouts_project_row___lambda250_ ((LayoutsProjectRow*) self, n_press, x, y);
}

static void
_layouts_project_row___lambda251_ (Block24Data* _data24_)
{
	LayoutsProjectRow* self;
	GtkGestureClick* _tmp0_;
	GtkRevealer* _tmp1_;
	GtkRevealer* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ObjectsProject* _tmp5_;
	self = _data24_->self;
	_tmp0_ = _data24_->arrow_gesture;
	gtk_gesture_set_state ((GtkGesture*) _tmp0_, GTK_EVENT_SEQUENCE_CLAIMED);
	_tmp1_ = self->priv->listbox_revealer;
	_tmp2_ = self->priv->listbox_revealer;
	_tmp3_ = gtk_revealer_get_reveal_child (_tmp2_);
	_tmp4_ = _tmp3_;
	gtk_revealer_set_reveal_child (_tmp1_, !_tmp4_);
	layouts_project_row_update_listbox_revealer (self);
	_tmp5_ = self->priv->_project;
	objects_project_update_local (_tmp5_);
}

static void
__layouts_project_row___lambda251__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                              gint n_press,
                                                              gdouble x,
                                                              gdouble y,
                                                              gpointer self)
{
	_layouts_project_row___lambda251_ (self);
}

static void
_layouts_project_row___lambda252_ (LayoutsProjectRow* self,
                                   PaneType pane_type,
                                   const gchar* id)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (id != NULL);
	if (pane_type == PANE_TYPE_PROJECT) {
		ObjectsProject* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		_tmp1_ = self->priv->_project;
		_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp0_ = g_strcmp0 (_tmp3_, id) == 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		AdwBin* _tmp4_;
		_tmp4_ = self->priv->handle_grid;
		gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "selected");
	} else {
		AdwBin* _tmp5_;
		_tmp5_ = self->priv->handle_grid;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp5_, "selected");
	}
}

static void
__layouts_project_row___lambda252__services_event_bus_pane_selected (ServicesEventBus* _sender,
                                                                     PaneType panel_type,
                                                                     const gchar* id,
                                                                     gpointer self)
{
	_layouts_project_row___lambda252_ ((LayoutsProjectRow*) self, panel_type, id);
}

static void
_layouts_project_row_update_request_objects_base_object_updated (ObjectsBaseObject* _sender,
                                                                 const gchar* update_id,
                                                                 gpointer self)
{
	layouts_project_row_update_request ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row_hide_destroy_objects_base_object_deleted (ObjectsBaseObject* _sender,
                                                               gpointer self)
{
	layouts_project_row_hide_destroy ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row_hide_destroy_objects_base_object_archived (ObjectsBaseObject* _sender,
                                                                gpointer self)
{
	layouts_project_row_hide_destroy ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda253_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	WidgetsIconColorProject* _tmp3_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_base_object_get_item_count ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	layouts_project_row_update_count_label (self, _tmp2_);
	_tmp3_ = self->priv->icon_project;
	widgets_icon_color_project_update_request (_tmp3_);
}

static void
__layouts_project_row___lambda253__objects_base_object_count_updated (ObjectsBaseObject* _sender,
                                                                      gpointer self)
{
	_layouts_project_row___lambda253_ ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda254_ (LayoutsProjectRow* self,
                                   ObjectsProject* subproject)
{
	g_return_if_fail (subproject != NULL);
	layouts_project_row_add_subproject (self, subproject);
}

static void
__layouts_project_row___lambda254__objects_project_subproject_added (ObjectsProject* _sender,
                                                                     ObjectsProject* project,
                                                                     gpointer self)
{
	_layouts_project_row___lambda254_ ((LayoutsProjectRow*) self, project);
}

static void
_layouts_project_row___lambda255_ (LayoutsProjectRow* self,
                                   ObjectsProject* _project,
                                   const gchar* old_parent_id,
                                   gboolean collapsed)
{
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	ObjectsProject* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GtkRevealer* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	g_return_if_fail (_project != NULL);
	g_return_if_fail (old_parent_id != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (old_parent_id, _tmp2_) == 0) {
		GeeHashMap* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->subprojects_hashmap;
		_tmp4_ = objects_base_object_get_id ((ObjectsBaseObject*) _project);
		_tmp5_ = _tmp4_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp3_, _tmp5_)) {
			GeeHashMap* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			gpointer _tmp9_;
			LayoutsProjectRow* _tmp10_;
			GeeHashMap* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			_tmp6_ = self->subprojects_hashmap;
			_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) _project);
			_tmp8_ = _tmp7_;
			_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp8_);
			_tmp10_ = (LayoutsProjectRow*) _tmp9_;
			layouts_project_row_hide_destroy (_tmp10_);
			_g_object_unref0 (_tmp10_);
			_tmp11_ = self->subprojects_hashmap;
			_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) _project);
			_tmp13_ = _tmp12_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp11_, _tmp13_, NULL);
		}
	}
	_tmp14_ = objects_project_get_parent_id (_project);
	_tmp15_ = _tmp14_;
	_tmp16_ = self->priv->_project;
	_tmp17_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp16_);
	_tmp18_ = _tmp17_;
	if (g_strcmp0 (_tmp15_, _tmp18_) == 0) {
		layouts_project_row_add_subproject (self, _project);
		if (collapsed) {
			ObjectsProject* _tmp19_;
			GtkButton* _tmp20_;
			_tmp19_ = self->priv->_project;
			objects_project_set_collapsed (_tmp19_, TRUE);
			_tmp20_ = self->priv->arrow_button;
			gtk_widget_add_css_class ((GtkWidget*) _tmp20_, "opened");
		}
	}
	_tmp21_ = self->priv->arrow_revealer;
	_tmp22_ = layouts_project_row_get_has_subprojects (self);
	_tmp23_ = _tmp22_;
	gtk_revealer_set_reveal_child (_tmp21_, _tmp23_);
}

static void
__layouts_project_row___lambda255__services_event_bus_project_parent_changed (ServicesEventBus* _sender,
                                                                              ObjectsProject* project,
                                                                              const gchar* old_parent_id,
                                                                              gboolean collapsed,
                                                                              gpointer self)
{
	_layouts_project_row___lambda255_ ((LayoutsProjectRow*) self, project, old_parent_id, collapsed);
}

static void
_layouts_project_row___lambda256_ (LayoutsProjectRow* self,
                                   GtkWidget* _row,
                                   const gchar* old_parent_id)
{
	LayoutsProjectRow* row = NULL;
	LayoutsProjectRow* _tmp0_;
	ObjectsProject* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkRevealer* _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
	g_return_if_fail (_row != NULL);
	g_return_if_fail (old_parent_id != NULL);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_row, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow));
	row = _tmp0_;
	_tmp1_ = self->priv->_project;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (old_parent_id, _tmp3_) == 0) {
		GeeHashMap* _tmp4_;
		LayoutsProjectRow* _tmp5_;
		ObjectsProject* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp4_ = self->subprojects_hashmap;
		_tmp5_ = row;
		_tmp6_ = _tmp5_->priv->_project;
		_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp6_);
		_tmp8_ = _tmp7_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp4_, _tmp8_)) {
			GeeHashMap* _tmp9_;
			LayoutsProjectRow* _tmp10_;
			ObjectsProject* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			_tmp9_ = self->subprojects_hashmap;
			_tmp10_ = row;
			_tmp11_ = _tmp10_->priv->_project;
			_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp11_);
			_tmp13_ = _tmp12_;
			gee_abstract_map_unset ((GeeAbstractMap*) _tmp9_, _tmp13_, NULL);
		}
	}
	_tmp14_ = self->priv->arrow_revealer;
	_tmp15_ = layouts_project_row_get_has_subprojects (self);
	_tmp16_ = _tmp15_;
	gtk_revealer_set_reveal_child (_tmp14_, _tmp16_);
	_g_object_unref0 (row);
}

static void
__layouts_project_row___lambda256__services_event_bus_update_inserted_project_map (ServicesEventBus* _sender,
                                                                                   GtkWidget* row,
                                                                                   const gchar* old_parent_id,
                                                                                   gpointer self)
{
	_layouts_project_row___lambda256_ ((LayoutsProjectRow*) self, row, old_parent_id);
}

static void
_layouts_project_row___lambda257_ (LayoutsProjectRow* self)
{
	ObjectsProject* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_base_object_get_loading ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	layouts_project_row_set_is_loading (self, _tmp2_);
}

static void
__layouts_project_row___lambda257__objects_base_object_loading_change (ObjectsBaseObject* _sender,
                                                                       gpointer self)
{
	_layouts_project_row___lambda257_ ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda258_ (LayoutsProjectRow* self,
                                   const gchar* source_id)
{
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (source_id != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_source_id (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, source_id) == 0) {
		GtkRevealer* _tmp3_;
		_tmp3_ = self->priv->motion_top_revealer;
		gtk_revealer_set_reveal_child (_tmp3_, FALSE);
	}
}

static void
__layouts_project_row___lambda258__services_event_bus_projects_drag_end (ServicesEventBus* _sender,
                                                                         const gchar* source_id,
                                                                         gpointer self)
{
	_layouts_project_row___lambda258_ ((LayoutsProjectRow*) self, source_id);
}

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

static void
_layouts_project_row___lambda259_ (LayoutsProjectRow* self,
                                   const gchar* source_id)
{
	ObjectsProject* _tmp0_;
	ObjectsSource* _tmp1_;
	ObjectsSource* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (source_id != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_source (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (source_id, _tmp4_) == 0) {
		GtkListBox* listbox_parent = NULL;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp6_;
		GtkListBox* _tmp7_;
		GtkListBox* _tmp8_;
		gint children_count = 0;
		Util* _tmp9_;
		Util* _tmp10_;
		GtkListBox* _tmp11_;
		GList* _tmp12_;
		GList* _tmp13_;
		gint _tmp14_;
		gboolean is_last = FALSE;
		gboolean _tmp15_ = FALSE;
		_tmp5_ = gtk_widget_get_parent ((GtkWidget*) self);
		_tmp6_ = _tmp5_;
		_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, gtk_list_box_get_type ()) ? ((GtkListBox*) _tmp6_) : NULL);
		listbox_parent = _tmp7_;
		_tmp8_ = listbox_parent;
		if (_tmp8_ == NULL) {
			_g_object_unref0 (listbox_parent);
			return;
		}
		_tmp9_ = util_get_default ();
		_tmp10_ = _tmp9_;
		_tmp11_ = listbox_parent;
		_tmp12_ = util_get_children (_tmp10_, _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = (gint) g_list_length (_tmp13_);
		(_tmp13_ == NULL) ? NULL : (_tmp13_ = (_g_list_free__g_object_unref0_ (_tmp13_), NULL));
		_g_object_unref0 (_tmp10_);
		children_count = _tmp14_;
		is_last = gtk_list_box_row_get_index ((GtkListBoxRow*) self) == (children_count - 1);
		if (is_last) {
			ObjectsProject* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_tmp16_ = self->priv->_project;
			_tmp17_ = objects_project_get_parent_id (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp15_ = g_strcmp0 (_tmp18_, "") != 0;
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			GtkRevealer* _tmp19_;
			_tmp19_ = self->drop_target_end_revealer;
			gtk_revealer_set_reveal_child (_tmp19_, TRUE);
		}
		_g_object_unref0 (listbox_parent);
	}
}

static void
__layouts_project_row___lambda259__services_event_bus_projects_drag_begin (ServicesEventBus* _sender,
                                                                           const gchar* source_id,
                                                                           gpointer self)
{
	_layouts_project_row___lambda259_ ((LayoutsProjectRow*) self, source_id);
}

static void
_layouts_project_row___lambda260_ (LayoutsProjectRow* self,
                                   const gchar* source_id)
{
	ObjectsProject* _tmp0_;
	ObjectsSource* _tmp1_;
	ObjectsSource* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (source_id != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_source (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (source_id, _tmp4_) == 0) {
		GtkRevealer* _tmp5_;
		_tmp5_ = self->drop_target_end_revealer;
		gtk_revealer_set_reveal_child (_tmp5_, FALSE);
	}
}

static void
__layouts_project_row___lambda260__services_event_bus_projects_drag_end (ServicesEventBus* _sender,
                                                                         const gchar* source_id,
                                                                         gpointer self)
{
	_layouts_project_row___lambda260_ ((LayoutsProjectRow*) self, source_id);
}

static void
_layouts_project_row___lambda261_ (LayoutsProjectRow* self)
{
	GtkRevealer* _tmp0_;
	ObjectsProject* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	layouts_project_row_update_request (self);
	_tmp0_ = self->main_revealer;
	_tmp1_ = self->priv->_project;
	_tmp2_ = objects_project_get_is_inbox_project (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_revealer_set_reveal_child (_tmp0_, !_tmp3_);
}

static void
__layouts_project_row___lambda261__g_settings_changed (GSettings* _sender,
                                                       const gchar* key,
                                                       gpointer self)
{
	_layouts_project_row___lambda261_ ((LayoutsProjectRow*) self);
}

static void
_layouts_project_row___lambda262_ (LayoutsProjectRow* self)
{
	GeeHashMap* _tmp15_;
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->signals_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->signals_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
}

static void
__layouts_project_row___lambda262__gtk_widget_destroy (GtkWidget* _sender,
                                                       gpointer self)
{
	_layouts_project_row___lambda262_ ((LayoutsProjectRow*) self);
}

static GObject *
layouts_project_row_constructor (GType type,
                                 guint n_construct_properties,
                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	LayoutsProjectRow * self;
	Block24Data* _data24_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar* _tmp5_;
	gchar** _tmp6_;
	GtkGrid* _tmp7_ = NULL;
	GtkGrid* _tmp8_;
	GtkWidget* _tmp9_;
	GtkRevealer* _tmp10_ = NULL;
	WidgetsIconColorProject* _tmp11_;
	WidgetsIconColorProject* _tmp12_;
	ObjectsProject* _tmp13_;
	ObjectsProject* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	GtkLabel* _tmp17_ = NULL;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar** _tmp20_;
	GtkLabel* _tmp21_ = NULL;
	GtkLabel* _tmp22_;
	GtkWidget* _tmp23_;
	GtkRevealer* _tmp24_ = NULL;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar** _tmp30_;
	GtkImage* _tmp31_ = NULL;
	GtkButton* _tmp32_ = NULL;
	GtkButton* _tmp33_;
	GtkWidget* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	GtkRevealer* _tmp37_ = NULL;
	ObjectsProject* _tmp38_;
	gboolean _tmp39_;
	gboolean _tmp40_;
	GtkStack* _tmp42_ = NULL;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar** _tmp45_;
	GtkLabel* _tmp46_ = NULL;
	GtkStack* _tmp47_;
	GtkLabel* _tmp48_;
	GtkStack* _tmp49_;
	GtkRevealer* _tmp50_;
	GtkBox* end_box = NULL;
	GtkBox* _tmp51_ = NULL;
	GtkBox* _tmp52_;
	GtkStack* _tmp53_;
	GtkBox* _tmp54_;
	GtkRevealer* _tmp55_;
	AdwSpinner* loading_spinner = NULL;
	AdwSpinner* _tmp56_ = NULL;
	AdwSpinner* _tmp57_;
	GtkWidget* _tmp58_;
	GtkRevealer* _tmp59_ = NULL;
	GtkBox* projectrow_box = NULL;
	GtkBox* _tmp60_ = NULL;
	GtkBox* _tmp61_;
	WidgetsIconColorProject* _tmp62_;
	GtkBox* _tmp63_;
	GtkLabel* _tmp64_;
	GtkBox* _tmp65_;
	GtkBox* _tmp66_;
	GtkBox* _tmp67_;
	GtkRevealer* _tmp68_;
	gchar* _tmp69_;
	gchar* _tmp70_;
	gchar* _tmp71_;
	gchar** _tmp72_;
	GtkBox* _tmp73_;
	GtkWidget* _tmp74_;
	AdwBin* _tmp75_ = NULL;
	gchar* _tmp76_;
	gchar** _tmp77_;
	GtkListBox* _tmp78_ = NULL;
	AdwBin* listbox_grid = NULL;
	GtkListBox* _tmp79_;
	GtkWidget* _tmp80_;
	AdwBin* _tmp81_ = NULL;
	ObjectsProject* _tmp82_;
	gboolean _tmp83_;
	gboolean _tmp84_;
	AdwBin* _tmp85_;
	GtkWidget* _tmp86_;
	GtkRevealer* _tmp87_ = NULL;
	gchar* _tmp88_;
	gchar** _tmp89_;
	GtkGrid* _tmp90_ = NULL;
	GtkGrid* _tmp91_;
	GtkWidget* _tmp92_;
	GtkRevealer* _tmp93_ = NULL;
	GtkBox* _tmp94_;
	GtkBox* _tmp95_;
	AdwBin* _tmp96_;
	GtkBox* _tmp97_;
	GtkRevealer* _tmp98_;
	GtkBox* _tmp99_;
	GtkRevealer* _tmp100_;
	GtkBox* box = NULL;
	GtkBox* _tmp101_;
	GtkBox* _tmp102_;
	GtkRevealer* _tmp103_;
	GtkBox* _tmp104_;
	GtkBox* _tmp105_;
	GtkBox* _tmp106_;
	GtkWidget* _tmp107_;
	GtkRevealer* _tmp108_ = NULL;
	GtkRevealer* _tmp109_;
	ObjectsProject* _tmp110_;
	gint _tmp111_;
	gint _tmp112_;
	ServicesSettings* _tmp113_;
	ServicesSettings* _tmp114_;
	GSettings* _tmp115_;
	GtkRevealer* _tmp116_;
	gboolean _tmp117_;
	gboolean _tmp118_;
	GtkRevealer* _tmp119_;
	guint _tmp120_;
	guint _tmp121_;
	GtkGestureClick* select_gesture = NULL;
	GtkGestureClick* _tmp122_;
	AdwBin* _tmp123_;
	GtkGestureClick* _tmp124_;
	GtkEventController* _tmp125_;
	GeeHashMap* _tmp126_;
	GtkGestureClick* _tmp127_;
	gulong _tmp128_;
	GtkGestureClick* _tmp129_;
	GeeHashMap* _tmp130_;
	gulong _tmp131_;
	GtkGestureClick* menu_gesture = NULL;
	GtkGestureClick* _tmp132_ = NULL;
	AdwBin* _tmp133_;
	GtkGestureClick* _tmp134_;
	GtkEventController* _tmp135_;
	GeeHashMap* _tmp136_;
	GtkGestureClick* _tmp137_;
	gulong _tmp138_;
	GtkGestureClick* _tmp139_;
	GtkGestureClick* _tmp140_;
	GtkButton* _tmp141_;
	GtkGestureClick* _tmp142_;
	GtkEventController* _tmp143_;
	GeeHashMap* _tmp144_;
	GtkGestureClick* _tmp145_;
	gulong _tmp146_;
	GtkGestureClick* _tmp147_;
	GeeHashMap* _tmp148_;
	ServicesEventBus* _tmp149_;
	ServicesEventBus* _tmp150_;
	gulong _tmp151_;
	ServicesEventBus* _tmp152_;
	ServicesEventBus* _tmp153_;
	GeeHashMap* _tmp154_;
	ObjectsProject* _tmp155_;
	gulong _tmp156_;
	ObjectsProject* _tmp157_;
	GeeHashMap* _tmp158_;
	ObjectsProject* _tmp159_;
	gulong _tmp160_;
	ObjectsProject* _tmp161_;
	GeeHashMap* _tmp162_;
	ObjectsProject* _tmp163_;
	gulong _tmp164_;
	ObjectsProject* _tmp165_;
	GeeHashMap* _tmp166_;
	ObjectsProject* _tmp167_;
	gulong _tmp168_;
	ObjectsProject* _tmp169_;
	GeeHashMap* _tmp170_;
	ObjectsProject* _tmp171_;
	gulong _tmp172_;
	ObjectsProject* _tmp173_;
	GeeHashMap* _tmp174_;
	ServicesEventBus* _tmp175_;
	ServicesEventBus* _tmp176_;
	gulong _tmp177_;
	ServicesEventBus* _tmp178_;
	ServicesEventBus* _tmp179_;
	GeeHashMap* _tmp180_;
	ServicesEventBus* _tmp181_;
	ServicesEventBus* _tmp182_;
	gulong _tmp183_;
	ServicesEventBus* _tmp184_;
	ServicesEventBus* _tmp185_;
	GeeHashMap* _tmp186_;
	ObjectsProject* _tmp187_;
	gulong _tmp188_;
	ObjectsProject* _tmp189_;
	GeeHashMap* _tmp190_;
	ServicesEventBus* _tmp191_;
	ServicesEventBus* _tmp192_;
	gulong _tmp193_;
	ServicesEventBus* _tmp194_;
	ServicesEventBus* _tmp195_;
	ServicesEventBus* _tmp196_;
	ServicesEventBus* _tmp197_;
	ServicesEventBus* _tmp198_;
	ServicesEventBus* _tmp199_;
	ServicesSettings* _tmp200_;
	ServicesSettings* _tmp201_;
	GSettings* _tmp202_;
	parent_class = G_OBJECT_CLASS (layouts_project_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow);
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("row");
	_tmp1_ = g_strdup ("transition");
	_tmp2_ = g_strdup ("no-padding");
	_tmp3_ = g_new0 (gchar*, 3 + 1);
	_tmp3_[0] = _tmp0_;
	_tmp3_[1] = _tmp1_;
	_tmp3_[2] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 3;
	gtk_widget_set_css_classes ((GtkWidget*) self, _tmp4_);
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	_tmp5_ = g_strdup ("drop-target");
	_tmp6_ = g_new0 (gchar*, 1 + 1);
	_tmp6_[0] = _tmp5_;
	_tmp7_ = (GtkGrid*) gtk_grid_new ();
	g_object_set ((GtkWidget*) _tmp7_, "height-request", 27, NULL);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp7_, _tmp6_);
	_tmp6_ = (_vala_array_free (_tmp6_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, 3);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->motion_top_grid);
	self->priv->motion_top_grid = _tmp7_;
	_tmp8_ = self->priv->motion_top_grid;
	_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp8_);
	_tmp10_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp10_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	gtk_revealer_set_transition_duration (_tmp10_, (guint) 150);
	gtk_revealer_set_child (_tmp10_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->motion_top_revealer);
	self->priv->motion_top_revealer = _tmp10_;
	_tmp11_ = widgets_icon_color_project_new (22);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->icon_project);
	self->priv->icon_project = _tmp11_;
	_tmp12_ = self->priv->icon_project;
	_tmp13_ = self->priv->_project;
	widgets_icon_color_project_set_project (_tmp12_, _tmp13_);
	_tmp14_ = self->priv->_project;
	_tmp15_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = (GtkLabel*) gtk_label_new (_tmp16_);
	gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_CENTER);
	gtk_label_set_ellipsize (_tmp17_, PANGO_ELLIPSIZE_END);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp17_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->name_label);
	self->priv->name_label = _tmp17_;
	_tmp18_ = g_strdup ("caption");
	_tmp19_ = g_strdup ("dimmed");
	_tmp20_ = g_new0 (gchar*, 2 + 1);
	_tmp20_[0] = _tmp18_;
	_tmp20_[1] = _tmp19_;
	_tmp21_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp21_, TRUE);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp21_, 3);
	gtk_widget_set_halign ((GtkWidget*) _tmp21_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp21_, _tmp20_);
	_tmp20_ = (_vala_array_free (_tmp20_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->count_label);
	self->priv->count_label = _tmp21_;
	_tmp22_ = self->priv->count_label;
	_tmp23_ = _g_object_ref0 ((GtkWidget*) _tmp22_);
	_tmp24_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp24_, GTK_REVEALER_TRANSITION_TYPE_CROSSFADE);
	gtk_revealer_set_child (_tmp24_, _tmp23_);
	_g_object_unref0 (_tmp23_);
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->count_revealer);
	self->priv->count_revealer = _tmp24_;
	_tmp25_ = g_strdup ("flat");
	_tmp26_ = g_strdup ("transparent");
	_tmp27_ = g_strdup ("hidden-button");
	_tmp28_ = g_strdup ("no-padding");
	_tmp29_ = g_strdup ("dimmed");
	_tmp30_ = g_new0 (gchar*, 5 + 1);
	_tmp30_[0] = _tmp25_;
	_tmp30_[1] = _tmp26_;
	_tmp30_[2] = _tmp27_;
	_tmp30_[3] = _tmp28_;
	_tmp30_[4] = _tmp29_;
	_tmp31_ = (GtkImage*) gtk_image_new_from_icon_name ("go-next-symbolic");
	gtk_image_set_pixel_size (_tmp31_, 12);
	g_object_ref_sink (_tmp31_);
	_tmp32_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp32_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp32_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp32_, _tmp30_);
	_tmp30_ = (_vala_array_free (_tmp30_, 5, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp32_, 6);
	gtk_button_set_child (_tmp32_, (GtkWidget*) _tmp31_);
	_g_object_unref0 (_tmp31_);
	g_object_ref_sink (_tmp32_);
	_g_object_unref0 (self->priv->arrow_button);
	self->priv->arrow_button = _tmp32_;
	_tmp33_ = self->priv->arrow_button;
	_tmp34_ = _g_object_ref0 ((GtkWidget*) _tmp33_);
	_tmp35_ = layouts_project_row_get_has_subprojects (self);
	_tmp36_ = _tmp35_;
	_tmp37_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp37_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_child (_tmp37_, _tmp34_);
	_g_object_unref0 (_tmp34_);
	gtk_revealer_set_reveal_child (_tmp37_, _tmp36_);
	g_object_ref_sink (_tmp37_);
	_g_object_unref0 (self->priv->arrow_revealer);
	self->priv->arrow_revealer = _tmp37_;
	_tmp38_ = self->priv->_project;
	_tmp39_ = objects_project_get_collapsed (_tmp38_);
	_tmp40_ = _tmp39_;
	if (_tmp40_) {
		GtkButton* _tmp41_;
		_tmp41_ = self->priv->arrow_button;
		gtk_widget_add_css_class ((GtkWidget*) _tmp41_, "opened");
	}
	_tmp42_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_transition_type (_tmp42_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp42_);
	_g_object_unref0 (self->priv->menu_stack);
	self->priv->menu_stack = _tmp42_;
	_tmp43_ = g_strdup ("pane-due-button");
	_tmp44_ = g_strdup ("caption");
	_tmp45_ = g_new0 (gchar*, 2 + 1);
	_tmp45_[0] = _tmp43_;
	_tmp45_[1] = _tmp44_;
	_tmp46_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_use_markup (_tmp46_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp46_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp46_, GTK_ALIGN_CENTER);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp46_, _tmp45_);
	_tmp45_ = (_vala_array_free (_tmp45_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->due_label);
	self->priv->due_label = _tmp46_;
	_tmp47_ = self->priv->menu_stack;
	_tmp48_ = self->priv->due_label;
	gtk_stack_add_named (_tmp47_, (GtkWidget*) _tmp48_, "due_label");
	_tmp49_ = self->priv->menu_stack;
	_tmp50_ = self->priv->count_revealer;
	gtk_stack_add_named (_tmp49_, (GtkWidget*) _tmp50_, "count_revealer");
	_tmp51_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp51_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp51_);
	end_box = _tmp51_;
	_tmp52_ = end_box;
	_tmp53_ = self->priv->menu_stack;
	gtk_box_append (_tmp52_, (GtkWidget*) _tmp53_);
	_tmp54_ = end_box;
	_tmp55_ = self->priv->arrow_revealer;
	gtk_box_append (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = (AdwSpinner*) adw_spinner_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp56_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp56_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp56_, 6);
	g_object_ref_sink (_tmp56_);
	loading_spinner = _tmp56_;
	_tmp57_ = loading_spinner;
	_tmp58_ = _g_object_ref0 ((GtkWidget*) _tmp57_);
	_tmp59_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp59_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
	gtk_revealer_set_child (_tmp59_, _tmp58_);
	_g_object_unref0 (_tmp58_);
	g_object_ref_sink (_tmp59_);
	_g_object_unref0 (self->priv->loading_revealer);
	self->priv->loading_revealer = _tmp59_;
	_tmp60_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp60_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp60_, 3);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp60_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp60_, 3);
	g_object_ref_sink (_tmp60_);
	projectrow_box = _tmp60_;
	_tmp61_ = projectrow_box;
	_tmp62_ = self->priv->icon_project;
	gtk_box_append (_tmp61_, (GtkWidget*) _tmp62_);
	_tmp63_ = projectrow_box;
	_tmp64_ = self->priv->name_label;
	gtk_box_append (_tmp63_, (GtkWidget*) _tmp64_);
	_tmp65_ = projectrow_box;
	_tmp66_ = end_box;
	gtk_box_append (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = projectrow_box;
	_tmp68_ = self->priv->loading_revealer;
	gtk_box_append (_tmp67_, (GtkWidget*) _tmp68_);
	_tmp69_ = g_strdup ("transition");
	_tmp70_ = g_strdup ("selectable-item");
	_tmp71_ = g_strdup ("drop-target");
	_tmp72_ = g_new0 (gchar*, 3 + 1);
	_tmp72_[0] = _tmp69_;
	_tmp72_[1] = _tmp70_;
	_tmp72_[2] = _tmp71_;
	_tmp73_ = projectrow_box;
	_tmp74_ = _g_object_ref0 ((GtkWidget*) _tmp73_);
	_tmp75_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp75_, _tmp72_);
	_tmp72_ = (_vala_array_free (_tmp72_, 3, (GDestroyNotify) g_free), NULL);
	adw_bin_set_child (_tmp75_, _tmp74_);
	_g_object_unref0 (_tmp74_);
	g_object_ref_sink (_tmp75_);
	_g_object_unref0 (self->priv->handle_grid);
	self->priv->handle_grid = _tmp75_;
	_tmp76_ = g_strdup ("bg-transparent");
	_tmp77_ = g_new0 (gchar*, 1 + 1);
	_tmp77_[0] = _tmp76_;
	_tmp78_ = (GtkListBox*) gtk_list_box_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp78_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp78_, _tmp77_);
	_tmp77_ = (_vala_array_free (_tmp77_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp78_);
	_g_object_unref0 (self->priv->listbox);
	self->priv->listbox = _tmp78_;
	_tmp79_ = self->priv->listbox;
	_tmp80_ = _g_object_ref0 ((GtkWidget*) _tmp79_);
	_tmp81_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp81_, 12);
	adw_bin_set_child (_tmp81_, _tmp80_);
	_g_object_unref0 (_tmp80_);
	g_object_ref_sink (_tmp81_);
	listbox_grid = _tmp81_;
	_tmp82_ = self->priv->_project;
	_tmp83_ = objects_project_get_collapsed (_tmp82_);
	_tmp84_ = _tmp83_;
	_tmp85_ = listbox_grid;
	_tmp86_ = _g_object_ref0 ((GtkWidget*) _tmp85_);
	_tmp87_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp87_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp87_, _tmp84_);
	gtk_revealer_set_child (_tmp87_, _tmp86_);
	_g_object_unref0 (_tmp86_);
	g_object_ref_sink (_tmp87_);
	_g_object_unref0 (self->priv->listbox_revealer);
	self->priv->listbox_revealer = _tmp87_;
	_tmp88_ = g_strdup ("drop-target");
	_tmp89_ = g_new0 (gchar*, 1 + 1);
	_tmp89_[0] = _tmp88_;
	_tmp90_ = (GtkGrid*) gtk_grid_new ();
	g_object_set ((GtkWidget*) _tmp90_, "height-request", 27, NULL);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp90_, _tmp89_);
	_tmp89_ = (_vala_array_free (_tmp89_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp90_, 3);
	g_object_ref_sink (_tmp90_);
	_g_object_unref0 (self->drop_target_end);
	self->drop_target_end = _tmp90_;
	_tmp91_ = self->drop_target_end;
	_tmp92_ = _g_object_ref0 ((GtkWidget*) _tmp91_);
	_tmp93_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp93_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
	gtk_revealer_set_transition_duration (_tmp93_, (guint) 150);
	gtk_revealer_set_child (_tmp93_, _tmp92_);
	_g_object_unref0 (_tmp92_);
	g_object_ref_sink (_tmp93_);
	_g_object_unref0 (self->drop_target_end_revealer);
	self->drop_target_end_revealer = _tmp93_;
	_tmp94_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp94_);
	_g_object_unref0 (self->main_content);
	self->main_content = _tmp94_;
	_tmp95_ = self->main_content;
	_tmp96_ = self->priv->handle_grid;
	gtk_box_append (_tmp95_, (GtkWidget*) _tmp96_);
	_tmp97_ = self->main_content;
	_tmp98_ = self->priv->listbox_revealer;
	gtk_box_append (_tmp97_, (GtkWidget*) _tmp98_);
	_tmp99_ = self->main_content;
	_tmp100_ = self->drop_target_end_revealer;
	gtk_box_append (_tmp99_, (GtkWidget*) _tmp100_);
	_tmp101_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp101_);
	box = _tmp101_;
	_tmp102_ = box;
	_tmp103_ = self->priv->motion_top_revealer;
	gtk_box_append (_tmp102_, (GtkWidget*) _tmp103_);
	_tmp104_ = box;
	_tmp105_ = self->main_content;
	gtk_box_append (_tmp104_, (GtkWidget*) _tmp105_);
	_tmp106_ = box;
	_tmp107_ = _g_object_ref0 ((GtkWidget*) _tmp106_);
	_tmp108_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp108_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_child (_tmp108_, _tmp107_);
	_g_object_unref0 (_tmp107_);
	g_object_ref_sink (_tmp108_);
	_g_object_unref0 (self->main_revealer);
	self->main_revealer = _tmp108_;
	_tmp109_ = self->main_revealer;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp109_);
	layouts_project_row_update_request (self);
	_tmp110_ = self->priv->_project;
	_tmp111_ = objects_base_object_get_item_count ((ObjectsBaseObject*) _tmp110_);
	_tmp112_ = _tmp111_;
	layouts_project_row_update_count_label (self, _tmp112_);
	_tmp113_ = services_settings_get_default ();
	_tmp114_ = _tmp113_;
	_tmp115_ = _tmp114_->settings;
	_tmp116_ = self->priv->count_revealer;
	g_settings_bind (_tmp115_, "show-tasks-count", (GObject*) _tmp116_, "reveal_child", G_SETTINGS_BIND_DEFAULT);
	_g_object_unref0 (_tmp114_);
	_tmp117_ = self->priv->_drag_n_drop;
	if (_tmp117_) {
		layouts_project_row_build_drag_and_drop (self);
	}
	_tmp118_ = self->priv->_show_subprojects;
	if (_tmp118_) {
		layouts_project_row_add_subprojects (self);
	}
	_tmp119_ = self->main_revealer;
	_tmp120_ = gtk_revealer_get_transition_duration (_tmp119_);
	_tmp121_ = _tmp120_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp121_, __layouts_project_row___lambda247__gsource_func, g_object_ref (self), g_object_unref);
	_tmp122_ = (GtkGestureClick*) gtk_gesture_click_new ();
	select_gesture = _tmp122_;
	_tmp123_ = self->priv->handle_grid;
	_tmp124_ = select_gesture;
	_tmp125_ = _g_object_ref0 ((GtkEventController*) _tmp124_);
	gtk_widget_add_controller ((GtkWidget*) _tmp123_, _tmp125_);
	_tmp126_ = self->priv->signals_map;
	_tmp127_ = select_gesture;
	_tmp128_ = g_signal_connect_object (_tmp127_, "released", (GCallback) __layouts_project_row___lambda248__gtk_gesture_click_released, self, 0);
	_tmp129_ = select_gesture;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp126_, (gpointer) ((guintptr) _tmp128_), (GObject*) _tmp129_);
	_tmp130_ = self->priv->signals_map;
	_tmp131_ = g_signal_connect_object ((GtkListBoxRow*) self, "activate", (GCallback) __layouts_project_row___lambda249__gtk_list_box_row_activate, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp130_, (gpointer) ((guintptr) _tmp131_), (GObject*) self);
	_tmp132_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp132_, (guint) 3);
	menu_gesture = _tmp132_;
	_tmp133_ = self->priv->handle_grid;
	_tmp134_ = menu_gesture;
	_tmp135_ = _g_object_ref0 ((GtkEventController*) _tmp134_);
	gtk_widget_add_controller ((GtkWidget*) _tmp133_, _tmp135_);
	_tmp136_ = self->priv->signals_map;
	_tmp137_ = menu_gesture;
	_tmp138_ = g_signal_connect_object (_tmp137_, "pressed", (GCallback) __layouts_project_row___lambda250__gtk_gesture_click_pressed, self, 0);
	_tmp139_ = menu_gesture;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp136_, (gpointer) ((guintptr) _tmp138_), (GObject*) _tmp139_);
	_tmp140_ = (GtkGestureClick*) gtk_gesture_click_new ();
	_data24_->arrow_gesture = _tmp140_;
	_tmp141_ = self->priv->arrow_button;
	_tmp142_ = _data24_->arrow_gesture;
	_tmp143_ = _g_object_ref0 ((GtkEventController*) _tmp142_);
	gtk_widget_add_controller ((GtkWidget*) _tmp141_, _tmp143_);
	_tmp144_ = self->priv->signals_map;
	_tmp145_ = _data24_->arrow_gesture;
	_tmp146_ = g_signal_connect_data (_tmp145_, "pressed", (GCallback) __layouts_project_row___lambda251__gtk_gesture_click_pressed, block24_data_ref (_data24_), (GClosureNotify) block24_data_unref, 0);
	_tmp147_ = _data24_->arrow_gesture;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp144_, (gpointer) ((guintptr) _tmp146_), (GObject*) _tmp147_);
	_tmp148_ = self->priv->signals_map;
	_tmp149_ = services_event_bus_get_default ();
	_tmp150_ = _tmp149_;
	_tmp151_ = g_signal_connect_object (_tmp150_, "pane-selected", (GCallback) __layouts_project_row___lambda252__services_event_bus_pane_selected, self, 0);
	_tmp152_ = services_event_bus_get_default ();
	_tmp153_ = _tmp152_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp148_, (gpointer) ((guintptr) _tmp151_), (GObject*) _tmp153_);
	_g_object_unref0 (_tmp153_);
	_g_object_unref0 (_tmp150_);
	_tmp154_ = self->priv->signals_map;
	_tmp155_ = self->priv->_project;
	_tmp156_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp155_, "updated", (GCallback) _layouts_project_row_update_request_objects_base_object_updated, self, 0);
	_tmp157_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp154_, (gpointer) ((guintptr) _tmp156_), (GObject*) _tmp157_);
	_tmp158_ = self->priv->signals_map;
	_tmp159_ = self->priv->_project;
	_tmp160_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp159_, "deleted", (GCallback) _layouts_project_row_hide_destroy_objects_base_object_deleted, self, 0);
	_tmp161_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp158_, (gpointer) ((guintptr) _tmp160_), (GObject*) _tmp161_);
	_tmp162_ = self->priv->signals_map;
	_tmp163_ = self->priv->_project;
	_tmp164_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp163_, "archived", (GCallback) _layouts_project_row_hide_destroy_objects_base_object_archived, self, 0);
	_tmp165_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp162_, (gpointer) ((guintptr) _tmp164_), (GObject*) _tmp165_);
	_tmp166_ = self->priv->signals_map;
	_tmp167_ = self->priv->_project;
	_tmp168_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp167_, "count-updated", (GCallback) __layouts_project_row___lambda253__objects_base_object_count_updated, self, 0);
	_tmp169_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp166_, (gpointer) ((guintptr) _tmp168_), (GObject*) _tmp169_);
	_tmp170_ = self->priv->signals_map;
	_tmp171_ = self->priv->_project;
	_tmp172_ = g_signal_connect_object (_tmp171_, "subproject-added", (GCallback) __layouts_project_row___lambda254__objects_project_subproject_added, self, 0);
	_tmp173_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp170_, (gpointer) ((guintptr) _tmp172_), (GObject*) _tmp173_);
	_tmp174_ = self->priv->signals_map;
	_tmp175_ = services_event_bus_get_default ();
	_tmp176_ = _tmp175_;
	_tmp177_ = g_signal_connect_object (_tmp176_, "project-parent-changed", (GCallback) __layouts_project_row___lambda255__services_event_bus_project_parent_changed, self, 0);
	_tmp178_ = services_event_bus_get_default ();
	_tmp179_ = _tmp178_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp174_, (gpointer) ((guintptr) _tmp177_), (GObject*) _tmp179_);
	_g_object_unref0 (_tmp179_);
	_g_object_unref0 (_tmp176_);
	_tmp180_ = self->priv->signals_map;
	_tmp181_ = services_event_bus_get_default ();
	_tmp182_ = _tmp181_;
	_tmp183_ = g_signal_connect_object (_tmp182_, "update-inserted-project-map", (GCallback) __layouts_project_row___lambda256__services_event_bus_update_inserted_project_map, self, 0);
	_tmp184_ = services_event_bus_get_default ();
	_tmp185_ = _tmp184_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp180_, (gpointer) ((guintptr) _tmp183_), (GObject*) _tmp185_);
	_g_object_unref0 (_tmp185_);
	_g_object_unref0 (_tmp182_);
	_tmp186_ = self->priv->signals_map;
	_tmp187_ = self->priv->_project;
	_tmp188_ = g_signal_connect_object ((ObjectsBaseObject*) _tmp187_, "loading-change", (GCallback) __layouts_project_row___lambda257__objects_base_object_loading_change, self, 0);
	_tmp189_ = self->priv->_project;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp186_, (gpointer) ((guintptr) _tmp188_), (GObject*) _tmp189_);
	_tmp190_ = self->priv->signals_map;
	_tmp191_ = services_event_bus_get_default ();
	_tmp192_ = _tmp191_;
	_tmp193_ = g_signal_connect_object (_tmp192_, "projects-drag-end", (GCallback) __layouts_project_row___lambda258__services_event_bus_projects_drag_end, self, 0);
	_tmp194_ = services_event_bus_get_default ();
	_tmp195_ = _tmp194_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp190_, (gpointer) ((guintptr) _tmp193_), (GObject*) _tmp195_);
	_g_object_unref0 (_tmp195_);
	_g_object_unref0 (_tmp192_);
	_tmp196_ = services_event_bus_get_default ();
	_tmp197_ = _tmp196_;
	g_signal_connect_object (_tmp197_, "projects-drag-begin", (GCallback) __layouts_project_row___lambda259__services_event_bus_projects_drag_begin, self, 0);
	_g_object_unref0 (_tmp197_);
	_tmp198_ = services_event_bus_get_default ();
	_tmp199_ = _tmp198_;
	g_signal_connect_object (_tmp199_, "projects-drag-end", (GCallback) __layouts_project_row___lambda260__services_event_bus_projects_drag_end, self, 0);
	_g_object_unref0 (_tmp199_);
	_tmp200_ = services_settings_get_default ();
	_tmp201_ = _tmp200_;
	_tmp202_ = _tmp201_->settings;
	g_signal_connect_object (_tmp202_, "changed::local-inbox-project-id", (GCallback) __layouts_project_row___lambda261__g_settings_changed, self, 0);
	_g_object_unref0 (_tmp201_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __layouts_project_row___lambda262__gtk_widget_destroy, self, 0);
	_g_object_unref0 (menu_gesture);
	_g_object_unref0 (select_gesture);
	_g_object_unref0 (box);
	_g_object_unref0 (listbox_grid);
	_g_object_unref0 (projectrow_box);
	_g_object_unref0 (loading_spinner);
	_g_object_unref0 (end_box);
	block24_data_unref (_data24_);
	_data24_ = NULL;
	return obj;
}

static void
layouts_project_row_class_init (LayoutsProjectRowClass * klass,
                                gpointer klass_data)
{
	layouts_project_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LayoutsProjectRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_layouts_project_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_layouts_project_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = layouts_project_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = layouts_project_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY] = g_param_spec_object ("project", "project", "project", OBJECTS_TYPE_PROJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY] = g_param_spec_boolean ("show-subprojects", "show-subprojects", "show-subprojects", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY] = g_param_spec_boolean ("drag-n-drop", "drag-n-drop", "drag-n-drop", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY] = g_param_spec_boolean ("reveal-child", "reveal-child", "reveal-child", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY, layouts_project_row_properties[LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY] = g_param_spec_boolean ("is-loading", "is-loading", "is-loading", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
layouts_project_row_instance_init (LayoutsProjectRow * self,
                                   gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	self->priv = layouts_project_row_get_instance_private (self);
	self->priv->menu_popover = NULL;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, LAYOUTS_TYPE_PROJECT_ROW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->subprojects_hashmap = _tmp0_;
	_tmp1_ = 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->signals_map = _tmp1_;
}

static void
layouts_project_row_finalize (GObject * obj)
{
	LayoutsProjectRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow);
	g_debug ("ProjectRow.vala:89: Destroying Layouts.ProjectRow\n");
	_g_object_unref0 (self->priv->_project);
	_g_object_unref0 (self->priv->icon_project);
	_g_object_unref0 (self->priv->name_label);
	_g_object_unref0 (self->priv->count_label);
	_g_object_unref0 (self->priv->count_revealer);
	_g_object_unref0 (self->priv->arrow_button);
	_g_object_unref0 (self->priv->arrow_revealer);
	_g_object_unref0 (self->priv->listbox);
	_g_object_unref0 (self->priv->handle_grid);
	_g_object_unref0 (self->priv->listbox_revealer);
	_g_object_unref0 (self->priv->due_label);
	_g_object_unref0 (self->priv->menu_stack);
	_g_object_unref0 (self->priv->loading_revealer);
	_g_object_unref0 (self->main_content);
	_g_object_unref0 (self->main_revealer);
	_g_object_unref0 (self->priv->menu_popover);
	_g_object_unref0 (self->priv->favorite_item);
	_g_object_unref0 (self->priv->motion_top_grid);
	_g_object_unref0 (self->priv->motion_top_revealer);
	_g_object_unref0 (self->drop_target_end);
	_g_object_unref0 (self->drop_target_end_revealer);
	_g_object_unref0 (self->subprojects_hashmap);
	_g_object_unref0 (self->priv->signals_map);
	G_OBJECT_CLASS (layouts_project_row_parent_class)->finalize (obj);
}

static GType
layouts_project_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsProjectRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_project_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LayoutsProjectRow), 0, (GInstanceInitFunc) layouts_project_row_instance_init, NULL };
	GType layouts_project_row_type_id;
	layouts_project_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "LayoutsProjectRow", &g_define_type_info, 0);
	LayoutsProjectRow_private_offset = g_type_add_instance_private (layouts_project_row_type_id, sizeof (LayoutsProjectRowPrivate));
	return layouts_project_row_type_id;
}

GType
layouts_project_row_get_type (void)
{
	static volatile gsize layouts_project_row_type_id__once = 0;
	if (g_once_init_enter (&layouts_project_row_type_id__once)) {
		GType layouts_project_row_type_id;
		layouts_project_row_type_id = layouts_project_row_get_type_once ();
		g_once_init_leave (&layouts_project_row_type_id__once, layouts_project_row_type_id);
	}
	return layouts_project_row_type_id__once;
}

static void
_vala_layouts_project_row_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	LayoutsProjectRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow);
	switch (property_id) {
		case LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY:
		g_value_set_object (value, layouts_project_row_get_project (self));
		break;
		case LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY:
		g_value_set_boolean (value, layouts_project_row_get_show_subprojects (self));
		break;
		case LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY:
		g_value_set_boolean (value, layouts_project_row_get_drag_n_drop (self));
		break;
		case LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY:
		g_value_set_boolean (value, layouts_project_row_get_reveal_child (self));
		break;
		case LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY:
		g_value_set_boolean (value, layouts_project_row_get_is_loading (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_layouts_project_row_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	LayoutsProjectRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_PROJECT_ROW, LayoutsProjectRow);
	switch (property_id) {
		case LAYOUTS_PROJECT_ROW_PROJECT_PROPERTY:
		layouts_project_row_set_project (self, g_value_get_object (value));
		break;
		case LAYOUTS_PROJECT_ROW_SHOW_SUBPROJECTS_PROPERTY:
		layouts_project_row_set_show_subprojects (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_PROJECT_ROW_DRAG_N_DROP_PROPERTY:
		layouts_project_row_set_drag_n_drop (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_PROJECT_ROW_REVEAL_CHILD_PROPERTY:
		layouts_project_row_set_reveal_child (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_PROJECT_ROW_IS_LOADING_PROPERTY:
		layouts_project_row_set_is_loading (self, g_value_get_boolean (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);
}

