/* contacts-contact-pane.c generated by valac 0.20.1, the Vala compiler
 * generated from contacts-contact-pane.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 <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <folks/folks.h>
#include <float.h>
#include <math.h>
#include <gee.h>
#include <cairo.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>


#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_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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block28Data Block28Data;

#define CONTACTS_TYPE_AVATAR_DIALOG (contacts_avatar_dialog_get_type ())
#define CONTACTS_AVATAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_AVATAR_DIALOG, ContactsAvatarDialog))
#define CONTACTS_AVATAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_AVATAR_DIALOG, ContactsAvatarDialogClass))
#define CONTACTS_IS_AVATAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_AVATAR_DIALOG))
#define CONTACTS_IS_AVATAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_AVATAR_DIALOG))
#define CONTACTS_AVATAR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_AVATAR_DIALOG, ContactsAvatarDialogClass))

typedef struct _ContactsAvatarDialog ContactsAvatarDialog;
typedef struct _ContactsAvatarDialogClass ContactsAvatarDialogClass;

#define CONTACTS_TYPE_APP (contacts_app_get_type ())
#define CONTACTS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_APP, ContactsApp))
#define CONTACTS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_APP, ContactsAppClass))
#define CONTACTS_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_APP))
#define CONTACTS_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_APP))
#define CONTACTS_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_APP, ContactsAppClass))

typedef struct _ContactsApp ContactsApp;
typedef struct _ContactsAppClass ContactsAppClass;
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_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_CENTER (center_get_type ())
#define CENTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CENTER, Center))
#define CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CENTER, CenterClass))
#define IS_CENTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CENTER))
#define IS_CENTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CENTER))
#define CENTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CENTER, CenterClass))

typedef struct _Center Center;
typedef struct _CenterClass CenterClass;
typedef struct _CenterPrivate CenterPrivate;

#define CONTACTS_TYPE_CONTACT_PANE (contacts_contact_pane_get_type ())
#define CONTACTS_CONTACT_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_PANE, ContactsContactPane))
#define CONTACTS_CONTACT_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_PANE, ContactsContactPaneClass))
#define CONTACTS_IS_CONTACT_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_PANE))
#define CONTACTS_IS_CONTACT_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_PANE))
#define CONTACTS_CONTACT_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_PANE, ContactsContactPaneClass))

typedef struct _ContactsContactPane ContactsContactPane;
typedef struct _ContactsContactPaneClass ContactsContactPaneClass;
typedef struct _ContactsContactPanePrivate ContactsContactPanePrivate;

#define CONTACTS_TYPE_CONTACT_SHEET (contacts_contact_sheet_get_type ())
#define CONTACTS_CONTACT_SHEET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_SHEET, ContactsContactSheet))
#define CONTACTS_CONTACT_SHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_SHEET, ContactsContactSheetClass))
#define CONTACTS_IS_CONTACT_SHEET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_SHEET))
#define CONTACTS_IS_CONTACT_SHEET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_SHEET))
#define CONTACTS_CONTACT_SHEET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_SHEET, ContactsContactSheetClass))

typedef struct _ContactsContactSheet ContactsContactSheet;
typedef struct _ContactsContactSheetClass ContactsContactSheetClass;

#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 _Block29Data Block29Data;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block30Data Block30Data;

#define CONTACTS_TYPE_LINK_OPERATION (contacts_link_operation_get_type ())
#define CONTACTS_LINK_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_LINK_OPERATION, ContactsLinkOperation))
#define CONTACTS_LINK_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_LINK_OPERATION, ContactsLinkOperationClass))
#define CONTACTS_IS_LINK_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_LINK_OPERATION))
#define CONTACTS_IS_LINK_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_LINK_OPERATION))
#define CONTACTS_LINK_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_LINK_OPERATION, ContactsLinkOperationClass))

typedef struct _ContactsLinkOperation ContactsLinkOperation;
typedef struct _ContactsLinkOperationClass ContactsLinkOperationClass;

#define CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG (contacts_linked_accounts_dialog_get_type ())
#define CONTACTS_LINKED_ACCOUNTS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG, ContactsLinkedAccountsDialog))
#define CONTACTS_LINKED_ACCOUNTS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG, ContactsLinkedAccountsDialogClass))
#define CONTACTS_IS_LINKED_ACCOUNTS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG))
#define CONTACTS_IS_LINKED_ACCOUNTS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG))
#define CONTACTS_LINKED_ACCOUNTS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_LINKED_ACCOUNTS_DIALOG, ContactsLinkedAccountsDialogClass))

typedef struct _ContactsLinkedAccountsDialog ContactsLinkedAccountsDialog;
typedef struct _ContactsLinkedAccountsDialogClass ContactsLinkedAccountsDialogClass;
typedef struct _ContactsLinkedAccountsDialogPrivate ContactsLinkedAccountsDialogPrivate;

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

struct _Block28Data {
	int _ref_count_;
	ContactsContact* contact;
	ContactsContactFrame* image_frame;
};

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 _Center {
	GtkBin parent_instance;
	CenterPrivate * priv;
};

struct _CenterClass {
	GtkBinClass parent_class;
};

struct _CenterPrivate {
	gint _max_width;
	gdouble _xalign;
};

struct _ContactsContactPane {
	GtkNotebook parent_instance;
	ContactsContactPanePrivate * priv;
	ContactsContact* contact;
	gboolean on_edit_mode;
	GtkGrid* suggestion_grid;
};

struct _ContactsContactPaneClass {
	GtkNotebookClass parent_class;
};

struct _ContactsContactPanePrivate {
	ContactsStore* contacts_store;
	GtkFrame* no_selection_frame;
	ContactsContactSheet* sheet;
	ContactsContactEditor* editor;
	GtkButton* linked_button;
	GtkButton* remove_button;
	GtkMenuItem* nickname_item;
	GtkMenuItem* birthday_item;
	GtkMenuItem* notes_item;
};

struct _Block29Data {
	int _ref_count_;
	ContactsContactPane * self;
	ContactsContact* c;
};

struct _Block30Data {
	int _ref_count_;
	Block29Data * _data29_;
	gchar* linked_contact;
};

struct _ContactsLinkedAccountsDialog {
	GtkDialog parent_instance;
	ContactsLinkedAccountsDialogPrivate * priv;
	gboolean any_unlinked;
};

struct _ContactsLinkedAccountsDialogClass {
	GtkDialogClass parent_class;
};

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

typedef enum  {
	CONTACT_ERROR_NOT_IMPLEMENTED,
	CONTACT_ERROR_NO_PRIMARY
} ContactError;
#define CONTACT_ERROR contact_error_quark ()

extern ContactsApp* contacts_app_app;
static gpointer center_parent_class = NULL;
static gpointer contacts_contact_pane_parent_class = NULL;

#define PROFILE_SIZE 128
void gtk_menu_button_set_popup (GtkMenuButton* button, GtkWidget* popup);
GType contacts_contact_get_type (void) G_GNUC_CONST;
GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
void contacts_change_avatar (ContactsContact* contact, ContactsContactFrame* image_frame);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
ContactsAvatarDialog* contacts_avatar_dialog_new (ContactsContact* contact);
ContactsAvatarDialog* contacts_avatar_dialog_construct (GType object_type, ContactsContact* contact);
GType contacts_avatar_dialog_get_type (void) G_GNUC_CONST;
static void __lambda67_ (Block28Data* _data28_, GIcon* icon);
void contacts_contact_set_individual_property (ContactsContact* contact, const gchar* property_name, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
FolksPersona* contacts_contact_set_individual_property_finish (GAsyncResult* _res_, GError** error);
static void __lambda68_ (Block28Data* _data28_, GObject* obj, GAsyncResult* _result_);
GType contacts_app_get_type (void) G_GNUC_CONST;
void contacts_app_show_message (ContactsApp* self, const gchar* message);
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
GType contacts_store_get_type (void) G_GNUC_CONST;
static void ___lambda68__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ___lambda67__contacts_avatar_dialog_set_avatar (ContactsAvatarDialog* _sender, GIcon* avatar_icon, gpointer self);
GType center_get_type (void) G_GNUC_CONST;
#define CENTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CENTER, CenterPrivate))
enum  {
	CENTER_DUMMY_PROPERTY,
	CENTER_MAX_WIDTH,
	CENTER_XALIGN
};
Center* center_new (void);
Center* center_construct (GType object_type);
void center_set_xalign (Center* self, gdouble value);
static void center_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height);
static void center_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width);
static void center_real_size_allocate (GtkWidget* base, GtkAllocation* allocation);
gint center_get_max_width (Center* self);
gdouble center_get_xalign (Center* self);
void center_set_max_width (Center* self, gint value);
static void center_finalize (GObject* obj);
static void _vala_center_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_center_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType contacts_contact_pane_get_type (void) G_GNUC_CONST;
GType contacts_contact_sheet_get_type (void) G_GNUC_CONST;
GType contacts_contact_editor_get_type (void) G_GNUC_CONST;
#define CONTACTS_CONTACT_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_CONTACT_PANE, ContactsContactPanePrivate))
enum  {
	CONTACTS_CONTACT_PANE_DUMMY_PROPERTY
};
void contacts_contact_pane_update_sheet (ContactsContactPane* self, gboolean show_matches);
void contacts_contact_sheet_clear (ContactsContactSheet* self);
void contacts_contact_sheet_update (ContactsContactSheet* self, ContactsContact* c);
FolksIndividualAggregator* contacts_store_get_aggregator (ContactsStore* self);
ContactsContact* contacts_contact_from_individual (FolksIndividual* i);
gboolean contacts_contact_suggest_link_to (ContactsContact* self, ContactsContact* other);
void contacts_contact_pane_add_suggestion (ContactsContactPane* self, ContactsContact* c);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static gboolean __lambda71_ (ContactsContactPane* self, cairo_t* cr);
static gboolean ___lambda71__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
#define CONTACTS_CONTACT_SMALL_AVATAR_SIZE 54
ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button);
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
static void __lambda72_ (Block29Data* _data29_, GtkWidget* w);
static void ___lambda72__gtk_callback (GtkWidget* widget, gpointer self);
const gchar* contacts_contact_get_display_name (ContactsContact* self);
gchar* contacts_contact_format_persona_stores (ContactsContact* self);
static void __lambda73_ (Block29Data* _data29_);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
void contacts_link_contacts (ContactsContact* main, ContactsContact* other, GAsyncReadyCallback _callback_, gpointer _user_data_);
GType contacts_link_operation_get_type (void) G_GNUC_CONST;
ContactsLinkOperation* contacts_link_contacts_finish (GAsyncResult* _res_);
static void __lambda74_ (Block30Data* _data30_, GObject* obj, GAsyncResult* _result_);
static void ___lambda74__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ___lambda73__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda75_ (Block29Data* _data29_);
void contacts_store_add_no_suggest_link (ContactsStore* self, ContactsContact* a, ContactsContact* b);
static void ___lambda75__gtk_button_clicked (GtkButton* _sender, gpointer self);
void contacts_contact_pane_show_contact (ContactsContactPane* self, ContactsContact* new_contact, gboolean edit, gboolean show_matches);
static void contacts_contact_pane_personas_changed_cb (ContactsContactPane* self, ContactsContact* contact);
static void _contacts_contact_pane_personas_changed_cb_contacts_contact_personas_changed (ContactsContact* _sender, gpointer self);
static void contacts_contact_pane_contact_changed_cb (ContactsContactPane* self, ContactsContact* contact);
static void _contacts_contact_pane_contact_changed_cb_contacts_contact_changed (ContactsContact* _sender, gpointer self);
gboolean contacts_contact_can_remove_personas (ContactsContact* self);
static void contacts_contact_pane_show_no_selection_frame (ContactsContactPane* self);
ContactsContactPane* contacts_contact_pane_new (ContactsStore* contacts_store);
ContactsContactPane* contacts_contact_pane_construct (GType object_type, ContactsStore* contacts_store);
ContactsContactSheet* contacts_contact_sheet_new (void);
ContactsContactSheet* contacts_contact_sheet_construct (GType object_type);
static void __lambda76_ (ContactsContactPane* self);
static void ___lambda76__contacts_store_quiescent (ContactsStore* _sender, gpointer self);
ContactsContactEditor* contacts_contact_editor_new (void);
ContactsContactEditor* contacts_contact_editor_construct (GType object_type);
static void __lambda77_ (ContactsContactPane* self);
void contacts_contact_editor_add_new_row_for_property (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, const gchar* type);
FolksPersona* contacts_contact_find_primary_persona (ContactsContact* self);
static void ___lambda77__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda78_ (ContactsContactPane* self);
static void ___lambda78__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda79_ (ContactsContactPane* self);
static void ___lambda79__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda80_ (ContactsContactPane* self);
static void ___lambda80__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda81_ (ContactsContactPane* self);
static void ___lambda81__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda82_ (ContactsContactPane* self);
static void ___lambda82__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda83_ (ContactsContactPane* self);
static void ___lambda83__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda84_ (ContactsContactPane* self);
static void ___lambda84__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda85_ (ContactsContactPane* self);
static void ___lambda85__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda86_ (ContactsContactPane* self);
static void ___lambda86__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void __lambda87_ (ContactsContactPane* self);
static void ___lambda87__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self);
static void contacts_contact_pane_linked_accounts (ContactsContactPane* self);
static void _contacts_contact_pane_linked_accounts_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_pane_delete_contact (ContactsContactPane* self);
static void _contacts_contact_pane_delete_contact_gtk_button_clicked (GtkButton* _sender, gpointer self);
ContactsLinkedAccountsDialog* contacts_linked_accounts_dialog_new (ContactsContact* contact);
ContactsLinkedAccountsDialog* contacts_linked_accounts_dialog_construct (GType object_type, ContactsContact* contact);
GType contacts_linked_accounts_dialog_get_type (void) G_GNUC_CONST;
void contacts_contact_pane_set_edit_mode (ContactsContactPane* self, gboolean on_edit);
void contacts_contact_hide (ContactsContact* self);
gboolean contacts_contact_has_birthday (ContactsContact* self);
gboolean contacts_contact_has_nickname (ContactsContact* self);
gboolean contacts_contact_has_notes (ContactsContact* self);
void contacts_contact_editor_clear (ContactsContactEditor* self);
void contacts_contact_editor_update (ContactsContactEditor* self, ContactsContact* c);
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);
void contacts_contact_set_persona_property (FolksPersona* persona, const gchar* property_name, GValue* new_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
GQuark contact_error_quark (void);
void contacts_contact_set_persona_property_finish (GAsyncResult* _res_, GError** error);
static void _____lambda91_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_);
static void ______lambda91__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self);
void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result);
static void ____lambda92_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_);
static void _____lambda92__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void g_cclosure_user_marshal_VOID__STRING_STRING_OBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void contacts_contact_pane_finalize (GObject* obj);


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


static Block28Data* block28_data_ref (Block28Data* _data28_) {
	g_atomic_int_inc (&_data28_->_ref_count_);
	return _data28_;
}


static void block28_data_unref (void * _userdata_) {
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
		_g_object_unref0 (_data28_->contact);
		_g_object_unref0 (_data28_->image_frame);
		g_slice_free (Block28Data, _data28_);
	}
}


static void __lambda68_ (Block28Data* _data28_, GObject* obj, GAsyncResult* _result_) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (_result_ != NULL);
	{
		GAsyncResult* _tmp0_;
		FolksPersona* _tmp1_ = NULL;
		FolksPersona* _tmp2_;
		_tmp0_ = _result_;
		_tmp1_ = contacts_contact_set_individual_property_finish (_tmp0_, &_inner_error_);
		_tmp2_ = _tmp1_;
		_g_object_unref0 (_tmp2_);
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e = NULL;
		ContactsApp* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		ContactsContactFrame* _tmp6_;
		ContactsContact* _tmp7_;
		FolksIndividual* _tmp8_;
		ContactsContact* _tmp9_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = contacts_app_app;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		contacts_app_show_message (_tmp3_, _tmp5_);
		_tmp6_ = _data28_->image_frame;
		_tmp7_ = _data28_->contact;
		_tmp8_ = _tmp7_->individual;
		_tmp9_ = _data28_->contact;
		contacts_contact_frame_set_image (_tmp6_, (FolksAvatarDetails*) _tmp8_, _tmp9_);
		_g_error_free0 (e);
	}
	__finally4:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void ___lambda68__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda68_ (self, source_object, res);
	block28_data_unref (self);
}


static void __lambda67_ (Block28Data* _data28_, GIcon* icon) {
	GIcon* _tmp0_;
	GType _tmp1_ = 0UL;
	GValue _tmp2_ = {0};
	GValue v;
	GIcon* _tmp3_;
	ContactsContact* _tmp4_;
	GValue _tmp5_;
	g_return_if_fail (icon != NULL);
	_tmp0_ = icon;
	_tmp1_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp0_);
	g_value_init (&_tmp2_, _tmp1_);
	v = _tmp2_;
	_tmp3_ = icon;
	g_value_set_object (&v, (GObject*) _tmp3_);
	_tmp4_ = _data28_->contact;
	_tmp5_ = v;
	contacts_contact_set_individual_property (_tmp4_, "avatar", &_tmp5_, ___lambda68__gasync_ready_callback, block28_data_ref (_data28_));
	G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
}


static void ___lambda67__contacts_avatar_dialog_set_avatar (ContactsAvatarDialog* _sender, GIcon* avatar_icon, gpointer self) {
	__lambda67_ (self, avatar_icon);
}


void contacts_change_avatar (ContactsContact* contact, ContactsContactFrame* image_frame) {
	Block28Data* _data28_;
	ContactsContact* _tmp0_;
	ContactsContact* _tmp1_;
	ContactsContactFrame* _tmp2_;
	ContactsContactFrame* _tmp3_;
	ContactsContact* _tmp4_;
	ContactsAvatarDialog* _tmp5_;
	ContactsAvatarDialog* dialog;
	g_return_if_fail (contact != NULL);
	g_return_if_fail (image_frame != NULL);
	_data28_ = g_slice_new0 (Block28Data);
	_data28_->_ref_count_ = 1;
	_tmp0_ = contact;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data28_->contact);
	_data28_->contact = _tmp1_;
	_tmp2_ = image_frame;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (_data28_->image_frame);
	_data28_->image_frame = _tmp3_;
	_tmp4_ = _data28_->contact;
	_tmp5_ = contacts_avatar_dialog_new (_tmp4_);
	g_object_ref_sink (_tmp5_);
	dialog = _tmp5_;
	gtk_widget_show ((GtkWidget*) dialog);
	g_signal_connect_data (dialog, "set-avatar", (GCallback) ___lambda67__contacts_avatar_dialog_set_avatar, block28_data_ref (_data28_), (GClosureNotify) block28_data_unref, 0);
	_g_object_unref0 (dialog);
	block28_data_unref (_data28_);
	_data28_ = NULL;
}


Center* center_construct (GType object_type) {
	Center * self = NULL;
	self = (Center*) g_object_new (object_type, NULL);
	center_set_xalign (self, 0.5);
	return self;
}


Center* center_new (void) {
	return center_construct (TYPE_CENTER);
}


static void center_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height) {
	Center * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* child;
	GtkWidget* _tmp2_;
	self = (Center*) base;
	_tmp0_ = gtk_bin_get_child ((GtkBin*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	_tmp2_ = child;
	if (_tmp2_ != NULL) {
		gint min = 0;
		gint nat = 0;
		GtkWidget* _tmp3_;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _tmp6_;
		gint _tmp7_;
		_tmp3_ = child;
		gtk_widget_get_preferred_height (_tmp3_, &_tmp4_, &_tmp5_);
		min = _tmp4_;
		nat = _tmp5_;
		_tmp6_ = min;
		_vala_minimum_height = _tmp6_;
		_tmp7_ = nat;
		_vala_natural_height = _tmp7_;
	}
	_g_object_unref0 (child);
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static void center_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width) {
	Center * self;
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_;
	GtkWidget* child;
	GtkWidget* _tmp2_;
	self = (Center*) base;
	_tmp0_ = gtk_bin_get_child ((GtkBin*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	_tmp2_ = child;
	if (_tmp2_ != NULL) {
		gint min = 0;
		gint nat = 0;
		GtkWidget* _tmp3_;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _tmp6_;
		gint _tmp7_;
		_tmp3_ = child;
		gtk_widget_get_preferred_width (_tmp3_, &_tmp4_, &_tmp5_);
		min = _tmp4_;
		nat = _tmp5_;
		_tmp6_ = min;
		_vala_minimum_width = _tmp6_;
		_tmp7_ = nat;
		_vala_natural_width = _tmp7_;
	}
	_g_object_unref0 (child);
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


static void center_real_size_allocate (GtkWidget* base, GtkAllocation* allocation) {
	Center * self;
	GtkAllocation new_alloc = {0};
	GtkAllocation _tmp0_;
	GtkAllocation _tmp1_;
	GtkAllocation _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	GtkWidget* _tmp12_ = NULL;
	GtkWidget* _tmp13_;
	GtkWidget* child;
	GtkAllocation _tmp14_;
	self = (Center*) base;
	g_return_if_fail (allocation != NULL);
	_tmp0_ = *allocation;
	gtk_widget_set_allocation ((GtkWidget*) self, &_tmp0_);
	_tmp1_ = *allocation;
	new_alloc = _tmp1_;
	_tmp2_ = *allocation;
	_tmp3_ = _tmp2_.width;
	_tmp4_ = self->priv->_max_width;
	if (_tmp3_ > _tmp4_) {
		gint _tmp5_;
		GtkAllocation _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gdouble _tmp9_;
		GtkAllocation _tmp10_;
		gint _tmp11_;
		_tmp5_ = self->priv->_max_width;
		new_alloc.width = _tmp5_;
		_tmp6_ = *allocation;
		_tmp7_ = _tmp6_.width;
		_tmp8_ = self->priv->_max_width;
		_tmp9_ = self->priv->_xalign;
		_tmp10_ = *allocation;
		_tmp11_ = _tmp10_.x;
		new_alloc.x = ((gint) ((_tmp7_ - _tmp8_) * _tmp9_)) + _tmp11_;
	}
	_tmp12_ = gtk_bin_get_child ((GtkBin*) self);
	_tmp13_ = _g_object_ref0 (_tmp12_);
	child = _tmp13_;
	_tmp14_ = new_alloc;
	gtk_widget_size_allocate (child, &_tmp14_);
	_g_object_unref0 (child);
}


gint center_get_max_width (Center* self) {
	gint result;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_max_width;
	result = _tmp0_;
	return result;
}


void center_set_max_width (Center* self, gint value) {
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_max_width = _tmp0_;
	g_object_notify ((GObject *) self, "max-width");
}


gdouble center_get_xalign (Center* self) {
	gdouble result;
	gdouble _tmp0_;
	g_return_val_if_fail (self != NULL, 0.0);
	_tmp0_ = self->priv->_xalign;
	result = _tmp0_;
	return result;
}


void center_set_xalign (Center* self, gdouble value) {
	gdouble _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_xalign = _tmp0_;
	g_object_notify ((GObject *) self, "xalign");
}


static void center_class_init (CenterClass * klass) {
	center_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (CenterPrivate));
	GTK_WIDGET_CLASS (klass)->get_preferred_height = center_real_get_preferred_height;
	GTK_WIDGET_CLASS (klass)->get_preferred_width = center_real_get_preferred_width;
	GTK_WIDGET_CLASS (klass)->size_allocate = center_real_size_allocate;
	G_OBJECT_CLASS (klass)->get_property = _vala_center_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_center_set_property;
	G_OBJECT_CLASS (klass)->finalize = center_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CENTER_MAX_WIDTH, g_param_spec_int ("max-width", "max-width", "max-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), CENTER_XALIGN, g_param_spec_double ("xalign", "xalign", "xalign", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void center_instance_init (Center * self) {
	self->priv = CENTER_GET_PRIVATE (self);
}


static void center_finalize (GObject* obj) {
	Center * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CENTER, Center);
	G_OBJECT_CLASS (center_parent_class)->finalize (obj);
}


GType center_get_type (void) {
	static volatile gsize center_type_id__volatile = 0;
	if (g_once_init_enter (&center_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (CenterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) center_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Center), 0, (GInstanceInitFunc) center_instance_init, NULL };
		GType center_type_id;
		center_type_id = g_type_register_static (GTK_TYPE_BIN, "Center", &g_define_type_info, 0);
		g_once_init_leave (&center_type_id__volatile, center_type_id);
	}
	return center_type_id__volatile;
}


static void _vala_center_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	Center * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CENTER, Center);
	switch (property_id) {
		case CENTER_MAX_WIDTH:
		g_value_set_int (value, center_get_max_width (self));
		break;
		case CENTER_XALIGN:
		g_value_set_double (value, center_get_xalign (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_center_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	Center * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_CENTER, Center);
	switch (property_id) {
		case CENTER_MAX_WIDTH:
		center_set_max_width (self, g_value_get_int (value));
		break;
		case CENTER_XALIGN:
		center_set_xalign (self, g_value_get_double (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


void contacts_contact_pane_update_sheet (ContactsContactPane* self, gboolean show_matches) {
	gboolean _tmp0_;
	ContactsContactSheet* _tmp1_;
	ContactsContact* _tmp2_;
	ContactsContactSheet* _tmp3_;
	ContactsContact* _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->on_edit_mode;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->sheet;
	contacts_contact_sheet_clear (_tmp1_);
	_tmp2_ = self->contact;
	if (_tmp2_ == NULL) {
		return;
	}
	_tmp3_ = self->priv->sheet;
	_tmp4_ = self->contact;
	contacts_contact_sheet_update (_tmp3_, _tmp4_);
	gtk_notebook_set_current_page ((GtkNotebook*) self, 1);
	_tmp5_ = show_matches;
	if (_tmp5_) {
		ContactsContact* _tmp6_;
		ContactsStore* _tmp7_;
		FolksIndividualAggregator* _tmp8_;
		FolksIndividualAggregator* _tmp9_;
		ContactsContact* _tmp10_;
		FolksIndividual* _tmp11_;
		GeeMap* _tmp12_ = NULL;
		GeeMap* matches;
		_tmp6_ = self->contact;
		_tmp7_ = _tmp6_->store;
		_tmp8_ = contacts_store_get_aggregator (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = self->contact;
		_tmp11_ = _tmp10_->individual;
		_tmp12_ = folks_individual_aggregator_get_potential_matches (_tmp9_, _tmp11_, FOLKS_MATCH_RESULT_HIGH);
		matches = _tmp12_;
		{
			GeeMap* _tmp13_;
			GeeSet* _tmp14_;
			GeeSet* _tmp15_;
			GeeSet* _tmp16_;
			GeeIterator* _tmp17_ = NULL;
			GeeIterator* _tmp18_;
			GeeIterator* _ind_it;
			_tmp13_ = matches;
			_tmp14_ = gee_map_get_keys (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = _tmp15_;
			_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
			_tmp18_ = _tmp17_;
			_g_object_unref0 (_tmp16_);
			_ind_it = _tmp18_;
			while (TRUE) {
				GeeIterator* _tmp19_;
				gboolean _tmp20_ = FALSE;
				GeeIterator* _tmp21_;
				gpointer _tmp22_ = NULL;
				FolksIndividual* ind;
				FolksIndividual* _tmp23_;
				ContactsContact* _tmp24_ = NULL;
				ContactsContact* c;
				gboolean _tmp25_ = FALSE;
				ContactsContact* _tmp26_;
				gboolean _tmp30_;
				_tmp19_ = _ind_it;
				_tmp20_ = gee_iterator_next (_tmp19_);
				if (!_tmp20_) {
					break;
				}
				_tmp21_ = _ind_it;
				_tmp22_ = gee_iterator_get (_tmp21_);
				ind = (FolksIndividual*) _tmp22_;
				_tmp23_ = ind;
				_tmp24_ = contacts_contact_from_individual (_tmp23_);
				c = _tmp24_;
				_tmp26_ = c;
				if (_tmp26_ != NULL) {
					ContactsContact* _tmp27_;
					ContactsContact* _tmp28_;
					gboolean _tmp29_ = FALSE;
					_tmp27_ = self->contact;
					_tmp28_ = c;
					_tmp29_ = contacts_contact_suggest_link_to (_tmp27_, _tmp28_);
					_tmp25_ = _tmp29_;
				} else {
					_tmp25_ = FALSE;
				}
				_tmp30_ = _tmp25_;
				if (_tmp30_) {
					ContactsContact* _tmp31_;
					_tmp31_ = c;
					contacts_contact_pane_add_suggestion (self, _tmp31_);
				}
				_g_object_unref0 (c);
				_g_object_unref0 (ind);
			}
			_g_object_unref0 (_ind_it);
		}
		_g_object_unref0 (matches);
	}
}


static Block29Data* block29_data_ref (Block29Data* _data29_) {
	g_atomic_int_inc (&_data29_->_ref_count_);
	return _data29_;
}


static void block29_data_unref (void * _userdata_) {
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
		ContactsContactPane * self;
		self = _data29_->self;
		_g_object_unref0 (_data29_->c);
		_g_object_unref0 (self);
		g_slice_free (Block29Data, _data29_);
	}
}


static gboolean __lambda71_ (ContactsContactPane* self, cairo_t* cr) {
	gboolean result = FALSE;
	GtkAllocation allocation = {0};
	GtkGrid* _tmp0_;
	GtkAllocation _tmp1_ = {0};
	GtkGrid* _tmp2_;
	GtkStyleContext* _tmp3_ = NULL;
	GtkStyleContext* _tmp4_;
	GtkStyleContext* context;
	cairo_t* _tmp5_;
	GtkAllocation _tmp6_;
	gint _tmp7_;
	GtkAllocation _tmp8_;
	gint _tmp9_;
	g_return_val_if_fail (cr != NULL, FALSE);
	_tmp0_ = self->suggestion_grid;
	gtk_widget_get_allocation ((GtkWidget*) _tmp0_, &_tmp1_);
	allocation = _tmp1_;
	_tmp2_ = self->suggestion_grid;
	_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	context = _tmp4_;
	_tmp5_ = cr;
	_tmp6_ = allocation;
	_tmp7_ = _tmp6_.width;
	_tmp8_ = allocation;
	_tmp9_ = _tmp8_.height;
	gtk_render_background (context, _tmp5_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp7_, (gdouble) _tmp9_);
	result = FALSE;
	_g_object_unref0 (context);
	return result;
}


static gboolean ___lambda71__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
	gboolean result;
	result = __lambda71_ (self, cr);
	return result;
}


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


static void ___lambda72__gtk_callback (GtkWidget* widget, gpointer self) {
	__lambda72_ (self, widget);
}


static Block30Data* block30_data_ref (Block30Data* _data30_) {
	g_atomic_int_inc (&_data30_->_ref_count_);
	return _data30_;
}


static void block30_data_unref (void * _userdata_) {
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
		ContactsContactPane * self;
		self = _data30_->_data29_->self;
		_g_free0 (_data30_->linked_contact);
		block29_data_unref (_data30_->_data29_);
		_data30_->_data29_ = NULL;
		g_slice_free (Block30Data, _data30_);
	}
}


static void __lambda74_ (Block30Data* _data30_, GObject* obj, GAsyncResult* _result_) {
	Block29Data* _data29_;
	ContactsContactPane * self;
	GAsyncResult* _tmp0_;
	ContactsLinkOperation* _tmp1_ = NULL;
	ContactsLinkOperation* operation;
	_data29_ = _data30_->_data29_;
	self = _data29_->self;
	g_return_if_fail (_result_ != NULL);
	_tmp0_ = _result_;
	_tmp1_ = contacts_link_contacts_finish (_tmp0_);
	operation = _tmp1_;
	g_signal_emit_by_name (self, "contacts-linked", NULL, _data30_->linked_contact, operation);
	_g_object_unref0 (operation);
}


static void ___lambda74__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda74_ (self, source_object, res);
	block30_data_unref (self);
}


static void __lambda73_ (Block29Data* _data29_) {
	ContactsContactPane * self;
	Block30Data* _data30_;
	ContactsContact* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	ContactsContact* _tmp4_;
	ContactsContact* _tmp5_;
	GtkGrid* _tmp6_;
	self = _data29_->self;
	_data30_ = g_slice_new0 (Block30Data);
	_data30_->_ref_count_ = 1;
	_data30_->_data29_ = block29_data_ref (_data29_);
	_tmp0_ = _data29_->c;
	_tmp1_ = contacts_contact_get_display_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	_data30_->linked_contact = _tmp3_;
	_tmp4_ = self->contact;
	_tmp5_ = _data29_->c;
	contacts_link_contacts (_tmp4_, _tmp5_, ___lambda74__gasync_ready_callback, block30_data_ref (_data30_));
	_tmp6_ = self->suggestion_grid;
	gtk_widget_destroy ((GtkWidget*) _tmp6_);
	block30_data_unref (_data30_);
	_data30_ = NULL;
}


static void ___lambda73__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda73_ (self);
}


static void __lambda75_ (Block29Data* _data29_) {
	ContactsContactPane * self;
	ContactsStore* _tmp0_;
	ContactsContact* _tmp1_;
	ContactsContact* _tmp2_;
	GtkGrid* _tmp3_;
	self = _data29_->self;
	_tmp0_ = self->priv->contacts_store;
	_tmp1_ = self->contact;
	_tmp2_ = _data29_->c;
	contacts_store_add_no_suggest_link (_tmp0_, _tmp1_, _tmp2_);
	_tmp3_ = self->suggestion_grid;
	gtk_widget_destroy ((GtkWidget*) _tmp3_);
}


static void ___lambda75__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda75_ (self);
}


void contacts_contact_pane_add_suggestion (ContactsContactPane* self, ContactsContact* c) {
	Block29Data* _data29_;
	ContactsContact* _tmp0_;
	ContactsContact* _tmp1_;
	GtkWidget* _tmp2_ = NULL;
	GtkOverlay* _tmp3_;
	GtkOverlay* parent_overlay;
	GtkGrid* _tmp4_;
	GtkGrid* _tmp6_;
	GtkGrid* _tmp7_;
	GtkOverlay* _tmp8_;
	GtkGrid* _tmp9_;
	GtkGrid* _tmp10_;
	GtkStyleContext* _tmp11_ = NULL;
	GtkGrid* _tmp12_;
	GtkGrid* _tmp13_;
	ContactsContactFrame* _tmp14_;
	ContactsContactFrame* image_frame;
	ContactsContactFrame* _tmp15_;
	ContactsContactFrame* _tmp16_;
	ContactsContactFrame* _tmp17_;
	ContactsContact* _tmp18_;
	ContactsContactFrame* _tmp19_;
	GtkGrid* _tmp20_;
	ContactsContactFrame* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* label;
	ContactsContact* _tmp23_;
	gboolean _tmp24_;
	GtkLabel* _tmp42_;
	GtkLabel* _tmp43_;
	GtkLabel* _tmp44_;
	GtkLabel* _tmp45_;
	GtkLabel* _tmp46_;
	GtkLabel* _tmp47_;
	GtkLabel* _tmp48_;
	GtkGrid* _tmp49_;
	GtkLabel* _tmp50_;
	GtkButtonBox* _tmp51_;
	GtkButtonBox* bbox;
	const gchar* _tmp52_ = NULL;
	GtkButton* _tmp53_;
	GtkButton* yes;
	const gchar* _tmp54_ = NULL;
	GtkButton* _tmp55_;
	GtkButton* no;
	GtkGrid* _tmp56_;
	GtkGrid* _tmp57_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (c != NULL);
	_data29_ = g_slice_new0 (Block29Data);
	_data29_->_ref_count_ = 1;
	_data29_->self = g_object_ref (self);
	_tmp0_ = c;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data29_->c);
	_data29_->c = _tmp1_;
	_tmp2_ = gtk_widget_get_parent ((GtkWidget*) self);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, GTK_TYPE_OVERLAY) ? ((GtkOverlay*) _tmp2_) : NULL);
	parent_overlay = _tmp3_;
	_tmp4_ = self->suggestion_grid;
	if (_tmp4_ != NULL) {
		GtkGrid* _tmp5_;
		_tmp5_ = self->suggestion_grid;
		gtk_widget_destroy ((GtkWidget*) _tmp5_);
		_g_object_unref0 (self->suggestion_grid);
		self->suggestion_grid = NULL;
	}
	_tmp6_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->suggestion_grid);
	self->suggestion_grid = _tmp6_;
	_tmp7_ = self->suggestion_grid;
	gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_END);
	_tmp8_ = parent_overlay;
	_tmp9_ = self->suggestion_grid;
	gtk_overlay_add_overlay (_tmp8_, (GtkWidget*) _tmp9_);
	_tmp10_ = self->suggestion_grid;
	_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
	gtk_style_context_add_class (_tmp11_, "contacts-suggestion");
	_tmp12_ = self->suggestion_grid;
	gtk_widget_set_redraw_on_allocate ((GtkWidget*) _tmp12_, TRUE);
	_tmp13_ = self->suggestion_grid;
	g_signal_connect_object ((GtkWidget*) _tmp13_, "draw", (GCallback) ___lambda71__gtk_widget_draw, self, 0);
	_tmp14_ = contacts_contact_frame_new (CONTACTS_CONTACT_SMALL_AVATAR_SIZE, FALSE);
	g_object_ref_sink (_tmp14_);
	image_frame = _tmp14_;
	_tmp15_ = image_frame;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, FALSE);
	_tmp16_ = image_frame;
	g_object_set ((GtkWidget*) _tmp16_, "margin", 24, NULL);
	_tmp17_ = image_frame;
	gtk_widget_set_margin_right ((GtkWidget*) _tmp17_, 12);
	_tmp18_ = _data29_->c;
	_tmp19_ = image_frame;
	contacts_contact_keep_widget_uptodate (_tmp18_, (GtkWidget*) _tmp19_, ___lambda72__gtk_callback, _data29_);
	_tmp20_ = self->suggestion_grid;
	_tmp21_ = image_frame;
	gtk_grid_attach (_tmp20_, (GtkWidget*) _tmp21_, 0, 0, 1, 2);
	_tmp22_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp22_);
	label = _tmp22_;
	_tmp23_ = self->contact;
	_tmp24_ = _tmp23_->is_main;
	if (_tmp24_) {
		GtkLabel* _tmp25_;
		const gchar* _tmp26_ = NULL;
		ContactsContact* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		ContactsContact* _tmp30_;
		gchar* _tmp31_ = NULL;
		gchar* _tmp32_;
		gchar* _tmp33_ = NULL;
		gchar* _tmp34_;
		_tmp25_ = label;
		_tmp26_ = _ ("Does %s from %s belong here?");
		_tmp27_ = _data29_->c;
		_tmp28_ = contacts_contact_get_display_name (_tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = _data29_->c;
		_tmp31_ = contacts_contact_format_persona_stores (_tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = g_markup_printf_escaped (_tmp26_, _tmp29_, _tmp32_);
		_tmp34_ = _tmp33_;
		gtk_label_set_markup (_tmp25_, _tmp34_);
		_g_free0 (_tmp34_);
		_g_free0 (_tmp32_);
	} else {
		GtkLabel* _tmp35_;
		const gchar* _tmp36_ = NULL;
		ContactsContact* _tmp37_;
		const gchar* _tmp38_;
		const gchar* _tmp39_;
		gchar* _tmp40_ = NULL;
		gchar* _tmp41_;
		_tmp35_ = label;
		_tmp36_ = _ ("Do these details belong to %s?");
		_tmp37_ = _data29_->c;
		_tmp38_ = contacts_contact_get_display_name (_tmp37_);
		_tmp39_ = _tmp38_;
		_tmp40_ = g_markup_printf_escaped (_tmp36_, _tmp39_);
		_tmp41_ = _tmp40_;
		gtk_label_set_markup (_tmp35_, _tmp41_);
		_g_free0 (_tmp41_);
	}
	_tmp42_ = label;
	gtk_widget_set_valign ((GtkWidget*) _tmp42_, GTK_ALIGN_START);
	_tmp43_ = label;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_START);
	_tmp44_ = label;
	gtk_label_set_line_wrap (_tmp44_, TRUE);
	_tmp45_ = label;
	gtk_label_set_line_wrap_mode (_tmp45_, PANGO_WRAP_WORD_CHAR);
	_tmp46_ = label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp46_, TRUE);
	_tmp47_ = label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp47_, 24);
	_tmp48_ = label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp48_, 24);
	_tmp49_ = self->suggestion_grid;
	_tmp50_ = label;
	gtk_grid_attach (_tmp49_, (GtkWidget*) _tmp50_, 1, 0, 1, 2);
	_tmp51_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp51_);
	bbox = _tmp51_;
	_tmp52_ = _ ("Yes");
	_tmp53_ = (GtkButton*) gtk_button_new_with_label (_tmp52_);
	g_object_ref_sink (_tmp53_);
	yes = _tmp53_;
	_tmp54_ = _ ("No");
	_tmp55_ = (GtkButton*) gtk_button_new_with_label (_tmp54_);
	g_object_ref_sink (_tmp55_);
	no = _tmp55_;
	g_signal_connect_data (yes, "clicked", (GCallback) ___lambda73__gtk_button_clicked, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
	g_signal_connect_data (no, "clicked", (GCallback) ___lambda75__gtk_button_clicked, block29_data_ref (_data29_), (GClosureNotify) block29_data_unref, 0);
	gtk_container_add ((GtkContainer*) bbox, (GtkWidget*) yes);
	gtk_container_add ((GtkContainer*) bbox, (GtkWidget*) no);
	gtk_box_set_spacing ((GtkBox*) bbox, 8);
	gtk_widget_set_halign ((GtkWidget*) bbox, GTK_ALIGN_END);
	gtk_widget_set_hexpand ((GtkWidget*) bbox, TRUE);
	g_object_set ((GtkWidget*) bbox, "margin", 24, NULL);
	gtk_widget_set_margin_left ((GtkWidget*) bbox, 12);
	_tmp56_ = self->suggestion_grid;
	gtk_grid_attach (_tmp56_, (GtkWidget*) bbox, 2, 0, 1, 2);
	_tmp57_ = self->suggestion_grid;
	gtk_widget_show_all ((GtkWidget*) _tmp57_);
	_g_object_unref0 (no);
	_g_object_unref0 (yes);
	_g_object_unref0 (bbox);
	_g_object_unref0 (label);
	_g_object_unref0 (image_frame);
	_g_object_unref0 (parent_overlay);
	block29_data_unref (_data29_);
	_data29_ = NULL;
}


static void _contacts_contact_pane_personas_changed_cb_contacts_contact_personas_changed (ContactsContact* _sender, gpointer self) {
	contacts_contact_pane_personas_changed_cb (self, _sender);
}


static void _contacts_contact_pane_contact_changed_cb_contacts_contact_changed (ContactsContact* _sender, gpointer self) {
	contacts_contact_pane_contact_changed_cb (self, _sender);
}


void contacts_contact_pane_show_contact (ContactsContactPane* self, ContactsContact* new_contact, gboolean edit, gboolean show_matches) {
	ContactsContact* _tmp0_;
	ContactsContact* _tmp1_;
	GtkGrid* _tmp2_;
	ContactsContact* _tmp4_;
	ContactsContact* _tmp9_;
	ContactsContact* _tmp10_;
	gboolean can_remove;
	gboolean has_links;
	ContactsContact* _tmp11_;
	GtkButton* _tmp22_;
	gboolean _tmp23_;
	GtkButton* _tmp24_;
	gboolean _tmp25_;
	ContactsContact* _tmp26_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->contact;
	_tmp1_ = new_contact;
	if (_tmp0_ == _tmp1_) {
		return;
	}
	_tmp2_ = self->suggestion_grid;
	if (_tmp2_ != NULL) {
		GtkGrid* _tmp3_;
		_tmp3_ = self->suggestion_grid;
		gtk_widget_destroy ((GtkWidget*) _tmp3_);
		_g_object_unref0 (self->suggestion_grid);
		self->suggestion_grid = NULL;
	}
	_tmp4_ = self->contact;
	if (_tmp4_ != NULL) {
		ContactsContact* _tmp5_;
		guint _tmp6_ = 0U;
		ContactsContact* _tmp7_;
		guint _tmp8_ = 0U;
		_tmp5_ = self->contact;
		g_signal_parse_name ("personas-changed", CONTACTS_TYPE_CONTACT, &_tmp6_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _contacts_contact_pane_personas_changed_cb_contacts_contact_personas_changed, self);
		_tmp7_ = self->contact;
		g_signal_parse_name ("changed", CONTACTS_TYPE_CONTACT, &_tmp8_, NULL, FALSE);
		g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _contacts_contact_pane_contact_changed_cb_contacts_contact_changed, self);
	}
	_tmp9_ = new_contact;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_g_object_unref0 (self->contact);
	self->contact = _tmp10_;
	contacts_contact_pane_update_sheet (self, TRUE);
	can_remove = FALSE;
	has_links = FALSE;
	_tmp11_ = self->contact;
	if (_tmp11_ != NULL) {
		ContactsContact* _tmp12_;
		ContactsContact* _tmp13_;
		ContactsContact* _tmp14_;
		gboolean _tmp15_ = FALSE;
		ContactsContact* _tmp16_;
		FolksIndividual* _tmp17_;
		GeeSet* _tmp18_;
		GeeSet* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		_tmp12_ = self->contact;
		g_signal_connect_object (_tmp12_, "personas-changed", (GCallback) _contacts_contact_pane_personas_changed_cb_contacts_contact_personas_changed, self, 0);
		_tmp13_ = self->contact;
		g_signal_connect_object (_tmp13_, "changed", (GCallback) _contacts_contact_pane_contact_changed_cb_contacts_contact_changed, self, 0);
		_tmp14_ = self->contact;
		_tmp15_ = contacts_contact_can_remove_personas (_tmp14_);
		can_remove = _tmp15_;
		_tmp16_ = self->contact;
		_tmp17_ = _tmp16_->individual;
		_tmp18_ = folks_individual_get_personas (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = gee_collection_get_size ((GeeCollection*) _tmp19_);
		_tmp21_ = _tmp20_;
		has_links = _tmp21_ > 1;
	}
	_tmp22_ = self->priv->remove_button;
	_tmp23_ = can_remove;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp22_, _tmp23_);
	_tmp24_ = self->priv->linked_button;
	_tmp25_ = has_links;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp24_, _tmp25_);
	_tmp26_ = self->contact;
	if (_tmp26_ == NULL) {
		contacts_contact_pane_show_no_selection_frame (self);
	}
}


static void contacts_contact_pane_personas_changed_cb (ContactsContactPane* self, ContactsContact* contact) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (contact != NULL);
	contacts_contact_pane_update_sheet (self, TRUE);
}


static void contacts_contact_pane_contact_changed_cb (ContactsContactPane* self, ContactsContact* contact) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (contact != NULL);
	contacts_contact_pane_update_sheet (self, TRUE);
}


static void __lambda76_ (ContactsContactPane* self) {
	contacts_contact_pane_update_sheet (self, TRUE);
}


static void ___lambda76__contacts_store_quiescent (ContactsStore* _sender, gpointer self) {
	__lambda76_ (self);
}


static void __lambda77_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "email-addresses", "PERSONAL");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda77__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda77_ (self);
}


static void __lambda78_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "email-addresses", "WORK");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda78__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda78_ (self);
}


static void __lambda79_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "phone-numbers", "CELL");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda79__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda79_ (self);
}


static void __lambda80_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "phone-numbers", "HOME");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda80__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda80_ (self);
}


static void __lambda81_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "phone-numbers", "WORK");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda81__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda81_ (self);
}


static void __lambda82_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "urls", NULL);
	_g_object_unref0 (_tmp3_);
}


static void ___lambda82__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda82_ (self);
}


static void __lambda83_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "nickname", NULL);
	_g_object_unref0 (_tmp3_);
}


static void ___lambda83__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda83_ (self);
}


static void __lambda84_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "birthday", NULL);
	_g_object_unref0 (_tmp3_);
}


static void ___lambda84__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda84_ (self);
}


static void __lambda85_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "postal-addresses", "HOME");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda85__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda85_ (self);
}


static void __lambda86_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "postal-addresses", "WORK");
	_g_object_unref0 (_tmp3_);
}


static void ___lambda86__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda86_ (self);
}


static void __lambda87_ (ContactsContactPane* self) {
	ContactsContactEditor* _tmp0_;
	ContactsContact* _tmp1_;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_;
	_tmp0_ = self->priv->editor;
	_tmp1_ = self->contact;
	_tmp2_ = contacts_contact_find_primary_persona (_tmp1_);
	_tmp3_ = _tmp2_;
	contacts_contact_editor_add_new_row_for_property (_tmp0_, _tmp3_, "notes", NULL);
	_g_object_unref0 (_tmp3_);
}


static void ___lambda87__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) {
	__lambda87_ (self);
}


static void _contacts_contact_pane_linked_accounts_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	contacts_contact_pane_linked_accounts (self);
}


static void _contacts_contact_pane_delete_contact_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	contacts_contact_pane_delete_contact (self);
}


ContactsContactPane* contacts_contact_pane_construct (GType object_type, ContactsStore* contacts_store) {
	ContactsContactPane * self = NULL;
	ContactsStore* _tmp0_;
	ContactsStore* _tmp1_;
	GtkScrolledWindow* _tmp2_;
	GtkScrolledWindow* main_sw;
	GtkScrolledWindow* _tmp3_;
	GtkStyleContext* _tmp4_ = NULL;
	GtkScrolledWindow* _tmp5_;
	GtkScrolledWindow* _tmp6_;
	GtkScrolledWindow* _tmp7_;
	GtkScrolledWindow* _tmp8_;
	Center* _tmp9_;
	Center* hcenter;
	Center* _tmp10_;
	ContactsContactSheet* _tmp11_;
	Center* _tmp12_;
	ContactsContactSheet* _tmp13_;
	ContactsContactSheet* _tmp14_;
	ContactsContactSheet* _tmp15_;
	ContactsContactSheet* _tmp16_;
	ContactsContactSheet* _tmp17_;
	GtkScrolledWindow* _tmp18_;
	Center* _tmp19_;
	ContactsContactSheet* _tmp20_;
	GtkScrolledWindow* _tmp21_;
	GtkAdjustment* _tmp22_ = NULL;
	GtkScrolledWindow* _tmp23_;
	GtkWidget* _tmp24_ = NULL;
	GtkStyleContext* _tmp25_ = NULL;
	GtkScrolledWindow* _tmp26_;
	GtkWidget* _tmp27_ = NULL;
	GtkStyleContext* _tmp28_ = NULL;
	GtkScrolledWindow* _tmp29_;
	GtkScrolledWindow* _tmp30_;
	ContactsStore* _tmp31_;
	GtkGrid* _tmp32_;
	GtkGrid* top_grid;
	GtkScrolledWindow* _tmp33_;
	GtkScrolledWindow* _tmp34_;
	GtkScrolledWindow* _tmp35_;
	GtkStyleContext* _tmp36_ = NULL;
	GtkScrolledWindow* _tmp37_;
	GtkScrolledWindow* _tmp38_;
	GtkScrolledWindow* _tmp39_;
	GtkScrolledWindow* _tmp40_;
	Center* _tmp41_;
	Center* _tmp42_;
	ContactsContactEditor* _tmp43_;
	Center* _tmp44_;
	ContactsContactEditor* _tmp45_;
	ContactsContactEditor* _tmp46_;
	ContactsContactEditor* _tmp47_;
	GtkScrolledWindow* _tmp48_;
	Center* _tmp49_;
	ContactsContactEditor* _tmp50_;
	GtkScrolledWindow* _tmp51_;
	GtkAdjustment* _tmp52_ = NULL;
	GtkScrolledWindow* _tmp53_;
	GtkWidget* _tmp54_ = NULL;
	GtkStyleContext* _tmp55_ = NULL;
	GtkScrolledWindow* _tmp56_;
	GtkWidget* _tmp57_ = NULL;
	GtkStyleContext* _tmp58_ = NULL;
	GtkToolbar* _tmp59_;
	GtkToolbar* edit_toolbar;
	GtkStyleContext* _tmp60_ = NULL;
	GtkStyleContext* _tmp61_ = NULL;
	GtkMenuButton* _tmp62_;
	GtkMenuButton* add_detail_button;
	GtkGrid* _tmp63_;
	GtkGrid* box;
	const gchar* _tmp64_ = NULL;
	GtkLabel* _tmp65_;
	GtkWidget* _tmp66_;
	GtkWidget* w;
	GtkWidget* _tmp67_;
	GtkWidget* _tmp68_;
	GtkWidget* _tmp69_;
	GtkArrow* _tmp70_;
	GtkWidget* _tmp71_;
	GtkWidget* _tmp72_;
	GtkWidget* _tmp73_;
	GtkWidget* _tmp74_;
	GtkMenu* _tmp75_;
	GtkMenu* details_menu;
	const gchar* _tmp76_ = NULL;
	GtkMenuItem* _tmp77_;
	GtkMenuItem* item;
	GtkMenuItem* _tmp78_;
	GtkMenuItem* _tmp79_;
	const gchar* _tmp80_ = NULL;
	GtkMenuItem* _tmp81_;
	GtkMenuItem* _tmp82_;
	GtkMenuItem* _tmp83_;
	const gchar* _tmp84_ = NULL;
	GtkMenuItem* _tmp85_;
	GtkMenuItem* _tmp86_;
	GtkMenuItem* _tmp87_;
	const gchar* _tmp88_ = NULL;
	GtkMenuItem* _tmp89_;
	GtkMenuItem* _tmp90_;
	GtkMenuItem* _tmp91_;
	const gchar* _tmp92_ = NULL;
	GtkMenuItem* _tmp93_;
	GtkMenuItem* _tmp94_;
	GtkMenuItem* _tmp95_;
	const gchar* _tmp96_ = NULL;
	GtkMenuItem* _tmp97_;
	GtkMenuItem* _tmp98_;
	GtkMenuItem* _tmp99_;
	const gchar* _tmp100_ = NULL;
	GtkMenuItem* _tmp101_;
	GtkMenuItem* _tmp102_;
	GtkMenuItem* _tmp103_;
	const gchar* _tmp104_ = NULL;
	GtkMenuItem* _tmp105_;
	GtkMenuItem* _tmp106_;
	GtkMenuItem* _tmp107_;
	const gchar* _tmp108_ = NULL;
	GtkMenuItem* _tmp109_;
	GtkMenuItem* _tmp110_;
	GtkMenuItem* _tmp111_;
	const gchar* _tmp112_ = NULL;
	GtkMenuItem* _tmp113_;
	GtkMenuItem* _tmp114_;
	GtkMenuItem* _tmp115_;
	const gchar* _tmp116_ = NULL;
	GtkMenuItem* _tmp117_;
	GtkMenuItem* _tmp118_;
	GtkMenuItem* _tmp119_;
	GtkToolItem* _tmp120_;
	GtkToolItem* tool_item;
	GtkToolItem* _tmp121_;
	GtkToolItem* _tmp122_;
	GtkToolItem* _tmp123_;
	GtkToolItem* _tmp124_;
	const gchar* _tmp125_ = NULL;
	GtkButton* _tmp126_;
	GtkButton* _tmp127_;
	GtkToolItem* _tmp128_;
	GtkButton* _tmp129_;
	GtkToolItem* _tmp130_;
	GtkButton* _tmp131_;
	GtkSeparatorToolItem* _tmp132_;
	GtkToolItem* _tmp133_;
	GtkToolItem* _tmp134_;
	GtkToolItem* _tmp135_;
	GtkToolItem* _tmp136_;
	const gchar* _tmp137_ = NULL;
	GtkButton* _tmp138_;
	GtkButton* _tmp139_;
	GtkToolItem* _tmp140_;
	GtkButton* _tmp141_;
	GtkToolItem* _tmp142_;
	GtkButton* _tmp143_;
	ContactsContactEditor* _tmp144_;
	ContactsContactEditor* _tmp145_;
	ContactsContactEditor* _tmp146_;
	GtkScrolledWindow* _tmp147_;
	g_return_val_if_fail (contacts_store != NULL, NULL);
	self = (ContactsContactPane*) g_object_new (object_type, NULL);
	gtk_notebook_set_show_tabs ((GtkNotebook*) self, FALSE);
	_tmp0_ = contacts_store;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->contacts_store);
	self->priv->contacts_store = _tmp1_;
	contacts_contact_pane_show_no_selection_frame (self);
	_tmp2_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp2_);
	main_sw = _tmp2_;
	_tmp3_ = main_sw;
	_tmp4_ = gtk_widget_get_style_context ((GtkWidget*) _tmp3_);
	gtk_style_context_add_class (_tmp4_, "contacts-content");
	_tmp5_ = main_sw;
	gtk_scrolled_window_set_shadow_type (_tmp5_, GTK_SHADOW_IN);
	_tmp6_ = main_sw;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp6_, TRUE);
	_tmp7_ = main_sw;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp7_, TRUE);
	_tmp8_ = main_sw;
	gtk_scrolled_window_set_policy (_tmp8_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp9_ = center_new ();
	g_object_ref_sink (_tmp9_);
	hcenter = _tmp9_;
	_tmp10_ = hcenter;
	center_set_max_width (_tmp10_, 600);
	_tmp11_ = contacts_contact_sheet_new ();
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->sheet);
	self->priv->sheet = _tmp11_;
	_tmp12_ = hcenter;
	_tmp13_ = self->priv->sheet;
	gtk_container_add ((GtkContainer*) _tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = self->priv->sheet;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = self->priv->sheet;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = self->priv->sheet;
	g_object_set ((GtkWidget*) _tmp16_, "margin", 36, NULL);
	_tmp17_ = self->priv->sheet;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp17_, 24);
	_tmp18_ = main_sw;
	_tmp19_ = hcenter;
	gtk_scrolled_window_add_with_viewport (_tmp18_, (GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->sheet;
	_tmp21_ = main_sw;
	_tmp22_ = gtk_scrolled_window_get_vadjustment (_tmp21_);
	gtk_container_set_focus_vadjustment ((GtkContainer*) _tmp20_, _tmp22_);
	_tmp23_ = main_sw;
	_tmp24_ = gtk_bin_get_child ((GtkBin*) _tmp23_);
	_tmp25_ = gtk_widget_get_style_context (_tmp24_);
	gtk_style_context_add_class (_tmp25_, "contacts-main-view");
	_tmp26_ = main_sw;
	_tmp27_ = gtk_bin_get_child ((GtkBin*) _tmp26_);
	_tmp28_ = gtk_widget_get_style_context (_tmp27_);
	gtk_style_context_add_class (_tmp28_, "view");
	_tmp29_ = main_sw;
	gtk_widget_show_all ((GtkWidget*) _tmp29_);
	_tmp30_ = main_sw;
	gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp30_, NULL, 1);
	_tmp31_ = contacts_store;
	g_signal_connect_object (_tmp31_, "quiescent", (GCallback) ___lambda76__contacts_store_quiescent, self, 0);
	_g_object_unref0 (self->suggestion_grid);
	self->suggestion_grid = NULL;
	_tmp32_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp32_);
	top_grid = _tmp32_;
	gtk_orientable_set_orientation ((GtkOrientable*) top_grid, GTK_ORIENTATION_VERTICAL);
	_tmp33_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp33_);
	_g_object_unref0 (main_sw);
	main_sw = _tmp33_;
	_tmp34_ = main_sw;
	gtk_container_add ((GtkContainer*) top_grid, (GtkWidget*) _tmp34_);
	_tmp35_ = main_sw;
	_tmp36_ = gtk_widget_get_style_context ((GtkWidget*) _tmp35_);
	gtk_style_context_add_class (_tmp36_, "contacts-content");
	_tmp37_ = main_sw;
	gtk_scrolled_window_set_shadow_type (_tmp37_, GTK_SHADOW_IN);
	_tmp38_ = main_sw;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp38_, TRUE);
	_tmp39_ = main_sw;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp39_, TRUE);
	_tmp40_ = main_sw;
	gtk_scrolled_window_set_policy (_tmp40_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp41_ = center_new ();
	g_object_ref_sink (_tmp41_);
	_g_object_unref0 (hcenter);
	hcenter = _tmp41_;
	_tmp42_ = hcenter;
	center_set_max_width (_tmp42_, 600);
	_tmp43_ = contacts_contact_editor_new ();
	g_object_ref_sink (_tmp43_);
	_g_object_unref0 (self->priv->editor);
	self->priv->editor = _tmp43_;
	_tmp44_ = hcenter;
	_tmp45_ = self->priv->editor;
	gtk_container_add ((GtkContainer*) _tmp44_, (GtkWidget*) _tmp45_);
	_tmp46_ = self->priv->editor;
	g_object_set ((GtkWidget*) _tmp46_, "margin", 36, NULL);
	_tmp47_ = self->priv->editor;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp47_, 24);
	_tmp48_ = main_sw;
	_tmp49_ = hcenter;
	gtk_scrolled_window_add_with_viewport (_tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = self->priv->editor;
	_tmp51_ = main_sw;
	_tmp52_ = gtk_scrolled_window_get_vadjustment (_tmp51_);
	gtk_container_set_focus_vadjustment ((GtkContainer*) _tmp50_, _tmp52_);
	_tmp53_ = main_sw;
	_tmp54_ = gtk_bin_get_child ((GtkBin*) _tmp53_);
	_tmp55_ = gtk_widget_get_style_context (_tmp54_);
	gtk_style_context_add_class (_tmp55_, "contacts-main-view");
	_tmp56_ = main_sw;
	_tmp57_ = gtk_bin_get_child ((GtkBin*) _tmp56_);
	_tmp58_ = gtk_widget_get_style_context (_tmp57_);
	gtk_style_context_add_class (_tmp58_, "view");
	self->on_edit_mode = FALSE;
	_tmp59_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp59_);
	edit_toolbar = _tmp59_;
	_tmp60_ = gtk_widget_get_style_context ((GtkWidget*) edit_toolbar);
	gtk_style_context_add_class (_tmp60_, GTK_STYLE_CLASS_MENUBAR);
	_tmp61_ = gtk_widget_get_style_context ((GtkWidget*) edit_toolbar);
	gtk_style_context_add_class (_tmp61_, "contacts-edit-toolbar");
	gtk_widget_set_vexpand ((GtkWidget*) edit_toolbar, FALSE);
	_tmp62_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp62_);
	add_detail_button = _tmp62_;
	gtk_widget_set_vexpand ((GtkWidget*) add_detail_button, TRUE);
	_tmp63_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp63_);
	box = _tmp63_;
	_tmp64_ = _ ("New Detail");
	_tmp65_ = (GtkLabel*) gtk_label_new (_tmp64_);
	g_object_ref_sink (_tmp65_);
	_tmp66_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, GTK_TYPE_WIDGET) ? ((GtkWidget*) _tmp65_) : NULL;
	if (_tmp66_ == NULL) {
		_g_object_unref0 (_tmp65_);
	}
	w = _tmp66_;
	_tmp67_ = w;
	gtk_widget_set_valign (_tmp67_, GTK_ALIGN_CENTER);
	_tmp68_ = w;
	gtk_widget_set_vexpand (_tmp68_, TRUE);
	gtk_grid_set_column_spacing (box, (guint) 4);
	_tmp69_ = w;
	gtk_container_add ((GtkContainer*) box, _tmp69_);
	_tmp70_ = (GtkArrow*) gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
	g_object_ref_sink (_tmp70_);
	_tmp71_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp70_, GTK_TYPE_WIDGET) ? ((GtkWidget*) _tmp70_) : NULL;
	if (_tmp71_ == NULL) {
		_g_object_unref0 (_tmp70_);
	}
	_g_object_unref0 (w);
	w = _tmp71_;
	_tmp72_ = w;
	gtk_widget_set_valign (_tmp72_, GTK_ALIGN_CENTER);
	_tmp73_ = w;
	gtk_widget_set_vexpand (_tmp73_, TRUE);
	_tmp74_ = w;
	gtk_container_add ((GtkContainer*) box, _tmp74_);
	gtk_container_add ((GtkContainer*) add_detail_button, (GtkWidget*) box);
	_tmp75_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp75_);
	details_menu = _tmp75_;
	gtk_widget_set_halign ((GtkWidget*) details_menu, GTK_ALIGN_START);
	_tmp76_ = _ ("Personal email");
	_tmp77_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp76_);
	g_object_ref_sink (_tmp77_);
	item = _tmp77_;
	_tmp78_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp78_);
	_tmp79_ = item;
	g_signal_connect_object (_tmp79_, "activate", (GCallback) ___lambda77__gtk_menu_item_activate, self, 0);
	_tmp80_ = _ ("Work email");
	_tmp81_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp80_);
	g_object_ref_sink (_tmp81_);
	_g_object_unref0 (item);
	item = _tmp81_;
	_tmp82_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp82_);
	_tmp83_ = item;
	g_signal_connect_object (_tmp83_, "activate", (GCallback) ___lambda78__gtk_menu_item_activate, self, 0);
	_tmp84_ = _ ("Mobile phone");
	_tmp85_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp84_);
	g_object_ref_sink (_tmp85_);
	_g_object_unref0 (item);
	item = _tmp85_;
	_tmp86_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp86_);
	_tmp87_ = item;
	g_signal_connect_object (_tmp87_, "activate", (GCallback) ___lambda79__gtk_menu_item_activate, self, 0);
	_tmp88_ = _ ("Home phone");
	_tmp89_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp88_);
	g_object_ref_sink (_tmp89_);
	_g_object_unref0 (item);
	item = _tmp89_;
	_tmp90_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp90_);
	_tmp91_ = item;
	g_signal_connect_object (_tmp91_, "activate", (GCallback) ___lambda80__gtk_menu_item_activate, self, 0);
	_tmp92_ = _ ("Work phone");
	_tmp93_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp92_);
	g_object_ref_sink (_tmp93_);
	_g_object_unref0 (item);
	item = _tmp93_;
	_tmp94_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp94_);
	_tmp95_ = item;
	g_signal_connect_object (_tmp95_, "activate", (GCallback) ___lambda81__gtk_menu_item_activate, self, 0);
	_tmp96_ = _ ("Link");
	_tmp97_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp96_);
	g_object_ref_sink (_tmp97_);
	_g_object_unref0 (item);
	item = _tmp97_;
	_tmp98_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp98_);
	_tmp99_ = item;
	g_signal_connect_object (_tmp99_, "activate", (GCallback) ___lambda82__gtk_menu_item_activate, self, 0);
	_tmp100_ = _ ("Nickname");
	_tmp101_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp100_);
	g_object_ref_sink (_tmp101_);
	_g_object_unref0 (self->priv->nickname_item);
	self->priv->nickname_item = _tmp101_;
	_tmp102_ = self->priv->nickname_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp102_);
	_tmp103_ = self->priv->nickname_item;
	g_signal_connect_object (_tmp103_, "activate", (GCallback) ___lambda83__gtk_menu_item_activate, self, 0);
	_tmp104_ = _ ("Birthday");
	_tmp105_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp104_);
	g_object_ref_sink (_tmp105_);
	_g_object_unref0 (self->priv->birthday_item);
	self->priv->birthday_item = _tmp105_;
	_tmp106_ = self->priv->birthday_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp106_);
	_tmp107_ = self->priv->birthday_item;
	g_signal_connect_object (_tmp107_, "activate", (GCallback) ___lambda84__gtk_menu_item_activate, self, 0);
	_tmp108_ = _ ("Home address");
	_tmp109_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp108_);
	g_object_ref_sink (_tmp109_);
	_g_object_unref0 (item);
	item = _tmp109_;
	_tmp110_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp110_);
	_tmp111_ = item;
	g_signal_connect_object (_tmp111_, "activate", (GCallback) ___lambda85__gtk_menu_item_activate, self, 0);
	_tmp112_ = _ ("Work address");
	_tmp113_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp112_);
	g_object_ref_sink (_tmp113_);
	_g_object_unref0 (item);
	item = _tmp113_;
	_tmp114_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp114_);
	_tmp115_ = item;
	g_signal_connect_object (_tmp115_, "activate", (GCallback) ___lambda86__gtk_menu_item_activate, self, 0);
	_tmp116_ = _ ("Notes");
	_tmp117_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp116_);
	g_object_ref_sink (_tmp117_);
	_g_object_unref0 (self->priv->notes_item);
	self->priv->notes_item = _tmp117_;
	_tmp118_ = self->priv->notes_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp118_);
	_tmp119_ = self->priv->notes_item;
	g_signal_connect_object (_tmp119_, "activate", (GCallback) ___lambda87__gtk_menu_item_activate, self, 0);
	gtk_widget_show_all ((GtkWidget*) details_menu);
	gtk_menu_button_set_popup (add_detail_button, (GtkWidget*) details_menu);
	gtk_menu_button_set_direction (add_detail_button, GTK_ARROW_UP);
	_tmp120_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp120_);
	tool_item = _tmp120_;
	_tmp121_ = tool_item;
	gtk_container_add ((GtkContainer*) _tmp121_, (GtkWidget*) add_detail_button);
	_tmp122_ = tool_item;
	gtk_widget_set_margin_right ((GtkWidget*) _tmp122_, 12);
	_tmp123_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp123_, -1);
	_tmp124_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp124_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp124_;
	_tmp125_ = _ ("Linked Accounts");
	_tmp126_ = (GtkButton*) gtk_button_new_with_label (_tmp125_);
	g_object_ref_sink (_tmp126_);
	_g_object_unref0 (self->priv->linked_button);
	self->priv->linked_button = _tmp126_;
	_tmp127_ = self->priv->linked_button;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp127_, TRUE);
	_tmp128_ = tool_item;
	_tmp129_ = self->priv->linked_button;
	gtk_container_add ((GtkContainer*) _tmp128_, (GtkWidget*) _tmp129_);
	_tmp130_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp130_, -1);
	_tmp131_ = self->priv->linked_button;
	g_signal_connect_object (_tmp131_, "clicked", (GCallback) _contacts_contact_pane_linked_accounts_gtk_button_clicked, self, 0);
	_tmp132_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
	g_object_ref_sink (_tmp132_);
	_g_object_unref0 (tool_item);
	tool_item = (GtkToolItem*) _tmp132_;
	_tmp133_ = tool_item;
	gtk_tool_item_set_expand (_tmp133_, TRUE);
	_tmp134_ = tool_item;
	gtk_separator_tool_item_set_draw (G_TYPE_CHECK_INSTANCE_TYPE (_tmp134_, GTK_TYPE_SEPARATOR_TOOL_ITEM) ? ((GtkSeparatorToolItem*) _tmp134_) : NULL, FALSE);
	_tmp135_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp135_, -1);
	_tmp136_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp136_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp136_;
	_tmp137_ = _ ("Remove Contact");
	_tmp138_ = (GtkButton*) gtk_button_new_with_label (_tmp137_);
	g_object_ref_sink (_tmp138_);
	_g_object_unref0 (self->priv->remove_button);
	self->priv->remove_button = _tmp138_;
	_tmp139_ = self->priv->remove_button;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp139_, TRUE);
	_tmp140_ = tool_item;
	_tmp141_ = self->priv->remove_button;
	gtk_container_add ((GtkContainer*) _tmp140_, (GtkWidget*) _tmp141_);
	_tmp142_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp142_, -1);
	_tmp143_ = self->priv->remove_button;
	g_signal_connect_object (_tmp143_, "clicked", (GCallback) _contacts_contact_pane_delete_contact_gtk_button_clicked, self, 0);
	gtk_widget_show_all ((GtkWidget*) edit_toolbar);
	gtk_container_add ((GtkContainer*) top_grid, (GtkWidget*) edit_toolbar);
	_tmp144_ = self->priv->editor;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp144_, TRUE);
	_tmp145_ = self->priv->editor;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp145_, TRUE);
	_tmp146_ = self->priv->editor;
	gtk_widget_show_all ((GtkWidget*) _tmp146_);
	_tmp147_ = main_sw;
	gtk_widget_show ((GtkWidget*) _tmp147_);
	gtk_widget_show_all ((GtkWidget*) top_grid);
	gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) top_grid, NULL, 2);
	_g_object_unref0 (tool_item);
	_g_object_unref0 (item);
	_g_object_unref0 (details_menu);
	_g_object_unref0 (w);
	_g_object_unref0 (box);
	_g_object_unref0 (add_detail_button);
	_g_object_unref0 (edit_toolbar);
	_g_object_unref0 (top_grid);
	_g_object_unref0 (hcenter);
	_g_object_unref0 (main_sw);
	return self;
}


ContactsContactPane* contacts_contact_pane_new (ContactsStore* contacts_store) {
	return contacts_contact_pane_construct (CONTACTS_TYPE_CONTACT_PANE, contacts_store);
}


static void contacts_contact_pane_linked_accounts (ContactsContactPane* self) {
	ContactsContact* _tmp0_;
	ContactsLinkedAccountsDialog* _tmp1_;
	ContactsLinkedAccountsDialog* dialog;
	ContactsLinkedAccountsDialog* _tmp2_;
	gint _tmp3_ = 0;
	gint _result_;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_;
	gboolean _tmp8_;
	ContactsLinkedAccountsDialog* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->contact;
	_tmp1_ = contacts_linked_accounts_dialog_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	dialog = _tmp1_;
	_tmp2_ = dialog;
	_tmp3_ = gtk_dialog_run ((GtkDialog*) _tmp2_);
	_result_ = _tmp3_;
	_tmp5_ = _result_;
	if (_tmp5_ == ((gint) GTK_RESPONSE_CLOSE)) {
		ContactsLinkedAccountsDialog* _tmp6_;
		gboolean _tmp7_;
		_tmp6_ = dialog;
		_tmp7_ = _tmp6_->any_unlinked;
		_tmp4_ = _tmp7_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp8_ = _tmp4_;
	if (_tmp8_) {
		contacts_contact_pane_set_edit_mode (self, FALSE);
		contacts_contact_pane_set_edit_mode (self, TRUE);
	}
	_tmp9_ = dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp9_);
	_g_object_unref0 (dialog);
}


static void contacts_contact_pane_delete_contact (ContactsContactPane* self) {
	ContactsContact* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->contact;
	if (_tmp0_ != NULL) {
		ContactsContact* _tmp1_;
		ContactsContact* _tmp2_;
		_tmp1_ = self->contact;
		contacts_contact_hide (_tmp1_);
		contacts_contact_pane_set_edit_mode (self, FALSE);
		_tmp2_ = self->contact;
		g_signal_emit_by_name (self, "will-delete", _tmp2_);
		contacts_contact_pane_show_contact (self, NULL, FALSE, TRUE);
	}
}


static void contacts_contact_pane_show_no_selection_frame (ContactsContactPane* self) {
	GtkIconSize _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_icon_size_from_name ("ULTRABIG");
	if (_tmp0_ == 0) {
		GtkFrame* _tmp1_;
		GtkFrame* _tmp2_;
		GtkStyleContext* _tmp3_ = NULL;
		GtkFrame* _tmp4_;
		GtkGrid* _tmp5_;
		GtkGrid* box;
		GtkGrid* _tmp6_;
		GtkGrid* _tmp7_;
		GtkGrid* _tmp8_;
		GtkGrid* _tmp9_;
		GtkGrid* _tmp10_;
		GtkIconSize _tmp11_ = 0;
		GtkImage* _tmp12_;
		GtkImage* image;
		GtkImage* _tmp13_;
		GtkStyleContext* _tmp14_ = NULL;
		GtkGrid* _tmp15_;
		GtkImage* _tmp16_;
		const gchar* _tmp17_ = NULL;
		GtkLabel* _tmp18_;
		GtkLabel* label;
		GtkGrid* _tmp19_;
		GtkLabel* _tmp20_;
		GtkFrame* _tmp21_;
		GtkGrid* _tmp22_;
		GtkFrame* _tmp23_;
		GtkFrame* _tmp24_;
		gtk_icon_size_register ("ULTRABIG", 144, 144);
		_tmp1_ = (GtkFrame*) gtk_frame_new (NULL);
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (self->priv->no_selection_frame);
		self->priv->no_selection_frame = _tmp1_;
		_tmp2_ = self->priv->no_selection_frame;
		_tmp3_ = gtk_widget_get_style_context ((GtkWidget*) _tmp2_);
		gtk_style_context_add_class (_tmp3_, "contacts-content");
		_tmp4_ = self->priv->no_selection_frame;
		gtk_widget_set_size_request ((GtkWidget*) _tmp4_, 500, -1);
		_tmp5_ = (GtkGrid*) gtk_grid_new ();
		g_object_ref_sink (_tmp5_);
		box = _tmp5_;
		_tmp6_ = box;
		gtk_orientable_set_orientation ((GtkOrientable*) _tmp6_, GTK_ORIENTATION_VERTICAL);
		_tmp7_ = box;
		gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_CENTER);
		_tmp8_ = box;
		gtk_widget_set_halign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
		_tmp9_ = box;
		gtk_widget_set_vexpand ((GtkWidget*) _tmp9_, TRUE);
		_tmp10_ = box;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp10_, TRUE);
		_tmp11_ = gtk_icon_size_from_name ("ULTRABIG");
		_tmp12_ = (GtkImage*) gtk_image_new_from_icon_name ("avatar-default-symbolic", _tmp11_);
		g_object_ref_sink (_tmp12_);
		image = _tmp12_;
		_tmp13_ = image;
		_tmp14_ = gtk_widget_get_style_context ((GtkWidget*) _tmp13_);
		gtk_style_context_add_class (_tmp14_, "dim-label");
		_tmp15_ = box;
		_tmp16_ = image;
		gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) _tmp16_);
		_tmp17_ = _ ("Select a contact");
		_tmp18_ = (GtkLabel*) gtk_label_new (_tmp17_);
		g_object_ref_sink (_tmp18_);
		label = _tmp18_;
		_tmp19_ = box;
		_tmp20_ = label;
		gtk_container_add ((GtkContainer*) _tmp19_, (GtkWidget*) _tmp20_);
		_tmp21_ = self->priv->no_selection_frame;
		_tmp22_ = box;
		gtk_container_add ((GtkContainer*) _tmp21_, (GtkWidget*) _tmp22_);
		_tmp23_ = self->priv->no_selection_frame;
		gtk_widget_show_all ((GtkWidget*) _tmp23_);
		_tmp24_ = self->priv->no_selection_frame;
		gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp24_, NULL, 0);
		_g_object_unref0 (label);
		_g_object_unref0 (image);
		_g_object_unref0 (box);
	}
	gtk_notebook_set_current_page ((GtkNotebook*) self, 0);
}


static void _____lambda91_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (_result_ != NULL);
	{
		GAsyncResult* _tmp0_;
		_tmp0_ = _result_;
		contacts_contact_set_persona_property_finish (_tmp0_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e2 = NULL;
		ContactsApp* _tmp1_;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e2 = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = contacts_app_app;
		_tmp2_ = e2;
		_tmp3_ = _tmp2_->message;
		contacts_app_show_message (_tmp1_, _tmp3_);
		contacts_contact_pane_update_sheet (self, TRUE);
		_g_error_free0 (e2);
	}
	__finally5:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void ______lambda91__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_____lambda91_ (self, source_object, res);
	g_object_unref (self);
}


static void ____lambda92_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (_result_ != NULL);
	{
		GAsyncResult* _tmp0_;
		FolksPersona* _tmp1_ = NULL;
		FolksPersona* _tmp2_;
		_tmp0_ = _result_;
		_tmp1_ = contacts_contact_set_individual_property_finish (_tmp0_, &_inner_error_);
		_tmp2_ = _tmp1_;
		_g_object_unref0 (_tmp2_);
		if (_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* e = NULL;
		ContactsApp* _tmp3_;
		GError* _tmp4_;
		const gchar* _tmp5_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = contacts_app_app;
		_tmp4_ = e;
		_tmp5_ = _tmp4_->message;
		contacts_app_show_message (_tmp3_, _tmp5_);
		_g_error_free0 (e);
	}
	__finally6:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static void _____lambda92__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	____lambda92_ (self, source_object, res);
	g_object_unref (self);
}


void contacts_contact_pane_set_edit_mode (ContactsContactPane* self, gboolean on_edit) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = on_edit;
	if (_tmp0_) {
		ContactsContact* _tmp1_;
		ContactsContact* _tmp2_;
		gboolean _tmp3_ = FALSE;
		ContactsContact* _tmp6_;
		gboolean _tmp7_ = FALSE;
		ContactsContact* _tmp10_;
		gboolean _tmp11_ = FALSE;
		ContactsContactSheet* _tmp14_;
		GtkGrid* _tmp15_;
		ContactsContactEditor* _tmp17_;
		ContactsContactEditor* _tmp18_;
		ContactsContact* _tmp19_;
		ContactsContactEditor* _tmp20_;
		_tmp1_ = self->contact;
		if (_tmp1_ == NULL) {
			return;
		}
		self->on_edit_mode = TRUE;
		_tmp2_ = self->contact;
		_tmp3_ = contacts_contact_has_birthday (_tmp2_);
		if (_tmp3_) {
			GtkMenuItem* _tmp4_;
			_tmp4_ = self->priv->birthday_item;
			gtk_widget_hide ((GtkWidget*) _tmp4_);
		} else {
			GtkMenuItem* _tmp5_;
			_tmp5_ = self->priv->birthday_item;
			gtk_widget_show ((GtkWidget*) _tmp5_);
		}
		_tmp6_ = self->contact;
		_tmp7_ = contacts_contact_has_nickname (_tmp6_);
		if (_tmp7_) {
			GtkMenuItem* _tmp8_;
			_tmp8_ = self->priv->nickname_item;
			gtk_widget_hide ((GtkWidget*) _tmp8_);
		} else {
			GtkMenuItem* _tmp9_;
			_tmp9_ = self->priv->nickname_item;
			gtk_widget_show ((GtkWidget*) _tmp9_);
		}
		_tmp10_ = self->contact;
		_tmp11_ = contacts_contact_has_notes (_tmp10_);
		if (_tmp11_) {
			GtkMenuItem* _tmp12_;
			_tmp12_ = self->priv->notes_item;
			gtk_widget_hide ((GtkWidget*) _tmp12_);
		} else {
			GtkMenuItem* _tmp13_;
			_tmp13_ = self->priv->notes_item;
			gtk_widget_show ((GtkWidget*) _tmp13_);
		}
		_tmp14_ = self->priv->sheet;
		contacts_contact_sheet_clear (_tmp14_);
		_tmp15_ = self->suggestion_grid;
		if (_tmp15_ != NULL) {
			GtkGrid* _tmp16_;
			_tmp16_ = self->suggestion_grid;
			gtk_widget_destroy ((GtkWidget*) _tmp16_);
			_g_object_unref0 (self->suggestion_grid);
			self->suggestion_grid = NULL;
		}
		_tmp17_ = self->priv->editor;
		contacts_contact_editor_clear (_tmp17_);
		_tmp18_ = self->priv->editor;
		_tmp19_ = self->contact;
		contacts_contact_editor_update (_tmp18_, _tmp19_);
		_tmp20_ = self->priv->editor;
		gtk_widget_show_all ((GtkWidget*) _tmp20_);
		gtk_notebook_set_current_page ((GtkNotebook*) self, 2);
	} else {
		ContactsContactEditor* _tmp44_;
		gboolean _tmp45_ = FALSE;
		ContactsContactEditor* _tmp50_;
		ContactsContactSheet* _tmp51_;
		ContactsContactSheet* _tmp52_;
		ContactsContact* _tmp53_;
		self->on_edit_mode = FALSE;
		{
			ContactsContactEditor* _tmp21_;
			GeeHashMap* _tmp22_ = NULL;
			GeeHashMap* _tmp23_;
			GeeSet* _tmp24_;
			GeeSet* _tmp25_;
			GeeSet* _tmp26_;
			GeeIterator* _tmp27_ = NULL;
			GeeIterator* _tmp28_;
			GeeIterator* _prop_it;
			_tmp21_ = self->priv->editor;
			_tmp22_ = contacts_contact_editor_properties_changed (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = gee_abstract_map_get_entries ((GeeMap*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = _tmp25_;
			_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
			_tmp28_ = _tmp27_;
			_g_object_unref0 (_tmp26_);
			_g_object_unref0 (_tmp23_);
			_prop_it = _tmp28_;
			while (TRUE) {
				GeeIterator* _tmp29_;
				gboolean _tmp30_ = FALSE;
				GeeIterator* _tmp31_;
				gpointer _tmp32_ = NULL;
				GeeMapEntry* prop;
				GeeMapEntry* _tmp33_;
				gconstpointer _tmp34_;
				ContactsContactEditorPropertyData* _tmp35_;
				FolksPersona* _tmp36_;
				GeeMapEntry* _tmp37_;
				gconstpointer _tmp38_;
				const gchar* _tmp39_;
				GeeMapEntry* _tmp40_;
				gconstpointer _tmp41_;
				ContactsContactEditorPropertyData* _tmp42_;
				GValue _tmp43_;
				_tmp29_ = _prop_it;
				_tmp30_ = gee_iterator_next (_tmp29_);
				if (!_tmp30_) {
					break;
				}
				_tmp31_ = _prop_it;
				_tmp32_ = gee_iterator_get (_tmp31_);
				prop = (GeeMapEntry*) _tmp32_;
				_tmp33_ = prop;
				_tmp34_ = gee_map_entry_get_value (_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp36_ = (*((ContactsContactEditorPropertyData*) _tmp35_)).persona;
				_tmp37_ = prop;
				_tmp38_ = gee_map_entry_get_key (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = prop;
				_tmp41_ = gee_map_entry_get_value (_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp43_ = (*((ContactsContactEditorPropertyData*) _tmp42_)).value;
				contacts_contact_set_persona_property (_tmp36_, (const gchar*) _tmp39_, &_tmp43_, ______lambda91__gasync_ready_callback, g_object_ref (self));
				_g_object_unref0 (prop);
			}
			_g_object_unref0 (_prop_it);
		}
		_tmp44_ = self->priv->editor;
		_tmp45_ = contacts_contact_editor_name_changed (_tmp44_);
		if (_tmp45_) {
			ContactsContactEditor* _tmp46_;
			GValue _tmp47_ = {0};
			GValue v;
			ContactsContact* _tmp48_;
			GValue _tmp49_;
			_tmp46_ = self->priv->editor;
			contacts_contact_editor_get_full_name_value (_tmp46_, &_tmp47_);
			v = _tmp47_;
			_tmp48_ = self->contact;
			_tmp49_ = v;
			contacts_contact_set_individual_property (_tmp48_, "full-name", &_tmp49_, _____lambda92__gasync_ready_callback, g_object_ref (self));
			G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
		}
		_tmp50_ = self->priv->editor;
		contacts_contact_editor_clear (_tmp50_);
		_tmp51_ = self->priv->sheet;
		contacts_contact_sheet_clear (_tmp51_);
		_tmp52_ = self->priv->sheet;
		_tmp53_ = self->contact;
		contacts_contact_sheet_update (_tmp52_, _tmp53_);
		gtk_notebook_set_current_page ((GtkNotebook*) self, 1);
	}
}


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


static void contacts_contact_pane_class_init (ContactsContactPaneClass * klass) {
	contacts_contact_pane_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ContactsContactPanePrivate));
	G_OBJECT_CLASS (klass)->finalize = contacts_contact_pane_finalize;
	g_signal_new ("contacts_linked", CONTACTS_TYPE_CONTACT_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_OBJECT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, CONTACTS_TYPE_LINK_OPERATION);
	g_signal_new ("will_delete", CONTACTS_TYPE_CONTACT_PANE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, CONTACTS_TYPE_CONTACT);
}


static void contacts_contact_pane_instance_init (ContactsContactPane * self) {
	self->priv = CONTACTS_CONTACT_PANE_GET_PRIVATE (self);
}


static void contacts_contact_pane_finalize (GObject* obj) {
	ContactsContactPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_PANE, ContactsContactPane);
	_g_object_unref0 (self->priv->contacts_store);
	_g_object_unref0 (self->contact);
	_g_object_unref0 (self->priv->no_selection_frame);
	_g_object_unref0 (self->priv->sheet);
	_g_object_unref0 (self->priv->editor);
	_g_object_unref0 (self->priv->linked_button);
	_g_object_unref0 (self->priv->remove_button);
	_g_object_unref0 (self->priv->nickname_item);
	_g_object_unref0 (self->priv->birthday_item);
	_g_object_unref0 (self->priv->notes_item);
	_g_object_unref0 (self->suggestion_grid);
	G_OBJECT_CLASS (contacts_contact_pane_parent_class)->finalize (obj);
}


GType contacts_contact_pane_get_type (void) {
	static volatile gsize contacts_contact_pane_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_pane_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsContactPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_contact_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsContactPane), 0, (GInstanceInitFunc) contacts_contact_pane_instance_init, NULL };
		GType contacts_contact_pane_type_id;
		contacts_contact_pane_type_id = g_type_register_static (GTK_TYPE_NOTEBOOK, "ContactsContactPane", &g_define_type_info, 0);
		g_once_init_leave (&contacts_contact_pane_type_id__volatile, contacts_contact_pane_type_id);
	}
	return contacts_contact_pane_type_id__volatile;
}



