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

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

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

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

#define DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE (dialogs_preferences_pages_base_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePage))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))

typedef struct _DialogsPreferencesPagesBasePage DialogsPreferencesPagesBasePage;
typedef struct _DialogsPreferencesPagesBasePageClass DialogsPreferencesPagesBasePageClass;
typedef struct _DialogsPreferencesPagesBasePagePrivate DialogsPreferencesPagesBasePagePrivate;

#define DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD (dialogs_preferences_pages_quick_add_get_type ())
#define DIALOGS_PREFERENCES_PAGES_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, DialogsPreferencesPagesQuickAdd))
#define DIALOGS_PREFERENCES_PAGES_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, DialogsPreferencesPagesQuickAddClass))
#define DIALOGS_PREFERENCES_PAGES_IS_QUICK_ADD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD))
#define DIALOGS_PREFERENCES_PAGES_IS_QUICK_ADD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD))
#define DIALOGS_PREFERENCES_PAGES_QUICK_ADD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, DialogsPreferencesPagesQuickAddClass))

typedef struct _DialogsPreferencesPagesQuickAdd DialogsPreferencesPagesQuickAdd;
typedef struct _DialogsPreferencesPagesQuickAddClass DialogsPreferencesPagesQuickAddClass;
typedef struct _DialogsPreferencesPagesQuickAddPrivate DialogsPreferencesPagesQuickAddPrivate;
enum  {
	DIALOGS_PREFERENCES_PAGES_QUICK_ADD_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_QUICK_ADD_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_quick_add_properties[DIALOGS_PREFERENCES_PAGES_QUICK_ADD_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block105Data Block105Data;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _DialogsPreferencesPagesBasePage {
	AdwNavigationPage parent_instance;
	DialogsPreferencesPagesBasePagePrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesBasePageClass {
	AdwNavigationPageClass parent_class;
	void (*clean_up) (DialogsPreferencesPagesBasePage* self);
};

struct _DialogsPreferencesPagesQuickAdd {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesQuickAddPrivate * priv;
};

struct _DialogsPreferencesPagesQuickAddClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _Block105Data {
	int _ref_count_;
	DialogsPreferencesPagesQuickAdd* self;
	gchar* quick_add_command;
	GtkSwitch* save_last_switch;
	GtkSwitch* keep_properties_switch;
};

static gpointer dialogs_preferences_pages_quick_add_parent_class = NULL;

VALA_EXTERN GType dialogs_preferences_pages_base_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBasePage, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_quick_add_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesQuickAdd, g_object_unref)
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesQuickAdd* dialogs_preferences_pages_quick_add_new (AdwPreferencesDialog* preferences_dialog);
VALA_EXTERN DialogsPreferencesPagesQuickAdd* dialogs_preferences_pages_quick_add_construct (GType object_type,
                                                                                AdwPreferencesDialog* preferences_dialog);
static void dialogs_preferences_pages_quick_add_real_clean_up (DialogsPreferencesPagesBasePage* base);
static GObject * dialogs_preferences_pages_quick_add_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties);
static Block105Data* block105_data_ref (Block105Data* _data105_);
static void block105_data_unref (void * _userdata_);
static void _dialogs_preferences_pages_quick_add___lambda420_ (Block105Data* _data105_);
VALA_EXTERN void dialogs_preferences_pages_base_page_popup_toast (DialogsPreferencesPagesBasePage* self,
                                                      const gchar* message);
static void __dialogs_preferences_pages_quick_add___lambda420__gtk_button_clicked (GtkButton* _sender,
                                                                            gpointer self);
static void _dialogs_preferences_pages_quick_add___lambda421_ (Block105Data* _data105_);
static void __dialogs_preferences_pages_quick_add___lambda421__g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void _dialogs_preferences_pages_quick_add___lambda422_ (Block105Data* _data105_);
static void __dialogs_preferences_pages_quick_add___lambda422__g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void _dialogs_preferences_pages_quick_add___lambda423_ (DialogsPreferencesPagesQuickAdd* self);
static void __dialogs_preferences_pages_quick_add___lambda423__gtk_widget_destroy (GtkWidget* _sender,
                                                                            gpointer self);
static void dialogs_preferences_pages_quick_add_finalize (GObject * obj);
static GType dialogs_preferences_pages_quick_add_get_type_once (void);

DialogsPreferencesPagesQuickAdd*
dialogs_preferences_pages_quick_add_construct (GType object_type,
                                               AdwPreferencesDialog* preferences_dialog)
{
	DialogsPreferencesPagesQuickAdd * self = NULL;
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	self = (DialogsPreferencesPagesQuickAdd*) g_object_new (object_type, "preferences-dialog", preferences_dialog, "title", _ ("Quick Add"), NULL);
	return self;
}

DialogsPreferencesPagesQuickAdd*
dialogs_preferences_pages_quick_add_new (AdwPreferencesDialog* preferences_dialog)
{
	return dialogs_preferences_pages_quick_add_construct (DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, preferences_dialog);
}

static void
dialogs_preferences_pages_quick_add_real_clean_up (DialogsPreferencesPagesBasePage* base)
{
	DialogsPreferencesPagesQuickAdd * self;
	GeeHashMap* _tmp15_;
	self = (DialogsPreferencesPagesQuickAdd*) base;
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = ((DialogsPreferencesPagesBasePage*) self)->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_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp15_);
}

