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

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

#include <adwaita.h>
#include <glib-object.h>
#include "planify.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>

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

#define DIALOGS_TYPE_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;
typedef struct _DialogsProjectPrivate DialogsProjectPrivate;

#define WIDGETS_TYPE_COLOR_PICKER_ROW (widgets_color_picker_row_get_type ())
#define WIDGETS_COLOR_PICKER_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COLOR_PICKER_ROW, WidgetsColorPickerRow))
#define WIDGETS_COLOR_PICKER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COLOR_PICKER_ROW, WidgetsColorPickerRowClass))
#define WIDGETS_IS_COLOR_PICKER_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COLOR_PICKER_ROW))
#define WIDGETS_IS_COLOR_PICKER_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COLOR_PICKER_ROW))
#define WIDGETS_COLOR_PICKER_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COLOR_PICKER_ROW, WidgetsColorPickerRowClass))

typedef struct _WidgetsColorPickerRow WidgetsColorPickerRow;
typedef struct _WidgetsColorPickerRowClass WidgetsColorPickerRowClass;

#define WIDGETS_TYPE_COMBO_WRAP_ROW (widgets_combo_wrap_row_get_type ())
#define WIDGETS_COMBO_WRAP_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow))
#define WIDGETS_COMBO_WRAP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRowClass))
#define WIDGETS_IS_COMBO_WRAP_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW))
#define WIDGETS_IS_COMBO_WRAP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMBO_WRAP_ROW))
#define WIDGETS_COMBO_WRAP_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRowClass))

typedef struct _WidgetsComboWrapRow WidgetsComboWrapRow;
typedef struct _WidgetsComboWrapRowClass WidgetsComboWrapRowClass;
enum  {
	DIALOGS_PROJECT_0_PROPERTY,
	DIALOGS_PROJECT_PROJECT_PROPERTY,
	DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY,
	DIALOGS_PROJECT_HEADER_TITLE_PROPERTY,
	DIALOGS_PROJECT_IS_CREATING_PROPERTY,
	DIALOGS_PROJECT_NUM_PROPERTIES
};
static GParamSpec* dialogs_project_properties[DIALOGS_PROJECT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block80Data Block80Data;
#define _http_response_unref0(var) ((var == NULL) ? NULL : (var = (http_response_unref (var), NULL)))
typedef struct _DialogsProjectUpdateProjectData DialogsProjectUpdateProjectData;
typedef struct _Block81Data Block81Data;
typedef struct _Block82Data Block82Data;
typedef struct _Block83Data Block83Data;

struct _DialogsProject {
	AdwDialog parent_instance;
	DialogsProjectPrivate * priv;
};

struct _DialogsProjectClass {
	AdwDialogClass parent_class;
};

struct _DialogsProjectPrivate {
	ObjectsProject* _project;
	gboolean _backend_picker;
	gchar* _header_title;
	GtkStack* emoji_color_stack;
	WidgetsCircularProgressBar* progress_bar;
	AdwEntryRow* name_entry;
	WidgetsColorPickerRow* color_picker_row;
	WidgetsLoadingButton* submit_button;
	WidgetsComboWrapRow* markdown_row;
	GtkSwitch* emoji_switch;
	GtkLabel* emoji_label;
	GtkLabel* source_selected_label;
	WidgetsTextView* description_textview;
	AdwNavigationView* navigation_view;
	AdwNavigationPage* sources_page;
	GeeHashMap* signal_map;
};

struct _Block80Data {
	int _ref_count_;
	DialogsProject* self;
	ObjectsSource* source;
};

struct _DialogsProjectUpdateProjectData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DialogsProject* self;
	ObjectsProject* _tmp0_;
	SourceType _tmp1_;
	SourceType _tmp2_;
	ServicesStore* _tmp3_;
	ObjectsProject* _tmp4_;
	HttpResponse* response;
	ObjectsProject* _tmp5_;
	SourceType _tmp6_;
	SourceType _tmp7_;
	ServicesTodoist* _tmp8_;
	ServicesTodoist* _tmp9_;
	ObjectsProject* _tmp10_;
	HttpResponse* _tmp11_;
	ObjectsProject* _tmp12_;
	SourceType _tmp13_;
	SourceType _tmp14_;
	ServicesCalDAVCalDAVClient* caldav_client;
	ServicesCalDAVCore* _tmp15_;
	ServicesCalDAVCore* _tmp16_;
	ObjectsProject* _tmp17_;
	ObjectsSource* _tmp18_;
	ObjectsSource* _tmp19_;
	ServicesCalDAVCalDAVClient* _tmp20_;
	ServicesCalDAVCalDAVClient* _tmp21_;
	ServicesCalDAVCalDAVClient* _tmp22_;
	ObjectsProject* _tmp23_;
	HttpResponse* _tmp24_;
	HttpResponse* _tmp25_;
	gboolean _tmp26_;
	gboolean _tmp27_;
	ServicesStore* _tmp28_;
	ObjectsProject* _tmp29_;
	ServicesEventBus* _tmp30_;
	ServicesEventBus* _tmp31_;
	HttpResponse* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	HttpResponse* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
};

struct _Block81Data {
	int _ref_count_;
	DialogsProject* self;
	ServicesCalDAVCalDAVClient* caldav_client;
};

struct _Block82Data {
	int _ref_count_;
	DialogsProject* self;
	gchar* id;
};

struct _Block83Data {
	int _ref_count_;
	DialogsProject* self;
	GtkEmojiChooser* emoji_chooser;
	GtkRevealer* color_box_revealer;
};

static gint DialogsProject_private_offset;
static gpointer dialogs_project_parent_class = NULL;

VALA_EXTERN GType dialogs_project_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsProject, g_object_unref)
VALA_EXTERN GType widgets_color_picker_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsColorPickerRow, g_object_unref)
VALA_EXTERN GType widgets_combo_wrap_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsComboWrapRow, g_object_unref)
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 DialogsProject* dialogs_project_new (ObjectsProject* project);
VALA_EXTERN DialogsProject* dialogs_project_construct (GType object_type,
                                           ObjectsProject* project);
static AdwNavigationPage* dialogs_project_get_sources_page (DialogsProject* self);
static Block80Data* block80_data_ref (Block80Data* _data80_);
static void block80_data_unref (void * _userdata_);
VALA_EXTERN ObjectsProject* dialogs_project_get_project (DialogsProject* self);
static void _____lambda25_ (Block80Data* _data80_);
static void ______lambda25__adw_action_row_activated (AdwActionRow* _sender,
                                               gpointer self);
static void _____lambda26_ (Block80Data* _data80_);
static void ______lambda26__gtk_check_button_toggled (GtkCheckButton* _sender,
                                               gpointer self);
static void dialogs_project_add_update_project (DialogsProject* self);
VALA_EXTERN const gchar* widgets_color_picker_row_get_color (WidgetsColorPickerRow* self);
VALA_EXTERN gint widgets_combo_wrap_row_get_selected (WidgetsComboWrapRow* self);
VALA_EXTERN gboolean dialogs_project_get_is_creating (DialogsProject* self);
static void dialogs_project_update_project (DialogsProject* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
static void dialogs_project_update_project_finish (DialogsProject* self,
                                            GAsyncResult* _res_);
static void dialogs_project_add_project (DialogsProject* self);
static void dialogs_project_update_project_data_free (gpointer _data);
static gboolean dialogs_project_update_project_co (DialogsProjectUpdateProjectData* _data_);
static void dialogs_project_update_project_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
VALA_EXTERN void dialogs_project_go_project (DialogsProject* self,
                                 const gchar* id);
static void ____lambda28_ (DialogsProject* self,
                    GObject* obj,
                    GAsyncResult* res);
static void _____lambda28__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static Block81Data* block81_data_ref (Block81Data* _data81_);
static void block81_data_unref (void * _userdata_);
static void _____lambda29_ (Block81Data* _data81_,
                     GObject* obj,
                     GAsyncResult* res);
static void ______lambda29__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static Block82Data* block82_data_ref (Block82Data* _data82_);
static void block82_data_unref (void * _userdata_);
static gboolean __lambda27_ (Block82Data* _data82_);
static gboolean ___lambda27__gsource_func (gpointer self);
VALA_EXTERN void dialogs_project_clean_up (DialogsProject* self);
VALA_EXTERN void widgets_color_picker_row_clean_up (WidgetsColorPickerRow* self);
static void dialogs_project_set_project (DialogsProject* self,
                                  ObjectsProject* value);
VALA_EXTERN gboolean dialogs_project_get_backend_picker (DialogsProject* self);
static void dialogs_project_set_backend_picker (DialogsProject* self,
                                         gboolean value);
VALA_EXTERN const gchar* dialogs_project_get_header_title (DialogsProject* self);
static void dialogs_project_set_header_title (DialogsProject* self,
                                       const gchar* value);
static GObject * dialogs_project_constructor (GType type,
                                       guint n_construct_properties,
                                       GObjectConstructParam * construct_properties);
static Block83Data* block83_data_ref (Block83Data* _data83_);
static void block83_data_unref (void * _userdata_);
VALA_EXTERN WidgetsColorPickerRow* widgets_color_picker_row_new (void);
VALA_EXTERN WidgetsColorPickerRow* widgets_color_picker_row_construct (GType object_type);
VALA_EXTERN WidgetsComboWrapRow* widgets_combo_wrap_row_new (void);
VALA_EXTERN WidgetsComboWrapRow* widgets_combo_wrap_row_construct (GType object_type);
VALA_EXTERN void widgets_combo_wrap_row_set_title (WidgetsComboWrapRow* self,
                                       const gchar* value);
VALA_EXTERN void widgets_combo_wrap_row_set_subtitle (WidgetsComboWrapRow* self,
                                          const gchar* value);
VALA_EXTERN void widgets_combo_wrap_row_set_model (WidgetsComboWrapRow* self,
                                       GtkStringList* value);
VALA_EXTERN void widgets_combo_wrap_row_set_selected (WidgetsComboWrapRow* self,
                                          gint value);
static gboolean _dialogs_project___lambda30_ (DialogsProject* self);
VALA_EXTERN void widgets_color_picker_row_set_color (WidgetsColorPickerRow* self,
                                         const gchar* value);
static gboolean __dialogs_project___lambda30__gsource_func (gpointer self);
static void _dialogs_project_add_update_project_adw_entry_row_entry_activated (AdwEntryRow* _sender,
                                                                        gpointer self);
static void _dialogs_project_add_update_project_gtk_button_clicked (GtkButton* _sender,
                                                             gpointer self);
static void _dialogs_project___lambda31_ (DialogsProject* self,
                                   const gchar* emoji);
static void __dialogs_project___lambda31__gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                                   const gchar* text,
                                                                   gpointer self);
static void _dialogs_project___lambda32_ (Block83Data* _data83_);
static void __dialogs_project___lambda32__g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self);
static void _dialogs_project___lambda33_ (DialogsProject* self);
static void __dialogs_project___lambda33__widgets_color_picker_row_color_changed (WidgetsColorPickerRow* _sender,
                                                                           gpointer self);
static void _dialogs_project___lambda34_ (Block83Data* _data83_);
static void __dialogs_project___lambda34__gtk_button_clicked (GtkButton* _sender,
                                                       gpointer self);
static void _dialogs_project___lambda35_ (DialogsProject* self);
static void __dialogs_project___lambda35__adw_action_row_activated (AdwActionRow* _sender,
                                                             gpointer self);
