/* contacts-contact-editor.c generated by valac 0.24.0, the Vala compiler
 * generated from contacts-contact-editor.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
 * Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
 *
 * 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 2 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, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <atk/atk.h>
#include <glib/gi18n-lib.h>


#define CONTACTS_TYPE_ADDRESS_EDITOR (contacts_address_editor_get_type ())
#define CONTACTS_ADDRESS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditor))
#define CONTACTS_ADDRESS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditorClass))
#define CONTACTS_IS_ADDRESS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_ADDRESS_EDITOR))
#define CONTACTS_IS_ADDRESS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_ADDRESS_EDITOR))
#define CONTACTS_ADDRESS_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditorClass))

typedef struct _ContactsAddressEditor ContactsAddressEditor;
typedef struct _ContactsAddressEditorClass ContactsAddressEditorClass;
typedef struct _ContactsAddressEditorPrivate ContactsAddressEditorPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define CONTACTS_TYPE_CONTACT_EDITOR (contacts_contact_editor_get_type ())
#define CONTACTS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor))
#define CONTACTS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorClass))
#define CONTACTS_IS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_EDITOR))
#define CONTACTS_IS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_EDITOR))
#define CONTACTS_CONTACT_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorClass))

typedef struct _ContactsContactEditor ContactsContactEditor;
typedef struct _ContactsContactEditorClass ContactsContactEditorClass;
typedef struct _ContactsContactEditorPrivate ContactsContactEditorPrivate;

#define CONTACTS_TYPE_CONTACT (contacts_contact_get_type ())
#define CONTACTS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT, ContactsContact))
#define CONTACTS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT, ContactsContactClass))
#define CONTACTS_IS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT))
#define CONTACTS_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT))
#define CONTACTS_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT, ContactsContactClass))

typedef struct _ContactsContact ContactsContact;
typedef struct _ContactsContactClass ContactsContactClass;

#define CONTACTS_CONTACT_EDITOR_TYPE_FIELD (contacts_contact_editor_field_get_type ())

#define CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA (contacts_contact_editor_row_data_get_type ())
typedef struct _ContactsContactEditorRowData ContactsContactEditorRowData;
typedef struct _ContactsContactEditorField ContactsContactEditorField;

#define CONTACTS_TYPE_TYPECOMBO (contacts_typecombo_get_type ())
#define CONTACTS_TYPECOMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_TYPECOMBO, ContactsTypeCombo))
#define CONTACTS_TYPECOMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_TYPECOMBO, ContactsTypeComboClass))
#define CONTACTS_IS_TYPECOMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_TYPECOMBO))
#define CONTACTS_IS_TYPECOMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_TYPECOMBO))
#define CONTACTS_TYPECOMBO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_TYPECOMBO, ContactsTypeComboClass))

typedef struct _ContactsTypeCombo ContactsTypeCombo;
typedef struct _ContactsTypeComboClass ContactsTypeComboClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

#define CONTACTS_TYPE_TYPESET (contacts_typeset_get_type ())
#define CONTACTS_TYPESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_TYPESET, ContactsTypeSet))
#define CONTACTS_TYPESET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_TYPESET, ContactsTypeSetClass))
#define CONTACTS_IS_TYPESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_TYPESET))
#define CONTACTS_IS_TYPESET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_TYPESET))
#define CONTACTS_TYPESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_TYPESET, ContactsTypeSetClass))

typedef struct _ContactsTypeSet ContactsTypeSet;
typedef struct _ContactsTypeSetClass ContactsTypeSetClass;
typedef struct _Block16Data Block16Data;
typedef struct _Block17Data Block17Data;
typedef struct _Block18Data Block18Data;
typedef struct _Block19Data Block19Data;
typedef struct _Block20Data Block20Data;
#define _contacts_contact_editor_field_free0(var) ((var == NULL) ? NULL : (var = (contacts_contact_editor_field_free (var), NULL)))
#define _contacts_contact_editor_row_data_free0(var) ((var == NULL) ? NULL : (var = (contacts_contact_editor_row_data_free (var), NULL)))

#define CONTACTS_TYPE_CONTACT_FRAME (contacts_contact_frame_get_type ())
#define CONTACTS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrame))
#define CONTACTS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))
#define CONTACTS_IS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_FRAME))
#define CONTACTS_IS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_FRAME))
#define CONTACTS_CONTACT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))

typedef struct _ContactsContactFrame ContactsContactFrame;
typedef struct _ContactsContactFrameClass ContactsContactFrameClass;
typedef struct _Block21Data Block21Data;
typedef struct _ContactsContactPrivate ContactsContactPrivate;

#define CONTACTS_TYPE_STORE (contacts_store_get_type ())
#define CONTACTS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_STORE, ContactsStore))
#define CONTACTS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_STORE, ContactsStoreClass))
#define CONTACTS_IS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_STORE))
#define CONTACTS_IS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_STORE))
#define CONTACTS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_STORE, ContactsStoreClass))

typedef struct _ContactsStore ContactsStore;
typedef struct _ContactsStoreClass ContactsStoreClass;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))

#define CONTACTS_CONTACT_EDITOR_TYPE_PROPERTY_DATA (contacts_contact_editor_property_data_get_type ())
typedef struct _ContactsContactEditorPropertyData ContactsContactEditorPropertyData;

#define CONTACTS_TYPE_FAKE_PERSONA (contacts_fake_persona_get_type ())
#define CONTACTS_FAKE_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersona))
#define CONTACTS_FAKE_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersonaClass))
#define CONTACTS_IS_FAKE_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_FAKE_PERSONA))
#define CONTACTS_IS_FAKE_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_FAKE_PERSONA))
#define CONTACTS_FAKE_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersonaClass))

typedef struct _ContactsFakePersona ContactsFakePersona;
typedef struct _ContactsFakePersonaClass ContactsFakePersonaClass;

struct _ContactsAddressEditor {
	GtkBox parent_instance;
	ContactsAddressEditorPrivate * priv;
	GtkEntry* entries[7];
	FolksPostalAddressFieldDetails* details;
};

struct _ContactsAddressEditorClass {
	GtkBoxClass parent_class;
};

struct _ContactsContactEditor {
	GtkGrid parent_instance;
	ContactsContactEditorPrivate * priv;
};

struct _ContactsContactEditorClass {
	GtkGridClass parent_class;
};

struct _ContactsContactEditorRowData {
	FolksAbstractFieldDetails* details;
};

struct _ContactsContactEditorField {
	gboolean changed;
	GeeHashMap* rows;
};

struct _ContactsContactEditorPrivate {
	ContactsContact* contact;
	GtkWidget* focus_widget;
	gint last_row;
	GeeHashMap* writable_personas;
	gboolean _has_birthday_row;
	gboolean _has_nickname_row;
	gboolean _has_notes_row;
};

struct _Block16Data {
	int _ref_count_;
	ContactsContactEditor* self;
	gint row;
};

struct _Block17Data {
	int _ref_count_;
	ContactsContactEditor* self;
	gint row;
};

struct _Block18Data {
	int _ref_count_;
	ContactsContactEditor* self;
	gint row;
};

typedef void (*ContactsContactEditorAdjustingDateFn) (void* user_data);
struct _Block19Data {
	int _ref_count_;
	ContactsContactEditor* self;
	GtkSpinButton* day_spin;
	GtkComboBoxText* combo;
	GtkSpinButton* year_spin;
	ContactsContactEditorAdjustingDateFn fn;
	gpointer fn_target;
	GDestroyNotify fn_target_destroy_notify;
	gint row;
};

struct _Block20Data {
	int _ref_count_;
	ContactsContactEditor* self;
	gint row;
};

struct _Block21Data {
	int _ref_count_;
	ContactsContactEditor* self;
	ContactsContactFrame* image_frame;
	GtkEntry* name_entry;
	ContactsContact* c;
};

struct _ContactsContact {
	GObject parent_instance;
	ContactsContactPrivate * priv;
	ContactsStore* store;
	gboolean is_main;
	FolksPresenceType presence_type;
	gchar* presence_message;
	gboolean is_phone;
	FolksIndividual* individual;
};

struct _ContactsContactClass {
	GObjectClass parent_class;
};

struct _ContactsContactEditorPropertyData {
	FolksPersona* persona;
	GValue value;
};


static gpointer contacts_address_editor_parent_class = NULL;
extern gchar** contacts_contact_postal_element_props;
extern gint contacts_contact_postal_element_props_length1;
extern gchar** contacts_contact_postal_element_names;
extern gint contacts_contact_postal_element_names_length1;
static gpointer contacts_contact_editor_parent_class = NULL;

GType contacts_address_editor_get_type (void) G_GNUC_CONST;
enum  {
	CONTACTS_ADDRESS_EDITOR_DUMMY_PROPERTY
};
ContactsAddressEditor* contacts_address_editor_new (FolksPostalAddressFieldDetails* _details);
ContactsAddressEditor* contacts_address_editor_construct (GType object_type, FolksPostalAddressFieldDetails* _details);
static void _____lambda33_ (ContactsAddressEditor* self);
static void ______lambda33__gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void contacts_address_editor_real_grab_focus (GtkWidget* base);
static void contacts_address_editor_finalize (GObject* obj);
GType contacts_contact_editor_get_type (void) G_GNUC_CONST;
GType contacts_contact_get_type (void) G_GNUC_CONST;
static GType contacts_contact_editor_field_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType contacts_contact_editor_row_data_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ContactsContactEditorRowData* contacts_contact_editor_row_data_dup (const ContactsContactEditorRowData* self);
static void contacts_contact_editor_row_data_free (ContactsContactEditorRowData* self);
static void contacts_contact_editor_row_data_copy (const ContactsContactEditorRowData* self, ContactsContactEditorRowData* dest);
static void contacts_contact_editor_row_data_destroy (ContactsContactEditorRowData* self);
static ContactsContactEditorField* contacts_contact_editor_field_dup (const ContactsContactEditorField* self);
static void contacts_contact_editor_field_free (ContactsContactEditorField* self);
static void contacts_contact_editor_field_copy (const ContactsContactEditorField* self, ContactsContactEditorField* dest);
static void contacts_contact_editor_field_destroy (ContactsContactEditorField* self);
#define CONTACTS_CONTACT_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorPrivate))
enum  {
	CONTACTS_CONTACT_EDITOR_DUMMY_PROPERTY,
	CONTACTS_CONTACT_EDITOR_HAS_BIRTHDAY_ROW,
	CONTACTS_CONTACT_EDITOR_HAS_NICKNAME_ROW,
	CONTACTS_CONTACT_EDITOR_HAS_NOTES_ROW
};
static void contacts_contact_editor_get_value_from_emails (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
GType contacts_typecombo_get_type (void) G_GNUC_CONST;
void contacts_typecombo_update_details (ContactsTypeCombo* self, FolksAbstractFieldDetails* details);
static void contacts_contact_editor_get_value_from_phones (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_get_value_from_urls (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_get_value_from_nickname (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_get_value_from_birthday (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_get_value_from_notes (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_get_value_from_addresses (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
static void contacts_contact_editor_set_field_changed (ContactsContactEditor* self, gint row);
static void contacts_contact_editor_remove_row (ContactsContactEditor* self, gint row);
GType contacts_typeset_get_type (void) G_GNUC_CONST;
static void contacts_contact_editor_attach_row_with_entry (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksAbstractFieldDetails* details, const gchar* value, const gchar* type);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
ContactsTypeCombo* contacts_typecombo_new (ContactsTypeSet* type_set);
ContactsTypeCombo* contacts_typecombo_construct (GType object_type, ContactsTypeSet* type_set);
void contacts_typecombo_set_active (ContactsTypeCombo* self, FolksAbstractFieldDetails* details);
void contacts_typecombo_set_to (ContactsTypeCombo* self, const gchar* type);
static void __lambda34_ (Block16Data* _data16_);
static void ___lambda34__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self);
static void __lambda35_ (Block16Data* _data16_);
static void ___lambda35__gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void __lambda36_ (Block16Data* _data16_);
static void ___lambda36__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_editor_attach_row_with_entry_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row);
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
static void __lambda37_ (Block17Data* _data17_);
static void ___lambda37__gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void __lambda38_ (Block17Data* _data17_);
static void ___lambda38__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_editor_attach_row_with_text_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row);
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
static void __lambda39_ (Block18Data* _data18_);
static void ___lambda39__gtk_text_buffer_changed (GtkTextBuffer* _sender, gpointer self);
static void __lambda40_ (Block18Data* _data18_);
static void contacts_contact_editor_set_has_notes_row (ContactsContactEditor* self, gboolean value);
static void ___lambda40__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_editor_attach_row_for_birthday (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, GDateTime* birthday, gint row);
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
static void __lambda41_ (Block19Data* _data19_);
static gboolean _vala_int_array_contains (gint* stack, int stack_length, gint needle);
static void ___lambda41__contacts_contact_editor_adjusting_date_fn (gpointer self);
static void __lambda42_ (Block19Data* _data19_);
static void ___lambda42__gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void __lambda43_ (Block19Data* _data19_);
static void ___lambda43__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
static void __lambda44_ (Block19Data* _data19_);
static void ___lambda44__gtk_editable_changed (GtkEditable* _sender, gpointer self);
static void __lambda45_ (Block19Data* _data19_);
static void contacts_contact_editor_set_has_birthday_row (ContactsContactEditor* self, gboolean value);
static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_editor_attach_row_for_address (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksPostalAddressFieldDetails* details, const gchar* type);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
static void __lambda46_ (Block20Data* _data20_);
static void ___lambda46__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self);
static void __lambda47_ (Block20Data* _data20_);
static void ___lambda47__contacts_address_editor_changed (ContactsAddressEditor* _sender, gpointer self);
static void __lambda48_ (Block20Data* _data20_);
static void ___lambda48__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_editor_add_edit_row (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, gint* row, gboolean add_empty, const gchar* type);
ContactsTypeSet* contacts_typeset_get_email (void);
GeeArrayList* contacts_contact_sort_fields (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GeeCollection* fields);
ContactsTypeSet* contacts_typeset_get_phone (void);
gboolean contacts_is_set (const gchar* str);
static void contacts_contact_editor_set_has_nickname_row (ContactsContactEditor* self, gboolean value);
static void ____lambda49_ (ContactsContactEditor* self);
static void _____lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self);
ContactsTypeSet* contacts_typeset_get_general (void);
static void contacts_contact_editor_insert_row_at (ContactsContactEditor* self, gint idx);
static void contacts_contact_editor_size_allocate_cb (ContactsContactEditor* self, GtkAllocation* alloc);
ContactsContactEditor* contacts_contact_editor_new (void);
ContactsContactEditor* contacts_contact_editor_construct (GType object_type);
static void _contacts_contact_editor_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self);
void contacts_contact_editor_update (ContactsContactEditor* self, ContactsContact* c);
GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
#define PROFILE_SIZE 96
ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button);
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
static void __lambda50_ (Block21Data* _data21_);
void contacts_change_avatar (ContactsContact* contact, ContactsContactFrame* image_frame);
static void ___lambda50__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self);
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target, GDestroyNotify callback_target_destroy_notify);
static void __lambda65_ (Block21Data* _data21_, GtkWidget* w);
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
GType contacts_store_get_type (void) G_GNUC_CONST;
static void ___lambda65__gtk_callback (GtkWidget* widget, gpointer self);
const gchar* contacts_contact_get_display_name (ContactsContact* self);
static void __lambda66_ (Block21Data* _data21_);
static void ___lambda66__gtk_editable_changed (GtkEditable* _sender, gpointer self);
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self);
gchar* contacts_contact_format_persona_store_name_for_contact (FolksPersona* persona);
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1);
void contacts_contact_editor_clear (ContactsContactEditor* self);
GType contacts_contact_editor_property_data_get_type (void) G_GNUC_CONST;
ContactsContactEditorPropertyData* contacts_contact_editor_property_data_dup (const ContactsContactEditorPropertyData* self);
void contacts_contact_editor_property_data_free (ContactsContactEditorPropertyData* self);
void contacts_contact_editor_property_data_copy (const ContactsContactEditorPropertyData* self, ContactsContactEditorPropertyData* dest);
void contacts_contact_editor_property_data_destroy (ContactsContactEditorPropertyData* self);
GeeHashMap* contacts_contact_editor_properties_changed (ContactsContactEditor* self);
gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self);
void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result);
void contacts_contact_editor_add_new_row_for_property (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, const gchar* type);
ContactsFakePersona* contacts_fake_persona_new (ContactsContact* contact);
ContactsFakePersona* contacts_fake_persona_construct (GType object_type, ContactsContact* contact);
GType contacts_fake_persona_get_type (void) G_GNUC_CONST;
gboolean contacts_contact_editor_get_has_birthday_row (ContactsContactEditor* self);
gboolean contacts_contact_editor_get_has_nickname_row (ContactsContactEditor* self);
gboolean contacts_contact_editor_get_has_notes_row (ContactsContactEditor* self);
static void contacts_contact_editor_finalize (GObject* obj);
static void _vala_contacts_contact_editor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_contacts_contact_editor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


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


static void _____lambda33_ (ContactsAddressEditor* self) {
	g_signal_emit_by_name (self, "changed");
}


static void ______lambda33__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	_____lambda33_ ((ContactsAddressEditor*) self);
}


ContactsAddressEditor* contacts_address_editor_construct (GType object_type, FolksPostalAddressFieldDetails* _details) {
	ContactsAddressEditor * self = NULL;
	FolksPostalAddressFieldDetails* _tmp0_ = NULL;
	FolksPostalAddressFieldDetails* _tmp1_ = NULL;
	g_return_val_if_fail (_details != NULL, NULL);
	self = (ContactsAddressEditor*) g_object_new (object_type, NULL);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	_tmp0_ = _details;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->details);
	self->details = _tmp1_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_ = 0;
				gchar* postal_part = NULL;
				FolksPostalAddressFieldDetails* _tmp5_ = NULL;
				gconstpointer _tmp6_ = NULL;
				FolksPostalAddress* _tmp7_ = NULL;
				gchar** _tmp8_ = NULL;
				gint _tmp8__length1 = 0;
				gint _tmp9_ = 0;
				const gchar* _tmp10_ = NULL;
				gint _tmp11_ = 0;
				GtkEntry* _tmp12_ = NULL;
				GtkEntry* _tmp13_ = NULL;
				gint _tmp14_ = 0;
				GtkEntry* _tmp15_ = NULL;
				gint _tmp16_ = 0;
				GtkEntry* _tmp17_ = NULL;
				gchar** _tmp18_ = NULL;
				gint _tmp18__length1 = 0;
				gint _tmp19_ = 0;
				const gchar* _tmp20_ = NULL;
				const gchar* _tmp21_ = NULL;
				gint _tmp25_ = 0;
				GtkEntry* _tmp26_ = NULL;
				GtkStyleContext* _tmp27_ = NULL;
				gint _tmp28_ = 0;
				GtkEntry* _tmp29_ = NULL;
				GtkStyleContext* _tmp30_ = NULL;
				gint _tmp31_ = 0;
				GtkEntry* _tmp32_ = NULL;
				gint _tmp33_ = 0;
				GtkEntry* _tmp34_ = NULL;
				if (!_tmp2_) {
					gint _tmp3_ = 0;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = i;
				if (!(_tmp4_ < 7)) {
					break;
				}
				_tmp5_ = self->details;
				_tmp6_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp5_);
				_tmp7_ = _tmp6_;
				_tmp8_ = contacts_contact_postal_element_props;
				_tmp8__length1 = contacts_contact_postal_element_props_length1;
				_tmp9_ = i;
				_tmp10_ = _tmp8_[_tmp9_];
				g_object_get ((GObject*) ((FolksPostalAddress*) _tmp7_), _tmp10_, &postal_part, NULL);
				_tmp11_ = i;
				_tmp12_ = (GtkEntry*) gtk_entry_new ();
				g_object_ref_sink (_tmp12_);
				_g_object_unref0 (self->entries[_tmp11_]);
				self->entries[_tmp11_] = _tmp12_;
				_tmp13_ = self->entries[_tmp11_];
				_tmp14_ = i;
				_tmp15_ = self->entries[_tmp14_];
				gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
				_tmp16_ = i;
				_tmp17_ = self->entries[_tmp16_];
				_tmp18_ = contacts_contact_postal_element_names;
				_tmp18__length1 = contacts_contact_postal_element_names_length1;
				_tmp19_ = i;
				_tmp20_ = _tmp18_[_tmp19_];
				g_object_set ((GObject*) _tmp17_, "placeholder-text", _tmp20_, NULL);
				_tmp21_ = postal_part;
				if (_tmp21_ != NULL) {
					gint _tmp22_ = 0;
					GtkEntry* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					_tmp22_ = i;
					_tmp23_ = self->entries[_tmp22_];
					_tmp24_ = postal_part;
					gtk_entry_set_text (_tmp23_, _tmp24_);
				}
				_tmp25_ = i;
				_tmp26_ = self->entries[_tmp25_];
				_tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _tmp26_);
				gtk_style_context_add_class (_tmp27_, "contacts-entry");
				_tmp28_ = i;
				_tmp29_ = self->entries[_tmp28_];
				_tmp30_ = gtk_widget_get_style_context ((GtkWidget*) _tmp29_);
				gtk_style_context_add_class (_tmp30_, "contacts-postal-entry");
				_tmp31_ = i;
				_tmp32_ = self->entries[_tmp31_];
				gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp32_);
				_tmp33_ = i;
				_tmp34_ = self->entries[_tmp33_];
				g_signal_connect_object ((GtkEditable*) _tmp34_, "changed", (GCallback) ______lambda33__gtk_editable_changed, self, 0);
				_g_free0 (postal_part);
			}
		}
	}
	return self;
}


ContactsAddressEditor* contacts_address_editor_new (FolksPostalAddressFieldDetails* _details) {
	return contacts_address_editor_construct (CONTACTS_TYPE_ADDRESS_EDITOR, _details);
}


static void contacts_address_editor_real_grab_focus (GtkWidget* base) {
	ContactsAddressEditor * self;
	GtkEntry* _tmp0_ = NULL;
	self = (ContactsAddressEditor*) base;
	_tmp0_ = self->entries[0];
	gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
}


static void contacts_address_editor_class_init (ContactsAddressEditorClass * klass) {
	contacts_address_editor_parent_class = g_type_class_peek_parent (klass);
	GTK_WIDGET_CLASS (klass)->grab_focus = contacts_address_editor_real_grab_focus;
	G_OBJECT_CLASS (klass)->finalize = contacts_address_editor_finalize;
	g_signal_new ("changed", CONTACTS_TYPE_ADDRESS_EDITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void contacts_address_editor_instance_init (ContactsAddressEditor * self) {
}


static void contacts_address_editor_finalize (GObject* obj) {
	ContactsAddressEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditor);
	_vala_array_destroy (self->entries, 7, (GDestroyNotify) g_object_unref);
	_g_object_unref0 (self->details);
	G_OBJECT_CLASS (contacts_address_editor_parent_class)->finalize (obj);
}


GType contacts_address_editor_get_type (void) {
	static volatile gsize contacts_address_editor_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_address_editor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsAddressEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_address_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsAddressEditor), 0, (GInstanceInitFunc) contacts_address_editor_instance_init, NULL };
		GType contacts_address_editor_type_id;
		contacts_address_editor_type_id = g_type_register_static (GTK_TYPE_BOX, "ContactsAddressEditor", &g_define_type_info, 0);
		g_once_init_leave (&contacts_address_editor_type_id__volatile, contacts_address_editor_type_id);
	}
	return contacts_address_editor_type_id__volatile;
}


static void contacts_contact_editor_get_value_from_emails (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GeeHashSet* new_details = NULL;
	GeeHashSet* _tmp0_ = NULL;
	GValue new_value = {0};
	GeeHashSet* _tmp37_ = NULL;
	GType _tmp38_ = 0UL;
	GValue _tmp39_ = {0};
	GeeHashSet* _tmp40_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	new_details = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			ContactsTypeCombo* combo = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			ContactsTypeCombo* _tmp15_ = NULL;
			GtkEntry* entry = NULL;
			GeeMapEntry* _tmp16_ = NULL;
			gconstpointer _tmp17_ = NULL;
			gint _tmp18_ = 0;
			GtkWidget* _tmp19_ = NULL;
			GtkEntry* _tmp20_ = NULL;
			ContactsTypeCombo* _tmp21_ = NULL;
			GeeMapEntry* _tmp22_ = NULL;
			gconstpointer _tmp23_ = NULL;
			ContactsContactEditorRowData* _tmp24_ = NULL;
			FolksAbstractFieldDetails* _tmp25_ = NULL;
			FolksEmailFieldDetails* details = NULL;
			GtkEntry* _tmp26_ = NULL;
			const gchar* _tmp27_ = NULL;
			GeeMapEntry* _tmp28_ = NULL;
			gconstpointer _tmp29_ = NULL;
			ContactsContactEditorRowData* _tmp30_ = NULL;
			FolksAbstractFieldDetails* _tmp31_ = NULL;
			GeeMultiMap* _tmp32_ = NULL;
			GeeMultiMap* _tmp33_ = NULL;
			FolksEmailFieldDetails* _tmp34_ = NULL;
			GeeHashSet* _tmp35_ = NULL;
			FolksEmailFieldDetails* _tmp36_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
			combo = _tmp15_;
			_tmp16_ = row_entry;
			_tmp17_ = gee_map_entry_get_key (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
			_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp19_) : NULL);
			entry = _tmp20_;
			_tmp21_ = combo;
			_tmp22_ = row_entry;
			_tmp23_ = gee_map_entry_get_value (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
			contacts_typecombo_update_details (_tmp21_, _tmp25_);
			_tmp26_ = entry;
			_tmp27_ = gtk_entry_get_text (_tmp26_);
			_tmp28_ = row_entry;
			_tmp29_ = gee_map_entry_get_value (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
			_tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = folks_email_field_details_new (_tmp27_, _tmp33_);
			details = _tmp34_;
			_tmp35_ = new_details;
			_tmp36_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp36_);
			_g_object_unref0 (details);
			_g_object_unref0 (entry);
			_g_object_unref0 (combo);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	_tmp37_ = new_details;
	_tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
	g_value_init (&_tmp39_, _tmp38_);
	new_value = _tmp39_;
	_tmp40_ = new_details;
	g_value_set_object (&new_value, (GObject*) _tmp40_);
	*result = new_value;
	_g_object_unref0 (new_details);
	return;
}


static void contacts_contact_editor_get_value_from_phones (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GeeHashSet* new_details = NULL;
	GeeHashSet* _tmp0_ = NULL;
	GValue new_value = {0};
	GeeHashSet* _tmp37_ = NULL;
	GType _tmp38_ = 0UL;
	GValue _tmp39_ = {0};
	GeeHashSet* _tmp40_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	new_details = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			ContactsTypeCombo* combo = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			ContactsTypeCombo* _tmp15_ = NULL;
			GtkEntry* entry = NULL;
			GeeMapEntry* _tmp16_ = NULL;
			gconstpointer _tmp17_ = NULL;
			gint _tmp18_ = 0;
			GtkWidget* _tmp19_ = NULL;
			GtkEntry* _tmp20_ = NULL;
			ContactsTypeCombo* _tmp21_ = NULL;
			GeeMapEntry* _tmp22_ = NULL;
			gconstpointer _tmp23_ = NULL;
			ContactsContactEditorRowData* _tmp24_ = NULL;
			FolksAbstractFieldDetails* _tmp25_ = NULL;
			FolksPhoneFieldDetails* details = NULL;
			GtkEntry* _tmp26_ = NULL;
			const gchar* _tmp27_ = NULL;
			GeeMapEntry* _tmp28_ = NULL;
			gconstpointer _tmp29_ = NULL;
			ContactsContactEditorRowData* _tmp30_ = NULL;
			FolksAbstractFieldDetails* _tmp31_ = NULL;
			GeeMultiMap* _tmp32_ = NULL;
			GeeMultiMap* _tmp33_ = NULL;
			FolksPhoneFieldDetails* _tmp34_ = NULL;
			GeeHashSet* _tmp35_ = NULL;
			FolksPhoneFieldDetails* _tmp36_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
			combo = _tmp15_;
			_tmp16_ = row_entry;
			_tmp17_ = gee_map_entry_get_key (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
			_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp19_) : NULL);
			entry = _tmp20_;
			_tmp21_ = combo;
			_tmp22_ = row_entry;
			_tmp23_ = gee_map_entry_get_value (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
			contacts_typecombo_update_details (_tmp21_, _tmp25_);
			_tmp26_ = entry;
			_tmp27_ = gtk_entry_get_text (_tmp26_);
			_tmp28_ = row_entry;
			_tmp29_ = gee_map_entry_get_value (_tmp28_);
			_tmp30_ = _tmp29_;
			_tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
			_tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = folks_phone_field_details_new (_tmp27_, _tmp33_);
			details = _tmp34_;
			_tmp35_ = new_details;
			_tmp36_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp36_);
			_g_object_unref0 (details);
			_g_object_unref0 (entry);
			_g_object_unref0 (combo);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	_tmp37_ = new_details;
	_tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
	g_value_init (&_tmp39_, _tmp38_);
	new_value = _tmp39_;
	_tmp40_ = new_details;
	g_value_set_object (&new_value, (GObject*) _tmp40_);
	*result = new_value;
	_g_object_unref0 (new_details);
	return;
}


static void contacts_contact_editor_get_value_from_urls (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GeeHashSet* new_details = NULL;
	GeeHashSet* _tmp0_ = NULL;
	GValue new_value = {0};
	GeeHashSet* _tmp27_ = NULL;
	GType _tmp28_ = 0UL;
	GValue _tmp29_ = {0};
	GeeHashSet* _tmp30_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	new_details = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			GtkEntry* entry = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			GtkEntry* _tmp15_ = NULL;
			FolksUrlFieldDetails* details = NULL;
			GtkEntry* _tmp16_ = NULL;
			const gchar* _tmp17_ = NULL;
			GeeMapEntry* _tmp18_ = NULL;
			gconstpointer _tmp19_ = NULL;
			ContactsContactEditorRowData* _tmp20_ = NULL;
			FolksAbstractFieldDetails* _tmp21_ = NULL;
			GeeMultiMap* _tmp22_ = NULL;
			GeeMultiMap* _tmp23_ = NULL;
			FolksUrlFieldDetails* _tmp24_ = NULL;
			GeeHashSet* _tmp25_ = NULL;
			FolksUrlFieldDetails* _tmp26_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp14_) : NULL);
			entry = _tmp15_;
			_tmp16_ = entry;
			_tmp17_ = gtk_entry_get_text (_tmp16_);
			_tmp18_ = row_entry;
			_tmp19_ = gee_map_entry_get_value (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = (*((ContactsContactEditorRowData*) _tmp20_)).details;
			_tmp22_ = folks_abstract_field_details_get_parameters (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = folks_url_field_details_new (_tmp17_, _tmp23_);
			details = _tmp24_;
			_tmp25_ = new_details;
			_tmp26_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
			_g_object_unref0 (details);
			_g_object_unref0 (entry);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	_tmp27_ = new_details;
	_tmp28_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp27_);
	g_value_init (&_tmp29_, _tmp28_);
	new_value = _tmp29_;
	_tmp30_ = new_details;
	g_value_set_object (&new_value, (GObject*) _tmp30_);
	*result = new_value;
	_g_object_unref0 (new_details);
	return;
}


static void contacts_contact_editor_get_value_from_nickname (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GValue new_value = {0};
	GValue _tmp0_ = {0};
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	g_value_init (&_tmp0_, G_TYPE_STRING);
	new_value = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			GtkEntry* entry = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			GtkEntry* _tmp15_ = NULL;
			GtkEntry* _tmp16_ = NULL;
			const gchar* _tmp17_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp14_) : NULL);
			entry = _tmp15_;
			_tmp16_ = entry;
			_tmp17_ = gtk_entry_get_text (_tmp16_);
			g_value_set_string (&new_value, _tmp17_);
			_g_object_unref0 (entry);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	*result = new_value;
	return;
}


static void contacts_contact_editor_get_value_from_birthday (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GValue new_value = {0};
	GValue _tmp0_ = {0};
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	g_value_init (&_tmp0_, G_TYPE_DATE_TIME);
	new_value = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			GtkGrid* box = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			GtkGrid* _tmp15_ = NULL;
			GtkSpinButton* day_spin = NULL;
			GtkGrid* _tmp16_ = NULL;
			GtkWidget* _tmp17_ = NULL;
			GtkSpinButton* _tmp18_ = NULL;
			GtkComboBoxText* combo = NULL;
			GtkGrid* _tmp19_ = NULL;
			GtkWidget* _tmp20_ = NULL;
			GtkComboBoxText* _tmp21_ = NULL;
			GtkSpinButton* year_spin = NULL;
			GtkGrid* _tmp22_ = NULL;
			GtkWidget* _tmp23_ = NULL;
			GtkSpinButton* _tmp24_ = NULL;
			GDateTime* bday = NULL;
			GtkSpinButton* _tmp25_ = NULL;
			gint _tmp26_ = 0;
			GtkComboBoxText* _tmp27_ = NULL;
			gint _tmp28_ = 0;
			GtkSpinButton* _tmp29_ = NULL;
			gint _tmp30_ = 0;
			GDateTime* _tmp31_ = NULL;
			GDateTime* _tmp32_ = NULL;
			GDateTime* _tmp33_ = NULL;
			GDateTime* _tmp34_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp14_) : NULL);
			box = _tmp15_;
			_tmp16_ = box;
			_tmp17_ = gtk_grid_get_child_at (_tmp16_, 0, 0);
			_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GTK_TYPE_SPIN_BUTTON) ? ((GtkSpinButton*) _tmp17_) : NULL);
			day_spin = _tmp18_;
			_tmp19_ = box;
			_tmp20_ = gtk_grid_get_child_at (_tmp19_, 1, 0);
			_tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GTK_TYPE_COMBO_BOX_TEXT) ? ((GtkComboBoxText*) _tmp20_) : NULL);
			combo = _tmp21_;
			_tmp22_ = box;
			_tmp23_ = gtk_grid_get_child_at (_tmp22_, 2, 0);
			_tmp24_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, GTK_TYPE_SPIN_BUTTON) ? ((GtkSpinButton*) _tmp23_) : NULL);
			year_spin = _tmp24_;
			_tmp25_ = year_spin;
			_tmp26_ = gtk_spin_button_get_value_as_int (_tmp25_);
			_tmp27_ = combo;
			_tmp28_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp27_);
			_tmp29_ = day_spin;
			_tmp30_ = gtk_spin_button_get_value_as_int (_tmp29_);
			_tmp31_ = g_date_time_new_local (_tmp26_, _tmp28_ + 1, _tmp30_, 0, 0, (gdouble) 0);
			bday = _tmp31_;
			_tmp32_ = bday;
			_tmp33_ = g_date_time_to_utc (_tmp32_);
			_g_date_time_unref0 (bday);
			bday = _tmp33_;
			_tmp34_ = bday;
			g_value_set_boxed (&new_value, _tmp34_);
			_g_date_time_unref0 (bday);
			_g_object_unref0 (year_spin);
			_g_object_unref0 (combo);
			_g_object_unref0 (day_spin);
			_g_object_unref0 (box);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	*result = new_value;
	return;
}


static void contacts_contact_editor_get_value_from_notes (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GeeHashSet* new_details = NULL;
	GeeHashSet* _tmp0_ = NULL;
	GValue new_value = {0};
	GeeHashSet* _tmp39_ = NULL;
	GType _tmp40_ = 0UL;
	GValue _tmp41_ = {0};
	GeeHashSet* _tmp42_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	new_details = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			GtkTextView* text = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			GtkWidget* _tmp15_ = NULL;
			GtkTextView* _tmp16_ = NULL;
			GtkTextIter start = {0};
			GtkTextIter end = {0};
			GtkTextView* _tmp17_ = NULL;
			GtkTextBuffer* _tmp18_ = NULL;
			GtkTextIter _tmp19_ = {0};
			GtkTextView* _tmp20_ = NULL;
			GtkTextBuffer* _tmp21_ = NULL;
			GtkTextIter _tmp22_ = {0};
			gchar* value = NULL;
			GtkTextView* _tmp23_ = NULL;
			GtkTextBuffer* _tmp24_ = NULL;
			GtkTextIter _tmp25_ = {0};
			GtkTextIter _tmp26_ = {0};
			gchar* _tmp27_ = NULL;
			const gchar* _tmp28_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
			_tmp15_ = gtk_bin_get_child (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_BIN) ? ((GtkBin*) _tmp14_) : NULL);
			_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, GTK_TYPE_TEXT_VIEW) ? ((GtkTextView*) _tmp15_) : NULL);
			text = _tmp16_;
			_tmp17_ = text;
			_tmp18_ = gtk_text_view_get_buffer (_tmp17_);
			gtk_text_buffer_get_start_iter (_tmp18_, &_tmp19_);
			start = _tmp19_;
			_tmp20_ = text;
			_tmp21_ = gtk_text_view_get_buffer (_tmp20_);
			gtk_text_buffer_get_end_iter (_tmp21_, &_tmp22_);
			end = _tmp22_;
			_tmp23_ = text;
			_tmp24_ = gtk_text_view_get_buffer (_tmp23_);
			_tmp25_ = start;
			_tmp26_ = end;
			_tmp27_ = gtk_text_buffer_get_text (_tmp24_, &_tmp25_, &_tmp26_, TRUE);
			value = _tmp27_;
			_tmp28_ = value;
			if (g_strcmp0 (_tmp28_, "") != 0) {
				FolksNoteFieldDetails* details = NULL;
				const gchar* _tmp29_ = NULL;
				GeeMapEntry* _tmp30_ = NULL;
				gconstpointer _tmp31_ = NULL;
				ContactsContactEditorRowData* _tmp32_ = NULL;
				FolksAbstractFieldDetails* _tmp33_ = NULL;
				GeeMultiMap* _tmp34_ = NULL;
				GeeMultiMap* _tmp35_ = NULL;
				FolksNoteFieldDetails* _tmp36_ = NULL;
				GeeHashSet* _tmp37_ = NULL;
				FolksNoteFieldDetails* _tmp38_ = NULL;
				_tmp29_ = value;
				_tmp30_ = row_entry;
				_tmp31_ = gee_map_entry_get_value (_tmp30_);
				_tmp32_ = _tmp31_;
				_tmp33_ = (*((ContactsContactEditorRowData*) _tmp32_)).details;
				_tmp34_ = folks_abstract_field_details_get_parameters (_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp36_ = folks_note_field_details_new (_tmp29_, _tmp35_, NULL);
				details = _tmp36_;
				_tmp37_ = new_details;
				_tmp38_ = details;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp37_, _tmp38_);
				_g_object_unref0 (details);
			}
			_g_free0 (value);
			_g_object_unref0 (text);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	_tmp39_ = new_details;
	_tmp40_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp39_);
	g_value_init (&_tmp41_, _tmp40_);
	new_value = _tmp41_;
	_tmp42_ = new_details;
	g_value_set_object (&new_value, (GObject*) _tmp42_);
	*result = new_value;
	_g_object_unref0 (new_details);
	return;
}


static void contacts_contact_editor_get_value_from_addresses (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
	GeeHashSet* new_details = NULL;
	GeeHashSet* _tmp0_ = NULL;
	GValue new_value = {0};
	GeeHashSet* _tmp101_ = NULL;
	GType _tmp102_ = 0UL;
	GValue _tmp103_ = {0};
	GeeHashSet* _tmp104_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (rows != NULL);
	_tmp0_ = gee_hash_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	new_details = _tmp0_;
	{
		GeeIterator* _row_entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = rows;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_row_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* row_entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			ContactsTypeCombo* combo = NULL;
			GeeMapEntry* _tmp11_ = NULL;
			gconstpointer _tmp12_ = NULL;
			gint _tmp13_ = 0;
			GtkWidget* _tmp14_ = NULL;
			ContactsTypeCombo* _tmp15_ = NULL;
			ContactsAddressEditor* addr_editor = NULL;
			GeeMapEntry* _tmp16_ = NULL;
			gconstpointer _tmp17_ = NULL;
			gint _tmp18_ = 0;
			GtkWidget* _tmp19_ = NULL;
			ContactsAddressEditor* _tmp20_ = NULL;
			ContactsTypeCombo* _tmp21_ = NULL;
			GeeMapEntry* _tmp22_ = NULL;
			gconstpointer _tmp23_ = NULL;
			ContactsContactEditorRowData* _tmp24_ = NULL;
			FolksAbstractFieldDetails* _tmp25_ = NULL;
			FolksPostalAddress* new_value = NULL;
			ContactsAddressEditor* _tmp26_ = NULL;
			FolksPostalAddressFieldDetails* _tmp27_ = NULL;
			gconstpointer _tmp28_ = NULL;
			FolksPostalAddress* _tmp29_ = NULL;
			const gchar* _tmp30_ = NULL;
			const gchar* _tmp31_ = NULL;
			ContactsAddressEditor* _tmp32_ = NULL;
			FolksPostalAddressFieldDetails* _tmp33_ = NULL;
			gconstpointer _tmp34_ = NULL;
			FolksPostalAddress* _tmp35_ = NULL;
			const gchar* _tmp36_ = NULL;
			const gchar* _tmp37_ = NULL;
			ContactsAddressEditor* _tmp38_ = NULL;
			FolksPostalAddressFieldDetails* _tmp39_ = NULL;
			gconstpointer _tmp40_ = NULL;
			FolksPostalAddress* _tmp41_ = NULL;
			const gchar* _tmp42_ = NULL;
			const gchar* _tmp43_ = NULL;
			ContactsAddressEditor* _tmp44_ = NULL;
			FolksPostalAddressFieldDetails* _tmp45_ = NULL;
			gconstpointer _tmp46_ = NULL;
			FolksPostalAddress* _tmp47_ = NULL;
			const gchar* _tmp48_ = NULL;
			const gchar* _tmp49_ = NULL;
			ContactsAddressEditor* _tmp50_ = NULL;
			FolksPostalAddressFieldDetails* _tmp51_ = NULL;
			gconstpointer _tmp52_ = NULL;
			FolksPostalAddress* _tmp53_ = NULL;
			const gchar* _tmp54_ = NULL;
			const gchar* _tmp55_ = NULL;
			ContactsAddressEditor* _tmp56_ = NULL;
			FolksPostalAddressFieldDetails* _tmp57_ = NULL;
			gconstpointer _tmp58_ = NULL;
			FolksPostalAddress* _tmp59_ = NULL;
			const gchar* _tmp60_ = NULL;
			const gchar* _tmp61_ = NULL;
			ContactsAddressEditor* _tmp62_ = NULL;
			FolksPostalAddressFieldDetails* _tmp63_ = NULL;
			gconstpointer _tmp64_ = NULL;
			FolksPostalAddress* _tmp65_ = NULL;
			const gchar* _tmp66_ = NULL;
			const gchar* _tmp67_ = NULL;
			ContactsAddressEditor* _tmp68_ = NULL;
			FolksPostalAddressFieldDetails* _tmp69_ = NULL;
			gconstpointer _tmp70_ = NULL;
			FolksPostalAddress* _tmp71_ = NULL;
			const gchar* _tmp72_ = NULL;
			const gchar* _tmp73_ = NULL;
			ContactsAddressEditor* _tmp74_ = NULL;
			FolksPostalAddressFieldDetails* _tmp75_ = NULL;
			const gchar* _tmp76_ = NULL;
			const gchar* _tmp77_ = NULL;
			FolksPostalAddress* _tmp78_ = NULL;
			FolksPostalAddressFieldDetails* details = NULL;
			FolksPostalAddress* _tmp91_ = NULL;
			GeeMapEntry* _tmp92_ = NULL;
			gconstpointer _tmp93_ = NULL;
			ContactsContactEditorRowData* _tmp94_ = NULL;
			FolksAbstractFieldDetails* _tmp95_ = NULL;
			GeeMultiMap* _tmp96_ = NULL;
			GeeMultiMap* _tmp97_ = NULL;
			FolksPostalAddressFieldDetails* _tmp98_ = NULL;
			GeeHashSet* _tmp99_ = NULL;
			FolksPostalAddressFieldDetails* _tmp100_ = NULL;
			_tmp7_ = _row_entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _row_entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			row_entry = (GeeMapEntry*) _tmp10_;
			_tmp11_ = row_entry;
			_tmp12_ = gee_map_entry_get_key (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
			_tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
			combo = _tmp15_;
			_tmp16_ = row_entry;
			_tmp17_ = gee_map_entry_get_key (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
			_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, CONTACTS_TYPE_ADDRESS_EDITOR) ? ((ContactsAddressEditor*) _tmp19_) : NULL);
			addr_editor = _tmp20_;
			_tmp21_ = combo;
			_tmp22_ = row_entry;
			_tmp23_ = gee_map_entry_get_value (_tmp22_);
			_tmp24_ = _tmp23_;
			_tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
			contacts_typecombo_update_details (_tmp21_, _tmp25_);
			_tmp26_ = addr_editor;
			_tmp27_ = _tmp26_->details;
			_tmp28_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = folks_postal_address_get_po_box ((FolksPostalAddress*) _tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = addr_editor;
			_tmp33_ = _tmp32_->details;
			_tmp34_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp33_);
			_tmp35_ = _tmp34_;
			_tmp36_ = folks_postal_address_get_extension ((FolksPostalAddress*) _tmp35_);
			_tmp37_ = _tmp36_;
			_tmp38_ = addr_editor;
			_tmp39_ = _tmp38_->details;
			_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = folks_postal_address_get_street ((FolksPostalAddress*) _tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = addr_editor;
			_tmp45_ = _tmp44_->details;
			_tmp46_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp45_);
			_tmp47_ = _tmp46_;
			_tmp48_ = folks_postal_address_get_locality ((FolksPostalAddress*) _tmp47_);
			_tmp49_ = _tmp48_;
			_tmp50_ = addr_editor;
			_tmp51_ = _tmp50_->details;
			_tmp52_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp51_);
			_tmp53_ = _tmp52_;
			_tmp54_ = folks_postal_address_get_region ((FolksPostalAddress*) _tmp53_);
			_tmp55_ = _tmp54_;
			_tmp56_ = addr_editor;
			_tmp57_ = _tmp56_->details;
			_tmp58_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp57_);
			_tmp59_ = _tmp58_;
			_tmp60_ = folks_postal_address_get_postal_code ((FolksPostalAddress*) _tmp59_);
			_tmp61_ = _tmp60_;
			_tmp62_ = addr_editor;
			_tmp63_ = _tmp62_->details;
			_tmp64_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp63_);
			_tmp65_ = _tmp64_;
			_tmp66_ = folks_postal_address_get_country ((FolksPostalAddress*) _tmp65_);
			_tmp67_ = _tmp66_;
			_tmp68_ = addr_editor;
			_tmp69_ = _tmp68_->details;
			_tmp70_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp69_);
			_tmp71_ = _tmp70_;
			_tmp72_ = folks_postal_address_get_address_format ((FolksPostalAddress*) _tmp71_);
			_tmp73_ = _tmp72_;
			_tmp74_ = addr_editor;
			_tmp75_ = _tmp74_->details;
			_tmp76_ = folks_abstract_field_details_get_id ((FolksAbstractFieldDetails*) _tmp75_);
			_tmp77_ = _tmp76_;
			_tmp78_ = folks_postal_address_new (_tmp31_, _tmp37_, _tmp43_, _tmp49_, _tmp55_, _tmp61_, _tmp67_, _tmp73_, _tmp77_);
			new_value = _tmp78_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp79_ = FALSE;
					_tmp79_ = TRUE;
					while (TRUE) {
						gint _tmp81_ = 0;
						ContactsAddressEditor* _tmp82_ = NULL;
						FolksPostalAddress* _tmp83_ = NULL;
						gchar** _tmp84_ = NULL;
						gint _tmp84__length1 = 0;
						gint _tmp85_ = 0;
						const gchar* _tmp86_ = NULL;
						ContactsAddressEditor* _tmp87_ = NULL;
						gint _tmp88_ = 0;
						GtkEntry* _tmp89_ = NULL;
						const gchar* _tmp90_ = NULL;
						if (!_tmp79_) {
							gint _tmp80_ = 0;
							_tmp80_ = i;
							i = _tmp80_ + 1;
						}
						_tmp79_ = FALSE;
						_tmp81_ = i;
						_tmp82_ = addr_editor;
						if (!(_tmp81_ < 7)) {
							break;
						}
						_tmp83_ = new_value;
						_tmp84_ = contacts_contact_postal_element_props;
						_tmp84__length1 = contacts_contact_postal_element_props_length1;
						_tmp85_ = i;
						_tmp86_ = _tmp84_[_tmp85_];
						_tmp87_ = addr_editor;
						_tmp88_ = i;
						_tmp89_ = _tmp87_->entries[_tmp88_];
						_tmp90_ = gtk_entry_get_text (_tmp89_);
						g_object_set ((GObject*) _tmp83_, _tmp86_, _tmp90_, NULL);
					}
				}
			}
			_tmp91_ = new_value;
			_tmp92_ = row_entry;
			_tmp93_ = gee_map_entry_get_value (_tmp92_);
			_tmp94_ = _tmp93_;
			_tmp95_ = (*((ContactsContactEditorRowData*) _tmp94_)).details;
			_tmp96_ = folks_abstract_field_details_get_parameters (_tmp95_);
			_tmp97_ = _tmp96_;
			_tmp98_ = folks_postal_address_field_details_new (_tmp91_, _tmp97_);
			details = _tmp98_;
			_tmp99_ = new_details;
			_tmp100_ = details;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp99_, _tmp100_);
			_g_object_unref0 (details);
			_g_object_unref0 (new_value);
			_g_object_unref0 (addr_editor);
			_g_object_unref0 (combo);
			_g_object_unref0 (row_entry);
		}
		_g_object_unref0 (_row_entry_it);
	}
	_tmp101_ = new_details;
	_tmp102_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp101_);
	g_value_init (&_tmp103_, _tmp102_);
	new_value = _tmp103_;
	_tmp104_ = new_details;
	g_value_set_object (&new_value, (GObject*) _tmp104_);
	*result = new_value;
	_g_object_unref0 (new_details);
	return;
}


static void contacts_contact_editor_set_field_changed (ContactsContactEditor* self, gint row) {
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _fields_it = NULL;
		GeeHashMap* _tmp0_ = NULL;
		GeeCollection* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		_tmp0_ = self->priv->writable_personas;
		_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_fields_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			GeeHashMap* fields = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			_tmp6_ = _fields_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _fields_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			fields = (GeeHashMap*) _tmp9_;
			{
				GeeIterator* _entry_it = NULL;
				GeeHashMap* _tmp10_ = NULL;
				GeeSet* _tmp11_ = NULL;
				GeeSet* _tmp12_ = NULL;
				GeeSet* _tmp13_ = NULL;
				GeeIterator* _tmp14_ = NULL;
				GeeIterator* _tmp15_ = NULL;
				_tmp10_ = fields;
				_tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp13_);
				_entry_it = _tmp15_;
				while (TRUE) {
					GeeIterator* _tmp16_ = NULL;
					gboolean _tmp17_ = FALSE;
					GeeMapEntry* entry = NULL;
					GeeIterator* _tmp18_ = NULL;
					gpointer _tmp19_ = NULL;
					GeeMapEntry* _tmp20_ = NULL;
					gconstpointer _tmp21_ = NULL;
					ContactsContactEditorField* _tmp22_ = NULL;
					GeeHashMap* _tmp23_ = NULL;
					GeeSet* _tmp24_ = NULL;
					GeeSet* _tmp25_ = NULL;
					GeeSet* _tmp26_ = NULL;
					gint _tmp27_ = 0;
					gboolean _tmp28_ = FALSE;
					gboolean _tmp29_ = FALSE;
					_tmp16_ = _entry_it;
					_tmp17_ = gee_iterator_next (_tmp16_);
					if (!_tmp17_) {
						break;
					}
					_tmp18_ = _entry_it;
					_tmp19_ = gee_iterator_get (_tmp18_);
					entry = (GeeMapEntry*) _tmp19_;
					_tmp20_ = entry;
					_tmp21_ = gee_map_entry_get_value (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
					_tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
					_tmp25_ = _tmp24_;
					_tmp26_ = _tmp25_;
					_tmp27_ = row;
					_tmp28_ = gee_collection_contains ((GeeCollection*) _tmp26_, (gpointer) ((gintptr) _tmp27_));
					_tmp29_ = _tmp28_;
					_g_object_unref0 (_tmp26_);
					if (_tmp29_) {
						GeeMapEntry* _tmp30_ = NULL;
						gconstpointer _tmp31_ = NULL;
						ContactsContactEditorField* _tmp32_ = NULL;
						gboolean _tmp33_ = FALSE;
						GeeMapEntry* _tmp34_ = NULL;
						gconstpointer _tmp35_ = NULL;
						ContactsContactEditorField* _tmp36_ = NULL;
						_tmp30_ = entry;
						_tmp31_ = gee_map_entry_get_value (_tmp30_);
						_tmp32_ = _tmp31_;
						_tmp33_ = (*((ContactsContactEditorField*) _tmp32_)).changed;
						if (_tmp33_) {
							_g_object_unref0 (entry);
							_g_object_unref0 (_entry_it);
							_g_object_unref0 (fields);
							_g_object_unref0 (_fields_it);
							return;
						}
						_tmp34_ = entry;
						_tmp35_ = gee_map_entry_get_value (_tmp34_);
						_tmp36_ = _tmp35_;
						(*((ContactsContactEditorField*) _tmp36_)).changed = TRUE;
						_g_object_unref0 (entry);
						_g_object_unref0 (_entry_it);
						_g_object_unref0 (fields);
						_g_object_unref0 (_fields_it);
						return;
					}
					_g_object_unref0 (entry);
				}
				_g_object_unref0 (_entry_it);
			}
			_g_object_unref0 (fields);
		}
		_g_object_unref0 (_fields_it);
	}
}


static void contacts_contact_editor_remove_row (ContactsContactEditor* self, gint row) {
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _fields_it = NULL;
		GeeHashMap* _tmp0_ = NULL;
		GeeCollection* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		_tmp0_ = self->priv->writable_personas;
		_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_fields_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			GeeHashMap* fields = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			_tmp6_ = _fields_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _fields_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			fields = (GeeHashMap*) _tmp9_;
			{
				GeeIterator* _field_entry_it = NULL;
				GeeHashMap* _tmp10_ = NULL;
				GeeSet* _tmp11_ = NULL;
				GeeSet* _tmp12_ = NULL;
				GeeSet* _tmp13_ = NULL;
				GeeIterator* _tmp14_ = NULL;
				GeeIterator* _tmp15_ = NULL;
				_tmp10_ = fields;
				_tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp13_);
				_field_entry_it = _tmp15_;
				while (TRUE) {
					GeeIterator* _tmp16_ = NULL;
					gboolean _tmp17_ = FALSE;
					GeeMapEntry* field_entry = NULL;
					GeeIterator* _tmp18_ = NULL;
					gpointer _tmp19_ = NULL;
					_tmp16_ = _field_entry_it;
					_tmp17_ = gee_iterator_next (_tmp16_);
					if (!_tmp17_) {
						break;
					}
					_tmp18_ = _field_entry_it;
					_tmp19_ = gee_iterator_get (_tmp18_);
					field_entry = (GeeMapEntry*) _tmp19_;
					{
						GeeIterator* _idx_it = NULL;
						GeeMapEntry* _tmp20_ = NULL;
						gconstpointer _tmp21_ = NULL;
						ContactsContactEditorField* _tmp22_ = NULL;
						GeeHashMap* _tmp23_ = NULL;
						GeeSet* _tmp24_ = NULL;
						GeeSet* _tmp25_ = NULL;
						GeeSet* _tmp26_ = NULL;
						GeeIterator* _tmp27_ = NULL;
						GeeIterator* _tmp28_ = NULL;
						_tmp20_ = field_entry;
						_tmp21_ = gee_map_entry_get_value (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
						_tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
						_tmp25_ = _tmp24_;
						_tmp26_ = _tmp25_;
						_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
						_tmp28_ = _tmp27_;
						_g_object_unref0 (_tmp26_);
						_idx_it = _tmp28_;
						while (TRUE) {
							GeeIterator* _tmp29_ = NULL;
							gboolean _tmp30_ = FALSE;
							gint idx = 0;
							GeeIterator* _tmp31_ = NULL;
							gpointer _tmp32_ = NULL;
							gint _tmp33_ = 0;
							gint _tmp34_ = 0;
							_tmp29_ = _idx_it;
							_tmp30_ = gee_iterator_next (_tmp29_);
							if (!_tmp30_) {
								break;
							}
							_tmp31_ = _idx_it;
							_tmp32_ = gee_iterator_get (_tmp31_);
							idx = (gint) ((gintptr) _tmp32_);
							_tmp33_ = idx;
							_tmp34_ = row;
							if (_tmp33_ == _tmp34_) {
								GtkWidget* child = NULL;
								gint _tmp35_ = 0;
								GtkWidget* _tmp36_ = NULL;
								GtkWidget* _tmp37_ = NULL;
								GtkWidget* _tmp38_ = NULL;
								gint _tmp39_ = 0;
								GtkWidget* _tmp40_ = NULL;
								GtkWidget* _tmp41_ = NULL;
								GtkWidget* _tmp42_ = NULL;
								gint _tmp43_ = 0;
								GtkWidget* _tmp44_ = NULL;
								GtkWidget* _tmp45_ = NULL;
								GtkWidget* _tmp46_ = NULL;
								GeeMapEntry* _tmp47_ = NULL;
								gconstpointer _tmp48_ = NULL;
								ContactsContactEditorField* _tmp49_ = NULL;
								GeeMapEntry* _tmp50_ = NULL;
								gconstpointer _tmp51_ = NULL;
								ContactsContactEditorField* _tmp52_ = NULL;
								GeeHashMap* _tmp53_ = NULL;
								gint _tmp54_ = 0;
								_tmp35_ = row;
								_tmp36_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp35_);
								_tmp37_ = _g_object_ref0 (_tmp36_);
								child = _tmp37_;
								_tmp38_ = child;
								gtk_widget_destroy (_tmp38_);
								_tmp39_ = row;
								_tmp40_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, _tmp39_);
								_tmp41_ = _g_object_ref0 (_tmp40_);
								_g_object_unref0 (child);
								child = _tmp41_;
								_tmp42_ = child;
								gtk_widget_destroy (_tmp42_);
								_tmp43_ = row;
								_tmp44_ = gtk_grid_get_child_at ((GtkGrid*) self, 3, _tmp43_);
								_tmp45_ = _g_object_ref0 (_tmp44_);
								_g_object_unref0 (child);
								child = _tmp45_;
								_tmp46_ = child;
								gtk_widget_destroy (_tmp46_);
								_tmp47_ = field_entry;
								_tmp48_ = gee_map_entry_get_value (_tmp47_);
								_tmp49_ = _tmp48_;
								(*((ContactsContactEditorField*) _tmp49_)).changed = TRUE;
								_tmp50_ = field_entry;
								_tmp51_ = gee_map_entry_get_value (_tmp50_);
								_tmp52_ = _tmp51_;
								_tmp53_ = (*((ContactsContactEditorField*) _tmp52_)).rows;
								_tmp54_ = row;
								gee_abstract_map_unset ((GeeAbstractMap*) _tmp53_, (gpointer) ((gintptr) _tmp54_), NULL);
								_g_object_unref0 (child);
								_g_object_unref0 (_idx_it);
								_g_object_unref0 (field_entry);
								_g_object_unref0 (_field_entry_it);
								_g_object_unref0 (fields);
								_g_object_unref0 (_fields_it);
								return;
							}
						}
						_g_object_unref0 (_idx_it);
					}
					_g_object_unref0 (field_entry);
				}
				_g_object_unref0 (_field_entry_it);
			}
			_g_object_unref0 (fields);
		}
		_g_object_unref0 (_fields_it);
	}
}


static Block16Data* block16_data_ref (Block16Data* _data16_) {
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}


static void block16_data_unref (void * _userdata_) {
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data16_->self;
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}


static void __lambda34_ (Block16Data* _data16_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data16_->self;
	_tmp0_ = _data16_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda34__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
	__lambda34_ (self);
}


static void __lambda35_ (Block16Data* _data16_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data16_->self;
	_tmp0_ = _data16_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda35__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	__lambda35_ (self);
}


static void __lambda36_ (Block16Data* _data16_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data16_->self;
	_tmp0_ = _data16_->row;
	contacts_contact_editor_remove_row (self, _tmp0_);
}


static void ___lambda36__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda36_ (self);
}


static void contacts_contact_editor_attach_row_with_entry (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksAbstractFieldDetails* details, const gchar* value, const gchar* type) {
	Block16Data* _data16_;
	gint _tmp0_ = 0;
	ContactsTypeCombo* combo = NULL;
	ContactsTypeSet* _tmp1_ = NULL;
	ContactsTypeCombo* _tmp2_ = NULL;
	ContactsTypeCombo* _tmp3_ = NULL;
	ContactsTypeCombo* _tmp4_ = NULL;
	FolksAbstractFieldDetails* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	ContactsTypeCombo* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	GtkEntry* value_entry = NULL;
	GtkEntry* _tmp11_ = NULL;
	GtkEntry* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	GtkEntry* _tmp14_ = NULL;
	GtkEntry* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp17_ = NULL;
	GtkButton* _tmp18_ = NULL;
	AtkObject* _tmp19_ = NULL;
	const gchar* _tmp20_ = NULL;
	GtkImage* image = NULL;
	GtkImage* _tmp21_ = NULL;
	GtkButton* _tmp22_ = NULL;
	GtkImage* _tmp23_ = NULL;
	GtkButton* _tmp24_ = NULL;
	gint _tmp25_ = 0;
	ContactsTypeCombo* _tmp26_ = NULL;
	GtkEntry* _tmp27_ = NULL;
	GtkButton* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type_set != NULL);
	g_return_if_fail (details != NULL);
	g_return_if_fail (value != NULL);
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	_data16_->self = g_object_ref (self);
	_tmp0_ = row;
	_data16_->row = _tmp0_;
	_tmp1_ = type_set;
	_tmp2_ = contacts_typecombo_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	combo = _tmp2_;
	_tmp3_ = combo;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = combo;
	_tmp5_ = details;
	contacts_typecombo_set_active (_tmp4_, _tmp5_);
	_tmp6_ = type;
	if (_tmp6_ != NULL) {
		ContactsTypeCombo* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		_tmp7_ = combo;
		_tmp8_ = type;
		contacts_typecombo_set_to (_tmp7_, _tmp8_);
	}
	_tmp9_ = combo;
	_tmp10_ = _data16_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp9_, 0, _tmp10_, 1, 1);
	_tmp11_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp11_);
	value_entry = _tmp11_;
	_tmp12_ = value_entry;
	_tmp13_ = value;
	gtk_entry_set_text (_tmp12_, _tmp13_);
	_tmp14_ = value_entry;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = value_entry;
	_tmp16_ = _data16_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp15_, 1, _tmp16_, 1, 1);
	_tmp17_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp17_);
	delete_button = _tmp17_;
	_tmp18_ = delete_button;
	_tmp19_ = gtk_widget_get_accessible ((GtkWidget*) _tmp18_);
	_tmp20_ = _ ("Delete field");
	atk_object_set_name (_tmp19_, _tmp20_);
	_tmp21_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp21_);
	image = _tmp21_;
	_tmp22_ = delete_button;
	_tmp23_ = image;
	gtk_container_add ((GtkContainer*) _tmp22_, (GtkWidget*) _tmp23_);
	_tmp24_ = delete_button;
	_tmp25_ = _data16_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp24_, 3, _tmp25_, 1, 1);
	_tmp26_ = combo;
	g_signal_connect_data (_tmp26_, "changed", (GCallback) ___lambda34__contacts_typecombo_changed, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp27_ = value_entry;
	g_signal_connect_data ((GtkEditable*) _tmp27_, "changed", (GCallback) ___lambda35__gtk_editable_changed, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp28_ = delete_button;
	g_signal_connect_data (_tmp28_, "clicked", (GCallback) ___lambda36__gtk_button_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp29_ = value;
	if (g_strcmp0 (_tmp29_, "") == 0) {
		GtkEntry* _tmp30_ = NULL;
		_tmp30_ = value_entry;
		self->priv->focus_widget = (GtkWidget*) _tmp30_;
	}
	_g_object_unref0 (image);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (value_entry);
	_g_object_unref0 (combo);
	block16_data_unref (_data16_);
	_data16_ = NULL;
}


static Block17Data* block17_data_ref (Block17Data* _data17_) {
	g_atomic_int_inc (&_data17_->_ref_count_);
	return _data17_;
}


static void block17_data_unref (void * _userdata_) {
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data17_->self;
		_g_object_unref0 (self);
		g_slice_free (Block17Data, _data17_);
	}
}


static void __lambda37_ (Block17Data* _data17_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data17_->self;
	_tmp0_ = _data17_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda37__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	__lambda37_ (self);
}


static void __lambda38_ (Block17Data* _data17_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data17_->self;
	_tmp0_ = _data17_->row;
	contacts_contact_editor_remove_row (self, _tmp0_);
}


static void ___lambda38__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda38_ (self);
}


static void contacts_contact_editor_attach_row_with_entry_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row) {
	Block17Data* _data17_;
	gint _tmp0_ = 0;
	GtkLabel* title_label = NULL;
	const gchar* _tmp1_ = NULL;
	GtkLabel* _tmp2_ = NULL;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* _tmp4_ = NULL;
	GtkLabel* _tmp5_ = NULL;
	GtkLabel* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	GtkEntry* value_entry = NULL;
	GtkEntry* _tmp8_ = NULL;
	GtkEntry* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	GtkEntry* _tmp11_ = NULL;
	GtkEntry* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp14_ = NULL;
	GtkButton* _tmp15_ = NULL;
	AtkObject* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	GtkImage* image = NULL;
	GtkImage* _tmp18_ = NULL;
	GtkButton* _tmp19_ = NULL;
	GtkImage* _tmp20_ = NULL;
	GtkButton* _tmp21_ = NULL;
	gint _tmp22_ = 0;
	GtkEntry* _tmp23_ = NULL;
	GtkButton* _tmp24_ = NULL;
	const gchar* _tmp25_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (value != NULL);
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	_data17_->self = g_object_ref (self);
	_tmp0_ = row;
	_data17_->row = _tmp0_;
	_tmp1_ = title;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	title_label = _tmp2_;
	_tmp3_ = title_label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	_tmp5_ = title_label;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp5_, 6);
	_tmp6_ = title_label;
	_tmp7_ = _data17_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp6_, 0, _tmp7_, 1, 1);
	_tmp8_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp8_);
	value_entry = _tmp8_;
	_tmp9_ = value_entry;
	_tmp10_ = value;
	gtk_entry_set_text (_tmp9_, _tmp10_);
	_tmp11_ = value_entry;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp11_, TRUE);
	_tmp12_ = value_entry;
	_tmp13_ = _data17_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp12_, 1, _tmp13_, 1, 1);
	_tmp14_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp14_);
	delete_button = _tmp14_;
	_tmp15_ = delete_button;
	_tmp16_ = gtk_widget_get_accessible ((GtkWidget*) _tmp15_);
	_tmp17_ = _ ("Delete field");
	atk_object_set_name (_tmp16_, _tmp17_);
	_tmp18_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp18_);
	image = _tmp18_;
	_tmp19_ = delete_button;
	_tmp20_ = image;
	gtk_container_add ((GtkContainer*) _tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = delete_button;
	_tmp22_ = _data17_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp21_, 3, _tmp22_, 1, 1);
	_tmp23_ = value_entry;
	g_signal_connect_data ((GtkEditable*) _tmp23_, "changed", (GCallback) ___lambda37__gtk_editable_changed, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	_tmp24_ = delete_button;
	g_signal_connect_data (_tmp24_, "clicked", (GCallback) ___lambda38__gtk_button_clicked, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, G_CONNECT_AFTER);
	_tmp25_ = value;
	if (g_strcmp0 (_tmp25_, "") == 0) {
		GtkEntry* _tmp26_ = NULL;
		_tmp26_ = value_entry;
		self->priv->focus_widget = (GtkWidget*) _tmp26_;
	}
	_g_object_unref0 (image);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (value_entry);
	_g_object_unref0 (title_label);
	block17_data_unref (_data17_);
	_data17_ = NULL;
}


static Block18Data* block18_data_ref (Block18Data* _data18_) {
	g_atomic_int_inc (&_data18_->_ref_count_);
	return _data18_;
}


static void block18_data_unref (void * _userdata_) {
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data18_->self;
		_g_object_unref0 (self);
		g_slice_free (Block18Data, _data18_);
	}
}


static void __lambda39_ (Block18Data* _data18_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data18_->self;
	_tmp0_ = _data18_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda39__gtk_text_buffer_changed (GtkTextBuffer* _sender, gpointer self) {
	__lambda39_ (self);
}


static void __lambda40_ (Block18Data* _data18_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data18_->self;
	_tmp0_ = _data18_->row;
	contacts_contact_editor_remove_row (self, _tmp0_);
	contacts_contact_editor_set_has_notes_row (self, FALSE);
}


static void ___lambda40__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda40_ (self);
}


static void contacts_contact_editor_attach_row_with_text_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row) {
	Block18Data* _data18_;
	gint _tmp0_ = 0;
	GtkLabel* title_label = NULL;
	const gchar* _tmp1_ = NULL;
	GtkLabel* _tmp2_ = NULL;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* _tmp4_ = NULL;
	GtkLabel* _tmp5_ = NULL;
	GtkLabel* _tmp6_ = NULL;
	GtkLabel* _tmp7_ = NULL;
	GtkLabel* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	GtkScrolledWindow* sw = NULL;
	GtkScrolledWindow* _tmp10_ = NULL;
	GtkScrolledWindow* _tmp11_ = NULL;
	GtkScrolledWindow* _tmp12_ = NULL;
	GtkTextView* value_text = NULL;
	GtkTextView* _tmp13_ = NULL;
	GtkTextView* _tmp14_ = NULL;
	GtkTextBuffer* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GtkTextView* _tmp17_ = NULL;
	GtkTextView* _tmp18_ = NULL;
	GtkStyleContext* _tmp19_ = NULL;
	GtkScrolledWindow* _tmp20_ = NULL;
	GtkTextView* _tmp21_ = NULL;
	GtkScrolledWindow* _tmp22_ = NULL;
	gint _tmp23_ = 0;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp24_ = NULL;
	GtkButton* _tmp25_ = NULL;
	AtkObject* _tmp26_ = NULL;
	const gchar* _tmp27_ = NULL;
	GtkImage* image = NULL;
	GtkImage* _tmp28_ = NULL;
	GtkButton* _tmp29_ = NULL;
	GtkImage* _tmp30_ = NULL;
	GtkButton* _tmp31_ = NULL;
	GtkButton* _tmp32_ = NULL;
	gint _tmp33_ = 0;
	GtkTextView* _tmp34_ = NULL;
	GtkTextBuffer* _tmp35_ = NULL;
	GtkButton* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (value != NULL);
	_data18_ = g_slice_new0 (Block18Data);
	_data18_->_ref_count_ = 1;
	_data18_->self = g_object_ref (self);
	_tmp0_ = row;
	_data18_->row = _tmp0_;
	_tmp1_ = title;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	title_label = _tmp2_;
	_tmp3_ = title_label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = title_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp4_, GTK_ALIGN_START);
	_tmp5_ = title_label;
	gtk_widget_set_valign ((GtkWidget*) _tmp5_, GTK_ALIGN_START);
	_tmp6_ = title_label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 3);
	_tmp7_ = title_label;
	gtk_widget_set_margin_end ((GtkWidget*) _tmp7_, 6);
	_tmp8_ = title_label;
	_tmp9_ = _data18_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp8_, 0, _tmp9_, 1, 1);
	_tmp10_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp10_);
	sw = _tmp10_;
	_tmp11_ = sw;
	gtk_scrolled_window_set_shadow_type (_tmp11_, GTK_SHADOW_OUT);
	_tmp12_ = sw;
	gtk_widget_set_size_request ((GtkWidget*) _tmp12_, -1, 100);
	_tmp13_ = (GtkTextView*) gtk_text_view_new ();
	g_object_ref_sink (_tmp13_);
	value_text = _tmp13_;
	_tmp14_ = value_text;
	_tmp15_ = gtk_text_view_get_buffer (_tmp14_);
	_tmp16_ = value;
	gtk_text_buffer_set_text (_tmp15_, _tmp16_, -1);
	_tmp17_ = value_text;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, TRUE);
	_tmp18_ = value_text;
	_tmp19_ = gtk_widget_get_style_context ((GtkWidget*) _tmp18_);
	gtk_style_context_add_class (_tmp19_, "contacts-entry");
	_tmp20_ = sw;
	_tmp21_ = value_text;
	gtk_container_add ((GtkContainer*) _tmp20_, (GtkWidget*) _tmp21_);
	_tmp22_ = sw;
	_tmp23_ = _data18_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp22_, 1, _tmp23_, 1, 1);
	_tmp24_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp24_);
	delete_button = _tmp24_;
	_tmp25_ = delete_button;
	_tmp26_ = gtk_widget_get_accessible ((GtkWidget*) _tmp25_);
	_tmp27_ = _ ("Delete field");
	atk_object_set_name (_tmp26_, _tmp27_);
	_tmp28_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp28_);
	image = _tmp28_;
	_tmp29_ = delete_button;
	_tmp30_ = image;
	gtk_container_add ((GtkContainer*) _tmp29_, (GtkWidget*) _tmp30_);
	_tmp31_ = delete_button;
	gtk_widget_set_valign ((GtkWidget*) _tmp31_, GTK_ALIGN_START);
	_tmp32_ = delete_button;
	_tmp33_ = _data18_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp32_, 3, _tmp33_, 1, 1);
	_tmp34_ = value_text;
	_tmp35_ = gtk_text_view_get_buffer (_tmp34_);
	g_signal_connect_data (_tmp35_, "changed", (GCallback) ___lambda39__gtk_text_buffer_changed, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	_tmp36_ = delete_button;
	g_signal_connect_data (_tmp36_, "clicked", (GCallback) ___lambda40__gtk_button_clicked, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	_tmp37_ = value;
	if (g_strcmp0 (_tmp37_, "") == 0) {
		GtkTextView* _tmp38_ = NULL;
		_tmp38_ = value_text;
		self->priv->focus_widget = (GtkWidget*) _tmp38_;
	}
	_g_object_unref0 (image);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (value_text);
	_g_object_unref0 (sw);
	_g_object_unref0 (title_label);
	block18_data_unref (_data18_);
	_data18_ = NULL;
}


static Block19Data* block19_data_ref (Block19Data* _data19_) {
	g_atomic_int_inc (&_data19_->_ref_count_);
	return _data19_;
}


static void block19_data_unref (void * _userdata_) {
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data19_->self;
		(_data19_->fn_target_destroy_notify == NULL) ? NULL : (_data19_->fn_target_destroy_notify (_data19_->fn_target), NULL);
		_data19_->fn = NULL;
		_data19_->fn_target = NULL;
		_data19_->fn_target_destroy_notify = NULL;
		_g_object_unref0 (_data19_->year_spin);
		_g_object_unref0 (_data19_->combo);
		_g_object_unref0 (_data19_->day_spin);
		_g_object_unref0 (self);
		g_slice_free (Block19Data, _data19_);
	}
}


static gboolean _vala_int_array_contains (gint* stack, int stack_length, gint needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (needle == stack[i]) {
			return TRUE;
		}
	}
	return FALSE;
}


static void __lambda41_ (Block19Data* _data19_) {
	ContactsContactEditor* self;
	gint* month_of_31 = NULL;
	gint* _tmp0_ = NULL;
	gint month_of_31_length1 = 0;
	gint _month_of_31_size_ = 0;
	gint _tmp1_ = 0;
	gint* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	self = _data19_->self;
	_tmp0_ = g_new0 (gint, 4);
	_tmp0_[0] = 3;
	_tmp0_[1] = 5;
	_tmp0_[2] = 8;
	_tmp0_[3] = 10;
	month_of_31 = _tmp0_;
	month_of_31_length1 = 4;
	_month_of_31_size_ = month_of_31_length1;
	_tmp1_ = gtk_combo_box_get_active ((GtkComboBox*) _data19_->combo);
	_tmp2_ = month_of_31;
	_tmp2__length1 = month_of_31_length1;
	if (_vala_int_array_contains (_tmp2_, _tmp2__length1, _tmp1_)) {
		gtk_spin_button_set_range (_data19_->day_spin, (gdouble) 1, (gdouble) 30);
	} else {
		gint _tmp3_ = 0;
		_tmp3_ = gtk_combo_box_get_active ((GtkComboBox*) _data19_->combo);
		if (_tmp3_ == 1) {
			gboolean _tmp4_ = FALSE;
			gint _tmp5_ = 0;
			_tmp5_ = gtk_spin_button_get_value_as_int (_data19_->year_spin);
			if ((_tmp5_ % 4) == 0) {
				gint _tmp6_ = 0;
				_tmp6_ = gtk_spin_button_get_value_as_int (_data19_->year_spin);
				_tmp4_ = (_tmp6_ % 100) != 0;
			} else {
				_tmp4_ = FALSE;
			}
			if (_tmp4_) {
				gtk_spin_button_set_range (_data19_->day_spin, (gdouble) 1, (gdouble) 29);
			} else {
				gtk_spin_button_set_range (_data19_->day_spin, (gdouble) 1, (gdouble) 28);
			}
		}
	}
	month_of_31 = (g_free (month_of_31), NULL);
}


static void ___lambda41__contacts_contact_editor_adjusting_date_fn (gpointer self) {
	__lambda41_ (self);
}


static void __lambda42_ (Block19Data* _data19_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data19_->self;
	_tmp0_ = _data19_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda42__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	__lambda42_ (self);
}


static void __lambda43_ (Block19Data* _data19_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data19_->self;
	_tmp0_ = _data19_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
	_data19_->fn (_data19_->fn_target);
}


static void ___lambda43__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
	__lambda43_ (self);
}


static void __lambda44_ (Block19Data* _data19_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data19_->self;
	_tmp0_ = _data19_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
	_data19_->fn (_data19_->fn_target);
}


static void ___lambda44__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	__lambda44_ (self);
}


static void __lambda45_ (Block19Data* _data19_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data19_->self;
	_tmp0_ = _data19_->row;
	contacts_contact_editor_remove_row (self, _tmp0_);
	contacts_contact_editor_set_has_birthday_row (self, FALSE);
}


static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda45_ (self);
}


static void contacts_contact_editor_attach_row_for_birthday (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, GDateTime* birthday, gint row) {
	Block19Data* _data19_;
	gint _tmp0_ = 0;
	GtkLabel* title_label = NULL;
	const gchar* _tmp1_ = NULL;
	GtkLabel* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GtkGrid* box = NULL;
	GtkGrid* _tmp4_ = NULL;
	GtkSpinButton* _tmp5_ = NULL;
	GDateTime* _tmp6_ = NULL;
	GDateTime* _tmp7_ = NULL;
	GDateTime* _tmp8_ = NULL;
	gint _tmp9_ = 0;
	GtkComboBoxText* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	const gchar* _tmp17_ = NULL;
	const gchar* _tmp18_ = NULL;
	const gchar* _tmp19_ = NULL;
	const gchar* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	GDateTime* _tmp23_ = NULL;
	GDateTime* _tmp24_ = NULL;
	GDateTime* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	GtkStyleContext* _tmp27_ = NULL;
	GtkSpinButton* _tmp28_ = NULL;
	GDateTime* _tmp29_ = NULL;
	GDateTime* _tmp30_ = NULL;
	GDateTime* _tmp31_ = NULL;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp34_ = NULL;
	AtkObject* _tmp35_ = NULL;
	const gchar* _tmp36_ = NULL;
	GtkImage* image = NULL;
	GtkImage* _tmp37_ = NULL;
	gint _tmp38_ = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (title != NULL);
	g_return_if_fail (birthday != NULL);
	_data19_ = g_slice_new0 (Block19Data);
	_data19_->_ref_count_ = 1;
	_data19_->self = g_object_ref (self);
	_tmp0_ = row;
	_data19_->row = _tmp0_;
	_tmp1_ = title;
	_tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	title_label = _tmp2_;
	gtk_widget_set_hexpand ((GtkWidget*) title_label, FALSE);
	gtk_widget_set_halign ((GtkWidget*) title_label, GTK_ALIGN_START);
	gtk_widget_set_margin_end ((GtkWidget*) title_label, 6);
	_tmp3_ = _data19_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) title_label, 0, _tmp3_, 1, 1);
	_tmp4_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp4_);
	box = _tmp4_;
	gtk_grid_set_column_spacing (box, (guint) 12);
	_tmp5_ = (GtkSpinButton*) gtk_spin_button_new_with_range (1.0, 31.0, 1.0);
	g_object_ref_sink (_tmp5_);
	_data19_->day_spin = _tmp5_;
	gtk_spin_button_set_digits (_data19_->day_spin, (guint) 0);
	gtk_spin_button_set_numeric (_data19_->day_spin, TRUE);
	_tmp6_ = birthday;
	_tmp7_ = g_date_time_to_local (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_date_time_get_day_of_month (_tmp8_);
	gtk_spin_button_set_value (_data19_->day_spin, (gdouble) _tmp9_);
	_g_date_time_unref0 (_tmp8_);
	_tmp10_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
	g_object_ref_sink (_tmp10_);
	_data19_->combo = _tmp10_;
	_tmp11_ = _ ("January");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp11_);
	_tmp12_ = _ ("February");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp12_);
	_tmp13_ = _ ("March");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp13_);
	_tmp14_ = _ ("April");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp14_);
	_tmp15_ = _ ("May");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp15_);
	_tmp16_ = _ ("June");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp16_);
	_tmp17_ = _ ("July");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp17_);
	_tmp18_ = _ ("August");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp18_);
	_tmp19_ = _ ("September");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp19_);
	_tmp20_ = _ ("October");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp20_);
	_tmp21_ = _ ("November");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp21_);
	_tmp22_ = _ ("December");
	gtk_combo_box_text_append_text (_data19_->combo, _tmp22_);
	_tmp23_ = birthday;
	_tmp24_ = g_date_time_to_local (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_date_time_get_month (_tmp25_);
	gtk_combo_box_set_active ((GtkComboBox*) _data19_->combo, _tmp26_ - 1);
	_g_date_time_unref0 (_tmp25_);
	_tmp27_ = gtk_widget_get_style_context ((GtkWidget*) _data19_->combo);
	gtk_style_context_add_class (_tmp27_, "contacts-combo");
	gtk_widget_set_hexpand ((GtkWidget*) _data19_->combo, TRUE);
	_tmp28_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 1800, (gdouble) 3000, (gdouble) 1);
	g_object_ref_sink (_tmp28_);
	_data19_->year_spin = _tmp28_;
	gtk_spin_button_set_digits (_data19_->year_spin, (guint) 0);
	gtk_spin_button_set_numeric (_data19_->year_spin, TRUE);
	_tmp29_ = birthday;
	_tmp30_ = g_date_time_to_local (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = g_date_time_get_year (_tmp31_);
	gtk_spin_button_set_value (_data19_->year_spin, (gdouble) _tmp32_);
	_g_date_time_unref0 (_tmp31_);
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) _data19_->day_spin);
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) _data19_->combo);
	gtk_container_add ((GtkContainer*) box, (GtkWidget*) _data19_->year_spin);
	_tmp33_ = _data19_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) box, 1, _tmp33_, 1, 1);
	_tmp34_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp34_);
	delete_button = _tmp34_;
	_tmp35_ = gtk_widget_get_accessible ((GtkWidget*) delete_button);
	_tmp36_ = _ ("Delete field");
	atk_object_set_name (_tmp35_, _tmp36_);
	_tmp37_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp37_);
	image = _tmp37_;
	gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
	_tmp38_ = _data19_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp38_, 1, 1);
	_data19_->fn = ___lambda41__contacts_contact_editor_adjusting_date_fn;
	_data19_->fn_target = block19_data_ref (_data19_);
	_data19_->fn_target_destroy_notify = block19_data_unref;
	g_signal_connect_data ((GtkEditable*) _data19_->day_spin, "changed", (GCallback) ___lambda42__gtk_editable_changed, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
	g_signal_connect_data ((GtkComboBox*) _data19_->combo, "changed", (GCallback) ___lambda43__gtk_combo_box_changed, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
	g_signal_connect_data ((GtkEditable*) _data19_->year_spin, "changed", (GCallback) ___lambda44__gtk_editable_changed, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
	g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda45__gtk_button_clicked, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
	_g_object_unref0 (image);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (box);
	_g_object_unref0 (title_label);
	block19_data_unref (_data19_);
	_data19_ = NULL;
}


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


static void block20_data_unref (void * _userdata_) {
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data20_->self;
		_g_object_unref0 (self);
		g_slice_free (Block20Data, _data20_);
	}
}


static void __lambda46_ (Block20Data* _data20_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data20_->self;
	_tmp0_ = _data20_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda46__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
	__lambda46_ (self);
}


static void __lambda47_ (Block20Data* _data20_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data20_->self;
	_tmp0_ = _data20_->row;
	contacts_contact_editor_set_field_changed (self, _tmp0_);
}


static void ___lambda47__contacts_address_editor_changed (ContactsAddressEditor* _sender, gpointer self) {
	__lambda47_ (self);
}


static void __lambda48_ (Block20Data* _data20_) {
	ContactsContactEditor* self;
	gint _tmp0_ = 0;
	self = _data20_->self;
	_tmp0_ = _data20_->row;
	contacts_contact_editor_remove_row (self, _tmp0_);
}


static void ___lambda48__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda48_ (self);
}


static void contacts_contact_editor_attach_row_for_address (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksPostalAddressFieldDetails* details, const gchar* type) {
	Block20Data* _data20_;
	gint _tmp0_ = 0;
	ContactsTypeCombo* combo = NULL;
	ContactsTypeSet* _tmp1_ = NULL;
	ContactsTypeCombo* _tmp2_ = NULL;
	ContactsTypeCombo* _tmp3_ = NULL;
	ContactsTypeCombo* _tmp4_ = NULL;
	FolksPostalAddressFieldDetails* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	ContactsTypeCombo* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	ContactsAddressEditor* value_address = NULL;
	FolksPostalAddressFieldDetails* _tmp11_ = NULL;
	ContactsAddressEditor* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	GtkButton* delete_button = NULL;
	GtkButton* _tmp14_ = NULL;
	AtkObject* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	GtkImage* image = NULL;
	GtkImage* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	ContactsTypeCombo* _tmp19_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type_set != NULL);
	g_return_if_fail (details != NULL);
	_data20_ = g_slice_new0 (Block20Data);
	_data20_->_ref_count_ = 1;
	_data20_->self = g_object_ref (self);
	_tmp0_ = row;
	_data20_->row = _tmp0_;
	_tmp1_ = type_set;
	_tmp2_ = contacts_typecombo_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	combo = _tmp2_;
	_tmp3_ = combo;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
	_tmp4_ = combo;
	_tmp5_ = details;
	contacts_typecombo_set_active (_tmp4_, (FolksAbstractFieldDetails*) _tmp5_);
	_tmp6_ = type;
	if (_tmp6_ != NULL) {
		ContactsTypeCombo* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		_tmp7_ = combo;
		_tmp8_ = type;
		contacts_typecombo_set_to (_tmp7_, _tmp8_);
	}
	_tmp9_ = combo;
	_tmp10_ = _data20_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp9_, 0, _tmp10_, 1, 1);
	_tmp11_ = details;
	_tmp12_ = contacts_address_editor_new (_tmp11_);
	g_object_ref_sink (_tmp12_);
	value_address = _tmp12_;
	_tmp13_ = _data20_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) value_address, 1, _tmp13_, 1, 1);
	_tmp14_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp14_);
	delete_button = _tmp14_;
	_tmp15_ = gtk_widget_get_accessible ((GtkWidget*) delete_button);
	_tmp16_ = _ ("Delete field");
	atk_object_set_name (_tmp15_, _tmp16_);
	_tmp17_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp17_);
	image = _tmp17_;
	gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
	gtk_widget_set_valign ((GtkWidget*) delete_button, GTK_ALIGN_START);
	_tmp18_ = _data20_->row;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp18_, 1, 1);
	_tmp19_ = combo;
	g_signal_connect_data (_tmp19_, "changed", (GCallback) ___lambda46__contacts_typecombo_changed, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	g_signal_connect_data (value_address, "changed", (GCallback) ___lambda47__contacts_address_editor_changed, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda48__gtk_button_clicked, block20_data_ref (_data20_), (GClosureNotify) block20_data_unref, 0);
	self->priv->focus_widget = (GtkWidget*) value_address;
	_g_object_unref0 (image);
	_g_object_unref0 (delete_button);
	_g_object_unref0 (value_address);
	_g_object_unref0 (combo);
	block20_data_unref (_data20_);
	_data20_ = NULL;
}


static void ____lambda49_ (ContactsContactEditor* self) {
	contacts_contact_editor_set_has_nickname_row (self, FALSE);
}


static void _____lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	____lambda49_ ((ContactsContactEditor*) self);
}


static void contacts_contact_editor_add_edit_row (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, gint* row, gboolean add_empty, const gchar* type) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (p != NULL);
	g_return_if_fail (prop_name != NULL);
	_tmp0_ = prop_name;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("email-addresses")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp4_ = NULL;
				gboolean _tmp5_ = FALSE;
				GeeHashMap* _tmp47_ = NULL;
				gboolean _tmp48_ = FALSE;
				gboolean _tmp49_ = FALSE;
				_tmp4_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp4_;
				_tmp5_ = add_empty;
				if (_tmp5_) {
					FolksEmailFieldDetails* detail_field = NULL;
					FolksEmailFieldDetails* _tmp6_ = NULL;
					gint _tmp7_ = 0;
					ContactsTypeSet* _tmp8_ = NULL;
					ContactsTypeSet* _tmp9_ = NULL;
					FolksEmailFieldDetails* _tmp10_ = NULL;
					const gchar* _tmp11_ = NULL;
					GeeHashMap* _tmp12_ = NULL;
					gint _tmp13_ = 0;
					FolksEmailFieldDetails* _tmp14_ = NULL;
					ContactsContactEditorRowData _tmp15_ = {0};
					gint _tmp16_ = 0;
					_tmp6_ = folks_email_field_details_new ("", NULL);
					detail_field = _tmp6_;
					_tmp7_ = *row;
					_tmp8_ = contacts_typeset_get_email ();
					_tmp9_ = _tmp8_;
					_tmp10_ = detail_field;
					_tmp11_ = type;
					contacts_contact_editor_attach_row_with_entry (self, _tmp7_, _tmp9_, (FolksAbstractFieldDetails*) _tmp10_, "", _tmp11_);
					_tmp12_ = rows;
					_tmp13_ = *row;
					_tmp14_ = detail_field;
					_g_object_unref0 (_tmp15_.details);
					_tmp15_.details = (FolksAbstractFieldDetails*) _tmp14_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, (gpointer) ((gintptr) _tmp13_), &_tmp15_);
					_tmp16_ = *row;
					*row = _tmp16_ + 1;
					_g_object_unref0 (detail_field);
				} else {
					FolksEmailDetails* details = NULL;
					FolksPersona* _tmp17_ = NULL;
					FolksEmailDetails* _tmp18_ = NULL;
					FolksEmailDetails* _tmp19_ = NULL;
					_tmp17_ = p;
					_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _tmp17_) : NULL);
					details = _tmp18_;
					_tmp19_ = details;
					if (_tmp19_ != NULL) {
						GeeArrayList* emails = NULL;
						FolksEmailDetails* _tmp20_ = NULL;
						GeeSet* _tmp21_ = NULL;
						GeeSet* _tmp22_ = NULL;
						GeeArrayList* _tmp23_ = NULL;
						_tmp20_ = details;
						_tmp21_ = folks_email_details_get_email_addresses (_tmp20_);
						_tmp22_ = _tmp21_;
						_tmp23_ = contacts_contact_sort_fields (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeCollection*) _tmp22_);
						emails = _tmp23_;
						{
							GeeArrayList* _email_list = NULL;
							GeeArrayList* _tmp24_ = NULL;
							GeeArrayList* _tmp25_ = NULL;
							gint _email_size = 0;
							GeeArrayList* _tmp26_ = NULL;
							gint _tmp27_ = 0;
							gint _tmp28_ = 0;
							gint _email_index = 0;
							_tmp24_ = emails;
							_tmp25_ = _g_object_ref0 (_tmp24_);
							_email_list = _tmp25_;
							_tmp26_ = _email_list;
							_tmp27_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp26_);
							_tmp28_ = _tmp27_;
							_email_size = _tmp28_;
							_email_index = -1;
							while (TRUE) {
								gint _tmp29_ = 0;
								gint _tmp30_ = 0;
								gint _tmp31_ = 0;
								FolksEmailFieldDetails* email = NULL;
								GeeArrayList* _tmp32_ = NULL;
								gint _tmp33_ = 0;
								gpointer _tmp34_ = NULL;
								gint _tmp35_ = 0;
								ContactsTypeSet* _tmp36_ = NULL;
								ContactsTypeSet* _tmp37_ = NULL;
								FolksEmailFieldDetails* _tmp38_ = NULL;
								FolksEmailFieldDetails* _tmp39_ = NULL;
								gconstpointer _tmp40_ = NULL;
								const gchar* _tmp41_ = NULL;
								GeeHashMap* _tmp42_ = NULL;
								gint _tmp43_ = 0;
								FolksEmailFieldDetails* _tmp44_ = NULL;
								ContactsContactEditorRowData _tmp45_ = {0};
								gint _tmp46_ = 0;
								_tmp29_ = _email_index;
								_email_index = _tmp29_ + 1;
								_tmp30_ = _email_index;
								_tmp31_ = _email_size;
								if (!(_tmp30_ < _tmp31_)) {
									break;
								}
								_tmp32_ = _email_list;
								_tmp33_ = _email_index;
								_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, _tmp33_);
								email = (FolksEmailFieldDetails*) _tmp34_;
								_tmp35_ = *row;
								_tmp36_ = contacts_typeset_get_email ();
								_tmp37_ = _tmp36_;
								_tmp38_ = email;
								_tmp39_ = email;
								_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
								_tmp41_ = _tmp40_;
								contacts_contact_editor_attach_row_with_entry (self, _tmp35_, _tmp37_, (FolksAbstractFieldDetails*) _tmp38_, (const gchar*) _tmp41_, NULL);
								_tmp42_ = rows;
								_tmp43_ = *row;
								_tmp44_ = email;
								_g_object_unref0 (_tmp45_.details);
								_tmp45_.details = (FolksAbstractFieldDetails*) _tmp44_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp42_, (gpointer) ((gintptr) _tmp43_), &_tmp45_);
								_tmp46_ = *row;
								*row = _tmp46_ + 1;
								_g_object_unref0 (email);
							}
							_g_object_unref0 (_email_list);
						}
						_g_object_unref0 (emails);
					}
					_g_object_unref0 (details);
				}
				_tmp47_ = rows;
				_tmp48_ = gee_map_get_is_empty ((GeeMap*) _tmp47_);
				_tmp49_ = _tmp48_;
				if (!_tmp49_) {
					GeeHashMap* _tmp50_ = NULL;
					FolksPersona* _tmp51_ = NULL;
					gpointer _tmp52_ = NULL;
					GeeHashMap* _tmp53_ = NULL;
					const gchar* _tmp54_ = NULL;
					gboolean _tmp55_ = FALSE;
					gboolean _tmp56_ = FALSE;
					_tmp50_ = self->priv->writable_personas;
					_tmp51_ = p;
					_tmp52_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp50_, _tmp51_);
					_tmp53_ = (GeeHashMap*) _tmp52_;
					_tmp54_ = prop_name;
					_tmp55_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp53_, _tmp54_);
					_tmp56_ = _tmp55_;
					_g_object_unref0 (_tmp53_);
					if (_tmp56_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp57_ = NULL;
							GeeSet* _tmp58_ = NULL;
							GeeSet* _tmp59_ = NULL;
							GeeSet* _tmp60_ = NULL;
							GeeIterator* _tmp61_ = NULL;
							GeeIterator* _tmp62_ = NULL;
							_tmp57_ = rows;
							_tmp58_ = gee_abstract_map_get_entries ((GeeMap*) _tmp57_);
							_tmp59_ = _tmp58_;
							_tmp60_ = _tmp59_;
							_tmp61_ = gee_iterable_iterator ((GeeIterable*) _tmp60_);
							_tmp62_ = _tmp61_;
							_g_object_unref0 (_tmp60_);
							_entry_it = _tmp62_;
							while (TRUE) {
								GeeIterator* _tmp63_ = NULL;
								gboolean _tmp64_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp65_ = NULL;
								gpointer _tmp66_ = NULL;
								GeeHashMap* _tmp67_ = NULL;
								FolksPersona* _tmp68_ = NULL;
								gpointer _tmp69_ = NULL;
								GeeHashMap* _tmp70_ = NULL;
								const gchar* _tmp71_ = NULL;
								gpointer _tmp72_ = NULL;
								ContactsContactEditorField* _tmp73_ = NULL;
								GeeHashMap* _tmp74_ = NULL;
								GeeMapEntry* _tmp75_ = NULL;
								gconstpointer _tmp76_ = NULL;
								gint _tmp77_ = 0;
								GeeMapEntry* _tmp78_ = NULL;
								gconstpointer _tmp79_ = NULL;
								ContactsContactEditorRowData* _tmp80_ = NULL;
								_tmp63_ = _entry_it;
								_tmp64_ = gee_iterator_next (_tmp63_);
								if (!_tmp64_) {
									break;
								}
								_tmp65_ = _entry_it;
								_tmp66_ = gee_iterator_get (_tmp65_);
								entry = (GeeMapEntry*) _tmp66_;
								_tmp67_ = self->priv->writable_personas;
								_tmp68_ = p;
								_tmp69_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp67_, _tmp68_);
								_tmp70_ = (GeeHashMap*) _tmp69_;
								_tmp71_ = prop_name;
								_tmp72_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp70_, _tmp71_);
								_tmp73_ = (ContactsContactEditorField*) _tmp72_;
								_tmp74_ = (*_tmp73_).rows;
								_tmp75_ = entry;
								_tmp76_ = gee_map_entry_get_key (_tmp75_);
								_tmp77_ = _tmp76_;
								_tmp78_ = entry;
								_tmp79_ = gee_map_entry_get_value (_tmp78_);
								_tmp80_ = _tmp79_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp74_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp77_))), (ContactsContactEditorRowData*) _tmp80_);
								_contacts_contact_editor_field_free0 (_tmp73_);
								_g_object_unref0 (_tmp70_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp81_ = NULL;
						FolksPersona* _tmp82_ = NULL;
						gpointer _tmp83_ = NULL;
						GeeHashMap* _tmp84_ = NULL;
						const gchar* _tmp85_ = NULL;
						GeeHashMap* _tmp86_ = NULL;
						ContactsContactEditorField _tmp87_ = {0};
						_tmp81_ = self->priv->writable_personas;
						_tmp82_ = p;
						_tmp83_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp81_, _tmp82_);
						_tmp84_ = (GeeHashMap*) _tmp83_;
						_tmp85_ = prop_name;
						_tmp86_ = rows;
						_tmp87_.changed = FALSE;
						_g_object_unref0 (_tmp87_.rows);
						_tmp87_.rows = _tmp86_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, _tmp85_, &_tmp87_);
						_g_object_unref0 (_tmp84_);
					}
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("phone-numbers")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp88_ = NULL;
				gboolean _tmp89_ = FALSE;
				GeeHashMap* _tmp132_ = NULL;
				gboolean _tmp133_ = FALSE;
				gboolean _tmp134_ = FALSE;
				_tmp88_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp88_;
				_tmp89_ = add_empty;
				if (_tmp89_) {
					FolksPhoneFieldDetails* detail_field = NULL;
					FolksPhoneFieldDetails* _tmp90_ = NULL;
					gint _tmp91_ = 0;
					ContactsTypeSet* _tmp92_ = NULL;
					ContactsTypeSet* _tmp93_ = NULL;
					FolksPhoneFieldDetails* _tmp94_ = NULL;
					const gchar* _tmp95_ = NULL;
					GeeHashMap* _tmp96_ = NULL;
					gint _tmp97_ = 0;
					FolksPhoneFieldDetails* _tmp98_ = NULL;
					ContactsContactEditorRowData _tmp99_ = {0};
					gint _tmp100_ = 0;
					_tmp90_ = folks_phone_field_details_new ("", NULL);
					detail_field = _tmp90_;
					_tmp91_ = *row;
					_tmp92_ = contacts_typeset_get_phone ();
					_tmp93_ = _tmp92_;
					_tmp94_ = detail_field;
					_tmp95_ = type;
					contacts_contact_editor_attach_row_with_entry (self, _tmp91_, _tmp93_, (FolksAbstractFieldDetails*) _tmp94_, "", _tmp95_);
					_tmp96_ = rows;
					_tmp97_ = *row;
					_tmp98_ = detail_field;
					_g_object_unref0 (_tmp99_.details);
					_tmp99_.details = (FolksAbstractFieldDetails*) _tmp98_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp96_, (gpointer) ((gintptr) _tmp97_), &_tmp99_);
					_tmp100_ = *row;
					*row = _tmp100_ + 1;
					_g_object_unref0 (detail_field);
				} else {
					FolksPhoneDetails* details = NULL;
					FolksPersona* _tmp101_ = NULL;
					FolksPhoneDetails* _tmp102_ = NULL;
					FolksPhoneDetails* _tmp103_ = NULL;
					_tmp101_ = p;
					_tmp102_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp101_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _tmp101_) : NULL);
					details = _tmp102_;
					_tmp103_ = details;
					if (_tmp103_ != NULL) {
						GeeArrayList* phones = NULL;
						FolksPhoneDetails* _tmp104_ = NULL;
						GeeSet* _tmp105_ = NULL;
						GeeSet* _tmp106_ = NULL;
						GeeArrayList* _tmp107_ = NULL;
						_tmp104_ = details;
						_tmp105_ = folks_phone_details_get_phone_numbers (_tmp104_);
						_tmp106_ = _tmp105_;
						_tmp107_ = contacts_contact_sort_fields (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeCollection*) _tmp106_);
						phones = _tmp107_;
						{
							GeeArrayList* _phone_list = NULL;
							GeeArrayList* _tmp108_ = NULL;
							GeeArrayList* _tmp109_ = NULL;
							gint _phone_size = 0;
							GeeArrayList* _tmp110_ = NULL;
							gint _tmp111_ = 0;
							gint _tmp112_ = 0;
							gint _phone_index = 0;
							_tmp108_ = phones;
							_tmp109_ = _g_object_ref0 (_tmp108_);
							_phone_list = _tmp109_;
							_tmp110_ = _phone_list;
							_tmp111_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp110_);
							_tmp112_ = _tmp111_;
							_phone_size = _tmp112_;
							_phone_index = -1;
							while (TRUE) {
								gint _tmp113_ = 0;
								gint _tmp114_ = 0;
								gint _tmp115_ = 0;
								FolksPhoneFieldDetails* phone = NULL;
								GeeArrayList* _tmp116_ = NULL;
								gint _tmp117_ = 0;
								gpointer _tmp118_ = NULL;
								gint _tmp119_ = 0;
								ContactsTypeSet* _tmp120_ = NULL;
								ContactsTypeSet* _tmp121_ = NULL;
								FolksPhoneFieldDetails* _tmp122_ = NULL;
								FolksPhoneFieldDetails* _tmp123_ = NULL;
								gconstpointer _tmp124_ = NULL;
								const gchar* _tmp125_ = NULL;
								const gchar* _tmp126_ = NULL;
								GeeHashMap* _tmp127_ = NULL;
								gint _tmp128_ = 0;
								FolksPhoneFieldDetails* _tmp129_ = NULL;
								ContactsContactEditorRowData _tmp130_ = {0};
								gint _tmp131_ = 0;
								_tmp113_ = _phone_index;
								_phone_index = _tmp113_ + 1;
								_tmp114_ = _phone_index;
								_tmp115_ = _phone_size;
								if (!(_tmp114_ < _tmp115_)) {
									break;
								}
								_tmp116_ = _phone_list;
								_tmp117_ = _phone_index;
								_tmp118_ = gee_abstract_list_get ((GeeAbstractList*) _tmp116_, _tmp117_);
								phone = (FolksPhoneFieldDetails*) _tmp118_;
								_tmp119_ = *row;
								_tmp120_ = contacts_typeset_get_phone ();
								_tmp121_ = _tmp120_;
								_tmp122_ = phone;
								_tmp123_ = phone;
								_tmp124_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp123_);
								_tmp125_ = _tmp124_;
								_tmp126_ = type;
								contacts_contact_editor_attach_row_with_entry (self, _tmp119_, _tmp121_, (FolksAbstractFieldDetails*) _tmp122_, (const gchar*) _tmp125_, _tmp126_);
								_tmp127_ = rows;
								_tmp128_ = *row;
								_tmp129_ = phone;
								_g_object_unref0 (_tmp130_.details);
								_tmp130_.details = (FolksAbstractFieldDetails*) _tmp129_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp127_, (gpointer) ((gintptr) _tmp128_), &_tmp130_);
								_tmp131_ = *row;
								*row = _tmp131_ + 1;
								_g_object_unref0 (phone);
							}
							_g_object_unref0 (_phone_list);
						}
						_g_object_unref0 (phones);
					}
					_g_object_unref0 (details);
				}
				_tmp132_ = rows;
				_tmp133_ = gee_map_get_is_empty ((GeeMap*) _tmp132_);
				_tmp134_ = _tmp133_;
				if (!_tmp134_) {
					GeeHashMap* _tmp135_ = NULL;
					FolksPersona* _tmp136_ = NULL;
					gpointer _tmp137_ = NULL;
					GeeHashMap* _tmp138_ = NULL;
					const gchar* _tmp139_ = NULL;
					gboolean _tmp140_ = FALSE;
					gboolean _tmp141_ = FALSE;
					_tmp135_ = self->priv->writable_personas;
					_tmp136_ = p;
					_tmp137_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp135_, _tmp136_);
					_tmp138_ = (GeeHashMap*) _tmp137_;
					_tmp139_ = prop_name;
					_tmp140_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp138_, _tmp139_);
					_tmp141_ = _tmp140_;
					_g_object_unref0 (_tmp138_);
					if (_tmp141_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp142_ = NULL;
							GeeSet* _tmp143_ = NULL;
							GeeSet* _tmp144_ = NULL;
							GeeSet* _tmp145_ = NULL;
							GeeIterator* _tmp146_ = NULL;
							GeeIterator* _tmp147_ = NULL;
							_tmp142_ = rows;
							_tmp143_ = gee_abstract_map_get_entries ((GeeMap*) _tmp142_);
							_tmp144_ = _tmp143_;
							_tmp145_ = _tmp144_;
							_tmp146_ = gee_iterable_iterator ((GeeIterable*) _tmp145_);
							_tmp147_ = _tmp146_;
							_g_object_unref0 (_tmp145_);
							_entry_it = _tmp147_;
							while (TRUE) {
								GeeIterator* _tmp148_ = NULL;
								gboolean _tmp149_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp150_ = NULL;
								gpointer _tmp151_ = NULL;
								GeeHashMap* _tmp152_ = NULL;
								FolksPersona* _tmp153_ = NULL;
								gpointer _tmp154_ = NULL;
								GeeHashMap* _tmp155_ = NULL;
								const gchar* _tmp156_ = NULL;
								gpointer _tmp157_ = NULL;
								ContactsContactEditorField* _tmp158_ = NULL;
								GeeHashMap* _tmp159_ = NULL;
								GeeMapEntry* _tmp160_ = NULL;
								gconstpointer _tmp161_ = NULL;
								gint _tmp162_ = 0;
								GeeMapEntry* _tmp163_ = NULL;
								gconstpointer _tmp164_ = NULL;
								ContactsContactEditorRowData* _tmp165_ = NULL;
								_tmp148_ = _entry_it;
								_tmp149_ = gee_iterator_next (_tmp148_);
								if (!_tmp149_) {
									break;
								}
								_tmp150_ = _entry_it;
								_tmp151_ = gee_iterator_get (_tmp150_);
								entry = (GeeMapEntry*) _tmp151_;
								_tmp152_ = self->priv->writable_personas;
								_tmp153_ = p;
								_tmp154_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp152_, _tmp153_);
								_tmp155_ = (GeeHashMap*) _tmp154_;
								_tmp156_ = prop_name;
								_tmp157_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp155_, _tmp156_);
								_tmp158_ = (ContactsContactEditorField*) _tmp157_;
								_tmp159_ = (*_tmp158_).rows;
								_tmp160_ = entry;
								_tmp161_ = gee_map_entry_get_key (_tmp160_);
								_tmp162_ = _tmp161_;
								_tmp163_ = entry;
								_tmp164_ = gee_map_entry_get_value (_tmp163_);
								_tmp165_ = _tmp164_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp159_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp162_))), (ContactsContactEditorRowData*) _tmp165_);
								_contacts_contact_editor_field_free0 (_tmp158_);
								_g_object_unref0 (_tmp155_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp166_ = NULL;
						FolksPersona* _tmp167_ = NULL;
						gpointer _tmp168_ = NULL;
						GeeHashMap* _tmp169_ = NULL;
						const gchar* _tmp170_ = NULL;
						GeeHashMap* _tmp171_ = NULL;
						ContactsContactEditorField _tmp172_ = {0};
						_tmp166_ = self->priv->writable_personas;
						_tmp167_ = p;
						_tmp168_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp166_, _tmp167_);
						_tmp169_ = (GeeHashMap*) _tmp168_;
						_tmp170_ = prop_name;
						_tmp171_ = rows;
						_tmp172_.changed = FALSE;
						_g_object_unref0 (_tmp172_.rows);
						_tmp172_.rows = _tmp171_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp169_, _tmp170_, &_tmp172_);
						_g_object_unref0 (_tmp169_);
					}
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("urls")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp173_ = NULL;
				gboolean _tmp174_ = FALSE;
				GeeHashMap* _tmp206_ = NULL;
				gboolean _tmp207_ = FALSE;
				gboolean _tmp208_ = FALSE;
				_tmp173_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp173_;
				_tmp174_ = add_empty;
				if (_tmp174_) {
					FolksUrlFieldDetails* detail_field = NULL;
					FolksUrlFieldDetails* _tmp175_ = NULL;
					const gchar* _tmp176_ = NULL;
					FolksUrlFieldDetails* _tmp177_ = NULL;
					gint _tmp178_ = 0;
					GeeHashMap* _tmp179_ = NULL;
					gint _tmp180_ = 0;
					FolksUrlFieldDetails* _tmp181_ = NULL;
					ContactsContactEditorRowData _tmp182_ = {0};
					gint _tmp183_ = 0;
					_tmp175_ = folks_url_field_details_new ("", NULL);
					detail_field = _tmp175_;
					_tmp176_ = _ ("Website");
					_tmp177_ = detail_field;
					_tmp178_ = *row;
					contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp176_, (FolksAbstractFieldDetails*) _tmp177_, "", _tmp178_);
					_tmp179_ = rows;
					_tmp180_ = *row;
					_tmp181_ = detail_field;
					_g_object_unref0 (_tmp182_.details);
					_tmp182_.details = (FolksAbstractFieldDetails*) _tmp181_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp179_, (gpointer) ((gintptr) _tmp180_), &_tmp182_);
					_tmp183_ = *row;
					*row = _tmp183_ + 1;
					_g_object_unref0 (detail_field);
				} else {
					FolksUrlDetails* url_details = NULL;
					FolksPersona* _tmp184_ = NULL;
					FolksUrlDetails* _tmp185_ = NULL;
					FolksUrlDetails* _tmp186_ = NULL;
					_tmp184_ = p;
					_tmp185_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp184_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _tmp184_) : NULL);
					url_details = _tmp185_;
					_tmp186_ = url_details;
					if (_tmp186_ != NULL) {
						{
							GeeIterator* _url_it = NULL;
							FolksUrlDetails* _tmp187_ = NULL;
							GeeSet* _tmp188_ = NULL;
							GeeSet* _tmp189_ = NULL;
							GeeIterator* _tmp190_ = NULL;
							_tmp187_ = url_details;
							_tmp188_ = folks_url_details_get_urls (_tmp187_);
							_tmp189_ = _tmp188_;
							_tmp190_ = gee_iterable_iterator ((GeeIterable*) _tmp189_);
							_url_it = _tmp190_;
							while (TRUE) {
								GeeIterator* _tmp191_ = NULL;
								gboolean _tmp192_ = FALSE;
								FolksUrlFieldDetails* url = NULL;
								GeeIterator* _tmp193_ = NULL;
								gpointer _tmp194_ = NULL;
								const gchar* _tmp195_ = NULL;
								FolksUrlFieldDetails* _tmp196_ = NULL;
								FolksUrlFieldDetails* _tmp197_ = NULL;
								gconstpointer _tmp198_ = NULL;
								const gchar* _tmp199_ = NULL;
								gint _tmp200_ = 0;
								GeeHashMap* _tmp201_ = NULL;
								gint _tmp202_ = 0;
								FolksUrlFieldDetails* _tmp203_ = NULL;
								ContactsContactEditorRowData _tmp204_ = {0};
								gint _tmp205_ = 0;
								_tmp191_ = _url_it;
								_tmp192_ = gee_iterator_next (_tmp191_);
								if (!_tmp192_) {
									break;
								}
								_tmp193_ = _url_it;
								_tmp194_ = gee_iterator_get (_tmp193_);
								url = (FolksUrlFieldDetails*) _tmp194_;
								_tmp195_ = _ ("Website");
								_tmp196_ = url;
								_tmp197_ = url;
								_tmp198_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp197_);
								_tmp199_ = _tmp198_;
								_tmp200_ = *row;
								contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp195_, (FolksAbstractFieldDetails*) _tmp196_, (const gchar*) _tmp199_, _tmp200_);
								_tmp201_ = rows;
								_tmp202_ = *row;
								_tmp203_ = url;
								_g_object_unref0 (_tmp204_.details);
								_tmp204_.details = (FolksAbstractFieldDetails*) _tmp203_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp201_, (gpointer) ((gintptr) _tmp202_), &_tmp204_);
								_tmp205_ = *row;
								*row = _tmp205_ + 1;
								_g_object_unref0 (url);
							}
							_g_object_unref0 (_url_it);
						}
					}
					_g_object_unref0 (url_details);
				}
				_tmp206_ = rows;
				_tmp207_ = gee_map_get_is_empty ((GeeMap*) _tmp206_);
				_tmp208_ = _tmp207_;
				if (!_tmp208_) {
					GeeHashMap* _tmp209_ = NULL;
					FolksPersona* _tmp210_ = NULL;
					gpointer _tmp211_ = NULL;
					GeeHashMap* _tmp212_ = NULL;
					const gchar* _tmp213_ = NULL;
					gboolean _tmp214_ = FALSE;
					gboolean _tmp215_ = FALSE;
					_tmp209_ = self->priv->writable_personas;
					_tmp210_ = p;
					_tmp211_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp209_, _tmp210_);
					_tmp212_ = (GeeHashMap*) _tmp211_;
					_tmp213_ = prop_name;
					_tmp214_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp212_, _tmp213_);
					_tmp215_ = _tmp214_;
					_g_object_unref0 (_tmp212_);
					if (_tmp215_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp216_ = NULL;
							GeeSet* _tmp217_ = NULL;
							GeeSet* _tmp218_ = NULL;
							GeeSet* _tmp219_ = NULL;
							GeeIterator* _tmp220_ = NULL;
							GeeIterator* _tmp221_ = NULL;
							_tmp216_ = rows;
							_tmp217_ = gee_abstract_map_get_entries ((GeeMap*) _tmp216_);
							_tmp218_ = _tmp217_;
							_tmp219_ = _tmp218_;
							_tmp220_ = gee_iterable_iterator ((GeeIterable*) _tmp219_);
							_tmp221_ = _tmp220_;
							_g_object_unref0 (_tmp219_);
							_entry_it = _tmp221_;
							while (TRUE) {
								GeeIterator* _tmp222_ = NULL;
								gboolean _tmp223_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp224_ = NULL;
								gpointer _tmp225_ = NULL;
								GeeHashMap* _tmp226_ = NULL;
								FolksPersona* _tmp227_ = NULL;
								gpointer _tmp228_ = NULL;
								GeeHashMap* _tmp229_ = NULL;
								const gchar* _tmp230_ = NULL;
								gpointer _tmp231_ = NULL;
								ContactsContactEditorField* _tmp232_ = NULL;
								GeeHashMap* _tmp233_ = NULL;
								GeeMapEntry* _tmp234_ = NULL;
								gconstpointer _tmp235_ = NULL;
								gint _tmp236_ = 0;
								GeeMapEntry* _tmp237_ = NULL;
								gconstpointer _tmp238_ = NULL;
								ContactsContactEditorRowData* _tmp239_ = NULL;
								_tmp222_ = _entry_it;
								_tmp223_ = gee_iterator_next (_tmp222_);
								if (!_tmp223_) {
									break;
								}
								_tmp224_ = _entry_it;
								_tmp225_ = gee_iterator_get (_tmp224_);
								entry = (GeeMapEntry*) _tmp225_;
								_tmp226_ = self->priv->writable_personas;
								_tmp227_ = p;
								_tmp228_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp226_, _tmp227_);
								_tmp229_ = (GeeHashMap*) _tmp228_;
								_tmp230_ = prop_name;
								_tmp231_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp229_, _tmp230_);
								_tmp232_ = (ContactsContactEditorField*) _tmp231_;
								_tmp233_ = (*_tmp232_).rows;
								_tmp234_ = entry;
								_tmp235_ = gee_map_entry_get_key (_tmp234_);
								_tmp236_ = _tmp235_;
								_tmp237_ = entry;
								_tmp238_ = gee_map_entry_get_value (_tmp237_);
								_tmp239_ = _tmp238_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp233_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp236_))), (ContactsContactEditorRowData*) _tmp239_);
								_contacts_contact_editor_field_free0 (_tmp232_);
								_g_object_unref0 (_tmp229_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp240_ = NULL;
						FolksPersona* _tmp241_ = NULL;
						gpointer _tmp242_ = NULL;
						GeeHashMap* _tmp243_ = NULL;
						const gchar* _tmp244_ = NULL;
						GeeHashMap* _tmp245_ = NULL;
						ContactsContactEditorField _tmp246_ = {0};
						_tmp240_ = self->priv->writable_personas;
						_tmp241_ = p;
						_tmp242_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp240_, _tmp241_);
						_tmp243_ = (GeeHashMap*) _tmp242_;
						_tmp244_ = prop_name;
						_tmp245_ = rows;
						_tmp246_.changed = FALSE;
						_g_object_unref0 (_tmp246_.rows);
						_tmp246_.rows = _tmp245_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp243_, _tmp244_, &_tmp246_);
						_g_object_unref0 (_tmp243_);
					}
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("nickname")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp247_ = NULL;
				gboolean _tmp248_ = FALSE;
				GeeHashMap* _tmp271_ = NULL;
				gboolean _tmp272_ = FALSE;
				gboolean _tmp273_ = FALSE;
				_tmp247_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp247_;
				_tmp248_ = add_empty;
				if (_tmp248_) {
					const gchar* _tmp249_ = NULL;
					gint _tmp250_ = 0;
					GeeHashMap* _tmp251_ = NULL;
					gint _tmp252_ = 0;
					ContactsContactEditorRowData _tmp253_ = {0};
					gint _tmp254_ = 0;
					_tmp249_ = _ ("Nickname");
					_tmp250_ = *row;
					contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp249_, NULL, "", _tmp250_);
					_tmp251_ = rows;
					_tmp252_ = *row;
					_g_object_unref0 (_tmp253_.details);
					_tmp253_.details = NULL;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp251_, (gpointer) ((gintptr) _tmp252_), &_tmp253_);
					_tmp254_ = *row;
					*row = _tmp254_ + 1;
				} else {
					FolksNameDetails* name_details = NULL;
					FolksPersona* _tmp255_ = NULL;
					FolksNameDetails* _tmp256_ = NULL;
					FolksNameDetails* _tmp257_ = NULL;
					_tmp255_ = p;
					_tmp256_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp255_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp255_) : NULL);
					name_details = _tmp256_;
					_tmp257_ = name_details;
					if (_tmp257_ != NULL) {
						FolksNameDetails* _tmp258_ = NULL;
						const gchar* _tmp259_ = NULL;
						const gchar* _tmp260_ = NULL;
						gboolean _tmp261_ = FALSE;
						_tmp258_ = name_details;
						_tmp259_ = folks_name_details_get_nickname (_tmp258_);
						_tmp260_ = _tmp259_;
						_tmp261_ = contacts_is_set (_tmp260_);
						if (_tmp261_) {
							const gchar* _tmp262_ = NULL;
							FolksNameDetails* _tmp263_ = NULL;
							const gchar* _tmp264_ = NULL;
							const gchar* _tmp265_ = NULL;
							gint _tmp266_ = 0;
							GeeHashMap* _tmp267_ = NULL;
							gint _tmp268_ = 0;
							ContactsContactEditorRowData _tmp269_ = {0};
							gint _tmp270_ = 0;
							_tmp262_ = _ ("Nickname");
							_tmp263_ = name_details;
							_tmp264_ = folks_name_details_get_nickname (_tmp263_);
							_tmp265_ = _tmp264_;
							_tmp266_ = *row;
							contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp262_, NULL, _tmp265_, _tmp266_);
							_tmp267_ = rows;
							_tmp268_ = *row;
							_g_object_unref0 (_tmp269_.details);
							_tmp269_.details = NULL;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp267_, (gpointer) ((gintptr) _tmp268_), &_tmp269_);
							_tmp270_ = *row;
							*row = _tmp270_ + 1;
						}
					}
					_g_object_unref0 (name_details);
				}
				_tmp271_ = rows;
				_tmp272_ = gee_map_get_is_empty ((GeeMap*) _tmp271_);
				_tmp273_ = _tmp272_;
				if (!_tmp273_) {
					GtkButton* delete_button = NULL;
					gint _tmp274_ = 0;
					GtkWidget* _tmp275_ = NULL;
					GtkButton* _tmp276_ = NULL;
					GtkButton* _tmp277_ = NULL;
					GeeHashMap* _tmp278_ = NULL;
					FolksPersona* _tmp279_ = NULL;
					gpointer _tmp280_ = NULL;
					GeeHashMap* _tmp281_ = NULL;
					const gchar* _tmp282_ = NULL;
					gboolean _tmp283_ = FALSE;
					gboolean _tmp284_ = FALSE;
					contacts_contact_editor_set_has_nickname_row (self, TRUE);
					_tmp274_ = *row;
					_tmp275_ = gtk_grid_get_child_at ((GtkGrid*) self, 3, _tmp274_ - 1);
					_tmp276_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp275_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp275_) : NULL);
					delete_button = _tmp276_;
					_tmp277_ = delete_button;
					g_signal_connect_object (_tmp277_, "clicked", (GCallback) _____lambda49__gtk_button_clicked, self, 0);
					_tmp278_ = self->priv->writable_personas;
					_tmp279_ = p;
					_tmp280_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp278_, _tmp279_);
					_tmp281_ = (GeeHashMap*) _tmp280_;
					_tmp282_ = prop_name;
					_tmp283_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp281_, _tmp282_);
					_tmp284_ = _tmp283_;
					_g_object_unref0 (_tmp281_);
					if (_tmp284_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp285_ = NULL;
							GeeSet* _tmp286_ = NULL;
							GeeSet* _tmp287_ = NULL;
							GeeSet* _tmp288_ = NULL;
							GeeIterator* _tmp289_ = NULL;
							GeeIterator* _tmp290_ = NULL;
							_tmp285_ = rows;
							_tmp286_ = gee_abstract_map_get_entries ((GeeMap*) _tmp285_);
							_tmp287_ = _tmp286_;
							_tmp288_ = _tmp287_;
							_tmp289_ = gee_iterable_iterator ((GeeIterable*) _tmp288_);
							_tmp290_ = _tmp289_;
							_g_object_unref0 (_tmp288_);
							_entry_it = _tmp290_;
							while (TRUE) {
								GeeIterator* _tmp291_ = NULL;
								gboolean _tmp292_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp293_ = NULL;
								gpointer _tmp294_ = NULL;
								GeeHashMap* _tmp295_ = NULL;
								FolksPersona* _tmp296_ = NULL;
								gpointer _tmp297_ = NULL;
								GeeHashMap* _tmp298_ = NULL;
								const gchar* _tmp299_ = NULL;
								gpointer _tmp300_ = NULL;
								ContactsContactEditorField* _tmp301_ = NULL;
								GeeHashMap* _tmp302_ = NULL;
								GeeMapEntry* _tmp303_ = NULL;
								gconstpointer _tmp304_ = NULL;
								gint _tmp305_ = 0;
								GeeMapEntry* _tmp306_ = NULL;
								gconstpointer _tmp307_ = NULL;
								ContactsContactEditorRowData* _tmp308_ = NULL;
								_tmp291_ = _entry_it;
								_tmp292_ = gee_iterator_next (_tmp291_);
								if (!_tmp292_) {
									break;
								}
								_tmp293_ = _entry_it;
								_tmp294_ = gee_iterator_get (_tmp293_);
								entry = (GeeMapEntry*) _tmp294_;
								_tmp295_ = self->priv->writable_personas;
								_tmp296_ = p;
								_tmp297_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp295_, _tmp296_);
								_tmp298_ = (GeeHashMap*) _tmp297_;
								_tmp299_ = prop_name;
								_tmp300_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp298_, _tmp299_);
								_tmp301_ = (ContactsContactEditorField*) _tmp300_;
								_tmp302_ = (*_tmp301_).rows;
								_tmp303_ = entry;
								_tmp304_ = gee_map_entry_get_key (_tmp303_);
								_tmp305_ = _tmp304_;
								_tmp306_ = entry;
								_tmp307_ = gee_map_entry_get_value (_tmp306_);
								_tmp308_ = _tmp307_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp302_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp305_))), (ContactsContactEditorRowData*) _tmp308_);
								_contacts_contact_editor_field_free0 (_tmp301_);
								_g_object_unref0 (_tmp298_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp309_ = NULL;
						FolksPersona* _tmp310_ = NULL;
						gpointer _tmp311_ = NULL;
						GeeHashMap* _tmp312_ = NULL;
						const gchar* _tmp313_ = NULL;
						GeeHashMap* _tmp314_ = NULL;
						ContactsContactEditorField _tmp315_ = {0};
						_tmp309_ = self->priv->writable_personas;
						_tmp310_ = p;
						_tmp311_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp309_, _tmp310_);
						_tmp312_ = (GeeHashMap*) _tmp311_;
						_tmp313_ = prop_name;
						_tmp314_ = rows;
						_tmp315_.changed = FALSE;
						_g_object_unref0 (_tmp315_.rows);
						_tmp315_.rows = _tmp314_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp312_, _tmp313_, &_tmp315_);
						_g_object_unref0 (_tmp312_);
					}
					_g_object_unref0 (delete_button);
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("birthday")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp316_ = NULL;
				gboolean _tmp317_ = FALSE;
				GeeHashMap* _tmp341_ = NULL;
				gboolean _tmp342_ = FALSE;
				gboolean _tmp343_ = FALSE;
				_tmp316_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp316_;
				_tmp317_ = add_empty;
				if (_tmp317_) {
					GDateTime* today = NULL;
					GDateTime* _tmp318_ = NULL;
					const gchar* _tmp319_ = NULL;
					GDateTime* _tmp320_ = NULL;
					gint _tmp321_ = 0;
					GeeHashMap* _tmp322_ = NULL;
					gint _tmp323_ = 0;
					ContactsContactEditorRowData _tmp324_ = {0};
					gint _tmp325_ = 0;
					_tmp318_ = g_date_time_new_now_local ();
					today = _tmp318_;
					_tmp319_ = _ ("Birthday");
					_tmp320_ = today;
					_tmp321_ = *row;
					contacts_contact_editor_attach_row_for_birthday (self, _tmp319_, NULL, _tmp320_, _tmp321_);
					_tmp322_ = rows;
					_tmp323_ = *row;
					_g_object_unref0 (_tmp324_.details);
					_tmp324_.details = NULL;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp322_, (gpointer) ((gintptr) _tmp323_), &_tmp324_);
					_tmp325_ = *row;
					*row = _tmp325_ + 1;
					_g_date_time_unref0 (today);
				} else {
					FolksBirthdayDetails* birthday_details = NULL;
					FolksPersona* _tmp326_ = NULL;
					FolksBirthdayDetails* _tmp327_ = NULL;
					FolksBirthdayDetails* _tmp328_ = NULL;
					_tmp326_ = p;
					_tmp327_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp326_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _tmp326_) : NULL);
					birthday_details = _tmp327_;
					_tmp328_ = birthday_details;
					if (_tmp328_ != NULL) {
						FolksBirthdayDetails* _tmp329_ = NULL;
						GDateTime* _tmp330_ = NULL;
						GDateTime* _tmp331_ = NULL;
						_tmp329_ = birthday_details;
						_tmp330_ = folks_birthday_details_get_birthday (_tmp329_);
						_tmp331_ = _tmp330_;
						if (_tmp331_ != NULL) {
							const gchar* _tmp332_ = NULL;
							FolksBirthdayDetails* _tmp333_ = NULL;
							GDateTime* _tmp334_ = NULL;
							GDateTime* _tmp335_ = NULL;
							gint _tmp336_ = 0;
							GeeHashMap* _tmp337_ = NULL;
							gint _tmp338_ = 0;
							ContactsContactEditorRowData _tmp339_ = {0};
							gint _tmp340_ = 0;
							_tmp332_ = _ ("Birthday");
							_tmp333_ = birthday_details;
							_tmp334_ = folks_birthday_details_get_birthday (_tmp333_);
							_tmp335_ = _tmp334_;
							_tmp336_ = *row;
							contacts_contact_editor_attach_row_for_birthday (self, _tmp332_, NULL, _tmp335_, _tmp336_);
							_tmp337_ = rows;
							_tmp338_ = *row;
							_g_object_unref0 (_tmp339_.details);
							_tmp339_.details = NULL;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp337_, (gpointer) ((gintptr) _tmp338_), &_tmp339_);
							_tmp340_ = *row;
							*row = _tmp340_ + 1;
						}
					}
					_g_object_unref0 (birthday_details);
				}
				_tmp341_ = rows;
				_tmp342_ = gee_map_get_is_empty ((GeeMap*) _tmp341_);
				_tmp343_ = _tmp342_;
				if (!_tmp343_) {
					GeeHashMap* _tmp344_ = NULL;
					FolksPersona* _tmp345_ = NULL;
					gpointer _tmp346_ = NULL;
					GeeHashMap* _tmp347_ = NULL;
					const gchar* _tmp348_ = NULL;
					gboolean _tmp349_ = FALSE;
					GeeHashMap* _tmp350_ = NULL;
					ContactsContactEditorField _tmp351_ = {0};
					contacts_contact_editor_set_has_birthday_row (self, TRUE);
					_tmp344_ = self->priv->writable_personas;
					_tmp345_ = p;
					_tmp346_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp344_, _tmp345_);
					_tmp347_ = (GeeHashMap*) _tmp346_;
					_tmp348_ = prop_name;
					_tmp349_ = add_empty;
					_tmp350_ = rows;
					_tmp351_.changed = _tmp349_;
					_g_object_unref0 (_tmp351_.rows);
					_tmp351_.rows = _tmp350_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp347_, _tmp348_, &_tmp351_);
					_g_object_unref0 (_tmp347_);
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("notes")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp352_ = NULL;
				gboolean _tmp353_ = FALSE;
				GeeHashMap* _tmp387_ = NULL;
				gboolean _tmp388_ = FALSE;
				gboolean _tmp389_ = FALSE;
				_tmp352_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp352_;
				_tmp353_ = add_empty;
				if (_tmp353_) {
					FolksNoteFieldDetails* detail_field = NULL;
					FolksNoteFieldDetails* _tmp354_ = NULL;
					const gchar* _tmp355_ = NULL;
					FolksNoteFieldDetails* _tmp356_ = NULL;
					gint _tmp357_ = 0;
					GeeHashMap* _tmp358_ = NULL;
					gint _tmp359_ = 0;
					FolksNoteFieldDetails* _tmp360_ = NULL;
					ContactsContactEditorRowData _tmp361_ = {0};
					gint _tmp362_ = 0;
					_tmp354_ = folks_note_field_details_new ("", NULL, NULL);
					detail_field = _tmp354_;
					_tmp355_ = _ ("Note");
					_tmp356_ = detail_field;
					_tmp357_ = *row;
					contacts_contact_editor_attach_row_with_text_labeled (self, _tmp355_, (FolksAbstractFieldDetails*) _tmp356_, "", _tmp357_);
					_tmp358_ = rows;
					_tmp359_ = *row;
					_tmp360_ = detail_field;
					_g_object_unref0 (_tmp361_.details);
					_tmp361_.details = (FolksAbstractFieldDetails*) _tmp360_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp358_, (gpointer) ((gintptr) _tmp359_), &_tmp361_);
					_tmp362_ = *row;
					*row = _tmp362_ + 1;
					_g_object_unref0 (detail_field);
				} else {
					FolksNoteDetails* note_details = NULL;
					FolksPersona* _tmp363_ = NULL;
					FolksNoteDetails* _tmp364_ = NULL;
					gboolean _tmp365_ = FALSE;
					FolksNoteDetails* _tmp366_ = NULL;
					_tmp363_ = p;
					_tmp364_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp363_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _tmp363_) : NULL);
					note_details = _tmp364_;
					_tmp366_ = note_details;
					if (_tmp366_ != NULL) {
						_tmp365_ = TRUE;
					} else {
						gboolean _tmp367_ = FALSE;
						_tmp367_ = add_empty;
						_tmp365_ = _tmp367_;
					}
					if (_tmp365_) {
						{
							GeeIterator* _note_it = NULL;
							FolksNoteDetails* _tmp368_ = NULL;
							GeeSet* _tmp369_ = NULL;
							GeeSet* _tmp370_ = NULL;
							GeeIterator* _tmp371_ = NULL;
							_tmp368_ = note_details;
							_tmp369_ = folks_note_details_get_notes (_tmp368_);
							_tmp370_ = _tmp369_;
							_tmp371_ = gee_iterable_iterator ((GeeIterable*) _tmp370_);
							_note_it = _tmp371_;
							while (TRUE) {
								GeeIterator* _tmp372_ = NULL;
								gboolean _tmp373_ = FALSE;
								FolksNoteFieldDetails* note = NULL;
								GeeIterator* _tmp374_ = NULL;
								gpointer _tmp375_ = NULL;
								const gchar* _tmp376_ = NULL;
								FolksNoteFieldDetails* _tmp377_ = NULL;
								FolksNoteFieldDetails* _tmp378_ = NULL;
								gconstpointer _tmp379_ = NULL;
								const gchar* _tmp380_ = NULL;
								gint _tmp381_ = 0;
								GeeHashMap* _tmp382_ = NULL;
								gint _tmp383_ = 0;
								FolksNoteFieldDetails* _tmp384_ = NULL;
								ContactsContactEditorRowData _tmp385_ = {0};
								gint _tmp386_ = 0;
								_tmp372_ = _note_it;
								_tmp373_ = gee_iterator_next (_tmp372_);
								if (!_tmp373_) {
									break;
								}
								_tmp374_ = _note_it;
								_tmp375_ = gee_iterator_get (_tmp374_);
								note = (FolksNoteFieldDetails*) _tmp375_;
								_tmp376_ = _ ("Note");
								_tmp377_ = note;
								_tmp378_ = note;
								_tmp379_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp378_);
								_tmp380_ = _tmp379_;
								_tmp381_ = *row;
								contacts_contact_editor_attach_row_with_text_labeled (self, _tmp376_, (FolksAbstractFieldDetails*) _tmp377_, (const gchar*) _tmp380_, _tmp381_);
								_tmp382_ = rows;
								_tmp383_ = *row;
								_tmp384_ = note;
								_g_object_unref0 (_tmp385_.details);
								_tmp385_.details = (FolksAbstractFieldDetails*) _tmp384_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp382_, (gpointer) ((gintptr) _tmp383_), &_tmp385_);
								_tmp386_ = *row;
								*row = _tmp386_ + 1;
								_g_object_unref0 (note);
							}
							_g_object_unref0 (_note_it);
						}
					}
					_g_object_unref0 (note_details);
				}
				_tmp387_ = rows;
				_tmp388_ = gee_map_get_is_empty ((GeeMap*) _tmp387_);
				_tmp389_ = _tmp388_;
				if (!_tmp389_) {
					GeeHashMap* _tmp390_ = NULL;
					FolksPersona* _tmp391_ = NULL;
					gpointer _tmp392_ = NULL;
					GeeHashMap* _tmp393_ = NULL;
					const gchar* _tmp394_ = NULL;
					gboolean _tmp395_ = FALSE;
					gboolean _tmp396_ = FALSE;
					contacts_contact_editor_set_has_notes_row (self, TRUE);
					_tmp390_ = self->priv->writable_personas;
					_tmp391_ = p;
					_tmp392_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp390_, _tmp391_);
					_tmp393_ = (GeeHashMap*) _tmp392_;
					_tmp394_ = prop_name;
					_tmp395_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp393_, _tmp394_);
					_tmp396_ = _tmp395_;
					_g_object_unref0 (_tmp393_);
					if (_tmp396_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp397_ = NULL;
							GeeSet* _tmp398_ = NULL;
							GeeSet* _tmp399_ = NULL;
							GeeSet* _tmp400_ = NULL;
							GeeIterator* _tmp401_ = NULL;
							GeeIterator* _tmp402_ = NULL;
							_tmp397_ = rows;
							_tmp398_ = gee_abstract_map_get_entries ((GeeMap*) _tmp397_);
							_tmp399_ = _tmp398_;
							_tmp400_ = _tmp399_;
							_tmp401_ = gee_iterable_iterator ((GeeIterable*) _tmp400_);
							_tmp402_ = _tmp401_;
							_g_object_unref0 (_tmp400_);
							_entry_it = _tmp402_;
							while (TRUE) {
								GeeIterator* _tmp403_ = NULL;
								gboolean _tmp404_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp405_ = NULL;
								gpointer _tmp406_ = NULL;
								GeeHashMap* _tmp407_ = NULL;
								FolksPersona* _tmp408_ = NULL;
								gpointer _tmp409_ = NULL;
								GeeHashMap* _tmp410_ = NULL;
								const gchar* _tmp411_ = NULL;
								gpointer _tmp412_ = NULL;
								ContactsContactEditorField* _tmp413_ = NULL;
								GeeHashMap* _tmp414_ = NULL;
								GeeMapEntry* _tmp415_ = NULL;
								gconstpointer _tmp416_ = NULL;
								gint _tmp417_ = 0;
								GeeMapEntry* _tmp418_ = NULL;
								gconstpointer _tmp419_ = NULL;
								ContactsContactEditorRowData* _tmp420_ = NULL;
								_tmp403_ = _entry_it;
								_tmp404_ = gee_iterator_next (_tmp403_);
								if (!_tmp404_) {
									break;
								}
								_tmp405_ = _entry_it;
								_tmp406_ = gee_iterator_get (_tmp405_);
								entry = (GeeMapEntry*) _tmp406_;
								_tmp407_ = self->priv->writable_personas;
								_tmp408_ = p;
								_tmp409_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp407_, _tmp408_);
								_tmp410_ = (GeeHashMap*) _tmp409_;
								_tmp411_ = prop_name;
								_tmp412_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp410_, _tmp411_);
								_tmp413_ = (ContactsContactEditorField*) _tmp412_;
								_tmp414_ = (*_tmp413_).rows;
								_tmp415_ = entry;
								_tmp416_ = gee_map_entry_get_key (_tmp415_);
								_tmp417_ = _tmp416_;
								_tmp418_ = entry;
								_tmp419_ = gee_map_entry_get_value (_tmp418_);
								_tmp420_ = _tmp419_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp414_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp417_))), (ContactsContactEditorRowData*) _tmp420_);
								_contacts_contact_editor_field_free0 (_tmp413_);
								_g_object_unref0 (_tmp410_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp421_ = NULL;
						FolksPersona* _tmp422_ = NULL;
						gpointer _tmp423_ = NULL;
						GeeHashMap* _tmp424_ = NULL;
						const gchar* _tmp425_ = NULL;
						GeeHashMap* _tmp426_ = NULL;
						ContactsContactEditorField _tmp427_ = {0};
						_tmp421_ = self->priv->writable_personas;
						_tmp422_ = p;
						_tmp423_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp421_, _tmp422_);
						_tmp424_ = (GeeHashMap*) _tmp423_;
						_tmp425_ = prop_name;
						_tmp426_ = rows;
						_tmp427_.changed = FALSE;
						_g_object_unref0 (_tmp427_.rows);
						_tmp427_.rows = _tmp426_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp424_, _tmp425_, &_tmp427_);
						_g_object_unref0 (_tmp424_);
					}
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("postal-addresses")))) {
		switch (0) {
			default:
			{
				GeeHashMap* rows = NULL;
				GeeHashMap* _tmp428_ = NULL;
				gboolean _tmp429_ = FALSE;
				GeeHashMap* _tmp465_ = NULL;
				gboolean _tmp466_ = FALSE;
				gboolean _tmp467_ = FALSE;
				_tmp428_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				rows = _tmp428_;
				_tmp429_ = add_empty;
				if (_tmp429_) {
					FolksPostalAddressFieldDetails* detail_field = NULL;
					FolksPostalAddress* _tmp430_ = NULL;
					FolksPostalAddress* _tmp431_ = NULL;
					FolksPostalAddressFieldDetails* _tmp432_ = NULL;
					FolksPostalAddressFieldDetails* _tmp433_ = NULL;
					gint _tmp434_ = 0;
					ContactsTypeSet* _tmp435_ = NULL;
					ContactsTypeSet* _tmp436_ = NULL;
					FolksPostalAddressFieldDetails* _tmp437_ = NULL;
					const gchar* _tmp438_ = NULL;
					GeeHashMap* _tmp439_ = NULL;
					gint _tmp440_ = 0;
					FolksPostalAddressFieldDetails* _tmp441_ = NULL;
					ContactsContactEditorRowData _tmp442_ = {0};
					gint _tmp443_ = 0;
					_tmp430_ = folks_postal_address_new (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
					_tmp431_ = _tmp430_;
					_tmp432_ = folks_postal_address_field_details_new (_tmp431_, NULL);
					_tmp433_ = _tmp432_;
					_g_object_unref0 (_tmp431_);
					detail_field = _tmp433_;
					_tmp434_ = *row;
					_tmp435_ = contacts_typeset_get_general ();
					_tmp436_ = _tmp435_;
					_tmp437_ = detail_field;
					_tmp438_ = type;
					contacts_contact_editor_attach_row_for_address (self, _tmp434_, _tmp436_, _tmp437_, _tmp438_);
					_tmp439_ = rows;
					_tmp440_ = *row;
					_tmp441_ = detail_field;
					_g_object_unref0 (_tmp442_.details);
					_tmp442_.details = (FolksAbstractFieldDetails*) _tmp441_;
					gee_abstract_map_set ((GeeAbstractMap*) _tmp439_, (gpointer) ((gintptr) _tmp440_), &_tmp442_);
					_tmp443_ = *row;
					*row = _tmp443_ + 1;
					_g_object_unref0 (detail_field);
				} else {
					FolksPostalAddressDetails* address_details = NULL;
					FolksPersona* _tmp444_ = NULL;
					FolksPostalAddressDetails* _tmp445_ = NULL;
					FolksPostalAddressDetails* _tmp446_ = NULL;
					_tmp444_ = p;
					_tmp445_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp444_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS) ? ((FolksPostalAddressDetails*) _tmp444_) : NULL);
					address_details = _tmp445_;
					_tmp446_ = address_details;
					if (_tmp446_ != NULL) {
						{
							GeeIterator* _addr_it = NULL;
							FolksPostalAddressDetails* _tmp447_ = NULL;
							GeeSet* _tmp448_ = NULL;
							GeeSet* _tmp449_ = NULL;
							GeeIterator* _tmp450_ = NULL;
							_tmp447_ = address_details;
							_tmp448_ = folks_postal_address_details_get_postal_addresses (_tmp447_);
							_tmp449_ = _tmp448_;
							_tmp450_ = gee_iterable_iterator ((GeeIterable*) _tmp449_);
							_addr_it = _tmp450_;
							while (TRUE) {
								GeeIterator* _tmp451_ = NULL;
								gboolean _tmp452_ = FALSE;
								FolksPostalAddressFieldDetails* addr = NULL;
								GeeIterator* _tmp453_ = NULL;
								gpointer _tmp454_ = NULL;
								gint _tmp455_ = 0;
								ContactsTypeSet* _tmp456_ = NULL;
								ContactsTypeSet* _tmp457_ = NULL;
								FolksPostalAddressFieldDetails* _tmp458_ = NULL;
								const gchar* _tmp459_ = NULL;
								GeeHashMap* _tmp460_ = NULL;
								gint _tmp461_ = 0;
								FolksPostalAddressFieldDetails* _tmp462_ = NULL;
								ContactsContactEditorRowData _tmp463_ = {0};
								gint _tmp464_ = 0;
								_tmp451_ = _addr_it;
								_tmp452_ = gee_iterator_next (_tmp451_);
								if (!_tmp452_) {
									break;
								}
								_tmp453_ = _addr_it;
								_tmp454_ = gee_iterator_get (_tmp453_);
								addr = (FolksPostalAddressFieldDetails*) _tmp454_;
								_tmp455_ = *row;
								_tmp456_ = contacts_typeset_get_general ();
								_tmp457_ = _tmp456_;
								_tmp458_ = addr;
								_tmp459_ = type;
								contacts_contact_editor_attach_row_for_address (self, _tmp455_, _tmp457_, _tmp458_, _tmp459_);
								_tmp460_ = rows;
								_tmp461_ = *row;
								_tmp462_ = addr;
								_g_object_unref0 (_tmp463_.details);
								_tmp463_.details = (FolksAbstractFieldDetails*) _tmp462_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp460_, (gpointer) ((gintptr) _tmp461_), &_tmp463_);
								_tmp464_ = *row;
								*row = _tmp464_ + 1;
								_g_object_unref0 (addr);
							}
							_g_object_unref0 (_addr_it);
						}
					}
					_g_object_unref0 (address_details);
				}
				_tmp465_ = rows;
				_tmp466_ = gee_map_get_is_empty ((GeeMap*) _tmp465_);
				_tmp467_ = _tmp466_;
				if (!_tmp467_) {
					GeeHashMap* _tmp468_ = NULL;
					FolksPersona* _tmp469_ = NULL;
					gpointer _tmp470_ = NULL;
					GeeHashMap* _tmp471_ = NULL;
					const gchar* _tmp472_ = NULL;
					gboolean _tmp473_ = FALSE;
					gboolean _tmp474_ = FALSE;
					_tmp468_ = self->priv->writable_personas;
					_tmp469_ = p;
					_tmp470_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp468_, _tmp469_);
					_tmp471_ = (GeeHashMap*) _tmp470_;
					_tmp472_ = prop_name;
					_tmp473_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp471_, _tmp472_);
					_tmp474_ = _tmp473_;
					_g_object_unref0 (_tmp471_);
					if (_tmp474_) {
						{
							GeeIterator* _entry_it = NULL;
							GeeHashMap* _tmp475_ = NULL;
							GeeSet* _tmp476_ = NULL;
							GeeSet* _tmp477_ = NULL;
							GeeSet* _tmp478_ = NULL;
							GeeIterator* _tmp479_ = NULL;
							GeeIterator* _tmp480_ = NULL;
							_tmp475_ = rows;
							_tmp476_ = gee_abstract_map_get_entries ((GeeMap*) _tmp475_);
							_tmp477_ = _tmp476_;
							_tmp478_ = _tmp477_;
							_tmp479_ = gee_iterable_iterator ((GeeIterable*) _tmp478_);
							_tmp480_ = _tmp479_;
							_g_object_unref0 (_tmp478_);
							_entry_it = _tmp480_;
							while (TRUE) {
								GeeIterator* _tmp481_ = NULL;
								gboolean _tmp482_ = FALSE;
								GeeMapEntry* entry = NULL;
								GeeIterator* _tmp483_ = NULL;
								gpointer _tmp484_ = NULL;
								GeeHashMap* _tmp485_ = NULL;
								FolksPersona* _tmp486_ = NULL;
								gpointer _tmp487_ = NULL;
								GeeHashMap* _tmp488_ = NULL;
								const gchar* _tmp489_ = NULL;
								gpointer _tmp490_ = NULL;
								ContactsContactEditorField* _tmp491_ = NULL;
								GeeHashMap* _tmp492_ = NULL;
								GeeMapEntry* _tmp493_ = NULL;
								gconstpointer _tmp494_ = NULL;
								gint _tmp495_ = 0;
								GeeMapEntry* _tmp496_ = NULL;
								gconstpointer _tmp497_ = NULL;
								ContactsContactEditorRowData* _tmp498_ = NULL;
								_tmp481_ = _entry_it;
								_tmp482_ = gee_iterator_next (_tmp481_);
								if (!_tmp482_) {
									break;
								}
								_tmp483_ = _entry_it;
								_tmp484_ = gee_iterator_get (_tmp483_);
								entry = (GeeMapEntry*) _tmp484_;
								_tmp485_ = self->priv->writable_personas;
								_tmp486_ = p;
								_tmp487_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp485_, _tmp486_);
								_tmp488_ = (GeeHashMap*) _tmp487_;
								_tmp489_ = prop_name;
								_tmp490_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp488_, _tmp489_);
								_tmp491_ = (ContactsContactEditorField*) _tmp490_;
								_tmp492_ = (*_tmp491_).rows;
								_tmp493_ = entry;
								_tmp494_ = gee_map_entry_get_key (_tmp493_);
								_tmp495_ = _tmp494_;
								_tmp496_ = entry;
								_tmp497_ = gee_map_entry_get_value (_tmp496_);
								_tmp498_ = _tmp497_;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp492_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp495_))), (ContactsContactEditorRowData*) _tmp498_);
								_contacts_contact_editor_field_free0 (_tmp491_);
								_g_object_unref0 (_tmp488_);
								_g_object_unref0 (entry);
							}
							_g_object_unref0 (_entry_it);
						}
					} else {
						GeeHashMap* _tmp499_ = NULL;
						FolksPersona* _tmp500_ = NULL;
						gpointer _tmp501_ = NULL;
						GeeHashMap* _tmp502_ = NULL;
						const gchar* _tmp503_ = NULL;
						GeeHashMap* _tmp504_ = NULL;
						ContactsContactEditorField _tmp505_ = {0};
						_tmp499_ = self->priv->writable_personas;
						_tmp500_ = p;
						_tmp501_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp499_, _tmp500_);
						_tmp502_ = (GeeHashMap*) _tmp501_;
						_tmp503_ = prop_name;
						_tmp504_ = rows;
						_tmp505_.changed = FALSE;
						_g_object_unref0 (_tmp505_.rows);
						_tmp505_.rows = _tmp504_;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp502_, _tmp503_, &_tmp505_);
						_g_object_unref0 (_tmp502_);
					}
				}
				_g_object_unref0 (rows);
				break;
			}
		}
	}
}


static void contacts_contact_editor_insert_row_at (ContactsContactEditor* self, gint idx) {
	gint _tmp55_ = 0;
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _field_maps_it = NULL;
		GeeHashMap* _tmp0_ = NULL;
		GeeCollection* _tmp1_ = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		_tmp0_ = self->priv->writable_personas;
		_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_field_maps_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			GeeHashMap* field_maps = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			_tmp6_ = _field_maps_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _field_maps_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			field_maps = (GeeHashMap*) _tmp9_;
			{
				GeeIterator* _field_it = NULL;
				GeeHashMap* _tmp10_ = NULL;
				GeeCollection* _tmp11_ = NULL;
				GeeCollection* _tmp12_ = NULL;
				GeeCollection* _tmp13_ = NULL;
				GeeIterator* _tmp14_ = NULL;
				GeeIterator* _tmp15_ = NULL;
				_tmp10_ = field_maps;
				_tmp11_ = gee_abstract_map_get_values ((GeeMap*) _tmp10_);
				_tmp12_ = _tmp11_;
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp13_);
				_field_it = _tmp15_;
				while (TRUE) {
					GeeIterator* _tmp16_ = NULL;
					gboolean _tmp17_ = FALSE;
					ContactsContactEditorField* field = NULL;
					GeeIterator* _tmp18_ = NULL;
					gpointer _tmp19_ = NULL;
					_tmp16_ = _field_it;
					_tmp17_ = gee_iterator_next (_tmp16_);
					if (!_tmp17_) {
						break;
					}
					_tmp18_ = _field_it;
					_tmp19_ = gee_iterator_get (_tmp18_);
					field = (ContactsContactEditorField*) _tmp19_;
					{
						GeeIterator* _row_it = NULL;
						ContactsContactEditorField* _tmp20_ = NULL;
						GeeHashMap* _tmp21_ = NULL;
						GeeSet* _tmp22_ = NULL;
						GeeSet* _tmp23_ = NULL;
						GeeSet* _tmp24_ = NULL;
						GeeIterator* _tmp25_ = NULL;
						GeeIterator* _tmp26_ = NULL;
						_tmp20_ = field;
						_tmp21_ = (*_tmp20_).rows;
						_tmp22_ = gee_abstract_map_get_keys ((GeeMap*) _tmp21_);
						_tmp23_ = _tmp22_;
						_tmp24_ = _tmp23_;
						_tmp25_ = gee_iterable_iterator ((GeeIterable*) _tmp24_);
						_tmp26_ = _tmp25_;
						_g_object_unref0 (_tmp24_);
						_row_it = _tmp26_;
						while (TRUE) {
							GeeIterator* _tmp27_ = NULL;
							gboolean _tmp28_ = FALSE;
							gint row = 0;
							GeeIterator* _tmp29_ = NULL;
							gpointer _tmp30_ = NULL;
							gint _tmp31_ = 0;
							gint _tmp32_ = 0;
							_tmp27_ = _row_it;
							_tmp28_ = gee_iterator_next (_tmp27_);
							if (!_tmp28_) {
								break;
							}
							_tmp29_ = _row_it;
							_tmp30_ = gee_iterator_get (_tmp29_);
							row = (gint) ((gintptr) _tmp30_);
							_tmp31_ = row;
							_tmp32_ = idx;
							if (_tmp31_ >= _tmp32_) {
								GeeHashMap* new_rows = NULL;
								GeeHashMap* _tmp33_ = NULL;
								ContactsContactEditorField* _tmp52_ = NULL;
								GeeHashMap* _tmp53_ = NULL;
								GeeHashMap* _tmp54_ = NULL;
								_tmp33_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
								new_rows = _tmp33_;
								{
									GeeIterator* _old_row_it = NULL;
									ContactsContactEditorField* _tmp34_ = NULL;
									GeeHashMap* _tmp35_ = NULL;
									GeeSet* _tmp36_ = NULL;
									GeeSet* _tmp37_ = NULL;
									GeeSet* _tmp38_ = NULL;
									GeeIterator* _tmp39_ = NULL;
									GeeIterator* _tmp40_ = NULL;
									_tmp34_ = field;
									_tmp35_ = (*_tmp34_).rows;
									_tmp36_ = gee_abstract_map_get_keys ((GeeMap*) _tmp35_);
									_tmp37_ = _tmp36_;
									_tmp38_ = _tmp37_;
									_tmp39_ = gee_iterable_iterator ((GeeIterable*) _tmp38_);
									_tmp40_ = _tmp39_;
									_g_object_unref0 (_tmp38_);
									_old_row_it = _tmp40_;
									while (TRUE) {
										GeeIterator* _tmp41_ = NULL;
										gboolean _tmp42_ = FALSE;
										gint old_row = 0;
										GeeIterator* _tmp43_ = NULL;
										gpointer _tmp44_ = NULL;
										GeeHashMap* _tmp45_ = NULL;
										gint _tmp46_ = 0;
										ContactsContactEditorField* _tmp47_ = NULL;
										GeeHashMap* _tmp48_ = NULL;
										gint _tmp49_ = 0;
										gpointer _tmp50_ = NULL;
										ContactsContactEditorRowData* _tmp51_ = NULL;
										_tmp41_ = _old_row_it;
										_tmp42_ = gee_iterator_next (_tmp41_);
										if (!_tmp42_) {
											break;
										}
										_tmp43_ = _old_row_it;
										_tmp44_ = gee_iterator_get (_tmp43_);
										old_row = (gint) ((gintptr) _tmp44_);
										_tmp45_ = new_rows;
										_tmp46_ = old_row;
										_tmp47_ = field;
										_tmp48_ = (*_tmp47_).rows;
										_tmp49_ = old_row;
										_tmp50_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp48_, (gpointer) ((gintptr) _tmp49_));
										_tmp51_ = (ContactsContactEditorRowData*) _tmp50_;
										gee_abstract_map_set ((GeeAbstractMap*) _tmp45_, (gpointer) ((gintptr) (_tmp46_ + 1)), _tmp51_);
										_contacts_contact_editor_row_data_free0 (_tmp51_);
									}
									_g_object_unref0 (_old_row_it);
								}
								_tmp52_ = field;
								_tmp53_ = new_rows;
								_tmp54_ = _g_object_ref0 (_tmp53_);
								_g_object_unref0 ((*_tmp52_).rows);
								(*_tmp52_).rows = _tmp54_;
								_g_object_unref0 (new_rows);
								break;
							}
						}
						_g_object_unref0 (_row_it);
					}
					_contacts_contact_editor_field_free0 (field);
				}
				_g_object_unref0 (_field_it);
			}
			_g_object_unref0 (field_maps);
		}
		_g_object_unref0 (_field_maps_it);
	}
	_tmp55_ = idx;
	gtk_grid_insert_row ((GtkGrid*) self, _tmp55_);
}


static void contacts_contact_editor_size_allocate_cb (ContactsContactEditor* self, GtkAllocation* alloc) {
	gboolean _tmp0_ = FALSE;
	GtkWidget* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (alloc != NULL);
	_tmp1_ = self->priv->focus_widget;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_ = NULL;
		_tmp2_ = self->priv->focus_widget;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GTK_TYPE_WIDGET);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkWidget* _tmp3_ = NULL;
		_tmp3_ = self->priv->focus_widget;
		gtk_widget_grab_focus (_tmp3_);
		self->priv->focus_widget = NULL;
	}
}


static void _contacts_contact_editor_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
	contacts_contact_editor_size_allocate_cb ((ContactsContactEditor*) self, allocation);
}


ContactsContactEditor* contacts_contact_editor_construct (GType object_type) {
	ContactsContactEditor * self = NULL;
	GeeHashMap* _tmp0_ = NULL;
	self = (ContactsContactEditor*) g_object_new (object_type, NULL);
	gtk_grid_set_row_spacing ((GtkGrid*) self, (guint) 12);
	gtk_grid_set_column_spacing ((GtkGrid*) self, (guint) 12);
	_tmp0_ = gee_hash_map_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, GEE_TYPE_HASH_MAP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->writable_personas);
	self->priv->writable_personas = _tmp0_;
	g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) _contacts_contact_editor_size_allocate_cb_gtk_widget_size_allocate, self, G_CONNECT_AFTER);
	return self;
}


ContactsContactEditor* contacts_contact_editor_new (void) {
	return contacts_contact_editor_construct (CONTACTS_TYPE_CONTACT_EDITOR);
}


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


static void block21_data_unref (void * _userdata_) {
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
		ContactsContactEditor* self;
		self = _data21_->self;
		_g_object_unref0 (_data21_->name_entry);
		_g_object_unref0 (_data21_->image_frame);
		_g_object_unref0 (_data21_->c);
		_g_object_unref0 (self);
		g_slice_free (Block21Data, _data21_);
	}
}


static void __lambda50_ (Block21Data* _data21_) {
	ContactsContactEditor* self;
	ContactsContact* _tmp0_ = NULL;
	ContactsContactFrame* _tmp1_ = NULL;
	self = _data21_->self;
	_tmp0_ = _data21_->c;
	_tmp1_ = _data21_->image_frame;
	contacts_change_avatar (_tmp0_, _tmp1_);
}


static void ___lambda50__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self) {
	__lambda50_ (self);
}


static void __lambda65_ (Block21Data* _data21_, GtkWidget* w) {
	ContactsContactEditor* self;
	GtkWidget* _tmp0_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksIndividual* _tmp2_ = NULL;
	ContactsContact* _tmp3_ = NULL;
	self = _data21_->self;
	g_return_if_fail (w != NULL);
	_tmp0_ = w;
	_tmp1_ = _data21_->c;
	_tmp2_ = _tmp1_->individual;
	_tmp3_ = _data21_->c;
	contacts_contact_frame_set_image (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, CONTACTS_TYPE_CONTACT_FRAME) ? ((ContactsContactFrame*) _tmp0_) : NULL, (FolksAvatarDetails*) _tmp2_, _tmp3_);
}


static void ___lambda65__gtk_callback (GtkWidget* widget, gpointer self) {
	__lambda65_ (self, widget);
}


static void __lambda66_ (Block21Data* _data21_) {
	ContactsContactEditor* self;
	GtkEntry* _tmp0_ = NULL;
	self = _data21_->self;
	_tmp0_ = _data21_->name_entry;
	g_object_set_data_full ((GObject*) _tmp0_, "changed", (gpointer) ((gintptr) TRUE), NULL);
}


static void ___lambda66__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
	__lambda66_ (self);
}


void contacts_contact_editor_update (ContactsContactEditor* self, ContactsContact* c) {
	Block21Data* _data21_;
	ContactsContact* _tmp0_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	ContactsContact* _tmp2_ = NULL;
	ContactsContact* _tmp3_ = NULL;
	ContactsContactFrame* _tmp4_ = NULL;
	ContactsContactFrame* _tmp5_ = NULL;
	ContactsContactFrame* _tmp6_ = NULL;
	ContactsContactFrame* _tmp7_ = NULL;
	GtkWidget* _tmp8_ = NULL;
	ContactsContactFrame* _tmp9_ = NULL;
	ContactsContact* _tmp10_ = NULL;
	ContactsContactFrame* _tmp11_ = NULL;
	ContactsContactFrame* _tmp12_ = NULL;
	GtkEntry* _tmp13_ = NULL;
	GtkEntry* _tmp14_ = NULL;
	GtkEntry* _tmp15_ = NULL;
	GtkEntry* _tmp16_ = NULL;
	ContactsContact* _tmp17_ = NULL;
	const gchar* _tmp18_ = NULL;
	const gchar* _tmp19_ = NULL;
	GtkEntry* _tmp20_ = NULL;
	GtkEntry* _tmp21_ = NULL;
	GtkEntry* _tmp22_ = NULL;
	gint i = 0;
	gint last_store_position = 0;
	gboolean is_first_persona = FALSE;
	GeeList* personas = NULL;
	ContactsContact* _tmp23_ = NULL;
	GeeList* _tmp24_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (c != NULL);
	_data21_ = g_slice_new0 (Block21Data);
	_data21_->_ref_count_ = 1;
	_data21_->self = g_object_ref (self);
	_tmp0_ = c;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data21_->c);
	_data21_->c = _tmp1_;
	_tmp2_ = _data21_->c;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->contact);
	self->priv->contact = _tmp3_;
	_tmp4_ = contacts_contact_frame_new (PROFILE_SIZE, TRUE);
	g_object_ref_sink (_tmp4_);
	_data21_->image_frame = _tmp4_;
	_tmp5_ = _data21_->image_frame;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp5_, FALSE);
	_tmp6_ = _data21_->image_frame;
	gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
	_tmp7_ = _data21_->image_frame;
	_tmp8_ = gtk_bin_get_child ((GtkBin*) _tmp7_);
	gtk_button_set_relief (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp8_) : NULL, GTK_RELIEF_NORMAL);
	_tmp9_ = _data21_->image_frame;
	g_signal_connect_data (_tmp9_, "clicked", (GCallback) ___lambda50__contacts_contact_frame_clicked, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	_tmp10_ = _data21_->c;
	_tmp11_ = _data21_->image_frame;
	contacts_contact_keep_widget_uptodate (_tmp10_, (GtkWidget*) _tmp11_, ___lambda65__gtk_callback, block21_data_ref (_data21_), block21_data_unref);
	_tmp12_ = _data21_->image_frame;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp12_, 0, 0, 1, 3);
	_tmp13_ = (GtkEntry*) gtk_entry_new ();
	g_object_ref_sink (_tmp13_);
	_data21_->name_entry = _tmp13_;
	_tmp14_ = _data21_->name_entry;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = _data21_->name_entry;
	gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_CENTER);
	_tmp16_ = _data21_->name_entry;
	_tmp17_ = _data21_->c;
	_tmp18_ = contacts_contact_get_display_name (_tmp17_);
	_tmp19_ = _tmp18_;
	gtk_entry_set_text (_tmp16_, _tmp19_);
	_tmp20_ = _data21_->name_entry;
	g_object_set_data_full ((GObject*) _tmp20_, "changed", (gpointer) ((gintptr) FALSE), NULL);
	_tmp21_ = _data21_->name_entry;
	gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp21_, 1, 0, 3, 3);
	_tmp22_ = _data21_->name_entry;
	g_signal_connect_data ((GtkEditable*) _tmp22_, "changed", (GCallback) ___lambda66__gtk_editable_changed, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
	i = 3;
	last_store_position = 0;
	is_first_persona = TRUE;
	_tmp23_ = _data21_->c;
	_tmp24_ = contacts_contact_get_personas_for_display (_tmp23_);
	personas = _tmp24_;
	{
		GeeList* _p_list = NULL;
		GeeList* _tmp25_ = NULL;
		GeeList* _tmp26_ = NULL;
		gint _p_size = 0;
		GeeList* _tmp27_ = NULL;
		gint _tmp28_ = 0;
		gint _tmp29_ = 0;
		gint _p_index = 0;
		_tmp25_ = personas;
		_tmp26_ = _g_object_ref0 (_tmp25_);
		_p_list = _tmp26_;
		_tmp27_ = _p_list;
		_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
		_tmp29_ = _tmp28_;
		_p_size = _tmp29_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp30_ = 0;
			gint _tmp31_ = 0;
			gint _tmp32_ = 0;
			FolksPersona* p = NULL;
			GeeList* _tmp33_ = NULL;
			gint _tmp34_ = 0;
			gpointer _tmp35_ = NULL;
			gboolean _tmp36_ = FALSE;
			gchar** rw_props = NULL;
			FolksPersona* _tmp51_ = NULL;
			gchar** _tmp52_ = NULL;
			gint _tmp52__length1 = 0;
			gchar** _tmp53_ = NULL;
			gint _tmp53__length1 = 0;
			gint _tmp54_ = 0;
			gchar** _tmp55_ = NULL;
			gint rw_props_length1 = 0;
			gint _rw_props_size_ = 0;
			gchar** _tmp56_ = NULL;
			gint _tmp56__length1 = 0;
			gboolean _tmp65_ = FALSE;
			gint _tmp67_ = 0;
			gint _tmp68_ = 0;
			gint _tmp69_ = 0;
			_tmp30_ = _p_index;
			_p_index = _tmp30_ + 1;
			_tmp31_ = _p_index;
			_tmp32_ = _p_size;
			if (!(_tmp31_ < _tmp32_)) {
				break;
			}
			_tmp33_ = _p_list;
			_tmp34_ = _p_index;
			_tmp35_ = gee_list_get (_tmp33_, _tmp34_);
			p = (FolksPersona*) _tmp35_;
			_tmp36_ = is_first_persona;
			if (!_tmp36_) {
				GtkLabel* store_name = NULL;
				GtkLabel* _tmp37_ = NULL;
				GtkLabel* _tmp38_ = NULL;
				FolksPersona* _tmp39_ = NULL;
				gchar* _tmp40_ = NULL;
				gchar* _tmp41_ = NULL;
				gchar* _tmp42_ = NULL;
				gchar* _tmp43_ = NULL;
				GtkLabel* _tmp44_ = NULL;
				GtkLabel* _tmp45_ = NULL;
				GtkLabel* _tmp46_ = NULL;
				GtkLabel* _tmp47_ = NULL;
				gint _tmp48_ = 0;
				gint _tmp49_ = 0;
				gint _tmp50_ = 0;
				_tmp37_ = (GtkLabel*) gtk_label_new ("");
				g_object_ref_sink (_tmp37_);
				store_name = _tmp37_;
				_tmp38_ = store_name;
				_tmp39_ = p;
				_tmp40_ = contacts_contact_format_persona_store_name_for_contact (_tmp39_);
				_tmp41_ = _tmp40_;
				_tmp42_ = g_markup_printf_escaped ("<span font='16px bold'>%s</span>", _tmp41_);
				_tmp43_ = _tmp42_;
				gtk_label_set_markup (_tmp38_, _tmp43_);
				_g_free0 (_tmp43_);
				_g_free0 (_tmp41_);
				_tmp44_ = store_name;
				gtk_widget_set_halign ((GtkWidget*) _tmp44_, GTK_ALIGN_START);
				_tmp45_ = store_name;
				g_object_set ((GtkMisc*) _tmp45_, "xalign", 0.0f, NULL);
				_tmp46_ = store_name;
				gtk_widget_set_margin_start ((GtkWidget*) _tmp46_, 6);
				_tmp47_ = store_name;
				_tmp48_ = i;
				gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp47_, 0, _tmp48_, 2, 1);
				_tmp49_ = i;
				i = _tmp49_ + 1;
				_tmp50_ = i;
				last_store_position = _tmp50_;
				_g_object_unref0 (store_name);
			}
			_tmp51_ = p;
			_tmp52_ = folks_persona_get_writeable_properties (_tmp51_, &_tmp52__length1);
			_tmp53_ = _tmp52_;
			_tmp53__length1 = _tmp52__length1;
			_tmp55_ = contacts_contact_sort_persona_properties (_tmp53_, _tmp53__length1, &_tmp54_);
			rw_props = _tmp55_;
			rw_props_length1 = _tmp54_;
			_rw_props_size_ = rw_props_length1;
			_tmp56_ = rw_props;
			_tmp56__length1 = rw_props_length1;
			if (_tmp56__length1 != 0) {
				GeeHashMap* _tmp57_ = NULL;
				FolksPersona* _tmp58_ = NULL;
				GeeHashMap* _tmp59_ = NULL;
				GeeHashMap* _tmp60_ = NULL;
				gchar** _tmp61_ = NULL;
				gint _tmp61__length1 = 0;
				_tmp57_ = self->priv->writable_personas;
				_tmp58_ = p;
				_tmp59_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_FIELD, (GBoxedCopyFunc) contacts_contact_editor_field_dup, contacts_contact_editor_field_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				_tmp60_ = _tmp59_;
				gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp58_, _tmp60_);
				_g_object_unref0 (_tmp60_);
				_tmp61_ = rw_props;
				_tmp61__length1 = rw_props_length1;
				{
					gchar** prop_collection = NULL;
					gint prop_collection_length1 = 0;
					gint _prop_collection_size_ = 0;
					gint prop_it = 0;
					prop_collection = _tmp61_;
					prop_collection_length1 = _tmp61__length1;
					for (prop_it = 0; prop_it < _tmp61__length1; prop_it = prop_it + 1) {
						gchar* _tmp62_ = NULL;
						gchar* prop = NULL;
						_tmp62_ = g_strdup (prop_collection[prop_it]);
						prop = _tmp62_;
						{
							FolksPersona* _tmp63_ = NULL;
							const gchar* _tmp64_ = NULL;
							_tmp63_ = p;
							_tmp64_ = prop;
							contacts_contact_editor_add_edit_row (self, _tmp63_, _tmp64_, &i, FALSE, NULL);
							_g_free0 (prop);
						}
					}
				}
			}
			_tmp65_ = is_first_persona;
			if (_tmp65_) {
				gint _tmp66_ = 0;
				_tmp66_ = i;
				self->priv->last_row = _tmp66_ - 1;
			}
			_tmp67_ = i;
			if (_tmp67_ != 3) {
				is_first_persona = FALSE;
			}
			_tmp68_ = i;
			_tmp69_ = last_store_position;
			if (_tmp68_ == _tmp69_) {
				gint _tmp70_ = 0;
				gint _tmp71_ = 0;
				GtkWidget* _tmp72_ = NULL;
				_tmp70_ = i;
				i = _tmp70_ - 1;
				_tmp71_ = i;
				_tmp72_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp71_);
				gtk_widget_destroy (_tmp72_);
			}
			rw_props = (_vala_array_free (rw_props, rw_props_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (p);
		}
		_g_object_unref0 (_p_list);
	}
	_g_object_unref0 (personas);
	block21_data_unref (_data21_);
	_data21_ = NULL;
}


void contacts_contact_editor_clear (ContactsContactEditor* self) {
	GList* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_container_get_children ((GtkContainer*) self);
	{
		GList* w_collection = NULL;
		GList* w_it = NULL;
		w_collection = _tmp0_;
		for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
			GtkWidget* w = NULL;
			w = (GtkWidget*) w_it->data;
			{
				GtkWidget* _tmp1_ = NULL;
				_tmp1_ = w;
				gtk_widget_destroy (_tmp1_);
			}
		}
		_g_list_free0 (w_collection);
	}
	contacts_contact_editor_set_has_birthday_row (self, FALSE);
	contacts_contact_editor_set_has_nickname_row (self, FALSE);
	contacts_contact_editor_set_has_notes_row (self, FALSE);
}


GeeHashMap* contacts_contact_editor_properties_changed (ContactsContactEditor* self) {
	GeeHashMap* result = NULL;
	GeeHashMap* props_set = NULL;
	GeeHashMap* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_PROPERTY_DATA, (GBoxedCopyFunc) contacts_contact_editor_property_data_dup, contacts_contact_editor_property_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	props_set = _tmp0_;
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = self->priv->writable_personas;
		_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_g_object_unref0 (_tmp4_);
		_entry_it = _tmp6_;
		while (TRUE) {
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			_tmp7_ = _entry_it;
			_tmp8_ = gee_iterator_next (_tmp7_);
			if (!_tmp8_) {
				break;
			}
			_tmp9_ = _entry_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			entry = (GeeMapEntry*) _tmp10_;
			{
				GeeIterator* _field_entry_it = NULL;
				GeeMapEntry* _tmp11_ = NULL;
				gconstpointer _tmp12_ = NULL;
				GeeHashMap* _tmp13_ = NULL;
				GeeSet* _tmp14_ = NULL;
				GeeSet* _tmp15_ = NULL;
				GeeSet* _tmp16_ = NULL;
				GeeIterator* _tmp17_ = NULL;
				GeeIterator* _tmp18_ = NULL;
				_tmp11_ = entry;
				_tmp12_ = gee_map_entry_get_value (_tmp11_);
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_abstract_map_get_entries ((GeeMap*) ((GeeHashMap*) _tmp13_));
				_tmp15_ = _tmp14_;
				_tmp16_ = _tmp15_;
				_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
				_tmp18_ = _tmp17_;
				_g_object_unref0 (_tmp16_);
				_field_entry_it = _tmp18_;
				while (TRUE) {
					GeeIterator* _tmp19_ = NULL;
					gboolean _tmp20_ = FALSE;
					GeeMapEntry* field_entry = NULL;
					GeeIterator* _tmp21_ = NULL;
					gpointer _tmp22_ = NULL;
					gboolean _tmp23_ = FALSE;
					GeeMapEntry* _tmp24_ = NULL;
					gconstpointer _tmp25_ = NULL;
					ContactsContactEditorField* _tmp26_ = NULL;
					gboolean _tmp27_ = FALSE;
					_tmp19_ = _field_entry_it;
					_tmp20_ = gee_iterator_next (_tmp19_);
					if (!_tmp20_) {
						break;
					}
					_tmp21_ = _field_entry_it;
					_tmp22_ = gee_iterator_get (_tmp21_);
					field_entry = (GeeMapEntry*) _tmp22_;
					_tmp24_ = field_entry;
					_tmp25_ = gee_map_entry_get_value (_tmp24_);
					_tmp26_ = _tmp25_;
					_tmp27_ = (*((ContactsContactEditorField*) _tmp26_)).changed;
					if (_tmp27_) {
						GeeHashMap* _tmp28_ = NULL;
						GeeMapEntry* _tmp29_ = NULL;
						gconstpointer _tmp30_ = NULL;
						const gchar* _tmp31_ = NULL;
						gboolean _tmp32_ = FALSE;
						_tmp28_ = props_set;
						_tmp29_ = field_entry;
						_tmp30_ = gee_map_entry_get_key (_tmp29_);
						_tmp31_ = _tmp30_;
						_tmp32_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp28_, (const gchar*) _tmp31_);
						_tmp23_ = !_tmp32_;
					} else {
						_tmp23_ = FALSE;
					}
					if (_tmp23_) {
						ContactsContactEditorPropertyData p = {0};
						GeeMapEntry* _tmp33_ = NULL;
						gconstpointer _tmp34_ = NULL;
						FolksPersona* _tmp35_ = NULL;
						FolksPersona* _tmp36_ = NULL;
						GeeMapEntry* _tmp37_ = NULL;
						gconstpointer _tmp38_ = NULL;
						const gchar* _tmp39_ = NULL;
						const gchar* _tmp40_ = NULL;
						GQuark _tmp42_ = 0U;
						static GQuark _tmp41_label0 = 0;
						static GQuark _tmp41_label1 = 0;
						static GQuark _tmp41_label2 = 0;
						static GQuark _tmp41_label3 = 0;
						static GQuark _tmp41_label4 = 0;
						static GQuark _tmp41_label5 = 0;
						static GQuark _tmp41_label6 = 0;
						GeeHashMap* _tmp78_ = NULL;
						GeeMapEntry* _tmp79_ = NULL;
						gconstpointer _tmp80_ = NULL;
						const gchar* _tmp81_ = NULL;
						ContactsContactEditorPropertyData _tmp82_ = {0};
						memset (&p, 0, sizeof (ContactsContactEditorPropertyData));
						_tmp33_ = entry;
						_tmp34_ = gee_map_entry_get_key (_tmp33_);
						_tmp35_ = _tmp34_;
						_tmp36_ = _g_object_ref0 ((FolksPersona*) _tmp35_);
						_g_object_unref0 (p.persona);
						p.persona = _tmp36_;
						_tmp37_ = field_entry;
						_tmp38_ = gee_map_entry_get_key (_tmp37_);
						_tmp39_ = _tmp38_;
						_tmp40_ = (const gchar*) _tmp39_;
						_tmp42_ = (NULL == _tmp40_) ? 0 : g_quark_from_string (_tmp40_);
						if (_tmp42_ == ((0 != _tmp41_label0) ? _tmp41_label0 : (_tmp41_label0 = g_quark_from_static_string ("email-addresses")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp43_ = NULL;
									gconstpointer _tmp44_ = NULL;
									ContactsContactEditorField* _tmp45_ = NULL;
									GeeHashMap* _tmp46_ = NULL;
									GValue _tmp47_ = {0};
									_tmp43_ = field_entry;
									_tmp44_ = gee_map_entry_get_value (_tmp43_);
									_tmp45_ = _tmp44_;
									_tmp46_ = (*((ContactsContactEditorField*) _tmp45_)).rows;
									contacts_contact_editor_get_value_from_emails (self, _tmp46_, &_tmp47_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp47_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label1) ? _tmp41_label1 : (_tmp41_label1 = g_quark_from_static_string ("phone-numbers")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp48_ = NULL;
									gconstpointer _tmp49_ = NULL;
									ContactsContactEditorField* _tmp50_ = NULL;
									GeeHashMap* _tmp51_ = NULL;
									GValue _tmp52_ = {0};
									_tmp48_ = field_entry;
									_tmp49_ = gee_map_entry_get_value (_tmp48_);
									_tmp50_ = _tmp49_;
									_tmp51_ = (*((ContactsContactEditorField*) _tmp50_)).rows;
									contacts_contact_editor_get_value_from_phones (self, _tmp51_, &_tmp52_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp52_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label2) ? _tmp41_label2 : (_tmp41_label2 = g_quark_from_static_string ("urls")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp53_ = NULL;
									gconstpointer _tmp54_ = NULL;
									ContactsContactEditorField* _tmp55_ = NULL;
									GeeHashMap* _tmp56_ = NULL;
									GValue _tmp57_ = {0};
									_tmp53_ = field_entry;
									_tmp54_ = gee_map_entry_get_value (_tmp53_);
									_tmp55_ = _tmp54_;
									_tmp56_ = (*((ContactsContactEditorField*) _tmp55_)).rows;
									contacts_contact_editor_get_value_from_urls (self, _tmp56_, &_tmp57_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp57_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label3) ? _tmp41_label3 : (_tmp41_label3 = g_quark_from_static_string ("nickname")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp58_ = NULL;
									gconstpointer _tmp59_ = NULL;
									ContactsContactEditorField* _tmp60_ = NULL;
									GeeHashMap* _tmp61_ = NULL;
									GValue _tmp62_ = {0};
									_tmp58_ = field_entry;
									_tmp59_ = gee_map_entry_get_value (_tmp58_);
									_tmp60_ = _tmp59_;
									_tmp61_ = (*((ContactsContactEditorField*) _tmp60_)).rows;
									contacts_contact_editor_get_value_from_nickname (self, _tmp61_, &_tmp62_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp62_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label4) ? _tmp41_label4 : (_tmp41_label4 = g_quark_from_static_string ("birthday")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp63_ = NULL;
									gconstpointer _tmp64_ = NULL;
									ContactsContactEditorField* _tmp65_ = NULL;
									GeeHashMap* _tmp66_ = NULL;
									GValue _tmp67_ = {0};
									_tmp63_ = field_entry;
									_tmp64_ = gee_map_entry_get_value (_tmp63_);
									_tmp65_ = _tmp64_;
									_tmp66_ = (*((ContactsContactEditorField*) _tmp65_)).rows;
									contacts_contact_editor_get_value_from_birthday (self, _tmp66_, &_tmp67_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp67_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label5) ? _tmp41_label5 : (_tmp41_label5 = g_quark_from_static_string ("notes")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp68_ = NULL;
									gconstpointer _tmp69_ = NULL;
									ContactsContactEditorField* _tmp70_ = NULL;
									GeeHashMap* _tmp71_ = NULL;
									GValue _tmp72_ = {0};
									_tmp68_ = field_entry;
									_tmp69_ = gee_map_entry_get_value (_tmp68_);
									_tmp70_ = _tmp69_;
									_tmp71_ = (*((ContactsContactEditorField*) _tmp70_)).rows;
									contacts_contact_editor_get_value_from_notes (self, _tmp71_, &_tmp72_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp72_;
									break;
								}
							}
						} else if (_tmp42_ == ((0 != _tmp41_label6) ? _tmp41_label6 : (_tmp41_label6 = g_quark_from_static_string ("postal-addresses")))) {
							switch (0) {
								default:
								{
									GeeMapEntry* _tmp73_ = NULL;
									gconstpointer _tmp74_ = NULL;
									ContactsContactEditorField* _tmp75_ = NULL;
									GeeHashMap* _tmp76_ = NULL;
									GValue _tmp77_ = {0};
									_tmp73_ = field_entry;
									_tmp74_ = gee_map_entry_get_value (_tmp73_);
									_tmp75_ = _tmp74_;
									_tmp76_ = (*((ContactsContactEditorField*) _tmp75_)).rows;
									contacts_contact_editor_get_value_from_addresses (self, _tmp76_, &_tmp77_);
									G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
									p.value = _tmp77_;
									break;
								}
							}
						}
						_tmp78_ = props_set;
						_tmp79_ = field_entry;
						_tmp80_ = gee_map_entry_get_key (_tmp79_);
						_tmp81_ = _tmp80_;
						_tmp82_ = p;
						gee_abstract_map_set ((GeeAbstractMap*) _tmp78_, (const gchar*) _tmp81_, &_tmp82_);
						contacts_contact_editor_property_data_destroy (&p);
					}
					_g_object_unref0 (field_entry);
				}
				_g_object_unref0 (_field_entry_it);
			}
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	result = props_set;
	return result;
}


gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self) {
	gboolean result = FALSE;
	GtkEntry* name_entry = NULL;
	GtkWidget* _tmp0_ = NULL;
	GtkEntry* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, 0);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp0_) : NULL);
	name_entry = _tmp1_;
	_tmp2_ = g_object_get_data ((GObject*) name_entry, "changed");
	result = (gboolean) ((gintptr) _tmp2_);
	_g_object_unref0 (name_entry);
	return result;
}


void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result) {
	GValue v = {0};
	GValue _tmp0_ = {0};
	GtkEntry* name_entry = NULL;
	GtkWidget* _tmp1_ = NULL;
	GtkEntry* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	g_value_init (&_tmp0_, G_TYPE_STRING);
	v = _tmp0_;
	_tmp1_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, 0);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp1_) : NULL);
	name_entry = _tmp2_;
	_tmp3_ = gtk_entry_get_text (name_entry);
	g_value_set_string (&v, _tmp3_);
	*result = v;
	_g_object_unref0 (name_entry);
	return;
}


void contacts_contact_editor_add_new_row_for_property (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, const gchar* type) {
	FolksPersona* persona = NULL;
	FolksPersona* _tmp0_ = NULL;
	gint next_idx = 0;
	gint _tmp43_ = 0;
	gint _tmp44_ = 0;
	gint _tmp47_ = 0;
	FolksPersona* _tmp48_ = NULL;
	const gchar* _tmp49_ = NULL;
	const gchar* _tmp50_ = NULL;
	gint _tmp51_ = 0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prop_name != NULL);
	_tmp0_ = p;
	if (_tmp0_ == NULL) {
		ContactsContact* _tmp1_ = NULL;
		ContactsFakePersona* _tmp2_ = NULL;
		GeeHashMap* _tmp3_ = NULL;
		FolksPersona* _tmp4_ = NULL;
		GeeHashMap* _tmp5_ = NULL;
		GeeHashMap* _tmp6_ = NULL;
		_tmp1_ = self->priv->contact;
		_tmp2_ = contacts_fake_persona_new (_tmp1_);
		_g_object_unref0 (persona);
		persona = (FolksPersona*) _tmp2_;
		_tmp3_ = self->priv->writable_personas;
		_tmp4_ = persona;
		_tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_FIELD, (GBoxedCopyFunc) contacts_contact_editor_field_dup, contacts_contact_editor_field_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
		_tmp6_ = _tmp5_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp4_, _tmp6_);
		_g_object_unref0 (_tmp6_);
	} else {
		FolksPersona* _tmp7_ = NULL;
		FolksPersona* _tmp8_ = NULL;
		_tmp7_ = p;
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_g_object_unref0 (persona);
		persona = _tmp8_;
	}
	next_idx = 0;
	{
		GeeIterator* _fields_it = NULL;
		GeeHashMap* _tmp9_ = NULL;
		GeeCollection* _tmp10_ = NULL;
		GeeCollection* _tmp11_ = NULL;
		GeeCollection* _tmp12_ = NULL;
		GeeIterator* _tmp13_ = NULL;
		GeeIterator* _tmp14_ = NULL;
		_tmp9_ = self->priv->writable_personas;
		_tmp10_ = gee_abstract_map_get_values ((GeeMap*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
		_tmp14_ = _tmp13_;
		_g_object_unref0 (_tmp12_);
		_fields_it = _tmp14_;
		while (TRUE) {
			GeeIterator* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
			GeeHashMap* fields = NULL;
			GeeIterator* _tmp17_ = NULL;
			gpointer _tmp18_ = NULL;
			GeeHashMap* _tmp19_ = NULL;
			const gchar* _tmp20_ = NULL;
			gboolean _tmp21_ = FALSE;
			_tmp15_ = _fields_it;
			_tmp16_ = gee_iterator_next (_tmp15_);
			if (!_tmp16_) {
				break;
			}
			_tmp17_ = _fields_it;
			_tmp18_ = gee_iterator_get (_tmp17_);
			fields = (GeeHashMap*) _tmp18_;
			_tmp19_ = fields;
			_tmp20_ = prop_name;
			_tmp21_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp19_, _tmp20_);
			if (_tmp21_) {
				{
					GeeIterator* _idx_it = NULL;
					GeeHashMap* _tmp22_ = NULL;
					const gchar* _tmp23_ = NULL;
					gpointer _tmp24_ = NULL;
					ContactsContactEditorField* _tmp25_ = NULL;
					GeeHashMap* _tmp26_ = NULL;
					GeeSet* _tmp27_ = NULL;
					GeeSet* _tmp28_ = NULL;
					GeeSet* _tmp29_ = NULL;
					GeeIterator* _tmp30_ = NULL;
					GeeIterator* _tmp31_ = NULL;
					_tmp22_ = fields;
					_tmp23_ = prop_name;
					_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
					_tmp25_ = (ContactsContactEditorField*) _tmp24_;
					_tmp26_ = (*_tmp25_).rows;
					_tmp27_ = gee_abstract_map_get_keys ((GeeMap*) _tmp26_);
					_tmp28_ = _tmp27_;
					_tmp29_ = _tmp28_;
					_tmp30_ = gee_iterable_iterator ((GeeIterable*) _tmp29_);
					_tmp31_ = _tmp30_;
					_g_object_unref0 (_tmp29_);
					_contacts_contact_editor_field_free0 (_tmp25_);
					_idx_it = _tmp31_;
					while (TRUE) {
						GeeIterator* _tmp32_ = NULL;
						gboolean _tmp33_ = FALSE;
						gint idx = 0;
						GeeIterator* _tmp34_ = NULL;
						gpointer _tmp35_ = NULL;
						gint _tmp36_ = 0;
						gint _tmp37_ = 0;
						_tmp32_ = _idx_it;
						_tmp33_ = gee_iterator_next (_tmp32_);
						if (!_tmp33_) {
							break;
						}
						_tmp34_ = _idx_it;
						_tmp35_ = gee_iterator_get (_tmp34_);
						idx = (gint) ((gintptr) _tmp35_);
						_tmp36_ = idx;
						_tmp37_ = self->priv->last_row;
						if (_tmp36_ < _tmp37_) {
							gint _tmp38_ = 0;
							gint _tmp39_ = 0;
							gint _tmp40_ = 0;
							_tmp39_ = idx;
							_tmp40_ = next_idx;
							if (_tmp39_ > _tmp40_) {
								gint _tmp41_ = 0;
								_tmp41_ = idx;
								_tmp38_ = _tmp41_;
							} else {
								gint _tmp42_ = 0;
								_tmp42_ = next_idx;
								_tmp38_ = _tmp42_;
							}
							next_idx = _tmp38_;
						}
					}
					_g_object_unref0 (_idx_it);
				}
				_g_object_unref0 (fields);
				break;
			}
			_g_object_unref0 (fields);
		}
		_g_object_unref0 (_fields_it);
	}
	_tmp44_ = next_idx;
	if (_tmp44_ == 0) {
		gint _tmp45_ = 0;
		_tmp45_ = self->priv->last_row;
		_tmp43_ = _tmp45_;
	} else {
		gint _tmp46_ = 0;
		_tmp46_ = next_idx;
		_tmp43_ = _tmp46_;
	}
	next_idx = _tmp43_ + 1;
	_tmp47_ = next_idx;
	contacts_contact_editor_insert_row_at (self, _tmp47_);
	_tmp48_ = persona;
	_tmp49_ = prop_name;
	_tmp50_ = type;
	contacts_contact_editor_add_edit_row (self, _tmp48_, _tmp49_, &next_idx, TRUE, _tmp50_);
	_tmp51_ = self->priv->last_row;
	self->priv->last_row = _tmp51_ + 1;
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (persona);
}


gboolean contacts_contact_editor_get_has_birthday_row (ContactsContactEditor* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_has_birthday_row;
	result = _tmp0_;
	return result;
}


static void contacts_contact_editor_set_has_birthday_row (ContactsContactEditor* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_has_birthday_row = _tmp0_;
	g_object_notify ((GObject *) self, "has-birthday-row");
}


gboolean contacts_contact_editor_get_has_nickname_row (ContactsContactEditor* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_has_nickname_row;
	result = _tmp0_;
	return result;
}


static void contacts_contact_editor_set_has_nickname_row (ContactsContactEditor* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_has_nickname_row = _tmp0_;
	g_object_notify ((GObject *) self, "has-nickname-row");
}


gboolean contacts_contact_editor_get_has_notes_row (ContactsContactEditor* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_has_notes_row;
	result = _tmp0_;
	return result;
}


static void contacts_contact_editor_set_has_notes_row (ContactsContactEditor* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_has_notes_row = _tmp0_;
	g_object_notify ((GObject *) self, "has-notes-row");
}


void contacts_contact_editor_property_data_copy (const ContactsContactEditorPropertyData* self, ContactsContactEditorPropertyData* dest) {
	FolksPersona* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	GValue _tmp2_ = {0};
	GValue _tmp3_ = {0};
	_tmp0_ = (*self).persona;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 ((*dest).persona);
	(*dest).persona = _tmp1_;
	_tmp2_ = (*self).value;
	if (G_IS_VALUE (&_tmp2_)) {
		g_value_init (&_tmp3_, G_VALUE_TYPE (&_tmp2_));
		g_value_copy (&_tmp2_, &_tmp3_);
	} else {
		_tmp3_ = _tmp2_;
	}
	G_IS_VALUE (&(*dest).value) ? (g_value_unset (&(*dest).value), NULL) : NULL;
	(*dest).value = _tmp3_;
}


void contacts_contact_editor_property_data_destroy (ContactsContactEditorPropertyData* self) {
	_g_object_unref0 ((*self).persona);
	G_IS_VALUE (&(*self).value) ? (g_value_unset (&(*self).value), NULL) : NULL;
}


ContactsContactEditorPropertyData* contacts_contact_editor_property_data_dup (const ContactsContactEditorPropertyData* self) {
	ContactsContactEditorPropertyData* dup;
	dup = g_new0 (ContactsContactEditorPropertyData, 1);
	contacts_contact_editor_property_data_copy (self, dup);
	return dup;
}


void contacts_contact_editor_property_data_free (ContactsContactEditorPropertyData* self) {
	contacts_contact_editor_property_data_destroy (self);
	g_free (self);
}


GType contacts_contact_editor_property_data_get_type (void) {
	static volatile gsize contacts_contact_editor_property_data_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_editor_property_data_type_id__volatile)) {
		GType contacts_contact_editor_property_data_type_id;
		contacts_contact_editor_property_data_type_id = g_boxed_type_register_static ("ContactsContactEditorPropertyData", (GBoxedCopyFunc) contacts_contact_editor_property_data_dup, (GBoxedFreeFunc) contacts_contact_editor_property_data_free);
		g_once_init_leave (&contacts_contact_editor_property_data_type_id__volatile, contacts_contact_editor_property_data_type_id);
	}
	return contacts_contact_editor_property_data_type_id__volatile;
}


static void contacts_contact_editor_row_data_copy (const ContactsContactEditorRowData* self, ContactsContactEditorRowData* dest) {
	FolksAbstractFieldDetails* _tmp0_ = NULL;
	FolksAbstractFieldDetails* _tmp1_ = NULL;
	_tmp0_ = (*self).details;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 ((*dest).details);
	(*dest).details = _tmp1_;
}


static void contacts_contact_editor_row_data_destroy (ContactsContactEditorRowData* self) {
	_g_object_unref0 ((*self).details);
}


static ContactsContactEditorRowData* contacts_contact_editor_row_data_dup (const ContactsContactEditorRowData* self) {
	ContactsContactEditorRowData* dup;
	dup = g_new0 (ContactsContactEditorRowData, 1);
	contacts_contact_editor_row_data_copy (self, dup);
	return dup;
}


static void contacts_contact_editor_row_data_free (ContactsContactEditorRowData* self) {
	contacts_contact_editor_row_data_destroy (self);
	g_free (self);
}


static GType contacts_contact_editor_row_data_get_type (void) {
	static volatile gsize contacts_contact_editor_row_data_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_editor_row_data_type_id__volatile)) {
		GType contacts_contact_editor_row_data_type_id;
		contacts_contact_editor_row_data_type_id = g_boxed_type_register_static ("ContactsContactEditorRowData", (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, (GBoxedFreeFunc) contacts_contact_editor_row_data_free);
		g_once_init_leave (&contacts_contact_editor_row_data_type_id__volatile, contacts_contact_editor_row_data_type_id);
	}
	return contacts_contact_editor_row_data_type_id__volatile;
}


static void contacts_contact_editor_field_copy (const ContactsContactEditorField* self, ContactsContactEditorField* dest) {
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
	_tmp0_ = (*self).changed;
	(*dest).changed = _tmp0_;
	_tmp1_ = (*self).rows;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 ((*dest).rows);
	(*dest).rows = _tmp2_;
}


static void contacts_contact_editor_field_destroy (ContactsContactEditorField* self) {
	_g_object_unref0 ((*self).rows);
}


static ContactsContactEditorField* contacts_contact_editor_field_dup (const ContactsContactEditorField* self) {
	ContactsContactEditorField* dup;
	dup = g_new0 (ContactsContactEditorField, 1);
	contacts_contact_editor_field_copy (self, dup);
	return dup;
}


static void contacts_contact_editor_field_free (ContactsContactEditorField* self) {
	contacts_contact_editor_field_destroy (self);
	g_free (self);
}


static GType contacts_contact_editor_field_get_type (void) {
	static volatile gsize contacts_contact_editor_field_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_editor_field_type_id__volatile)) {
		GType contacts_contact_editor_field_type_id;
		contacts_contact_editor_field_type_id = g_boxed_type_register_static ("ContactsContactEditorField", (GBoxedCopyFunc) contacts_contact_editor_field_dup, (GBoxedFreeFunc) contacts_contact_editor_field_free);
		g_once_init_leave (&contacts_contact_editor_field_type_id__volatile, contacts_contact_editor_field_type_id);
	}
	return contacts_contact_editor_field_type_id__volatile;
}


static void contacts_contact_editor_class_init (ContactsContactEditorClass * klass) {
	contacts_contact_editor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ContactsContactEditorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_contacts_contact_editor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_contacts_contact_editor_set_property;
	G_OBJECT_CLASS (klass)->finalize = contacts_contact_editor_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_EDITOR_HAS_BIRTHDAY_ROW, g_param_spec_boolean ("has-birthday-row", "has-birthday-row", "has-birthday-row", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_EDITOR_HAS_NICKNAME_ROW, g_param_spec_boolean ("has-nickname-row", "has-nickname-row", "has-nickname-row", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_EDITOR_HAS_NOTES_ROW, g_param_spec_boolean ("has-notes-row", "has-notes-row", "has-notes-row", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void contacts_contact_editor_instance_init (ContactsContactEditor * self) {
	self->priv = CONTACTS_CONTACT_EDITOR_GET_PRIVATE (self);
	self->priv->_has_birthday_row = FALSE;
	self->priv->_has_nickname_row = FALSE;
	self->priv->_has_notes_row = FALSE;
}


static void contacts_contact_editor_finalize (GObject* obj) {
	ContactsContactEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor);
	_g_object_unref0 (self->priv->contact);
	_g_object_unref0 (self->priv->writable_personas);
	G_OBJECT_CLASS (contacts_contact_editor_parent_class)->finalize (obj);
}


GType contacts_contact_editor_get_type (void) {
	static volatile gsize contacts_contact_editor_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_editor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsContactEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_contact_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsContactEditor), 0, (GInstanceInitFunc) contacts_contact_editor_instance_init, NULL };
		GType contacts_contact_editor_type_id;
		contacts_contact_editor_type_id = g_type_register_static (GTK_TYPE_GRID, "ContactsContactEditor", &g_define_type_info, 0);
		g_once_init_leave (&contacts_contact_editor_type_id__volatile, contacts_contact_editor_type_id);
	}
	return contacts_contact_editor_type_id__volatile;
}


static void _vala_contacts_contact_editor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ContactsContactEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor);
	switch (property_id) {
		case CONTACTS_CONTACT_EDITOR_HAS_BIRTHDAY_ROW:
		g_value_set_boolean (value, contacts_contact_editor_get_has_birthday_row (self));
		break;
		case CONTACTS_CONTACT_EDITOR_HAS_NICKNAME_ROW:
		g_value_set_boolean (value, contacts_contact_editor_get_has_nickname_row (self));
		break;
		case CONTACTS_CONTACT_EDITOR_HAS_NOTES_ROW:
		g_value_set_boolean (value, contacts_contact_editor_get_has_notes_row (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_contacts_contact_editor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ContactsContactEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor);
	switch (property_id) {
		case CONTACTS_CONTACT_EDITOR_HAS_BIRTHDAY_ROW:
		contacts_contact_editor_set_has_birthday_row (self, g_value_get_boolean (value));
		break;
		case CONTACTS_CONTACT_EDITOR_HAS_NICKNAME_ROW:
		contacts_contact_editor_set_has_nickname_row (self, g_value_get_boolean (value));
		break;
		case CONTACTS_CONTACT_EDITOR_HAS_NOTES_ROW:
		contacts_contact_editor_set_has_notes_row (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, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