static Block105Data*
block105_data_ref (Block105Data* _data105_)
{
	g_atomic_int_inc (&_data105_->_ref_count_);
	return _data105_;
}

static void
block105_data_unref (void * _userdata_)
{
	Block105Data* _data105_;
	_data105_ = (Block105Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data105_->_ref_count_)) {
		DialogsPreferencesPagesQuickAdd* self;
		self = _data105_->self;
		_g_object_unref0 (_data105_->keep_properties_switch);
		_g_object_unref0 (_data105_->save_last_switch);
		_g_free0 (_data105_->quick_add_command);
		_g_object_unref0 (self);
		g_slice_free (Block105Data, _data105_);
	}
}

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

static void
_dialogs_preferences_pages_quick_add___lambda420_ (Block105Data* _data105_)
{
	DialogsPreferencesPagesQuickAdd* self;
	GdkClipboard* clipboard = NULL;
	GdkDisplay* _tmp0_;
	GdkClipboard* _tmp1_;
	GdkClipboard* _tmp2_;
	GdkClipboard* _tmp3_;
	const gchar* _tmp4_;
	self = _data105_->self;
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = gdk_display_get_clipboard (_tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	clipboard = _tmp2_;
	_tmp3_ = clipboard;
	_tmp4_ = _data105_->quick_add_command;
	gdk_clipboard_set_text (_tmp3_, _tmp4_);
	dialogs_preferences_pages_base_page_popup_toast ((DialogsPreferencesPagesBasePage*) self, _ ("The command was copied to the clipboard"));
	_g_object_unref0 (clipboard);
}

static void
__dialogs_preferences_pages_quick_add___lambda420__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self)
{
	_dialogs_preferences_pages_quick_add___lambda420_ (self);
}

static void
_dialogs_preferences_pages_quick_add___lambda421_ (Block105Data* _data105_)
{
	DialogsPreferencesPagesQuickAdd* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	GtkSwitch* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = _data105_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data105_->save_last_switch;
	_tmp4_ = gtk_switch_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_boolean (_tmp2_, "quick-add-save-last-project", _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_quick_add___lambda421__g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_quick_add___lambda421_ (self);
}

static void
_dialogs_preferences_pages_quick_add___lambda422_ (Block105Data* _data105_)
{
	DialogsPreferencesPagesQuickAdd* self;
	ServicesSettings* _tmp0_;
	ServicesSettings* _tmp1_;
	GSettings* _tmp2_;
	GtkSwitch* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	self = _data105_->self;
	_tmp0_ = services_settings_get_default ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->settings;
	_tmp3_ = _data105_->keep_properties_switch;
	_tmp4_ = gtk_switch_get_active (_tmp3_);
	_tmp5_ = _tmp4_;
	g_settings_set_boolean (_tmp2_, "quick-add-keep-properties", _tmp5_);
	_g_object_unref0 (_tmp1_);
}

static void
__dialogs_preferences_pages_quick_add___lambda422__g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	_dialogs_preferences_pages_quick_add___lambda422_ (self);
}