static void _dialogs_project___lambda36_ (DialogsProject* self);
static void __dialogs_project___lambda36__adw_dialog_closed (AdwDialog* _sender,
                                                      gpointer self);
static void dialogs_project_finalize (GObject * obj);
static GType dialogs_project_get_type_once (void);
static void _vala_dialogs_project_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec);
static void _vala_dialogs_project_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
dialogs_project_get_instance_private (DialogsProject* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsProject_private_offset);
}

DialogsProject*
dialogs_project_construct_new (GType object_type,
                               const gchar* source_id,
                               gboolean backend_picker,
                               const gchar* parent_id)
{
	DialogsProject * self = NULL;
	ObjectsProject* project = NULL;
	ObjectsProject* _tmp0_;
	ObjectsProject* _tmp1_;
	ObjectsProject* _tmp2_;
	ObjectsProject* _tmp3_;
	ObjectsProject* _tmp4_;
	ObjectsProject* _tmp5_;
	gchar* _tmp6_ = NULL;
	ObjectsProject* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	ObjectsProject* _tmp19_;
	g_return_val_if_fail (source_id != NULL, NULL);
	g_return_val_if_fail (parent_id != NULL, NULL);
	_tmp0_ = objects_project_new ();
	project = _tmp0_;
	_tmp1_ = project;
	objects_base_object_set_color ((ObjectsBaseObject*) _tmp1_, "blue");
	_tmp2_ = project;
	objects_project_set_emoji (_tmp2_, "🚀️");
	_tmp3_ = project;
	objects_base_object_set_id ((ObjectsBaseObject*) _tmp3_, "");
	_tmp4_ = project;
	objects_project_set_parent_id (_tmp4_, parent_id);
	_tmp5_ = project;
	objects_project_set_source_id (_tmp5_, source_id);
	_tmp7_ = project;
	_tmp8_ = objects_project_get_parent_id (_tmp7_);
	_tmp9_ = _tmp8_;
	if (g_strcmp0 (_tmp9_, "") == 0) {
		gchar* _tmp10_;
		_tmp10_ = g_strdup (_ ("New Project"));
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp10_;
	} else {
		ObjectsProject* _tmp11_;
		ObjectsProject* _tmp12_;
		ObjectsProject* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp11_ = project;
		_tmp12_ = objects_project_get_parent (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_strconcat (_tmp15_, " → ", NULL);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strconcat (_tmp17_, _ ("New Project"), NULL);
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp18_;
		_g_free0 (_tmp17_);
	}
	_tmp19_ = project;
	self = (DialogsProject*) g_object_new (object_type, "project", _tmp19_, "backend-picker", backend_picker, "header-title", _tmp6_, NULL);
	_g_free0 (_tmp6_);
	_g_object_unref0 (project);
	return self;
}

DialogsProject*
dialogs_project_new_new (const gchar* source_id,
                         gboolean backend_picker,
                         const gchar* parent_id)
{
	return dialogs_project_construct_new (DIALOGS_TYPE_PROJECT, source_id, backend_picker, parent_id);
}

DialogsProject*
dialogs_project_construct (GType object_type,
                           ObjectsProject* project)
{
	DialogsProject * self = NULL;
	g_return_val_if_fail (project != NULL, NULL);
	self = (DialogsProject*) g_object_new (object_type, "project", project, "backend-picker", FALSE, "header-title", _ ("Edit Project"), NULL);
	return self;
}

DialogsProject*
dialogs_project_new (ObjectsProject* project)
{
	return dialogs_project_construct (DIALOGS_TYPE_PROJECT, project);
}

static Block80Data*
block80_data_ref (Block80Data* _data80_)
{
	g_atomic_int_inc (&_data80_->_ref_count_);
	return _data80_;
}

static void
block80_data_unref (void * _userdata_)
{
	Block80Data* _data80_;
	_data80_ = (Block80Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data80_->_ref_count_)) {
		DialogsProject* self;
		self = _data80_->self;
		_g_object_unref0 (_data80_->source);
		_g_object_unref0 (self);
		g_slice_free (Block80Data, _data80_);
	}
}

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

static void
_____lambda25_ (Block80Data* _data80_)
{
	DialogsProject* self;
	ObjectsProject* _tmp0_;
	ObjectsSource* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkLabel* _tmp4_;
	ObjectsSource* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkLabel* _tmp8_;
	ObjectsSource* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	AdwNavigationView* _tmp12_;
	self = _data80_->self;
	_tmp0_ = self->priv->_project;
	_tmp1_ = _data80_->source;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	objects_project_set_source_id (_tmp0_, _tmp3_);
	_tmp4_ = self->priv->source_selected_label;
	_tmp5_ = _data80_->source;
	_tmp6_ = objects_source_get_display_name (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_label_set_label (_tmp4_, _tmp7_);
	_tmp8_ = self->priv->source_selected_label;
	_tmp9_ = _data80_->source;
	_tmp10_ = objects_source_get_subheader_text (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp11_);
	_tmp12_ = self->priv->navigation_view;
	adw_navigation_view_pop (_tmp12_);
}

static void
______lambda25__adw_action_row_activated (AdwActionRow* _sender,
                                          gpointer self)
{
	_____lambda25_ (self);
}

static void
_____lambda26_ (Block80Data* _data80_)
{
	DialogsProject* self;
	ObjectsProject* _tmp0_;
	ObjectsSource* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GtkLabel* _tmp4_;
	ObjectsSource* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GtkLabel* _tmp8_;
	ObjectsSource* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	AdwNavigationView* _tmp12_;
	self = _data80_->self;
	_tmp0_ = self->priv->_project;
	_tmp1_ = _data80_->source;
	_tmp2_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	objects_project_set_source_id (_tmp0_, _tmp3_);
	_tmp4_ = self->priv->source_selected_label;
	_tmp5_ = _data80_->source;
	_tmp6_ = objects_source_get_display_name (_tmp5_);
	_tmp7_ = _tmp6_;
	gtk_label_set_label (_tmp4_, _tmp7_);
	_tmp8_ = self->priv->source_selected_label;
	_tmp9_ = _data80_->source;
	_tmp10_ = objects_source_get_subheader_text (_tmp9_);
	_tmp11_ = _tmp10_;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp8_, _tmp11_);
	_tmp12_ = self->priv->navigation_view;
	adw_navigation_view_pop (_tmp12_);
}

static void
______lambda26__gtk_check_button_toggled (GtkCheckButton* _sender,
                                          gpointer self)
{
	_____lambda26_ (self);
}

static AdwNavigationPage*
dialogs_project_get_sources_page (DialogsProject* self)
{
	AdwHeaderBar* headerbar = NULL;
	AdwHeaderBar* _tmp0_;
	AdwHeaderBar* _tmp1_;
	AdwPreferencesGroup* sources_group = NULL;
	AdwPreferencesGroup* _tmp2_ = NULL;
	GtkCheckButton* none_radio = NULL;
	GtkCheckButton* _tmp3_;
	AdwClamp* content_clamp = NULL;
	AdwPreferencesGroup* _tmp49_;
	GtkWidget* _tmp50_;
	AdwClamp* _tmp51_ = NULL;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp52_;
	AdwHeaderBar* _tmp53_;
	AdwNavigationPage* navigation_page = NULL;
	AdwNavigationPage* _tmp54_;
	AdwNavigationPage* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp0_);
	headerbar = _tmp0_;
	_tmp1_ = headerbar;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "flat");
	_tmp2_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 6);
	g_object_ref_sink (_tmp2_);
	sources_group = _tmp2_;
	_tmp3_ = (GtkCheckButton*) gtk_check_button_new ();
	g_object_ref_sink (_tmp3_);
	none_radio = _tmp3_;
	{
		GeeArrayList* _source_list = NULL;
		ServicesStore* _tmp4_;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gint _source_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _source_index = 0;
		_tmp4_ = services_store_instance ();
		_tmp5_ = services_store_get_sources (_tmp4_);
		_tmp6_ = _tmp5_;
		_source_list = _tmp6_;
		_tmp7_ = _source_list;
		_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_source_size = _tmp9_;
		_source_index = -1;
		while (TRUE) {
			Block80Data* _data80_;
			gint _tmp10_;
			gint _tmp11_;
			GeeArrayList* _tmp12_;
			gpointer _tmp13_;
			ObjectsSource* _tmp14_;
			gboolean _tmp15_;
			gboolean _tmp16_;
			_data80_ = g_slice_new0 (Block80Data);
			_data80_->_ref_count_ = 1;
			_data80_->self = g_object_ref (self);
			_source_index = _source_index + 1;
			_tmp10_ = _source_index;
			_tmp11_ = _source_size;
			if (!(_tmp10_ < _tmp11_)) {
				block80_data_unref (_data80_);
				_data80_ = NULL;
				break;
			}
			_tmp12_ = _source_list;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _source_index);
			_data80_->source = (ObjectsSource*) _tmp13_;
			_tmp14_ = _data80_->source;
			_tmp15_ = objects_source_get_is_visible (_tmp14_);
			_tmp16_ = _tmp15_;
			if (_tmp16_) {
				GtkCheckButton* radio_button = NULL;
				GtkCheckButton* _tmp17_;
				GtkCheckButton* _tmp18_;
				ObjectsProject* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				ObjectsSource* _tmp22_;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
				GtkCheckButton* _tmp25_ = NULL;
				AdwActionRow* source_row = NULL;
				ObjectsSource* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				gchar* _tmp29_;
				ObjectsSource* _tmp30_;
				const gchar* _tmp31_;
				const gchar* _tmp32_;
				gchar* _tmp33_;
				AdwActionRow* _tmp34_ = NULL;
				AdwActionRow* _tmp35_;
				GtkCheckButton* _tmp36_;
				AdwActionRow* _tmp37_;
				GtkCheckButton* _tmp38_;
				GeeHashMap* _tmp39_;
				AdwActionRow* _tmp40_;
				gulong _tmp41_;
				AdwActionRow* _tmp42_;
				GeeHashMap* _tmp43_;
				GtkCheckButton* _tmp44_;
				gulong _tmp45_;
				GtkCheckButton* _tmp46_;
				AdwPreferencesGroup* _tmp47_;
				AdwActionRow* _tmp48_;
				_tmp17_ = none_radio;
				_tmp18_ = _g_object_ref0 (_tmp17_);
				_tmp19_ = self->priv->_project;
				_tmp20_ = objects_project_get_source_id (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = _data80_->source;
				_tmp23_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp22_);
				_tmp24_ = _tmp23_;
				_tmp25_ = (GtkCheckButton*) gtk_check_button_new ();
				gtk_check_button_set_group (_tmp25_, _tmp18_);
				_g_object_unref0 (_tmp18_);
				gtk_check_button_set_active (_tmp25_, g_strcmp0 (_tmp21_, _tmp24_) == 0);
				g_object_ref_sink (_tmp25_);
				radio_button = _tmp25_;
				_tmp26_ = _data80_->source;
				_tmp27_ = objects_source_get_display_name (_tmp26_);
				_tmp28_ = _tmp27_;
				_tmp29_ = g_strdup (_tmp28_);
				_tmp30_ = _data80_->source;
				_tmp31_ = objects_source_get_subheader_text (_tmp30_);
				_tmp32_ = _tmp31_;
				_tmp33_ = g_strdup (_tmp32_);
				_tmp34_ = (AdwActionRow*) adw_action_row_new ();
				gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp34_, TRUE);
				adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp34_, _tmp29_);
				_g_free0 (_tmp29_);
				adw_action_row_set_subtitle (_tmp34_, _tmp33_);
				_g_free0 (_tmp33_);
				g_object_ref_sink (_tmp34_);
				source_row = _tmp34_;
				_tmp35_ = source_row;
				_tmp36_ = radio_button;
				adw_action_row_add_suffix (_tmp35_, (GtkWidget*) _tmp36_);
				_tmp37_ = source_row;
				_tmp38_ = radio_button;
				adw_action_row_set_activatable_widget (_tmp37_, (GtkWidget*) _tmp38_);
				_tmp39_ = self->priv->signal_map;
				_tmp40_ = source_row;
				_tmp41_ = g_signal_connect_data (_tmp40_, "activated", (GCallback) ______lambda25__adw_action_row_activated, block80_data_ref (_data80_), (GClosureNotify) block80_data_unref, 0);
				_tmp42_ = source_row;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp39_, (gpointer) ((guintptr) _tmp41_), (GObject*) _tmp42_);
				_tmp43_ = self->priv->signal_map;
				_tmp44_ = radio_button;
				_tmp45_ = g_signal_connect_data (_tmp44_, "toggled", (GCallback) ______lambda26__gtk_check_button_toggled, block80_data_ref (_data80_), (GClosureNotify) block80_data_unref, 0);
				_tmp46_ = radio_button;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp43_, (gpointer) ((guintptr) _tmp45_), (GObject*) _tmp46_);
				_tmp47_ = sources_group;
				_tmp48_ = source_row;
				adw_preferences_group_add (_tmp47_, (GtkWidget*) _tmp48_);
				_g_object_unref0 (source_row);
				_g_object_unref0 (radio_button);
			}
			block80_data_unref (_data80_);
			_data80_ = NULL;
		}
	}
	_tmp49_ = sources_group;
	_tmp50_ = _g_object_ref0 ((GtkWidget*) _tmp49_);
	_tmp51_ = (AdwClamp*) adw_clamp_new ();
	adw_clamp_set_maximum_size (_tmp51_, 600);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp51_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp51_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp51_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp51_, 6);
	adw_clamp_set_child (_tmp51_, _tmp50_);
	_g_object_unref0 (_tmp50_);
	g_object_ref_sink (_tmp51_);
	content_clamp = _tmp51_;
	_tmp52_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp52_);
	toolbar_view = _tmp52_;
	_tmp53_ = headerbar;
	adw_toolbar_view_add_top_bar (toolbar_view, (GtkWidget*) _tmp53_);
	adw_toolbar_view_set_content (toolbar_view, (GtkWidget*) content_clamp);
	_tmp54_ = adw_navigation_page_new ((GtkWidget*) toolbar_view, _ ("Sources"));
	g_object_ref_sink (_tmp54_);
	navigation_page = _tmp54_;
	result = navigation_page;
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (none_radio);
	_g_object_unref0 (sources_group);
	_g_object_unref0 (headerbar);
	return result;
}

