/* contacts-contact-pane.c generated by valac 0.25.3.8-962c2, 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 <gee.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.h>
#include <gdk-pixbuf/gdk-pixbuf.h>


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

#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_free0(var) (var = (g_free (var), NULL))
typedef struct _Block24Data Block24Data;

#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;

#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;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block25Data Block25Data;

#define CONTACTS_TYPE_WINDOW (contacts_window_get_type ())
#define CONTACTS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_WINDOW, ContactsWindow))
#define CONTACTS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_WINDOW, ContactsWindowClass))
#define CONTACTS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_WINDOW))
#define CONTACTS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_WINDOW))
#define CONTACTS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_WINDOW, ContactsWindowClass))

typedef struct _ContactsWindow ContactsWindow;
typedef struct _ContactsWindowClass ContactsWindowClass;
typedef struct _ContactsAppPrivate ContactsAppPrivate;
typedef struct _Block26Data Block26Data;
typedef struct _Block27Data Block27Data;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (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 _ContactsContactEditorPrivate ContactsContactEditorPrivate;

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

struct _ContactsContactPaneClass {
	GtkNotebookClass parent_class;
};

struct _ContactsContactPanePrivate {
	ContactsStore* _store;
	GtkGrid* none_selected_view;
	ContactsContactSheet* sheet;
	ContactsContactEditor* editor;
	GSimpleActionGroup* edit_contact_actions;
};

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

struct _ContactsContactClass {
	GObjectClass parent_class;
};

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

struct _Block24Data {
	int _ref_count_;
	Block23Data * _data23_;
	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 ()
struct _Block25Data {
	int _ref_count_;
	ContactsContactPane* self;
	GtkDialog* dialog;
};

struct _ContactsApp {
	GtkApplication parent_instance;
	ContactsAppPrivate * priv;
	GSettings* settings;
	ContactsStore* contacts_store;
	ContactsWindow* window;
};

struct _ContactsAppClass {
	GtkApplicationClass parent_class;
};

struct _Block26Data {
	int _ref_count_;
	ContactsContactPane* self;
	GtkDialog* dialog;
};

struct _Block27Data {
	int _ref_count_;
	ContactsContactPane* self;
	GtkDialog* dialog;
};

struct _ContactsContactEditor {
	GtkGrid parent_instance;
	ContactsContactEditorPrivate * priv;
	GtkButton* linked_button;
	GtkButton* remove_button;
};

struct _ContactsContactEditorClass {
	GtkGridClass parent_class;
};


static gpointer contacts_contact_pane_parent_class = NULL;
extern ContactsApp* contacts_app_app;

#define PROFILE_SIZE 96
GType contacts_contact_pane_get_type (void) G_GNUC_CONST;
GType contacts_contact_get_type (void) G_GNUC_CONST;
GType contacts_store_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,
	CONTACTS_CONTACT_PANE_STORE
};
static void contacts_contact_pane_on_add_detail (ContactsContactPane* self, GSimpleAction* action, GVariant* parameter);
static void _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void contacts_contact_pane_update_sheet (ContactsContactPane* self);
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 Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static gboolean __lambda70_ (ContactsContactPane* self, cairo_t* cr);
static gboolean ___lambda70__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
#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 __lambda71_ (Block23Data* _data23_, GtkWidget* w);
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
static void ___lambda71__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 __lambda72_ (Block23Data* _data23_);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_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 __lambda73_ (Block24Data* _data24_, GObject* obj, GAsyncResult* _result_);
static void ___lambda73__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void ___lambda72__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void __lambda74_ (Block23Data* _data23_);
ContactsStore* contacts_contact_pane_get_store (ContactsContactPane* self);
void contacts_store_add_no_suggest_link (ContactsStore* self, ContactsContact* a, ContactsContact* b);
static void ___lambda74__gtk_button_clicked (GtkButton* _sender, gpointer self);
void contacts_contact_pane_show_contact (ContactsContactPane* self, ContactsContact* new_contact, gboolean show_matches);
static void _contacts_contact_pane_update_sheet_contacts_contact_personas_changed (ContactsContact* _sender, gpointer self);
static void _contacts_contact_pane_update_sheet_contacts_contact_changed (ContactsContact* _sender, gpointer self);
static void contacts_contact_pane_show_none_selected_view (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 contacts_contact_pane_linked_accounts (ContactsContactPane* 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, gboolean drop_changes);
static void contacts_contact_pane_delete_contact (ContactsContactPane* self);
void contacts_contact_hide (ContactsContact* self);
void contacts_contact_editor_clear (ContactsContactEditor* self);
void contacts_contact_editor_edit (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 ______lambda78_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_);
GType contacts_app_get_type (void) G_GNUC_CONST;
void contacts_app_show_message (ContactsApp* self, const gchar* message);
static void _______lambda78__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);
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 _____lambda79_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_);
static void ______lambda79__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
gboolean contacts_contact_editor_avatar_changed (ContactsContactEditor* self);
void contacts_contact_editor_get_avatar_value (ContactsContactEditor* self, GValue* result);
static void _____lambda80_ (ContactsContactPane* self, GObject* obj, GAsyncResult* _result_);
static void ______lambda80__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
void contacts_contact_pane_new_contact (ContactsContactPane* self);
void contacts_contact_editor_set_new_contact (ContactsContactEditor* self);
void contacts_contact_pane_create_contact (ContactsContactPane* self);
static void _g_free0_ (gpointer var);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
GType contacts_window_get_type (void) G_GNUC_CONST;
static void ___lambda81_ (Block25Data* _data25_);
static void ____lambda81__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void ____lambda82_ (Block26Data* _data26_);
static void _____lambda82__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
void contacts_contact_create_primary_persona_for_details (FolksPersonaStore* store, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
FolksPersona* contacts_contact_create_primary_persona_for_details_finish (GAsyncResult* _res_, GError** error);
static void ____lambda83_ (ContactsContactPane* self, GObject* obj, GAsyncResult* res);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
ContactsContact* contacts_store_find_contact_with_persona (ContactsStore* self, FolksPersona* persona);
static void ___lambda84_ (Block27Data* _data27_);
static void ____lambda84__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
void contacts_app_show_contact (ContactsApp* self, ContactsContact* contact);
static void _____lambda83__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
ContactsContactPane* contacts_contact_pane_new (void);
ContactsContactPane* contacts_contact_pane_construct (GType object_type);
void contacts_contact_pane_set_store (ContactsContactPane* self, ContactsStore* value);
static void _contacts_contact_pane_update_sheet_contacts_store_quiescent (ContactsStore* _sender, 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 GObject * contacts_contact_pane_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
GType center_get_type (void) G_GNUC_CONST;
Center* center_new (void);
Center* center_construct (GType object_type);
void center_set_max_width (Center* self, gint value);
void center_set_xalign (Center* self, gdouble value);
ContactsContactSheet* contacts_contact_sheet_new (void);
ContactsContactSheet* contacts_contact_sheet_construct (GType object_type);
ContactsContactEditor* contacts_contact_editor_new (GSimpleActionGroup* editor_actions);
ContactsContactEditor* contacts_contact_editor_construct (GType object_type, GSimpleActionGroup* editor_actions);
static void _contacts_contact_pane_linked_accounts_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void _contacts_contact_pane_delete_contact_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void contacts_contact_pane_finalize (GObject* obj);
static void _vala_contacts_contact_pane_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_contacts_contact_pane_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);

static const GActionEntry CONTACTS_CONTACT_PANE_action_entries[11] = {{"add.email-addresses.personal", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.email-addresses.work", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.phone-numbers.cell", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.phone-numbers.home", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.phone-numbers.work", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.urls", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.nickname", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.birthday", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.postal-addresses.home", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.postal-addresses.work", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}, {"add.notes", _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback}};

static void _contacts_contact_pane_on_add_detail_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
	contacts_contact_pane_on_add_detail ((ContactsContactPane*) self, action, parameter);
}


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


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


static Block23Data* block23_data_ref (Block23Data* _data23_) {
	g_atomic_int_inc (&_data23_->_ref_count_);
	return _data23_;
}


static void block23_data_unref (void * _userdata_) {
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
		ContactsContactPane* self;
		self = _data23_->self;
		_g_object_unref0 (_data23_->c);
		_g_object_unref0 (self);
		g_slice_free (Block23Data, _data23_);
	}
}


static gboolean __lambda70_ (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 ___lambda70__gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
	gboolean result;
	result = __lambda70_ ((ContactsContactPane*) self, cr);
	return result;
}


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


static void ___lambda71__gtk_callback (GtkWidget* widget, gpointer self) {
	__lambda71_ (self, widget);
}


static Block24Data* block24_data_ref (Block24Data* _data24_) {
	g_atomic_int_inc (&_data24_->_ref_count_);
	return _data24_;
}


static void block24_data_unref (void * _userdata_) {
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
		ContactsContactPane* self;
		self = _data24_->_data23_->self;
		_g_free0 (_data24_->linked_contact);
		block23_data_unref (_data24_->_data23_);
		_data24_->_data23_ = NULL;
		g_slice_free (Block24Data, _data24_);
	}
}


static void __lambda73_ (Block24Data* _data24_, GObject* obj, GAsyncResult* _result_) {
	Block23Data* _data23_;
	ContactsContactPane* self;
	ContactsLinkOperation* operation = NULL;
	GAsyncResult* _tmp0_ = NULL;
	ContactsLinkOperation* _tmp1_ = NULL;
	_data23_ = _data24_->_data23_;
	self = _data23_->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, _data24_->linked_contact, operation);
	_g_object_unref0 (operation);
}


static void ___lambda73__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	__lambda73_ (self, source_object, res);
	block24_data_unref (self);
}


static void __lambda72_ (Block23Data* _data23_) {
	ContactsContactPane* self;
	Block24Data* _data24_;
	ContactsContact* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	ContactsContact* _tmp5_ = NULL;
	GtkGrid* _tmp6_ = NULL;
	self = _data23_->self;
	_data24_ = g_slice_new0 (Block24Data);
	_data24_->_ref_count_ = 1;
	_data24_->_data23_ = block23_data_ref (_data23_);
	_tmp0_ = _data23_->c;
	_tmp1_ = contacts_contact_get_display_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	_data24_->linked_contact = _tmp3_;
	_tmp4_ = self->contact;
	_tmp5_ = _data23_->c;
	contacts_link_contacts (_tmp4_, _tmp5_, ___lambda73__gasync_ready_callback, block24_data_ref (_data24_));
	_tmp6_ = self->suggestion_grid;
	gtk_widget_destroy ((GtkWidget*) _tmp6_);
	block24_data_unref (_data24_);
	_data24_ = NULL;
}


static void ___lambda72__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda72_ (self);
}


static void __lambda74_ (Block23Data* _data23_) {
	ContactsContactPane* self;
	ContactsStore* _tmp0_ = NULL;
	ContactsStore* _tmp1_ = NULL;
	ContactsContact* _tmp2_ = NULL;
	ContactsContact* _tmp3_ = NULL;
	GtkGrid* _tmp4_ = NULL;
	self = _data23_->self;
	_tmp0_ = contacts_contact_pane_get_store (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->contact;
	_tmp3_ = _data23_->c;
	contacts_store_add_no_suggest_link (_tmp1_, _tmp2_, _tmp3_);
	_tmp4_ = self->suggestion_grid;
	gtk_widget_destroy ((GtkWidget*) _tmp4_);
}


static void ___lambda74__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	__lambda74_ (self);
}


void contacts_contact_pane_add_suggestion (ContactsContactPane* self, ContactsContact* c) {
	Block23Data* _data23_;
	ContactsContact* _tmp0_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	GtkOverlay* parent_overlay = NULL;
	GtkContainer* _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;
	GtkLabel* _tmp49_ = NULL;
	GtkGrid* _tmp50_ = NULL;
	GtkLabel* _tmp51_ = NULL;
	GtkButtonBox* bbox = NULL;
	GtkButtonBox* _tmp52_ = NULL;
	GtkButton* yes = NULL;
	const gchar* _tmp53_ = NULL;
	GtkButton* _tmp54_ = NULL;
	GtkButton* no = NULL;
	const gchar* _tmp55_ = NULL;
	GtkButton* _tmp56_ = NULL;
	GtkGrid* _tmp57_ = NULL;
	GtkGrid* _tmp58_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (c != NULL);
	_data23_ = g_slice_new0 (Block23Data);
	_data23_->_ref_count_ = 1;
	_data23_->self = g_object_ref (self);
	_tmp0_ = c;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data23_->c);
	_data23_->c = _tmp1_;
	_tmp2_ = (GtkContainer*) gtk_widget_get_parent ((GtkWidget*) self);
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, gtk_overlay_get_type ()) ? ((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) ___lambda70__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_end ((GtkWidget*) _tmp17_, 12);
	_tmp18_ = _data23_->c;
	_tmp19_ = image_frame;
	contacts_contact_keep_widget_uptodate (_tmp18_, (GtkWidget*) _tmp19_, ___lambda71__gtk_callback, block23_data_ref (_data23_), block23_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_ = _data23_->c;
		_tmp28_ = contacts_contact_get_display_name (_tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = _data23_->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_ = _data23_->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_width_chars (_tmp45_, 20);
	_tmp46_ = label;
	gtk_label_set_line_wrap_mode (_tmp46_, PANGO_WRAP_WORD_CHAR);
	_tmp47_ = label;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp47_, TRUE);
	_tmp48_ = label;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp48_, 24);
	_tmp49_ = label;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp49_, 24);
	_tmp50_ = self->suggestion_grid;
	_tmp51_ = label;
	gtk_grid_attach (_tmp50_, (GtkWidget*) _tmp51_, 1, 0, 1, 2);
	_tmp52_ = (GtkButtonBox*) gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
	g_object_ref_sink (_tmp52_);
	bbox = _tmp52_;
	_tmp53_ = _ ("Yes");
	_tmp54_ = (GtkButton*) gtk_button_new_with_label (_tmp53_);
	g_object_ref_sink (_tmp54_);
	yes = _tmp54_;
	_tmp55_ = _ ("No");
	_tmp56_ = (GtkButton*) gtk_button_new_with_label (_tmp55_);
	g_object_ref_sink (_tmp56_);
	no = _tmp56_;
	g_signal_connect_data (yes, "clicked", (GCallback) ___lambda72__gtk_button_clicked, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
	g_signal_connect_data (no, "clicked", (GCallback) ___lambda74__gtk_button_clicked, block23_data_ref (_data23_), (GClosureNotify) block23_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_start ((GtkWidget*) bbox, 12);
	_tmp57_ = self->suggestion_grid;
	gtk_grid_attach (_tmp57_, (GtkWidget*) bbox, 2, 0, 1, 2);
	_tmp58_ = self->suggestion_grid;
	gtk_widget_show_all ((GtkWidget*) _tmp58_);
	_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);
	block23_data_unref (_data23_);
	_data23_ = NULL;
}


static void _contacts_contact_pane_update_sheet_contacts_contact_personas_changed (ContactsContact* _sender, gpointer self) {
	contacts_contact_pane_update_sheet ((ContactsContactPane*) self);
}


static void _contacts_contact_pane_update_sheet_contacts_contact_changed (ContactsContact* _sender, gpointer self) {
	contacts_contact_pane_update_sheet ((ContactsContactPane*) self);
}


void contacts_contact_pane_show_contact (ContactsContactPane* self, ContactsContact* new_contact, gboolean show_matches) {
	ContactsContact* _tmp0_ = NULL;
	ContactsContact* _tmp1_ = NULL;
	GtkGrid* _tmp2_ = NULL;
	ContactsContact* _tmp4_ = NULL;
	ContactsContact* _tmp9_ = NULL;
	ContactsContact* _tmp10_ = NULL;
	ContactsContact* _tmp11_ = NULL;
	ContactsContact* _tmp14_ = 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_update_sheet_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_update_sheet_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);
	_tmp11_ = self->contact;
	if (_tmp11_ != NULL) {
		ContactsContact* _tmp12_ = NULL;
		ContactsContact* _tmp13_ = NULL;
		_tmp12_ = self->contact;
		g_signal_connect_object (_tmp12_, "personas-changed", (GCallback) _contacts_contact_pane_update_sheet_contacts_contact_personas_changed, self, 0);
		_tmp13_ = self->contact;
		g_signal_connect_object (_tmp13_, "changed", (GCallback) _contacts_contact_pane_update_sheet_contacts_contact_changed, self, 0);
	}
	_tmp14_ = self->contact;
	if (_tmp14_ == NULL) {
		contacts_contact_pane_show_none_selected_view (self);
	}
}


static void contacts_contact_pane_on_add_detail (ContactsContactPane* self, GSimpleAction* action, GVariant* parameter) {
	gchar** tok = NULL;
	GSimpleAction* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gint tok_length1 = 0;
	gint _tok_size_ = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	const gchar* _tmp6_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = g_action_get_name ((GAction*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp4_ = _tmp3_ = g_strsplit (_tmp2_, ".", 0);
	tok = _tmp4_;
	tok_length1 = _vala_array_length (_tmp3_);
	_tok_size_ = tok_length1;
	_tmp5_ = tok;
	_tmp5__length1 = tok_length1;
	_tmp6_ = _tmp5_[0];
	if (g_strcmp0 (_tmp6_, "add") == 0) {
		gchar* _tmp7_ = NULL;
		gchar** _tmp8_ = NULL;
		gint _tmp8__length1 = 0;
		ContactsContactEditor* _tmp12_ = NULL;
		ContactsContact* _tmp13_ = NULL;
		FolksPersona* _tmp14_ = NULL;
		FolksPersona* _tmp15_ = NULL;
		gchar** _tmp16_ = NULL;
		gint _tmp16__length1 = 0;
		const gchar* _tmp17_ = NULL;
		_tmp8_ = tok;
		_tmp8__length1 = tok_length1;
		if (_tmp8__length1 > 2) {
			gchar** _tmp9_ = NULL;
			gint _tmp9__length1 = 0;
			const gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
			_tmp9_ = tok;
			_tmp9__length1 = tok_length1;
			_tmp10_ = _tmp9_[2];
			_tmp11_ = g_utf8_strup (_tmp10_, (gssize) (-1));
			_g_free0 (_tmp7_);
			_tmp7_ = _tmp11_;
		} else {
			_g_free0 (_tmp7_);
			_tmp7_ = NULL;
		}
		_tmp12_ = self->priv->editor;
		_tmp13_ = self->contact;
		_tmp14_ = contacts_contact_find_primary_persona (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = tok;
		_tmp16__length1 = tok_length1;
		_tmp17_ = _tmp16_[1];
		contacts_contact_editor_add_new_row_for_property (_tmp12_, _tmp15_, _tmp17_, _tmp7_);
		_g_object_unref0 (_tmp15_);
		_g_free0 (_tmp7_);
	}
	tok = (_vala_array_free (tok, tok_length1, (GDestroyNotify) g_free), NULL);
}


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;
	ContactsLinkedAccountsDialog* _tmp8_ = 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;
	}
	if (_tmp4_) {
		contacts_contact_pane_set_edit_mode (self, FALSE, FALSE);
		contacts_contact_pane_set_edit_mode (self, TRUE, FALSE);
	}
	_tmp8_ = dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp8_);
	_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_);
		_tmp2_ = self->contact;
		g_signal_emit_by_name (self, "will-delete", _tmp2_);
	}
}


static void contacts_contact_pane_show_none_selected_view (ContactsContactPane* self) {
	GtkGrid* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->none_selected_view;
	if (_tmp0_ == NULL) {
		GtkGrid* _tmp1_ = NULL;
		GtkGrid* _tmp2_ = NULL;
		GtkGrid* _tmp3_ = NULL;
		GtkGrid* _tmp4_ = NULL;
		GtkGrid* _tmp5_ = NULL;
		GtkIconTheme* icon_theme = NULL;
		GtkIconTheme* _tmp6_ = NULL;
		GtkIconTheme* _tmp7_ = NULL;
		GdkPixbuf* pix = NULL;
		GtkIconTheme* _tmp8_ = NULL;
		GdkPixbuf* _tmp9_ = NULL;
		GtkImage* image = NULL;
		GdkPixbuf* _tmp10_ = NULL;
		GtkImage* _tmp11_ = NULL;
		GtkImage* _tmp12_ = NULL;
		GtkStyleContext* _tmp13_ = NULL;
		GtkImage* _tmp14_ = NULL;
		GtkImage* _tmp15_ = NULL;
		GtkGrid* _tmp16_ = NULL;
		GtkImage* _tmp17_ = NULL;
		GtkLabel* label = NULL;
		GtkLabel* _tmp18_ = NULL;
		GtkLabel* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		GtkLabel* _tmp23_ = NULL;
		GtkStyleContext* _tmp24_ = NULL;
		GtkLabel* _tmp25_ = NULL;
		GtkLabel* _tmp26_ = NULL;
		GtkLabel* _tmp27_ = NULL;
		GtkLabel* _tmp28_ = NULL;
		GtkGrid* _tmp29_ = NULL;
		GtkLabel* _tmp30_ = NULL;
		GtkGrid* _tmp31_ = NULL;
		GtkGrid* _tmp32_ = NULL;
		_tmp1_ = (GtkGrid*) gtk_grid_new ();
		g_object_ref_sink (_tmp1_);
		_g_object_unref0 (self->priv->none_selected_view);
		self->priv->none_selected_view = _tmp1_;
		_tmp2_ = self->priv->none_selected_view;
		gtk_widget_set_size_request ((GtkWidget*) _tmp2_, 500, -1);
		_tmp3_ = self->priv->none_selected_view;
		gtk_orientable_set_orientation ((GtkOrientable*) _tmp3_, GTK_ORIENTATION_VERTICAL);
		_tmp4_ = self->priv->none_selected_view;
		gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
		_tmp5_ = self->priv->none_selected_view;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
		_tmp6_ = gtk_icon_theme_get_default ();
		_tmp7_ = _g_object_ref0 (_tmp6_);
		icon_theme = _tmp7_;
		_tmp8_ = icon_theme;
		_tmp9_ = gtk_icon_theme_load_icon (_tmp8_, "avatar-default-symbolic", 144, 0, &_inner_error_);
		pix = _tmp9_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (icon_theme);
			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;
		}
		_tmp10_ = pix;
		_tmp11_ = (GtkImage*) gtk_image_new_from_pixbuf (_tmp10_);
		g_object_ref_sink (_tmp11_);
		image = _tmp11_;
		_tmp12_ = image;
		_tmp13_ = gtk_widget_get_style_context ((GtkWidget*) _tmp12_);
		gtk_style_context_add_class (_tmp13_, "contacts-watermark");
		_tmp14_ = image;
		gtk_widget_set_vexpand ((GtkWidget*) _tmp14_, TRUE);
		_tmp15_ = image;
		gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_END);
		_tmp16_ = self->priv->none_selected_view;
		_tmp17_ = image;
		gtk_container_add ((GtkContainer*) _tmp16_, (GtkWidget*) _tmp17_);
		_tmp18_ = (GtkLabel*) gtk_label_new ("");
		g_object_ref_sink (_tmp18_);
		label = _tmp18_;
		_tmp19_ = label;
		_tmp20_ = _ ("Select a contact");
		_tmp21_ = g_strdup_printf ("<span font=\"12\">%s</span>", _tmp20_);
		_tmp22_ = _tmp21_;
		gtk_label_set_markup (_tmp19_, _tmp22_);
		_g_free0 (_tmp22_);
		_tmp23_ = label;
		_tmp24_ = gtk_widget_get_style_context ((GtkWidget*) _tmp23_);
		gtk_style_context_add_class (_tmp24_, "contacts-watermark");
		_tmp25_ = label;
		gtk_widget_set_vexpand ((GtkWidget*) _tmp25_, TRUE);
		_tmp26_ = label;
		gtk_widget_set_hexpand ((GtkWidget*) _tmp26_, TRUE);
		_tmp27_ = label;
		gtk_widget_set_valign ((GtkWidget*) _tmp27_, GTK_ALIGN_START);
		_tmp28_ = label;
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp28_, 70);
		_tmp29_ = self->priv->none_selected_view;
		_tmp30_ = label;
		gtk_container_add ((GtkContainer*) _tmp29_, (GtkWidget*) _tmp30_);
		_tmp31_ = self->priv->none_selected_view;
		gtk_widget_show_all ((GtkWidget*) _tmp31_);
		_tmp32_ = self->priv->none_selected_view;
		gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp32_, NULL, 0);
		_g_object_unref0 (label);
		_g_object_unref0 (image);
		_g_object_unref0 (pix);
		_g_object_unref0 (icon_theme);
	}
	gtk_notebook_set_current_page ((GtkNotebook*) self, 0);
}


static void ______lambda78_ (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 (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_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);
		_g_error_free0 (e2);
	}
	__finally6:
	if (G_UNLIKELY (_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 _______lambda78__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	______lambda78_ ((ContactsContactPane*) self, source_object, res);
	g_object_unref (self);
}


static void _____lambda79_ (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 (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch7_g_error;
		}
	}
	goto __finally7;
	__catch7_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);
	}
	__finally7:
	if (G_UNLIKELY (_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 ______lambda79__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_____lambda79_ ((ContactsContactPane*) self, source_object, res);
	g_object_unref (self);
}


static void _____lambda80_ (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 (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch8_g_error;
		}
	}
	goto __finally8;
	__catch8_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);
	}
	__finally8:
	if (G_UNLIKELY (_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 ______lambda80__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	_____lambda80_ ((ContactsContactPane*) self, source_object, res);
	g_object_unref (self);
}


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


void contacts_contact_pane_new_contact (ContactsContactPane* self) {
	ContactsContactSheet* _tmp0_ = NULL;
	GtkGrid* _tmp1_ = NULL;
	ContactsContactEditor* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	self->on_edit_mode = TRUE;
	_tmp0_ = self->priv->sheet;
	contacts_contact_sheet_clear (_tmp0_);
	_tmp1_ = self->suggestion_grid;
	if (_tmp1_ != NULL) {
		GtkGrid* _tmp2_ = NULL;
		_tmp2_ = self->suggestion_grid;
		gtk_widget_destroy ((GtkWidget*) _tmp2_);
		_g_object_unref0 (self->suggestion_grid);
		self->suggestion_grid = NULL;
	}
	_tmp3_ = self->priv->editor;
	contacts_contact_editor_set_new_contact (_tmp3_);
	gtk_notebook_set_current_page ((GtkNotebook*) self, 2);
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _vala_GValue_free (GValue* self) {
	g_value_unset (self);
	g_free (self);
}


static void __vala_GValue_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
}


static GValue* _g_value_dup (GValue* self) {
	return g_boxed_copy (G_TYPE_VALUE, self);
}


static gpointer __g_value_dup0 (gpointer self) {
	return self ? _g_value_dup (self) : NULL;
}


static Block25Data* block25_data_ref (Block25Data* _data25_) {
	g_atomic_int_inc (&_data25_->_ref_count_);
	return _data25_;
}


static void block25_data_unref (void * _userdata_) {
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
		ContactsContactPane* self;
		self = _data25_->self;
		_g_object_unref0 (_data25_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block25Data, _data25_);
	}
}


static void ___lambda81_ (Block25Data* _data25_) {
	ContactsContactPane* self;
	GtkDialog* _tmp0_ = NULL;
	self = _data25_->self;
	_tmp0_ = _data25_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}


static void ____lambda81__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	___lambda81_ (self);
}


static Block26Data* block26_data_ref (Block26Data* _data26_) {
	g_atomic_int_inc (&_data26_->_ref_count_);
	return _data26_;
}


static void block26_data_unref (void * _userdata_) {
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
		ContactsContactPane* self;
		self = _data26_->self;
		_g_object_unref0 (_data26_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block26Data, _data26_);
	}
}


static void ____lambda82_ (Block26Data* _data26_) {
	ContactsContactPane* self;
	GtkDialog* _tmp0_ = NULL;
	self = _data26_->self;
	_tmp0_ = _data26_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}


static void _____lambda82__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	____lambda82_ (self);
}


static Block27Data* block27_data_ref (Block27Data* _data27_) {
	g_atomic_int_inc (&_data27_->_ref_count_);
	return _data27_;
}


static void block27_data_unref (void * _userdata_) {
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
		ContactsContactPane* self;
		self = _data27_->self;
		_g_object_unref0 (_data27_->dialog);
		_g_object_unref0 (self);
		g_slice_free (Block27Data, _data27_);
	}
}


static void ___lambda84_ (Block27Data* _data27_) {
	ContactsContactPane* self;
	GtkDialog* _tmp0_ = NULL;
	self = _data27_->self;
	_tmp0_ = _data27_->dialog;
	gtk_widget_destroy ((GtkWidget*) _tmp0_);
}


static void ____lambda84__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	___lambda84_ (self);
}


static void ____lambda83_ (ContactsContactPane* self, GObject* obj, GAsyncResult* res) {
	Block27Data* _data27_;
	FolksPersona* persona = NULL;
	ContactsContact* contact = NULL;
	ContactsApp* _tmp9_ = NULL;
	ContactsStore* _tmp10_ = NULL;
	FolksPersona* _tmp11_ = NULL;
	ContactsContact* _tmp12_ = NULL;
	ContactsContact* _tmp13_ = NULL;
	GtkDialog* _tmp17_ = NULL;
	ContactsApp* _tmp20_ = NULL;
	ContactsContact* _tmp21_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (res != NULL);
	_data27_ = g_slice_new0 (Block27Data);
	_data27_->_ref_count_ = 1;
	_data27_->self = g_object_ref (self);
	persona = NULL;
	_data27_->dialog = NULL;
	{
		FolksPersona* _tmp0_ = NULL;
		GAsyncResult* _tmp1_ = NULL;
		FolksPersona* _tmp2_ = NULL;
		FolksPersona* _tmp3_ = NULL;
		_tmp1_ = res;
		_tmp2_ = contacts_contact_create_primary_persona_for_details_finish (_tmp1_, &_inner_error_);
		_tmp0_ = _tmp2_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch9_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (persona);
		persona = _tmp3_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally9;
	__catch9_g_error:
	{
		GError* e = NULL;
		GtkWidget* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		GError* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		GtkMessageDialog* _tmp8_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp4_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp5_ = _ ("Unable to create new contacts: %s");
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		_tmp8_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, CONTACTS_TYPE_WINDOW) ? ((ContactsWindow*) _tmp4_) : NULL), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", _tmp5_, _tmp7_);
		g_object_ref_sink (_tmp8_);
		_g_object_unref0 (_data27_->dialog);
		_data27_->dialog = (GtkDialog*) _tmp8_;
		_g_error_free0 (e);
	}
	__finally9:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (persona);
		block27_data_unref (_data27_);
		_data27_ = 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;
	}
	_tmp9_ = contacts_app_app;
	_tmp10_ = _tmp9_->contacts_store;
	_tmp11_ = persona;
	_tmp12_ = contacts_store_find_contact_with_persona (_tmp10_, _tmp11_);
	contact = _tmp12_;
	_tmp13_ = contact;
	if (_tmp13_ == NULL) {
		GtkWidget* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		GtkMessageDialog* _tmp16_ = NULL;
		_tmp14_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp15_ = _ ("Unable to find newly created contact");
		_tmp16_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_WINDOW) ? ((ContactsWindow*) _tmp14_) : NULL), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", _tmp15_);
		g_object_ref_sink (_tmp16_);
		_g_object_unref0 (_data27_->dialog);
		_data27_->dialog = (GtkDialog*) _tmp16_;
	}
	contacts_contact_pane_set_edit_mode (self, FALSE, TRUE);
	_tmp17_ = _data27_->dialog;
	if (_tmp17_ != NULL) {
		GtkDialog* _tmp18_ = NULL;
		GtkDialog* _tmp19_ = NULL;
		_tmp18_ = _data27_->dialog;
		g_signal_connect_data (_tmp18_, "response", (GCallback) ____lambda84__gtk_dialog_response, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
		_tmp19_ = _data27_->dialog;
		gtk_widget_show ((GtkWidget*) _tmp19_);
		_g_object_unref0 (contact);
		_g_object_unref0 (persona);
		block27_data_unref (_data27_);
		_data27_ = NULL;
		return;
	}
	_tmp20_ = contacts_app_app;
	_tmp21_ = contact;
	contacts_app_show_contact (_tmp20_, _tmp21_);
	_g_object_unref0 (contact);
	_g_object_unref0 (persona);
	block27_data_unref (_data27_);
	_data27_ = NULL;
	return;
}


static void _____lambda83__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	____lambda83_ ((ContactsContactPane*) self, source_object, res);
	g_object_unref (self);
}


void contacts_contact_pane_create_contact (ContactsContactPane* self) {
	GHashTable* details = NULL;
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	ContactsContactEditor* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	ContactsContactEditor* _tmp12_ = NULL;
	gboolean _tmp13_ = FALSE;
	GHashTable* _tmp44_ = NULL;
	guint _tmp45_ = 0U;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, __vala_GValue_free0_);
	details = _tmp2_;
	_tmp3_ = self->priv->editor;
	_tmp4_ = contacts_contact_editor_name_changed (_tmp3_);
	if (_tmp4_) {
		GValue v = {0};
		ContactsContactEditor* _tmp5_ = NULL;
		GValue _tmp6_ = {0};
		GHashTable* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		GValue _tmp9_ = {0};
		GValue _tmp10_ = {0};
		GValue* _tmp11_ = NULL;
		_tmp5_ = self->priv->editor;
		contacts_contact_editor_get_full_name_value (_tmp5_, &_tmp6_);
		v = _tmp6_;
		_tmp7_ = details;
		_tmp8_ = g_strdup ("full-name");
		_tmp9_ = v;
		_tmp10_ = _tmp9_;
		_tmp11_ = __g_value_dup0 (&_tmp10_);
		g_hash_table_insert (_tmp7_, _tmp8_, _tmp11_);
		G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
	}
	_tmp12_ = self->priv->editor;
	_tmp13_ = contacts_contact_editor_avatar_changed (_tmp12_);
	if (_tmp13_) {
		GValue v = {0};
		ContactsContactEditor* _tmp14_ = NULL;
		GValue _tmp15_ = {0};
		GHashTable* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		GValue _tmp18_ = {0};
		GValue _tmp19_ = {0};
		GValue* _tmp20_ = NULL;
		_tmp14_ = self->priv->editor;
		contacts_contact_editor_get_avatar_value (_tmp14_, &_tmp15_);
		v = _tmp15_;
		_tmp16_ = details;
		_tmp17_ = g_strdup ("avatar");
		_tmp18_ = v;
		_tmp19_ = _tmp18_;
		_tmp20_ = __g_value_dup0 (&_tmp19_);
		g_hash_table_insert (_tmp16_, _tmp17_, _tmp20_);
		G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
	}
	{
		GeeIterator* _prop_it = NULL;
		ContactsContactEditor* _tmp21_ = NULL;
		GeeHashMap* _tmp22_ = NULL;
		GeeHashMap* _tmp23_ = NULL;
		GeeSet* _tmp24_ = NULL;
		GeeSet* _tmp25_ = NULL;
		GeeSet* _tmp26_ = NULL;
		GeeIterator* _tmp27_ = NULL;
		GeeIterator* _tmp28_ = NULL;
		_tmp21_ = self->priv->editor;
		_tmp22_ = contacts_contact_editor_properties_changed (_tmp21_);
		_tmp23_ = _tmp22_;
		_tmp24_ = gee_abstract_map_get_entries ((GeeMap*) _tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = _tmp25_;
		_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
		_tmp28_ = _tmp27_;
		_g_object_unref0 (_tmp26_);
		_g_object_unref0 (_tmp23_);
		_prop_it = _tmp28_;
		while (TRUE) {
			GeeIterator* _tmp29_ = NULL;
			gboolean _tmp30_ = FALSE;
			GeeMapEntry* prop = NULL;
			GeeIterator* _tmp31_ = NULL;
			gpointer _tmp32_ = NULL;
			GHashTable* _tmp33_ = NULL;
			GeeMapEntry* _tmp34_ = NULL;
			gconstpointer _tmp35_ = NULL;
			const gchar* _tmp36_ = NULL;
			gchar* _tmp37_ = NULL;
			GeeMapEntry* _tmp38_ = NULL;
			gconstpointer _tmp39_ = NULL;
			ContactsContactEditorPropertyData* _tmp40_ = NULL;
			GValue _tmp41_ = {0};
			GValue _tmp42_ = {0};
			GValue* _tmp43_ = NULL;
			_tmp29_ = _prop_it;
			_tmp30_ = gee_iterator_next (_tmp29_);
			if (!_tmp30_) {
				break;
			}
			_tmp31_ = _prop_it;
			_tmp32_ = gee_iterator_get (_tmp31_);
			prop = (GeeMapEntry*) _tmp32_;
			_tmp33_ = details;
			_tmp34_ = prop;
			_tmp35_ = gee_map_entry_get_key (_tmp34_);
			_tmp36_ = _tmp35_;
			_tmp37_ = g_strdup ((const gchar*) _tmp36_);
			_tmp38_ = prop;
			_tmp39_ = gee_map_entry_get_value (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = (*((ContactsContactEditorPropertyData*) _tmp40_)).value;
			_tmp42_ = _tmp41_;
			_tmp43_ = __g_value_dup0 (&_tmp42_);
			g_hash_table_insert (_tmp33_, _tmp37_, _tmp43_);
			_g_object_unref0 (prop);
		}
		_g_object_unref0 (_prop_it);
	}
	_tmp44_ = details;
	_tmp45_ = g_hash_table_size (_tmp44_);
	if (_tmp45_ == ((guint) 0)) {
		Block25Data* _data25_;
		GtkWidget* _tmp46_ = NULL;
		const gchar* _tmp47_ = NULL;
		GtkMessageDialog* _tmp48_ = NULL;
		GtkDialog* _tmp49_ = NULL;
		GtkDialog* _tmp50_ = NULL;
		_data25_ = g_slice_new0 (Block25Data);
		_data25_->_ref_count_ = 1;
		_data25_->self = g_object_ref (self);
		_tmp46_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp47_ = _ ("You need to enter some data");
		_tmp48_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp46_, CONTACTS_TYPE_WINDOW) ? ((ContactsWindow*) _tmp46_) : NULL), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", _tmp47_);
		g_object_ref_sink (_tmp48_);
		_data25_->dialog = (GtkDialog*) _tmp48_;
		_tmp49_ = _data25_->dialog;
		gtk_widget_show ((GtkWidget*) _tmp49_);
		_tmp50_ = _data25_->dialog;
		g_signal_connect_data (_tmp50_, "response", (GCallback) ____lambda81__gtk_dialog_response, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
		block25_data_unref (_data25_);
		_data25_ = NULL;
	} else {
		ContactsApp* _tmp51_ = NULL;
		ContactsStore* _tmp52_ = NULL;
		FolksIndividualAggregator* _tmp53_ = NULL;
		FolksIndividualAggregator* _tmp54_ = NULL;
		FolksPersonaStore* _tmp55_ = NULL;
		FolksPersonaStore* _tmp56_ = NULL;
		_tmp51_ = contacts_app_app;
		_tmp52_ = _tmp51_->contacts_store;
		_tmp53_ = contacts_store_get_aggregator (_tmp52_);
		_tmp54_ = _tmp53_;
		_tmp55_ = folks_individual_aggregator_get_primary_store (_tmp54_);
		_tmp56_ = _tmp55_;
		if (_tmp56_ == NULL) {
			Block26Data* _data26_;
			GtkWidget* _tmp57_ = NULL;
			const gchar* _tmp58_ = NULL;
			GtkMessageDialog* _tmp59_ = NULL;
			GtkDialog* _tmp60_ = NULL;
			GtkDialog* _tmp61_ = NULL;
			_data26_ = g_slice_new0 (Block26Data);
			_data26_->_ref_count_ = 1;
			_data26_->self = g_object_ref (self);
			_tmp57_ = gtk_widget_get_toplevel ((GtkWidget*) self);
			_tmp58_ = _ ("No primary addressbook configured");
			_tmp59_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, CONTACTS_TYPE_WINDOW) ? ((ContactsWindow*) _tmp57_) : NULL), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", _tmp58_);
			g_object_ref_sink (_tmp59_);
			_data26_->dialog = (GtkDialog*) _tmp59_;
			_tmp60_ = _data26_->dialog;
			gtk_widget_show ((GtkWidget*) _tmp60_);
			_tmp61_ = _data26_->dialog;
			g_signal_connect_data (_tmp61_, "response", (GCallback) _____lambda82__gtk_dialog_response, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
			block26_data_unref (_data26_);
			_data26_ = NULL;
		} else {
			ContactsApp* _tmp62_ = NULL;
			ContactsStore* _tmp63_ = NULL;
			FolksIndividualAggregator* _tmp64_ = NULL;
			FolksIndividualAggregator* _tmp65_ = NULL;
			FolksPersonaStore* _tmp66_ = NULL;
			FolksPersonaStore* _tmp67_ = NULL;
			GHashTable* _tmp68_ = NULL;
			_tmp62_ = contacts_app_app;
			_tmp63_ = _tmp62_->contacts_store;
			_tmp64_ = contacts_store_get_aggregator (_tmp63_);
			_tmp65_ = _tmp64_;
			_tmp66_ = folks_individual_aggregator_get_primary_store (_tmp65_);
			_tmp67_ = _tmp66_;
			_tmp68_ = details;
			contacts_contact_create_primary_persona_for_details (_tmp67_, _tmp68_, _____lambda83__gasync_ready_callback, g_object_ref (self));
		}
	}
	contacts_contact_pane_set_edit_mode (self, FALSE, TRUE);
	_g_hash_table_unref0 (details);
}


ContactsContactPane* contacts_contact_pane_construct (GType object_type) {
	ContactsContactPane * self = NULL;
	self = (ContactsContactPane*) g_object_new (object_type, NULL);
	return self;
}


ContactsContactPane* contacts_contact_pane_new (void) {
	return contacts_contact_pane_construct (CONTACTS_TYPE_CONTACT_PANE);
}


ContactsStore* contacts_contact_pane_get_store (ContactsContactPane* self) {
	ContactsStore* result;
	ContactsStore* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_store;
	result = _tmp0_;
	return result;
}


static void _contacts_contact_pane_update_sheet_contacts_store_quiescent (ContactsStore* _sender, gpointer self) {
	contacts_contact_pane_update_sheet ((ContactsContactPane*) self);
}


void contacts_contact_pane_set_store (ContactsContactPane* self, ContactsStore* value) {
	ContactsStore* _tmp0_ = NULL;
	ContactsStore* _tmp1_ = NULL;
	ContactsStore* _tmp2_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_store);
	self->priv->_store = _tmp1_;
	_tmp2_ = value;
	if (_tmp2_ != NULL) {
		ContactsStore* _tmp3_ = NULL;
		_tmp3_ = self->priv->_store;
		g_signal_connect_object (_tmp3_, "quiescent", (GCallback) _contacts_contact_pane_update_sheet_contacts_store_quiescent, self, 0);
	}
	g_object_notify ((GObject *) self, "store");
}


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_linked_accounts_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	contacts_contact_pane_linked_accounts ((ContactsContactPane*) self);
}


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


static GObject * contacts_contact_pane_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	ContactsContactPane * self;
	GSimpleActionGroup* _tmp0_ = NULL;
	GSimpleActionGroup* _tmp1_ = NULL;
	GtkScrolledWindow* main_sw = NULL;
	GtkScrolledWindow* _tmp2_ = NULL;
	GtkScrolledWindow* _tmp3_ = NULL;
	GtkScrolledWindow* _tmp4_ = NULL;
	GtkScrolledWindow* _tmp5_ = NULL;
	GtkScrolledWindow* _tmp6_ = NULL;
	Center* hcenter = NULL;
	Center* _tmp7_ = NULL;
	Center* _tmp8_ = NULL;
	Center* _tmp9_ = NULL;
	ContactsContactSheet* _tmp10_ = NULL;
	Center* _tmp11_ = NULL;
	ContactsContactSheet* _tmp12_ = NULL;
	ContactsContactSheet* _tmp13_ = NULL;
	ContactsContactSheet* _tmp14_ = NULL;
	ContactsContactSheet* _tmp15_ = NULL;
	ContactsContactSheet* _tmp16_ = NULL;
	GtkScrolledWindow* _tmp17_ = NULL;
	Center* _tmp18_ = NULL;
	ContactsContactSheet* _tmp19_ = NULL;
	GtkScrolledWindow* _tmp20_ = NULL;
	GtkAdjustment* _tmp21_ = NULL;
	GtkScrolledWindow* _tmp22_ = NULL;
	GtkWidget* _tmp23_ = NULL;
	GtkStyleContext* _tmp24_ = NULL;
	GtkScrolledWindow* _tmp25_ = NULL;
	GtkWidget* _tmp26_ = NULL;
	GtkStyleContext* _tmp27_ = NULL;
	GtkScrolledWindow* _tmp28_ = NULL;
	GtkScrolledWindow* _tmp29_ = NULL;
	GSimpleActionGroup* _tmp30_ = NULL;
	ContactsContactEditor* _tmp31_ = NULL;
	ContactsContactEditor* _tmp32_ = NULL;
	GtkButton* _tmp33_ = NULL;
	ContactsContactEditor* _tmp34_ = NULL;
	GtkButton* _tmp35_ = NULL;
	ContactsContactEditor* _tmp36_ = NULL;
	GSimpleAction* birthday_action = NULL;
	GSimpleActionGroup* _tmp37_ = NULL;
	GAction* _tmp38_ = NULL;
	GSimpleAction* _tmp39_ = NULL;
	ContactsContactEditor* _tmp40_ = NULL;
	GSimpleAction* _tmp41_ = NULL;
	GSimpleAction* nickname_action = NULL;
	GSimpleActionGroup* _tmp42_ = NULL;
	GAction* _tmp43_ = NULL;
	GSimpleAction* _tmp44_ = NULL;
	ContactsContactEditor* _tmp45_ = NULL;
	GSimpleAction* _tmp46_ = NULL;
	GSimpleAction* notes_action = NULL;
	GSimpleActionGroup* _tmp47_ = NULL;
	GAction* _tmp48_ = NULL;
	GSimpleAction* _tmp49_ = NULL;
	ContactsContactEditor* _tmp50_ = NULL;
	GSimpleAction* _tmp51_ = NULL;
	parent_class = G_OBJECT_CLASS (contacts_contact_pane_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_PANE, ContactsContactPane);
	gtk_notebook_set_show_border ((GtkNotebook*) self, FALSE);
	_tmp0_ = g_simple_action_group_new ();
	_g_object_unref0 (self->priv->edit_contact_actions);
	self->priv->edit_contact_actions = _tmp0_;
	_tmp1_ = self->priv->edit_contact_actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp1_, CONTACTS_CONTACT_PANE_action_entries, G_N_ELEMENTS (CONTACTS_CONTACT_PANE_action_entries), self);
	contacts_contact_pane_show_none_selected_view (self);
	_tmp2_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp2_);
	main_sw = _tmp2_;
	_tmp3_ = main_sw;
	gtk_scrolled_window_set_shadow_type (_tmp3_, GTK_SHADOW_NONE);
	_tmp4_ = main_sw;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = main_sw;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp5_, TRUE);
	_tmp6_ = main_sw;
	gtk_scrolled_window_set_policy (_tmp6_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp7_ = center_new ();
	g_object_ref_sink (_tmp7_);
	hcenter = _tmp7_;
	_tmp8_ = hcenter;
	center_set_max_width (_tmp8_, 600);
	_tmp9_ = hcenter;
	center_set_xalign (_tmp9_, 0.0);
	_tmp10_ = contacts_contact_sheet_new ();
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->sheet);
	self->priv->sheet = _tmp10_;
	_tmp11_ = hcenter;
	_tmp12_ = self->priv->sheet;
	gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = self->priv->sheet;
	gtk_widget_set_hexpand ((GtkWidget*) _tmp13_, TRUE);
	_tmp14_ = self->priv->sheet;
	gtk_widget_set_vexpand ((GtkWidget*) _tmp14_, TRUE);
	_tmp15_ = self->priv->sheet;
	g_object_set ((GtkWidget*) _tmp15_, "margin", 36, NULL);
	_tmp16_ = self->priv->sheet;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp16_, 24);
	_tmp17_ = main_sw;
	_tmp18_ = hcenter;
	gtk_container_add ((GtkContainer*) _tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->sheet;
	_tmp20_ = main_sw;
	_tmp21_ = gtk_scrolled_window_get_vadjustment (_tmp20_);
	gtk_container_set_focus_vadjustment ((GtkContainer*) _tmp19_, _tmp21_);
	_tmp22_ = main_sw;
	_tmp23_ = gtk_bin_get_child ((GtkBin*) _tmp22_);
	_tmp24_ = gtk_widget_get_style_context (_tmp23_);
	gtk_style_context_add_class (_tmp24_, "contacts-main-view");
	_tmp25_ = main_sw;
	_tmp26_ = gtk_bin_get_child ((GtkBin*) _tmp25_);
	_tmp27_ = gtk_widget_get_style_context (_tmp26_);
	gtk_style_context_add_class (_tmp27_, "view");
	_tmp28_ = main_sw;
	gtk_widget_show_all ((GtkWidget*) _tmp28_);
	_tmp29_ = main_sw;
	gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp29_, NULL, 1);
	_g_object_unref0 (self->suggestion_grid);
	self->suggestion_grid = NULL;
	self->on_edit_mode = FALSE;
	_tmp30_ = self->priv->edit_contact_actions;
	_tmp31_ = contacts_contact_editor_new (_tmp30_);
	g_object_ref_sink (_tmp31_);
	_g_object_unref0 (self->priv->editor);
	self->priv->editor = _tmp31_;
	_tmp32_ = self->priv->editor;
	_tmp33_ = _tmp32_->linked_button;
	g_signal_connect_object (_tmp33_, "clicked", (GCallback) _contacts_contact_pane_linked_accounts_gtk_button_clicked, self, 0);
	_tmp34_ = self->priv->editor;
	_tmp35_ = _tmp34_->remove_button;
	g_signal_connect_object (_tmp35_, "clicked", (GCallback) _contacts_contact_pane_delete_contact_gtk_button_clicked, self, 0);
	_tmp36_ = self->priv->editor;
	gtk_notebook_insert_page ((GtkNotebook*) self, (GtkWidget*) _tmp36_, NULL, 2);
	_tmp37_ = self->priv->edit_contact_actions;
	_tmp38_ = g_action_map_lookup_action ((GActionMap*) _tmp37_, "add.birthday");
	_tmp39_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp38_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp38_) : NULL);
	birthday_action = _tmp39_;
	_tmp40_ = self->priv->editor;
	_tmp41_ = birthday_action;
	g_object_bind_property_with_closures ((GObject*) _tmp40_, "has-birthday-row", (GObject*) _tmp41_, "enabled", G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp42_ = self->priv->edit_contact_actions;
	_tmp43_ = g_action_map_lookup_action ((GActionMap*) _tmp42_, "add.nickname");
	_tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp43_) : NULL);
	nickname_action = _tmp44_;
	_tmp45_ = self->priv->editor;
	_tmp46_ = nickname_action;
	g_object_bind_property_with_closures ((GObject*) _tmp45_, "has-nickname-row", (GObject*) _tmp46_, "enabled", (G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE) | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp47_ = self->priv->edit_contact_actions;
	_tmp48_ = g_action_map_lookup_action ((GActionMap*) _tmp47_, "add.notes");
	_tmp49_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, g_simple_action_get_type ()) ? ((GSimpleAction*) _tmp48_) : NULL);
	notes_action = _tmp49_;
	_tmp50_ = self->priv->editor;
	_tmp51_ = notes_action;
	g_object_bind_property_with_closures ((GObject*) _tmp50_, "has-notes-row", (GObject*) _tmp51_, "enabled", (G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE) | G_BINDING_INVERT_BOOLEAN, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_g_object_unref0 (notes_action);
	_g_object_unref0 (nickname_action);
	_g_object_unref0 (birthday_action);
	_g_object_unref0 (hcenter);
	_g_object_unref0 (main_sw);
	return obj;
}


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)->get_property = _vala_contacts_contact_pane_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_contacts_contact_pane_set_property;
	G_OBJECT_CLASS (klass)->constructor = contacts_contact_pane_constructor;
	G_OBJECT_CLASS (klass)->finalize = contacts_contact_pane_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONTACTS_CONTACT_PANE_STORE, g_param_spec_object ("store", "store", "store", CONTACTS_TYPE_STORE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	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);
	contacts_contact_pane_set_store (self, NULL);
}


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->_store);
	_g_object_unref0 (self->contact);
	_g_object_unref0 (self->priv->none_selected_view);
	_g_object_unref0 (self->priv->sheet);
	_g_object_unref0 (self->priv->editor);
	_g_object_unref0 (self->priv->edit_contact_actions);
	_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_notebook_get_type (), "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;
}


static void _vala_contacts_contact_pane_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ContactsContactPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_CONTACT_PANE, ContactsContactPane);
	switch (property_id) {
		case CONTACTS_CONTACT_PANE_STORE:
		g_value_set_object (value, contacts_contact_pane_get_store (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_contacts_contact_pane_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ContactsContactPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONTACTS_TYPE_CONTACT_PANE, ContactsContactPane);
	switch (property_id) {
		case CONTACTS_CONTACT_PANE_STORE:
		contacts_contact_pane_set_store (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


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


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