static void
_dialogs_preferences_pages_quick_add___lambda423_ (DialogsPreferencesPagesQuickAdd* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_quick_add___lambda423__gtk_widget_destroy (GtkWidget* _sender,
                                                                       gpointer self)
{
	_dialogs_preferences_pages_quick_add___lambda423_ ((DialogsPreferencesPagesQuickAdd*) self);
}

static GObject *
dialogs_preferences_pages_quick_add_constructor (GType type,
                                                 guint n_construct_properties,
                                                 GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesQuickAdd * self;
	Block105Data* _data105_;
	gchar* _tmp0_;
	GtkLabel* description_label = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkLabel* description2_label = NULL;
	GtkLabel* _tmp2_ = NULL;
	GtkButton* copy_button = NULL;
	GtkButton* _tmp3_ = NULL;
	GtkButton* _tmp4_;
	AdwActionRow* command_entry = NULL;
	AdwActionRow* _tmp5_;
	AdwActionRow* _tmp6_;
	GtkButton* _tmp7_;
	AdwActionRow* _tmp8_;
	const gchar* _tmp9_;
	AdwActionRow* _tmp10_;
	AdwActionRow* _tmp11_;
	AdwActionRow* _tmp12_;
	AdwPreferencesGroup* command_group = NULL;
	AdwPreferencesGroup* _tmp13_ = NULL;
	AdwPreferencesGroup* _tmp14_;
	AdwActionRow* _tmp15_;
	AdwPreferencesGroup* settings_group = NULL;
	AdwPreferencesGroup* _tmp16_;
	AdwPreferencesGroup* _tmp17_;
	ServicesSettings* _tmp18_;
	ServicesSettings* _tmp19_;
	GSettings* _tmp20_;
	GtkSwitch* _tmp21_ = NULL;
	GtkSwitch* _tmp22_;
	AdwActionRow* save_last_row = NULL;
	AdwActionRow* _tmp23_;
	AdwActionRow* _tmp24_;
	AdwActionRow* _tmp25_;
	AdwActionRow* _tmp26_;
	GtkSwitch* _tmp27_;
	AdwActionRow* _tmp28_;
	GtkSwitch* _tmp29_;
	ServicesSettings* _tmp30_;
	ServicesSettings* _tmp31_;
	GSettings* _tmp32_;
	GtkSwitch* _tmp33_ = NULL;
	GtkSwitch* _tmp34_;
	AdwActionRow* keep_properties_row = NULL;
	AdwActionRow* _tmp35_;
	AdwActionRow* _tmp36_;
	AdwActionRow* _tmp37_;
	AdwActionRow* _tmp38_;
	GtkSwitch* _tmp39_;
	AdwActionRow* _tmp40_;
	GtkSwitch* _tmp41_;
	AdwPreferencesGroup* _tmp42_;
	AdwActionRow* _tmp43_;
	AdwPreferencesGroup* _tmp44_;
	AdwActionRow* _tmp45_;
	GtkBox* content_box = NULL;
	GtkBox* _tmp46_ = NULL;
	GtkBox* _tmp47_;
	GtkLabel* _tmp48_;
	GtkBox* _tmp49_;
	GtkLabel* _tmp50_;
	GtkBox* _tmp51_;
	AdwPreferencesGroup* _tmp52_;
	GtkBox* _tmp53_;
	AdwPreferencesGroup* _tmp54_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp55_;
	AdwToolbarView* _tmp56_;
	AdwHeaderBar* _tmp57_;
	AdwHeaderBar* _tmp58_;
	AdwToolbarView* _tmp59_;
	GtkBox* _tmp60_;
	AdwToolbarView* _tmp61_;
	GeeHashMap* _tmp62_;
	GtkButton* _tmp63_;
	gulong _tmp64_;
	GtkButton* _tmp65_;
	GeeHashMap* _tmp66_;
	GtkSwitch* _tmp67_;
	gulong _tmp68_;
	GtkSwitch* _tmp69_;
	GeeHashMap* _tmp70_;
	GtkSwitch* _tmp71_;
	gulong _tmp72_;
	GtkSwitch* _tmp73_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_quick_add_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, DialogsPreferencesPagesQuickAdd);
	_data105_ = g_slice_new0 (Block105Data);
	_data105_->_ref_count_ = 1;
	_data105_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("io.github.alainm23.planify.quick-add");
	_data105_->quick_add_command = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (_ ("Use Quick Add to create to-dos from anywhere on your desktop with just" \
" a few keystrokes. You don’t even have to leave the app you’re current" \
"ly in."));
	gtk_label_set_justify (_tmp1_, GTK_JUSTIFY_FILL);
	gtk_label_set_use_markup (_tmp1_, TRUE);
	gtk_label_set_wrap (_tmp1_, TRUE);
	gtk_label_set_xalign (_tmp1_, (gfloat) 0);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp1_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp1_, 3);
	g_object_ref_sink (_tmp1_);
	description_label = _tmp1_;
	_tmp2_ = (GtkLabel*) gtk_label_new (_ ("Head to System Settings → Keyboard → Shortcuts → Custom, then add a ne" \
"w shortcut with the following:"));
	gtk_label_set_justify (_tmp2_, GTK_JUSTIFY_FILL);
	gtk_label_set_use_markup (_tmp2_, TRUE);
	gtk_label_set_wrap (_tmp2_, TRUE);
	gtk_label_set_xalign (_tmp2_, (gfloat) 0);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp2_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp2_, 3);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp2_, 3);
	g_object_ref_sink (_tmp2_);
	description2_label = _tmp2_;
	_tmp3_ = (GtkButton*) gtk_button_new_from_icon_name ("edit-copy-symbolic");
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp3_);
	copy_button = _tmp3_;
	_tmp4_ = copy_button;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "flat");
	_tmp5_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp5_);
	command_entry = _tmp5_;
	_tmp6_ = command_entry;
	_tmp7_ = copy_button;
	adw_action_row_add_suffix (_tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = command_entry;
	_tmp9_ = _data105_->quick_add_command;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp8_, _tmp9_);
	_tmp10_ = command_entry;
	gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "caption");
	_tmp11_ = command_entry;
	gtk_widget_add_css_class ((GtkWidget*) _tmp11_, "monospace");
	_tmp12_ = command_entry;
	gtk_widget_add_css_class ((GtkWidget*) _tmp12_, "property");
	_tmp13_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp13_, 12);
	g_object_ref_sink (_tmp13_);
	command_group = _tmp13_;
	_tmp14_ = command_group;
	_tmp15_ = command_entry;
	adw_preferences_group_add (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp16_);
	settings_group = _tmp16_;
	_tmp17_ = settings_group;
	adw_preferences_group_set_title (_tmp17_, _ ("Settings"));
	_tmp18_ = services_settings_get_default ();
	_tmp19_ = _tmp18_;
	_tmp20_ = _tmp19_->settings;
	_tmp21_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp21_, GTK_ALIGN_CENTER);
	gtk_switch_set_active (_tmp21_, g_settings_get_boolean (_tmp20_, "quick-add-save-last-project"));
	g_object_ref_sink (_tmp21_);
	_tmp22_ = _tmp21_;
	_g_object_unref0 (_tmp19_);
	_data105_->save_last_switch = _tmp22_;
	_tmp23_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp23_);
	save_last_row = _tmp23_;
	_tmp24_ = save_last_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp24_, _ ("Save Last Selected Project"));
	_tmp25_ = save_last_row;
	adw_action_row_set_subtitle (_tmp25_, _ ("If unchecked, the default project selected is Inbox"));
	_tmp26_ = save_last_row;
	_tmp27_ = _data105_->save_last_switch;
	adw_action_row_set_activatable_widget (_tmp26_, (GtkWidget*) _tmp27_);
	_tmp28_ = save_last_row;
	_tmp29_ = _data105_->save_last_switch;
	adw_action_row_add_suffix (_tmp28_, (GtkWidget*) _tmp29_);
	_tmp30_ = services_settings_get_default ();
	_tmp31_ = _tmp30_;
	_tmp32_ = _tmp31_->settings;
	_tmp33_ = (GtkSwitch*) gtk_switch_new ();
	gtk_widget_set_valign ((GtkWidget*) _tmp33_, GTK_ALIGN_CENTER);
	gtk_switch_set_active (_tmp33_, g_settings_get_boolean (_tmp32_, "quick-add-keep-properties"));
	g_object_ref_sink (_tmp33_);
	_tmp34_ = _tmp33_;
	_g_object_unref0 (_tmp31_);
	_data105_->keep_properties_switch = _tmp34_;
	_tmp35_ = (AdwActionRow*) adw_action_row_new ();
	g_object_ref_sink (_tmp35_);
	keep_properties_row = _tmp35_;
	_tmp36_ = keep_properties_row;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp36_, _ ("Keep Task Properties"));
	_tmp37_ = keep_properties_row;
	adw_action_row_set_subtitle (_tmp37_, _ ("When 'Keep adding' is enabled, preserve date, labels, and pinned statu" \
"s"));
	_tmp38_ = keep_properties_row;
	_tmp39_ = _data105_->keep_properties_switch;
	adw_action_row_set_activatable_widget (_tmp38_, (GtkWidget*) _tmp39_);
	_tmp40_ = keep_properties_row;
	_tmp41_ = _data105_->keep_properties_switch;
	adw_action_row_add_suffix (_tmp40_, (GtkWidget*) _tmp41_);
	_tmp42_ = settings_group;
	_tmp43_ = save_last_row;
	adw_preferences_group_add (_tmp42_, (GtkWidget*) _tmp43_);
	_tmp44_ = settings_group;
	_tmp45_ = keep_properties_row;
	adw_preferences_group_add (_tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp46_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp46_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp46_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp46_, 12);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp46_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp46_, 12);
	g_object_ref_sink (_tmp46_);
	content_box = _tmp46_;
	_tmp47_ = content_box;
	_tmp48_ = description_label;
	gtk_box_append (_tmp47_, (GtkWidget*) _tmp48_);
	_tmp49_ = content_box;
	_tmp50_ = description2_label;
	gtk_box_append (_tmp49_, (GtkWidget*) _tmp50_);
	_tmp51_ = content_box;
	_tmp52_ = command_group;
	gtk_box_append (_tmp51_, (GtkWidget*) _tmp52_);
	_tmp53_ = content_box;
	_tmp54_ = settings_group;
	gtk_box_append (_tmp53_, (GtkWidget*) _tmp54_);
	_tmp55_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp55_);
	toolbar_view = _tmp55_;
	_tmp56_ = toolbar_view;
	_tmp57_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp57_);
	_tmp58_ = _tmp57_;
	adw_toolbar_view_add_top_bar (_tmp56_, (GtkWidget*) _tmp58_);
	_g_object_unref0 (_tmp58_);
	_tmp59_ = toolbar_view;
	_tmp60_ = content_box;
	adw_toolbar_view_set_content (_tmp59_, (GtkWidget*) _tmp60_);
	_tmp61_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp61_);
	_tmp62_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp63_ = copy_button;
	_tmp64_ = g_signal_connect_data (_tmp63_, "clicked", (GCallback) __dialogs_preferences_pages_quick_add___lambda420__gtk_button_clicked, block105_data_ref (_data105_), (GClosureNotify) block105_data_unref, 0);
	_tmp65_ = copy_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp62_, (gpointer) ((guintptr) _tmp64_), (GObject*) _tmp65_);
	_tmp66_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp67_ = _data105_->save_last_switch;
	_tmp68_ = g_signal_connect_data ((GObject*) _tmp67_, "notify::active", (GCallback) __dialogs_preferences_pages_quick_add___lambda421__g_object_notify, block105_data_ref (_data105_), (GClosureNotify) block105_data_unref, 0);
	_tmp69_ = _data105_->save_last_switch;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp66_, (gpointer) ((guintptr) _tmp68_), (GObject*) _tmp69_);
	_tmp70_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp71_ = _data105_->keep_properties_switch;
	_tmp72_ = g_signal_connect_data ((GObject*) _tmp71_, "notify::active", (GCallback) __dialogs_preferences_pages_quick_add___lambda422__g_object_notify, block105_data_ref (_data105_), (GClosureNotify) block105_data_unref, 0);
	_tmp73_ = _data105_->keep_properties_switch;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp70_, (gpointer) ((guintptr) _tmp72_), (GObject*) _tmp73_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_quick_add___lambda423__gtk_widget_destroy, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_box);
	_g_object_unref0 (keep_properties_row);
	_g_object_unref0 (save_last_row);
	_g_object_unref0 (settings_group);
	_g_object_unref0 (command_group);
	_g_object_unref0 (command_entry);
	_g_object_unref0 (copy_button);
	_g_object_unref0 (description2_label);
	_g_object_unref0 (description_label);
	block105_data_unref (_data105_);
	_data105_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_quick_add_class_init (DialogsPreferencesPagesQuickAddClass * klass,
                                                gpointer klass_data)
{
	dialogs_preferences_pages_quick_add_parent_class = g_type_class_peek_parent (klass);
	((DialogsPreferencesPagesBasePageClass *) klass)->clean_up = (void (*) (DialogsPreferencesPagesBasePage*)) dialogs_preferences_pages_quick_add_real_clean_up;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_quick_add_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_quick_add_finalize;
}