static void
dialogs_project_add_update_project (DialogsProject* self)
{
	AdwEntryRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	ObjectsProject* _tmp5_;
	AdwEntryRow* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	ObjectsProject* _tmp9_;
	WidgetsColorPickerRow* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	ProjectIconStyle _tmp13_ = 0;
	GtkSwitch* _tmp14_;
	gboolean _tmp15_;
	gboolean _tmp16_;
	ObjectsProject* _tmp17_;
	ObjectsProject* _tmp18_;
	GtkLabel* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	ObjectsProject* _tmp22_;
	WidgetsTextView* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	ObjectsProject* _tmp26_;
	WidgetsComboWrapRow* _tmp27_;
	gint _tmp28_;
	gint _tmp29_;
	WidgetsLoadingButton* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->name_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ <= 0) {
		adw_dialog_close ((AdwDialog*) self);
		return;
	}
	_tmp5_ = self->priv->_project;
	_tmp6_ = self->priv->name_entry;
	_tmp7_ = gtk_editable_get_text ((GtkEditable*) _tmp6_);
	_tmp8_ = _tmp7_;
	objects_base_object_set_name ((ObjectsBaseObject*) _tmp5_, _tmp8_);
	_tmp9_ = self->priv->_project;
	_tmp10_ = self->priv->color_picker_row;
	_tmp11_ = widgets_color_picker_row_get_color (_tmp10_);
	_tmp12_ = _tmp11_;
	objects_base_object_set_color ((ObjectsBaseObject*) _tmp9_, _tmp12_);
	_tmp14_ = self->priv->emoji_switch;
	_tmp15_ = gtk_switch_get_active (_tmp14_);
	_tmp16_ = _tmp15_;
	if (_tmp16_) {
		_tmp13_ = PROJECT_ICON_STYLE_EMOJI;
	} else {
		_tmp13_ = PROJECT_ICON_STYLE_PROGRESS;
	}
	_tmp17_ = self->priv->_project;
	objects_project_set_icon_style (_tmp17_, _tmp13_);
	_tmp18_ = self->priv->_project;
	_tmp19_ = self->priv->emoji_label;
	_tmp20_ = gtk_label_get_label (_tmp19_);
	_tmp21_ = _tmp20_;
	objects_project_set_emoji (_tmp18_, _tmp21_);
	_tmp22_ = self->priv->_project;
	_tmp23_ = self->priv->description_textview;
	_tmp24_ = widgets_text_view_get_text (_tmp23_);
	_tmp25_ = _tmp24_;
	objects_project_set_description (_tmp22_, _tmp25_);
	_g_free0 (_tmp25_);
	_tmp26_ = self->priv->_project;
	_tmp27_ = self->priv->markdown_row;
	_tmp28_ = widgets_combo_wrap_row_get_selected (_tmp27_);
	_tmp29_ = _tmp28_;
	objects_project_set_markdown_setting (_tmp26_, (MarkdownSetting) _tmp29_);
	_tmp30_ = self->priv->submit_button;
	widgets_loading_button_set_is_loading (_tmp30_, TRUE);
	_tmp31_ = dialogs_project_get_is_creating (self);
	_tmp32_ = _tmp31_;
	if (!_tmp32_) {
		dialogs_project_update_project (self, NULL, NULL);
	} else {
		dialogs_project_add_project (self);
	}
}

static void
dialogs_project_update_project_data_free (gpointer _data)
{
	DialogsProjectUpdateProjectData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DialogsProjectUpdateProjectData, _data_);
}

