/* contacts-contact-pane.c generated by valac 0.20.1.71-45f6, 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_);
GType contacts_avatar_dialog_get_type (void) G_GNUC_CONST;
ContactsAvatarDialog* contacts_avatar_dialog_new (ContactsContact* contact);
ContactsAvatarDialog* contacts_avatar_dialog_construct (GType object_type, ContactsContact* contact);
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, GDestroyNotify callback_target_destroy_notify);
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);
GType contacts_linked_accounts_dialog_get_type (void) G_GNUC_CONST;
ContactsLinkedAccountsDialog* contacts_linked_accounts_dialog_new (ContactsContact* contact);
ContactsLinkedAccountsDialog* contacts_linked_accounts_dialog_construct (GType object_type, ContactsContact* contact);
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_ = NULL;
		FolksPersona* _tmp1_ = NULL;
		FolksPersona* _tmp2_ = NULL;
		_tmp0_ = _result_;
		_tmp1_ = contacts_contact_set_individual_property_finish (_tmp0_, &_inner_error_);
		_tmp2_ = _tmp1_;
		_g_object_unref0 (_tmp2_);
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
		ContactsApp* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		ContactsContactFrame* _tmp6_ = NULL;
		ContactsContact* _tmp7_ = NULL;
		FolksIndividual* _tmp8_ = NULL;
		ContactsContact* _tmp9_ = NULL;
		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);
	}
	__finally3:
	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) {
	GValue v = {0};
	GIcon* _tmp0_ = NULL;
	GType _tmp1_ = 0UL;
	GValue _tmp2_ = {0};
	GIcon* _tmp3_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	GValue _tmp5_ = {0};
	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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	ContactsContactFrame* _tmp2_ = NULL;
	ContactsContactFrame* _tmp3_ = NULL;
	ContactsAvatarDialog* dialog = NULL;
	ContactsContact* _tmp4_ = NULL;
	ContactsAvatarDialog* _tmp5_ = NULL;
	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* child = NULL;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	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_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		_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* child = NULL;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	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_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		_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_ = {0};
	GtkAllocation _tmp1_ = {0};
	GtkAllocation _tmp2_ = {0};
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GtkWidget* child = NULL;
	GtkWidget* _tmp12_ = NULL;
	GtkWidget* _tmp13_ = NULL;
	GtkAllocation _tmp14_ = {0};
	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_ = 0;
		GtkAllocation _tmp6_ = {0};
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		gdouble _tmp9_ = 0.0;
		GtkAllocation _tmp10_ = {0};
		gint _tmp11_ = 0;
		_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_ = 0;
	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_ = 0;
	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_ = 0.0;
	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_ = 0.0;
	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_ = FALSE;
	ContactsContactSheet* _tmp1_ = NULL;
	ContactsContact* _tmp2_ = NULL;
	ContactsContactSheet* _tmp3_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	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_) {
		GeeMap* matches = NULL;
		ContactsContact* _tmp6_ = NULL;
		ContactsStore* _tmp7_ = NULL;
		FolksIndividualAggregator* _tmp8_ = NULL;
		FolksIndividualAggregator* _tmp9_ = NULL;
		ContactsContact* _tmp10_ = NULL;
		FolksIndividual* _tmp11_ = NULL;
		GeeMap* _tmp12_ = NULL;
		_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_;
		{
			GeeIterator* _ind_it = NULL;
			GeeMap* _tmp13_ = NULL;
			GeeSet* _tmp14_ = NULL;
			GeeSet* _tmp15_ = NULL;
			GeeSet* _tmp16_ = NULL;
			GeeIterator* _tmp17_ = NULL;
			GeeIterator* _tmp18_ = NULL;
			_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_ = NULL;
				gboolean _tmp20_ = FALSE;
				FolksIndividual* ind = NULL;
				GeeIterator* _tmp21_ = NULL;
				gpointer _tmp22_ = NULL;
				ContactsContact* c = NULL;
				FolksIndividual* _tmp23_ = NULL;
				ContactsContact* _tmp24_ = NULL;
				gboolean _tmp25_ = FALSE;
				ContactsContact* _tmp26_ = NULL;
				gboolean _tmp30_ = FALSE;
				_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_ = NULL;
					ContactsContact* _tmp28_ = NULL;
					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_ = NULL;
					_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_ = NULL;
	GtkAllocation _tmp1_ = {0};
	GtkStyleContext* context = NULL;
	GtkGrid* _tmp2_ = NULL;
	GtkStyleContext* _tmp3_ = NULL;
	GtkStyleContext* _tmp4_ = NULL;
	cairo_t* _tmp5_ = NULL;
	GtkAllocation _tmp6_ = {0};
	gint _tmp7_ = 0;
	GtkAllocation _tmp8_ = {0};
	gint _tmp9_ = 0;
	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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksIndividual* _tmp2_ = NULL;
	ContactsContact* _tmp3_ = NULL;
	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;
	ContactsLinkOperation* operation = NULL;
	GAsyncResult* _tmp0_ = NULL;
	ContactsLinkOperation* _tmp1_ = NULL;
	_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_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	ContactsContact* _tmp5_ = NULL;
	GtkGrid* _tmp6_ = NULL;
	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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	ContactsContact* _tmp2_ = NULL;
	GtkGrid* _tmp3_ = NULL;
	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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	GtkOverlay* parent_overlay = NULL;
	GtkWidget* _tmp2_ = NULL;
	GtkOverlay* _tmp3_ = NULL;
	GtkGrid* _tmp4_ = NULL;
	GtkGrid* _tmp6_ = NULL;
	GtkGrid* _tmp7_ = NULL;
	GtkOverlay* _tmp8_ = NULL;
	GtkGrid* _tmp9_ = NULL;
	GtkGrid* _tmp10_ = NULL;
	GtkStyleContext* _tmp11_ = NULL;
	GtkGrid* _tmp12_ = NULL;
	GtkGrid* _tmp13_ = NULL;
	ContactsContactFrame* image_frame = NULL;
	ContactsContactFrame* _tmp14_ = NULL;
	ContactsContactFrame* _tmp15_ = NULL;
	ContactsContactFrame* _tmp16_ = NULL;
	ContactsContactFrame* _tmp17_ = NULL;
	ContactsContact* _tmp18_ = NULL;
	ContactsContactFrame* _tmp19_ = NULL;
	GtkGrid* _tmp20_ = NULL;
	ContactsContactFrame* _tmp21_ = NULL;
	GtkLabel* label = NULL;
	GtkLabel* _tmp22_ = NULL;
	ContactsContact* _tmp23_ = NULL;
	gboolean _tmp24_ = FALSE;
	GtkLabel* _tmp42_ = NULL;
	GtkLabel* _tmp43_ = NULL;
	GtkLabel* _tmp44_ = NULL;
	GtkLabel* _tmp45_ = NULL;
	GtkLabel* _tmp46_ = NULL;
	GtkLabel* _tmp47_ = NULL;
	GtkLabel* _tmp48_ = NULL;
	GtkGrid* _tmp49_ = NULL;
	GtkLabel* _tmp50_ = NULL;
	GtkButtonBox* bbox = NULL;
	GtkButtonBox* _tmp51_ = NULL;
	GtkButton* yes = NULL;
	const gchar* _tmp52_ = NULL;
	GtkButton* _tmp53_ = NULL;
	GtkButton* no = NULL;
	const gchar* _tmp54_ = NULL;
	GtkButton* _tmp55_ = NULL;
	GtkGrid* _tmp56_ = NULL;
	GtkGrid* _tmp57_ = NULL;
	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_ = NULL;
		_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, block29_data_ref (_data29_), block29_data_unref);
	_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_ = NULL;
		const gchar* _tmp26_ = NULL;
		ContactsContact* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		ContactsContact* _tmp30_ = NULL;
		gchar* _tmp31_ = NULL;
		gchar* _tmp32_ = NULL;
		gchar* _tmp33_ = NULL;
		gchar* _tmp34_ = NULL;
		_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_ = NULL;
		const gchar* _tmp36_ = NULL;
		ContactsContact* _tmp37_ = NULL;
		const gchar* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
		gchar* _tmp41_ = NULL;
		_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	GtkGrid* _tmp2_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	ContactsContact* _tmp9_ = NULL;
	ContactsContact* _tmp10_ = NULL;
	gboolean can_remove = FALSE;
	gboolean has_links = FALSE;
	ContactsContact* _tmp11_ = NULL;
	GtkButton* _tmp22_ = NULL;
	gboolean _tmp23_ = FALSE;
	GtkButton* _tmp24_ = NULL;
	gboolean _tmp25_ = FALSE;
	ContactsContact* _tmp26_ = NULL;
	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_ = NULL;
		_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_ = NULL;
		guint _tmp6_ = 0U;
		ContactsContact* _tmp7_ = NULL;
		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_ = NULL;
		ContactsContact* _tmp13_ = NULL;
		ContactsContact* _tmp14_ = NULL;
		gboolean _tmp15_ = FALSE;
		ContactsContact* _tmp16_ = NULL;
		FolksIndividual* _tmp17_ = NULL;
		GeeSet* _tmp18_ = NULL;
		GeeSet* _tmp19_ = NULL;
		gint _tmp20_ = 0;
		gint _tmp21_ = 0;
		_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksPersona* _tmp3_ = NULL;
	_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_ = NULL;
	ContactsStore* _tmp1_ = NULL;
	GtkScrolledWindow* main_sw = NULL;
	GtkScrolledWindow* _tmp2_ = NULL;
	GtkScrolledWindow* _tmp3_ = NULL;
	GtkStyleContext* _tmp4_ = NULL;
	GtkScrolledWindow* _tmp5_ = NULL;
	GtkScrolledWindow* _tmp6_ = NULL;
	GtkScrolledWindow* _tmp7_ = NULL;
	GtkScrolledWindow* _tmp8_ = NULL;
	Center* hcenter = NULL;
	Center* _tmp9_ = NULL;
	Center* _tmp10_ = NULL;
	Center* _tmp11_ = NULL;
	ContactsContactSheet* _tmp12_ = NULL;
	Center* _tmp13_ = NULL;
	ContactsContactSheet* _tmp14_ = NULL;
	ContactsContactSheet* _tmp15_ = NULL;
	ContactsContactSheet* _tmp16_ = NULL;
	ContactsContactSheet* _tmp17_ = NULL;
	ContactsContactSheet* _tmp18_ = NULL;
	GtkScrolledWindow* _tmp19_ = NULL;
	Center* _tmp20_ = NULL;
	ContactsContactSheet* _tmp21_ = NULL;
	GtkScrolledWindow* _tmp22_ = NULL;
	GtkAdjustment* _tmp23_ = NULL;
	GtkScrolledWindow* _tmp24_ = NULL;
	GtkWidget* _tmp25_ = NULL;
	GtkStyleContext* _tmp26_ = NULL;
	GtkScrolledWindow* _tmp27_ = NULL;
	GtkWidget* _tmp28_ = NULL;
	GtkStyleContext* _tmp29_ = NULL;
	GtkScrolledWindow* _tmp30_ = NULL;
	GtkScrolledWindow* _tmp31_ = NULL;
	ContactsStore* _tmp32_ = NULL;
	GtkGrid* top_grid = NULL;
	GtkGrid* _tmp33_ = NULL;
	GtkScrolledWindow* _tmp34_ = NULL;
	GtkScrolledWindow* _tmp35_ = NULL;
	GtkScrolledWindow* _tmp36_ = NULL;
	GtkStyleContext* _tmp37_ = NULL;
	GtkScrolledWindow* _tmp38_ = NULL;
	GtkScrolledWindow* _tmp39_ = NULL;
	GtkScrolledWindow* _tmp40_ = NULL;
	GtkScrolledWindow* _tmp41_ = NULL;
	Center* _tmp42_ = NULL;
	Center* _tmp43_ = NULL;
	Center* _tmp44_ = NULL;
	ContactsContactEditor* _tmp45_ = NULL;
	Center* _tmp46_ = NULL;
	ContactsContactEditor* _tmp47_ = NULL;
	ContactsContactEditor* _tmp48_ = NULL;
	ContactsContactEditor* _tmp49_ = NULL;
	GtkScrolledWindow* _tmp50_ = NULL;
	Center* _tmp51_ = NULL;
	ContactsContactEditor* _tmp52_ = NULL;
	GtkScrolledWindow* _tmp53_ = NULL;
	GtkAdjustment* _tmp54_ = NULL;
	GtkScrolledWindow* _tmp55_ = NULL;
	GtkWidget* _tmp56_ = NULL;
	GtkStyleContext* _tmp57_ = NULL;
	GtkScrolledWindow* _tmp58_ = NULL;
	GtkWidget* _tmp59_ = NULL;
	GtkStyleContext* _tmp60_ = NULL;
	GtkToolbar* edit_toolbar = NULL;
	GtkToolbar* _tmp61_ = NULL;
	GtkStyleContext* _tmp62_ = NULL;
	GtkStyleContext* _tmp63_ = NULL;
	GtkMenuButton* add_detail_button = NULL;
	GtkMenuButton* _tmp64_ = NULL;
	GtkGrid* box = NULL;
	GtkGrid* _tmp65_ = NULL;
	GtkWidget* w = NULL;
	const gchar* _tmp66_ = NULL;
	GtkLabel* _tmp67_ = NULL;
	GtkWidget* _tmp68_ = NULL;
	GtkWidget* _tmp69_ = NULL;
	GtkWidget* _tmp70_ = NULL;
	GtkWidget* _tmp71_ = NULL;
	GtkArrow* _tmp72_ = NULL;
	GtkWidget* _tmp73_ = NULL;
	GtkWidget* _tmp74_ = NULL;
	GtkWidget* _tmp75_ = NULL;
	GtkWidget* _tmp76_ = NULL;
	GtkMenu* details_menu = NULL;
	GtkMenu* _tmp77_ = NULL;
	GtkMenuItem* item = NULL;
	const gchar* _tmp78_ = NULL;
	GtkMenuItem* _tmp79_ = NULL;
	GtkMenuItem* _tmp80_ = NULL;
	GtkMenuItem* _tmp81_ = NULL;
	const gchar* _tmp82_ = NULL;
	GtkMenuItem* _tmp83_ = NULL;
	GtkMenuItem* _tmp84_ = NULL;
	GtkMenuItem* _tmp85_ = NULL;
	const gchar* _tmp86_ = NULL;
	GtkMenuItem* _tmp87_ = NULL;
	GtkMenuItem* _tmp88_ = NULL;
	GtkMenuItem* _tmp89_ = NULL;
	const gchar* _tmp90_ = NULL;
	GtkMenuItem* _tmp91_ = NULL;
	GtkMenuItem* _tmp92_ = NULL;
	GtkMenuItem* _tmp93_ = NULL;
	const gchar* _tmp94_ = NULL;
	GtkMenuItem* _tmp95_ = NULL;
	GtkMenuItem* _tmp96_ = NULL;
	GtkMenuItem* _tmp97_ = NULL;
	const gchar* _tmp98_ = NULL;
	GtkMenuItem* _tmp99_ = NULL;
	GtkMenuItem* _tmp100_ = NULL;
	GtkMenuItem* _tmp101_ = NULL;
	const gchar* _tmp102_ = NULL;
	GtkMenuItem* _tmp103_ = NULL;
	GtkMenuItem* _tmp104_ = NULL;
	GtkMenuItem* _tmp105_ = NULL;
	const gchar* _tmp106_ = NULL;
	GtkMenuItem* _tmp107_ = NULL;
	GtkMenuItem* _tmp108_ = NULL;
	GtkMenuItem* _tmp109_ = NULL;
	const gchar* _tmp110_ = NULL;
	GtkMenuItem* _tmp111_ = NULL;
	GtkMenuItem* _tmp112_ = NULL;
	GtkMenuItem* _tmp113_ = NULL;
	const gchar* _tmp114_ = NULL;
	GtkMenuItem* _tmp115_ = NULL;
	GtkMenuItem* _tmp116_ = NULL;
	GtkMenuItem* _tmp117_ = NULL;
	const gchar* _tmp118_ = NULL;
	GtkMenuItem* _tmp119_ = NULL;
	GtkMenuItem* _tmp120_ = NULL;
	GtkMenuItem* _tmp121_ = NULL;
	GtkToolItem* tool_item = NULL;
	GtkToolItem* _tmp122_ = NULL;
	GtkToolItem* _tmp123_ = NULL;
	GtkToolItem* _tmp124_ = NULL;
	GtkToolItem* _tmp125_ = NULL;
	GtkToolItem* _tmp126_ = NULL;
	const gchar* _tmp127_ = NULL;
	GtkButton* _tmp128_ = NULL;
	GtkButton* _tmp129_ = NULL;
	GtkToolItem* _tmp130_ = NULL;
	GtkButton* _tmp131_ = NULL;
	GtkToolItem* _tmp132_ = NULL;
	GtkButton* _tmp133_ = NULL;
	GtkSeparatorToolItem* _tmp134_ = NULL;
	GtkToolItem* _tmp135_ = NULL;
	GtkToolItem* _tmp136_ = NULL;
	GtkToolItem* _tmp137_ = NULL;
	GtkToolItem* _tmp138_ = NULL;
	const gchar* _tmp139_ = NULL;
	GtkButton* _tmp140_ = NULL;
	GtkButton* _tmp141_ = NULL;
	GtkToolItem* _tmp142_ = NULL;
	GtkButton* _tmp143_ = NULL;
	GtkToolItem* _tmp144_ = NULL;
	GtkButton* _tmp145_ = NULL;
	ContactsContactEditor* _tmp146_ = NULL;
	ContactsContactEditor* _tmp147_ = NULL;
	ContactsContactEditor* _tmp148_ = NULL;
	GtkScrolledWindow* _tmp149_ = NULL;
	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_ = hcenter;
	center_set_xalign (_tmp11_, 0.0);
	_tmp12_ = contacts_contact_sheet_new ();
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->sheet);
	self->priv->sheet = _tmp12_;
	_tmp13_ = hcenter;
	_tmp14_ = self->priv->sheet;
	gtk_container_add ((GtkContainer*) _tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = self->priv->sheet;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, TRUE);
	_tmp16_ = self->priv->sheet;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp16_, TRUE);
	_tmp17_ = self->priv->sheet;
	g_object_set ((GtkWidget*) _tmp17_, "margin", 36, NULL);
	_tmp18_ = self->priv->sheet;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp18_, 24);
	_tmp19_ = main_sw;
	_tmp20_ = hcenter;
	gtk_scrolled_window_add_with_viewport (_tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = self->priv->sheet;
	_tmp22_ = main_sw;
	_tmp23_ = gtk_scrolled_window_get_vadjustment (_tmp22_);
	gtk_container_set_focus_vadjustment ((GtkContainer*) _tmp21_, _tmp23_);
	_tmp24_ = main_sw;
	_tmp25_ = gtk_bin_get_child ((GtkBin*) _tmp24_);
	_tmp26_ = gtk_widget_get_style_context (_tmp25_);
	gtk_style_context_add_class (_tmp26_, "contacts-main-view");
	_tmp27_ = main_sw;
	_tmp28_ = gtk_bin_get_child ((GtkBin*) _tmp27_);
	_tmp29_ = gtk_widget_get_style_context (_tmp28_);
	gtk_style_context_add_class (_tmp29_, "view");
	_tmp30_ = main_sw;
	gtk_widget_show_all ((GtkWidget*) _tmp30_);
	_tmp31_ = main_sw;
	gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp31_, NULL, 1);
	_tmp32_ = contacts_store;
	g_signal_connect_object (_tmp32_, "quiescent", (GCallback) ___lambda76__contacts_store_quiescent, self, 0);
	_g_object_unref0 (self->suggestion_grid);
	self->suggestion_grid = NULL;
	_tmp33_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp33_);
	top_grid = _tmp33_;
	gtk_orientable_set_orientation ((GtkOrientable*) top_grid, GTK_ORIENTATION_VERTICAL);
	_tmp34_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp34_);
	_g_object_unref0 (main_sw);
	main_sw = _tmp34_;
	_tmp35_ = main_sw;
	gtk_container_add ((GtkContainer*) top_grid, (GtkWidget*) _tmp35_);
	_tmp36_ = main_sw;
	_tmp37_ = gtk_widget_get_style_context ((GtkWidget*) _tmp36_);
	gtk_style_context_add_class (_tmp37_, "contacts-content");
	_tmp38_ = main_sw;
	gtk_scrolled_window_set_shadow_type (_tmp38_, GTK_SHADOW_IN);
	_tmp39_ = main_sw;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp39_, TRUE);
	_tmp40_ = main_sw;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp40_, TRUE);
	_tmp41_ = main_sw;
	gtk_scrolled_window_set_policy (_tmp41_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp42_ = center_new ();
	g_object_ref_sink (_tmp42_);
	_g_object_unref0 (hcenter);
	hcenter = _tmp42_;
	_tmp43_ = hcenter;
	center_set_max_width (_tmp43_, 600);
	_tmp44_ = hcenter;
	center_set_xalign (_tmp44_, 0.0);
	_tmp45_ = contacts_contact_editor_new ();
	g_object_ref_sink (_tmp45_);
	_g_object_unref0 (self->priv->editor);
	self->priv->editor = _tmp45_;
	_tmp46_ = hcenter;
	_tmp47_ = self->priv->editor;
	gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _tmp47_);
	_tmp48_ = self->priv->editor;
	g_object_set ((GtkWidget*) _tmp48_, "margin", 36, NULL);
	_tmp49_ = self->priv->editor;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp49_, 24);
	_tmp50_ = main_sw;
	_tmp51_ = hcenter;
	gtk_scrolled_window_add_with_viewport (_tmp50_, (GtkWidget*) _tmp51_);
	_tmp52_ = self->priv->editor;
	_tmp53_ = main_sw;
	_tmp54_ = gtk_scrolled_window_get_vadjustment (_tmp53_);
	gtk_container_set_focus_vadjustment ((GtkContainer*) _tmp52_, _tmp54_);
	_tmp55_ = main_sw;
	_tmp56_ = gtk_bin_get_child ((GtkBin*) _tmp55_);
	_tmp57_ = gtk_widget_get_style_context (_tmp56_);
	gtk_style_context_add_class (_tmp57_, "contacts-main-view");
	_tmp58_ = main_sw;
	_tmp59_ = gtk_bin_get_child ((GtkBin*) _tmp58_);
	_tmp60_ = gtk_widget_get_style_context (_tmp59_);
	gtk_style_context_add_class (_tmp60_, "view");
	self->on_edit_mode = FALSE;
	_tmp61_ = (GtkToolbar*) gtk_toolbar_new ();
	g_object_ref_sink (_tmp61_);
	edit_toolbar = _tmp61_;
	_tmp62_ = gtk_widget_get_style_context ((GtkWidget*) edit_toolbar);
	gtk_style_context_add_class (_tmp62_, GTK_STYLE_CLASS_MENUBAR);
	_tmp63_ = gtk_widget_get_style_context ((GtkWidget*) edit_toolbar);
	gtk_style_context_add_class (_tmp63_, "contacts-edit-toolbar");
	gtk_widget_set_vexpand ((GtkWidget*) edit_toolbar, FALSE);
	_tmp64_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp64_);
	add_detail_button = _tmp64_;
	gtk_widget_set_vexpand ((GtkWidget*) add_detail_button, TRUE);
	_tmp65_ = (GtkGrid*) gtk_grid_new ();
	g_object_ref_sink (_tmp65_);
	box = _tmp65_;
	_tmp66_ = _ ("New Detail");
	_tmp67_ = (GtkLabel*) gtk_label_new (_tmp66_);
	g_object_ref_sink (_tmp67_);
	_tmp68_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp67_, GTK_TYPE_WIDGET) ? ((GtkWidget*) _tmp67_) : NULL;
	if (_tmp68_ == NULL) {
		_g_object_unref0 (_tmp67_);
	}
	w = _tmp68_;
	_tmp69_ = w;
	gtk_widget_set_valign (_tmp69_, GTK_ALIGN_CENTER);
	_tmp70_ = w;
	gtk_widget_set_vexpand (_tmp70_, TRUE);
	gtk_grid_set_column_spacing (box, (guint) 4);
	_tmp71_ = w;
	gtk_container_add ((GtkContainer*) box, _tmp71_);
	_tmp72_ = (GtkArrow*) gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
	g_object_ref_sink (_tmp72_);
	_tmp73_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp72_, GTK_TYPE_WIDGET) ? ((GtkWidget*) _tmp72_) : NULL;
	if (_tmp73_ == NULL) {
		_g_object_unref0 (_tmp72_);
	}
	_g_object_unref0 (w);
	w = _tmp73_;
	_tmp74_ = w;
	gtk_widget_set_valign (_tmp74_, GTK_ALIGN_CENTER);
	_tmp75_ = w;
	gtk_widget_set_vexpand (_tmp75_, TRUE);
	_tmp76_ = w;
	gtk_container_add ((GtkContainer*) box, _tmp76_);
	gtk_container_add ((GtkContainer*) add_detail_button, (GtkWidget*) box);
	_tmp77_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp77_);
	details_menu = _tmp77_;
	gtk_widget_set_halign ((GtkWidget*) details_menu, GTK_ALIGN_START);
	_tmp78_ = _ ("Personal email");
	_tmp79_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp78_);
	g_object_ref_sink (_tmp79_);
	item = _tmp79_;
	_tmp80_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp80_);
	_tmp81_ = item;
	g_signal_connect_object (_tmp81_, "activate", (GCallback) ___lambda77__gtk_menu_item_activate, self, 0);
	_tmp82_ = _ ("Work email");
	_tmp83_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp82_);
	g_object_ref_sink (_tmp83_);
	_g_object_unref0 (item);
	item = _tmp83_;
	_tmp84_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp84_);
	_tmp85_ = item;
	g_signal_connect_object (_tmp85_, "activate", (GCallback) ___lambda78__gtk_menu_item_activate, self, 0);
	_tmp86_ = _ ("Mobile phone");
	_tmp87_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp86_);
	g_object_ref_sink (_tmp87_);
	_g_object_unref0 (item);
	item = _tmp87_;
	_tmp88_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp88_);
	_tmp89_ = item;
	g_signal_connect_object (_tmp89_, "activate", (GCallback) ___lambda79__gtk_menu_item_activate, self, 0);
	_tmp90_ = _ ("Home phone");
	_tmp91_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp90_);
	g_object_ref_sink (_tmp91_);
	_g_object_unref0 (item);
	item = _tmp91_;
	_tmp92_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp92_);
	_tmp93_ = item;
	g_signal_connect_object (_tmp93_, "activate", (GCallback) ___lambda80__gtk_menu_item_activate, self, 0);
	_tmp94_ = _ ("Work phone");
	_tmp95_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp94_);
	g_object_ref_sink (_tmp95_);
	_g_object_unref0 (item);
	item = _tmp95_;
	_tmp96_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp96_);
	_tmp97_ = item;
	g_signal_connect_object (_tmp97_, "activate", (GCallback) ___lambda81__gtk_menu_item_activate, self, 0);
	_tmp98_ = _ ("Link");
	_tmp99_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp98_);
	g_object_ref_sink (_tmp99_);
	_g_object_unref0 (item);
	item = _tmp99_;
	_tmp100_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp100_);
	_tmp101_ = item;
	g_signal_connect_object (_tmp101_, "activate", (GCallback) ___lambda82__gtk_menu_item_activate, self, 0);
	_tmp102_ = _ ("Nickname");
	_tmp103_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp102_);
	g_object_ref_sink (_tmp103_);
	_g_object_unref0 (self->priv->nickname_item);
	self->priv->nickname_item = _tmp103_;
	_tmp104_ = self->priv->nickname_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp104_);
	_tmp105_ = self->priv->nickname_item;
	g_signal_connect_object (_tmp105_, "activate", (GCallback) ___lambda83__gtk_menu_item_activate, self, 0);
	_tmp106_ = _ ("Birthday");
	_tmp107_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp106_);
	g_object_ref_sink (_tmp107_);
	_g_object_unref0 (self->priv->birthday_item);
	self->priv->birthday_item = _tmp107_;
	_tmp108_ = self->priv->birthday_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp108_);
	_tmp109_ = self->priv->birthday_item;
	g_signal_connect_object (_tmp109_, "activate", (GCallback) ___lambda84__gtk_menu_item_activate, self, 0);
	_tmp110_ = _ ("Home address");
	_tmp111_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp110_);
	g_object_ref_sink (_tmp111_);
	_g_object_unref0 (item);
	item = _tmp111_;
	_tmp112_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp112_);
	_tmp113_ = item;
	g_signal_connect_object (_tmp113_, "activate", (GCallback) ___lambda85__gtk_menu_item_activate, self, 0);
	_tmp114_ = _ ("Work address");
	_tmp115_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp114_);
	g_object_ref_sink (_tmp115_);
	_g_object_unref0 (item);
	item = _tmp115_;
	_tmp116_ = item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp116_);
	_tmp117_ = item;
	g_signal_connect_object (_tmp117_, "activate", (GCallback) ___lambda86__gtk_menu_item_activate, self, 0);
	_tmp118_ = _ ("Notes");
	_tmp119_ = (GtkMenuItem*) gtk_menu_item_new_with_label (_tmp118_);
	g_object_ref_sink (_tmp119_);
	_g_object_unref0 (self->priv->notes_item);
	self->priv->notes_item = _tmp119_;
	_tmp120_ = self->priv->notes_item;
	gtk_menu_shell_append ((GtkMenuShell*) details_menu, (GtkWidget*) _tmp120_);
	_tmp121_ = self->priv->notes_item;
	g_signal_connect_object (_tmp121_, "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);
	_tmp122_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp122_);
	tool_item = _tmp122_;
	_tmp123_ = tool_item;
	gtk_container_add ((GtkContainer*) _tmp123_, (GtkWidget*) add_detail_button);
	_tmp124_ = tool_item;
	gtk_widget_set_margin_right ((GtkWidget*) _tmp124_, 12);
	_tmp125_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp125_, -1);
	_tmp126_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp126_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp126_;
	_tmp127_ = _ ("Linked Accounts");
	_tmp128_ = (GtkButton*) gtk_button_new_with_label (_tmp127_);
	g_object_ref_sink (_tmp128_);
	_g_object_unref0 (self->priv->linked_button);
	self->priv->linked_button = _tmp128_;
	_tmp129_ = self->priv->linked_button;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp129_, TRUE);
	_tmp130_ = tool_item;
	_tmp131_ = self->priv->linked_button;
	gtk_container_add ((GtkContainer*) _tmp130_, (GtkWidget*) _tmp131_);
	_tmp132_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp132_, -1);
	_tmp133_ = self->priv->linked_button;
	g_signal_connect_object (_tmp133_, "clicked", (GCallback) _contacts_contact_pane_linked_accounts_gtk_button_clicked, self, 0);
	_tmp134_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
	g_object_ref_sink (_tmp134_);
	_g_object_unref0 (tool_item);
	tool_item = (GtkToolItem*) _tmp134_;
	_tmp135_ = tool_item;
	gtk_tool_item_set_expand (_tmp135_, TRUE);
	_tmp136_ = tool_item;
	gtk_separator_tool_item_set_draw (G_TYPE_CHECK_INSTANCE_TYPE (_tmp136_, GTK_TYPE_SEPARATOR_TOOL_ITEM) ? ((GtkSeparatorToolItem*) _tmp136_) : NULL, FALSE);
	_tmp137_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp137_, -1);
	_tmp138_ = gtk_tool_item_new ();
	g_object_ref_sink (_tmp138_);
	_g_object_unref0 (tool_item);
	tool_item = _tmp138_;
	_tmp139_ = _ ("Remove Contact");
	_tmp140_ = (GtkButton*) gtk_button_new_with_label (_tmp139_);
	g_object_ref_sink (_tmp140_);
	_g_object_unref0 (self->priv->remove_button);
	self->priv->remove_button = _tmp140_;
	_tmp141_ = self->priv->remove_button;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp141_, TRUE);
	_tmp142_ = tool_item;
	_tmp143_ = self->priv->remove_button;
	gtk_container_add ((GtkContainer*) _tmp142_, (GtkWidget*) _tmp143_);
	_tmp144_ = tool_item;
	gtk_toolbar_insert (edit_toolbar, _tmp144_, -1);
	_tmp145_ = self->priv->remove_button;
	g_signal_connect_object (_tmp145_, "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);
	_tmp146_ = self->priv->editor;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp146_, TRUE);
	_tmp147_ = self->priv->editor;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp147_, TRUE);
	_tmp148_ = self->priv->editor;
	gtk_widget_show_all ((GtkWidget*) _tmp148_);
	_tmp149_ = main_sw;
	gtk_widget_show ((GtkWidget*) _tmp149_);
	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) {
	ContactsLinkedAccountsDialog* dialog = NULL;
	ContactsContact* _tmp0_ = NULL;
	ContactsLinkedAccountsDialog* _tmp1_ = NULL;
	gint _result_ = 0;
	ContactsLinkedAccountsDialog* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gboolean _tmp4_ = FALSE;
	gint _tmp5_ = 0;
	gboolean _tmp8_ = FALSE;
	ContactsLinkedAccountsDialog* _tmp9_ = NULL;
	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_ = NULL;
		gboolean _tmp7_ = FALSE;
		_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_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->contact;
	if (_tmp0_ != NULL) {
		ContactsContact* _tmp1_ = NULL;
		ContactsContact* _tmp2_ = NULL;
		_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_ = NULL;
		GtkFrame* _tmp2_ = NULL;
		GtkStyleContext* _tmp3_ = NULL;
		GtkFrame* _tmp4_ = NULL;
		GtkGrid* box = NULL;
		GtkGrid* _tmp5_ = NULL;
		GtkGrid* _tmp6_ = NULL;
		GtkGrid* _tmp7_ = NULL;
		GtkGrid* _tmp8_ = NULL;
		GtkGrid* _tmp9_ = NULL;
		GtkGrid* _tmp10_ = NULL;
		GtkImage* image = NULL;
		GtkIconSize _tmp11_ = 0;
		GtkImage* _tmp12_ = NULL;
		GtkImage* _tmp13_ = NULL;
		GtkStyleContext* _tmp14_ = NULL;
		GtkGrid* _tmp15_ = NULL;
		GtkImage* _tmp16_ = NULL;
		GtkLabel* label = NULL;
		const gchar* _tmp17_ = NULL;
		GtkLabel* _tmp18_ = NULL;
		GtkGrid* _tmp19_ = NULL;
		GtkLabel* _tmp20_ = NULL;
		GtkFrame* _tmp21_ = NULL;
		GtkGrid* _tmp22_ = NULL;
		GtkFrame* _tmp23_ = NULL;
		GtkFrame* _tmp24_ = NULL;
		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_ = NULL;
		_tmp0_ = _result_;
		contacts_contact_set_persona_property_finish (_tmp0_, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* e2 = NULL;
		ContactsApp* _tmp1_ = NULL;
		GError* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		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);
	}
	__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 ______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_ = NULL;
		FolksPersona* _tmp1_ = NULL;
		FolksPersona* _tmp2_ = NULL;
		_tmp0_ = _result_;
		_tmp1_ = contacts_contact_set_individual_property_finish (_tmp0_, &_inner_error_);
		_tmp2_ = _tmp1_;
		_g_object_unref0 (_tmp2_);
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
		ContactsApp* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		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);
	}
	__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 _____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_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = on_edit;
	_tmp1_ = self->on_edit_mode;
	if (_tmp0_ == _tmp1_) {
		return;
	}
	_tmp2_ = on_edit;
	if (_tmp2_) {
		ContactsContact* _tmp3_ = NULL;
		ContactsContact* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		ContactsContact* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		ContactsContact* _tmp12_ = NULL;
		gboolean _tmp13_ = FALSE;
		ContactsContactSheet* _tmp16_ = NULL;
		GtkGrid* _tmp17_ = NULL;
		ContactsContactEditor* _tmp19_ = NULL;
		ContactsContactEditor* _tmp20_ = NULL;
		ContactsContact* _tmp21_ = NULL;
		ContactsContactEditor* _tmp22_ = NULL;
		_tmp3_ = self->contact;
		if (_tmp3_ == NULL) {
			return;
		}
		self->on_edit_mode = TRUE;
		_tmp4_ = self->contact;
		_tmp5_ = contacts_contact_has_birthday (_tmp4_);
		if (_tmp5_) {
			GtkMenuItem* _tmp6_ = NULL;
			_tmp6_ = self->priv->birthday_item;
			gtk_widget_hide ((GtkWidget*) _tmp6_);
		} else {
			GtkMenuItem* _tmp7_ = NULL;
			_tmp7_ = self->priv->birthday_item;
			gtk_widget_show ((GtkWidget*) _tmp7_);
		}
		_tmp8_ = self->contact;
		_tmp9_ = contacts_contact_has_nickname (_tmp8_);
		if (_tmp9_) {
			GtkMenuItem* _tmp10_ = NULL;
			_tmp10_ = self->priv->nickname_item;
			gtk_widget_hide ((GtkWidget*) _tmp10_);
		} else {
			GtkMenuItem* _tmp11_ = NULL;
			_tmp11_ = self->priv->nickname_item;
			gtk_widget_show ((GtkWidget*) _tmp11_);
		}
		_tmp12_ = self->contact;
		_tmp13_ = contacts_contact_has_notes (_tmp12_);
		if (_tmp13_) {
			GtkMenuItem* _tmp14_ = NULL;
			_tmp14_ = self->priv->notes_item;
			gtk_widget_hide ((GtkWidget*) _tmp14_);
		} else {
			GtkMenuItem* _tmp15_ = NULL;
			_tmp15_ = self->priv->notes_item;
			gtk_widget_show ((GtkWidget*) _tmp15_);
		}
		_tmp16_ = self->priv->sheet;
		contacts_contact_sheet_clear (_tmp16_);
		_tmp17_ = self->suggestion_grid;
		if (_tmp17_ != NULL) {
			GtkGrid* _tmp18_ = NULL;
			_tmp18_ = self->suggestion_grid;
			gtk_widget_destroy ((GtkWidget*) _tmp18_);
			_g_object_unref0 (self->suggestion_grid);
			self->suggestion_grid = NULL;
		}
		_tmp19_ = self->priv->editor;
		contacts_contact_editor_clear (_tmp19_);
		_tmp20_ = self->priv->editor;
		_tmp21_ = self->contact;
		contacts_contact_editor_update (_tmp20_, _tmp21_);
		_tmp22_ = self->priv->editor;
		gtk_widget_show_all ((GtkWidget*) _tmp22_);
		gtk_notebook_set_current_page ((GtkNotebook*) self, 2);
	} else {
		ContactsContactEditor* _tmp46_ = NULL;
		gboolean _tmp47_ = FALSE;
		ContactsContactEditor* _tmp52_ = NULL;
		ContactsContactSheet* _tmp53_ = NULL;
		ContactsContactSheet* _tmp54_ = NULL;
		ContactsContact* _tmp55_ = NULL;
		self->on_edit_mode = FALSE;
		{
			GeeIterator* _prop_it = NULL;
			ContactsContactEditor* _tmp23_ = NULL;
			GeeHashMap* _tmp24_ = NULL;
			GeeHashMap* _tmp25_ = NULL;
			GeeSet* _tmp26_ = NULL;
			GeeSet* _tmp27_ = NULL;
			GeeSet* _tmp28_ = NULL;
			GeeIterator* _tmp29_ = NULL;
			GeeIterator* _tmp30_ = NULL;
			_tmp23_ = self->priv->editor;
			_tmp24_ = contacts_contact_editor_properties_changed (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = gee_abstract_map_get_entries ((GeeMap*) _tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = _tmp27_;
			_tmp29_ = gee_iterable_iterator ((GeeIterable*) _tmp28_);
			_tmp30_ = _tmp29_;
			_g_object_unref0 (_tmp28_);
			_g_object_unref0 (_tmp25_);
			_prop_it = _tmp30_;
			while (TRUE) {
				GeeIterator* _tmp31_ = NULL;
				gboolean _tmp32_ = FALSE;
				GeeMapEntry* prop = NULL;
				GeeIterator* _tmp33_ = NULL;
				gpointer _tmp34_ = NULL;
				GeeMapEntry* _tmp35_ = NULL;
				gconstpointer _tmp36_ = NULL;
				ContactsContactEditorPropertyData* _tmp37_ = NULL;
				FolksPersona* _tmp38_ = NULL;
				GeeMapEntry* _tmp39_ = NULL;
				gconstpointer _tmp40_ = NULL;
				const gchar* _tmp41_ = NULL;
				GeeMapEntry* _tmp42_ = NULL;
				gconstpointer _tmp43_ = NULL;
				ContactsContactEditorPropertyData* _tmp44_ = NULL;
				GValue _tmp45_ = {0};
				_tmp31_ = _prop_it;
				_tmp32_ = gee_iterator_next (_tmp31_);
				if (!_tmp32_) {
					break;
				}
				_tmp33_ = _prop_it;
				_tmp34_ = gee_iterator_get (_tmp33_);
				prop = (GeeMapEntry*) _tmp34_;
				_tmp35_ = prop;
				_tmp36_ = gee_map_entry_get_value (_tmp35_);
				_tmp37_ = _tmp36_;
				_tmp38_ = (*((ContactsContactEditorPropertyData*) _tmp37_)).persona;
				_tmp39_ = prop;
				_tmp40_ = gee_map_entry_get_key (_tmp39_);
				_tmp41_ = _tmp40_;
				_tmp42_ = prop;
				_tmp43_ = gee_map_entry_get_value (_tmp42_);
				_tmp44_ = _tmp43_;
				_tmp45_ = (*((ContactsContactEditorPropertyData*) _tmp44_)).value;
				contacts_contact_set_persona_property (_tmp38_, (const gchar*) _tmp41_, &_tmp45_, ______lambda91__gasync_ready_callback, g_object_ref (self));
				_g_object_unref0 (prop);
			}
			_g_object_unref0 (_prop_it);
		}
		_tmp46_ = self->priv->editor;
		_tmp47_ = contacts_contact_editor_name_changed (_tmp46_);
		if (_tmp47_) {
			GValue v = {0};
			ContactsContactEditor* _tmp48_ = NULL;
			GValue _tmp49_ = {0};
			ContactsContact* _tmp50_ = NULL;
			GValue _tmp51_ = {0};
			_tmp48_ = self->priv->editor;
			contacts_contact_editor_get_full_name_value (_tmp48_, &_tmp49_);
			v = _tmp49_;
			_tmp50_ = self->contact;
			_tmp51_ = v;
			contacts_contact_set_individual_property (_tmp50_, "full-name", &_tmp51_, _____lambda92__gasync_ready_callback, g_object_ref (self));
			G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
		}
		_tmp52_ = self->priv->editor;
		contacts_contact_editor_clear (_tmp52_);
		_tmp53_ = self->priv->sheet;
		contacts_contact_sheet_clear (_tmp53_);
		_tmp54_ = self->priv->sheet;
		_tmp55_ = self->contact;
		contacts_contact_sheet_update (_tmp54_, _tmp55_);
		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;
}