static void
dialogs_preferences_pages_quick_add_instance_init (DialogsPreferencesPagesQuickAdd * self,
                                                   gpointer klass)
{
}

static void
dialogs_preferences_pages_quick_add_finalize (GObject * obj)
{
	DialogsPreferencesPagesQuickAdd * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_QUICK_ADD, DialogsPreferencesPagesQuickAdd);
	g_debug ("QuickAdd.vala:31: Destroying - Dialogs.Preferences.Pages.QuickAdd\n");
	G_OBJECT_CLASS (dialogs_preferences_pages_quick_add_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_quick_add_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesQuickAddClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_quick_add_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesQuickAdd), 0, (GInstanceInitFunc) dialogs_preferences_pages_quick_add_instance_init, NULL };
	GType dialogs_preferences_pages_quick_add_type_id;
	dialogs_preferences_pages_quick_add_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesQuickAdd", &g_define_type_info, 0);
	return dialogs_preferences_pages_quick_add_type_id;
}

GType
dialogs_preferences_pages_quick_add_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_quick_add_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_quick_add_type_id__once)) {
		GType dialogs_preferences_pages_quick_add_type_id;
		dialogs_preferences_pages_quick_add_type_id = dialogs_preferences_pages_quick_add_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_quick_add_type_id__once, dialogs_preferences_pages_quick_add_type_id);
	}
	return dialogs_preferences_pages_quick_add_type_id__once;
}