static void
dialogs_project_update_project (DialogsProject* self,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	DialogsProjectUpdateProjectData* _data_;
	DialogsProject* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (DialogsProjectUpdateProjectData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dialogs_project_update_project_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	dialogs_project_update_project_co (_data_);
}

static void
dialogs_project_update_project_finish (DialogsProject* self,
                                       GAsyncResult* _res_)
{
	DialogsProjectUpdateProjectData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
dialogs_project_update_project_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	DialogsProjectUpdateProjectData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dialogs_project_update_project_co (_data_);
}

static gboolean
dialogs_project_update_project_co (DialogsProjectUpdateProjectData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_project;
	_data_->_tmp1_ = objects_project_get_source_type (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	if (_data_->_tmp2_ == SOURCE_TYPE_LOCAL) {
		_data_->_tmp3_ = services_store_instance ();
		_data_->_tmp4_ = _data_->self->priv->_project;
		services_store_update_project (_data_->_tmp3_, _data_->_tmp4_);
		adw_dialog_close ((AdwDialog*) _data_->self);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->self->priv->_project;
	_data_->_tmp6_ = objects_project_get_source_type (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	if (_data_->_tmp7_ == SOURCE_TYPE_TODOIST) {
		_data_->_tmp8_ = services_todoist_get_default ();
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = _data_->self->priv->_project;
		_data_->_state_ = 1;
		services_todoist_update (_data_->_tmp9_, (ObjectsBaseObject*) _data_->_tmp10_, dialogs_project_update_project_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp11_ = services_todoist_update_finish (_data_->_tmp9_, _data_->_res_);
		_http_response_unref0 (_data_->response);
		_data_->response = _data_->_tmp11_;
		_g_object_unref0 (_data_->_tmp9_);
	} else {
		_data_->_tmp12_ = _data_->self->priv->_project;
		_data_->_tmp13_ = objects_project_get_source_type (_data_->_tmp12_);
		_data_->_tmp14_ = _data_->_tmp13_;
		if (_data_->_tmp14_ == SOURCE_TYPE_CALDAV) {
			_data_->_tmp15_ = services_cal_dav_core_get_default ();
			_data_->_tmp16_ = _data_->_tmp15_;
			_data_->_tmp17_ = _data_->self->priv->_project;
			_data_->_tmp18_ = objects_project_get_source (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp20_ = services_cal_dav_core_get_client (_data_->_tmp16_, _data_->_tmp19_);
			_data_->_tmp21_ = _data_->_tmp20_;
			_g_object_unref0 (_data_->_tmp16_);
			_data_->caldav_client = _data_->_tmp21_;
			_data_->_tmp22_ = _data_->caldav_client;
			_data_->_tmp23_ = _data_->self->priv->_project;
			_data_->_state_ = 2;
			services_cal_dav_cal_dav_client_update_project (_data_->_tmp22_, _data_->_tmp23_, dialogs_project_update_project_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp24_ = services_cal_dav_cal_dav_client_update_project_finish (_data_->_tmp22_, _data_->_res_);
			_http_response_unref0 (_data_->response);
			_data_->response = _data_->_tmp24_;
			_g_object_unref0 (_data_->caldav_client);
		} else {
			adw_dialog_close ((AdwDialog*) _data_->self);
			_http_response_unref0 (_data_->response);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->_tmp25_ = _data_->response;
	_data_->_tmp26_ = http_response_get_status (_data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	if (_data_->_tmp27_) {
		_data_->_tmp28_ = services_store_instance ();
		_data_->_tmp29_ = _data_->self->priv->_project;
		services_store_update_project (_data_->_tmp28_, _data_->_tmp29_);
		adw_dialog_close ((AdwDialog*) _data_->self);
	} else {
		_data_->_tmp30_ = services_event_bus_get_default ();
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp32_ = _data_->response;
		_data_->_tmp33_ = http_response_get_error_code (_data_->_tmp32_);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_tmp35_ = _data_->response;
		_data_->_tmp36_ = http_response_get_error (_data_->_tmp35_);
		_data_->_tmp37_ = _data_->_tmp36_;
		g_signal_emit_by_name (_data_->_tmp31_, "send-error-toast", _data_->_tmp34_, _data_->_tmp37_);
		_g_object_unref0 (_data_->_tmp31_);
		adw_dialog_close ((AdwDialog*) _data_->self);
	}
	_http_response_unref0 (_data_->response);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
____lambda28_ (DialogsProject* self,
               GObject* obj,
               GAsyncResult* res)
{
	HttpResponse* response = NULL;
	ServicesTodoist* _tmp0_;
	ServicesTodoist* _tmp1_;
	HttpResponse* _tmp2_;
	HttpResponse* _tmp3_;
	HttpResponse* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	g_return_if_fail (res != NULL);
	_tmp0_ = services_todoist_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = services_todoist_add_finish (_tmp1_, res);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp1_);
	response = _tmp3_;
	_tmp4_ = response;
	_tmp5_ = http_response_get_status (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		ObjectsProject* _tmp7_;
		HttpResponse* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		ServicesStore* _tmp11_;
		ObjectsProject* _tmp12_;
		ObjectsProject* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		_tmp7_ = self->priv->_project;
		_tmp8_ = response;
		_tmp9_ = http_response_get_data (_tmp8_);
		_tmp10_ = _tmp9_;
		objects_base_object_set_id ((ObjectsBaseObject*) _tmp7_, _tmp10_);
		_tmp11_ = services_store_instance ();
		_tmp12_ = self->priv->_project;
		services_store_insert_project (_tmp11_, _tmp12_);
		_tmp13_ = self->priv->_project;
		_tmp14_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp13_);
		_tmp15_ = _tmp14_;
		dialogs_project_go_project (self, _tmp15_);
	} else {
		ServicesEventBus* _tmp16_;
		ServicesEventBus* _tmp17_;
		HttpResponse* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		HttpResponse* _tmp21_;
		const gchar* _tmp22_;
		const gchar* _tmp23_;
		_tmp16_ = services_event_bus_get_default ();
		_tmp17_ = _tmp16_;
		_tmp18_ = response;
		_tmp19_ = http_response_get_error_code (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = response;
		_tmp22_ = http_response_get_error (_tmp21_);
		_tmp23_ = _tmp22_;
		g_signal_emit_by_name (_tmp17_, "send-error-toast", _tmp20_, _tmp23_);
		_g_object_unref0 (_tmp17_);
		adw_dialog_close ((AdwDialog*) self);
	}
	_http_response_unref0 (response);
}

static void
_____lambda28__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	____lambda28_ ((DialogsProject*) self, source_object, res);
	g_object_unref (self);
}

static Block81Data*
block81_data_ref (Block81Data* _data81_)
{
	g_atomic_int_inc (&_data81_->_ref_count_);
	return _data81_;
}

static void
block81_data_unref (void * _userdata_)
{
	Block81Data* _data81_;
	_data81_ = (Block81Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data81_->_ref_count_)) {
		DialogsProject* self;
		self = _data81_->self;
		_g_object_unref0 (_data81_->caldav_client);
		_g_object_unref0 (self);
		g_slice_free (Block81Data, _data81_);
	}
}

static void
_____lambda29_ (Block81Data* _data81_,
                GObject* obj,
                GAsyncResult* res)
{
	DialogsProject* self;
	HttpResponse* response = NULL;
	ServicesCalDAVCalDAVClient* _tmp0_;
	HttpResponse* _tmp1_;
	HttpResponse* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	self = _data81_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data81_->caldav_client;
	_tmp1_ = services_cal_dav_cal_dav_client_create_project_finish (_tmp0_, res);
	response = _tmp1_;
	_tmp2_ = response;
	_tmp3_ = http_response_get_status (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ServicesStore* _tmp5_;
		ObjectsProject* _tmp6_;
		ServicesCalDAVCalDAVClient* _tmp7_;
		ObjectsProject* _tmp8_;
		GCancellable* _tmp9_;
		GCancellable* _tmp10_;
		ObjectsProject* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp5_ = services_store_instance ();
		_tmp6_ = self->priv->_project;
		services_store_insert_project (_tmp5_, _tmp6_);
		_tmp7_ = _data81_->caldav_client;
		_tmp8_ = self->priv->_project;
		_tmp9_ = g_cancellable_new ();
		_tmp10_ = _tmp9_;
		services_cal_dav_cal_dav_client_update_sync_token (_tmp7_, _tmp8_, _tmp10_, NULL, NULL);
		_g_object_unref0 (_tmp10_);
		_tmp11_ = self->priv->_project;
		_tmp12_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp11_);
		_tmp13_ = _tmp12_;
		dialogs_project_go_project (self, _tmp13_);
	} else {
		ServicesEventBus* _tmp14_;
		ServicesEventBus* _tmp15_;
		HttpResponse* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		HttpResponse* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		_tmp14_ = services_event_bus_get_default ();
		_tmp15_ = _tmp14_;
		_tmp16_ = response;
		_tmp17_ = http_response_get_error_code (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = response;
		_tmp20_ = http_response_get_error (_tmp19_);
		_tmp21_ = _tmp20_;
		g_signal_emit_by_name (_tmp15_, "send-error-toast", _tmp18_, _tmp21_);
		_g_object_unref0 (_tmp15_);
		adw_dialog_close ((AdwDialog*) self);
	}
	_http_response_unref0 (response);
}

static void
______lambda29__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	_____lambda29_ (self, source_object, res);
	block81_data_unref (self);
}

static void
dialogs_project_add_project (DialogsProject* self)
{
	ObjectsProject* _tmp0_;
	ServicesStore* _tmp1_;
	ObjectsProject* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gboolean _tmp9_ = FALSE;
	ObjectsProject* _tmp10_;
	SourceType _tmp11_;
	SourceType _tmp12_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_project;
	_tmp1_ = services_store_instance ();
	_tmp2_ = self->priv->_project;
	_tmp3_ = objects_project_get_source_id (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = services_store_get_projects_by_source (_tmp1_, _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	objects_project_set_child_order (_tmp0_, _tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp10_ = self->priv->_project;
	_tmp11_ = objects_project_get_source_type (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == SOURCE_TYPE_LOCAL) {
		_tmp9_ = TRUE;
	} else {
		ObjectsProject* _tmp13_;
		SourceType _tmp14_;
		SourceType _tmp15_;
		_tmp13_ = self->priv->_project;
		_tmp14_ = objects_project_get_source_type (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp9_ = _tmp15_ == SOURCE_TYPE_NONE;
	}
	if (_tmp9_) {
		ObjectsProject* _tmp16_;
		Util* _tmp17_;
		Util* _tmp18_;
		ObjectsProject* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		ServicesStore* _tmp22_;
		ObjectsProject* _tmp23_;
		ObjectsProject* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		_tmp16_ = self->priv->_project;
		_tmp17_ = util_get_default ();
		_tmp18_ = _tmp17_;
		_tmp19_ = self->priv->_project;
		_tmp20_ = util_generate_id (_tmp18_, (ObjectsBaseObject*) _tmp19_);
		_tmp21_ = _tmp20_;
		objects_base_object_set_id ((ObjectsBaseObject*) _tmp16_, _tmp21_);
		_g_free0 (_tmp21_);
		_g_object_unref0 (_tmp18_);
		_tmp22_ = services_store_instance ();
		_tmp23_ = self->priv->_project;
		services_store_insert_project (_tmp22_, _tmp23_);
		_tmp24_ = self->priv->_project;
		_tmp25_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp24_);
		_tmp26_ = _tmp25_;
		dialogs_project_go_project (self, _tmp26_);
	} else {
		ObjectsProject* _tmp27_;
		SourceType _tmp28_;
		SourceType _tmp29_;
		_tmp27_ = self->priv->_project;
		_tmp28_ = objects_project_get_source_type (_tmp27_);
		_tmp29_ = _tmp28_;
		if (_tmp29_ == SOURCE_TYPE_TODOIST) {
			ServicesTodoist* _tmp30_;
			ServicesTodoist* _tmp31_;
			ObjectsProject* _tmp32_;
			_tmp30_ = services_todoist_get_default ();
			_tmp31_ = _tmp30_;
			_tmp32_ = self->priv->_project;
			services_todoist_add (_tmp31_, (ObjectsBaseObject*) _tmp32_, _____lambda28__gasync_ready_callback, g_object_ref (self));
			_g_object_unref0 (_tmp31_);
		} else {
			ObjectsProject* _tmp33_;
			SourceType _tmp34_;
			SourceType _tmp35_;
			_tmp33_ = self->priv->_project;
			_tmp34_ = objects_project_get_source_type (_tmp33_);
			_tmp35_ = _tmp34_;
			if (_tmp35_ == SOURCE_TYPE_CALDAV) {
				Block81Data* _data81_;
				ObjectsProject* _tmp36_;
				Util* _tmp37_;
				Util* _tmp38_;
				ObjectsProject* _tmp39_;
				gchar* _tmp40_;
				gchar* _tmp41_;
				ServicesCalDAVCore* _tmp42_;
				ServicesCalDAVCore* _tmp43_;
				ObjectsProject* _tmp44_;
				ObjectsSource* _tmp45_;
				ObjectsSource* _tmp46_;
				ServicesCalDAVCalDAVClient* _tmp47_;
				ServicesCalDAVCalDAVClient* _tmp48_;
				ServicesCalDAVCalDAVClient* _tmp49_;
				ObjectsProject* _tmp50_;
				_data81_ = g_slice_new0 (Block81Data);
				_data81_->_ref_count_ = 1;
				_data81_->self = g_object_ref (self);
				_tmp36_ = self->priv->_project;
				_tmp37_ = util_get_default ();
				_tmp38_ = _tmp37_;
				_tmp39_ = self->priv->_project;
				_tmp40_ = util_generate_id (_tmp38_, (ObjectsBaseObject*) _tmp39_);
				_tmp41_ = _tmp40_;
				objects_base_object_set_id ((ObjectsBaseObject*) _tmp36_, _tmp41_);
				_g_free0 (_tmp41_);
				_g_object_unref0 (_tmp38_);
				_tmp42_ = services_cal_dav_core_get_default ();
				_tmp43_ = _tmp42_;
				_tmp44_ = self->priv->_project;
				_tmp45_ = objects_project_get_source (_tmp44_);
				_tmp46_ = _tmp45_;
				_tmp47_ = services_cal_dav_core_get_client (_tmp43_, _tmp46_);
				_tmp48_ = _tmp47_;
				_g_object_unref0 (_tmp43_);
				_data81_->caldav_client = _tmp48_;
				_tmp49_ = _data81_->caldav_client;
				_tmp50_ = self->priv->_project;
				services_cal_dav_cal_dav_client_create_project (_tmp49_, _tmp50_, ______lambda29__gasync_ready_callback, block81_data_ref (_data81_));
				block81_data_unref (_data81_);
				_data81_ = NULL;
			}
		}
	}
}

static Block82Data*
block82_data_ref (Block82Data* _data82_)
{
	g_atomic_int_inc (&_data82_->_ref_count_);
	return _data82_;
}

static void
block82_data_unref (void * _userdata_)
{
	Block82Data* _data82_;
	_data82_ = (Block82Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data82_->_ref_count_)) {
		DialogsProject* self;
		self = _data82_->self;
		_g_free0 (_data82_->id);
		_g_object_unref0 (self);
		g_slice_free (Block82Data, _data82_);
	}
}

static gboolean
__lambda27_ (Block82Data* _data82_)
{
	DialogsProject* self;
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	Util* _tmp2_;
	Util* _tmp3_;
	AdwToast* _tmp4_;
	AdwToast* _tmp5_;
	ServicesEventBus* _tmp6_;
	ServicesEventBus* _tmp7_;
	gboolean result;
	self = _data82_->self;
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = util_get_default ();
	_tmp3_ = _tmp2_;
	_tmp4_ = util_create_toast (_tmp3_, _ ("Project added successfully!"), (guint) 2, ADW_TOAST_PRIORITY_NORMAL);
	_tmp5_ = _tmp4_;
	g_signal_emit_by_name (_tmp1_, "send-toast", _tmp5_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
	_tmp6_ = services_event_bus_get_default ();
	_tmp7_ = _tmp6_;
	g_signal_emit_by_name (_tmp7_, "pane-selected", PANE_TYPE_PROJECT, _data82_->id);
	_g_object_unref0 (_tmp7_);
	adw_dialog_close ((AdwDialog*) self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda27__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda27_ (self);
	return result;
}

void
dialogs_project_go_project (DialogsProject* self,
                            const gchar* id)
{
	Block82Data* _data82_;
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (id != NULL);
	_data82_ = g_slice_new0 (Block82Data);
	_data82_->_ref_count_ = 1;
	_data82_->self = g_object_ref (self);
	_tmp0_ = g_strdup (id);
	_g_free0 (_data82_->id);
	_data82_->id = _tmp0_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ___lambda27__gsource_func, block82_data_ref (_data82_), block82_data_unref);
	block82_data_unref (_data82_);
	_data82_ = NULL;
}

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

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

static void
dialogs_project_set_project (DialogsProject* self,
                             ObjectsProject* value)
{
	ObjectsProject* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_project_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, dialogs_project_properties[DIALOGS_PROJECT_PROJECT_PROPERTY]);
	}
}

gboolean
dialogs_project_get_backend_picker (DialogsProject* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_backend_picker;
	return result;
}

static void
dialogs_project_set_backend_picker (DialogsProject* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_project_get_backend_picker (self);
	if (old_value != value) {
		self->priv->_backend_picker = value;
		g_object_notify_by_pspec ((GObject *) self, dialogs_project_properties[DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY]);
	}
}

const gchar*
dialogs_project_get_header_title (DialogsProject* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_title;
	result = _tmp0_;
	return result;
}

static void
dialogs_project_set_header_title (DialogsProject* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_project_get_header_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_header_title);
		self->priv->_header_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_project_properties[DIALOGS_PROJECT_HEADER_TITLE_PROPERTY]);
	}
}

gboolean
dialogs_project_get_is_creating (DialogsProject* self)
{
	gboolean result;
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = g_strcmp0 (_tmp2_, "") == 0;
	return result;
}

static Block83Data*
block83_data_ref (Block83Data* _data83_)
{
	g_atomic_int_inc (&_data83_->_ref_count_);
	return _data83_;
}

static void
block83_data_unref (void * _userdata_)
{
	Block83Data* _data83_;
	_data83_ = (Block83Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data83_->_ref_count_)) {
		DialogsProject* self;
		self = _data83_->self;
		_g_object_unref0 (_data83_->color_box_revealer);
		_g_object_unref0 (_data83_->emoji_chooser);
		_g_object_unref0 (self);
		g_slice_free (Block83Data, _data83_);
	}
}

static gboolean
_dialogs_project___lambda30_ (DialogsProject* self)
{
	WidgetsCircularProgressBar* _tmp0_;
	ObjectsProject* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	WidgetsColorPickerRow* _tmp4_;
	ObjectsProject* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean result;
	_tmp0_ = self->priv->progress_bar;
	_tmp1_ = self->priv->_project;
	_tmp2_ = objects_base_object_get_color ((ObjectsBaseObject*) _tmp1_);
	_tmp3_ = _tmp2_;
	widgets_circular_progress_bar_set_color (_tmp0_, _tmp3_);
	_tmp4_ = self->priv->color_picker_row;
	_tmp5_ = self->priv->_project;
	_tmp6_ = objects_base_object_get_color ((ObjectsBaseObject*) _tmp5_);
	_tmp7_ = _tmp6_;
	widgets_color_picker_row_set_color (_tmp4_, _tmp7_);
	_tmp8_ = dialogs_project_get_is_creating (self);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		AdwEntryRow* _tmp10_;
		_tmp10_ = self->priv->name_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp10_);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__dialogs_project___lambda30__gsource_func (gpointer self)
{
	gboolean result;
	result = _dialogs_project___lambda30_ ((DialogsProject*) self);
	return result;
}

static void
_dialogs_project_add_update_project_adw_entry_row_entry_activated (AdwEntryRow* _sender,
                                                                   gpointer self)
{
	dialogs_project_add_update_project ((DialogsProject*) self);
}

static void
_dialogs_project_add_update_project_gtk_button_clicked (GtkButton* _sender,
                                                        gpointer self)
{
	dialogs_project_add_update_project ((DialogsProject*) self);
}

static void
_dialogs_project___lambda31_ (DialogsProject* self,
                              const gchar* emoji)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (emoji != NULL);
	_tmp0_ = self->priv->emoji_label;
	gtk_label_set_label (_tmp0_, emoji);
}

static void
__dialogs_project___lambda31__gtk_emoji_chooser_emoji_picked (GtkEmojiChooser* _sender,
                                                              const gchar* text,
                                                              gpointer self)
{
	_dialogs_project___lambda31_ ((DialogsProject*) self, text);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
_dialogs_project___lambda32_ (Block83Data* _data83_)
{
	DialogsProject* self;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data83_->self;
	_tmp0_ = self->priv->emoji_switch;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkRevealer* _tmp3_;
		GtkStack* _tmp4_;
		GtkLabel* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gboolean _tmp10_;
		GtkEmojiChooser* _tmp12_;
		_tmp3_ = _data83_->color_box_revealer;
		gtk_revealer_set_reveal_child (_tmp3_, FALSE);
		_tmp4_ = self->priv->emoji_color_stack;
		gtk_stack_set_visible_child_name (_tmp4_, "emoji");
		_tmp5_ = self->priv->emoji_label;
		_tmp6_ = gtk_label_get_label (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = string_strip (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strcmp0 (_tmp9_, "") == 0;
		_g_free0 (_tmp9_);
		if (_tmp10_) {
			GtkLabel* _tmp11_;
			_tmp11_ = self->priv->emoji_label;
			gtk_label_set_label (_tmp11_, "🚀️");
		}
		_tmp12_ = _data83_->emoji_chooser;
		gtk_popover_popup ((GtkPopover*) _tmp12_);
	} else {
		GtkRevealer* _tmp13_;
		GtkStack* _tmp14_;
		_tmp13_ = _data83_->color_box_revealer;
		gtk_revealer_set_reveal_child (_tmp13_, TRUE);
		_tmp14_ = self->priv->emoji_color_stack;
		gtk_stack_set_visible_child_name (_tmp14_, "color");
	}
}

static void
__dialogs_project___lambda32__g_object_notify (GObject* _sender,
                                               GParamSpec* pspec,
                                               gpointer self)
{
	_dialogs_project___lambda32_ (self);
}

static void
_dialogs_project___lambda33_ (DialogsProject* self)
{
	WidgetsCircularProgressBar* _tmp0_;
	WidgetsColorPickerRow* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	_tmp0_ = self->priv->progress_bar;
	_tmp1_ = self->priv->color_picker_row;
	_tmp2_ = widgets_color_picker_row_get_color (_tmp1_);
	_tmp3_ = _tmp2_;
	widgets_circular_progress_bar_set_color (_tmp0_, _tmp3_);
}

static void
__dialogs_project___lambda33__widgets_color_picker_row_color_changed (WidgetsColorPickerRow* _sender,
                                                                      gpointer self)
{
	_dialogs_project___lambda33_ ((DialogsProject*) self);
}

static void
_dialogs_project___lambda34_ (Block83Data* _data83_)
{
	DialogsProject* self;
	GtkSwitch* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data83_->self;
	_tmp0_ = self->priv->emoji_switch;
	_tmp1_ = gtk_switch_get_active (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkEmojiChooser* _tmp3_;
		_tmp3_ = _data83_->emoji_chooser;
		gtk_popover_popup ((GtkPopover*) _tmp3_);
	}
}

static void
__dialogs_project___lambda34__gtk_button_clicked (GtkButton* _sender,
                                                  gpointer self)
{
	_dialogs_project___lambda34_ (self);
}

static void
_dialogs_project___lambda35_ (DialogsProject* self)
{
	AdwNavigationView* _tmp0_;
	AdwNavigationPage* _tmp1_;
	_tmp0_ = self->priv->navigation_view;
	_tmp1_ = self->priv->sources_page;
	adw_navigation_view_push (_tmp0_, _tmp1_);
}

static void
__dialogs_project___lambda35__adw_action_row_activated (AdwActionRow* _sender,
                                                        gpointer self)
{
	_dialogs_project___lambda35_ ((DialogsProject*) self);
}

static void
_dialogs_project___lambda36_ (DialogsProject* self)
{
	ServicesEventBus* _tmp0_;
	ServicesEventBus* _tmp1_;
	dialogs_project_clean_up (self);
	_tmp0_ = services_event_bus_get_default ();
	_tmp1_ = _tmp0_;
	g_signal_emit_by_name (_tmp1_, "connect-typing-accel");
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_project___lambda36__adw_dialog_closed (AdwDialog* _sender,
                                                 gpointer self)
{
	_dialogs_project___lambda36_ ((DialogsProject*) self);
}

static GObject *
dialogs_project_constructor (GType type,
                             guint n_construct_properties,
                             GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsProject * self;
	Block83Data* _data83_;
	ObjectsProject* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GtkLabel* _tmp3_;
	WidgetsCircularProgressBar* _tmp4_ = NULL;
	GtkStack* _tmp5_ = NULL;
	GtkStack* _tmp6_;
	WidgetsCircularProgressBar* _tmp7_;
	GtkStack* _tmp8_;
	GtkLabel* _tmp9_;
	const gchar* _tmp10_ = NULL;
	ObjectsProject* _tmp11_;
	ProjectIconStyle _tmp12_;
	ProjectIconStyle _tmp13_;
	GtkStack* _tmp14_;
	GtkButton* emoji_picker_button = NULL;
	GtkStack* _tmp15_;
	GtkWidget* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkButton* _tmp20_ = NULL;
	GtkEmojiChooser* _tmp21_ = NULL;
	GtkEmojiChooser* _tmp22_;
	GtkButton* _tmp23_;
	AdwEntryRow* _tmp24_;
	AdwEntryRow* _tmp25_;
	AdwEntryRow* _tmp26_;
	ObjectsProject* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	GtkImage* emoji_icon = NULL;
	GtkImage* _tmp30_;
	ObjectsProject* _tmp31_;
	ProjectIconStyle _tmp32_;
	ProjectIconStyle _tmp33_;
	GtkSwitch* _tmp34_ = NULL;
	AdwActionRow* emoji_switch_row = NULL;
	AdwActionRow* _tmp35_;
	AdwActionRow* _tmp36_;
	AdwActionRow* _tmp37_;
	GtkSwitch* _tmp38_;
	AdwActionRow* _tmp39_;
	GtkImage* _tmp40_;
	AdwActionRow* _tmp41_;
	GtkSwitch* _tmp42_;
	gchar* _tmp43_;
	WidgetsTextView* _tmp44_ = NULL;
	WidgetsTextView* _tmp45_;
	ObjectsProject* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	GtkScrolledWindow* description_scrolled = NULL;
	WidgetsTextView* _tmp49_;
	GtkWidget* _tmp50_;
	GtkScrolledWindow* _tmp51_ = NULL;
	AdwExpanderRow* description_row = NULL;
	gchar* _tmp52_;
	ObjectsProject* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	AdwExpanderRow* _tmp56_ = NULL;
	AdwExpanderRow* _tmp57_;
	GtkImage* _tmp58_;
	GtkImage* _tmp59_;
	AdwExpanderRow* _tmp60_;
	GtkScrolledWindow* _tmp61_;
	AdwPreferencesGroup* name_group = NULL;
	AdwPreferencesGroup* _tmp62_ = NULL;
	AdwPreferencesGroup* _tmp63_;
	AdwEntryRow* _tmp64_;
	AdwPreferencesGroup* _tmp65_;
	AdwExpanderRow* _tmp66_;
	AdwPreferencesGroup* _tmp67_;
	AdwActionRow* _tmp68_;
	ObjectsProject* _tmp69_;
	ObjectsSource* _tmp70_;
	ObjectsSource* _tmp71_;
	const gchar* _tmp72_;
	const gchar* _tmp73_;
	gchar* _tmp74_;
	gchar** _tmp75_;
	ObjectsProject* _tmp76_;
	ObjectsSource* _tmp77_;
	ObjectsSource* _tmp78_;
	const gchar* _tmp79_;
	const gchar* _tmp80_;
	gchar* _tmp81_;
	GtkLabel* _tmp82_ = NULL;
	GtkImage* pan_icon = NULL;
	GtkImage* _tmp83_ = NULL;
	GtkBox* source_selected_box = NULL;
	GtkBox* _tmp84_;
	GtkBox* _tmp85_;
	GtkLabel* _tmp86_;
	GtkBox* _tmp87_;
	GtkImage* _tmp88_;
	AdwActionRow* source_row = NULL;
	gchar* _tmp89_;
	AdwActionRow* _tmp90_ = NULL;
	AdwActionRow* _tmp91_;
	GtkBox* _tmp92_;
	AdwPreferencesGroup* source_group = NULL;
	AdwPreferencesGroup* _tmp93_ = NULL;
	AdwPreferencesGroup* _tmp94_;
	AdwActionRow* _tmp95_;
	GtkRevealer* source_revealer = NULL;
	gboolean _tmp96_;
	AdwPreferencesGroup* _tmp97_;
	GtkWidget* _tmp98_;
	GtkRevealer* _tmp99_ = NULL;
	WidgetsColorPickerRow* _tmp100_;
	AdwBin* color_group = NULL;
	gchar* _tmp101_;
	gchar** _tmp102_;
	WidgetsColorPickerRow* _tmp103_;
	GtkWidget* _tmp104_;
	AdwBin* _tmp105_ = NULL;
	ObjectsProject* _tmp106_;
	ProjectIconStyle _tmp107_;
	ProjectIconStyle _tmp108_;
	GtkRevealer* _tmp109_ = NULL;
	GtkRevealer* _tmp110_;
	AdwBin* _tmp111_;
	const gchar* _tmp112_ = NULL;
	gboolean _tmp113_;
	gboolean _tmp114_;
	WidgetsLoadingButton* _tmp115_ = NULL;
	WidgetsLoadingButton* _tmp116_;
	GtkStringList* markdown_model = NULL;
	GtkStringList* _tmp117_;
	GtkStringList* _tmp118_;
	GtkStringList* _tmp119_;
	GtkStringList* _tmp120_;
	WidgetsComboWrapRow* _tmp121_;
	WidgetsComboWrapRow* _tmp122_;
	WidgetsComboWrapRow* _tmp123_;
	WidgetsComboWrapRow* _tmp124_;
	GtkStringList* _tmp125_;
	WidgetsComboWrapRow* _tmp126_;
	ObjectsProject* _tmp127_;
	MarkdownSetting _tmp128_;
	MarkdownSetting _tmp129_;
	AdwPreferencesGroup* settings_group = NULL;
	AdwPreferencesGroup* _tmp130_ = NULL;
	AdwPreferencesGroup* _tmp131_;
	AdwPreferencesGroup* _tmp132_;
	WidgetsComboWrapRow* _tmp133_;
	GtkRevealer* settings_revealer = NULL;
	gboolean _tmp134_;
	gboolean _tmp135_;
	AdwPreferencesGroup* _tmp136_;
	GtkWidget* _tmp137_;
	GtkRevealer* _tmp138_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp139_;
	GtkBox* _tmp140_;
	GtkButton* _tmp141_;
	GtkBox* _tmp142_;
	AdwPreferencesGroup* _tmp143_;
	GtkBox* _tmp144_;
	GtkRevealer* _tmp145_;
	GtkBox* _tmp146_;
	GtkRevealer* _tmp147_;
	GtkBox* _tmp148_;
	GtkRevealer* _tmp149_;
	GtkBox* _tmp150_;
	WidgetsLoadingButton* _tmp151_;
	AdwClamp* content_clamp = NULL;
	AdwClamp* _tmp152_ = NULL;
	AdwClamp* _tmp153_;
	GtkBox* _tmp154_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp155_;
	AdwToolbarView* _tmp156_;
	AdwHeaderBar* _tmp157_;
	AdwHeaderBar* _tmp158_;
	AdwToolbarView* _tmp159_;
	AdwClamp* _tmp160_;
	AdwNavigationPage* main_page = NULL;
	AdwToolbarView* _tmp161_;
	const gchar* _tmp162_;
	AdwNavigationPage* _tmp163_;
	AdwNavigationPage* _tmp164_;
	AdwNavigationView* _tmp165_;
	AdwNavigationView* _tmp166_;
	AdwNavigationPage* _tmp167_;
	AdwNavigationView* _tmp168_;
	ServicesEventBus* _tmp169_;
	ServicesEventBus* _tmp170_;
	GtkStack* _tmp171_;
	guint _tmp172_;
	guint _tmp173_;
	GeeHashMap* _tmp174_;
	AdwEntryRow* _tmp175_;
	gulong _tmp176_;
	AdwEntryRow* _tmp177_;
	GeeHashMap* _tmp178_;
	WidgetsLoadingButton* _tmp179_;
	gulong _tmp180_;
	WidgetsLoadingButton* _tmp181_;
	GeeHashMap* _tmp182_;
	GtkEmojiChooser* _tmp183_;
	gulong _tmp184_;
	GtkEmojiChooser* _tmp185_;
	GeeHashMap* _tmp186_;
	GtkSwitch* _tmp187_;
	gulong _tmp188_;
	GtkSwitch* _tmp189_;
	GeeHashMap* _tmp190_;
	WidgetsColorPickerRow* _tmp191_;
	gulong _tmp192_;
	WidgetsColorPickerRow* _tmp193_;
	GeeHashMap* _tmp194_;
	GtkButton* _tmp195_;
	gulong _tmp196_;
	GtkButton* _tmp197_;
	GeeHashMap* _tmp198_;
	AdwActionRow* _tmp199_;
	gulong _tmp200_;
	AdwActionRow* _tmp201_;
	parent_class = G_OBJECT_CLASS (dialogs_project_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_PROJECT, DialogsProject);
	_data83_ = g_slice_new0 (Block83Data);
	_data83_->_ref_count_ = 1;
	_data83_->self = g_object_ref (self);
	_tmp0_ = self->priv->_project;
	_tmp1_ = objects_project_get_emoji (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->emoji_label);
	self->priv->emoji_label = _tmp3_;
	_tmp4_ = widgets_circular_progress_bar_new (32);
	widgets_circular_progress_bar_set_percentage (_tmp4_, 0.64);
	widgets_circular_progress_bar_set_gap (_tmp4_, 4);
	widgets_circular_progress_bar_set_border_width (_tmp4_, 4);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->progress_bar);
	self->priv->progress_bar = _tmp4_;
	_tmp5_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_halign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_CENTER);
	gtk_stack_set_transition_type (_tmp5_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp5_);
	_g_object_unref0 (self->priv->emoji_color_stack);
	self->priv->emoji_color_stack = _tmp5_;
	_tmp6_ = self->priv->emoji_color_stack;
	_tmp7_ = self->priv->progress_bar;
	gtk_stack_add_named (_tmp6_, (GtkWidget*) _tmp7_, "color");
	_tmp8_ = self->priv->emoji_color_stack;
	_tmp9_ = self->priv->emoji_label;
	gtk_stack_add_named (_tmp8_, (GtkWidget*) _tmp9_, "emoji");
	_tmp11_ = self->priv->_project;
	_tmp12_ = objects_project_get_icon_style (_tmp11_);
	_tmp13_ = _tmp12_;
	if (_tmp13_ == PROJECT_ICON_STYLE_PROGRESS) {
		_tmp10_ = "color";
	} else {
		_tmp10_ = "emoji";
	}
	_tmp14_ = self->priv->emoji_color_stack;
	gtk_stack_set_visible_child_name (_tmp14_, _tmp10_);
	_tmp15_ = self->priv->emoji_color_stack;
	_tmp16_ = _g_object_ref0 ((GtkWidget*) _tmp15_);
	_tmp17_ = g_strdup ("title-2");
	_tmp18_ = g_strdup ("button-emoji-picker");
	_tmp19_ = g_new0 (gchar*, 2 + 1);
	_tmp19_[0] = _tmp17_;
	_tmp19_[1] = _tmp18_;
	_tmp20_ = (GtkButton*) gtk_button_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp20_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp20_, "height-request", 64, NULL);
	g_object_set ((GtkWidget*) _tmp20_, "width-request", 64, NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp20_, 6);
	gtk_button_set_child (_tmp20_, _tmp16_);
	_g_object_unref0 (_tmp16_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp20_);
	emoji_picker_button = _tmp20_;
	_tmp21_ = (GtkEmojiChooser*) gtk_emoji_chooser_new ();
	gtk_popover_set_has_arrow ((GtkPopover*) _tmp21_, FALSE);
	g_object_ref_sink (_tmp21_);
	_data83_->emoji_chooser = _tmp21_;
	_tmp22_ = _data83_->emoji_chooser;
	_tmp23_ = emoji_picker_button;
	gtk_widget_set_parent ((GtkWidget*) _tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = (AdwEntryRow*) adw_entry_row_new ();
	g_object_ref_sink (_tmp24_);
	_g_object_unref0 (self->priv->name_entry);
	self->priv->name_entry = _tmp24_;
	_tmp25_ = self->priv->name_entry;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp25_, _ ("Give your project a name"));
	_tmp26_ = self->priv->name_entry;
	_tmp27_ = self->priv->_project;
	_tmp28_ = objects_base_object_get_name ((ObjectsBaseObject*) _tmp27_);
	_tmp29_ = _tmp28_;
	gtk_editable_set_text ((GtkEditable*) _tmp26_, _tmp29_);
	_tmp30_ = (GtkImage*) gtk_image_new_from_icon_name ("reaction-add2-symbolic");
	g_object_ref_sink (_tmp30_);
	emoji_icon = _tmp30_;
	_tmp31_ = self->priv->_project;
	_tmp32_ = objects_project_get_icon_style (_tmp31_);
	_tmp33_ = _tmp32_;
	_tmp34_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp34_, GTK_ALIGN_CENTER);
	gtk_switch_set_active (_tmp34_, _tmp33_ == PROJECT_ICON_STYLE_EMOJI);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (self->priv->emoji_switch);
	self->priv->emoji_switch = _tmp34_;
	_tmp35_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp35_);
	emoji_switch_row = _tmp35_;
	_tmp36_ = emoji_switch_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp36_, _ ("Use Emoji"));
	_tmp37_ = emoji_switch_row;
	_tmp38_ = self->priv->emoji_switch;
	adw_action_row_set_activatable_widget (_tmp37_, (GtkWidget*) _tmp38_);
	_tmp39_ = emoji_switch_row;
	_tmp40_ = emoji_icon;
	adw_action_row_add_prefix (_tmp39_, (GtkWidget*) _tmp40_);
	_tmp41_ = emoji_switch_row;
	_tmp42_ = self->priv->emoji_switch;
	adw_action_row_add_suffix (_tmp41_, (GtkWidget*) _tmp42_);
	_tmp43_ = g_strdup (_ ("Add a description…"));
	_tmp44_ = widgets_text_view_new ();
	gtk_text_view_set_wrap_mode ((GtkTextView*) _tmp44_, GTK_WRAP_WORD);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp44_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp44_, TRUE);
	gtk_text_view_set_top_margin ((GtkTextView*) _tmp44_, 6);
	gtk_text_view_set_bottom_margin ((GtkTextView*) _tmp44_, 6);
	gtk_text_view_set_left_margin ((GtkTextView*) _tmp44_, 12);
	gtk_text_view_set_right_margin ((GtkTextView*) _tmp44_, 12);
	widgets_text_view_set_placeholder_text (_tmp44_, _tmp43_);
	_g_free0 (_tmp43_);
	g_object_ref_sink (_tmp44_);
	_g_object_unref0 (self->priv->description_textview);
	self->priv->description_textview = _tmp44_;
	_tmp45_ = self->priv->description_textview;
	_tmp46_ = self->priv->_project;
	_tmp47_ = objects_project_get_description (_tmp46_);
	_tmp48_ = _tmp47_;
	widgets_text_view_set_text (_tmp45_, _tmp48_);
	_tmp49_ = self->priv->description_textview;
	_tmp50_ = _g_object_ref0 ((GtkWidget*) _tmp49_);
	_tmp51_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_scrolled_window_set_child (_tmp51_, _tmp50_);
	_g_object_unref0 (_tmp50_);
	g_object_set ((GtkWidget*) _tmp51_, "height-request", 128, NULL);
	g_object_ref_sink (_tmp51_);
	description_scrolled = _tmp51_;
	_tmp52_ = g_strdup (_ ("Description"));
	_tmp53_ = self->priv->_project;
	_tmp54_ = objects_project_get_description (_tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = (AdwExpanderRow*) adw_expander_row_new ();
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp56_, _tmp52_);
	_g_free0 (_tmp52_);
	adw_expander_row_set_expanded (_tmp56_, g_strcmp0 (_tmp55_, "") != 0);
	g_object_ref_sink (_tmp56_);
	description_row = _tmp56_;
	_tmp57_ = description_row;
	_tmp58_ = (GtkImage*) gtk_image_new_from_icon_name ("paper-symbolic");
	g_object_ref_sink (_tmp58_);
	_tmp59_ = _tmp58_;
	adw_expander_row_add_prefix (_tmp57_, (GtkWidget*) _tmp59_);
	_g_object_unref0 (_tmp59_);
	_tmp60_ = description_row;
	_tmp61_ = description_scrolled;
	adw_expander_row_add_row (_tmp60_, (GtkWidget*) _tmp61_);
	_tmp62_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp62_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp62_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp62_, 24);
	g_object_ref_sink (_tmp62_);
	name_group = _tmp62_;
	_tmp63_ = name_group;
	_tmp64_ = self->priv->name_entry;
	adw_preferences_group_add (_tmp63_, (GtkWidget*) _tmp64_);
	_tmp65_ = name_group;
	_tmp66_ = description_row;
	adw_preferences_group_add (_tmp65_, (GtkWidget*) _tmp66_);
	_tmp67_ = name_group;
	_tmp68_ = emoji_switch_row;
	adw_preferences_group_add (_tmp67_, (GtkWidget*) _tmp68_);
	_tmp69_ = self->priv->_project;
	_tmp70_ = objects_project_get_source (_tmp69_);
	_tmp71_ = _tmp70_;
	_tmp72_ = objects_source_get_display_name (_tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = g_strdup ("dimmed");
	_tmp75_ = g_new0 (gchar*, 1 + 1);
	_tmp75_[0] = _tmp74_;
	_tmp76_ = self->priv->_project;
	_tmp77_ = objects_project_get_source (_tmp76_);
	_tmp78_ = _tmp77_;
	_tmp79_ = objects_source_get_subheader_text (_tmp78_);
	_tmp80_ = _tmp79_;
	_tmp81_ = g_strdup (_tmp80_);
	_tmp82_ = (GtkLabel*) gtk_label_new (_tmp73_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp82_, _tmp75_);
	_tmp75_ = (_vala_array_free (_tmp75_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp82_, _tmp81_);
	_g_free0 (_tmp81_);
	g_object_ref_sink (_tmp82_);
	_g_object_unref0 (self->priv->source_selected_label);
	self->priv->source_selected_label = _tmp82_;
	_tmp83_ = (GtkImage*) gtk_image_new_from_icon_name ("go-next-symbolic");
	gtk_image_set_pixel_size (_tmp83_, 16);
	g_object_ref_sink (_tmp83_);
	pan_icon = _tmp83_;
	_tmp84_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp84_);
	source_selected_box = _tmp84_;
	_tmp85_ = source_selected_box;
	_tmp86_ = self->priv->source_selected_label;
	gtk_box_append (_tmp85_, (GtkWidget*) _tmp86_);
	_tmp87_ = source_selected_box;
	_tmp88_ = pan_icon;
	gtk_box_append (_tmp87_, (GtkWidget*) _tmp88_);
	_tmp89_ = g_strdup (_ ("Source"));
	_tmp90_ = (AdwActionRow*) adw_action_row_new ();
	gtk_list_box_row_set_activatable ((GtkListBoxRow*) _tmp90_, TRUE);
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp90_, _tmp89_);
	_g_free0 (_tmp89_);
	g_object_ref_sink (_tmp90_);
	source_row = _tmp90_;
	_tmp91_ = source_row;
	_tmp92_ = source_selected_box;
	adw_action_row_add_suffix (_tmp91_, (GtkWidget*) _tmp92_);
	_tmp93_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp93_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp93_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp93_, 24);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp93_, 1);
	g_object_ref_sink (_tmp93_);
	source_group = _tmp93_;
	_tmp94_ = source_group;
	_tmp95_ = source_row;
	adw_preferences_group_add (_tmp94_, (GtkWidget*) _tmp95_);
	_tmp96_ = self->priv->_backend_picker;
	_tmp97_ = source_group;
	_tmp98_ = _g_object_ref0 ((GtkWidget*) _tmp97_);
	_tmp99_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp99_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp99_, _tmp96_);
	gtk_revealer_set_child (_tmp99_, _tmp98_);
	_g_object_unref0 (_tmp98_);
	g_object_ref_sink (_tmp99_);
	source_revealer = _tmp99_;
	_tmp100_ = widgets_color_picker_row_new ();
	g_object_ref_sink (_tmp100_);
	_g_object_unref0 (self->priv->color_picker_row);
	self->priv->color_picker_row = _tmp100_;
	_tmp101_ = g_strdup ("card");
	_tmp102_ = g_new0 (gchar*, 1 + 1);
	_tmp102_[0] = _tmp101_;
	_tmp103_ = self->priv->color_picker_row;
	_tmp104_ = _g_object_ref0 ((GtkWidget*) _tmp103_);
	_tmp105_ = (AdwBin*) adw_bin_new ();
	gtk_widget_set_margin_end ((GtkWidget*) _tmp105_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp105_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp105_, 24);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp105_, 1);
	gtk_widget_set_valign ((GtkWidget*) _tmp105_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp105_, _tmp102_);
	_tmp102_ = (_vala_array_free (_tmp102_, 1, (GDestroyNotify) g_free), NULL);
	adw_bin_set_child (_tmp105_, _tmp104_);
	_g_object_unref0 (_tmp104_);
	g_object_ref_sink (_tmp105_);
	color_group = _tmp105_;
	_tmp106_ = self->priv->_project;
	_tmp107_ = objects_project_get_icon_style (_tmp106_);
	_tmp108_ = _tmp107_;
	_tmp109_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp109_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp109_, _tmp108_ == PROJECT_ICON_STYLE_PROGRESS);
	g_object_ref_sink (_tmp109_);
	_data83_->color_box_revealer = _tmp109_;
	_tmp110_ = _data83_->color_box_revealer;
	_tmp111_ = color_group;
	gtk_revealer_set_child (_tmp110_, (GtkWidget*) _tmp111_);
	_tmp113_ = dialogs_project_get_is_creating (self);
	_tmp114_ = _tmp113_;
	if (_tmp114_) {
		_tmp112_ = _ ("Add Project");
	} else {
		_tmp112_ = _ ("Update Project");
	}
	_tmp115_ = widgets_loading_button_new_with_label (_tmp112_);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp115_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp115_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp115_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp115_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp115_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp115_, 24);
	gtk_widget_set_valign ((GtkWidget*) _tmp115_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp115_);
	_g_object_unref0 (self->priv->submit_button);
	self->priv->submit_button = _tmp115_;
	_tmp116_ = self->priv->submit_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp116_, "suggested-action");
	_tmp117_ = gtk_string_list_new (NULL);
	markdown_model = _tmp117_;
	_tmp118_ = markdown_model;
	gtk_string_list_append (_tmp118_, _ ("Global Default"));
	_tmp119_ = markdown_model;
	gtk_string_list_append (_tmp119_, _ ("Enabled"));
	_tmp120_ = markdown_model;
	gtk_string_list_append (_tmp120_, _ ("Disabled"));
	_tmp121_ = widgets_combo_wrap_row_new ();
	g_object_ref_sink (_tmp121_);
	_g_object_unref0 (self->priv->markdown_row);
	self->priv->markdown_row = _tmp121_;
	_tmp122_ = self->priv->markdown_row;
	widgets_combo_wrap_row_set_title (_tmp122_, _ ("Markdown Formatting"));
	_tmp123_ = self->priv->markdown_row;
	widgets_combo_wrap_row_set_subtitle (_tmp123_, _ ("Override the global markdown setting for this project"));
	_tmp124_ = self->priv->markdown_row;
	_tmp125_ = markdown_model;
	widgets_combo_wrap_row_set_model (_tmp124_, _tmp125_);
	_tmp126_ = self->priv->markdown_row;
	_tmp127_ = self->priv->_project;
	_tmp128_ = objects_project_get_markdown_setting (_tmp127_);
	_tmp129_ = _tmp128_;
	widgets_combo_wrap_row_set_selected (_tmp126_, (gint) _tmp129_);
	_tmp130_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp130_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp130_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp130_, 12);
	g_object_ref_sink (_tmp130_);
	settings_group = _tmp130_;
	_tmp131_ = settings_group;
	adw_preferences_group_set_title (_tmp131_, _ ("Settings"));
	_tmp132_ = settings_group;
	_tmp133_ = self->priv->markdown_row;
	adw_preferences_group_add (_tmp132_, (GtkWidget*) _tmp133_);
	_tmp134_ = dialogs_project_get_is_creating (self);
	_tmp135_ = _tmp134_;
	_tmp136_ = settings_group;
	_tmp137_ = _g_object_ref0 ((GtkWidget*) _tmp136_);
	_tmp138_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_transition_type (_tmp138_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
	gtk_revealer_set_reveal_child (_tmp138_, !_tmp135_);
	gtk_revealer_set_child (_tmp138_, _tmp137_);
	_g_object_unref0 (_tmp137_);
	g_object_ref_sink (_tmp138_);
	settings_revealer = _tmp138_;
	_tmp139_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp139_);
	content_box = _tmp139_;
	_tmp140_ = content_box;
	_tmp141_ = emoji_picker_button;
	gtk_box_append (_tmp140_, (GtkWidget*) _tmp141_);
	_tmp142_ = content_box;
	_tmp143_ = name_group;
	gtk_box_append (_tmp142_, (GtkWidget*) _tmp143_);
	_tmp144_ = content_box;
	_tmp145_ = source_revealer;
	gtk_box_append (_tmp144_, (GtkWidget*) _tmp145_);
	_tmp146_ = content_box;
	_tmp147_ = _data83_->color_box_revealer;
	gtk_box_append (_tmp146_, (GtkWidget*) _tmp147_);
	_tmp148_ = content_box;
	_tmp149_ = settings_revealer;
	gtk_box_append (_tmp148_, (GtkWidget*) _tmp149_);
	_tmp150_ = content_box;
	_tmp151_ = self->priv->submit_button;
	gtk_box_append (_tmp150_, (GtkWidget*) _tmp151_);
	_tmp152_ = (AdwClamp*) adw_clamp_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp152_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp152_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp152_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp152_, 6);
	g_object_ref_sink (_tmp152_);
	content_clamp = _tmp152_;
	_tmp153_ = content_clamp;
	_tmp154_ = content_box;
	adw_clamp_set_child (_tmp153_, (GtkWidget*) _tmp154_);
	_tmp155_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp155_);
	toolbar_view = _tmp155_;
	_tmp156_ = toolbar_view;
	_tmp157_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp157_);
	_tmp158_ = _tmp157_;
	adw_toolbar_view_add_top_bar (_tmp156_, (GtkWidget*) _tmp158_);
	_g_object_unref0 (_tmp158_);
	_tmp159_ = toolbar_view;
	_tmp160_ = content_clamp;
	adw_toolbar_view_set_content (_tmp159_, (GtkWidget*) _tmp160_);
	_tmp161_ = toolbar_view;
	_tmp162_ = self->priv->_header_title;
	_tmp163_ = adw_navigation_page_new ((GtkWidget*) _tmp161_, _tmp162_);
	g_object_ref_sink (_tmp163_);
	main_page = _tmp163_;
	_tmp164_ = dialogs_project_get_sources_page (self);
	_g_object_unref0 (self->priv->sources_page);
	self->priv->sources_page = _tmp164_;
	_tmp165_ = (AdwNavigationView*) adw_navigation_view_new ();
	g_object_ref_sink (_tmp165_);
	_g_object_unref0 (self->priv->navigation_view);
	self->priv->navigation_view = _tmp165_;
	_tmp166_ = self->priv->navigation_view;
	_tmp167_ = main_page;
	adw_navigation_view_add (_tmp166_, _tmp167_);
	_tmp168_ = self->priv->navigation_view;
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) _tmp168_);
	_tmp169_ = services_event_bus_get_default ();
	_tmp170_ = _tmp169_;
	g_signal_emit_by_name (_tmp170_, "disconnect-typing-accel");
	_g_object_unref0 (_tmp170_);
	_tmp171_ = self->priv->emoji_color_stack;
	_tmp172_ = gtk_stack_get_transition_duration (_tmp171_);
	_tmp173_ = _tmp172_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp173_, __dialogs_project___lambda30__gsource_func, g_object_ref (self), g_object_unref);
	_tmp174_ = self->priv->signal_map;
	_tmp175_ = self->priv->name_entry;
	_tmp176_ = g_signal_connect_object (_tmp175_, "entry-activated", (GCallback) _dialogs_project_add_update_project_adw_entry_row_entry_activated, self, 0);
	_tmp177_ = self->priv->name_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp174_, (gpointer) ((guintptr) _tmp176_), (GObject*) _tmp177_);
	_tmp178_ = self->priv->signal_map;
	_tmp179_ = self->priv->submit_button;
	_tmp180_ = g_signal_connect_object ((GtkButton*) _tmp179_, "clicked", (GCallback) _dialogs_project_add_update_project_gtk_button_clicked, self, 0);
	_tmp181_ = self->priv->submit_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp178_, (gpointer) ((guintptr) _tmp180_), (GObject*) _tmp181_);
	_tmp182_ = self->priv->signal_map;
	_tmp183_ = _data83_->emoji_chooser;
	_tmp184_ = g_signal_connect_object (_tmp183_, "emoji-picked", (GCallback) __dialogs_project___lambda31__gtk_emoji_chooser_emoji_picked, self, 0);
	_tmp185_ = _data83_->emoji_chooser;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp182_, (gpointer) ((guintptr) _tmp184_), (GObject*) _tmp185_);
	_tmp186_ = self->priv->signal_map;
	_tmp187_ = self->priv->emoji_switch;
	_tmp188_ = g_signal_connect_data ((GObject*) _tmp187_, "notify::active", (GCallback) __dialogs_project___lambda32__g_object_notify, block83_data_ref (_data83_), (GClosureNotify) block83_data_unref, 0);
	_tmp189_ = self->priv->emoji_switch;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp186_, (gpointer) ((guintptr) _tmp188_), (GObject*) _tmp189_);
	_tmp190_ = self->priv->signal_map;
	_tmp191_ = self->priv->color_picker_row;
	_tmp192_ = g_signal_connect_object (_tmp191_, "color-changed", (GCallback) __dialogs_project___lambda33__widgets_color_picker_row_color_changed, self, 0);
	_tmp193_ = self->priv->color_picker_row;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp190_, (gpointer) ((guintptr) _tmp192_), (GObject*) _tmp193_);
	_tmp194_ = self->priv->signal_map;
	_tmp195_ = emoji_picker_button;
	_tmp196_ = g_signal_connect_data (_tmp195_, "clicked", (GCallback) __dialogs_project___lambda34__gtk_button_clicked, block83_data_ref (_data83_), (GClosureNotify) block83_data_unref, 0);
	_tmp197_ = emoji_picker_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp194_, (gpointer) ((guintptr) _tmp196_), (GObject*) _tmp197_);
	_tmp198_ = self->priv->signal_map;
	_tmp199_ = source_row;
	_tmp200_ = g_signal_connect_object (_tmp199_, "activated", (GCallback) __dialogs_project___lambda35__adw_action_row_activated, self, 0);
	_tmp201_ = source_row;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp198_, (gpointer) ((guintptr) _tmp200_), (GObject*) _tmp201_);
	g_signal_connect_object ((AdwDialog*) self, "closed", (GCallback) __dialogs_project___lambda36__adw_dialog_closed, self, 0);
	_g_object_unref0 (main_page);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_clamp);
	_g_object_unref0 (content_box);
	_g_object_unref0 (settings_revealer);
	_g_object_unref0 (settings_group);
	_g_object_unref0 (markdown_model);
	_g_object_unref0 (color_group);
	_g_object_unref0 (source_revealer);
	_g_object_unref0 (source_group);
	_g_object_unref0 (source_row);
	_g_object_unref0 (source_selected_box);
	_g_object_unref0 (pan_icon);
	_g_object_unref0 (name_group);
	_g_object_unref0 (description_row);
	_g_object_unref0 (description_scrolled);
	_g_object_unref0 (emoji_switch_row);
	_g_object_unref0 (emoji_icon);
	_g_object_unref0 (emoji_picker_button);
	block83_data_unref (_data83_);
	_data83_ = NULL;
	return obj;
}

