/* QuickAddCore.c generated by valac 0.56.19, the Vala compiler
 * generated from QuickAddCore.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 "planify.h"
#include <glib.h>
#include <gtk/gtk.h>
#include <adwaita.h>
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <chrono.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <graphene-gobject.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <gtksourceview/gtksource.h>
#include <cairo-gobject.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

enum  {
	LAYOUTS_QUICK_ADD_CORE_0_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY,
	LAYOUTS_QUICK_ADD_CORE_NUM_PROPERTIES
};
static GParamSpec* layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _http_response_unref0(var) ((var == NULL) ? NULL : (var = (http_response_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
typedef struct _Block6Data Block6Data;
typedef struct _Block7Data Block7Data;
enum  {
	LAYOUTS_QUICK_ADD_CORE_HIDE_DESTROY_SIGNAL,
	LAYOUTS_QUICK_ADD_CORE_SEND_INTERFACE_ID_SIGNAL,
	LAYOUTS_QUICK_ADD_CORE_ADD_ITEM_DB_SIGNAL,
	LAYOUTS_QUICK_ADD_CORE_ERROR_SIGNAL,
	LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL,
	LAYOUTS_QUICK_ADD_CORE_NUM_SIGNALS
};
static guint layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_NUM_SIGNALS] = {0};

struct _LayoutsQuickAddCorePrivate {
	gboolean _is_window_quick_add;
	ObjectsItem* _item;
	GtkEntry* content_entry;
	WidgetsLoadingButton* submit_button;
	WidgetsMarkdownEditor* description_textview;
	GtkScrolledWindow* description_scrolled;
	WidgetsItemLabels* item_labels;
	WidgetsProjectPickerProjectPickerButton* project_picker_button;
	WidgetsScheduleButton* schedule_button;
	WidgetsPriorityButton* priority_button;
	WidgetsReminderPickerReminderButton* reminder_button;
	WidgetsDeadlineButton* deadline_button;
	WidgetsDeadlineButton* deadline_button_detail;
	WidgetsLabelPickerLabelButton* label_button;
	WidgetsPinButton* pin_button;
	GtkImage* added_image;
	GtkStack* main_stack;
	GtkToggleButton* create_more_button;
	GtkRevealer* info_revealer;
	GtkOverlay* animation_overlay;
	GtkFixed* animation_container;
	AdwHeaderBar* headerbar;
	GtkLabel* success_label;
	WidgetsLabelPickerLabelQuickPicker* labels_quick_picker;
	gboolean labels_popover_handling_esc;
	gboolean labels_selection_in_progress;
	gboolean _ctrl_pressed;
	gboolean _shift_pressed;
	gboolean _labels_picker_activate_shortcut;
	gboolean _project_picker_activate_shortcut;
	gboolean _reminder_picker_activate_shortcut;
	gboolean _shift_enter_used;
	LayoutsQuickAddCoreFocusedWidget _current_focus;
	ObjectsDueDate* preserved_duedate;
	ObjectsDueDate* forced_duedate;
	gboolean preserved_pinned;
	gint preserved_priority;
	GeeHashMap* preserved_labels;
	gchar* preserved_deadline;
	gboolean restoring_labels;
	GeeHashMap* shortcuts_regex_map;
	GeeHashMap* signal_map;
	GtkEventControllerKey* destroy_controller;
	GtkEventControllerKey* content_controller_key;
	GtkEventControllerKey* event_controller_key;
	GtkShortcutController* shortcut_controller;
	guint date_detection_timeout_id;
	gchar* last_detected_date_text;
	gboolean date_auto_detection_enabled;
	ChronoCore* chrono;
	gint _position;
	NewTaskPosition _new_task_position;
};

struct _Block1Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	ServicesCalDAVCalDAVClient* caldav_client;
};

struct _Block2Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	gdouble start_x;
	gdouble start_y;
	gdouble end_x;
	gdouble end_y;
	GtkLabel* flying_label;
	ItemPriority priority;
};

struct _Block3Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	gint current_pos;
};

struct _Block4Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	gchar* current_text;
	gint cursor_pos;
	gint at_position;
};

struct _Block5Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	gchar* text;
};

struct _Block6Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	gdouble start_x;
	gdouble start_y;
	gdouble end_x;
	gdouble end_y;
	GtkLabel* flying_label;
	GDateTime* date;
};

struct _Block7Data {
	int _ref_count_;
	LayoutsQuickAddCore* self;
	GtkWidget* container;
};

static gint LayoutsQuickAddCore_private_offset;
static gpointer layouts_quick_add_core_parent_class = NULL;

static void layouts_quick_add_core_add_item (LayoutsQuickAddCore* self);
static gboolean ___lambda282_ (LayoutsQuickAddCore* self);
static gboolean ____lambda282__gsource_func (gpointer self);
static gint layouts_quick_add_core_generate_child_order (LayoutsQuickAddCore* self);
static void _layouts_quick_add_core_add_item (LayoutsQuickAddCore* self,
                                       ObjectsItem* item);
static void ___lambda283_ (LayoutsQuickAddCore* self,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda283__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ___lambda284_ (Block1Data* _data1_,
                    GObject* obj,
                    GAsyncResult* res);
static void ____lambda284__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static gboolean layouts_quick_add_core_get_shift_enter_used (LayoutsQuickAddCore* self);
static void layouts_quick_add_core_show_success_notification (LayoutsQuickAddCore* self);
static void layouts_quick_add_core_reset_item (LayoutsQuickAddCore* self);
static void layouts_quick_add_core_set_shift_enter_used (LayoutsQuickAddCore* self,
                                                  gboolean value);
static gboolean __lambda290_ (LayoutsQuickAddCore* self);
static gboolean ___lambda290__gsource_func (gpointer self);
static void __lambda285_ (LayoutsQuickAddCore* self,
                   gdouble progress);
static void ___lambda285__adw_animation_target_func (gdouble value,
                                              gpointer self);
static void __lambda286_ (LayoutsQuickAddCore* self);
static gboolean __lambda287_ (LayoutsQuickAddCore* self);
static void __lambda288_ (LayoutsQuickAddCore* self,
                   gdouble progress);
static void ___lambda288__adw_animation_target_func (gdouble value,
                                              gpointer self);
static void __lambda289_ (LayoutsQuickAddCore* self);
static void ___lambda289__adw_animation_done (AdwAnimation* _sender,
                                       gpointer self);
static gboolean ___lambda287__gsource_func (gpointer self);
static void ___lambda286__adw_animation_done (AdwAnimation* _sender,
                                       gpointer self);
static void layouts_quick_add_core_remove_entry_char (LayoutsQuickAddCore* self,
                                               const gchar* value);
static void layouts_quick_add_core_update_deadline (LayoutsQuickAddCore* self,
                                             GDateTime* date);
static void layouts_quick_add_core_entry_focus (LayoutsQuickAddCore* self);
static void layouts_quick_add_core_restore_focus (LayoutsQuickAddCore* self);
static void layouts_quick_add_core_handle_priority_shortcut (LayoutsQuickAddCore* self,
                                                      const gchar* text);
static void layouts_quick_add_core_animate_priority_to_button_single (LayoutsQuickAddCore* self,
                                                               const gchar* priority_text);
static void layouts_quick_add_core_handle_text_trigger (LayoutsQuickAddCore* self,
                                                 const gchar* key,
                                                 const gchar* text);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gdouble layouts_quick_add_core_get_cursor_position_in_entry (LayoutsQuickAddCore* self);
static void __lambda291_ (Block2Data* _data2_,
                   gdouble progress);
static gdouble layouts_quick_add_core_lerp (LayoutsQuickAddCore* self,
                                     gdouble start,
                                     gdouble end,
                                     gdouble progress);
static void ___lambda291__adw_animation_target_func (gdouble value,
                                              gpointer self);
static void __lambda292_ (Block2Data* _data2_);
static void ___lambda292__adw_animation_done (AdwAnimation* _sender,
                                       gpointer self);
static gdouble layouts_quick_add_core_get_precise_cursor_position (LayoutsQuickAddCore* self);
static PangoFontDescription* _vala_PangoFontDescription_copy (PangoFontDescription* self);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static void layouts_quick_add_core_handle_labels_popover (LayoutsQuickAddCore* self,
                                                   const gchar* text);
static void layouts_quick_add_core_show_labels_popover_at_cursor (LayoutsQuickAddCore* self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean ___lambda294_ (Block3Data* _data3_);
static gboolean ____lambda294__gsource_func (gpointer self);
static gboolean __lambda293_ (LayoutsQuickAddCore* self);
static gboolean ___lambda293__gsource_func (gpointer self);
static void layouts_quick_add_core_handle_label_selection (LayoutsQuickAddCore* self,
                                                    ObjectsLabel* label);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static gboolean ___lambda295_ (Block4Data* _data4_);
static gboolean ____lambda295__gsource_func (gpointer self);
static GtkPopover* layouts_quick_add_core_build_tip_popover (LayoutsQuickAddCore* self);
static GtkWidget* layouts_quick_add_core_build_shortcut_widget (LayoutsQuickAddCore* self,
                                                         const gchar* shortcut_key,
                                                         const gchar* color,
                                                         const gchar* title,
                                                         const gchar* subtitle);
static void __lambda296_ (LayoutsQuickAddCore* self);
static gboolean __lambda297_ (LayoutsQuickAddCore* self);
static gboolean ___lambda297__gsource_func (gpointer self);
static void ___lambda296__gtk_popover_closed (GtkPopover* _sender,
                                       gpointer self);
static gint layouts_quick_add_core_set_sort_func (LayoutsQuickAddCore* self,
                                           ObjectsItem* item1,
                                           ObjectsItem* item2);
static gint _layouts_quick_add_core_set_sort_func_gcompare_data_func (gconstpointer a,
                                                               gconstpointer b,
                                                               gpointer self);
static void layouts_quick_add_core_normalize_orders (LayoutsQuickAddCore* self,
                                              GeeArrayList* items);
static void layouts_quick_add_core_handle_natural_date_detection (LayoutsQuickAddCore* self,
                                                           const gchar* text);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
static gboolean __lambda298_ (Block5Data* _data5_);
static void layouts_quick_add_core_animate_date_to_schedule_button (LayoutsQuickAddCore* self,
                                                             const gchar* date_text,
                                                             GDateTime* date);
static gboolean ___lambda298__gsource_func (gpointer self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static void __lambda299_ (Block6Data* _data6_,
                   gdouble progress);
static void ___lambda299__adw_animation_target_func (gdouble value,
                                              gpointer self);
static void __lambda300_ (Block6Data* _data6_);
static void ___lambda300__adw_animation_done (AdwAnimation* _sender,
                                       gpointer self);
static void layouts_quick_add_core_set_current_focus (LayoutsQuickAddCore* self,
                                               LayoutsQuickAddCoreFocusedWidget value);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__HTTP_RESPONSE (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static GObject * layouts_quick_add_core_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void _layouts_quick_add_core___lambda301_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda301__gtk_widget_show (GtkWidget* _sender,
                                                            gpointer self);
static void _layouts_quick_add_core___lambda302_ (LayoutsQuickAddCore* self);
static gboolean ___lambda303_ (LayoutsQuickAddCore* self);
static gboolean ____lambda303__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda302__gtk_popover_closed (GtkPopover* _sender,
                                                               gpointer self);
static void _layouts_quick_add_core___lambda304_ (LayoutsQuickAddCore* self,
                                           ObjectsLabel* label);
static void __layouts_quick_add_core___lambda304__widgets_label_picker_label_quick_picker_label_selected (WidgetsLabelPickerLabelQuickPicker* _sender,
                                                                                                   ObjectsLabel* label,
                                                                                                   gpointer self);
static void _layouts_quick_add_core___lambda305_ (LayoutsQuickAddCore* self);
static gboolean __lambda306_ (LayoutsQuickAddCore* self);
static gboolean ___lambda306__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda305__g_object_notify (GObject* _sender,
                                                            GParamSpec* pspec,
                                                            gpointer self);
static void _layouts_quick_add_core___lambda307_ (Block7Data* _data7_,
                                           gint n_press,
                                           gdouble x,
                                           gdouble y);
static void __layouts_quick_add_core___lambda307__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                      gint n_press,
                                                                      gdouble x,
                                                                      gdouble y,
                                                                      gpointer self);
static gboolean _layouts_quick_add_core___lambda308_ (LayoutsQuickAddCore* self);
static gboolean __layouts_quick_add_core___lambda308__gsource_func (gpointer self);
static void _layouts_quick_add_core_add_item_gtk_button_clicked (GtkButton* _sender,
                                                          gpointer self);
static void _layouts_quick_add_core___lambda309_ (LayoutsQuickAddCore* self,
                                           ObjectsProject* project);
static void __layouts_quick_add_core___lambda309__widgets_project_picker_project_picker_button_project_change (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                        ObjectsProject* project,
                                                                                                        gpointer self);
static void _layouts_quick_add_core___lambda310_ (LayoutsQuickAddCore* self,
                                           ObjectsSection* section);
static void __layouts_quick_add_core___lambda310__widgets_project_picker_project_picker_button_section_change (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                        ObjectsSection* section,
                                                                                                        gpointer self);
static void _layouts_quick_add_core___lambda311_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda312_ (LayoutsQuickAddCore* self);
static gboolean ____lambda312__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda311__widgets_project_picker_project_picker_button_picker_opened (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                       gboolean active,
                                                                                                       gpointer self);
static void _layouts_quick_add_core___lambda313_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda313__widgets_schedule_button_duedate_changed (WidgetsScheduleButton* _sender,
                                                                                    gpointer self);
static void _layouts_quick_add_core___lambda314_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda315_ (LayoutsQuickAddCore* self);
static gboolean ____lambda315__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda314__widgets_schedule_button_picker_opened (WidgetsScheduleButton* _sender,
                                                                                  gboolean active,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda316_ (LayoutsQuickAddCore* self,
                                           gint priority);
static void __layouts_quick_add_core___lambda316__widgets_priority_button_changed (WidgetsPriorityButton* _sender,
                                                                            gint priority,
                                                                            gpointer self);
static void _layouts_quick_add_core___lambda317_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda318_ (LayoutsQuickAddCore* self);
static gboolean ____lambda318__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda317__widgets_priority_button_picker_opened (WidgetsPriorityButton* _sender,
                                                                                  gboolean active,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda319_ (LayoutsQuickAddCore* self,
                                           GeeHashMap* new_labels);
static void __layouts_quick_add_core___lambda319__widgets_label_picker_label_button_labels_changed (WidgetsLabelPickerLabelButton* _sender,
                                                                                             GeeHashMap* labels,
                                                                                             gpointer self);
static void _layouts_quick_add_core___lambda320_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda321_ (LayoutsQuickAddCore* self);
static gboolean ____lambda321__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda320__widgets_label_picker_label_button_picker_opened (WidgetsLabelPickerLabelButton* _sender,
                                                                                            gboolean active,
                                                                                            gpointer self);
static void _layouts_quick_add_core___lambda322_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda323_ (LayoutsQuickAddCore* self);
static gboolean ____lambda323__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda322__widgets_reminder_picker_reminder_button_picker_opened (WidgetsReminderPickerReminderButton* _sender,
                                                                                                  gboolean active,
                                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda324_ (LayoutsQuickAddCore* self,
                                           GDateTime* date);
static void __layouts_quick_add_core___lambda324__widgets_deadline_button_date_selected (WidgetsDeadlineButton* _sender,
                                                                                  GDateTime* date,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda325_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda326_ (LayoutsQuickAddCore* self);
static gboolean ____lambda326__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda325__widgets_deadline_button_picker_opened (WidgetsDeadlineButton* _sender,
                                                                                  gboolean active,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda327_ (LayoutsQuickAddCore* self,
                                           GDateTime* date);
static void __layouts_quick_add_core___lambda327__widgets_deadline_button_date_selected (WidgetsDeadlineButton* _sender,
                                                                                  GDateTime* date,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda328_ (LayoutsQuickAddCore* self,
                                           gboolean active);
static gboolean ___lambda329_ (LayoutsQuickAddCore* self);
static gboolean ____lambda329__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda328__widgets_deadline_button_picker_opened (WidgetsDeadlineButton* _sender,
                                                                                  gboolean active,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda330_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda330__gtk_entry_activate (GtkEntry* _sender,
                                                               gpointer self);
static void _layouts_quick_add_core___lambda331_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda331__gtk_editable_changed (GtkEditable* _sender,
                                                                 gpointer self);
static gboolean _layouts_quick_add_core___lambda332_ (LayoutsQuickAddCore* self,
                                               guint keyval,
                                               guint keycode,
                                               GdkModifierType state);
static gboolean __layouts_quick_add_core___lambda332__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                     guint keyval,
                                                                                     guint keycode,
                                                                                     GdkModifierType state,
                                                                                     gpointer self);
static void _layouts_quick_add_core___lambda333_ (LayoutsQuickAddCore* self,
                                           guint keyval,
                                           guint keycode,
                                           GdkModifierType state);
static void __layouts_quick_add_core___lambda333__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                  guint keyval,
                                                                                  guint keycode,
                                                                                  GdkModifierType state,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda334_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda334__widgets_markdown_editor_return_pressed (WidgetsMarkdownEditor* _sender,
                                                                                   gpointer self);
static void _layouts_quick_add_core___lambda335_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda335__gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                             gpointer self);
static void _layouts_quick_add_core___lambda336_ (LayoutsQuickAddCore* self);
static void __layouts_quick_add_core___lambda336__widgets_markdown_editor_focus_in (WidgetsMarkdownEditor* _sender,
                                                                             gpointer self);
static gboolean _layouts_quick_add_core___lambda337_ (LayoutsQuickAddCore* self,
                                               guint keyval,
                                               guint keycode,
                                               GdkModifierType state);
static gboolean __layouts_quick_add_core___lambda337__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                     guint keyval,
                                                                                     guint keycode,
                                                                                     GdkModifierType state,
                                                                                     gpointer self);
static void _layouts_quick_add_core___lambda338_ (LayoutsQuickAddCore* self,
                                           guint keyval,
                                           guint keycode,
                                           GdkModifierType state);
static void __layouts_quick_add_core___lambda338__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                  guint keyval,
                                                                                  guint keycode,
                                                                                  GdkModifierType state,
                                                                                  gpointer self);
static void _layouts_quick_add_core___lambda339_ (LayoutsQuickAddCore* self);
static gboolean __lambda340_ (LayoutsQuickAddCore* self);
static gboolean ___lambda340__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda339__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                      gpointer self);
static void _layouts_quick_add_core___lambda341_ (LayoutsQuickAddCore* self);
static gboolean __lambda342_ (LayoutsQuickAddCore* self);
static gboolean ___lambda342__gsource_func (gpointer self);
static void __layouts_quick_add_core___lambda341__widgets_pin_button_changed (WidgetsPinButton* _sender,
                                                                       gpointer self);
static void _layouts_quick_add_core___lambda343_ (LayoutsQuickAddCore* self,
                                           ObjectsLabel* label);
static void __layouts_quick_add_core___lambda343__widgets_item_labels_label_clicked (WidgetsItemLabels* _sender,
                                                                              ObjectsLabel* label,
                                                                              gpointer self);
static gboolean _layouts_quick_add_core___lambda344_ (LayoutsQuickAddCore* self);
static gboolean __layouts_quick_add_core___lambda344__gtk_shortcut_func (GtkWidget* widget,
                                                                  GVariant* args,
                                                                  gpointer self);
static gboolean _layouts_quick_add_core___lambda345_ (LayoutsQuickAddCore* self);
static gboolean __layouts_quick_add_core___lambda345__gtk_shortcut_func (GtkWidget* widget,
                                                                  GVariant* args,
                                                                  gpointer self);
static gboolean _layouts_quick_add_core___lambda346_ (LayoutsQuickAddCore* self);
static gboolean __layouts_quick_add_core___lambda346__gtk_shortcut_func (GtkWidget* widget,
                                                                  GVariant* args,
                                                                  gpointer self);
static gboolean _layouts_quick_add_core___lambda347_ (LayoutsQuickAddCore* self);
static gboolean __layouts_quick_add_core___lambda347__gtk_shortcut_func (GtkWidget* widget,
                                                                  GVariant* args,
                                                                  gpointer self);
static void _layouts_quick_add_core___lambda348_ (LayoutsQuickAddCore* self,
                                           guint keyval,
                                           guint keycode,
                                           GdkModifierType state);
static void __layouts_quick_add_core___lambda348__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                                  guint keyval,
                                                                                  guint keycode,
                                                                                  GdkModifierType state,
                                                                                  gpointer self);
static void layouts_quick_add_core_finalize (GObject * obj);
static GType layouts_quick_add_core_get_type_once (void);
static void _vala_layouts_quick_add_core_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_layouts_quick_add_core_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
layouts_quick_add_core_get_instance_private (LayoutsQuickAddCore* self)
{
	return G_STRUCT_MEMBER_P (self, LayoutsQuickAddCore_private_offset);
}

static GType
layouts_quick_add_core_focused_widget_get_type_once (void)
{
	static const GEnumValue values[] = {{LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY, "LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY", "content-entry"}, {LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_DESCRIPTION_TEXTVIEW, "LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_DESCRIPTION_TEXTVIEW", "description-textview"}, {0, NULL, NULL}};
	GType layouts_quick_add_core_focused_widget_type_id;
	layouts_quick_add_core_focused_widget_type_id = g_enum_register_static ("LayoutsQuickAddCoreFocusedWidget", values);
	return layouts_quick_add_core_focused_widget_type_id;
}

GType
layouts_quick_add_core_focused_widget_get_type (void)
{
	static volatile gsize layouts_quick_add_core_focused_widget_type_id__once = 0;
	if (g_once_init_enter (&layouts_quick_add_core_focused_widget_type_id__once)) {
		GType layouts_quick_add_core_focused_widget_type_id;
		layouts_quick_add_core_focused_widget_type_id = layouts_quick_add_core_focused_widget_get_type_once ();
		g_once_init_leave (&layouts_quick_add_core_focused_widget_type_id__once, layouts_quick_add_core_focused_widget_type_id);
	}
	return layouts_quick_add_core_focused_widget_type_id__once;
}

LayoutsQuickAddCore*
layouts_quick_add_core_construct (GType object_type,
                                  gboolean is_window_quick_add)
{
	LayoutsQuickAddCore * self = NULL;
	self = (LayoutsQuickAddCore*) g_object_new (object_type, "is-window-quick-add", is_window_quick_add, NULL);
	return self;
}

LayoutsQuickAddCore*
layouts_quick_add_core_new (gboolean is_window_quick_add)
{
	return layouts_quick_add_core_construct (LAYOUTS_TYPE_QUICK_ADD_CORE, is_window_quick_add);
}

static gboolean
___lambda282_ (LayoutsQuickAddCore* self)
{
	GtkRevealer* _tmp0_;
	GtkEntry* _tmp1_;
	gboolean result;
	_tmp0_ = self->priv->info_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, TRUE);
	_tmp1_ = self->priv->content_entry;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, "error");
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda282__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda282_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
___lambda283_ (LayoutsQuickAddCore* 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_;
	layouts_quick_add_core_set_is_loading (self, FALSE);
	_tmp4_ = response;
	_tmp5_ = http_response_get_status (_tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_) {
		ObjectsItem* _tmp7_;
		HttpResponse* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		ObjectsItem* _tmp11_;
		_tmp7_ = self->priv->_item;
		_tmp8_ = response;
		_tmp9_ = http_response_get_data (_tmp8_);
		_tmp10_ = _tmp9_;
		objects_base_object_set_id ((ObjectsBaseObject*) _tmp7_, _tmp10_);
		_tmp11_ = self->priv->_item;
		_layouts_quick_add_core_add_item (self, _tmp11_);
	} else {
		HttpResponse* _tmp12_;
		_tmp12_ = response;
		g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_ERROR_SIGNAL], 0, _tmp12_);
	}
	_http_response_unref0 (response);
}

static void
____lambda283__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda283_ ((LayoutsQuickAddCore*) self, source_object, res);
	g_object_unref (self);
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->caldav_client);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
___lambda284_ (Block1Data* _data1_,
               GObject* obj,
               GAsyncResult* res)
{
	LayoutsQuickAddCore* self;
	HttpResponse* response = NULL;
	ServicesCalDAVCalDAVClient* _tmp0_;
	HttpResponse* _tmp1_;
	HttpResponse* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	self = _data1_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data1_->caldav_client;
	_tmp1_ = services_cal_dav_cal_dav_client_add_item_finish (_tmp0_, res);
	response = _tmp1_;
	layouts_quick_add_core_set_is_loading (self, FALSE);
	_tmp2_ = response;
	_tmp3_ = http_response_get_status (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ObjectsItem* _tmp5_;
		_tmp5_ = self->priv->_item;
		_layouts_quick_add_core_add_item (self, _tmp5_);
	} else {
		HttpResponse* _tmp6_;
		_tmp6_ = response;
		g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_ERROR_SIGNAL], 0, _tmp6_);
	}
	_http_response_unref0 (response);
}

static void
____lambda284__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda284_ (self, source_object, res);
	block1_data_unref (self);
}

static void
layouts_quick_add_core_add_item (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GtkRevealer* _tmp2_;
	GtkEntry* _tmp3_;
	gboolean _tmp4_ = FALSE;
	GtkEntry* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	GtkEntry* _tmp14_;
	const gchar* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	ObjectsItem* _tmp21_;
	GtkEntry* _tmp22_;
	const gchar* _tmp23_;
	ObjectsItem* _tmp24_;
	WidgetsMarkdownEditor* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	ObjectsItem* _tmp28_;
	ObjectsItem* _tmp29_;
	ObjectsProject* _tmp30_;
	ObjectsProject* _tmp31_;
	SourceType _tmp32_;
	SourceType _tmp33_;
	ObjectsItem* _tmp40_;
	ObjectsProject* _tmp41_;
	ObjectsProject* _tmp42_;
	SourceType _tmp43_;
	SourceType _tmp44_;
	ObjectsItem* _tmp48_;
	ObjectsProject* _tmp49_;
	ObjectsProject* _tmp50_;
	SourceType _tmp51_;
	SourceType _tmp52_;
	g_return_if_fail (self != NULL);
	_tmp0_ = layouts_quick_add_core_get_is_loading (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = self->priv->info_revealer;
	gtk_revealer_set_reveal_child (_tmp2_, FALSE);
	_tmp3_ = self->priv->content_entry;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp3_, "error");
	_tmp5_ = self->priv->content_entry;
	_tmp6_ = gtk_editable_get_text ((GtkEditable*) _tmp5_);
	_tmp7_ = strlen (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ <= 0) {
		WidgetsMarkdownEditor* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		_tmp9_ = self->priv->description_textview;
		_tmp10_ = widgets_markdown_editor_get_text (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = strlen (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp4_ = _tmp13_ <= 0;
		_g_free0 (_tmp11_);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_HIDE_DESTROY_SIGNAL], 0);
		return;
	}
	_tmp14_ = self->priv->content_entry;
	_tmp15_ = gtk_editable_get_text ((GtkEditable*) _tmp14_);
	_tmp16_ = strlen (_tmp15_);
	_tmp17_ = _tmp16_;
	if (_tmp17_ <= 0) {
		GtkRevealer* _tmp18_;
		guint _tmp19_;
		guint _tmp20_;
		_tmp18_ = self->priv->info_revealer;
		_tmp19_ = gtk_revealer_get_transition_duration (_tmp18_);
		_tmp20_ = _tmp19_;
		g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp20_, ____lambda282__gsource_func, g_object_ref (self), g_object_unref);
		return;
	}
	_tmp21_ = self->priv->_item;
	_tmp22_ = self->priv->content_entry;
	_tmp23_ = gtk_editable_get_text ((GtkEditable*) _tmp22_);
	objects_item_set_content (_tmp21_, _tmp23_);
	_tmp24_ = self->priv->_item;
	_tmp25_ = self->priv->description_textview;
	_tmp26_ = widgets_markdown_editor_get_text (_tmp25_);
	_tmp27_ = _tmp26_;
	objects_item_set_description (_tmp24_, _tmp27_);
	_g_free0 (_tmp27_);
	_tmp28_ = self->priv->_item;
	objects_item_set_child_order (_tmp28_, layouts_quick_add_core_generate_child_order (self));
	_tmp29_ = self->priv->_item;
	_tmp30_ = objects_item_get_project (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = objects_project_get_source_type (_tmp31_);
	_tmp33_ = _tmp32_;
	if (_tmp33_ == SOURCE_TYPE_LOCAL) {
		ObjectsItem* _tmp34_;
		Util* _tmp35_;
		Util* _tmp36_;
		gchar* _tmp37_;
		gchar* _tmp38_;
		ObjectsItem* _tmp39_;
		_tmp34_ = self->priv->_item;
		_tmp35_ = util_get_default ();
		_tmp36_ = _tmp35_;
		_tmp37_ = util_generate_id (_tmp36_, NULL);
		_tmp38_ = _tmp37_;
		objects_base_object_set_id ((ObjectsBaseObject*) _tmp34_, _tmp38_);
		_g_free0 (_tmp38_);
		_g_object_unref0 (_tmp36_);
		_tmp39_ = self->priv->_item;
		_layouts_quick_add_core_add_item (self, _tmp39_);
		return;
	}
	_tmp40_ = self->priv->_item;
	_tmp41_ = objects_item_get_project (_tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = objects_project_get_source_type (_tmp42_);
	_tmp44_ = _tmp43_;
	if (_tmp44_ == SOURCE_TYPE_TODOIST) {
		ServicesTodoist* _tmp45_;
		ServicesTodoist* _tmp46_;
		ObjectsItem* _tmp47_;
		layouts_quick_add_core_set_is_loading (self, TRUE);
		_tmp45_ = services_todoist_get_default ();
		_tmp46_ = _tmp45_;
		_tmp47_ = self->priv->_item;
		services_todoist_add (_tmp46_, (ObjectsBaseObject*) _tmp47_, ____lambda283__gasync_ready_callback, g_object_ref (self));
		_g_object_unref0 (_tmp46_);
		return;
	}
	_tmp48_ = self->priv->_item;
	_tmp49_ = objects_item_get_project (_tmp48_);
	_tmp50_ = _tmp49_;
	_tmp51_ = objects_project_get_source_type (_tmp50_);
	_tmp52_ = _tmp51_;
	if (_tmp52_ == SOURCE_TYPE_CALDAV) {
		Block1Data* _data1_;
		ObjectsItem* _tmp53_;
		Util* _tmp54_;
		Util* _tmp55_;
		gchar* _tmp56_;
		gchar* _tmp57_;
		ServicesCalDAVCore* _tmp58_;
		ServicesCalDAVCore* _tmp59_;
		ObjectsItem* _tmp60_;
		ObjectsProject* _tmp61_;
		ObjectsProject* _tmp62_;
		ObjectsSource* _tmp63_;
		ObjectsSource* _tmp64_;
		ServicesCalDAVCalDAVClient* _tmp65_;
		ServicesCalDAVCalDAVClient* _tmp66_;
		ServicesCalDAVCalDAVClient* _tmp67_;
		ObjectsItem* _tmp68_;
		_data1_ = g_slice_new0 (Block1Data);
		_data1_->_ref_count_ = 1;
		_data1_->self = g_object_ref (self);
		layouts_quick_add_core_set_is_loading (self, TRUE);
		_tmp53_ = self->priv->_item;
		_tmp54_ = util_get_default ();
		_tmp55_ = _tmp54_;
		_tmp56_ = util_generate_id (_tmp55_, NULL);
		_tmp57_ = _tmp56_;
		objects_base_object_set_id ((ObjectsBaseObject*) _tmp53_, _tmp57_);
		_g_free0 (_tmp57_);
		_g_object_unref0 (_tmp55_);
		_tmp58_ = services_cal_dav_core_get_default ();
		_tmp59_ = _tmp58_;
		_tmp60_ = self->priv->_item;
		_tmp61_ = objects_item_get_project (_tmp60_);
		_tmp62_ = _tmp61_;
		_tmp63_ = objects_project_get_source (_tmp62_);
		_tmp64_ = _tmp63_;
		_tmp65_ = services_cal_dav_core_get_client (_tmp59_, _tmp64_);
		_tmp66_ = _tmp65_;
		_g_object_unref0 (_tmp59_);
		_data1_->caldav_client = _tmp66_;
		_tmp67_ = _data1_->caldav_client;
		_tmp68_ = self->priv->_item;
		services_cal_dav_cal_dav_client_add_item (_tmp67_, _tmp68_, FALSE, ____lambda284__gasync_ready_callback, block1_data_ref (_data1_));
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return;
	}
}

static void
_layouts_quick_add_core_add_item (LayoutsQuickAddCore* self,
                                  ObjectsItem* item)
{
	WidgetsReminderPickerReminderButton* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = self->priv->reminder_button;
	_tmp1_ = widgets_reminder_picker_reminder_button_reminders (_tmp0_);
	_tmp2_ = _tmp1_;
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_ADD_ITEM_DB_SIGNAL], 0, item, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = objects_item_get_has_parent (item);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		ObjectsItem* _tmp5_;
		ObjectsItem* _tmp6_;
		_tmp5_ = objects_item_get_parent (item);
		_tmp6_ = _tmp5_;
		objects_item_set_collapsed (_tmp6_, TRUE);
	}
}

static gboolean
__lambda290_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_HIDE_DESTROY_SIGNAL], 0);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda290__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda290_ ((LayoutsQuickAddCore*) self);
	return result;
}

void
layouts_quick_add_core_added_successfully (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_ = FALSE;
	GtkToggleButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GtkStack* _tmp87_;
	GtkImage* _tmp88_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->create_more_button;
	_tmp2_ = gtk_toggle_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp4_;
		_tmp4_ = self->priv->_shift_enter_used;
		_tmp0_ = _tmp4_;
	}
	if (_tmp0_) {
		GtkStack* _tmp5_;
		GtkImage* _tmp6_;
		GtkEntry* _tmp7_;
		WidgetsMarkdownEditor* _tmp8_;
		gboolean keep_properties = FALSE;
		ServicesSettings* _tmp9_;
		ServicesSettings* _tmp10_;
		GSettings* _tmp11_;
		gboolean _tmp12_;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp29_ = FALSE;
		gboolean _tmp34_ = FALSE;
		gboolean _tmp39_ = FALSE;
		gboolean _tmp40_ = FALSE;
		gboolean _tmp62_ = FALSE;
		GtkEntry* _tmp86_;
		_tmp5_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp5_, "main");
		_tmp6_ = self->priv->added_image;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp6_, "fancy-turn-animation");
		layouts_quick_add_core_show_success_notification (self);
		layouts_quick_add_core_reset_item (self);
		_tmp7_ = self->priv->content_entry;
		gtk_editable_set_text ((GtkEditable*) _tmp7_, "");
		_tmp8_ = self->priv->description_textview;
		widgets_markdown_editor_set_text (_tmp8_, "");
		_tmp9_ = services_settings_get_default ();
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_->settings;
		_tmp12_ = g_settings_get_boolean (_tmp11_, "quick-add-keep-properties");
		_g_object_unref0 (_tmp10_);
		keep_properties = _tmp12_;
		if (keep_properties) {
			ObjectsDueDate* _tmp14_;
			_tmp14_ = self->priv->preserved_duedate;
			_tmp13_ = _tmp14_ != NULL;
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			ObjectsItem* _tmp15_;
			ObjectsDueDate* _tmp16_;
			ObjectsDueDate* _tmp17_;
			ObjectsDueDate* _tmp18_;
			WidgetsScheduleButton* _tmp19_;
			ObjectsItem* _tmp20_;
			_tmp15_ = self->priv->_item;
			_tmp16_ = self->priv->preserved_duedate;
			_tmp17_ = objects_due_date_duplicate (_tmp16_);
			_tmp18_ = _tmp17_;
			objects_item_set_due (_tmp15_, _tmp18_);
			_g_object_unref0 (_tmp18_);
			_tmp19_ = self->priv->schedule_button;
			_tmp20_ = self->priv->_item;
			widgets_schedule_button_update_from_item (_tmp19_, _tmp20_);
		} else {
			ObjectsDueDate* _tmp21_;
			_tmp21_ = self->priv->forced_duedate;
			if (_tmp21_ != NULL) {
				ObjectsItem* _tmp22_;
				ObjectsDueDate* _tmp23_;
				ObjectsDueDate* _tmp24_;
				ObjectsDueDate* _tmp25_;
				WidgetsScheduleButton* _tmp26_;
				ObjectsItem* _tmp27_;
				_tmp22_ = self->priv->_item;
				_tmp23_ = self->priv->forced_duedate;
				_tmp24_ = objects_due_date_duplicate (_tmp23_);
				_tmp25_ = _tmp24_;
				objects_item_set_due (_tmp22_, _tmp25_);
				_g_object_unref0 (_tmp25_);
				_tmp26_ = self->priv->schedule_button;
				_tmp27_ = self->priv->_item;
				widgets_schedule_button_update_from_item (_tmp26_, _tmp27_);
			} else {
				WidgetsScheduleButton* _tmp28_;
				_tmp28_ = self->priv->schedule_button;
				widgets_schedule_button_reset (_tmp28_);
			}
		}
		if (keep_properties) {
			_tmp29_ = self->priv->preserved_pinned;
		} else {
			_tmp29_ = FALSE;
		}
		if (_tmp29_) {
			ObjectsItem* _tmp30_;
			WidgetsPinButton* _tmp31_;
			ObjectsItem* _tmp32_;
			_tmp30_ = self->priv->_item;
			objects_item_set_pinned (_tmp30_, self->priv->preserved_pinned);
			_tmp31_ = self->priv->pin_button;
			_tmp32_ = self->priv->_item;
			widgets_pin_button_update_from_item (_tmp31_, _tmp32_);
		} else {
			WidgetsPinButton* _tmp33_;
			_tmp33_ = self->priv->pin_button;
			widgets_pin_button_reset (_tmp33_);
		}
		if (keep_properties) {
			_tmp34_ = self->priv->preserved_priority != -1;
		} else {
			_tmp34_ = FALSE;
		}
		if (_tmp34_) {
			ObjectsItem* _tmp35_;
			WidgetsPriorityButton* _tmp36_;
			ObjectsItem* _tmp37_;
			_tmp35_ = self->priv->_item;
			objects_item_set_priority (_tmp35_, self->priv->preserved_priority);
			_tmp36_ = self->priv->priority_button;
			_tmp37_ = self->priv->_item;
			widgets_priority_button_update_from_item (_tmp36_, _tmp37_);
		} else {
			WidgetsPriorityButton* _tmp38_;
			_tmp38_ = self->priv->priority_button;
			widgets_priority_button_reset (_tmp38_);
		}
		if (keep_properties) {
			GeeHashMap* _tmp41_;
			_tmp41_ = self->priv->preserved_labels;
			_tmp40_ = _tmp41_ != NULL;
		} else {
			_tmp40_ = FALSE;
		}
		if (_tmp40_) {
			GeeHashMap* _tmp42_;
			gint _tmp43_;
			gint _tmp44_;
			_tmp42_ = self->priv->preserved_labels;
			_tmp43_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp42_);
			_tmp44_ = _tmp43_;
			_tmp39_ = _tmp44_ > 0;
		} else {
			_tmp39_ = FALSE;
		}
		if (_tmp39_) {
			GeeHashMap* _tmp45_;
			GeeArrayList* labels_list = NULL;
			GeeArrayList* _tmp46_;
			WidgetsLabelPickerLabelButton* _tmp58_;
			GeeArrayList* _tmp59_;
			self->priv->restoring_labels = TRUE;
			_tmp45_ = self->priv->preserved_labels;
			layouts_quick_add_core_set_labels (self, _tmp45_);
			self->priv->restoring_labels = FALSE;
			_tmp46_ = gee_array_list_new (OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			labels_list = _tmp46_;
			{
				GeeIterator* _lbl_it = NULL;
				GeeHashMap* _tmp47_;
				GeeCollection* _tmp48_;
				GeeCollection* _tmp49_;
				GeeCollection* _tmp50_;
				GeeIterator* _tmp51_;
				GeeIterator* _tmp52_;
				_tmp47_ = self->priv->preserved_labels;
				_tmp48_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp47_);
				_tmp49_ = _tmp48_;
				_tmp50_ = _tmp49_;
				_tmp51_ = gee_iterable_iterator ((GeeIterable*) _tmp50_);
				_tmp52_ = _tmp51_;
				_g_object_unref0 (_tmp50_);
				_lbl_it = _tmp52_;
				while (TRUE) {
					GeeIterator* _tmp53_;
					ObjectsLabel* lbl = NULL;
					GeeIterator* _tmp54_;
					gpointer _tmp55_;
					GeeArrayList* _tmp56_;
					ObjectsLabel* _tmp57_;
					_tmp53_ = _lbl_it;
					if (!gee_iterator_next (_tmp53_)) {
						break;
					}
					_tmp54_ = _lbl_it;
					_tmp55_ = gee_iterator_get (_tmp54_);
					lbl = (ObjectsLabel*) _tmp55_;
					_tmp56_ = labels_list;
					_tmp57_ = lbl;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp56_, _tmp57_);
					_g_object_unref0 (lbl);
				}
				_g_object_unref0 (_lbl_it);
			}
			_tmp58_ = self->priv->label_button;
			_tmp59_ = labels_list;
			widgets_label_picker_label_button_set_labels (_tmp58_, _tmp59_);
			_g_object_unref0 (labels_list);
		} else {
			WidgetsLabelPickerLabelButton* _tmp60_;
			WidgetsItemLabels* _tmp61_;
			_tmp60_ = self->priv->label_button;
			widgets_label_picker_label_button_reset (_tmp60_);
			_tmp61_ = self->priv->item_labels;
			widgets_item_labels_reset (_tmp61_);
		}
		if (keep_properties) {
			const gchar* _tmp63_;
			_tmp63_ = self->priv->preserved_deadline;
			_tmp62_ = g_strcmp0 (_tmp63_, "") != 0;
		} else {
			_tmp62_ = FALSE;
		}
		if (_tmp62_) {
			ObjectsItem* _tmp64_;
			const gchar* _tmp65_;
			WidgetsDeadlineButton* _tmp66_;
			ObjectsItem* _tmp67_;
			GDateTime* _tmp68_;
			GDateTime* _tmp69_;
			WidgetsDeadlineButton* _tmp70_;
			ObjectsItem* _tmp71_;
			gboolean _tmp72_;
			gboolean _tmp73_;
			WidgetsDeadlineButton* _tmp74_;
			ObjectsItem* _tmp75_;
			GDateTime* _tmp76_;
			GDateTime* _tmp77_;
			WidgetsDeadlineButton* _tmp78_;
			ObjectsItem* _tmp79_;
			gboolean _tmp80_;
			gboolean _tmp81_;
			_tmp64_ = self->priv->_item;
			_tmp65_ = self->priv->preserved_deadline;
			objects_item_set_deadline_date (_tmp64_, _tmp65_);
			_tmp66_ = self->priv->deadline_button;
			_tmp67_ = self->priv->_item;
			_tmp68_ = objects_item_get_deadline_datetime (_tmp67_);
			_tmp69_ = _tmp68_;
			widgets_deadline_button_set_datetime (_tmp66_, _tmp69_);
			_tmp70_ = self->priv->deadline_button;
			_tmp71_ = self->priv->_item;
			_tmp72_ = objects_item_get_has_deadline (_tmp71_);
			_tmp73_ = _tmp72_;
			widgets_deadline_button_set_reveal_content (_tmp70_, !_tmp73_);
			_tmp74_ = self->priv->deadline_button_detail;
			_tmp75_ = self->priv->_item;
			_tmp76_ = objects_item_get_deadline_datetime (_tmp75_);
			_tmp77_ = _tmp76_;
			widgets_deadline_button_set_datetime (_tmp74_, _tmp77_);
			_tmp78_ = self->priv->deadline_button_detail;
			_tmp79_ = self->priv->_item;
			_tmp80_ = objects_item_get_has_deadline (_tmp79_);
			_tmp81_ = _tmp80_;
			widgets_deadline_button_set_reveal_content (_tmp78_, _tmp81_);
		} else {
			WidgetsDeadlineButton* _tmp82_;
			WidgetsDeadlineButton* _tmp83_;
			WidgetsDeadlineButton* _tmp84_;
			WidgetsDeadlineButton* _tmp85_;
			_tmp82_ = self->priv->deadline_button;
			widgets_deadline_button_set_datetime (_tmp82_, NULL);
			_tmp83_ = self->priv->deadline_button;
			widgets_deadline_button_set_reveal_content (_tmp83_, FALSE);
			_tmp84_ = self->priv->deadline_button_detail;
			widgets_deadline_button_set_datetime (_tmp84_, NULL);
			_tmp85_ = self->priv->deadline_button_detail;
			widgets_deadline_button_set_reveal_content (_tmp85_, FALSE);
		}
		_tmp86_ = self->priv->content_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp86_);
		layouts_quick_add_core_set_shift_enter_used (self, FALSE);
		return;
	}
	_tmp87_ = self->priv->main_stack;
	gtk_stack_set_visible_child_name (_tmp87_, "added");
	_tmp88_ = self->priv->added_image;
	gtk_widget_add_css_class ((GtkWidget*) _tmp88_, "fancy-turn-animation");
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 750, ___lambda290__gsource_func, g_object_ref (self), g_object_unref);
}

static void
__lambda285_ (LayoutsQuickAddCore* self,
              gdouble progress)
{
	GtkLabel* _tmp0_;
	_tmp0_ = self->priv->success_label;
	gtk_widget_set_opacity ((GtkWidget*) _tmp0_, progress);
}

static void
___lambda285__adw_animation_target_func (gdouble value,
                                         gpointer self)
{
	__lambda285_ ((LayoutsQuickAddCore*) self, value);
}

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

static void
__lambda288_ (LayoutsQuickAddCore* self,
              gdouble progress)
{
	GtkLabel* _tmp0_;
	_tmp0_ = self->priv->success_label;
	gtk_widget_set_opacity ((GtkWidget*) _tmp0_, 1.0 - progress);
}

static void
___lambda288__adw_animation_target_func (gdouble value,
                                         gpointer self)
{
	__lambda288_ ((LayoutsQuickAddCore*) self, value);
}

static void
__lambda289_ (LayoutsQuickAddCore* self)
{
	GtkLabel* _tmp0_;
	_tmp0_ = self->priv->success_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
}

static void
___lambda289__adw_animation_done (AdwAnimation* _sender,
                                  gpointer self)
{
	__lambda289_ ((LayoutsQuickAddCore*) self);
}

static gboolean
__lambda287_ (LayoutsQuickAddCore* self)
{
	AdwCallbackAnimationTarget* fade_out_target = NULL;
	AdwCallbackAnimationTarget* _tmp0_;
	AdwTimedAnimation* fade_out_animation = NULL;
	GtkLabel* _tmp1_;
	AdwAnimationTarget* _tmp2_;
	AdwTimedAnimation* _tmp3_;
	gboolean result;
	_tmp0_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (___lambda288__adw_animation_target_func, g_object_ref (self), g_object_unref);
	fade_out_target = _tmp0_;
	_tmp1_ = self->priv->success_label;
	_tmp2_ = _g_object_ref0 ((AdwAnimationTarget*) fade_out_target);
	_tmp3_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp1_, 0.0, 1.0, (guint) 300, _tmp2_);
	fade_out_animation = _tmp3_;
	adw_timed_animation_set_easing (fade_out_animation, ADW_EASE_IN_CUBIC);
	g_signal_connect_object ((AdwAnimation*) fade_out_animation, "done", (GCallback) ___lambda289__adw_animation_done, self, 0);
	adw_animation_play ((AdwAnimation*) fade_out_animation);
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (fade_out_animation);
	_g_object_unref0 (fade_out_target);
	return result;
}

static gboolean
___lambda287__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda287_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
__lambda286_ (LayoutsQuickAddCore* self)
{
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1500, ___lambda287__gsource_func, g_object_ref (self), g_object_unref);
}

static void
___lambda286__adw_animation_done (AdwAnimation* _sender,
                                  gpointer self)
{
	__lambda286_ ((LayoutsQuickAddCore*) self);
}

static void
layouts_quick_add_core_show_success_notification (LayoutsQuickAddCore* self)
{
	GtkLabel* _tmp0_;
	GtkLabel* _tmp1_;
	AdwCallbackAnimationTarget* fade_in_target = NULL;
	AdwCallbackAnimationTarget* _tmp2_;
	AdwTimedAnimation* fade_in_animation = NULL;
	GtkLabel* _tmp3_;
	AdwAnimationTarget* _tmp4_;
	AdwTimedAnimation* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->success_label;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE);
	_tmp1_ = self->priv->success_label;
	gtk_widget_set_opacity ((GtkWidget*) _tmp1_, 0.0);
	_tmp2_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (___lambda285__adw_animation_target_func, g_object_ref (self), g_object_unref);
	fade_in_target = _tmp2_;
	_tmp3_ = self->priv->success_label;
	_tmp4_ = _g_object_ref0 ((AdwAnimationTarget*) fade_in_target);
	_tmp5_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp3_, 0.0, 1.0, (guint) 300, _tmp4_);
	fade_in_animation = _tmp5_;
	adw_timed_animation_set_easing (fade_in_animation, ADW_EASE_OUT_CUBIC);
	g_signal_connect_object ((AdwAnimation*) fade_in_animation, "done", (GCallback) ___lambda286__adw_animation_done, self, 0);
	adw_animation_play ((AdwAnimation*) fade_in_animation);
	_g_object_unref0 (fade_in_animation);
	_g_object_unref0 (fade_in_target);
}

static void
layouts_quick_add_core_reset_item (LayoutsQuickAddCore* self)
{
	gchar* old_project_id = NULL;
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* old_section_id = NULL;
	ObjectsItem* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* old_parent_id = NULL;
	ObjectsItem* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	ObjectsItem* _tmp12_;
	ObjectsItem* _tmp13_;
	ObjectsItem* _tmp14_;
	ObjectsItem* _tmp15_;
	ObjectsItem* _tmp16_;
	WidgetsItemLabels* _tmp17_;
	ObjectsItem* _tmp18_;
	WidgetsLabelPickerLabelButton* _tmp19_;
	ObjectsItem* _tmp20_;
	ObjectsProject* _tmp21_;
	ObjectsProject* _tmp22_;
	ObjectsSource* _tmp23_;
	ObjectsSource* _tmp24_;
	WidgetsLabelPickerLabelQuickPicker* _tmp25_;
	ObjectsItem* _tmp26_;
	ObjectsProject* _tmp27_;
	ObjectsProject* _tmp28_;
	ObjectsSource* _tmp29_;
	ObjectsSource* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_project_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	old_project_id = _tmp3_;
	_tmp4_ = self->priv->_item;
	_tmp5_ = objects_item_get_section_id (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	old_section_id = _tmp7_;
	_tmp8_ = self->priv->_item;
	_tmp9_ = objects_item_get_parent_id (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup (_tmp10_);
	old_parent_id = _tmp11_;
	_tmp12_ = objects_item_new ();
	_tmp13_ = _tmp12_;
	layouts_quick_add_core_set_item (self, _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->priv->_item;
	objects_item_set_project_id (_tmp14_, old_project_id);
	_tmp15_ = self->priv->_item;
	objects_item_set_section_id (_tmp15_, old_section_id);
	_tmp16_ = self->priv->_item;
	objects_item_set_parent_id (_tmp16_, old_parent_id);
	layouts_quick_add_core_set_position (self, -1);
	_tmp17_ = self->priv->item_labels;
	_tmp18_ = self->priv->_item;
	widgets_item_labels_set_item (_tmp17_, _tmp18_);
	_tmp19_ = self->priv->label_button;
	_tmp20_ = self->priv->_item;
	_tmp21_ = objects_item_get_project (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = objects_project_get_source (_tmp22_);
	_tmp24_ = _tmp23_;
	widgets_label_picker_label_button_set_source (_tmp19_, _tmp24_);
	_tmp25_ = self->priv->labels_quick_picker;
	_tmp26_ = self->priv->_item;
	_tmp27_ = objects_item_get_project (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = objects_project_get_source (_tmp28_);
	_tmp30_ = _tmp29_;
	widgets_label_picker_label_quick_picker_set_source (_tmp25_, _tmp30_);
	_g_free0 (old_parent_id);
	_g_free0 (old_section_id);
	_g_free0 (old_project_id);
}

void
layouts_quick_add_core_update_content (LayoutsQuickAddCore* self,
                                       const gchar* content)
{
	GtkEntry* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (content != NULL);
	_tmp0_ = self->priv->content_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp0_, content);
}

void
layouts_quick_add_core_set_due (LayoutsQuickAddCore* self,
                                GDateTime* datetime)
{
	gchar* _tmp0_ = NULL;
	ObjectsItem* _tmp3_;
	ObjectsDueDate* _tmp4_;
	ObjectsDueDate* _tmp5_;
	ObjectsItem* _tmp6_;
	ObjectsDueDate* _tmp7_;
	ObjectsDueDate* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	WidgetsScheduleButton* _tmp22_;
	ObjectsItem* _tmp23_;
	g_return_if_fail (self != NULL);
	if (datetime == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = utils_datetime_get_todoist_datetime_format (datetime);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = self->priv->_item;
	_tmp4_ = objects_item_get_due (_tmp3_);
	_tmp5_ = _tmp4_;
	objects_due_date_set_date (_tmp5_, _tmp0_);
	_tmp6_ = self->priv->_item;
	_tmp7_ = objects_item_get_due (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = objects_due_date_get_date (_tmp8_);
	_tmp10_ = _tmp9_;
	if (g_strcmp0 (_tmp10_, "") == 0) {
		ObjectsItem* _tmp11_;
		ObjectsDueDate* _tmp12_;
		ObjectsDueDate* _tmp13_;
		_tmp11_ = self->priv->_item;
		_tmp12_ = objects_item_get_due (_tmp11_);
		_tmp13_ = _tmp12_;
		objects_due_date_reset (_tmp13_);
		_g_object_unref0 (self->priv->preserved_duedate);
		self->priv->preserved_duedate = NULL;
		_g_object_unref0 (self->priv->forced_duedate);
		self->priv->forced_duedate = NULL;
	} else {
		ObjectsItem* _tmp14_;
		ObjectsDueDate* _tmp15_;
		ObjectsDueDate* _tmp16_;
		ObjectsDueDate* _tmp17_;
		ObjectsItem* _tmp18_;
		ObjectsDueDate* _tmp19_;
		ObjectsDueDate* _tmp20_;
		ObjectsDueDate* _tmp21_;
		_tmp14_ = self->priv->_item;
		_tmp15_ = objects_item_get_due (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = objects_due_date_duplicate (_tmp16_);
		_g_object_unref0 (self->priv->preserved_duedate);
		self->priv->preserved_duedate = _tmp17_;
		_tmp18_ = self->priv->_item;
		_tmp19_ = objects_item_get_due (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = objects_due_date_duplicate (_tmp20_);
		_g_object_unref0 (self->priv->forced_duedate);
		self->priv->forced_duedate = _tmp21_;
	}
	_tmp22_ = self->priv->schedule_button;
	_tmp23_ = self->priv->_item;
	widgets_schedule_button_update_from_item (_tmp22_, _tmp23_);
	_g_free0 (_tmp0_);
}

void
layouts_quick_add_core_set_duedate (LayoutsQuickAddCore* self,
                                    ObjectsDueDate* duedate)
{
	ObjectsItem* _tmp0_;
	ObjectsItem* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	WidgetsScheduleButton* _tmp12_;
	ObjectsItem* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (duedate != NULL);
	_tmp0_ = self->priv->_item;
	objects_item_set_due (_tmp0_, duedate);
	_tmp1_ = self->priv->_item;
	_tmp2_ = objects_item_get_has_due (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		ObjectsItem* _tmp4_;
		ObjectsDueDate* _tmp5_;
		ObjectsDueDate* _tmp6_;
		gchar* _tmp7_;
		_tmp4_ = self->priv->_item;
		_tmp5_ = objects_item_get_due (_tmp4_);
		_tmp6_ = _tmp5_;
		objects_due_date_reset (_tmp6_);
		self->priv->date_auto_detection_enabled = TRUE;
		_tmp7_ = g_strdup ("");
		_g_free0 (self->priv->last_detected_date_text);
		self->priv->last_detected_date_text = _tmp7_;
	} else {
		ObjectsItem* _tmp8_;
		ObjectsDueDate* _tmp9_;
		ObjectsDueDate* _tmp10_;
		ObjectsDueDate* _tmp11_;
		_tmp8_ = self->priv->_item;
		_tmp9_ = objects_item_get_due (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = objects_due_date_duplicate (_tmp10_);
		_g_object_unref0 (self->priv->preserved_duedate);
		self->priv->preserved_duedate = _tmp11_;
	}
	_tmp12_ = self->priv->schedule_button;
	_tmp13_ = self->priv->_item;
	widgets_schedule_button_update_from_item (_tmp12_, _tmp13_);
}

void
layouts_quick_add_core_set_priority (LayoutsQuickAddCore* self,
                                     gint priority)
{
	ObjectsItem* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	ObjectsItem* _tmp3_;
	WidgetsPriorityButton* _tmp4_;
	ObjectsItem* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_priority (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == priority) {
		return;
	}
	_tmp3_ = self->priv->_item;
	objects_item_set_priority (_tmp3_, priority);
	self->priv->preserved_priority = priority;
	_tmp4_ = self->priv->priority_button;
	_tmp5_ = self->priv->_item;
	widgets_priority_button_update_from_item (_tmp4_, _tmp5_);
}

void
layouts_quick_add_core_set_pinned (LayoutsQuickAddCore* self,
                                   gboolean pinned)
{
	ObjectsItem* _tmp0_;
	WidgetsPinButton* _tmp1_;
	ObjectsItem* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_item;
	objects_item_set_pinned (_tmp0_, pinned);
	self->priv->preserved_pinned = pinned;
	_tmp1_ = self->priv->pin_button;
	_tmp2_ = self->priv->_item;
	widgets_pin_button_update_from_item (_tmp1_, _tmp2_);
}

void
layouts_quick_add_core_set_labels (LayoutsQuickAddCore* self,
                                   GeeHashMap* new_labels)
{
	gboolean labels_change = FALSE;
	gboolean _tmp55_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (new_labels != NULL);
	labels_change = FALSE;
	{
		GeeIterator* _entry_it = NULL;
		GeeSet* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeIterator* _tmp3_;
		GeeIterator* _tmp4_;
		_tmp0_ = gee_abstract_map_get_entries ((GeeAbstractMap*) new_labels);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_;
		_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		_entry_it = _tmp4_;
		while (TRUE) {
			GeeIterator* _tmp5_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			ObjectsItem* _tmp8_;
			GeeMapEntry* _tmp9_;
			gconstpointer _tmp10_;
			gconstpointer _tmp11_;
			ObjectsLabel* _tmp12_;
			ObjectsLabel* _tmp13_;
			gboolean _tmp14_;
			_tmp5_ = _entry_it;
			if (!gee_iterator_next (_tmp5_)) {
				break;
			}
			_tmp6_ = _entry_it;
			_tmp7_ = gee_iterator_get (_tmp6_);
			entry = (GeeMapEntry*) _tmp7_;
			_tmp8_ = self->priv->_item;
			_tmp9_ = entry;
			_tmp10_ = gee_map_entry_get_key (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = objects_item_get_label (_tmp8_, (const gchar*) _tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = _tmp13_ == NULL;
			_g_object_unref0 (_tmp13_);
			if (_tmp14_) {
				ObjectsItem* _tmp15_;
				GeeMapEntry* _tmp16_;
				gconstpointer _tmp17_;
				gconstpointer _tmp18_;
				ObjectsLabel* _tmp19_;
				ObjectsLabel* _tmp20_;
				_tmp15_ = self->priv->_item;
				_tmp16_ = entry;
				_tmp17_ = gee_map_entry_get_value (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = objects_item_add_label_if_not_exists (_tmp15_, (ObjectsLabel*) _tmp18_);
				_tmp20_ = _tmp19_;
				_g_object_unref0 (_tmp20_);
				labels_change = TRUE;
			}
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	{
		GeeArrayList* _label_list = NULL;
		ObjectsItem* _tmp21_;
		GeeArrayList* _tmp22_;
		gint _label_size = 0;
		GeeArrayList* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		gint _label_index = 0;
		_tmp21_ = self->priv->_item;
		_tmp22_ = objects_item_get_labels_list (_tmp21_);
		_label_list = _tmp22_;
		_tmp23_ = _label_list;
		_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
		_tmp25_ = _tmp24_;
		_label_size = _tmp25_;
		_label_index = -1;
		while (TRUE) {
			gint _tmp26_;
			gint _tmp27_;
			ObjectsLabel* label = NULL;
			GeeArrayList* _tmp28_;
			gpointer _tmp29_;
			ObjectsLabel* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			_label_index = _label_index + 1;
			_tmp26_ = _label_index;
			_tmp27_ = _label_size;
			if (!(_tmp26_ < _tmp27_)) {
				break;
			}
			_tmp28_ = _label_list;
			_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp28_, _label_index);
			label = (ObjectsLabel*) _tmp29_;
			_tmp30_ = label;
			_tmp31_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp30_);
			_tmp32_ = _tmp31_;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) new_labels, _tmp32_)) {
				ObjectsItem* _tmp33_;
				ObjectsLabel* _tmp34_;
				const gchar* _tmp35_;
				const gchar* _tmp36_;
				ObjectsLabel* _tmp37_;
				ObjectsLabel* _tmp38_;
				_tmp33_ = self->priv->_item;
				_tmp34_ = label;
				_tmp35_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp34_);
				_tmp36_ = _tmp35_;
				_tmp37_ = objects_item_delete_item_label (_tmp33_, _tmp36_);
				_tmp38_ = _tmp37_;
				_g_object_unref0 (_tmp38_);
				labels_change = TRUE;
			}
			_g_object_unref0 (label);
		}
		_g_object_unref0 (_label_list);
	}
	if (!self->priv->restoring_labels) {
		GeeHashMap* _tmp39_;
		_tmp39_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
		_g_object_unref0 (self->priv->preserved_labels);
		self->priv->preserved_labels = _tmp39_;
		{
			GeeIterator* _entry_it = NULL;
			GeeSet* _tmp40_;
			GeeSet* _tmp41_;
			GeeSet* _tmp42_;
			GeeIterator* _tmp43_;
			GeeIterator* _tmp44_;
			_tmp40_ = gee_abstract_map_get_entries ((GeeAbstractMap*) new_labels);
			_tmp41_ = _tmp40_;
			_tmp42_ = _tmp41_;
			_tmp43_ = gee_iterable_iterator ((GeeIterable*) _tmp42_);
			_tmp44_ = _tmp43_;
			_g_object_unref0 (_tmp42_);
			_entry_it = _tmp44_;
			while (TRUE) {
				GeeIterator* _tmp45_;
				GeeMapEntry* entry = NULL;
				GeeIterator* _tmp46_;
				gpointer _tmp47_;
				GeeHashMap* _tmp48_;
				GeeMapEntry* _tmp49_;
				gconstpointer _tmp50_;
				gconstpointer _tmp51_;
				GeeMapEntry* _tmp52_;
				gconstpointer _tmp53_;
				gconstpointer _tmp54_;
				_tmp45_ = _entry_it;
				if (!gee_iterator_next (_tmp45_)) {
					break;
				}
				_tmp46_ = _entry_it;
				_tmp47_ = gee_iterator_get (_tmp46_);
				entry = (GeeMapEntry*) _tmp47_;
				_tmp48_ = self->priv->preserved_labels;
				_tmp49_ = entry;
				_tmp50_ = gee_map_entry_get_key (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = entry;
				_tmp53_ = gee_map_entry_get_value (_tmp52_);
				_tmp54_ = _tmp53_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp48_, (const gchar*) _tmp51_, (ObjectsLabel*) _tmp54_);
				_g_object_unref0 (entry);
			}
			_g_object_unref0 (_entry_it);
		}
	}
	if (labels_change) {
		gboolean _tmp56_;
		_tmp56_ = self->priv->_labels_picker_activate_shortcut;
		_tmp55_ = _tmp56_;
	} else {
		_tmp55_ = FALSE;
	}
	if (_tmp55_) {
		layouts_quick_add_core_remove_entry_char (self, "@");
	}
}

static gchar*
g_date_time_to_string (GDateTime* self)
{
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_date_time_format (self, "%FT%H:%M:%S%z");
	result = _tmp0_;
	return result;
}

static void
layouts_quick_add_core_update_deadline (LayoutsQuickAddCore* self,
                                        GDateTime* date)
{
	gchar* _tmp0_ = NULL;
	ObjectsItem* _tmp3_;
	ObjectsItem* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	WidgetsDeadlineButton* _tmp8_;
	ObjectsItem* _tmp9_;
	GDateTime* _tmp10_;
	GDateTime* _tmp11_;
	WidgetsDeadlineButton* _tmp12_;
	ObjectsItem* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	WidgetsDeadlineButton* _tmp16_;
	ObjectsItem* _tmp17_;
	GDateTime* _tmp18_;
	GDateTime* _tmp19_;
	WidgetsDeadlineButton* _tmp20_;
	ObjectsItem* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	g_return_if_fail (self != NULL);
	if (date == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_date_time_to_string (date);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = self->priv->_item;
	objects_item_set_deadline_date (_tmp3_, _tmp0_);
	_tmp4_ = self->priv->_item;
	_tmp5_ = objects_item_get_deadline_date (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (self->priv->preserved_deadline);
	self->priv->preserved_deadline = _tmp7_;
	_tmp8_ = self->priv->deadline_button;
	_tmp9_ = self->priv->_item;
	_tmp10_ = objects_item_get_deadline_datetime (_tmp9_);
	_tmp11_ = _tmp10_;
	widgets_deadline_button_set_datetime (_tmp8_, _tmp11_);
	_tmp12_ = self->priv->deadline_button;
	_tmp13_ = self->priv->_item;
	_tmp14_ = objects_item_get_has_deadline (_tmp13_);
	_tmp15_ = _tmp14_;
	widgets_deadline_button_set_reveal_content (_tmp12_, !_tmp15_);
	_tmp16_ = self->priv->deadline_button_detail;
	_tmp17_ = self->priv->_item;
	_tmp18_ = objects_item_get_deadline_datetime (_tmp17_);
	_tmp19_ = _tmp18_;
	widgets_deadline_button_set_datetime (_tmp16_, _tmp19_);
	_tmp20_ = self->priv->deadline_button_detail;
	_tmp21_ = self->priv->_item;
	_tmp22_ = objects_item_get_has_deadline (_tmp21_);
	_tmp23_ = _tmp22_;
	widgets_deadline_button_set_reveal_content (_tmp20_, _tmp23_);
	_g_free0 (_tmp0_);
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static void
layouts_quick_add_core_remove_entry_char (LayoutsQuickAddCore* self,
                                          const gchar* value)
{
	gchar* current_text = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint at_position = 0;
	GtkEntry* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->content_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	current_text = _tmp2_;
	_tmp3_ = self->priv->content_entry;
	_tmp4_ = gtk_editable_get_text ((GtkEditable*) _tmp3_);
	_tmp5_ = _tmp4_;
	at_position = string_index_of (_tmp5_, value, 0);
	if (at_position != -1) {
		gchar* before_at = NULL;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* after_at = NULL;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* updated_text = NULL;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		GtkEntry* _tmp13_;
		const gchar* _tmp14_;
		_tmp6_ = current_text;
		_tmp7_ = string_substring (_tmp6_, (glong) 0, (glong) at_position);
		before_at = _tmp7_;
		_tmp8_ = current_text;
		_tmp9_ = string_substring (_tmp8_, (glong) (at_position + 1), (glong) -1);
		after_at = _tmp9_;
		_tmp10_ = before_at;
		_tmp11_ = after_at;
		_tmp12_ = g_strconcat (_tmp10_, _tmp11_, NULL);
		updated_text = _tmp12_;
		_tmp13_ = self->priv->content_entry;
		_tmp14_ = updated_text;
		gtk_editable_set_text ((GtkEditable*) _tmp13_, _tmp14_);
		layouts_quick_add_core_entry_focus (self);
		_g_free0 (updated_text);
		_g_free0 (after_at);
		_g_free0 (before_at);
	}
	_g_free0 (current_text);
}

static void
layouts_quick_add_core_entry_focus (LayoutsQuickAddCore* self)
{
	GtkEntry* _tmp0_;
	GtkEntry* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GtkEntry* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->content_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	_tmp1_ = self->priv->content_entry;
	g_object_get ((GtkEditable*) _tmp1_, "cursor-position", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->content_entry;
	_tmp5_ = gtk_editable_get_text ((GtkEditable*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = strlen (_tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp3_ < _tmp8_) {
		GtkEntry* _tmp9_;
		GtkEntry* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		_tmp9_ = self->priv->content_entry;
		_tmp10_ = self->priv->content_entry;
		_tmp11_ = gtk_editable_get_text ((GtkEditable*) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = strlen (_tmp12_);
		_tmp14_ = _tmp13_;
		gtk_editable_set_position ((GtkEditable*) _tmp9_, _tmp14_);
	}
}

static void
layouts_quick_add_core_restore_focus (LayoutsQuickAddCore* self)
{
	LayoutsQuickAddCoreFocusedWidget _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_current_focus;
	if (_tmp0_ == LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY) {
		layouts_quick_add_core_entry_focus (self);
	} else {
		WidgetsMarkdownEditor* _tmp1_;
		_tmp1_ = self->priv->description_textview;
		widgets_markdown_editor_focus (_tmp1_);
	}
}

void
layouts_quick_add_core_for_project (LayoutsQuickAddCore* self,
                                    ObjectsProject* project)
{
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ObjectsItem* _tmp3_;
	WidgetsProjectPickerProjectPickerButton* _tmp4_;
	WidgetsLabelPickerLabelButton* _tmp5_;
	ObjectsSource* _tmp6_;
	ObjectsSource* _tmp7_;
	WidgetsLabelPickerLabelQuickPicker* _tmp8_;
	ObjectsSource* _tmp9_;
	ObjectsSource* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (project != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp2_ = _tmp1_;
	objects_item_set_project_id (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_item;
	objects_item_set_section_id (_tmp3_, "");
	_tmp4_ = self->priv->project_picker_button;
	widgets_project_picker_project_picker_button_set_project (_tmp4_, project);
	_tmp5_ = self->priv->label_button;
	_tmp6_ = objects_project_get_source (project);
	_tmp7_ = _tmp6_;
	widgets_label_picker_label_button_set_source (_tmp5_, _tmp7_);
	_tmp8_ = self->priv->labels_quick_picker;
	_tmp9_ = objects_project_get_source (project);
	_tmp10_ = _tmp9_;
	widgets_label_picker_label_quick_picker_set_source (_tmp8_, _tmp10_);
}

void
layouts_quick_add_core_for_section (LayoutsQuickAddCore* self,
                                    ObjectsSection* section)
{
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ObjectsItem* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	WidgetsProjectPickerProjectPickerButton* _tmp6_;
	ObjectsProject* _tmp7_;
	ObjectsProject* _tmp8_;
	WidgetsProjectPickerProjectPickerButton* _tmp9_;
	WidgetsLabelPickerLabelButton* _tmp10_;
	ObjectsProject* _tmp11_;
	ObjectsProject* _tmp12_;
	ObjectsSource* _tmp13_;
	ObjectsSource* _tmp14_;
	WidgetsLabelPickerLabelQuickPicker* _tmp15_;
	ObjectsProject* _tmp16_;
	ObjectsProject* _tmp17_;
	ObjectsSource* _tmp18_;
	ObjectsSource* _tmp19_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (section != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) section);
	_tmp2_ = _tmp1_;
	objects_item_set_section_id (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_item;
	_tmp4_ = objects_section_get_project_id (section);
	_tmp5_ = _tmp4_;
	objects_item_set_project_id (_tmp3_, _tmp5_);
	_tmp6_ = self->priv->project_picker_button;
	_tmp7_ = objects_section_get_project (section);
	_tmp8_ = _tmp7_;
	widgets_project_picker_project_picker_button_set_project (_tmp6_, _tmp8_);
	_tmp9_ = self->priv->project_picker_button;
	widgets_project_picker_project_picker_button_set_section (_tmp9_, section);
	_tmp10_ = self->priv->label_button;
	_tmp11_ = objects_section_get_project (section);
	_tmp12_ = _tmp11_;
	_tmp13_ = objects_project_get_source (_tmp12_);
	_tmp14_ = _tmp13_;
	widgets_label_picker_label_button_set_source (_tmp10_, _tmp14_);
	_tmp15_ = self->priv->labels_quick_picker;
	_tmp16_ = objects_section_get_project (section);
	_tmp17_ = _tmp16_;
	_tmp18_ = objects_project_get_source (_tmp17_);
	_tmp19_ = _tmp18_;
	widgets_label_picker_label_quick_picker_set_source (_tmp15_, _tmp19_);
}

void
layouts_quick_add_core_for_parent (LayoutsQuickAddCore* self,
                                   ObjectsItem* _item)
{
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ObjectsItem* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	ObjectsItem* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	WidgetsProjectPickerProjectPickerButton* _tmp9_;
	ObjectsProject* _tmp10_;
	ObjectsProject* _tmp11_;
	WidgetsLabelPickerLabelButton* _tmp12_;
	ObjectsProject* _tmp13_;
	ObjectsProject* _tmp14_;
	ObjectsSource* _tmp15_;
	ObjectsSource* _tmp16_;
	WidgetsLabelPickerLabelQuickPicker* _tmp17_;
	ObjectsProject* _tmp18_;
	ObjectsProject* _tmp19_;
	ObjectsSource* _tmp20_;
	ObjectsSource* _tmp21_;
	WidgetsProjectPickerProjectPickerButton* _tmp22_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (_item != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_project_id (_item);
	_tmp2_ = _tmp1_;
	objects_item_set_project_id (_tmp0_, _tmp2_);
	_tmp3_ = self->priv->_item;
	_tmp4_ = objects_item_get_section_id (_item);
	_tmp5_ = _tmp4_;
	objects_item_set_section_id (_tmp3_, _tmp5_);
	_tmp6_ = self->priv->_item;
	_tmp7_ = objects_base_object_get_id ((ObjectsBaseObject*) _item);
	_tmp8_ = _tmp7_;
	objects_item_set_parent_id (_tmp6_, _tmp8_);
	_tmp9_ = self->priv->project_picker_button;
	_tmp10_ = objects_item_get_project (_item);
	_tmp11_ = _tmp10_;
	widgets_project_picker_project_picker_button_set_project (_tmp9_, _tmp11_);
	_tmp12_ = self->priv->label_button;
	_tmp13_ = objects_item_get_project (_item);
	_tmp14_ = _tmp13_;
	_tmp15_ = objects_project_get_source (_tmp14_);
	_tmp16_ = _tmp15_;
	widgets_label_picker_label_button_set_source (_tmp12_, _tmp16_);
	_tmp17_ = self->priv->labels_quick_picker;
	_tmp18_ = objects_item_get_project (_item);
	_tmp19_ = _tmp18_;
	_tmp20_ = objects_project_get_source (_tmp19_);
	_tmp21_ = _tmp20_;
	widgets_label_picker_label_quick_picker_set_source (_tmp17_, _tmp21_);
	_tmp22_ = self->priv->project_picker_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, FALSE);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static void
layouts_quick_add_core_handle_priority_shortcut (LayoutsQuickAddCore* self,
                                                 const gchar* text)
{
	GMatchInfo* match = NULL;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp6_;
	gpointer _tmp7_;
	GRegex* _tmp8_;
	GMatchInfo* _tmp9_ = NULL;
	gboolean _tmp10_;
	gboolean _tmp11_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = self->priv->shortcuts_regex_map;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, "priority")) {
		{
			GRegex* _tmp1_ = NULL;
			GRegex* _tmp2_;
			GeeHashMap* _tmp3_;
			_tmp2_ = g_regex_new ("(?:^|\\s)(p[1-4])(?:$|\\s)", G_REGEX_MULTILINE, 0, &_inner_error0_);
			_tmp1_ = _tmp2_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp3_ = self->priv->shortcuts_regex_map;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, "priority", _tmp1_);
			_g_regex_unref0 (_tmp1_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp4_ = e;
			_tmp5_ = _tmp4_->message;
			g_critical ("QuickAddCore.vala:1153: %s", _tmp5_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_match_info_unref0 (match);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	_tmp6_ = self->priv->shortcuts_regex_map;
	_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, "priority");
	_tmp8_ = (GRegex*) _tmp7_;
	_tmp10_ = g_regex_match (_tmp8_, text, 0, &_tmp9_);
	_g_match_info_unref0 (match);
	match = _tmp9_;
	_tmp11_ = _tmp10_;
	_g_regex_unref0 (_tmp8_);
	if (_tmp11_) {
		gchar* _result_ = NULL;
		GMatchInfo* _tmp12_;
		gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* new_text = NULL;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		GtkEntry* _tmp17_;
		const gchar* _tmp18_;
		_tmp12_ = match;
		_tmp13_ = g_match_info_fetch (_tmp12_, 1);
		_result_ = _tmp13_;
		_tmp14_ = _result_;
		layouts_quick_add_core_animate_priority_to_button_single (self, _tmp14_);
		_tmp15_ = _result_;
		_tmp16_ = string_replace (text, _tmp15_, "");
		new_text = _tmp16_;
		_tmp17_ = self->priv->content_entry;
		_tmp18_ = new_text;
		gtk_editable_set_text ((GtkEditable*) _tmp17_, _tmp18_);
		layouts_quick_add_core_entry_focus (self);
		_g_free0 (new_text);
		_g_free0 (_result_);
	}
	_g_match_info_unref0 (match);
}

static void
layouts_quick_add_core_handle_text_trigger (LayoutsQuickAddCore* self,
                                            const gchar* key,
                                            const gchar* text)
{
	GMatchInfo* match = NULL;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp9_;
	gpointer _tmp10_;
	GRegex* _tmp11_;
	GMatchInfo* _tmp12_ = NULL;
	gboolean _tmp13_;
	gboolean _tmp14_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (key != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = self->priv->shortcuts_regex_map;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, key)) {
		{
			GRegex* _tmp1_ = NULL;
			gchar* _tmp2_;
			gchar* _tmp3_;
			GRegex* _tmp4_;
			GRegex* _tmp5_;
			GeeHashMap* _tmp6_;
			_tmp2_ = g_strdup_printf ("(?:^|\\s)(%s)(?:$|\\s)", key);
			_tmp3_ = _tmp2_;
			_tmp4_ = g_regex_new (_tmp3_, G_REGEX_MULTILINE, 0, &_inner_error0_);
			_tmp5_ = _tmp4_;
			_g_free0 (_tmp3_);
			_tmp1_ = _tmp5_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp6_ = self->priv->shortcuts_regex_map;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, key, _tmp1_);
			_g_regex_unref0 (_tmp1_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp7_;
			const gchar* _tmp8_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp7_ = e;
			_tmp8_ = _tmp7_->message;
			g_critical ("QuickAddCore.vala:1175: %s", _tmp8_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_match_info_unref0 (match);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
	_tmp9_ = self->priv->shortcuts_regex_map;
	_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, key);
	_tmp11_ = (GRegex*) _tmp10_;
	_tmp13_ = g_regex_match (_tmp11_, text, 0, &_tmp12_);
	_g_match_info_unref0 (match);
	match = _tmp12_;
	_tmp14_ = _tmp13_;
	_g_regex_unref0 (_tmp11_);
	if (_tmp14_) {
		gchar* _result_ = NULL;
		GMatchInfo* _tmp15_;
		gchar* _tmp16_;
		gchar* new_text = NULL;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		GtkEntry* _tmp19_;
		const gchar* _tmp20_;
		_tmp15_ = match;
		_tmp16_ = g_match_info_fetch (_tmp15_, 1);
		_result_ = _tmp16_;
		_tmp17_ = _result_;
		_tmp18_ = string_replace (text, _tmp17_, "");
		new_text = _tmp18_;
		_tmp19_ = self->priv->content_entry;
		_tmp20_ = new_text;
		gtk_editable_set_text ((GtkEditable*) _tmp19_, _tmp20_);
		if (g_strcmp0 (key, LAYOUTS_QUICK_ADD_CORE_SHORTCUTS_KEY_PROJECTS) == 0) {
			WidgetsProjectPickerProjectPickerButton* _tmp21_;
			layouts_quick_add_core_set_project_picker_activate_shortcut (self, TRUE);
			_tmp21_ = self->priv->project_picker_button;
			widgets_project_picker_project_picker_button_open_picker (_tmp21_);
		} else {
			if (g_strcmp0 (key, LAYOUTS_QUICK_ADD_CORE_SHORTCUTS_KEY_REMINDERS) == 0) {
				WidgetsReminderPickerReminderButton* _tmp22_;
				layouts_quick_add_core_set_reminder_picker_activate_shortcut (self, TRUE);
				_tmp22_ = self->priv->reminder_button;
				widgets_reminder_picker_reminder_button_open_picker (_tmp22_, TRUE);
			}
		}
		_g_free0 (new_text);
		_g_free0 (_result_);
	}
	_g_match_info_unref0 (match);
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->flying_label);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
__lambda291_ (Block2Data* _data2_,
              gdouble progress)
{
	LayoutsQuickAddCore* self;
	gint current_x = 0;
	gint current_y = 0;
	GtkFixed* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	self = _data2_->self;
	current_x = (gint) layouts_quick_add_core_lerp (self, _data2_->start_x, _data2_->end_x, progress);
	current_y = (gint) layouts_quick_add_core_lerp (self, _data2_->start_y, _data2_->end_y, progress);
	_tmp0_ = self->priv->animation_container;
	_tmp1_ = _data2_->flying_label;
	gtk_fixed_move (_tmp0_, (GtkWidget*) _tmp1_, (gdouble) current_x, (gdouble) current_y);
	_tmp2_ = _data2_->flying_label;
	gtk_widget_set_opacity ((GtkWidget*) _tmp2_, 1.0 - (progress * 0.3));
}

static void
___lambda291__adw_animation_target_func (gdouble value,
                                         gpointer self)
{
	__lambda291_ (self, value);
}

static void
__lambda292_ (Block2Data* _data2_)
{
	LayoutsQuickAddCore* self;
	GtkLabel* _tmp0_;
	GtkFixed* _tmp1_;
	GtkLabel* _tmp2_;
	WidgetsPriorityButton* _tmp3_;
	self = _data2_->self;
	_tmp0_ = _data2_->flying_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp0_, "priority-label-impact");
	_tmp1_ = self->priv->animation_container;
	_tmp2_ = _data2_->flying_label;
	gtk_fixed_remove (_tmp1_, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->priority_button;
	widgets_priority_button_animation (_tmp3_);
	layouts_quick_add_core_set_priority (self, (gint) _data2_->priority);
}

static void
___lambda292__adw_animation_done (AdwAnimation* _sender,
                                  gpointer self)
{
	__lambda292_ (self);
}

static void
layouts_quick_add_core_animate_priority_to_button_single (LayoutsQuickAddCore* self,
                                                          const gchar* priority_text)
{
	Block2Data* _data2_;
	gdouble entry_x = 0.0;
	gdouble entry_y = 0.0;
	gdouble button_x = 0.0;
	gdouble button_y = 0.0;
	graphene_point_t entry_point = {0};
	GtkEntry* _tmp0_;
	GtkOverlay* _tmp1_;
	graphene_point_t _tmp2_ = {0};
	graphene_point_t _tmp3_ = {0};
	gboolean _tmp4_;
	graphene_point_t _tmp5_;
	graphene_point_t _tmp6_;
	graphene_point_t button_point = {0};
	WidgetsPriorityButton* _tmp7_;
	GtkOverlay* _tmp8_;
	graphene_point_t _tmp9_ = {0};
	graphene_point_t _tmp10_ = {0};
	gboolean _tmp11_;
	graphene_point_t _tmp12_;
	graphene_point_t _tmp13_;
	gdouble cursor_x_offset = 0.0;
	GtkEntry* _tmp14_;
	WidgetsPriorityButton* _tmp15_;
	WidgetsPriorityButton* _tmp16_;
	gchar* _tmp17_;
	gchar** _tmp18_;
	GtkLabel* _tmp19_ = NULL;
	GtkFixed* _tmp20_;
	GtkLabel* _tmp21_;
	Util* _tmp22_;
	Util* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GtkLabel* _tmp26_;
	AdwCallbackAnimationTarget* target = NULL;
	AdwCallbackAnimationTarget* _tmp27_;
	AdwTimedAnimation* animation = NULL;
	GtkLabel* _tmp28_;
	AdwCallbackAnimationTarget* _tmp29_;
	AdwAnimationTarget* _tmp30_;
	AdwTimedAnimation* _tmp31_;
	AdwTimedAnimation* _tmp32_;
	AdwTimedAnimation* _tmp33_;
	AdwTimedAnimation* _tmp34_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (priority_text != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = self->priv->content_entry;
	_tmp1_ = self->priv->animation_overlay;
	memset (&_tmp2_, 0, sizeof (graphene_point_t));
	_tmp4_ = gtk_widget_compute_point ((GtkWidget*) _tmp0_, (GtkWidget*) _tmp1_, &_tmp2_, &_tmp3_);
	entry_point = _tmp3_;
	if (!_tmp4_) {
		block2_data_unref (_data2_);
		_data2_ = NULL;
		return;
	}
	_tmp5_ = entry_point;
	entry_x = (gdouble) _tmp5_.x;
	_tmp6_ = entry_point;
	entry_y = (gdouble) _tmp6_.y;
	_tmp7_ = self->priv->priority_button;
	_tmp8_ = self->priv->animation_overlay;
	memset (&_tmp9_, 0, sizeof (graphene_point_t));
	_tmp11_ = gtk_widget_compute_point ((GtkWidget*) _tmp7_, (GtkWidget*) _tmp8_, &_tmp9_, &_tmp10_);
	button_point = _tmp10_;
	if (!_tmp11_) {
		block2_data_unref (_data2_);
		_data2_ = NULL;
		return;
	}
	_tmp12_ = button_point;
	button_x = (gdouble) _tmp12_.x;
	_tmp13_ = button_point;
	button_y = (gdouble) _tmp13_.y;
	cursor_x_offset = layouts_quick_add_core_get_cursor_position_in_entry (self);
	_data2_->start_x = entry_x + cursor_x_offset;
	_tmp14_ = self->priv->content_entry;
	_data2_->start_y = entry_y + (gtk_widget_get_height ((GtkWidget*) _tmp14_) / 2);
	_tmp15_ = self->priv->priority_button;
	_data2_->end_x = button_x + (gtk_widget_get_width ((GtkWidget*) _tmp15_) / 2);
	_tmp16_ = self->priv->priority_button;
	_data2_->end_y = button_y + (gtk_widget_get_height ((GtkWidget*) _tmp16_) / 2);
	_tmp17_ = g_strdup ("priority-flying-label");
	_tmp18_ = g_new0 (gchar*, 1 + 1);
	_tmp18_[0] = _tmp17_;
	_tmp19_ = (GtkLabel*) gtk_label_new (priority_text);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp19_, _tmp18_);
	_tmp18_ = (_vala_array_free (_tmp18_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp19_);
	_data2_->flying_label = _tmp19_;
	_data2_->priority = item_priority_parse (priority_text);
	_tmp20_ = self->priv->animation_container;
	_tmp21_ = _data2_->flying_label;
	gtk_fixed_put (_tmp20_, (GtkWidget*) _tmp21_, (gdouble) ((gint) _data2_->start_x), (gdouble) ((gint) _data2_->start_y));
	_tmp22_ = util_get_default ();
	_tmp23_ = _tmp22_;
	_tmp24_ = item_priority_get_color (_data2_->priority);
	_tmp25_ = _tmp24_;
	_tmp26_ = _data2_->flying_label;
	util_set_widget_color (_tmp23_, _tmp25_, (GtkWidget*) _tmp26_);
	_g_free0 (_tmp25_);
	_g_object_unref0 (_tmp23_);
	_tmp27_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (___lambda291__adw_animation_target_func, block2_data_ref (_data2_), block2_data_unref);
	target = _tmp27_;
	_tmp28_ = _data2_->flying_label;
	_tmp29_ = target;
	_tmp30_ = _g_object_ref0 ((AdwAnimationTarget*) _tmp29_);
	_tmp31_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp28_, 0.0, 1.0, (guint) 400, _tmp30_);
	animation = _tmp31_;
	_tmp32_ = animation;
	adw_timed_animation_set_easing (_tmp32_, ADW_EASE_OUT_CUBIC);
	_tmp33_ = animation;
	g_signal_connect_data ((AdwAnimation*) _tmp33_, "done", (GCallback) ___lambda292__adw_animation_done, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	_tmp34_ = animation;
	adw_animation_play ((AdwAnimation*) _tmp34_);
	_g_object_unref0 (animation);
	_g_object_unref0 (target);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}

static gdouble
layouts_quick_add_core_get_cursor_position_in_entry (LayoutsQuickAddCore* self)
{
	gchar* text = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint cursor_pos = 0;
	GtkEntry* _tmp3_;
	PangoLayout* pango_layout = NULL;
	GtkEntry* _tmp4_;
	PangoLayout* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GtkEntry* _tmp8_;
	PangoContext* _tmp9_;
	PangoFontDescription* _tmp10_;
	gint text_width = 0;
	gint text_height = 0;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	GtkStyleContext* style_context = NULL;
	GtkEntry* _tmp13_;
	GtkStyleContext* _tmp14_;
	GtkStyleContext* _tmp15_;
	GtkBorder padding = {0};
	GtkBorder _tmp16_ = {0};
	GtkBorder _tmp17_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->content_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	text = _tmp2_;
	_tmp3_ = self->priv->content_entry;
	cursor_pos = gtk_editable_get_position ((GtkEditable*) _tmp3_);
	_tmp4_ = self->priv->content_entry;
	_tmp5_ = gtk_widget_create_pango_layout ((GtkWidget*) _tmp4_, "");
	pango_layout = _tmp5_;
	_tmp6_ = string_substring (text, (glong) 0, (glong) cursor_pos);
	_tmp7_ = _tmp6_;
	pango_layout_set_text (pango_layout, _tmp7_, -1);
	_g_free0 (_tmp7_);
	_tmp8_ = self->priv->content_entry;
	_tmp9_ = gtk_widget_get_pango_context ((GtkWidget*) _tmp8_);
	_tmp10_ = pango_context_get_font_description (_tmp9_);
	pango_layout_set_font_description (pango_layout, _tmp10_);
	pango_layout_get_pixel_size (pango_layout, &_tmp11_, &_tmp12_);
	text_width = _tmp11_;
	text_height = _tmp12_;
	_tmp13_ = self->priv->content_entry;
	_tmp14_ = gtk_widget_get_style_context ((GtkWidget*) _tmp13_);
	_tmp15_ = _g_object_ref0 (_tmp14_);
	style_context = _tmp15_;
	gtk_style_context_get_padding (style_context, &_tmp16_);
	padding = _tmp16_;
	_tmp17_ = padding;
	result = (gdouble) (_tmp17_.left + text_width);
	_g_object_unref0 (style_context);
	_g_object_unref0 (pango_layout);
	_g_free0 (text);
	return result;
}

static PangoFontDescription*
_vala_PangoFontDescription_copy (PangoFontDescription* self)
{
	return g_boxed_copy (pango_font_description_get_type (), self);
}

static gpointer
__vala_PangoFontDescription_copy0 (gpointer self)
{
	return self ? _vala_PangoFontDescription_copy (self) : NULL;
}

static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}

static gdouble
layouts_quick_add_core_get_precise_cursor_position (LayoutsQuickAddCore* self)
{
	gchar* text = NULL;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gint cursor_pos = 0;
	GtkEntry* _tmp3_;
	PangoContext* pango_context = NULL;
	GtkEntry* _tmp4_;
	PangoContext* _tmp5_;
	PangoContext* _tmp6_;
	PangoFontDescription* font_desc = NULL;
	PangoFontDescription* _tmp7_;
	PangoFontDescription* _tmp8_;
	PangoLayout* layout = NULL;
	PangoLayout* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gint width = 0;
	gint height = 0;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	GtkStyleContext* style_context = NULL;
	GtkEntry* _tmp14_;
	GtkStyleContext* _tmp15_;
	GtkStyleContext* _tmp16_;
	GtkBorder padding = {0};
	GtkBorder _tmp17_ = {0};
	GtkBorder margin = {0};
	GtkBorder _tmp18_ = {0};
	GtkBorder _tmp19_;
	GtkBorder _tmp20_;
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	_tmp0_ = self->priv->content_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	text = _tmp2_;
	_tmp3_ = self->priv->content_entry;
	cursor_pos = gtk_editable_get_position ((GtkEditable*) _tmp3_);
	_tmp4_ = self->priv->content_entry;
	_tmp5_ = gtk_widget_get_pango_context ((GtkWidget*) _tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	pango_context = _tmp6_;
	_tmp7_ = pango_context_get_font_description (pango_context);
	_tmp8_ = __vala_PangoFontDescription_copy0 (_tmp7_);
	font_desc = _tmp8_;
	_tmp9_ = pango_layout_new (pango_context);
	layout = _tmp9_;
	pango_layout_set_font_description (layout, font_desc);
	_tmp10_ = string_substring (text, (glong) 0, (glong) cursor_pos);
	_tmp11_ = _tmp10_;
	pango_layout_set_text (layout, _tmp11_, -1);
	_g_free0 (_tmp11_);
	pango_layout_get_pixel_size (layout, &_tmp12_, &_tmp13_);
	width = _tmp12_;
	height = _tmp13_;
	_tmp14_ = self->priv->content_entry;
	_tmp15_ = gtk_widget_get_style_context ((GtkWidget*) _tmp14_);
	_tmp16_ = _g_object_ref0 (_tmp15_);
	style_context = _tmp16_;
	gtk_style_context_get_padding (style_context, &_tmp17_);
	padding = _tmp17_;
	gtk_style_context_get_margin (style_context, &_tmp18_);
	margin = _tmp18_;
	_tmp19_ = margin;
	_tmp20_ = padding;
	result = (gdouble) ((_tmp19_.left + _tmp20_.left) + width);
	_g_object_unref0 (style_context);
	_g_object_unref0 (layout);
	__vala_PangoFontDescription_free0 (font_desc);
	_g_object_unref0 (pango_context);
	_g_free0 (text);
	return result;
}

static gdouble
layouts_quick_add_core_lerp (LayoutsQuickAddCore* self,
                             gdouble start,
                             gdouble end,
                             gdouble progress)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = start + ((end - start) * progress);
	return result;
}

static gunichar
string_get_char (const gchar* self,
                 glong index)
{
	gunichar result;
	g_return_val_if_fail (self != NULL, 0U);
	result = g_utf8_get_char (((gchar*) self) + index);
	return result;
}

static gint
string_index_of_nth_char (const gchar* self,
                          glong c)
{
	gchar* _tmp0_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = g_utf8_offset_to_pointer (self, c);
	result = (gint) (_tmp0_ - ((gchar*) self));
	return result;
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data3_->self;
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static gboolean
___lambda294_ (Block3Data* _data3_)
{
	LayoutsQuickAddCore* self;
	GtkEntry* _tmp0_;
	gboolean result;
	self = _data3_->self;
	_tmp0_ = self->priv->content_entry;
	gtk_editable_set_position ((GtkEditable*) _tmp0_, _data3_->current_pos);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda294__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda294_ (self);
	return result;
}

static void
layouts_quick_add_core_handle_labels_popover (LayoutsQuickAddCore* self,
                                              const gchar* text)
{
	WidgetsLabelPickerLabelQuickPicker* _tmp0_;
	gint cursor_pos = 0;
	GtkEntry* _tmp1_;
	gint at_position = 0;
	WidgetsLabelPickerLabelQuickPicker* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = self->priv->labels_quick_picker;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = self->priv->content_entry;
	cursor_pos = gtk_editable_get_position ((GtkEditable*) _tmp1_);
	at_position = -1;
	{
		gint i = 0;
		i = cursor_pos - 1;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_;
				gint _tmp5_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ - 1;
				}
				_tmp2_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp4_ = strlen (text);
				_tmp5_ = _tmp4_;
				if (i < _tmp5_) {
					gunichar char_at_pos = 0U;
					char_at_pos = string_get_char (text, (glong) string_index_of_nth_char (text, (glong) i));
					if (char_at_pos == ((gunichar) '@')) {
						at_position = i;
						break;
					}
					if (char_at_pos == ((gunichar) ' ')) {
						break;
					}
				}
			}
		}
	}
	if (at_position != -1) {
		gchar* filter_text = NULL;
		gchar* _tmp6_;
		WidgetsLabelPickerLabelQuickPicker* _tmp8_;
		gboolean _tmp9_;
		gboolean _tmp10_;
		WidgetsLabelPickerLabelQuickPicker* _tmp11_;
		const gchar* _tmp12_;
		_tmp6_ = g_strdup ("");
		filter_text = _tmp6_;
		if (cursor_pos > (at_position + 1)) {
			gint start_index = 0;
			gint end_index = 0;
			gchar* _tmp7_;
			start_index = string_index_of_nth_char (text, (glong) (at_position + 1));
			end_index = string_index_of_nth_char (text, (glong) cursor_pos);
			_tmp7_ = string_substring (text, (glong) start_index, (glong) (end_index - start_index));
			_g_free0 (filter_text);
			filter_text = _tmp7_;
		}
		_tmp8_ = self->priv->labels_quick_picker;
		_tmp9_ = gtk_widget_get_visible ((GtkWidget*) _tmp8_);
		_tmp10_ = _tmp9_;
		if (!_tmp10_) {
			layouts_quick_add_core_show_labels_popover_at_cursor (self);
		}
		_tmp11_ = self->priv->labels_quick_picker;
		_tmp12_ = filter_text;
		widgets_label_picker_label_quick_picker_set_filter_text (_tmp11_, _tmp12_);
		_g_free0 (filter_text);
		return;
	}
	_tmp13_ = self->priv->labels_quick_picker;
	_tmp14_ = gtk_widget_get_visible ((GtkWidget*) _tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_) {
		Block3Data* _data3_;
		GtkEntry* _tmp16_;
		WidgetsLabelPickerLabelQuickPicker* _tmp17_;
		_data3_ = g_slice_new0 (Block3Data);
		_data3_->_ref_count_ = 1;
		_data3_->self = g_object_ref (self);
		_tmp16_ = self->priv->content_entry;
		_data3_->current_pos = gtk_editable_get_position ((GtkEditable*) _tmp16_);
		_tmp17_ = self->priv->labels_quick_picker;
		gtk_popover_popdown ((GtkPopover*) _tmp17_);
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 10, ____lambda294__gsource_func, block3_data_ref (_data3_), block3_data_unref);
		block3_data_unref (_data3_);
		_data3_ = NULL;
	}
}

static gboolean
__lambda293_ (LayoutsQuickAddCore* self)
{
	WidgetsLabelPickerLabelQuickPicker* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->labels_quick_picker;
	widgets_label_picker_label_quick_picker_select_first_item (_tmp0_);
	layouts_quick_add_core_entry_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda293__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda293_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
layouts_quick_add_core_show_labels_popover_at_cursor (LayoutsQuickAddCore* self)
{
	gdouble cursor_x = 0.0;
	GdkRectangle rect = {0};
	GtkEntry* _tmp0_;
	WidgetsLabelPickerLabelQuickPicker* _tmp1_;
	GdkRectangle _tmp2_;
	WidgetsLabelPickerLabelQuickPicker* _tmp3_;
	g_return_if_fail (self != NULL);
	cursor_x = layouts_quick_add_core_get_cursor_position_in_entry (self);
	memset (&rect, 0, sizeof (GdkRectangle));
	rect.x = ((gint) cursor_x) + 112;
	_tmp0_ = self->priv->content_entry;
	rect.y = gtk_widget_get_height ((GtkWidget*) _tmp0_) + 6;
	rect.width = 1;
	rect.height = 1;
	_tmp1_ = self->priv->labels_quick_picker;
	_tmp2_ = rect;
	gtk_popover_set_pointing_to ((GtkPopover*) _tmp1_, &_tmp2_);
	_tmp3_ = self->priv->labels_quick_picker;
	gtk_popover_popup ((GtkPopover*) _tmp3_);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 10, ___lambda293__gsource_func, g_object_ref (self), g_object_unref);
}

static Block4Data*
block4_data_ref (Block4Data* _data4_)
{
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data4_->self;
		_g_free0 (_data4_->current_text);
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static gboolean
___lambda295_ (Block4Data* _data4_)
{
	LayoutsQuickAddCore* self;
	gchar* before_at = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* after_cursor = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* new_text = NULL;
	gchar* _tmp4_;
	GtkEntry* _tmp5_;
	GtkEntry* _tmp6_;
	gboolean result;
	self = _data4_->self;
	_tmp0_ = _data4_->current_text;
	_tmp1_ = string_substring (_tmp0_, (glong) 0, (glong) _data4_->at_position);
	before_at = _tmp1_;
	_tmp2_ = _data4_->current_text;
	_tmp3_ = string_substring (_tmp2_, (glong) _data4_->cursor_pos, (glong) -1);
	after_cursor = _tmp3_;
	_tmp4_ = g_strconcat (before_at, after_cursor, NULL);
	new_text = _tmp4_;
	_tmp5_ = self->priv->content_entry;
	gtk_editable_set_text ((GtkEditable*) _tmp5_, new_text);
	_tmp6_ = self->priv->content_entry;
	gtk_editable_set_position ((GtkEditable*) _tmp6_, _data4_->at_position);
	result = G_SOURCE_REMOVE;
	_g_free0 (new_text);
	_g_free0 (after_cursor);
	_g_free0 (before_at);
	return result;
}

static gboolean
____lambda295__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda295_ (self);
	return result;
}

static void
layouts_quick_add_core_handle_label_selection (LayoutsQuickAddCore* self,
                                               ObjectsLabel* label)
{
	Block4Data* _data4_;
	GtkEntry* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GtkEntry* _tmp3_;
	WidgetsLabelPickerLabelQuickPicker* _tmp11_;
	ObjectsItem* _tmp12_;
	ObjectsLabel* _tmp13_;
	ObjectsLabel* _tmp14_;
	GeeArrayList* labels_list = NULL;
	GeeArrayList* _tmp15_;
	WidgetsLabelPickerLabelButton* _tmp27_;
	GeeArrayList* _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = g_object_ref (self);
	self->priv->labels_selection_in_progress = TRUE;
	_tmp0_ = self->priv->content_entry;
	_tmp1_ = gtk_editable_get_text ((GtkEditable*) _tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	_data4_->current_text = _tmp2_;
	_tmp3_ = self->priv->content_entry;
	_data4_->cursor_pos = gtk_editable_get_position ((GtkEditable*) _tmp3_);
	_data4_->at_position = -1;
	{
		gint i = 0;
		i = _data4_->cursor_pos - 1;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				const gchar* _tmp6_;
				gint _tmp7_;
				gint _tmp8_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ - 1;
				}
				_tmp4_ = FALSE;
				if (!(i >= 0)) {
					break;
				}
				_tmp6_ = _data4_->current_text;
				_tmp7_ = strlen (_tmp6_);
				_tmp8_ = _tmp7_;
				if (i < _tmp8_) {
					gunichar char_at_pos = 0U;
					const gchar* _tmp9_;
					const gchar* _tmp10_;
					_tmp9_ = _data4_->current_text;
					_tmp10_ = _data4_->current_text;
					char_at_pos = string_get_char (_tmp9_, (glong) string_index_of_nth_char (_tmp10_, (glong) i));
					if (char_at_pos == ((gunichar) '@')) {
						_data4_->at_position = i;
						break;
					}
					if (char_at_pos == ((gunichar) ' ')) {
						break;
					}
				}
			}
		}
	}
	_tmp11_ = self->priv->labels_quick_picker;
	gtk_popover_popdown ((GtkPopover*) _tmp11_);
	if (_data4_->at_position != -1) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 10, ____lambda295__gsource_func, block4_data_ref (_data4_), block4_data_unref);
	}
	_tmp12_ = self->priv->_item;
	_tmp13_ = objects_item_add_label_if_not_exists (_tmp12_, label);
	_tmp14_ = _tmp13_;
	_g_object_unref0 (_tmp14_);
	_tmp15_ = gee_array_list_new (OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	labels_list = _tmp15_;
	{
		GeeArrayList* _lbl_list = NULL;
		ObjectsItem* _tmp16_;
		GeeArrayList* _tmp17_;
		gint _lbl_size = 0;
		GeeArrayList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _lbl_index = 0;
		_tmp16_ = self->priv->_item;
		_tmp17_ = objects_item_get_labels_list (_tmp16_);
		_lbl_list = _tmp17_;
		_tmp18_ = _lbl_list;
		_tmp19_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp18_);
		_tmp20_ = _tmp19_;
		_lbl_size = _tmp20_;
		_lbl_index = -1;
		while (TRUE) {
			gint _tmp21_;
			gint _tmp22_;
			ObjectsLabel* lbl = NULL;
			GeeArrayList* _tmp23_;
			gpointer _tmp24_;
			GeeArrayList* _tmp25_;
			ObjectsLabel* _tmp26_;
			_lbl_index = _lbl_index + 1;
			_tmp21_ = _lbl_index;
			_tmp22_ = _lbl_size;
			if (!(_tmp21_ < _tmp22_)) {
				break;
			}
			_tmp23_ = _lbl_list;
			_tmp24_ = gee_abstract_list_get ((GeeAbstractList*) _tmp23_, _lbl_index);
			lbl = (ObjectsLabel*) _tmp24_;
			_tmp25_ = labels_list;
			_tmp26_ = lbl;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
			_g_object_unref0 (lbl);
		}
		_g_object_unref0 (_lbl_list);
	}
	_tmp27_ = self->priv->label_button;
	_tmp28_ = labels_list;
	widgets_label_picker_label_button_set_labels (_tmp27_, _tmp28_);
	_g_object_unref0 (labels_list);
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

static gboolean
__lambda297_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda297__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda297_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
__lambda296_ (LayoutsQuickAddCore* self)
{
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ___lambda297__gsource_func, g_object_ref (self), g_object_unref);
}

static void
___lambda296__gtk_popover_closed (GtkPopover* _sender,
                                  gpointer self)
{
	__lambda296_ ((LayoutsQuickAddCore*) self);
}

static GtkPopover*
layouts_quick_add_core_build_tip_popover (LayoutsQuickAddCore* self)
{
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* subtitle_label = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkBox* title_box = NULL;
	GtkBox* _tmp2_;
	GtkBox* shortcut_box = NULL;
	GtkBox* _tmp3_ = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	GtkWidget* _tmp9_;
	GtkWidget* _tmp10_;
	GtkWidget* _tmp11_;
	GtkBox* popover_box = NULL;
	GtkBox* _tmp12_ = NULL;
	WidgetsContextMenuMenuSeparator* _tmp13_ = NULL;
	WidgetsContextMenuMenuSeparator* _tmp14_;
	GtkWidget* _tmp15_;
	GtkWidget* _tmp16_;
	WidgetsContextMenuMenuSeparator* _tmp17_ = NULL;
	WidgetsContextMenuMenuSeparator* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar** _tmp23_;
	GtkLabel* _tmp24_ = NULL;
	GtkLabel* _tmp25_;
	GtkPopover* popover = NULL;
	GtkWidget* _tmp26_;
	GtkPopover* _tmp27_ = NULL;
	GtkPopover* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (_ ("Keyboard Shortcuts"));
	gtk_widget_set_halign ((GtkWidget*) _tmp0_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp0_);
	title_label = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) title_label, "font-bold");
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("Speed up task creation with these shortcuts"));
	gtk_widget_set_halign ((GtkWidget*) _tmp1_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp1_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp1_);
	subtitle_label = _tmp1_;
	gtk_widget_add_css_class ((GtkWidget*) subtitle_label, "dimmed");
	gtk_widget_add_css_class ((GtkWidget*) subtitle_label, "caption");
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
	g_object_ref_sink (_tmp2_);
	title_box = _tmp2_;
	gtk_box_append (title_box, (GtkWidget*) title_label);
	gtk_box_append (title_box, (GtkWidget*) subtitle_label);
	_tmp3_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp3_, 12);
	g_object_ref_sink (_tmp3_);
	shortcut_box = _tmp3_;
	_tmp4_ = layouts_quick_add_core_build_shortcut_widget (self, "p1…p4", "#1e63ec", _ ("Set priority"), _ ("p1 = highest, p4 = lowest"));
	_tmp5_ = _tmp4_;
	gtk_box_append (shortcut_box, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = layouts_quick_add_core_build_shortcut_widget (self, "@", "#16af54", _ ("Add labels"), _ ("Opens label selector"));
	_tmp7_ = _tmp6_;
	gtk_box_append (shortcut_box, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = layouts_quick_add_core_build_shortcut_widget (self, "#", "#9141ac", _ ("Assign project"), _ ("Opens project selector"));
	_tmp9_ = _tmp8_;
	gtk_box_append (shortcut_box, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = layouts_quick_add_core_build_shortcut_widget (self, "!", "#fa1955", _ ("Set reminder"), _ ("Opens reminder options"));
	_tmp11_ = _tmp10_;
	gtk_box_append (shortcut_box, _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp12_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp12_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp12_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp12_, 6);
	g_object_ref_sink (_tmp12_);
	popover_box = _tmp12_;
	gtk_box_append (popover_box, (GtkWidget*) title_box);
	gtk_box_append (popover_box, (GtkWidget*) shortcut_box);
	_tmp13_ = widgets_context_menu_menu_separator_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp13_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp13_, 3);
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	gtk_box_append (popover_box, (GtkWidget*) _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = layouts_quick_add_core_build_shortcut_widget (self, "Ctrl+K", "#1e63ec", _ ("Keep adding"), _ ("Toggle stay open after creating task"));
	_tmp16_ = _tmp15_;
	gtk_box_append (popover_box, _tmp16_);
	_g_object_unref0 (_tmp16_);
	_tmp17_ = widgets_context_menu_menu_separator_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp17_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp17_, 3);
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	gtk_box_append (popover_box, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = g_strdup_printf ("<b>%s</b>: %s", _ ("Tip"), _ ("Combine shortcuts in the title field for faster creation"));
	_tmp20_ = _tmp19_;
	_tmp21_ = g_strdup ("dimmed");
	_tmp22_ = g_strdup ("caption");
	_tmp23_ = g_new0 (gchar*, 2 + 1);
	_tmp23_[0] = _tmp21_;
	_tmp23_[1] = _tmp22_;
	_tmp24_ = (GtkLabel*) gtk_label_new (_tmp20_);
	gtk_label_set_wrap (_tmp24_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp24_, GTK_ALIGN_START);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp24_, _tmp23_);
	_tmp23_ = (_vala_array_free (_tmp23_, 2, (GDestroyNotify) g_free), NULL);
	gtk_label_set_use_markup (_tmp24_, TRUE);
	g_object_ref_sink (_tmp24_);
	_tmp25_ = _tmp24_;
	gtk_box_append (popover_box, (GtkWidget*) _tmp25_);
	_g_object_unref0 (_tmp25_);
	_g_free0 (_tmp20_);
	_tmp26_ = _g_object_ref0 ((GtkWidget*) popover_box);
	_tmp27_ = (GtkPopover*) gtk_popover_new ();
	gtk_popover_set_has_arrow (_tmp27_, FALSE);
	gtk_popover_set_position (_tmp27_, GTK_POS_BOTTOM);
	gtk_popover_set_child (_tmp27_, _tmp26_);
	_g_object_unref0 (_tmp26_);
	g_object_ref_sink (_tmp27_);
	popover = _tmp27_;
	g_signal_connect_object (popover, "closed", (GCallback) ___lambda296__gtk_popover_closed, self, 0);
	result = popover;
	_g_object_unref0 (popover_box);
	_g_object_unref0 (shortcut_box);
	_g_object_unref0 (title_box);
	_g_object_unref0 (subtitle_label);
	_g_object_unref0 (title_label);
	return result;
}

static GtkWidget*
layouts_quick_add_core_build_shortcut_widget (LayoutsQuickAddCore* self,
                                              const gchar* shortcut_key,
                                              const gchar* color,
                                              const gchar* title,
                                              const gchar* subtitle)
{
	GtkLabel* shortcut_label = NULL;
	GtkLabel* _tmp0_ = NULL;
	Util* _tmp1_;
	Util* _tmp2_;
	GtkLabel* title_label = NULL;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* subtitle_label = NULL;
	GtkLabel* _tmp4_ = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp5_ = NULL;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (shortcut_key != NULL, NULL);
	g_return_val_if_fail (color != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (subtitle != NULL, NULL);
	_tmp0_ = (GtkLabel*) gtk_label_new (shortcut_key);
	gtk_label_set_width_chars (_tmp0_, 6);
	gtk_widget_set_valign ((GtkWidget*) _tmp0_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp0_);
	shortcut_label = _tmp0_;
	gtk_widget_add_css_class ((GtkWidget*) shortcut_label, "caption");
	gtk_widget_add_css_class ((GtkWidget*) shortcut_label, "shortcut-widget");
	_tmp1_ = util_get_default ();
	_tmp2_ = _tmp1_;
	util_set_widget_color (_tmp2_, color, (GtkWidget*) shortcut_label);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = (GtkLabel*) gtk_label_new (title);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp3_);
	title_label = _tmp3_;
	gtk_widget_add_css_class ((GtkWidget*) title_label, "caption");
	gtk_widget_add_css_class ((GtkWidget*) title_label, "fw-600");
	_tmp4_ = (GtkLabel*) gtk_label_new (subtitle);
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	g_object_ref_sink (_tmp4_);
	subtitle_label = _tmp4_;
	gtk_widget_add_css_class ((GtkWidget*) subtitle_label, "dimmed");
	gtk_widget_add_css_class ((GtkWidget*) subtitle_label, "caption");
	_tmp5_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp5_, 12);
	g_object_ref_sink (_tmp5_);
	grid = _tmp5_;
	gtk_grid_attach (grid, (GtkWidget*) shortcut_label, 0, 0, 1, 2);
	gtk_grid_attach (grid, (GtkWidget*) title_label, 1, 0, 1, 1);
	gtk_grid_attach (grid, (GtkWidget*) subtitle_label, 1, 1, 1, 1);
	result = (GtkWidget*) grid;
	_g_object_unref0 (subtitle_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (shortcut_label);
	return result;
}

static gint
_layouts_quick_add_core_set_sort_func_gcompare_data_func (gconstpointer a,
                                                          gconstpointer b,
                                                          gpointer self)
{
	gint result;
	result = layouts_quick_add_core_set_sort_func ((LayoutsQuickAddCore*) self, (ObjectsItem*) a, (ObjectsItem*) b);
	return result;
}

static gint
layouts_quick_add_core_generate_child_order (LayoutsQuickAddCore* self)
{
	ObjectsBaseObject* base_object = NULL;
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	ObjectsBaseObject* _tmp16_;
	GeeArrayList* items = NULL;
	ServicesStore* _tmp17_;
	ObjectsBaseObject* _tmp18_;
	GeeArrayList* _tmp19_;
	GeeArrayList* _tmp20_;
	GeeArrayList* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	gint new_order = 0;
	gint _tmp24_;
	gint _tmp29_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	base_object = NULL;
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_parent_id (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, "") != 0) {
		ObjectsItem* _tmp3_;
		ObjectsBaseObject* _tmp4_;
		_tmp3_ = self->priv->_item;
		_tmp4_ = _g_object_ref0 ((ObjectsBaseObject*) _tmp3_);
		_g_object_unref0 (base_object);
		base_object = _tmp4_;
	} else {
		ObjectsItem* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = self->priv->_item;
		_tmp6_ = objects_item_get_section_id (_tmp5_);
		_tmp7_ = _tmp6_;
		if (g_strcmp0 (_tmp7_, "") != 0) {
			ObjectsItem* _tmp8_;
			ObjectsSection* _tmp9_;
			ObjectsSection* _tmp10_;
			ObjectsBaseObject* _tmp11_;
			_tmp8_ = self->priv->_item;
			_tmp9_ = objects_item_get_section (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = _g_object_ref0 ((ObjectsBaseObject*) _tmp10_);
			_g_object_unref0 (base_object);
			base_object = _tmp11_;
		} else {
			ObjectsItem* _tmp12_;
			ObjectsProject* _tmp13_;
			ObjectsProject* _tmp14_;
			ObjectsBaseObject* _tmp15_;
			_tmp12_ = self->priv->_item;
			_tmp13_ = objects_item_get_project (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = _g_object_ref0 ((ObjectsBaseObject*) _tmp14_);
			_g_object_unref0 (base_object);
			base_object = _tmp15_;
		}
	}
	_tmp16_ = base_object;
	if (_tmp16_ == NULL) {
		result = 0;
		_g_object_unref0 (base_object);
		return result;
	}
	_tmp17_ = services_store_instance ();
	_tmp18_ = base_object;
	_tmp19_ = services_store_get_items_by_baseobject (_tmp17_, _tmp18_);
	items = _tmp19_;
	_tmp20_ = items;
	gee_list_sort ((GeeList*) _tmp20_, _layouts_quick_add_core_set_sort_func_gcompare_data_func, g_object_ref (self), g_object_unref);
	_tmp21_ = items;
	_tmp22_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp21_);
	_tmp23_ = _tmp22_;
	if (_tmp23_ == 0) {
		result = 1000;
		_g_object_unref0 (items);
		_g_object_unref0 (base_object);
		return result;
	}
	new_order = 1000;
	_tmp24_ = self->priv->_position;
	if (_tmp24_ == -1) {
		NewTaskPosition _tmp25_;
		_tmp25_ = self->priv->_new_task_position;
		if (_tmp25_ == NEW_TASK_POSITION_START) {
			layouts_quick_add_core_set_position (self, 0);
		} else {
			GeeArrayList* _tmp26_;
			gint _tmp27_;
			gint _tmp28_;
			_tmp26_ = items;
			_tmp27_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp26_);
			_tmp28_ = _tmp27_;
			layouts_quick_add_core_set_position (self, _tmp28_);
		}
	}
	_tmp29_ = self->priv->_position;
	if (_tmp29_ == 0) {
		ObjectsItem* first = NULL;
		GeeArrayList* _tmp30_;
		gpointer _tmp31_;
		ObjectsItem* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		_tmp30_ = items;
		_tmp31_ = gee_abstract_list_get ((GeeAbstractList*) _tmp30_, 0);
		first = (ObjectsItem*) _tmp31_;
		_tmp32_ = first;
		_tmp33_ = objects_item_get_child_order (_tmp32_);
		_tmp34_ = _tmp33_;
		new_order = _tmp34_ - 1000;
		_g_object_unref0 (first);
	} else {
		gboolean _tmp35_ = FALSE;
		gint _tmp36_;
		_tmp36_ = self->priv->_position;
		if (_tmp36_ > 0) {
			gint _tmp37_;
			GeeArrayList* _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			_tmp37_ = self->priv->_position;
			_tmp38_ = items;
			_tmp39_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp38_);
			_tmp40_ = _tmp39_;
			_tmp35_ = _tmp37_ < _tmp40_;
		} else {
			_tmp35_ = FALSE;
		}
		if (_tmp35_) {
			ObjectsItem* prev = NULL;
			GeeArrayList* _tmp41_;
			gint _tmp42_;
			gpointer _tmp43_;
			ObjectsItem* next = NULL;
			GeeArrayList* _tmp44_;
			gint _tmp45_;
			gpointer _tmp46_;
			ObjectsItem* _tmp47_;
			gint _tmp48_;
			gint _tmp49_;
			ObjectsItem* _tmp50_;
			gint _tmp51_;
			gint _tmp52_;
			gboolean _tmp53_ = FALSE;
			ObjectsItem* _tmp54_;
			gint _tmp55_;
			gint _tmp56_;
			_tmp41_ = items;
			_tmp42_ = self->priv->_position;
			_tmp43_ = gee_abstract_list_get ((GeeAbstractList*) _tmp41_, _tmp42_ - 1);
			prev = (ObjectsItem*) _tmp43_;
			_tmp44_ = items;
			_tmp45_ = self->priv->_position;
			_tmp46_ = gee_abstract_list_get ((GeeAbstractList*) _tmp44_, _tmp45_);
			next = (ObjectsItem*) _tmp46_;
			_tmp47_ = prev;
			_tmp48_ = objects_item_get_child_order (_tmp47_);
			_tmp49_ = _tmp48_;
			_tmp50_ = next;
			_tmp51_ = objects_item_get_child_order (_tmp50_);
			_tmp52_ = _tmp51_;
			new_order = (_tmp49_ + _tmp52_) / 2;
			_tmp54_ = prev;
			_tmp55_ = objects_item_get_child_order (_tmp54_);
			_tmp56_ = _tmp55_;
			if (new_order == _tmp56_) {
				_tmp53_ = TRUE;
			} else {
				ObjectsItem* _tmp57_;
				gint _tmp58_;
				gint _tmp59_;
				_tmp57_ = next;
				_tmp58_ = objects_item_get_child_order (_tmp57_);
				_tmp59_ = _tmp58_;
				_tmp53_ = new_order == _tmp59_;
			}
			if (_tmp53_) {
				GeeArrayList* _tmp60_;
				_tmp60_ = items;
				layouts_quick_add_core_normalize_orders (self, _tmp60_);
				result = layouts_quick_add_core_generate_child_order (self);
				_g_object_unref0 (next);
				_g_object_unref0 (prev);
				_g_object_unref0 (items);
				_g_object_unref0 (base_object);
				return result;
			}
			_g_object_unref0 (next);
			_g_object_unref0 (prev);
		} else {
			gint _tmp61_;
			GeeArrayList* _tmp62_;
			gint _tmp63_;
			gint _tmp64_;
			_tmp61_ = self->priv->_position;
			_tmp62_ = items;
			_tmp63_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp62_);
			_tmp64_ = _tmp63_;
			if (_tmp61_ >= _tmp64_) {
				GeeArrayList* _tmp65_;
				GeeArrayList* _tmp66_;
				gint _tmp67_;
				gint _tmp68_;
				gpointer _tmp69_;
				ObjectsItem* _tmp70_;
				gint _tmp71_;
				gint _tmp72_;
				_tmp65_ = items;
				_tmp66_ = items;
				_tmp67_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp66_);
				_tmp68_ = _tmp67_;
				_tmp69_ = gee_abstract_list_get ((GeeAbstractList*) _tmp65_, _tmp68_ - 1);
				_tmp70_ = (ObjectsItem*) _tmp69_;
				_tmp71_ = objects_item_get_child_order (_tmp70_);
				_tmp72_ = _tmp71_;
				new_order = _tmp72_ + 1000;
				_g_object_unref0 (_tmp70_);
			}
		}
	}
	result = new_order;
	_g_object_unref0 (items);
	_g_object_unref0 (base_object);
	return result;
}

static void
layouts_quick_add_core_normalize_orders (LayoutsQuickAddCore* self,
                                         GeeArrayList* items)
{
	gint spacing = 0;
	gint order = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (items != NULL);
	spacing = 1000;
	order = spacing;
	{
		GeeArrayList* _item_list = NULL;
		gint _item_size = 0;
		GeeArrayList* _tmp0_;
		gint _tmp1_;
		gint _tmp2_;
		gint _item_index = 0;
		_item_list = items;
		_tmp0_ = _item_list;
		_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
		_tmp2_ = _tmp1_;
		_item_size = _tmp2_;
		_item_index = -1;
		while (TRUE) {
			gint _tmp3_;
			gint _tmp4_;
			ObjectsItem* item = NULL;
			GeeArrayList* _tmp5_;
			gpointer _tmp6_;
			ObjectsItem* _tmp7_;
			ObjectsItem* _tmp8_;
			_item_index = _item_index + 1;
			_tmp3_ = _item_index;
			_tmp4_ = _item_size;
			if (!(_tmp3_ < _tmp4_)) {
				break;
			}
			_tmp5_ = _item_list;
			_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, _item_index);
			item = (ObjectsItem*) _tmp6_;
			_tmp7_ = item;
			objects_item_set_child_order (_tmp7_, order);
			order += spacing;
			_tmp8_ = item;
			objects_item_update_async (_tmp8_, "");
			_g_object_unref0 (item);
		}
	}
}

static gint
layouts_quick_add_core_set_sort_func (LayoutsQuickAddCore* self,
                                      ObjectsItem* item1,
                                      ObjectsItem* item2)
{
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (item1 != NULL, -1);
	g_return_val_if_fail (item2 != NULL, -1);
	_tmp0_ = objects_item_get_child_order (item1);
	_tmp1_ = _tmp0_;
	_tmp2_ = objects_item_get_child_order (item2);
	_tmp3_ = _tmp2_;
	result = _tmp1_ - _tmp3_;
	return result;
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data5_->self;
		_g_free0 (_data5_->text);
		_g_object_unref0 (self);
		g_slice_free (Block5Data, _data5_);
	}
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gboolean
__lambda298_ (Block5Data* _data5_)
{
	LayoutsQuickAddCore* self;
	ChronoParseResult* _result_ = NULL;
	ChronoCore* _tmp0_;
	ChronoParseResult* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	ChronoParseResult* _tmp14_;
	gboolean result;
	self = _data5_->self;
	self->priv->date_detection_timeout_id = (guint) 0;
	_tmp0_ = self->priv->chrono;
	_tmp1_ = chrono_core_parse (_tmp0_, _data5_->text, FALSE);
	_result_ = _tmp1_;
	_tmp2_ = self->priv->last_detected_date_text;
	if (g_strcmp0 (_tmp2_, "") != 0) {
		const gchar* _tmp3_;
		_tmp3_ = self->priv->last_detected_date_text;
		if (!string_contains (_data5_->text, _tmp3_)) {
			gchar* _tmp4_;
			self->priv->date_auto_detection_enabled = TRUE;
			_tmp4_ = g_strdup ("");
			_g_free0 (self->priv->last_detected_date_text);
			self->priv->last_detected_date_text = _tmp4_;
		} else {
			gboolean _tmp5_ = FALSE;
			ChronoParseResult* _tmp6_;
			_tmp6_ = _result_;
			if (_tmp6_ != NULL) {
				ChronoParseResult* _tmp7_;
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				const gchar* _tmp10_;
				_tmp7_ = _result_;
				_tmp8_ = chrono_parse_result_get_matched_text (_tmp7_);
				_tmp9_ = _tmp8_;
				_tmp10_ = self->priv->last_detected_date_text;
				_tmp5_ = g_strcmp0 (_tmp9_, _tmp10_) != 0;
			} else {
				_tmp5_ = FALSE;
			}
			if (_tmp5_) {
				gchar* _tmp11_;
				self->priv->date_auto_detection_enabled = TRUE;
				_tmp11_ = g_strdup ("");
				_g_free0 (self->priv->last_detected_date_text);
				self->priv->last_detected_date_text = _tmp11_;
			}
		}
	}
	if (!self->priv->date_auto_detection_enabled) {
		result = G_SOURCE_REMOVE;
		_g_object_unref0 (_result_);
		return result;
	}
	_tmp14_ = _result_;
	if (_tmp14_ != NULL) {
		ChronoParseResult* _tmp15_;
		GDateTime* _tmp16_;
		GDateTime* _tmp17_;
		_tmp15_ = _result_;
		_tmp16_ = chrono_parse_result_get_date (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp13_ = _tmp17_ != NULL;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		ChronoParseResult* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		_tmp18_ = _result_;
		_tmp19_ = chrono_parse_result_get_matched_text (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = strlen (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp12_ = _tmp22_ > 0;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		ChronoParseResult* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		_tmp23_ = _result_;
		_tmp24_ = chrono_parse_result_get_matched_text (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = self->priv->last_detected_date_text;
		if (g_strcmp0 (_tmp25_, _tmp26_) != 0) {
			ChronoParseResult* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			gchar* _tmp30_;
			ChronoParseResult* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			ChronoParseResult* _tmp34_;
			GDateTime* _tmp35_;
			GDateTime* _tmp36_;
			_tmp27_ = _result_;
			_tmp28_ = chrono_parse_result_get_matched_text (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_strdup (_tmp29_);
			_g_free0 (self->priv->last_detected_date_text);
			self->priv->last_detected_date_text = _tmp30_;
			_tmp31_ = _result_;
			_tmp32_ = chrono_parse_result_get_matched_text (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = _result_;
			_tmp35_ = chrono_parse_result_get_date (_tmp34_);
			_tmp36_ = _tmp35_;
			layouts_quick_add_core_animate_date_to_schedule_button (self, _tmp33_, _tmp36_);
		}
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (_result_);
	return result;
}

static gboolean
___lambda298__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda298_ (self);
	return result;
}

static void
layouts_quick_add_core_handle_natural_date_detection (LayoutsQuickAddCore* self,
                                                      const gchar* text)
{
	Block5Data* _data5_;
	gchar* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_data5_ = g_slice_new0 (Block5Data);
	_data5_->_ref_count_ = 1;
	_data5_->self = g_object_ref (self);
	_tmp0_ = g_strdup (text);
	_g_free0 (_data5_->text);
	_data5_->text = _tmp0_;
	_tmp1_ = strlen (_data5_->text);
	_tmp2_ = _tmp1_;
	if (_tmp2_ < 3) {
		block5_data_unref (_data5_);
		_data5_ = NULL;
		return;
	}
	if (self->priv->date_detection_timeout_id > ((guint) 0)) {
		g_source_remove (self->priv->date_detection_timeout_id);
		self->priv->date_detection_timeout_id = (guint) 0;
	}
	self->priv->date_detection_timeout_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 800, ___lambda298__gsource_func, block5_data_ref (_data5_), block5_data_unref);
	block5_data_unref (_data5_);
	_data5_ = NULL;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->flying_label);
		_g_date_time_unref0 (_data6_->date);
		_g_object_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static void
__lambda299_ (Block6Data* _data6_,
              gdouble progress)
{
	LayoutsQuickAddCore* self;
	gint current_x = 0;
	gint current_y = 0;
	GtkFixed* _tmp0_;
	GtkLabel* _tmp1_;
	GtkLabel* _tmp2_;
	self = _data6_->self;
	current_x = (gint) layouts_quick_add_core_lerp (self, _data6_->start_x, _data6_->end_x, progress);
	current_y = (gint) layouts_quick_add_core_lerp (self, _data6_->start_y, _data6_->end_y, progress);
	_tmp0_ = self->priv->animation_container;
	_tmp1_ = _data6_->flying_label;
	gtk_fixed_move (_tmp0_, (GtkWidget*) _tmp1_, (gdouble) current_x, (gdouble) current_y);
	_tmp2_ = _data6_->flying_label;
	gtk_widget_set_opacity ((GtkWidget*) _tmp2_, 1.0 - (progress * 0.3));
}

static void
___lambda299__adw_animation_target_func (gdouble value,
                                         gpointer self)
{
	__lambda299_ (self, value);
}

static void
__lambda300_ (Block6Data* _data6_)
{
	LayoutsQuickAddCore* self;
	GtkFixed* _tmp0_;
	GtkLabel* _tmp1_;
	ObjectsDueDate* duedate = NULL;
	ObjectsDueDate* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self = _data6_->self;
	_tmp0_ = self->priv->animation_container;
	_tmp1_ = _data6_->flying_label;
	gtk_fixed_remove (_tmp0_, (GtkWidget*) _tmp1_);
	_tmp2_ = objects_due_date_new ();
	duedate = _tmp2_;
	_tmp3_ = utils_datetime_get_todoist_datetime_format (_data6_->date);
	_tmp4_ = _tmp3_;
	objects_due_date_set_date (duedate, _tmp4_);
	_g_free0 (_tmp4_);
	layouts_quick_add_core_set_duedate (self, duedate);
	self->priv->date_auto_detection_enabled = FALSE;
	_g_object_unref0 (duedate);
}

static void
___lambda300__adw_animation_done (AdwAnimation* _sender,
                                  gpointer self)
{
	__lambda300_ (self);
}

static void
layouts_quick_add_core_animate_date_to_schedule_button (LayoutsQuickAddCore* self,
                                                        const gchar* date_text,
                                                        GDateTime* date)
{
	Block6Data* _data6_;
	GDateTime* _tmp0_;
	gdouble entry_x = 0.0;
	gdouble entry_y = 0.0;
	gdouble button_x = 0.0;
	gdouble button_y = 0.0;
	graphene_point_t entry_point = {0};
	GtkEntry* _tmp1_;
	GtkOverlay* _tmp2_;
	graphene_point_t _tmp3_ = {0};
	graphene_point_t _tmp4_ = {0};
	gboolean _tmp5_;
	graphene_point_t _tmp6_;
	graphene_point_t _tmp7_;
	graphene_point_t button_point = {0};
	WidgetsScheduleButton* _tmp8_;
	GtkOverlay* _tmp9_;
	graphene_point_t _tmp10_ = {0};
	graphene_point_t _tmp11_ = {0};
	gboolean _tmp12_;
	graphene_point_t _tmp13_;
	graphene_point_t _tmp14_;
	gdouble cursor_x_offset = 0.0;
	GtkEntry* _tmp15_;
	WidgetsScheduleButton* _tmp16_;
	WidgetsScheduleButton* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	GtkLabel* _tmp20_ = NULL;
	GtkFixed* _tmp21_;
	GtkLabel* _tmp22_;
	AdwCallbackAnimationTarget* target = NULL;
	AdwCallbackAnimationTarget* _tmp23_;
	AdwTimedAnimation* animation = NULL;
	GtkLabel* _tmp24_;
	AdwCallbackAnimationTarget* _tmp25_;
	AdwAnimationTarget* _tmp26_;
	AdwTimedAnimation* _tmp27_;
	AdwTimedAnimation* _tmp28_;
	AdwTimedAnimation* _tmp29_;
	AdwTimedAnimation* _tmp30_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (date_text != NULL);
	g_return_if_fail (date != NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = g_object_ref (self);
	_tmp0_ = _g_date_time_ref0 (date);
	_g_date_time_unref0 (_data6_->date);
	_data6_->date = _tmp0_;
	_tmp1_ = self->priv->content_entry;
	_tmp2_ = self->priv->animation_overlay;
	memset (&_tmp3_, 0, sizeof (graphene_point_t));
	_tmp5_ = gtk_widget_compute_point ((GtkWidget*) _tmp1_, (GtkWidget*) _tmp2_, &_tmp3_, &_tmp4_);
	entry_point = _tmp4_;
	if (!_tmp5_) {
		block6_data_unref (_data6_);
		_data6_ = NULL;
		return;
	}
	_tmp6_ = entry_point;
	entry_x = (gdouble) _tmp6_.x;
	_tmp7_ = entry_point;
	entry_y = (gdouble) _tmp7_.y;
	_tmp8_ = self->priv->schedule_button;
	_tmp9_ = self->priv->animation_overlay;
	memset (&_tmp10_, 0, sizeof (graphene_point_t));
	_tmp12_ = gtk_widget_compute_point ((GtkWidget*) _tmp8_, (GtkWidget*) _tmp9_, &_tmp10_, &_tmp11_);
	button_point = _tmp11_;
	if (!_tmp12_) {
		block6_data_unref (_data6_);
		_data6_ = NULL;
		return;
	}
	_tmp13_ = button_point;
	button_x = (gdouble) _tmp13_.x;
	_tmp14_ = button_point;
	button_y = (gdouble) _tmp14_.y;
	cursor_x_offset = layouts_quick_add_core_get_cursor_position_in_entry (self);
	_data6_->start_x = entry_x + cursor_x_offset;
	_tmp15_ = self->priv->content_entry;
	_data6_->start_y = entry_y + (gtk_widget_get_height ((GtkWidget*) _tmp15_) / 2);
	_tmp16_ = self->priv->schedule_button;
	_data6_->end_x = button_x + (gtk_widget_get_width ((GtkWidget*) _tmp16_) / 2);
	_tmp17_ = self->priv->schedule_button;
	_data6_->end_y = button_y + (gtk_widget_get_height ((GtkWidget*) _tmp17_) / 2);
	_tmp18_ = g_strdup ("date-flying-label");
	_tmp19_ = g_new0 (gchar*, 1 + 1);
	_tmp19_[0] = _tmp18_;
	_tmp20_ = (GtkLabel*) gtk_label_new (date_text);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp19_);
	_tmp19_ = (_vala_array_free (_tmp19_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp20_);
	_data6_->flying_label = _tmp20_;
	_tmp21_ = self->priv->animation_container;
	_tmp22_ = _data6_->flying_label;
	gtk_fixed_put (_tmp21_, (GtkWidget*) _tmp22_, (gdouble) ((gint) _data6_->start_x), (gdouble) ((gint) _data6_->start_y));
	_tmp23_ = (AdwCallbackAnimationTarget*) adw_callback_animation_target_new (___lambda299__adw_animation_target_func, block6_data_ref (_data6_), block6_data_unref);
	target = _tmp23_;
	_tmp24_ = _data6_->flying_label;
	_tmp25_ = target;
	_tmp26_ = _g_object_ref0 ((AdwAnimationTarget*) _tmp25_);
	_tmp27_ = (AdwTimedAnimation*) adw_timed_animation_new ((GtkWidget*) _tmp24_, 0.0, 1.0, (guint) 400, _tmp26_);
	animation = _tmp27_;
	_tmp28_ = animation;
	adw_timed_animation_set_easing (_tmp28_, ADW_EASE_IN_OUT_CUBIC);
	_tmp29_ = animation;
	g_signal_connect_data ((AdwAnimation*) _tmp29_, "done", (GCallback) ___lambda300__adw_animation_done, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_tmp30_ = animation;
	adw_animation_play ((AdwAnimation*) _tmp30_);
	_g_object_unref0 (animation);
	_g_object_unref0 (target);
	block6_data_unref (_data6_);
	_data6_ = NULL;
}

void
layouts_quick_add_core_clean_up (LayoutsQuickAddCore* self)
{
	GeeHashMap* _tmp15_;
	GtkEventControllerKey* _tmp16_;
	GtkEventControllerKey* _tmp18_;
	GtkEventControllerKey* _tmp21_;
	GtkShortcutController* _tmp23_;
	WidgetsLabelPickerLabelQuickPicker* _tmp25_;
	WidgetsProjectPickerProjectPickerButton* _tmp33_;
	WidgetsScheduleButton* _tmp35_;
	WidgetsPriorityButton* _tmp37_;
	WidgetsReminderPickerReminderButton* _tmp39_;
	WidgetsLabelPickerLabelButton* _tmp41_;
	GError* _inner_error0_ = NULL;
	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->destroy_controller;
	if (_tmp16_ != NULL) {
		GtkEventControllerKey* _tmp17_;
		_tmp17_ = self->priv->destroy_controller;
		gtk_widget_remove_controller ((GtkWidget*) self, (GtkEventController*) _tmp17_);
	}
	_tmp18_ = self->priv->content_controller_key;
	if (_tmp18_ != NULL) {
		GtkEntry* _tmp19_;
		GtkEventControllerKey* _tmp20_;
		_tmp19_ = self->priv->content_entry;
		_tmp20_ = self->priv->content_controller_key;
		gtk_widget_remove_controller ((GtkWidget*) _tmp19_, (GtkEventController*) _tmp20_);
	}
	_tmp21_ = self->priv->event_controller_key;
	if (_tmp21_ != NULL) {
		GtkEventControllerKey* _tmp22_;
		_tmp22_ = self->priv->event_controller_key;
		gtk_widget_remove_controller ((GtkWidget*) self, (GtkEventController*) _tmp22_);
	}
	_tmp23_ = self->priv->shortcut_controller;
	if (_tmp23_ != NULL) {
		GtkShortcutController* _tmp24_;
		_tmp24_ = self->priv->shortcut_controller;
		gtk_widget_remove_controller ((GtkWidget*) self, (GtkEventController*) _tmp24_);
		_g_object_unref0 (self->priv->shortcut_controller);
		self->priv->shortcut_controller = NULL;
	}
	_tmp25_ = self->priv->labels_quick_picker;
	if (_tmp25_ != NULL) {
		self->priv->labels_popover_handling_esc = FALSE;
		{
			WidgetsLabelPickerLabelQuickPicker* _tmp26_;
			gboolean _tmp27_;
			gboolean _tmp28_;
			WidgetsLabelPickerLabelQuickPicker* _tmp30_;
			_tmp26_ = self->priv->labels_quick_picker;
			_tmp27_ = gtk_widget_get_visible ((GtkWidget*) _tmp26_);
			_tmp28_ = _tmp27_;
			if (_tmp28_) {
				WidgetsLabelPickerLabelQuickPicker* _tmp29_;
				_tmp29_ = self->priv->labels_quick_picker;
				gtk_popover_popdown ((GtkPopover*) _tmp29_);
			}
			_tmp30_ = self->priv->labels_quick_picker;
			gtk_widget_unparent ((GtkWidget*) _tmp30_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			GError* _tmp31_;
			const gchar* _tmp32_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp31_ = e;
			_tmp32_ = _tmp31_->message;
			g_print ("Error cleaning up popover: %s\n", _tmp32_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_g_object_unref0 (self->priv->labels_quick_picker);
		self->priv->labels_quick_picker = NULL;
	}
	_tmp33_ = self->priv->project_picker_button;
	if (_tmp33_ != NULL) {
		WidgetsProjectPickerProjectPickerButton* _tmp34_;
		_tmp34_ = self->priv->project_picker_button;
		widgets_project_picker_project_picker_button_clean_up (_tmp34_);
	}
	_tmp35_ = self->priv->schedule_button;
	if (_tmp35_ != NULL) {
		WidgetsScheduleButton* _tmp36_;
		_tmp36_ = self->priv->schedule_button;
		widgets_schedule_button_clean_up (_tmp36_);
	}
	_tmp37_ = self->priv->priority_button;
	if (_tmp37_ != NULL) {
		WidgetsPriorityButton* _tmp38_;
		_tmp38_ = self->priv->priority_button;
		widgets_priority_button_clean_up (_tmp38_);
	}
	_tmp39_ = self->priv->reminder_button;
	if (_tmp39_ != NULL) {
		WidgetsReminderPickerReminderButton* _tmp40_;
		_tmp40_ = self->priv->reminder_button;
		widgets_reminder_picker_reminder_button_clean_up (_tmp40_);
	}
	_tmp41_ = self->priv->label_button;
	if (_tmp41_ != NULL) {
		WidgetsLabelPickerLabelButton* _tmp42_;
		_tmp42_ = self->priv->label_button;
		widgets_label_picker_label_button_clean_up (_tmp42_);
	}
}

gboolean
layouts_quick_add_core_get_is_window_quick_add (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_window_quick_add;
	return result;
}

static void
layouts_quick_add_core_set_is_window_quick_add (LayoutsQuickAddCore* self,
                                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_is_window_quick_add (self);
	if (old_value != value) {
		self->priv->_is_window_quick_add = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY]);
	}
}

ObjectsItem*
layouts_quick_add_core_get_item (LayoutsQuickAddCore* self)
{
	ObjectsItem* result;
	ObjectsItem* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_item;
	result = _tmp0_;
	return result;
}

void
layouts_quick_add_core_set_item (LayoutsQuickAddCore* self,
                                 ObjectsItem* value)
{
	ObjectsItem* old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_item (self);
	if (old_value != value) {
		ObjectsItem* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_item);
		self->priv->_item = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_ctrl_pressed (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_ctrl_pressed;
	return result;
}

void
layouts_quick_add_core_set_ctrl_pressed (LayoutsQuickAddCore* self,
                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_ctrl_pressed (self);
	if (old_value != value) {
		self->priv->_ctrl_pressed = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_shift_pressed (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_shift_pressed;
	return result;
}

void
layouts_quick_add_core_set_shift_pressed (LayoutsQuickAddCore* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_shift_pressed (self);
	if (old_value != value) {
		self->priv->_shift_pressed = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_labels_picker_activate_shortcut (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_labels_picker_activate_shortcut;
	return result;
}

void
layouts_quick_add_core_set_labels_picker_activate_shortcut (LayoutsQuickAddCore* self,
                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_labels_picker_activate_shortcut (self);
	if (old_value != value) {
		self->priv->_labels_picker_activate_shortcut = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_project_picker_activate_shortcut (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_project_picker_activate_shortcut;
	return result;
}

void
layouts_quick_add_core_set_project_picker_activate_shortcut (LayoutsQuickAddCore* self,
                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_project_picker_activate_shortcut (self);
	if (old_value != value) {
		self->priv->_project_picker_activate_shortcut = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_reminder_picker_activate_shortcut (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_reminder_picker_activate_shortcut;
	return result;
}

void
layouts_quick_add_core_set_reminder_picker_activate_shortcut (LayoutsQuickAddCore* self,
                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_reminder_picker_activate_shortcut (self);
	if (old_value != value) {
		self->priv->_reminder_picker_activate_shortcut = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY]);
	}
}

static gboolean
layouts_quick_add_core_get_shift_enter_used (LayoutsQuickAddCore* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_shift_enter_used;
	return result;
}

static void
layouts_quick_add_core_set_shift_enter_used (LayoutsQuickAddCore* self,
                                             gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_shift_enter_used = value;
}

LayoutsQuickAddCoreFocusedWidget
layouts_quick_add_core_get_current_focus (LayoutsQuickAddCore* self)
{
	LayoutsQuickAddCoreFocusedWidget result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_current_focus;
	return result;
}

static void
layouts_quick_add_core_set_current_focus (LayoutsQuickAddCore* self,
                                          LayoutsQuickAddCoreFocusedWidget value)
{
	LayoutsQuickAddCoreFocusedWidget old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_current_focus (self);
	if (old_value != value) {
		self->priv->_current_focus = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY]);
	}
}

gint
layouts_quick_add_core_get_position (LayoutsQuickAddCore* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_position;
	return result;
}

void
layouts_quick_add_core_set_position (LayoutsQuickAddCore* self,
                                     gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_position (self);
	if (old_value != value) {
		self->priv->_position = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY]);
	}
}

NewTaskPosition
layouts_quick_add_core_get_new_task_position (LayoutsQuickAddCore* self)
{
	NewTaskPosition result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_new_task_position;
	return result;
}

void
layouts_quick_add_core_set_new_task_position (LayoutsQuickAddCore* self,
                                              NewTaskPosition value)
{
	NewTaskPosition old_value;
	g_return_if_fail (self != NULL);
	old_value = layouts_quick_add_core_get_new_task_position (self);
	if (old_value != value) {
		self->priv->_new_task_position = value;
		g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY]);
	}
}

gboolean
layouts_quick_add_core_get_is_loading (LayoutsQuickAddCore* self)
{
	gboolean result;
	WidgetsLoadingButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->submit_button;
	_tmp1_ = widgets_loading_button_get_is_loading (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

void
layouts_quick_add_core_set_is_loading (LayoutsQuickAddCore* self,
                                       gboolean value)
{
	WidgetsLoadingButton* _tmp0_;
	WidgetsLoadingButton* _tmp1_;
	GtkEntry* _tmp2_;
	WidgetsMarkdownEditor* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->submit_button;
	widgets_loading_button_set_is_loading (_tmp0_, value);
	_tmp1_ = self->priv->submit_button;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, !value);
	_tmp2_ = self->priv->content_entry;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, !value);
	_tmp3_ = self->priv->description_textview;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, !value);
	g_object_notify_by_pspec ((GObject *) self, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY]);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__HTTP_RESPONSE (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__HTTP_RESPONSE) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__HTTP_RESPONSE callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__HTTP_RESPONSE) (marshal_data ? marshal_data : cc->callback);
	callback (data1, value_get_http_response (param_values + 1), data2);
}

static Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		LayoutsQuickAddCore* self;
		self = _data7_->self;
		_g_object_unref0 (_data7_->container);
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static void
_layouts_quick_add_core___lambda301_ (LayoutsQuickAddCore* self)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, FALSE);
}

static void
__layouts_quick_add_core___lambda301__gtk_widget_show (GtkWidget* _sender,
                                                       gpointer self)
{
	_layouts_quick_add_core___lambda301_ ((LayoutsQuickAddCore*) self);
}

static gboolean
___lambda303_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	self->priv->labels_selection_in_progress = FALSE;
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda303__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda303_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda302_ (LayoutsQuickAddCore* self)
{
	self->priv->labels_popover_handling_esc = FALSE;
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, TRUE);
	if (self->priv->labels_selection_in_progress) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 50, ____lambda303__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda302__gtk_popover_closed (GtkPopover* _sender,
                                                          gpointer self)
{
	_layouts_quick_add_core___lambda302_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda304_ (LayoutsQuickAddCore* self,
                                      ObjectsLabel* label)
{
	g_return_if_fail (label != NULL);
	layouts_quick_add_core_handle_label_selection (self, label);
}

static void
__layouts_quick_add_core___lambda304__widgets_label_picker_label_quick_picker_label_selected (WidgetsLabelPickerLabelQuickPicker* _sender,
                                                                                              ObjectsLabel* label,
                                                                                              gpointer self)
{
	_layouts_quick_add_core___lambda304_ ((LayoutsQuickAddCore*) self, label);
}

static gboolean
__lambda306_ (LayoutsQuickAddCore* self)
{
	GtkTextMark* cursor = NULL;
	WidgetsMarkdownEditor* _tmp0_;
	GtkSourceBuffer* _tmp1_;
	GtkTextMark* _tmp2_;
	GtkTextMark* _tmp3_;
	GtkTextIter iter = {0};
	WidgetsMarkdownEditor* _tmp4_;
	GtkSourceBuffer* _tmp5_;
	GtkTextMark* _tmp6_;
	GtkTextIter _tmp7_ = {0};
	GdkRectangle rect = {0};
	WidgetsMarkdownEditor* _tmp8_;
	GtkTextView* _tmp9_;
	GtkTextIter _tmp10_;
	GdkRectangle _tmp11_ = {0};
	GtkAdjustment* vadj = NULL;
	GtkScrolledWindow* _tmp12_;
	GtkAdjustment* _tmp13_;
	GtkAdjustment* _tmp14_;
	GtkAdjustment* _tmp15_;
	gint cursor_y = 0;
	GdkRectangle _tmp16_;
	GdkRectangle _tmp17_;
	gdouble visible_height = 0.0;
	GtkAdjustment* _tmp18_;
	gdouble _tmp19_;
	gdouble _tmp20_;
	gint margin = 0;
	GtkAdjustment* _tmp21_;
	gdouble _tmp22_;
	gdouble _tmp23_;
	gboolean result;
	_tmp0_ = self->priv->description_textview;
	_tmp1_ = _tmp0_->buffer;
	_tmp2_ = gtk_text_buffer_get_insert ((GtkTextBuffer*) _tmp1_);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	cursor = _tmp3_;
	_tmp4_ = self->priv->description_textview;
	_tmp5_ = _tmp4_->buffer;
	_tmp6_ = cursor;
	gtk_text_buffer_get_iter_at_mark ((GtkTextBuffer*) _tmp5_, &_tmp7_, _tmp6_);
	iter = _tmp7_;
	_tmp8_ = self->priv->description_textview;
	_tmp9_ = _tmp8_->text_view;
	_tmp10_ = iter;
	gtk_text_view_get_iter_location (_tmp9_, &_tmp10_, &_tmp11_);
	rect = _tmp11_;
	_tmp12_ = self->priv->description_scrolled;
	_tmp13_ = gtk_scrolled_window_get_vadjustment (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = _g_object_ref0 (_tmp14_);
	vadj = _tmp15_;
	_tmp16_ = rect;
	_tmp17_ = rect;
	cursor_y = _tmp16_.y + _tmp17_.height;
	_tmp18_ = vadj;
	_tmp19_ = gtk_adjustment_get_page_size (_tmp18_);
	_tmp20_ = _tmp19_;
	visible_height = _tmp20_;
	margin = 20;
	_tmp21_ = vadj;
	_tmp22_ = gtk_adjustment_get_value (_tmp21_);
	_tmp23_ = _tmp22_;
	if (((gdouble) cursor_y) > ((_tmp23_ + visible_height) - margin)) {
		GtkAdjustment* _tmp24_;
		_tmp24_ = vadj;
		gtk_adjustment_set_value (_tmp24_, (cursor_y - visible_height) + margin);
	} else {
		GdkRectangle _tmp25_;
		GtkAdjustment* _tmp26_;
		gdouble _tmp27_;
		gdouble _tmp28_;
		_tmp25_ = rect;
		_tmp26_ = vadj;
		_tmp27_ = gtk_adjustment_get_value (_tmp26_);
		_tmp28_ = _tmp27_;
		if (((gdouble) _tmp25_.y) < (_tmp28_ + margin)) {
			GtkAdjustment* _tmp29_;
			GdkRectangle _tmp30_;
			_tmp29_ = vadj;
			_tmp30_ = rect;
			gtk_adjustment_set_value (_tmp29_, (gdouble) (_tmp30_.y - margin));
		}
	}
	result = G_SOURCE_REMOVE;
	_g_object_unref0 (vadj);
	_g_object_unref0 (cursor);
	return result;
}

static gboolean
___lambda306__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda306_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda305_ (LayoutsQuickAddCore* self)
{
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda306__gsource_func, g_object_ref (self), g_object_unref);
}

static void
__layouts_quick_add_core___lambda305__g_object_notify (GObject* _sender,
                                                       GParamSpec* pspec,
                                                       gpointer self)
{
	_layouts_quick_add_core___lambda305_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda307_ (Block7Data* _data7_,
                                      gint n_press,
                                      gdouble x,
                                      gdouble y)
{
	LayoutsQuickAddCore* self;
	gboolean _tmp0_ = FALSE;
	WidgetsLabelPickerLabelQuickPicker* _tmp1_;
	self = _data7_->self;
	_tmp1_ = self->priv->labels_quick_picker;
	if (_tmp1_ != NULL) {
		WidgetsLabelPickerLabelQuickPicker* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->labels_quick_picker;
		_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkAllocation entry_allocation = {0};
		GtkEntry* _tmp5_;
		GtkAllocation _tmp6_ = {0};
		gdouble entry_x = 0.0;
		gdouble entry_y = 0.0;
		GtkWidget* _tmp7_;
		GtkEntry* _tmp8_;
		gdouble _tmp9_ = 0.0;
		gdouble _tmp10_ = 0.0;
		gboolean _tmp11_;
		_tmp5_ = self->priv->content_entry;
		gtk_widget_get_allocation ((GtkWidget*) _tmp5_, &_tmp6_);
		entry_allocation = _tmp6_;
		_tmp7_ = _data7_->container;
		_tmp8_ = self->priv->content_entry;
		_tmp11_ = gtk_widget_translate_coordinates (_tmp7_, (GtkWidget*) _tmp8_, x, y, &_tmp9_, &_tmp10_);
		entry_x = _tmp9_;
		entry_y = _tmp10_;
		if (_tmp11_) {
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			gboolean _tmp14_ = FALSE;
			if (entry_x < ((gdouble) 0)) {
				_tmp14_ = TRUE;
			} else {
				GtkAllocation _tmp15_;
				_tmp15_ = entry_allocation;
				_tmp14_ = entry_x > ((gdouble) _tmp15_.width);
			}
			if (_tmp14_) {
				_tmp13_ = TRUE;
			} else {
				_tmp13_ = entry_y < ((gdouble) 0);
			}
			if (_tmp13_) {
				_tmp12_ = TRUE;
			} else {
				GtkAllocation _tmp16_;
				_tmp16_ = entry_allocation;
				_tmp12_ = entry_y > ((gdouble) _tmp16_.height);
			}
			if (_tmp12_) {
				WidgetsLabelPickerLabelQuickPicker* _tmp17_;
				_tmp17_ = self->priv->labels_quick_picker;
				gtk_popover_popdown ((GtkPopover*) _tmp17_);
			}
		}
	}
}

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

static gboolean
_layouts_quick_add_core___lambda308_ (LayoutsQuickAddCore* self)
{
	ServicesStore* _tmp0_;
	gboolean result;
	_tmp0_ = services_store_instance ();
	if (services_store_is_database_empty (_tmp0_)) {
		GtkStack* _tmp1_;
		_tmp1_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp1_, "warning");
	} else {
		GtkStack* _tmp2_;
		GtkEntry* _tmp3_;
		_tmp2_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp2_, "main");
		_tmp3_ = self->priv->content_entry;
		gtk_widget_grab_focus ((GtkWidget*) _tmp3_);
	}
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda308__gsource_func (gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda308_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core_add_item_gtk_button_clicked (GtkButton* _sender,
                                                     gpointer self)
{
	layouts_quick_add_core_add_item ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda309_ (LayoutsQuickAddCore* self,
                                      ObjectsProject* project)
{
	gboolean project_change = FALSE;
	ObjectsItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ObjectsItem* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	WidgetsLabelPickerLabelButton* _tmp8_;
	ObjectsSource* _tmp9_;
	ObjectsSource* _tmp10_;
	WidgetsLabelPickerLabelQuickPicker* _tmp11_;
	ObjectsSource* _tmp12_;
	ObjectsSource* _tmp13_;
	ServicesSettings* _tmp14_;
	ServicesSettings* _tmp15_;
	GSettings* _tmp16_;
	gboolean _tmp17_;
	g_return_if_fail (project != NULL);
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_project_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp4_ = _tmp3_;
	project_change = g_strcmp0 (_tmp2_, _tmp4_) != 0;
	_tmp5_ = self->priv->_item;
	_tmp6_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
	_tmp7_ = _tmp6_;
	objects_item_set_project_id (_tmp5_, _tmp7_);
	_tmp8_ = self->priv->label_button;
	_tmp9_ = objects_project_get_source (project);
	_tmp10_ = _tmp9_;
	widgets_label_picker_label_button_set_source (_tmp8_, _tmp10_);
	_tmp11_ = self->priv->labels_quick_picker;
	_tmp12_ = objects_project_get_source (project);
	_tmp13_ = _tmp12_;
	widgets_label_picker_label_quick_picker_set_source (_tmp11_, _tmp13_);
	_tmp14_ = services_settings_get_default ();
	_tmp15_ = _tmp14_;
	_tmp16_ = _tmp15_->settings;
	_tmp17_ = g_settings_get_boolean (_tmp16_, "quick-add-save-last-project");
	_g_object_unref0 (_tmp15_);
	if (_tmp17_) {
		ServicesSettings* _tmp18_;
		ServicesSettings* _tmp19_;
		GSettings* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		_tmp18_ = services_settings_get_default ();
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_->settings;
		_tmp21_ = objects_base_object_get_id ((ObjectsBaseObject*) project);
		_tmp22_ = _tmp21_;
		g_settings_set_string (_tmp20_, "quick-add-project-selected", _tmp22_);
		_g_object_unref0 (_tmp19_);
	}
}

static void
__layouts_quick_add_core___lambda309__widgets_project_picker_project_picker_button_project_change (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                   ObjectsProject* project,
                                                                                                   gpointer self)
{
	_layouts_quick_add_core___lambda309_ ((LayoutsQuickAddCore*) self, project);
}

static void
_layouts_quick_add_core___lambda310_ (LayoutsQuickAddCore* self,
                                      ObjectsSection* section)
{
	const gchar* _tmp0_ = NULL;
	ObjectsItem* _tmp3_;
	ServicesSettings* _tmp4_;
	ServicesSettings* _tmp5_;
	GSettings* _tmp6_;
	gboolean _tmp7_;
	if (section == NULL) {
		_tmp0_ = "";
	} else {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		_tmp1_ = objects_base_object_get_id ((ObjectsBaseObject*) section);
		_tmp2_ = _tmp1_;
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = self->priv->_item;
	objects_item_set_section_id (_tmp3_, _tmp0_);
	_tmp4_ = services_settings_get_default ();
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_->settings;
	_tmp7_ = g_settings_get_boolean (_tmp6_, "quick-add-save-last-project");
	_g_object_unref0 (_tmp5_);
	if (_tmp7_) {
		ServicesSettings* _tmp8_;
		ServicesSettings* _tmp9_;
		GSettings* _tmp10_;
		ObjectsItem* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp8_ = services_settings_get_default ();
		_tmp9_ = _tmp8_;
		_tmp10_ = _tmp9_->settings;
		_tmp11_ = self->priv->_item;
		_tmp12_ = objects_item_get_section_id (_tmp11_);
		_tmp13_ = _tmp12_;
		g_settings_set_string (_tmp10_, "quick-add-section-selected", _tmp13_);
		_g_object_unref0 (_tmp9_);
	}
}

static void
__layouts_quick_add_core___lambda310__widgets_project_picker_project_picker_button_section_change (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                   ObjectsSection* section,
                                                                                                   gpointer self)
{
	_layouts_quick_add_core___lambda310_ ((LayoutsQuickAddCore*) self, section);
}

static gboolean
___lambda312_ (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_project_picker_activate_shortcut;
	if (_tmp0_) {
		layouts_quick_add_core_entry_focus (self);
	} else {
		layouts_quick_add_core_restore_focus (self);
	}
	layouts_quick_add_core_set_project_picker_activate_shortcut (self, FALSE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda312__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda312_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda311_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda312__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda311__widgets_project_picker_project_picker_button_picker_opened (WidgetsProjectPickerProjectPickerButton* _sender,
                                                                                                  gboolean active,
                                                                                                  gpointer self)
{
	_layouts_quick_add_core___lambda311_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda313_ (LayoutsQuickAddCore* self)
{
	WidgetsScheduleButton* _tmp0_;
	ObjectsDueDate* _tmp1_;
	ObjectsDueDate* _tmp2_;
	gboolean _tmp3_ = FALSE;
	WidgetsScheduleButton* _tmp4_;
	ObjectsDueDate* _tmp5_;
	ObjectsDueDate* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	_tmp0_ = self->priv->schedule_button;
	_tmp1_ = widgets_schedule_button_get_duedate (_tmp0_);
	_tmp2_ = _tmp1_;
	layouts_quick_add_core_set_duedate (self, _tmp2_);
	_tmp4_ = self->priv->schedule_button;
	_tmp5_ = widgets_schedule_button_get_duedate (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = objects_due_date_get_date (_tmp6_);
	_tmp8_ = _tmp7_;
	if (g_strcmp0 (_tmp8_, "") == 0) {
		ServicesSettings* _tmp9_;
		ServicesSettings* _tmp10_;
		GSettings* _tmp11_;
		_tmp9_ = services_settings_get_default ();
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_->settings;
		_tmp3_ = g_settings_get_boolean (_tmp11_, "smart-date-recognition");
		_g_object_unref0 (_tmp10_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gchar* _tmp12_;
		self->priv->date_auto_detection_enabled = TRUE;
		_tmp12_ = g_strdup ("");
		_g_free0 (self->priv->last_detected_date_text);
		self->priv->last_detected_date_text = _tmp12_;
	}
}

static void
__layouts_quick_add_core___lambda313__widgets_schedule_button_duedate_changed (WidgetsScheduleButton* _sender,
                                                                               gpointer self)
{
	_layouts_quick_add_core___lambda313_ ((LayoutsQuickAddCore*) self);
}

static gboolean
___lambda315_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda315__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda315_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda314_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda315__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda314__widgets_schedule_button_picker_opened (WidgetsScheduleButton* _sender,
                                                                             gboolean active,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda314_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda316_ (LayoutsQuickAddCore* self,
                                      gint priority)
{
	layouts_quick_add_core_set_priority (self, priority);
}

static void
__layouts_quick_add_core___lambda316__widgets_priority_button_changed (WidgetsPriorityButton* _sender,
                                                                       gint priority,
                                                                       gpointer self)
{
	_layouts_quick_add_core___lambda316_ ((LayoutsQuickAddCore*) self, priority);
}

static gboolean
___lambda318_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda318__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda318_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda317_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda318__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda317__widgets_priority_button_picker_opened (WidgetsPriorityButton* _sender,
                                                                             gboolean active,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda317_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda319_ (LayoutsQuickAddCore* self,
                                      GeeHashMap* new_labels)
{
	g_return_if_fail (new_labels != NULL);
	if (self->priv->restoring_labels) {
		return;
	}
	layouts_quick_add_core_set_labels (self, new_labels);
}

static void
__layouts_quick_add_core___lambda319__widgets_label_picker_label_button_labels_changed (WidgetsLabelPickerLabelButton* _sender,
                                                                                        GeeHashMap* labels,
                                                                                        gpointer self)
{
	_layouts_quick_add_core___lambda319_ ((LayoutsQuickAddCore*) self, labels);
}

static gboolean
___lambda321_ (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_labels_picker_activate_shortcut;
	if (_tmp0_) {
		layouts_quick_add_core_entry_focus (self);
	} else {
		layouts_quick_add_core_restore_focus (self);
	}
	layouts_quick_add_core_set_labels_picker_activate_shortcut (self, FALSE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda321__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda321_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda320_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda321__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda320__widgets_label_picker_label_button_picker_opened (WidgetsLabelPickerLabelButton* _sender,
                                                                                       gboolean active,
                                                                                       gpointer self)
{
	_layouts_quick_add_core___lambda320_ ((LayoutsQuickAddCore*) self, active);
}

static gboolean
___lambda323_ (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->_reminder_picker_activate_shortcut;
	if (_tmp0_) {
		layouts_quick_add_core_entry_focus (self);
	} else {
		layouts_quick_add_core_restore_focus (self);
	}
	layouts_quick_add_core_set_reminder_picker_activate_shortcut (self, FALSE);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda323__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda323_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda322_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda323__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda322__widgets_reminder_picker_reminder_button_picker_opened (WidgetsReminderPickerReminderButton* _sender,
                                                                                             gboolean active,
                                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda322_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda324_ (LayoutsQuickAddCore* self,
                                      GDateTime* date)
{
	layouts_quick_add_core_update_deadline (self, date);
}

static void
__layouts_quick_add_core___lambda324__widgets_deadline_button_date_selected (WidgetsDeadlineButton* _sender,
                                                                             GDateTime* date,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda324_ ((LayoutsQuickAddCore*) self, date);
}

static gboolean
___lambda326_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda326__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda326_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda325_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda326__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda325__widgets_deadline_button_picker_opened (WidgetsDeadlineButton* _sender,
                                                                             gboolean active,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda325_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda327_ (LayoutsQuickAddCore* self,
                                      GDateTime* date)
{
	layouts_quick_add_core_update_deadline (self, date);
}

static void
__layouts_quick_add_core___lambda327__widgets_deadline_button_date_selected (WidgetsDeadlineButton* _sender,
                                                                             GDateTime* date,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda327_ ((LayoutsQuickAddCore*) self, date);
}

static gboolean
___lambda329_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda329__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda329_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda328_ (LayoutsQuickAddCore* self,
                                      gboolean active)
{
	g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL], 0, !active);
	if (!active) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ____lambda329__gsource_func, g_object_ref (self), g_object_unref);
	}
}

static void
__layouts_quick_add_core___lambda328__widgets_deadline_button_picker_opened (WidgetsDeadlineButton* _sender,
                                                                             gboolean active,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda328_ ((LayoutsQuickAddCore*) self, active);
}

static void
_layouts_quick_add_core___lambda330_ (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_ = FALSE;
	WidgetsLabelPickerLabelQuickPicker* _tmp1_;
	_tmp1_ = self->priv->labels_quick_picker;
	if (_tmp1_ != NULL) {
		WidgetsLabelPickerLabelQuickPicker* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp2_ = self->priv->labels_quick_picker;
		_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		return;
	}
	layouts_quick_add_core_add_item (self);
}

static void
__layouts_quick_add_core___lambda330__gtk_entry_activate (GtkEntry* _sender,
                                                          gpointer self)
{
	_layouts_quick_add_core___lambda330_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda331_ (LayoutsQuickAddCore* self)
{
	GtkRevealer* _tmp0_;
	GtkEntry* _tmp1_;
	GtkEntry* _tmp2_;
	const gchar* _tmp3_;
	GtkEntry* _tmp4_;
	const gchar* _tmp5_;
	GtkEntry* _tmp6_;
	const gchar* _tmp7_;
	GtkEntry* _tmp8_;
	const gchar* _tmp9_;
	ServicesSettings* _tmp10_;
	ServicesSettings* _tmp11_;
	GSettings* _tmp12_;
	gboolean _tmp13_;
	_tmp0_ = self->priv->info_revealer;
	gtk_revealer_set_reveal_child (_tmp0_, FALSE);
	_tmp1_ = self->priv->content_entry;
	gtk_widget_remove_css_class ((GtkWidget*) _tmp1_, "error");
	_tmp2_ = self->priv->content_entry;
	_tmp3_ = gtk_editable_get_text ((GtkEditable*) _tmp2_);
	layouts_quick_add_core_handle_priority_shortcut (self, _tmp3_);
	_tmp4_ = self->priv->content_entry;
	_tmp5_ = gtk_editable_get_text ((GtkEditable*) _tmp4_);
	layouts_quick_add_core_handle_labels_popover (self, _tmp5_);
	_tmp6_ = self->priv->content_entry;
	_tmp7_ = gtk_editable_get_text ((GtkEditable*) _tmp6_);
	layouts_quick_add_core_handle_text_trigger (self, LAYOUTS_QUICK_ADD_CORE_SHORTCUTS_KEY_PROJECTS, _tmp7_);
	_tmp8_ = self->priv->content_entry;
	_tmp9_ = gtk_editable_get_text ((GtkEditable*) _tmp8_);
	layouts_quick_add_core_handle_text_trigger (self, LAYOUTS_QUICK_ADD_CORE_SHORTCUTS_KEY_REMINDERS, _tmp9_);
	_tmp10_ = services_settings_get_default ();
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_->settings;
	_tmp13_ = g_settings_get_boolean (_tmp12_, "smart-date-recognition");
	_g_object_unref0 (_tmp11_);
	if (_tmp13_) {
		GtkEntry* _tmp14_;
		const gchar* _tmp15_;
		_tmp14_ = self->priv->content_entry;
		_tmp15_ = gtk_editable_get_text ((GtkEditable*) _tmp14_);
		layouts_quick_add_core_handle_natural_date_detection (self, _tmp15_);
	}
}

static void
__layouts_quick_add_core___lambda331__gtk_editable_changed (GtkEditable* _sender,
                                                            gpointer self)
{
	_layouts_quick_add_core___lambda331_ ((LayoutsQuickAddCore*) self);
}

static gboolean
_layouts_quick_add_core___lambda332_ (LayoutsQuickAddCore* self,
                                      guint keyval,
                                      guint keycode,
                                      GdkModifierType state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp4_ = FALSE;
	WidgetsLabelPickerLabelQuickPicker* _tmp5_;
	gboolean result;
	if (keyval == GDK_KEY_Return) {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_ctrl_pressed;
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		layouts_quick_add_core_add_item (self);
		result = TRUE;
		return result;
	}
	if (keyval == GDK_KEY_Return) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->_shift_pressed;
		_tmp2_ = _tmp3_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		layouts_quick_add_core_set_shift_enter_used (self, TRUE);
		layouts_quick_add_core_add_item (self);
		result = TRUE;
		return result;
	}
	_tmp5_ = self->priv->labels_quick_picker;
	if (_tmp5_ != NULL) {
		WidgetsLabelPickerLabelQuickPicker* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = self->priv->labels_quick_picker;
		_tmp7_ = gtk_widget_get_visible ((GtkWidget*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		gboolean _tmp9_ = FALSE;
		if (keyval == GDK_KEY_Down) {
			_tmp9_ = TRUE;
		} else {
			_tmp9_ = keyval == GDK_KEY_Up;
		}
		if (_tmp9_) {
			WidgetsLabelPickerLabelQuickPicker* _tmp10_;
			_tmp10_ = self->priv->labels_quick_picker;
			widgets_label_picker_label_quick_picker_navigate_listbox (_tmp10_, keyval == GDK_KEY_Down);
			result = TRUE;
			return result;
		}
		if (keyval == GDK_KEY_Return) {
			WidgetsLabelPickerLabelQuickPicker* _tmp11_;
			_tmp11_ = self->priv->labels_quick_picker;
			widgets_label_picker_label_quick_picker_activate_selected (_tmp11_);
			result = TRUE;
			return result;
		}
	}
	result = FALSE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda332__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                            guint keyval,
                                                                            guint keycode,
                                                                            GdkModifierType state,
                                                                            gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda332_ ((LayoutsQuickAddCore*) self, keyval, keycode, state);
	return result;
}

static void
_layouts_quick_add_core___lambda333_ (LayoutsQuickAddCore* self,
                                      guint keyval,
                                      guint keycode,
                                      GdkModifierType state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	WidgetsLabelPickerLabelQuickPicker* _tmp2_;
	_tmp2_ = self->priv->labels_quick_picker;
	if (_tmp2_ != NULL) {
		WidgetsLabelPickerLabelQuickPicker* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp3_ = self->priv->labels_quick_picker;
		_tmp4_ = gtk_widget_get_visible ((GtkWidget*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = keyval == GDK_KEY_Return;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		WidgetsLabelPickerLabelQuickPicker* _tmp6_;
		_tmp6_ = self->priv->labels_quick_picker;
		widgets_label_picker_label_quick_picker_activate_selected (_tmp6_);
	}
}

static void
__layouts_quick_add_core___lambda333__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                             guint keyval,
                                                                             guint keycode,
                                                                             GdkModifierType state,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda333_ ((LayoutsQuickAddCore*) self, keyval, keycode, state);
}

static void
_layouts_quick_add_core___lambda334_ (LayoutsQuickAddCore* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_ctrl_pressed;
	if (_tmp0_) {
		layouts_quick_add_core_add_item (self);
	} else {
		gboolean _tmp1_;
		_tmp1_ = self->priv->_shift_pressed;
		if (_tmp1_) {
			layouts_quick_add_core_set_shift_enter_used (self, TRUE);
			layouts_quick_add_core_add_item (self);
		}
	}
}

static void
__layouts_quick_add_core___lambda334__widgets_markdown_editor_return_pressed (WidgetsMarkdownEditor* _sender,
                                                                              gpointer self)
{
	_layouts_quick_add_core___lambda334_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda335_ (LayoutsQuickAddCore* self)
{
	layouts_quick_add_core_set_current_focus (self, LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY);
}

static void
__layouts_quick_add_core___lambda335__gtk_event_controller_focus_enter (GtkEventControllerFocus* _sender,
                                                                        gpointer self)
{
	_layouts_quick_add_core___lambda335_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda336_ (LayoutsQuickAddCore* self)
{
	layouts_quick_add_core_set_current_focus (self, LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_DESCRIPTION_TEXTVIEW);
}

static void
__layouts_quick_add_core___lambda336__widgets_markdown_editor_focus_in (WidgetsMarkdownEditor* _sender,
                                                                        gpointer self)
{
	_layouts_quick_add_core___lambda336_ ((LayoutsQuickAddCore*) self);
}

static gboolean
_layouts_quick_add_core___lambda337_ (LayoutsQuickAddCore* self,
                                      guint keyval,
                                      guint keycode,
                                      GdkModifierType state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	if (keyval == GDK_KEY_Control_L) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == GDK_KEY_Control_R;
	}
	if (_tmp0_) {
		layouts_quick_add_core_set_ctrl_pressed (self, TRUE);
	}
	if (keyval == GDK_KEY_Shift_L) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = keyval == GDK_KEY_Shift_R;
	}
	if (_tmp1_) {
		layouts_quick_add_core_set_shift_pressed (self, TRUE);
	}
	result = FALSE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda337__gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                            guint keyval,
                                                                            guint keycode,
                                                                            GdkModifierType state,
                                                                            gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda337_ ((LayoutsQuickAddCore*) self, keyval, keycode, state);
	return result;
}

static void
_layouts_quick_add_core___lambda338_ (LayoutsQuickAddCore* self,
                                      guint keyval,
                                      guint keycode,
                                      GdkModifierType state)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	if (keyval == GDK_KEY_Control_L) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == GDK_KEY_Control_R;
	}
	if (_tmp0_) {
		layouts_quick_add_core_set_ctrl_pressed (self, FALSE);
	}
	if (keyval == GDK_KEY_Shift_L) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = keyval == GDK_KEY_Shift_R;
	}
	if (_tmp1_) {
		layouts_quick_add_core_set_shift_pressed (self, FALSE);
	}
}

static void
__layouts_quick_add_core___lambda338__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                             guint keyval,
                                                                             guint keycode,
                                                                             GdkModifierType state,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda338_ ((LayoutsQuickAddCore*) self, keyval, keycode, state);
}

static gboolean
__lambda340_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda340__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda340_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda339_ (LayoutsQuickAddCore* self)
{
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	GtkToggleButton* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = self->priv->create_more_button;
	_tmp4_ = gtk_toggle_button_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_boolean (_tmp2_, "quick-add-create-more", _tmp5_);
	_g_object_unref0 (_tmp1_);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ___lambda340__gsource_func, g_object_ref (self), g_object_unref);
}

static void
__layouts_quick_add_core___lambda339__gtk_toggle_button_toggled (GtkToggleButton* _sender,
                                                                 gpointer self)
{
	_layouts_quick_add_core___lambda339_ ((LayoutsQuickAddCore*) self);
}

static gboolean
__lambda342_ (LayoutsQuickAddCore* self)
{
	gboolean result;
	layouts_quick_add_core_restore_focus (self);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda342__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda342_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda341_ (LayoutsQuickAddCore* self)
{
	ObjectsItem* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->_item;
	_tmp1_ = objects_item_get_pinned (_tmp0_);
	_tmp2_ = _tmp1_;
	layouts_quick_add_core_set_pinned (self, !_tmp2_);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 250, ___lambda342__gsource_func, g_object_ref (self), g_object_unref);
}

static void
__layouts_quick_add_core___lambda341__widgets_pin_button_changed (WidgetsPinButton* _sender,
                                                                  gpointer self)
{
	_layouts_quick_add_core___lambda341_ ((LayoutsQuickAddCore*) self);
}

static void
_layouts_quick_add_core___lambda343_ (LayoutsQuickAddCore* self,
                                      ObjectsLabel* label)
{
	GeeHashMap* current_labels = NULL;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp20_;
	GeeArrayList* labels_list = NULL;
	GeeArrayList* _tmp21_;
	WidgetsLabelPickerLabelButton* _tmp33_;
	GeeArrayList* _tmp34_;
	g_return_if_fail (label != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	current_labels = _tmp0_;
	{
		GeeArrayList* _existing_label_list = NULL;
		ObjectsItem* _tmp1_;
		GeeArrayList* _tmp2_;
		gint _existing_label_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _existing_label_index = 0;
		_tmp1_ = self->priv->_item;
		_tmp2_ = objects_item_get_labels_list (_tmp1_);
		_existing_label_list = _tmp2_;
		_tmp3_ = _existing_label_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_existing_label_size = _tmp5_;
		_existing_label_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ObjectsLabel* existing_label = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ObjectsLabel* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_existing_label_index = _existing_label_index + 1;
			_tmp6_ = _existing_label_index;
			_tmp7_ = _existing_label_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _existing_label_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _existing_label_index);
			existing_label = (ObjectsLabel*) _tmp9_;
			_tmp10_ = existing_label;
			_tmp11_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = objects_base_object_get_id ((ObjectsBaseObject*) label);
			_tmp14_ = _tmp13_;
			if (g_strcmp0 (_tmp12_, _tmp14_) != 0) {
				GeeHashMap* _tmp15_;
				ObjectsLabel* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				ObjectsLabel* _tmp19_;
				_tmp15_ = current_labels;
				_tmp16_ = existing_label;
				_tmp17_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = existing_label;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, _tmp18_, _tmp19_);
			}
			_g_object_unref0 (existing_label);
		}
		_g_object_unref0 (_existing_label_list);
	}
	self->priv->restoring_labels = TRUE;
	_tmp20_ = current_labels;
	layouts_quick_add_core_set_labels (self, _tmp20_);
	_tmp21_ = gee_array_list_new (OBJECTS_TYPE_LABEL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	labels_list = _tmp21_;
	{
		GeeIterator* _lbl_it = NULL;
		GeeHashMap* _tmp22_;
		GeeCollection* _tmp23_;
		GeeCollection* _tmp24_;
		GeeCollection* _tmp25_;
		GeeIterator* _tmp26_;
		GeeIterator* _tmp27_;
		_tmp22_ = current_labels;
		_tmp23_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = _tmp24_;
		_tmp26_ = gee_iterable_iterator ((GeeIterable*) _tmp25_);
		_tmp27_ = _tmp26_;
		_g_object_unref0 (_tmp25_);
		_lbl_it = _tmp27_;
		while (TRUE) {
			GeeIterator* _tmp28_;
			ObjectsLabel* lbl = NULL;
			GeeIterator* _tmp29_;
			gpointer _tmp30_;
			GeeArrayList* _tmp31_;
			ObjectsLabel* _tmp32_;
			_tmp28_ = _lbl_it;
			if (!gee_iterator_next (_tmp28_)) {
				break;
			}
			_tmp29_ = _lbl_it;
			_tmp30_ = gee_iterator_get (_tmp29_);
			lbl = (ObjectsLabel*) _tmp30_;
			_tmp31_ = labels_list;
			_tmp32_ = lbl;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp31_, _tmp32_);
			_g_object_unref0 (lbl);
		}
		_g_object_unref0 (_lbl_it);
	}
	_tmp33_ = self->priv->label_button;
	_tmp34_ = labels_list;
	widgets_label_picker_label_button_set_labels (_tmp33_, _tmp34_);
	self->priv->restoring_labels = FALSE;
	_g_object_unref0 (labels_list);
	_g_object_unref0 (current_labels);
}

static void
__layouts_quick_add_core___lambda343__widgets_item_labels_label_clicked (WidgetsItemLabels* _sender,
                                                                         ObjectsLabel* label,
                                                                         gpointer self)
{
	_layouts_quick_add_core___lambda343_ ((LayoutsQuickAddCore*) self, label);
}

static gboolean
_layouts_quick_add_core___lambda344_ (LayoutsQuickAddCore* self)
{
	WidgetsLabelPickerLabelButton* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->label_button;
	widgets_label_picker_label_button_open_picker (_tmp0_);
	result = TRUE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda344__gtk_shortcut_func (GtkWidget* widget,
                                                         GVariant* args,
                                                         gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda344_ ((LayoutsQuickAddCore*) self);
	return result;
}

static gboolean
_layouts_quick_add_core___lambda345_ (LayoutsQuickAddCore* self)
{
	WidgetsReminderPickerReminderButton* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->reminder_button;
	widgets_reminder_picker_reminder_button_open_picker (_tmp0_, FALSE);
	result = TRUE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda345__gtk_shortcut_func (GtkWidget* widget,
                                                         GVariant* args,
                                                         gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda345_ ((LayoutsQuickAddCore*) self);
	return result;
}

static gboolean
_layouts_quick_add_core___lambda346_ (LayoutsQuickAddCore* self)
{
	GtkToggleButton* _tmp0_;
	GtkToggleButton* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	_tmp0_ = self->priv->create_more_button;
	_tmp1_ = self->priv->create_more_button;
	_tmp2_ = gtk_toggle_button_get_active (_tmp1_);
	_tmp3_ = _tmp2_;
	gtk_toggle_button_set_active (_tmp0_, !_tmp3_);
	result = TRUE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda346__gtk_shortcut_func (GtkWidget* widget,
                                                         GVariant* args,
                                                         gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda346_ ((LayoutsQuickAddCore*) self);
	return result;
}

static gboolean
_layouts_quick_add_core___lambda347_ (LayoutsQuickAddCore* self)
{
	WidgetsScheduleButton* _tmp0_;
	gboolean result;
	_tmp0_ = self->priv->schedule_button;
	widgets_schedule_button_open_picker (_tmp0_);
	result = TRUE;
	return result;
}

static gboolean
__layouts_quick_add_core___lambda347__gtk_shortcut_func (GtkWidget* widget,
                                                         GVariant* args,
                                                         gpointer self)
{
	gboolean result;
	result = _layouts_quick_add_core___lambda347_ ((LayoutsQuickAddCore*) self);
	return result;
}

static void
_layouts_quick_add_core___lambda348_ (LayoutsQuickAddCore* self,
                                      guint keyval,
                                      guint keycode,
                                      GdkModifierType state)
{
	if (keyval == GDK_KEY_Escape) {
		gboolean _tmp0_ = FALSE;
		WidgetsLabelPickerLabelQuickPicker* _tmp1_;
		_tmp1_ = self->priv->labels_quick_picker;
		if (_tmp1_ != NULL) {
			WidgetsLabelPickerLabelQuickPicker* _tmp2_;
			gboolean _tmp3_;
			gboolean _tmp4_;
			_tmp2_ = self->priv->labels_quick_picker;
			_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
			_tmp4_ = _tmp3_;
			_tmp0_ = _tmp4_;
		} else {
			_tmp0_ = FALSE;
		}
		if (_tmp0_) {
			WidgetsLabelPickerLabelQuickPicker* _tmp5_;
			self->priv->labels_popover_handling_esc = TRUE;
			_tmp5_ = self->priv->labels_quick_picker;
			gtk_popover_popdown ((GtkPopover*) _tmp5_);
			return;
		}
		if (self->priv->labels_popover_handling_esc) {
			return;
		}
		g_signal_emit (self, layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_HIDE_DESTROY_SIGNAL], 0);
	}
}

static void
__layouts_quick_add_core___lambda348__gtk_event_controller_key_key_released (GtkEventControllerKey* _sender,
                                                                             guint keyval,
                                                                             guint keycode,
                                                                             GdkModifierType state,
                                                                             gpointer self)
{
	_layouts_quick_add_core___lambda348_ ((LayoutsQuickAddCore*) self, keyval, keycode, state);
}

static GObject *
layouts_quick_add_core_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	LayoutsQuickAddCore * self;
	Block7Data* _data7_;
	gchar* _tmp0_;
	gchar* _tmp1_;
	ChronoCore* _tmp2_;
	ServicesSettings* _tmp3_;
	ServicesSettings* _tmp4_;
	GSettings* _tmp5_;
	ObjectsItem* _tmp6_;
	ObjectsItem* _tmp7_;
	ObjectsItem* _tmp8_;
	ServicesSettings* _tmp9_;
	ServicesSettings* _tmp10_;
	GSettings* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	ObjectsItem* _tmp14_;
	Util* _tmp15_;
	Util* _tmp16_;
	ServicesSettings* _tmp17_;
	ServicesSettings* _tmp18_;
	GSettings* _tmp19_;
	gboolean _tmp20_;
	GtkMenuButton* info_button = NULL;
	GtkPopover* _tmp54_;
	GtkImage* _tmp55_;
	GtkMenuButton* _tmp56_ = NULL;
	GtkMenuButton* _tmp57_;
	GtkLabel* _tmp58_ = NULL;
	GtkLabel* _tmp59_;
	GtkLabel* _tmp60_;
	GtkLabel* _tmp61_;
	GtkWidget* _tmp62_;
	gchar* _tmp63_;
	gchar** _tmp64_;
	AdwHeaderBar* _tmp65_ = NULL;
	AdwHeaderBar* _tmp66_;
	GtkMenuButton* _tmp67_;
	gchar* _tmp68_;
	GtkEntry* _tmp69_ = NULL;
	WidgetsLabelPickerLabelQuickPicker* _tmp70_;
	WidgetsLabelPickerLabelQuickPicker* _tmp71_;
	ObjectsItem* _tmp72_;
	ObjectsProject* _tmp73_;
	ObjectsProject* _tmp74_;
	ObjectsSource* _tmp75_;
	ObjectsSource* _tmp76_;
	WidgetsLabelPickerLabelQuickPicker* _tmp77_;
	GtkEntry* _tmp78_;
	WidgetsLabelPickerLabelQuickPicker* _tmp79_;
	WidgetsLabelPickerLabelQuickPicker* _tmp80_;
	WidgetsLabelPickerLabelQuickPicker* _tmp81_;
	GtkImage* info_icon = NULL;
	gchar* _tmp82_;
	gchar** _tmp83_;
	gchar* _tmp84_;
	GtkImage* _tmp85_ = NULL;
	GtkImage* _tmp86_;
	GtkWidget* _tmp87_;
	GtkRevealer* _tmp88_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp89_ = NULL;
	GtkBox* _tmp90_;
	GtkEntry* _tmp91_;
	GtkBox* _tmp92_;
	GtkRevealer* _tmp93_;
	gchar* _tmp94_;
	WidgetsMarkdownEditor* _tmp95_ = NULL;
	WidgetsMarkdownEditor* _tmp96_;
	GtkWidget* _tmp97_;
	GtkScrolledWindow* _tmp98_ = NULL;
	GeeHashMap* _tmp99_;
	WidgetsMarkdownEditor* _tmp100_;
	GtkSourceBuffer* _tmp101_;
	gulong _tmp102_;
	WidgetsMarkdownEditor* _tmp103_;
	GtkSourceBuffer* _tmp104_;
	ObjectsItem* _tmp105_;
	ObjectsItem* _tmp106_;
	WidgetsItemLabels* _tmp107_ = NULL;
	Util* _tmp108_;
	Util* _tmp109_;
	gchar* _tmp110_;
	WidgetsScheduleButton* _tmp111_ = NULL;
	WidgetsDeadlineButton* _tmp112_ = NULL;
	GtkBox* dates_box = NULL;
	GtkBox* _tmp113_;
	GtkBox* _tmp114_;
	WidgetsScheduleButton* _tmp115_;
	GtkBox* _tmp116_;
	WidgetsDeadlineButton* _tmp117_;
	Util* _tmp118_;
	Util* _tmp119_;
	gchar* _tmp120_;
	ObjectsItem* _tmp121_;
	ObjectsProject* _tmp122_;
	ObjectsProject* _tmp123_;
	ObjectsSource* _tmp124_;
	ObjectsSource* _tmp125_;
	ObjectsSource* _tmp126_;
	WidgetsLabelPickerLabelButton* _tmp127_ = NULL;
	Util* _tmp128_;
	Util* _tmp129_;
	gchar* _tmp130_;
	gchar* _tmp131_;
	gchar* _tmp132_;
	gchar* _tmp133_;
	gchar** _tmp134_;
	gchar** _tmp135_;
	gint _tmp135__length1;
	gchar* _tmp136_;
	WidgetsPriorityButton* _tmp137_ = NULL;
	WidgetsPriorityButton* _tmp138_;
	ObjectsItem* _tmp139_;
	Util* _tmp140_;
	Util* _tmp141_;
	gchar* _tmp142_;
	WidgetsReminderPickerReminderButton* _tmp143_ = NULL;
	WidgetsDeadlineButton* _tmp144_;
	WidgetsPinButton* _tmp145_;
	GtkBox* action_box = NULL;
	GtkBox* _tmp146_ = NULL;
	GtkBox* action_box_right = NULL;
	GtkBox* _tmp147_ = NULL;
	GtkBox* _tmp148_;
	WidgetsLabelPickerLabelButton* _tmp149_;
	GtkBox* _tmp150_;
	WidgetsPriorityButton* _tmp151_;
	GtkBox* _tmp152_;
	WidgetsReminderPickerReminderButton* _tmp153_;
	GtkBox* _tmp154_;
	WidgetsDeadlineButton* _tmp155_;
	GtkBox* _tmp156_;
	WidgetsPinButton* _tmp157_;
	GtkBox* _tmp158_;
	GtkBox* _tmp159_;
	GtkBox* _tmp160_;
	GtkBox* _tmp161_;
	GtkBox* quick_add_content = NULL;
	GtkBox* _tmp162_ = NULL;
	GtkBox* _tmp163_;
	GtkBox* _tmp164_;
	GtkBox* _tmp165_;
	GtkBox* _tmp166_;
	GtkBox* _tmp167_;
	GtkSeparator* _tmp168_;
	GtkSeparator* _tmp169_;
	GtkBox* _tmp170_;
	GtkScrolledWindow* _tmp171_;
	GtkBox* _tmp172_;
	WidgetsItemLabels* _tmp173_;
	GtkBox* _tmp174_;
	GtkBox* _tmp175_;
	gchar* _tmp176_;
	WidgetsLoadingButton* _tmp177_ = NULL;
	WidgetsLoadingButton* _tmp178_;
	WidgetsLoadingButton* _tmp179_;
	gchar* _tmp180_;
	gchar* _tmp181_;
	ServicesSettings* _tmp182_;
	ServicesSettings* _tmp183_;
	GSettings* _tmp184_;
	GtkToggleButton* _tmp185_ = NULL;
	GtkToggleButton* _tmp186_;
	GtkToggleButton* _tmp187_;
	GtkBox* submit_cancel_grid = NULL;
	GtkBox* _tmp188_ = NULL;
	GtkBox* _tmp189_;
	GtkToggleButton* _tmp190_;
	GtkBox* _tmp191_;
	WidgetsLoadingButton* _tmp192_;
	Util* _tmp193_;
	Util* _tmp194_;
	gchar* _tmp195_;
	WidgetsProjectPickerProjectPickerButton* _tmp196_ = NULL;
	WidgetsProjectPickerProjectPickerButton* _tmp197_;
	ObjectsItem* _tmp198_;
	ObjectsProject* _tmp199_;
	ObjectsProject* _tmp200_;
	ObjectsItem* _tmp201_;
	const gchar* _tmp202_;
	const gchar* _tmp203_;
	GtkBox* footer_content = NULL;
	GtkBox* _tmp208_ = NULL;
	GtkBox* _tmp209_;
	WidgetsProjectPickerProjectPickerButton* _tmp210_;
	GtkBox* _tmp211_;
	GtkBox* _tmp212_;
	GtkBox* main_content = NULL;
	GtkBox* _tmp213_;
	GtkBox* _tmp214_;
	AdwHeaderBar* _tmp215_;
	GtkBox* _tmp216_;
	GtkBox* _tmp217_;
	GtkBox* _tmp218_;
	GtkBox* _tmp219_;
	GtkImage* warning_image = NULL;
	GtkImage* _tmp220_;
	GtkImage* _tmp221_;
	GThemedIcon* _tmp222_;
	GThemedIcon* _tmp223_;
	GtkImage* _tmp224_;
	GtkLabel* warning_label = NULL;
	GtkLabel* _tmp225_;
	GtkLabel* _tmp226_;
	GtkLabel* _tmp227_;
	GtkLabel* _tmp228_;
	GtkBox* warning_box = NULL;
	GtkBox* _tmp229_ = NULL;
	GtkBox* _tmp230_;
	GtkBox* _tmp231_;
	GtkBox* _tmp232_;
	GtkImage* _tmp233_;
	GtkBox* _tmp234_;
	GtkLabel* _tmp235_;
	GtkImage* _tmp236_ = NULL;
	GtkBox* added_box = NULL;
	GtkBox* _tmp237_;
	GtkBox* _tmp238_;
	GtkBox* _tmp239_;
	GtkBox* _tmp240_;
	GtkImage* _tmp241_;
	GtkStack* _tmp242_ = NULL;
	GtkStack* _tmp243_;
	GtkBox* _tmp244_;
	GtkStack* _tmp245_;
	GtkBox* _tmp246_;
	GtkStack* _tmp247_;
	GtkBox* _tmp248_;
	GtkFixed* _tmp249_ = NULL;
	GtkOverlay* _tmp250_;
	GtkOverlay* _tmp251_;
	GtkStack* _tmp252_;
	GtkOverlay* _tmp253_;
	GtkFixed* _tmp254_;
	gboolean _tmp255_;
	GtkGestureClick* click_gesture = NULL;
	GtkGestureClick* _tmp262_;
	GtkGestureClick* _tmp263_;
	GtkWidget* _tmp264_;
	GtkGestureClick* _tmp265_;
	GtkEventController* _tmp266_;
	GtkWidget* _tmp267_;
	GtkStack* _tmp268_;
	guint _tmp269_;
	guint _tmp270_;
	GeeHashMap* _tmp271_;
	WidgetsLoadingButton* _tmp272_;
	gulong _tmp273_;
	WidgetsLoadingButton* _tmp274_;
	GeeHashMap* _tmp275_;
	WidgetsProjectPickerProjectPickerButton* _tmp276_;
	gulong _tmp277_;
	WidgetsProjectPickerProjectPickerButton* _tmp278_;
	GeeHashMap* _tmp279_;
	WidgetsProjectPickerProjectPickerButton* _tmp280_;
	gulong _tmp281_;
	WidgetsProjectPickerProjectPickerButton* _tmp282_;
	GeeHashMap* _tmp283_;
	WidgetsProjectPickerProjectPickerButton* _tmp284_;
	gulong _tmp285_;
	WidgetsProjectPickerProjectPickerButton* _tmp286_;
	GeeHashMap* _tmp287_;
	WidgetsScheduleButton* _tmp288_;
	gulong _tmp289_;
	WidgetsScheduleButton* _tmp290_;
	GeeHashMap* _tmp291_;
	WidgetsScheduleButton* _tmp292_;
	gulong _tmp293_;
	WidgetsScheduleButton* _tmp294_;
	GeeHashMap* _tmp295_;
	WidgetsPriorityButton* _tmp296_;
	gulong _tmp297_;
	WidgetsPriorityButton* _tmp298_;
	GeeHashMap* _tmp299_;
	WidgetsPriorityButton* _tmp300_;
	gulong _tmp301_;
	WidgetsPriorityButton* _tmp302_;
	GeeHashMap* _tmp303_;
	WidgetsLabelPickerLabelButton* _tmp304_;
	gulong _tmp305_;
	WidgetsLabelPickerLabelButton* _tmp306_;
	GeeHashMap* _tmp307_;
	WidgetsLabelPickerLabelButton* _tmp308_;
	gulong _tmp309_;
	WidgetsLabelPickerLabelButton* _tmp310_;
	GeeHashMap* _tmp311_;
	WidgetsReminderPickerReminderButton* _tmp312_;
	gulong _tmp313_;
	WidgetsReminderPickerReminderButton* _tmp314_;
	GeeHashMap* _tmp315_;
	WidgetsDeadlineButton* _tmp316_;
	gulong _tmp317_;
	WidgetsDeadlineButton* _tmp318_;
	GeeHashMap* _tmp319_;
	WidgetsDeadlineButton* _tmp320_;
	gulong _tmp321_;
	WidgetsDeadlineButton* _tmp322_;
	GeeHashMap* _tmp323_;
	WidgetsDeadlineButton* _tmp324_;
	gulong _tmp325_;
	WidgetsDeadlineButton* _tmp326_;
	GeeHashMap* _tmp327_;
	WidgetsDeadlineButton* _tmp328_;
	gulong _tmp329_;
	WidgetsDeadlineButton* _tmp330_;
	GeeHashMap* _tmp331_;
	GtkEntry* _tmp332_;
	gulong _tmp333_;
	GtkEntry* _tmp334_;
	GeeHashMap* _tmp335_;
	GtkEntry* _tmp336_;
	gulong _tmp337_;
	GtkEntry* _tmp338_;
	GtkEventControllerKey* _tmp339_;
	GtkEntry* _tmp340_;
	GtkEventControllerKey* _tmp341_;
	GtkEventController* _tmp342_;
	GeeHashMap* _tmp343_;
	GtkEventControllerKey* _tmp344_;
	gulong _tmp345_;
	GtkEventControllerKey* _tmp346_;
	GeeHashMap* _tmp347_;
	GtkEventControllerKey* _tmp348_;
	gulong _tmp349_;
	GtkEventControllerKey* _tmp350_;
	GeeHashMap* _tmp351_;
	WidgetsMarkdownEditor* _tmp352_;
	gulong _tmp353_;
	WidgetsMarkdownEditor* _tmp354_;
	GtkEventControllerFocus* content_focus_controller = NULL;
	GtkEventControllerFocus* _tmp355_;
	GtkEntry* _tmp356_;
	GtkEventControllerFocus* _tmp357_;
	GtkEventController* _tmp358_;
	GeeHashMap* _tmp359_;
	GtkEventControllerFocus* _tmp360_;
	gulong _tmp361_;
	GtkEventControllerFocus* _tmp362_;
	GeeHashMap* _tmp363_;
	WidgetsMarkdownEditor* _tmp364_;
	gulong _tmp365_;
	WidgetsMarkdownEditor* _tmp366_;
	GtkEventControllerKey* _tmp367_;
	GtkEventControllerKey* _tmp368_;
	GtkEventController* _tmp369_;
	GeeHashMap* _tmp370_;
	GtkEventControllerKey* _tmp371_;
	gulong _tmp372_;
	GtkEventControllerKey* _tmp373_;
	GeeHashMap* _tmp374_;
	GtkEventControllerKey* _tmp375_;
	gulong _tmp376_;
	GtkEventControllerKey* _tmp377_;
	GeeHashMap* _tmp378_;
	GtkToggleButton* _tmp379_;
	gulong _tmp380_;
	GtkToggleButton* _tmp381_;
	GeeHashMap* _tmp382_;
	WidgetsPinButton* _tmp383_;
	gulong _tmp384_;
	WidgetsPinButton* _tmp385_;
	GeeHashMap* _tmp386_;
	WidgetsItemLabels* _tmp387_;
	gulong _tmp388_;
	WidgetsItemLabels* _tmp389_;
	GtkShortcut* open_label_shortcut = NULL;
	GtkShortcutTrigger* _tmp390_;
	GtkCallbackAction* _tmp391_;
	GtkShortcut* _tmp392_;
	GtkShortcut* open_reminder_shortcut = NULL;
	GtkShortcutTrigger* _tmp393_;
	GtkCallbackAction* _tmp394_;
	GtkShortcut* _tmp395_;
	GtkShortcut* toggle_keep_adding_shortcut = NULL;
	GtkShortcutTrigger* _tmp396_;
	GtkCallbackAction* _tmp397_;
	GtkShortcut* _tmp398_;
	GtkShortcut* open_schedule_shortcut = NULL;
	GtkShortcutTrigger* _tmp399_;
	GtkCallbackAction* _tmp400_;
	GtkShortcut* _tmp401_;
	GtkShortcutController* _tmp402_;
	GtkShortcutController* _tmp403_;
	GtkShortcut* _tmp404_;
	GtkShortcut* _tmp405_;
	GtkShortcutController* _tmp406_;
	GtkShortcut* _tmp407_;
	GtkShortcut* _tmp408_;
	GtkShortcutController* _tmp409_;
	GtkShortcut* _tmp410_;
	GtkShortcut* _tmp411_;
	GtkShortcutController* _tmp412_;
	GtkShortcut* _tmp413_;
	GtkShortcut* _tmp414_;
	GtkShortcutController* _tmp415_;
	GtkEventController* _tmp416_;
	GtkEventControllerKey* _tmp417_;
	GtkEventControllerKey* _tmp418_;
	GtkEventController* _tmp419_;
	GeeHashMap* _tmp420_;
	GtkEventControllerKey* _tmp421_;
	gulong _tmp422_;
	GtkEventControllerKey* _tmp423_;
	parent_class = G_OBJECT_CLASS (layouts_quick_add_core_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_QUICK_ADD_CORE, LayoutsQuickAddCore);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	_tmp0_ = util_get_user_language ();
	_tmp1_ = _tmp0_;
	_tmp2_ = chrono_core_new (_tmp1_);
	_g_object_unref0 (self->priv->chrono);
	self->priv->chrono = _tmp2_;
	_g_free0 (_tmp1_);
	_tmp3_ = services_settings_get_default ();
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_->settings;
	self->priv->date_auto_detection_enabled = g_settings_get_boolean (_tmp5_, "smart-date-recognition");
	_g_object_unref0 (_tmp4_);
	_tmp6_ = objects_item_new ();
	_tmp7_ = _tmp6_;
	layouts_quick_add_core_set_item (self, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = self->priv->_item;
	_tmp9_ = services_settings_get_default ();
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_->settings;
	_tmp12_ = g_settings_get_string (_tmp11_, "local-inbox-project-id");
	_tmp13_ = _tmp12_;
	objects_item_set_project_id (_tmp8_, _tmp13_);
	_g_free0 (_tmp13_);
	_g_object_unref0 (_tmp10_);
	_tmp14_ = self->priv->_item;
	_tmp15_ = util_get_default ();
	_tmp16_ = _tmp15_;
	objects_item_set_priority (_tmp14_, util_get_default_priority (_tmp16_));
	_g_object_unref0 (_tmp16_);
	_tmp17_ = services_settings_get_default ();
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp18_->settings;
	_tmp20_ = g_settings_get_boolean (_tmp19_, "quick-add-save-last-project");
	_g_object_unref0 (_tmp18_);
	if (_tmp20_) {
		ObjectsProject* project = NULL;
		ServicesStore* _tmp21_;
		ServicesSettings* _tmp22_;
		ServicesSettings* _tmp23_;
		GSettings* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		ObjectsProject* _tmp27_;
		ObjectsProject* _tmp28_;
		ObjectsProject* _tmp29_;
		ObjectsSection* section = NULL;
		ServicesStore* _tmp34_;
		ServicesSettings* _tmp35_;
		ServicesSettings* _tmp36_;
		GSettings* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		ObjectsSection* _tmp40_;
		ObjectsSection* _tmp41_;
		gboolean _tmp42_ = FALSE;
		ObjectsSection* _tmp43_;
		_tmp21_ = services_store_instance ();
		_tmp22_ = services_settings_get_default ();
		_tmp23_ = _tmp22_;
		_tmp24_ = _tmp23_->settings;
		_tmp25_ = g_settings_get_string (_tmp24_, "quick-add-project-selected");
		_tmp26_ = _tmp25_;
		_tmp27_ = services_store_get_project (_tmp21_, _tmp26_);
		_tmp28_ = _tmp27_;
		_g_free0 (_tmp26_);
		_g_object_unref0 (_tmp23_);
		project = _tmp28_;
		_tmp29_ = project;
		if (_tmp29_ != NULL) {
			ObjectsItem* _tmp30_;
			ObjectsProject* _tmp31_;
			const gchar* _tmp32_;
			const gchar* _tmp33_;
			_tmp30_ = self->priv->_item;
			_tmp31_ = project;
			_tmp32_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp31_);
			_tmp33_ = _tmp32_;
			objects_item_set_project_id (_tmp30_, _tmp33_);
		}
		_tmp34_ = services_store_instance ();
		_tmp35_ = services_settings_get_default ();
		_tmp36_ = _tmp35_;
		_tmp37_ = _tmp36_->settings;
		_tmp38_ = g_settings_get_string (_tmp37_, "quick-add-section-selected");
		_tmp39_ = _tmp38_;
		_tmp40_ = services_store_get_section (_tmp34_, _tmp39_);
		_tmp41_ = _tmp40_;
		_g_free0 (_tmp39_);
		_g_object_unref0 (_tmp36_);
		section = _tmp41_;
		_tmp43_ = section;
		if (_tmp43_ != NULL) {
			ObjectsSection* _tmp44_;
			const gchar* _tmp45_;
			const gchar* _tmp46_;
			ObjectsItem* _tmp47_;
			const gchar* _tmp48_;
			const gchar* _tmp49_;
			_tmp44_ = section;
			_tmp45_ = objects_section_get_project_id (_tmp44_);
			_tmp46_ = _tmp45_;
			_tmp47_ = self->priv->_item;
			_tmp48_ = objects_item_get_project_id (_tmp47_);
			_tmp49_ = _tmp48_;
			_tmp42_ = g_strcmp0 (_tmp46_, _tmp49_) == 0;
		} else {
			_tmp42_ = FALSE;
		}
		if (_tmp42_) {
			ObjectsItem* _tmp50_;
			ObjectsSection* _tmp51_;
			const gchar* _tmp52_;
			const gchar* _tmp53_;
			_tmp50_ = self->priv->_item;
			_tmp51_ = section;
			_tmp52_ = objects_base_object_get_id ((ObjectsBaseObject*) _tmp51_);
			_tmp53_ = _tmp52_;
			objects_item_set_section_id (_tmp50_, _tmp53_);
		}
		_g_object_unref0 (section);
		_g_object_unref0 (project);
	}
	_tmp54_ = layouts_quick_add_core_build_tip_popover (self);
	_tmp55_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-information-symbolic");
	g_object_ref_sink (_tmp55_);
	_tmp56_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_popover (_tmp56_, _tmp54_);
	_g_object_unref0 (_tmp54_);
	gtk_menu_button_set_child (_tmp56_, (GtkWidget*) _tmp55_);
	_g_object_unref0 (_tmp55_);
	g_object_ref_sink (_tmp56_);
	info_button = _tmp56_;
	_tmp57_ = info_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp57_, "flat");
	_tmp58_ = (GtkLabel*) gtk_label_new (_ ("Task added successfully!"));
	gtk_widget_set_visible ((GtkWidget*) _tmp58_, FALSE);
	g_object_ref_sink (_tmp58_);
	_g_object_unref0 (self->priv->success_label);
	self->priv->success_label = _tmp58_;
	_tmp59_ = self->priv->success_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp59_, "font-bold");
	_tmp60_ = self->priv->success_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp60_, "caption");
	_tmp61_ = self->priv->success_label;
	_tmp62_ = _g_object_ref0 ((GtkWidget*) _tmp61_);
	_tmp63_ = g_strdup ("flat");
	_tmp64_ = g_new0 (gchar*, 1 + 1);
	_tmp64_[0] = _tmp63_;
	_tmp65_ = (AdwHeaderBar*) adw_header_bar_new ();
	adw_header_bar_set_title_widget (_tmp65_, _tmp62_);
	_g_object_unref0 (_tmp62_);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp65_, TRUE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp65_, _tmp64_);
	_tmp64_ = (_vala_array_free (_tmp64_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp65_);
	_g_object_unref0 (self->priv->headerbar);
	self->priv->headerbar = _tmp65_;
	_tmp66_ = self->priv->headerbar;
	_tmp67_ = info_button;
	adw_header_bar_pack_end (_tmp66_, (GtkWidget*) _tmp67_);
	_tmp68_ = g_strdup (_ ("To-do name"));
	_tmp69_ = (GtkEntry*) gtk_entry_new ();
	gtk_widget_set_hexpand ((GtkWidget*) _tmp69_, TRUE);
	gtk_entry_set_placeholder_text (_tmp69_, _tmp68_);
	_g_free0 (_tmp68_);
	gtk_entry_set_has_frame (_tmp69_, FALSE);
	g_object_ref_sink (_tmp69_);
	_g_object_unref0 (self->priv->content_entry);
	self->priv->content_entry = _tmp69_;
	_tmp70_ = widgets_label_picker_label_quick_picker_new ();
	g_object_ref_sink (_tmp70_);
	_g_object_unref0 (self->priv->labels_quick_picker);
	self->priv->labels_quick_picker = _tmp70_;
	_tmp71_ = self->priv->labels_quick_picker;
	_tmp72_ = self->priv->_item;
	_tmp73_ = objects_item_get_project (_tmp72_);
	_tmp74_ = _tmp73_;
	_tmp75_ = objects_project_get_source (_tmp74_);
	_tmp76_ = _tmp75_;
	widgets_label_picker_label_quick_picker_set_source (_tmp71_, _tmp76_);
	_tmp77_ = self->priv->labels_quick_picker;
	_tmp78_ = self->priv->content_entry;
	gtk_widget_set_parent ((GtkWidget*) _tmp77_, (GtkWidget*) _tmp78_);
	_tmp79_ = self->priv->labels_quick_picker;
	g_signal_connect_object ((GtkWidget*) _tmp79_, "show", (GCallback) __layouts_quick_add_core___lambda301__gtk_widget_show, self, 0);
	_tmp80_ = self->priv->labels_quick_picker;
	g_signal_connect_object ((GtkPopover*) _tmp80_, "closed", (GCallback) __layouts_quick_add_core___lambda302__gtk_popover_closed, self, 0);
	_tmp81_ = self->priv->labels_quick_picker;
	g_signal_connect_object (_tmp81_, "label-selected", (GCallback) __layouts_quick_add_core___lambda304__widgets_label_picker_label_quick_picker_label_selected, self, 0);
	_tmp82_ = g_strdup ("error");
	_tmp83_ = g_new0 (gchar*, 1 + 1);
	_tmp83_[0] = _tmp82_;
	_tmp84_ = g_strdup (_ ("This field is required"));
	_tmp85_ = (GtkImage*) gtk_image_new_from_icon_name ("info-outline-symbolic");
	gtk_widget_set_css_classes ((GtkWidget*) _tmp85_, _tmp83_);
	_tmp83_ = (_vala_array_free (_tmp83_, 1, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp85_, _tmp84_);
	_g_free0 (_tmp84_);
	g_object_ref_sink (_tmp85_);
	info_icon = _tmp85_;
	_tmp86_ = info_icon;
	_tmp87_ = _g_object_ref0 ((GtkWidget*) _tmp86_);
	_tmp88_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp88_, _tmp87_);
	_g_object_unref0 (_tmp87_);
	gtk_revealer_set_transition_type (_tmp88_, GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT);
	g_object_ref_sink (_tmp88_);
	_g_object_unref0 (self->priv->info_revealer);
	self->priv->info_revealer = _tmp88_;
	_tmp89_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_valign ((GtkWidget*) _tmp89_, GTK_ALIGN_CENTER);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp89_, TRUE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp89_, 9);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp89_, 9);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp89_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp89_, 12);
	g_object_ref_sink (_tmp89_);
	content_box = _tmp89_;
	_tmp90_ = content_box;
	_tmp91_ = self->priv->content_entry;
	gtk_box_append (_tmp90_, (GtkWidget*) _tmp91_);
	_tmp92_ = content_box;
	_tmp93_ = self->priv->info_revealer;
	gtk_box_append (_tmp92_, (GtkWidget*) _tmp93_);
	_tmp94_ = g_strdup (_ ("Add a description…"));
	_tmp95_ = widgets_markdown_editor_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp95_, 14);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp95_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp95_, 12);
	widgets_markdown_editor_set_placeholder_text (_tmp95_, _tmp94_);
	_g_free0 (_tmp94_);
	g_object_ref_sink (_tmp95_);
	_g_object_unref0 (self->priv->description_textview);
	self->priv->description_textview = _tmp95_;
	_tmp96_ = self->priv->description_textview;
	_tmp97_ = _g_object_ref0 ((GtkWidget*) _tmp96_);
	_tmp98_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	g_object_set (_tmp98_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_min_content_height (_tmp98_, 100);
	gtk_scrolled_window_set_propagate_natural_height (_tmp98_, FALSE);
	gtk_scrolled_window_set_child (_tmp98_, _tmp97_);
	_g_object_unref0 (_tmp97_);
	g_object_ref_sink (_tmp98_);
	_g_object_unref0 (self->priv->description_scrolled);
	self->priv->description_scrolled = _tmp98_;
	_tmp99_ = self->priv->signal_map;
	_tmp100_ = self->priv->description_textview;
	_tmp101_ = _tmp100_->buffer;
	_tmp102_ = g_signal_connect_object ((GObject*) _tmp101_, "notify::cursor-position", (GCallback) __layouts_quick_add_core___lambda305__g_object_notify, self, 0);
	_tmp103_ = self->priv->description_textview;
	_tmp104_ = _tmp103_->buffer;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp99_, (gpointer) ((guintptr) _tmp102_), (GObject*) _tmp104_);
	_tmp105_ = self->priv->_item;
	_tmp106_ = _g_object_ref0 (_tmp105_);
	_tmp107_ = widgets_item_labels_new ();
	gtk_widget_set_margin_start ((GtkWidget*) _tmp107_, 12);
	widgets_item_labels_set_top_margin (_tmp107_, 12);
	widgets_item_labels_set_item (_tmp107_, _tmp106_);
	_g_object_unref0 (_tmp106_);
	g_object_ref_sink (_tmp107_);
	_g_object_unref0 (self->priv->item_labels);
	self->priv->item_labels = _tmp107_;
	_tmp108_ = util_get_default ();
	_tmp109_ = _tmp108_;
	_tmp110_ = util_markup_accel_tooltip (_tmp109_, _ ("Set date"), "Ctrl + d");
	_tmp111_ = widgets_schedule_button_new (_ ("Date"));
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp111_, _tmp110_);
	_g_free0 (_tmp110_);
	g_object_ref_sink (_tmp111_);
	_g_object_unref0 (self->priv->schedule_button);
	self->priv->schedule_button = _tmp111_;
	_g_object_unref0 (_tmp109_);
	_tmp112_ = widgets_deadline_button_new_with_detail ();
	widgets_deadline_button_set_reveal_content (_tmp112_, FALSE);
	g_object_ref_sink (_tmp112_);
	_g_object_unref0 (self->priv->deadline_button_detail);
	self->priv->deadline_button_detail = _tmp112_;
	_tmp113_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp113_);
	dates_box = _tmp113_;
	_tmp114_ = dates_box;
	_tmp115_ = self->priv->schedule_button;
	gtk_box_append (_tmp114_, (GtkWidget*) _tmp115_);
	_tmp116_ = dates_box;
	_tmp117_ = self->priv->deadline_button_detail;
	gtk_box_append (_tmp116_, (GtkWidget*) _tmp117_);
	_tmp118_ = util_get_default ();
	_tmp119_ = _tmp118_;
	_tmp120_ = util_markup_accel_tooltip (_tmp119_, _ ("Add Labels"), "@");
	_tmp121_ = self->priv->_item;
	_tmp122_ = objects_item_get_project (_tmp121_);
	_tmp123_ = _tmp122_;
	_tmp124_ = objects_project_get_source (_tmp123_);
	_tmp125_ = _tmp124_;
	_tmp126_ = _g_object_ref0 (_tmp125_);
	_tmp127_ = widgets_label_picker_label_button_new ();
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp127_, _tmp120_);
	_g_free0 (_tmp120_);
	widgets_label_picker_label_button_set_source (_tmp127_, _tmp126_);
	_g_object_unref0 (_tmp126_);
	g_object_ref_sink (_tmp127_);
	_g_object_unref0 (self->priv->label_button);
	self->priv->label_button = _tmp127_;
	_g_object_unref0 (_tmp119_);
	_tmp128_ = util_get_default ();
	_tmp129_ = _tmp128_;
	_tmp130_ = g_strdup ("p1");
	_tmp131_ = g_strdup ("p2");
	_tmp132_ = g_strdup ("p3");
	_tmp133_ = g_strdup ("p4");
	_tmp134_ = g_new0 (gchar*, 4 + 1);
	_tmp134_[0] = _tmp130_;
	_tmp134_[1] = _tmp131_;
	_tmp134_[2] = _tmp132_;
	_tmp134_[3] = _tmp133_;
	_tmp135_ = _tmp134_;
	_tmp135__length1 = 4;
	_tmp136_ = util_markup_accels_tooltip (_tmp129_, _ ("Set The Priority"), _tmp135_, (gint) 4);
	_tmp137_ = widgets_priority_button_new ();
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp137_, _tmp136_);
	_g_free0 (_tmp136_);
	g_object_ref_sink (_tmp137_);
	_g_object_unref0 (self->priv->priority_button);
	self->priv->priority_button = _tmp137_;
	_tmp135_ = (_vala_array_free (_tmp135_, _tmp135__length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_tmp129_);
	_tmp138_ = self->priv->priority_button;
	_tmp139_ = self->priv->_item;
	widgets_priority_button_update_from_item (_tmp138_, _tmp139_);
	_tmp140_ = util_get_default ();
	_tmp141_ = _tmp140_;
	_tmp142_ = util_markup_accel_tooltip (_tmp141_, _ ("Add Reminders"), "!");
	_tmp143_ = widgets_reminder_picker_reminder_button_new (TRUE);
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp143_, _tmp142_);
	_g_free0 (_tmp142_);
	g_object_ref_sink (_tmp143_);
	_g_object_unref0 (self->priv->reminder_button);
	self->priv->reminder_button = _tmp143_;
	_g_object_unref0 (_tmp141_);
	_tmp144_ = widgets_deadline_button_new ();
	g_object_ref_sink (_tmp144_);
	_g_object_unref0 (self->priv->deadline_button);
	self->priv->deadline_button = _tmp144_;
	_tmp145_ = widgets_pin_button_new ();
	g_object_ref_sink (_tmp145_);
	_g_object_unref0 (self->priv->pin_button);
	self->priv->pin_button = _tmp145_;
	_tmp146_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp146_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp146_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp146_, 6);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp146_, 6);
	g_object_ref_sink (_tmp146_);
	action_box = _tmp146_;
	_tmp147_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp147_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp147_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp147_);
	action_box_right = _tmp147_;
	_tmp148_ = action_box_right;
	_tmp149_ = self->priv->label_button;
	gtk_box_append (_tmp148_, (GtkWidget*) _tmp149_);
	_tmp150_ = action_box_right;
	_tmp151_ = self->priv->priority_button;
	gtk_box_append (_tmp150_, (GtkWidget*) _tmp151_);
	_tmp152_ = action_box_right;
	_tmp153_ = self->priv->reminder_button;
	gtk_box_append (_tmp152_, (GtkWidget*) _tmp153_);
	_tmp154_ = action_box_right;
	_tmp155_ = self->priv->deadline_button;
	gtk_box_append (_tmp154_, (GtkWidget*) _tmp155_);
	_tmp156_ = action_box_right;
	_tmp157_ = self->priv->pin_button;
	gtk_box_append (_tmp156_, (GtkWidget*) _tmp157_);
	_tmp158_ = action_box;
	_tmp159_ = dates_box;
	gtk_box_append (_tmp158_, (GtkWidget*) _tmp159_);
	_tmp160_ = action_box;
	_tmp161_ = action_box_right;
	gtk_box_append (_tmp160_, (GtkWidget*) _tmp161_);
	_tmp162_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp162_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp162_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp162_, 12);
	g_object_ref_sink (_tmp162_);
	quick_add_content = _tmp162_;
	_tmp163_ = quick_add_content;
	gtk_widget_add_css_class ((GtkWidget*) _tmp163_, "card");
	_tmp164_ = quick_add_content;
	gtk_widget_add_css_class ((GtkWidget*) _tmp164_, "sidebar-card");
	_tmp165_ = quick_add_content;
	_tmp166_ = content_box;
	gtk_box_append (_tmp165_, (GtkWidget*) _tmp166_);
	_tmp167_ = quick_add_content;
	_tmp168_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp168_);
	_tmp169_ = _tmp168_;
	gtk_box_append (_tmp167_, (GtkWidget*) _tmp169_);
	_g_object_unref0 (_tmp169_);
	_tmp170_ = quick_add_content;
	_tmp171_ = self->priv->description_scrolled;
	gtk_box_append (_tmp170_, (GtkWidget*) _tmp171_);
	_tmp172_ = quick_add_content;
	_tmp173_ = self->priv->item_labels;
	gtk_box_append (_tmp172_, (GtkWidget*) _tmp173_);
	_tmp174_ = quick_add_content;
	_tmp175_ = action_box;
	gtk_box_append (_tmp174_, (GtkWidget*) _tmp175_);
	_tmp176_ = g_strdup (_ ("Add Task"));
	_tmp177_ = widgets_loading_button_new_with_icon ("paper-plane-symbolic", 16);
	gtk_widget_set_valign ((GtkWidget*) _tmp177_, GTK_ALIGN_CENTER);
	g_object_set ((GtkWidget*) _tmp177_, "width-request", 32, NULL);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp177_, _tmp176_);
	_g_free0 (_tmp176_);
	g_object_ref_sink (_tmp177_);
	_g_object_unref0 (self->priv->submit_button);
	self->priv->submit_button = _tmp177_;
	_tmp178_ = self->priv->submit_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp178_, "suggested-action");
	_tmp179_ = self->priv->submit_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp179_, "padding-4");
	_tmp180_ = g_strdup (_ ("Keep adding"));
	_tmp181_ = g_strdup ("arrow-turn-down-right-symbolic");
	_tmp182_ = services_settings_get_default ();
	_tmp183_ = _tmp182_;
	_tmp184_ = _tmp183_->settings;
	_tmp185_ = (GtkToggleButton*) gtk_toggle_button_new ();
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp185_, _tmp180_);
	_g_free0 (_tmp180_);
	gtk_button_set_icon_name ((GtkButton*) _tmp185_, _tmp181_);
	_g_free0 (_tmp181_);
	gtk_widget_set_valign ((GtkWidget*) _tmp185_, GTK_ALIGN_CENTER);
	gtk_toggle_button_set_active (_tmp185_, g_settings_get_boolean (_tmp184_, "quick-add-create-more"));
	g_object_ref_sink (_tmp185_);
	_g_object_unref0 (self->priv->create_more_button);
	self->priv->create_more_button = _tmp185_;
	_g_object_unref0 (_tmp183_);
	_tmp186_ = self->priv->create_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp186_, "flat");
	_tmp187_ = self->priv->create_more_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp187_, "keep-adding-button");
	_tmp188_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp188_, TRUE);
	gtk_widget_set_halign ((GtkWidget*) _tmp188_, GTK_ALIGN_END);
	g_object_ref_sink (_tmp188_);
	submit_cancel_grid = _tmp188_;
	_tmp189_ = submit_cancel_grid;
	_tmp190_ = self->priv->create_more_button;
	gtk_box_append (_tmp189_, (GtkWidget*) _tmp190_);
	_tmp191_ = submit_cancel_grid;
	_tmp192_ = self->priv->submit_button;
	gtk_box_append (_tmp191_, (GtkWidget*) _tmp192_);
	_tmp193_ = util_get_default ();
	_tmp194_ = _tmp193_;
	_tmp195_ = util_markup_accel_tooltip (_tmp194_, _ ("Select a Project"), "#");
	_tmp196_ = widgets_project_picker_project_picker_button_new ();
	gtk_widget_set_tooltip_markup ((GtkWidget*) _tmp196_, _tmp195_);
	_g_free0 (_tmp195_);
	g_object_ref_sink (_tmp196_);
	_g_object_unref0 (self->priv->project_picker_button);
	self->priv->project_picker_button = _tmp196_;
	_g_object_unref0 (_tmp194_);
	_tmp197_ = self->priv->project_picker_button;
	_tmp198_ = self->priv->_item;
	_tmp199_ = objects_item_get_project (_tmp198_);
	_tmp200_ = _tmp199_;
	widgets_project_picker_project_picker_button_set_project (_tmp197_, _tmp200_);
	_tmp201_ = self->priv->_item;
	_tmp202_ = objects_item_get_section_id (_tmp201_);
	_tmp203_ = _tmp202_;
	if (g_strcmp0 (_tmp203_, "") != 0) {
		WidgetsProjectPickerProjectPickerButton* _tmp204_;
		ObjectsItem* _tmp205_;
		ObjectsSection* _tmp206_;
		ObjectsSection* _tmp207_;
		_tmp204_ = self->priv->project_picker_button;
		_tmp205_ = self->priv->_item;
		_tmp206_ = objects_item_get_section (_tmp205_);
		_tmp207_ = _tmp206_;
		widgets_project_picker_project_picker_button_set_section (_tmp204_, _tmp207_);
	}
	_tmp208_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp208_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp208_, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp208_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp208_, 12);
	g_object_ref_sink (_tmp208_);
	footer_content = _tmp208_;
	_tmp209_ = footer_content;
	_tmp210_ = self->priv->project_picker_button;
	gtk_box_append (_tmp209_, (GtkWidget*) _tmp210_);
	_tmp211_ = footer_content;
	_tmp212_ = submit_cancel_grid;
	gtk_box_append (_tmp211_, (GtkWidget*) _tmp212_);
	_tmp213_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp213_);
	main_content = _tmp213_;
	_tmp214_ = main_content;
	_tmp215_ = self->priv->headerbar;
	gtk_box_append (_tmp214_, (GtkWidget*) _tmp215_);
	_tmp216_ = main_content;
	_tmp217_ = quick_add_content;
	gtk_box_append (_tmp216_, (GtkWidget*) _tmp217_);
	_tmp218_ = main_content;
	_tmp219_ = footer_content;
	gtk_box_append (_tmp218_, (GtkWidget*) _tmp219_);
	_tmp220_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp220_);
	warning_image = _tmp220_;
	_tmp221_ = warning_image;
	_tmp222_ = (GThemedIcon*) g_themed_icon_new ("dialog-warning");
	_tmp223_ = _tmp222_;
	g_object_set (_tmp221_, "gicon", (GIcon*) _tmp223_, NULL);
	_g_object_unref0 (_tmp223_);
	_tmp224_ = warning_image;
	gtk_image_set_pixel_size (_tmp224_, 32);
	_tmp225_ = (GtkLabel*) gtk_label_new (_ ("I'm sorry, Quick Add can't find any project available, try creating a " \
"project from Planify."));
	g_object_ref_sink (_tmp225_);
	warning_label = _tmp225_;
	_tmp226_ = warning_label;
	gtk_label_set_wrap (_tmp226_, TRUE);
	_tmp227_ = warning_label;
	gtk_label_set_max_width_chars (_tmp227_, 42);
	_tmp228_ = warning_label;
	gtk_label_set_xalign (_tmp228_, (gfloat) 0);
	_tmp229_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp229_, 12);
	g_object_ref_sink (_tmp229_);
	warning_box = _tmp229_;
	_tmp230_ = warning_box;
	gtk_widget_set_halign ((GtkWidget*) _tmp230_, GTK_ALIGN_CENTER);
	_tmp231_ = warning_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp231_, GTK_ALIGN_CENTER);
	_tmp232_ = warning_box;
	_tmp233_ = warning_image;
	gtk_box_append (_tmp232_, (GtkWidget*) _tmp233_);
	_tmp234_ = warning_box;
	_tmp235_ = warning_label;
	gtk_box_append (_tmp234_, (GtkWidget*) _tmp235_);
	_tmp236_ = (GtkImage*) gtk_image_new_from_icon_name ("check-round-outline-symbolic");
	gtk_image_set_pixel_size (_tmp236_, 64);
	g_object_ref_sink (_tmp236_);
	_g_object_unref0 (self->priv->added_image);
	self->priv->added_image = _tmp236_;
	_tmp237_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	g_object_ref_sink (_tmp237_);
	added_box = _tmp237_;
	_tmp238_ = added_box;
	gtk_widget_set_halign ((GtkWidget*) _tmp238_, GTK_ALIGN_CENTER);
	_tmp239_ = added_box;
	gtk_widget_set_valign ((GtkWidget*) _tmp239_, GTK_ALIGN_CENTER);
	_tmp240_ = added_box;
	_tmp241_ = self->priv->added_image;
	gtk_box_append (_tmp240_, (GtkWidget*) _tmp241_);
	_tmp242_ = (GtkStack*) gtk_stack_new ();
	gtk_stack_set_transition_type (_tmp242_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp242_);
	_g_object_unref0 (self->priv->main_stack);
	self->priv->main_stack = _tmp242_;
	_tmp243_ = self->priv->main_stack;
	_tmp244_ = main_content;
	gtk_stack_add_named (_tmp243_, (GtkWidget*) _tmp244_, "main");
	_tmp245_ = self->priv->main_stack;
	_tmp246_ = warning_box;
	gtk_stack_add_named (_tmp245_, (GtkWidget*) _tmp246_, "warning");
	_tmp247_ = self->priv->main_stack;
	_tmp248_ = added_box;
	gtk_stack_add_named (_tmp247_, (GtkWidget*) _tmp248_, "added");
	_tmp249_ = (GtkFixed*) gtk_fixed_new ();
	gtk_widget_set_can_target ((GtkWidget*) _tmp249_, FALSE);
	g_object_ref_sink (_tmp249_);
	_g_object_unref0 (self->priv->animation_container);
	self->priv->animation_container = _tmp249_;
	_tmp250_ = (GtkOverlay*) gtk_overlay_new ();
	g_object_ref_sink (_tmp250_);
	_g_object_unref0 (self->priv->animation_overlay);
	self->priv->animation_overlay = _tmp250_;
	_tmp251_ = self->priv->animation_overlay;
	_tmp252_ = self->priv->main_stack;
	gtk_overlay_set_child (_tmp251_, (GtkWidget*) _tmp252_);
	_tmp253_ = self->priv->animation_overlay;
	_tmp254_ = self->priv->animation_container;
	gtk_overlay_add_overlay (_tmp253_, (GtkWidget*) _tmp254_);
	_tmp255_ = self->priv->_is_window_quick_add;
	if (_tmp255_) {
		GtkOverlay* _tmp256_;
		GtkWidget* _tmp257_;
		GtkWindowHandle* _tmp258_ = NULL;
		_tmp256_ = self->priv->animation_overlay;
		_tmp257_ = _g_object_ref0 ((GtkWidget*) _tmp256_);
		_tmp258_ = (GtkWindowHandle*) gtk_window_handle_new ();
		gtk_window_handle_set_child (_tmp258_, _tmp257_);
		_g_object_unref0 (_tmp257_);
		g_object_ref_sink (_tmp258_);
		_g_object_unref0 (_data7_->container);
		_data7_->container = (GtkWidget*) _tmp258_;
	} else {
		GtkOverlay* _tmp259_;
		GtkWidget* _tmp260_;
		AdwBin* _tmp261_ = NULL;
		_tmp259_ = self->priv->animation_overlay;
		_tmp260_ = _g_object_ref0 ((GtkWidget*) _tmp259_);
		_tmp261_ = (AdwBin*) adw_bin_new ();
		adw_bin_set_child (_tmp261_, _tmp260_);
		_g_object_unref0 (_tmp260_);
		g_object_ref_sink (_tmp261_);
		_g_object_unref0 (_data7_->container);
		_data7_->container = (GtkWidget*) _tmp261_;
	}
	_tmp262_ = (GtkGestureClick*) gtk_gesture_click_new ();
	click_gesture = _tmp262_;
	_tmp263_ = click_gesture;
	g_signal_connect_data (_tmp263_, "pressed", (GCallback) __layouts_quick_add_core___lambda307__gtk_gesture_click_pressed, block7_data_ref (_data7_), (GClosureNotify) block7_data_unref, 0);
	_tmp264_ = _data7_->container;
	_tmp265_ = click_gesture;
	_tmp266_ = _g_object_ref0 ((GtkEventController*) _tmp265_);
	gtk_widget_add_controller (_tmp264_, _tmp266_);
	_tmp267_ = _data7_->container;
	adw_bin_set_child ((AdwBin*) self, _tmp267_);
	_tmp268_ = self->priv->main_stack;
	_tmp269_ = gtk_stack_get_transition_duration (_tmp268_);
	_tmp270_ = _tmp269_;
	g_timeout_add_full (G_PRIORITY_DEFAULT, _tmp270_, __layouts_quick_add_core___lambda308__gsource_func, g_object_ref (self), g_object_unref);
	_tmp271_ = self->priv->signal_map;
	_tmp272_ = self->priv->submit_button;
	_tmp273_ = g_signal_connect_object ((GtkButton*) _tmp272_, "clicked", (GCallback) _layouts_quick_add_core_add_item_gtk_button_clicked, self, 0);
	_tmp274_ = self->priv->submit_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp271_, (gpointer) ((guintptr) _tmp273_), (GObject*) _tmp274_);
	_tmp275_ = self->priv->signal_map;
	_tmp276_ = self->priv->project_picker_button;
	_tmp277_ = g_signal_connect_object (_tmp276_, "project-change", (GCallback) __layouts_quick_add_core___lambda309__widgets_project_picker_project_picker_button_project_change, self, 0);
	_tmp278_ = self->priv->project_picker_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp275_, (gpointer) ((guintptr) _tmp277_), (GObject*) _tmp278_);
	_tmp279_ = self->priv->signal_map;
	_tmp280_ = self->priv->project_picker_button;
	_tmp281_ = g_signal_connect_object (_tmp280_, "section-change", (GCallback) __layouts_quick_add_core___lambda310__widgets_project_picker_project_picker_button_section_change, self, 0);
	_tmp282_ = self->priv->project_picker_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp279_, (gpointer) ((guintptr) _tmp281_), (GObject*) _tmp282_);
	_tmp283_ = self->priv->signal_map;
	_tmp284_ = self->priv->project_picker_button;
	_tmp285_ = g_signal_connect_object (_tmp284_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda311__widgets_project_picker_project_picker_button_picker_opened, self, 0);
	_tmp286_ = self->priv->project_picker_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp283_, (gpointer) ((guintptr) _tmp285_), (GObject*) _tmp286_);
	_tmp287_ = self->priv->signal_map;
	_tmp288_ = self->priv->schedule_button;
	_tmp289_ = g_signal_connect_object (_tmp288_, "duedate-changed", (GCallback) __layouts_quick_add_core___lambda313__widgets_schedule_button_duedate_changed, self, 0);
	_tmp290_ = self->priv->schedule_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp287_, (gpointer) ((guintptr) _tmp289_), (GObject*) _tmp290_);
	_tmp291_ = self->priv->signal_map;
	_tmp292_ = self->priv->schedule_button;
	_tmp293_ = g_signal_connect_object (_tmp292_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda314__widgets_schedule_button_picker_opened, self, 0);
	_tmp294_ = self->priv->schedule_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp291_, (gpointer) ((guintptr) _tmp293_), (GObject*) _tmp294_);
	_tmp295_ = self->priv->signal_map;
	_tmp296_ = self->priv->priority_button;
	_tmp297_ = g_signal_connect_object (_tmp296_, "changed", (GCallback) __layouts_quick_add_core___lambda316__widgets_priority_button_changed, self, 0);
	_tmp298_ = self->priv->priority_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp295_, (gpointer) ((guintptr) _tmp297_), (GObject*) _tmp298_);
	_tmp299_ = self->priv->signal_map;
	_tmp300_ = self->priv->priority_button;
	_tmp301_ = g_signal_connect_object (_tmp300_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda317__widgets_priority_button_picker_opened, self, 0);
	_tmp302_ = self->priv->priority_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp299_, (gpointer) ((guintptr) _tmp301_), (GObject*) _tmp302_);
	_tmp303_ = self->priv->signal_map;
	_tmp304_ = self->priv->label_button;
	_tmp305_ = g_signal_connect_object (_tmp304_, "labels-changed", (GCallback) __layouts_quick_add_core___lambda319__widgets_label_picker_label_button_labels_changed, self, 0);
	_tmp306_ = self->priv->label_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp303_, (gpointer) ((guintptr) _tmp305_), (GObject*) _tmp306_);
	_tmp307_ = self->priv->signal_map;
	_tmp308_ = self->priv->label_button;
	_tmp309_ = g_signal_connect_object (_tmp308_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda320__widgets_label_picker_label_button_picker_opened, self, 0);
	_tmp310_ = self->priv->label_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp307_, (gpointer) ((guintptr) _tmp309_), (GObject*) _tmp310_);
	_tmp311_ = self->priv->signal_map;
	_tmp312_ = self->priv->reminder_button;
	_tmp313_ = g_signal_connect_object (_tmp312_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda322__widgets_reminder_picker_reminder_button_picker_opened, self, 0);
	_tmp314_ = self->priv->reminder_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp311_, (gpointer) ((guintptr) _tmp313_), (GObject*) _tmp314_);
	_tmp315_ = self->priv->signal_map;
	_tmp316_ = self->priv->deadline_button;
	_tmp317_ = g_signal_connect_object (_tmp316_, "date-selected", (GCallback) __layouts_quick_add_core___lambda324__widgets_deadline_button_date_selected, self, 0);
	_tmp318_ = self->priv->deadline_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp315_, (gpointer) ((guintptr) _tmp317_), (GObject*) _tmp318_);
	_tmp319_ = self->priv->signal_map;
	_tmp320_ = self->priv->deadline_button;
	_tmp321_ = g_signal_connect_object (_tmp320_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda325__widgets_deadline_button_picker_opened, self, 0);
	_tmp322_ = self->priv->deadline_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp319_, (gpointer) ((guintptr) _tmp321_), (GObject*) _tmp322_);
	_tmp323_ = self->priv->signal_map;
	_tmp324_ = self->priv->deadline_button_detail;
	_tmp325_ = g_signal_connect_object (_tmp324_, "date-selected", (GCallback) __layouts_quick_add_core___lambda327__widgets_deadline_button_date_selected, self, 0);
	_tmp326_ = self->priv->deadline_button_detail;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp323_, (gpointer) ((guintptr) _tmp325_), (GObject*) _tmp326_);
	_tmp327_ = self->priv->signal_map;
	_tmp328_ = self->priv->deadline_button_detail;
	_tmp329_ = g_signal_connect_object (_tmp328_, "picker-opened", (GCallback) __layouts_quick_add_core___lambda328__widgets_deadline_button_picker_opened, self, 0);
	_tmp330_ = self->priv->deadline_button_detail;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp327_, (gpointer) ((guintptr) _tmp329_), (GObject*) _tmp330_);
	_tmp331_ = self->priv->signal_map;
	_tmp332_ = self->priv->content_entry;
	_tmp333_ = g_signal_connect_object (_tmp332_, "activate", (GCallback) __layouts_quick_add_core___lambda330__gtk_entry_activate, self, 0);
	_tmp334_ = self->priv->content_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp331_, (gpointer) ((guintptr) _tmp333_), (GObject*) _tmp334_);
	_tmp335_ = self->priv->signal_map;
	_tmp336_ = self->priv->content_entry;
	_tmp337_ = g_signal_connect_object ((GtkEditable*) _tmp336_, "changed", (GCallback) __layouts_quick_add_core___lambda331__gtk_editable_changed, self, 0);
	_tmp338_ = self->priv->content_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp335_, (gpointer) ((guintptr) _tmp337_), (GObject*) _tmp338_);
	_tmp339_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	_g_object_unref0 (self->priv->content_controller_key);
	self->priv->content_controller_key = _tmp339_;
	_tmp340_ = self->priv->content_entry;
	_tmp341_ = self->priv->content_controller_key;
	_tmp342_ = _g_object_ref0 ((GtkEventController*) _tmp341_);
	gtk_widget_add_controller ((GtkWidget*) _tmp340_, _tmp342_);
	_tmp343_ = self->priv->signal_map;
	_tmp344_ = self->priv->content_controller_key;
	_tmp345_ = g_signal_connect_object (_tmp344_, "key-pressed", (GCallback) __layouts_quick_add_core___lambda332__gtk_event_controller_key_key_pressed, self, 0);
	_tmp346_ = self->priv->content_controller_key;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp343_, (gpointer) ((guintptr) _tmp345_), (GObject*) _tmp346_);
	_tmp347_ = self->priv->signal_map;
	_tmp348_ = self->priv->content_controller_key;
	_tmp349_ = g_signal_connect_object (_tmp348_, "key-released", (GCallback) __layouts_quick_add_core___lambda333__gtk_event_controller_key_key_released, self, 0);
	_tmp350_ = self->priv->content_controller_key;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp347_, (gpointer) ((guintptr) _tmp349_), (GObject*) _tmp350_);
	_tmp351_ = self->priv->signal_map;
	_tmp352_ = self->priv->description_textview;
	_tmp353_ = g_signal_connect_object (_tmp352_, "return-pressed", (GCallback) __layouts_quick_add_core___lambda334__widgets_markdown_editor_return_pressed, self, 0);
	_tmp354_ = self->priv->description_textview;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp351_, (gpointer) ((guintptr) _tmp353_), (GObject*) _tmp354_);
	_tmp355_ = (GtkEventControllerFocus*) gtk_event_controller_focus_new ();
	content_focus_controller = _tmp355_;
	_tmp356_ = self->priv->content_entry;
	_tmp357_ = content_focus_controller;
	_tmp358_ = _g_object_ref0 ((GtkEventController*) _tmp357_);
	gtk_widget_add_controller ((GtkWidget*) _tmp356_, _tmp358_);
	_tmp359_ = self->priv->signal_map;
	_tmp360_ = content_focus_controller;
	_tmp361_ = g_signal_connect_object (_tmp360_, "enter", (GCallback) __layouts_quick_add_core___lambda335__gtk_event_controller_focus_enter, self, 0);
	_tmp362_ = content_focus_controller;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp359_, (gpointer) ((guintptr) _tmp361_), (GObject*) _tmp362_);
	_tmp363_ = self->priv->signal_map;
	_tmp364_ = self->priv->description_textview;
	_tmp365_ = g_signal_connect_object (_tmp364_, "focus-in", (GCallback) __layouts_quick_add_core___lambda336__widgets_markdown_editor_focus_in, self, 0);
	_tmp366_ = self->priv->description_textview;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp363_, (gpointer) ((guintptr) _tmp365_), (GObject*) _tmp366_);
	_tmp367_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	_g_object_unref0 (self->priv->event_controller_key);
	self->priv->event_controller_key = _tmp367_;
	_tmp368_ = self->priv->event_controller_key;
	_tmp369_ = _g_object_ref0 ((GtkEventController*) _tmp368_);
	gtk_widget_add_controller (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp369_);
	_tmp370_ = self->priv->signal_map;
	_tmp371_ = self->priv->event_controller_key;
	_tmp372_ = g_signal_connect_object (_tmp371_, "key-pressed", (GCallback) __layouts_quick_add_core___lambda337__gtk_event_controller_key_key_pressed, self, 0);
	_tmp373_ = self->priv->event_controller_key;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp370_, (gpointer) ((guintptr) _tmp372_), (GObject*) _tmp373_);
	_tmp374_ = self->priv->signal_map;
	_tmp375_ = self->priv->event_controller_key;
	_tmp376_ = g_signal_connect_object (_tmp375_, "key-released", (GCallback) __layouts_quick_add_core___lambda338__gtk_event_controller_key_key_released, self, 0);
	_tmp377_ = self->priv->event_controller_key;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp374_, (gpointer) ((guintptr) _tmp376_), (GObject*) _tmp377_);
	_tmp378_ = self->priv->signal_map;
	_tmp379_ = self->priv->create_more_button;
	_tmp380_ = g_signal_connect_object (_tmp379_, "toggled", (GCallback) __layouts_quick_add_core___lambda339__gtk_toggle_button_toggled, self, 0);
	_tmp381_ = self->priv->create_more_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp378_, (gpointer) ((guintptr) _tmp380_), (GObject*) _tmp381_);
	_tmp382_ = self->priv->signal_map;
	_tmp383_ = self->priv->pin_button;
	_tmp384_ = g_signal_connect_object (_tmp383_, "changed", (GCallback) __layouts_quick_add_core___lambda341__widgets_pin_button_changed, self, 0);
	_tmp385_ = self->priv->pin_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp382_, (gpointer) ((guintptr) _tmp384_), (GObject*) _tmp385_);
	_tmp386_ = self->priv->signal_map;
	_tmp387_ = self->priv->item_labels;
	_tmp388_ = g_signal_connect_object (_tmp387_, "label-clicked", (GCallback) __layouts_quick_add_core___lambda343__widgets_item_labels_label_clicked, self, 0);
	_tmp389_ = self->priv->item_labels;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp386_, (gpointer) ((guintptr) _tmp388_), (GObject*) _tmp389_);
	_tmp390_ = gtk_shortcut_trigger_parse_string ("<Control>l");
	_tmp391_ = (GtkCallbackAction*) gtk_callback_action_new (__layouts_quick_add_core___lambda344__gtk_shortcut_func, g_object_ref (self), g_object_unref);
	_tmp392_ = gtk_shortcut_new (_tmp390_, (GtkShortcutAction*) _tmp391_);
	open_label_shortcut = _tmp392_;
	_tmp393_ = gtk_shortcut_trigger_parse_string ("<Control>r");
	_tmp394_ = (GtkCallbackAction*) gtk_callback_action_new (__layouts_quick_add_core___lambda345__gtk_shortcut_func, g_object_ref (self), g_object_unref);
	_tmp395_ = gtk_shortcut_new (_tmp393_, (GtkShortcutAction*) _tmp394_);
	open_reminder_shortcut = _tmp395_;
	_tmp396_ = gtk_shortcut_trigger_parse_string ("<Control>k");
	_tmp397_ = (GtkCallbackAction*) gtk_callback_action_new (__layouts_quick_add_core___lambda346__gtk_shortcut_func, g_object_ref (self), g_object_unref);
	_tmp398_ = gtk_shortcut_new (_tmp396_, (GtkShortcutAction*) _tmp397_);
	toggle_keep_adding_shortcut = _tmp398_;
	_tmp399_ = gtk_shortcut_trigger_parse_string ("<Control>d");
	_tmp400_ = (GtkCallbackAction*) gtk_callback_action_new (__layouts_quick_add_core___lambda347__gtk_shortcut_func, g_object_ref (self), g_object_unref);
	_tmp401_ = gtk_shortcut_new (_tmp399_, (GtkShortcutAction*) _tmp400_);
	open_schedule_shortcut = _tmp401_;
	_tmp402_ = (GtkShortcutController*) gtk_shortcut_controller_new ();
	_g_object_unref0 (self->priv->shortcut_controller);
	self->priv->shortcut_controller = _tmp402_;
	_tmp403_ = self->priv->shortcut_controller;
	_tmp404_ = open_label_shortcut;
	_tmp405_ = _g_object_ref0 (_tmp404_);
	gtk_shortcut_controller_add_shortcut (_tmp403_, _tmp405_);
	_tmp406_ = self->priv->shortcut_controller;
	_tmp407_ = open_reminder_shortcut;
	_tmp408_ = _g_object_ref0 (_tmp407_);
	gtk_shortcut_controller_add_shortcut (_tmp406_, _tmp408_);
	_tmp409_ = self->priv->shortcut_controller;
	_tmp410_ = toggle_keep_adding_shortcut;
	_tmp411_ = _g_object_ref0 (_tmp410_);
	gtk_shortcut_controller_add_shortcut (_tmp409_, _tmp411_);
	_tmp412_ = self->priv->shortcut_controller;
	_tmp413_ = open_schedule_shortcut;
	_tmp414_ = _g_object_ref0 (_tmp413_);
	gtk_shortcut_controller_add_shortcut (_tmp412_, _tmp414_);
	_tmp415_ = self->priv->shortcut_controller;
	_tmp416_ = _g_object_ref0 ((GtkEventController*) _tmp415_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp416_);
	_tmp417_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	_g_object_unref0 (self->priv->destroy_controller);
	self->priv->destroy_controller = _tmp417_;
	_tmp418_ = self->priv->destroy_controller;
	_tmp419_ = _g_object_ref0 ((GtkEventController*) _tmp418_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp419_);
	_tmp420_ = self->priv->signal_map;
	_tmp421_ = self->priv->destroy_controller;
	_tmp422_ = g_signal_connect_object (_tmp421_, "key-released", (GCallback) __layouts_quick_add_core___lambda348__gtk_event_controller_key_key_released, self, 0);
	_tmp423_ = self->priv->destroy_controller;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp420_, (gpointer) ((guintptr) _tmp422_), (GObject*) _tmp423_);
	_g_object_unref0 (open_schedule_shortcut);
	_g_object_unref0 (toggle_keep_adding_shortcut);
	_g_object_unref0 (open_reminder_shortcut);
	_g_object_unref0 (open_label_shortcut);
	_g_object_unref0 (content_focus_controller);
	_g_object_unref0 (click_gesture);
	_g_object_unref0 (added_box);
	_g_object_unref0 (warning_box);
	_g_object_unref0 (warning_label);
	_g_object_unref0 (warning_image);
	_g_object_unref0 (main_content);
	_g_object_unref0 (footer_content);
	_g_object_unref0 (submit_cancel_grid);
	_g_object_unref0 (quick_add_content);
	_g_object_unref0 (action_box_right);
	_g_object_unref0 (action_box);
	_g_object_unref0 (dates_box);
	_g_object_unref0 (content_box);
	_g_object_unref0 (info_icon);
	_g_object_unref0 (info_button);
	block7_data_unref (_data7_);
	_data7_ = NULL;
	return obj;
}

static void
layouts_quick_add_core_class_init (LayoutsQuickAddCoreClass * klass,
                                   gpointer klass_data)
{
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	layouts_quick_add_core_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &LayoutsQuickAddCore_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_layouts_quick_add_core_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_layouts_quick_add_core_set_property;
	G_OBJECT_CLASS (klass)->constructor = layouts_quick_add_core_constructor;
	G_OBJECT_CLASS (klass)->finalize = layouts_quick_add_core_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY] = g_param_spec_boolean ("is-window-quick-add", "is-window-quick-add", "is-window-quick-add", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY] = g_param_spec_object ("item", "item", "item", OBJECTS_TYPE_ITEM, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY] = g_param_spec_boolean ("ctrl-pressed", "ctrl-pressed", "ctrl-pressed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY] = g_param_spec_boolean ("shift-pressed", "shift-pressed", "shift-pressed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY] = g_param_spec_boolean ("labels-picker-activate-shortcut", "labels-picker-activate-shortcut", "labels-picker-activate-shortcut", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY] = g_param_spec_boolean ("project-picker-activate-shortcut", "project-picker-activate-shortcut", "project-picker-activate-shortcut", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY] = g_param_spec_boolean ("reminder-picker-activate-shortcut", "reminder-picker-activate-shortcut", "reminder-picker-activate-shortcut", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY] = g_param_spec_enum ("current-focus", "current-focus", "current-focus", LAYOUTS_QUICK_ADD_CORE_TYPE_FOCUSED_WIDGET, LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY] = g_param_spec_int ("position", "position", "position", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY] = g_param_spec_enum ("new-task-position", "new-task-position", "new-task-position", TYPE_NEW_TASK_POSITION, services_settings_get_new_task_position (_tmp1_), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY, layouts_quick_add_core_properties[LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY] = g_param_spec_boolean ("is-loading", "is-loading", "is-loading", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_HIDE_DESTROY_SIGNAL] = g_signal_new ("hide-destroy", LAYOUTS_TYPE_QUICK_ADD_CORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_SEND_INTERFACE_ID_SIGNAL] = g_signal_new ("send-interface-id", LAYOUTS_TYPE_QUICK_ADD_CORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_ADD_ITEM_DB_SIGNAL] = g_signal_new ("add-item-db", LAYOUTS_TYPE_QUICK_ADD_CORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, OBJECTS_TYPE_ITEM, GEE_TYPE_ARRAY_LIST);
	layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_ERROR_SIGNAL] = g_signal_new ("error", LAYOUTS_TYPE_QUICK_ADD_CORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__HTTP_RESPONSE, G_TYPE_NONE, 1, TYPE_HTTP_RESPONSE);
	layouts_quick_add_core_signals[LAYOUTS_QUICK_ADD_CORE_PARENT_CAN_CLOSE_SIGNAL] = g_signal_new ("parent-can-close", LAYOUTS_TYPE_QUICK_ADD_CORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
}

static void
layouts_quick_add_core_instance_init (LayoutsQuickAddCore * self,
                                      gpointer klass)
{
	gchar* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	gchar* _tmp3_;
	ServicesSettings* _tmp4_;
	ServicesSettings* _tmp5_;
	self->priv = layouts_quick_add_core_get_instance_private (self);
	self->priv->labels_popover_handling_esc = FALSE;
	self->priv->labels_selection_in_progress = FALSE;
	self->priv->_ctrl_pressed = FALSE;
	self->priv->_shift_pressed = FALSE;
	self->priv->_labels_picker_activate_shortcut = FALSE;
	self->priv->_project_picker_activate_shortcut = FALSE;
	self->priv->_reminder_picker_activate_shortcut = FALSE;
	self->priv->_shift_enter_used = FALSE;
	self->priv->_current_focus = LAYOUTS_QUICK_ADD_CORE_FOCUSED_WIDGET_CONTENT_ENTRY;
	self->priv->preserved_duedate = NULL;
	self->priv->forced_duedate = NULL;
	self->priv->preserved_pinned = FALSE;
	self->priv->preserved_priority = CONSTANTS_PRIORITY_4;
	self->priv->preserved_labels = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->preserved_deadline = _tmp0_;
	self->priv->restoring_labels = FALSE;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_REGEX, (GBoxedCopyFunc) g_regex_ref, (GDestroyNotify) g_regex_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->shortcuts_regex_map = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_ULONG, NULL, NULL, G_TYPE_OBJECT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->signal_map = _tmp2_;
	self->priv->date_detection_timeout_id = (guint) 0;
	_tmp3_ = g_strdup ("");
	self->priv->last_detected_date_text = _tmp3_;
	self->priv->date_auto_detection_enabled = TRUE;
	self->priv->_position = -1;
	_tmp4_ = services_settings_get_default ();
	_tmp5_ = _tmp4_;
	self->priv->_new_task_position = services_settings_get_new_task_position (_tmp5_);
	_g_object_unref0 (_tmp5_);
}

static void
layouts_quick_add_core_finalize (GObject * obj)
{
	LayoutsQuickAddCore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LAYOUTS_TYPE_QUICK_ADD_CORE, LayoutsQuickAddCore);
	g_debug ("QuickAddCore.vala:118: Destroying - Layouts.QuickAddCore\n");
	_g_object_unref0 (self->priv->_item);
	_g_object_unref0 (self->priv->content_entry);
	_g_object_unref0 (self->priv->submit_button);
	_g_object_unref0 (self->priv->description_textview);
	_g_object_unref0 (self->priv->description_scrolled);
	_g_object_unref0 (self->priv->item_labels);
	_g_object_unref0 (self->priv->project_picker_button);
	_g_object_unref0 (self->priv->schedule_button);
	_g_object_unref0 (self->priv->priority_button);
	_g_object_unref0 (self->priv->reminder_button);
	_g_object_unref0 (self->priv->deadline_button);
	_g_object_unref0 (self->priv->deadline_button_detail);
	_g_object_unref0 (self->priv->label_button);
	_g_object_unref0 (self->priv->pin_button);
	_g_object_unref0 (self->priv->added_image);
	_g_object_unref0 (self->priv->main_stack);
	_g_object_unref0 (self->priv->create_more_button);
	_g_object_unref0 (self->priv->info_revealer);
	_g_object_unref0 (self->priv->animation_overlay);
	_g_object_unref0 (self->priv->animation_container);
	_g_object_unref0 (self->priv->headerbar);
	_g_object_unref0 (self->priv->success_label);
	_g_object_unref0 (self->priv->labels_quick_picker);
	_g_object_unref0 (self->priv->preserved_duedate);
	_g_object_unref0 (self->priv->forced_duedate);
	_g_object_unref0 (self->priv->preserved_labels);
	_g_free0 (self->priv->preserved_deadline);
	_g_object_unref0 (self->priv->shortcuts_regex_map);
	_g_object_unref0 (self->priv->signal_map);
	_g_object_unref0 (self->priv->destroy_controller);
	_g_object_unref0 (self->priv->content_controller_key);
	_g_object_unref0 (self->priv->event_controller_key);
	_g_object_unref0 (self->priv->shortcut_controller);
	_g_free0 (self->priv->last_detected_date_text);
	_g_object_unref0 (self->priv->chrono);
	G_OBJECT_CLASS (layouts_quick_add_core_parent_class)->finalize (obj);
}

static GType
layouts_quick_add_core_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LayoutsQuickAddCoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) layouts_quick_add_core_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LayoutsQuickAddCore), 0, (GInstanceInitFunc) layouts_quick_add_core_instance_init, NULL };
	GType layouts_quick_add_core_type_id;
	layouts_quick_add_core_type_id = g_type_register_static (adw_bin_get_type (), "LayoutsQuickAddCore", &g_define_type_info, 0);
	LayoutsQuickAddCore_private_offset = g_type_add_instance_private (layouts_quick_add_core_type_id, sizeof (LayoutsQuickAddCorePrivate));
	return layouts_quick_add_core_type_id;
}

GType
layouts_quick_add_core_get_type (void)
{
	static volatile gsize layouts_quick_add_core_type_id__once = 0;
	if (g_once_init_enter (&layouts_quick_add_core_type_id__once)) {
		GType layouts_quick_add_core_type_id;
		layouts_quick_add_core_type_id = layouts_quick_add_core_get_type_once ();
		g_once_init_leave (&layouts_quick_add_core_type_id__once, layouts_quick_add_core_type_id);
	}
	return layouts_quick_add_core_type_id__once;
}

static void
_vala_layouts_quick_add_core_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	LayoutsQuickAddCore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_QUICK_ADD_CORE, LayoutsQuickAddCore);
	switch (property_id) {
		case LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_is_window_quick_add (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY:
		g_value_set_object (value, layouts_quick_add_core_get_item (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_ctrl_pressed (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_shift_pressed (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_labels_picker_activate_shortcut (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_project_picker_activate_shortcut (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_reminder_picker_activate_shortcut (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY:
		g_value_set_enum (value, layouts_quick_add_core_get_current_focus (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY:
		g_value_set_int (value, layouts_quick_add_core_get_position (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY:
		g_value_set_enum (value, layouts_quick_add_core_get_new_task_position (self));
		break;
		case LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY:
		g_value_set_boolean (value, layouts_quick_add_core_get_is_loading (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_layouts_quick_add_core_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	LayoutsQuickAddCore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, LAYOUTS_TYPE_QUICK_ADD_CORE, LayoutsQuickAddCore);
	switch (property_id) {
		case LAYOUTS_QUICK_ADD_CORE_IS_WINDOW_QUICK_ADD_PROPERTY:
		layouts_quick_add_core_set_is_window_quick_add (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_ITEM_PROPERTY:
		layouts_quick_add_core_set_item (self, g_value_get_object (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_CTRL_PRESSED_PROPERTY:
		layouts_quick_add_core_set_ctrl_pressed (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_SHIFT_PRESSED_PROPERTY:
		layouts_quick_add_core_set_shift_pressed (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_LABELS_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		layouts_quick_add_core_set_labels_picker_activate_shortcut (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_PROJECT_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		layouts_quick_add_core_set_project_picker_activate_shortcut (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_REMINDER_PICKER_ACTIVATE_SHORTCUT_PROPERTY:
		layouts_quick_add_core_set_reminder_picker_activate_shortcut (self, g_value_get_boolean (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_CURRENT_FOCUS_PROPERTY:
		layouts_quick_add_core_set_current_focus (self, g_value_get_enum (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_POSITION_PROPERTY:
		layouts_quick_add_core_set_position (self, g_value_get_int (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_NEW_TASK_POSITION_PROPERTY:
		layouts_quick_add_core_set_new_task_position (self, g_value_get_enum (value));
		break;
		case LAYOUTS_QUICK_ADD_CORE_IS_LOADING_PROPERTY:
		layouts_quick_add_core_set_is_loading (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