static void
dialogs_project_class_init (DialogsProjectClass * klass,
                            gpointer klass_data)
{
	dialogs_project_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsProject_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_project_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_project_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_project_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_project_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PROJECT_PROJECT_PROPERTY, dialogs_project_properties[DIALOGS_PROJECT_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), DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY, dialogs_project_properties[DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY] = g_param_spec_boolean ("backend-picker", "backend-picker", "backend-picker", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PROJECT_HEADER_TITLE_PROPERTY, dialogs_project_properties[DIALOGS_PROJECT_HEADER_TITLE_PROPERTY] = g_param_spec_string ("header-title", "header-title", "header-title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PROJECT_IS_CREATING_PROPERTY, dialogs_project_properties[DIALOGS_PROJECT_IS_CREATING_PROPERTY] = g_param_spec_boolean ("is-creating", "is-creating", "is-creating", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

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

static void
dialogs_project_finalize (GObject * obj)
{
	DialogsProject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_TYPE_PROJECT, DialogsProject);
	g_debug ("Project.vala:73: Destroying - Dialogs.Project\n");
	_g_object_unref0 (self->priv->_project);
	_g_free0 (self->priv->_header_title);
	_g_object_unref0 (self->priv->emoji_color_stack);
	_g_object_unref0 (self->priv->progress_bar);
	_g_object_unref0 (self->priv->name_entry);
	_g_object_unref0 (self->priv->color_picker_row);
	_g_object_unref0 (self->priv->submit_button);
	_g_object_unref0 (self->priv->markdown_row);
	_g_object_unref0 (self->priv->emoji_switch);
	_g_object_unref0 (self->priv->emoji_label);
	_g_object_unref0 (self->priv->source_selected_label);
	_g_object_unref0 (self->priv->description_textview);
	_g_object_unref0 (self->priv->navigation_view);
	_g_object_unref0 (self->priv->sources_page);
	_g_object_unref0 (self->priv->signal_map);
	G_OBJECT_CLASS (dialogs_project_parent_class)->finalize (obj);
}

static GType
dialogs_project_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsProjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_project_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsProject), 0, (GInstanceInitFunc) dialogs_project_instance_init, NULL };
	GType dialogs_project_type_id;
	dialogs_project_type_id = g_type_register_static (adw_dialog_get_type (), "DialogsProject", &g_define_type_info, 0);
	DialogsProject_private_offset = g_type_add_instance_private (dialogs_project_type_id, sizeof (DialogsProjectPrivate));
	return dialogs_project_type_id;
}

GType
dialogs_project_get_type (void)
{
	static volatile gsize dialogs_project_type_id__once = 0;
	if (g_once_init_enter (&dialogs_project_type_id__once)) {
		GType dialogs_project_type_id;
		dialogs_project_type_id = dialogs_project_get_type_once ();
		g_once_init_leave (&dialogs_project_type_id__once, dialogs_project_type_id);
	}
	return dialogs_project_type_id__once;
}

static void
_vala_dialogs_project_get_property (GObject * object,
                                    guint property_id,
                                    GValue * value,
                                    GParamSpec * pspec)
{
	DialogsProject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_TYPE_PROJECT, DialogsProject);
	switch (property_id) {
		case DIALOGS_PROJECT_PROJECT_PROPERTY:
		g_value_set_object (value, dialogs_project_get_project (self));
		break;
		case DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY:
		g_value_set_boolean (value, dialogs_project_get_backend_picker (self));
		break;
		case DIALOGS_PROJECT_HEADER_TITLE_PROPERTY:
		g_value_set_string (value, dialogs_project_get_header_title (self));
		break;
		case DIALOGS_PROJECT_IS_CREATING_PROPERTY:
		g_value_set_boolean (value, dialogs_project_get_is_creating (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_project_set_property (GObject * object,
                                    guint property_id,
                                    const GValue * value,
                                    GParamSpec * pspec)
{
	DialogsProject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_TYPE_PROJECT, DialogsProject);
	switch (property_id) {
		case DIALOGS_PROJECT_PROJECT_PROPERTY:
		dialogs_project_set_project (self, g_value_get_object (value));
		break;
		case DIALOGS_PROJECT_BACKEND_PICKER_PROPERTY:
		dialogs_project_set_backend_picker (self, g_value_get_boolean (value));
		break;
		case DIALOGS_PROJECT_HEADER_TITLE_PROPERTY:
		dialogs_project_set_header_title (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

