~ubuntu-branches/ubuntu/trusty/gnome-contacts/trusty

« back to all changes in this revision

Viewing changes to src/contacts-contact-editor.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Jeremy Bicha, Michael Biebl
  • Date: 2013-09-19 18:23:06 UTC
  • mfrom: (1.3.10) (0.3.4 experimental)
  • mto: This revision was merged to the branch mainline in revision 40.
  • Revision ID: package-import@ubuntu.com-20130919182306-rcatwotzg94pr884
Tags: 3.8.3-1
[ Jeremy Bicha ]
* debian/control.in:
  - Drop alternate build-depends on valac-0.18 since it's no longer
    in Debian

[ Michael Biebl ]
* New upstream release.
* Loosen Build-Depends on libgnome-desktop-3-dev, we do not strictly require
  version (>= 3.6.0) which is not yet available in unstable.
* Bump Standards-Version to 3.9.4. No further changes.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* contacts-contact-editor.c generated by valac 0.20.1, the Vala compiler
 
2
 * generated from contacts-contact-editor.vala, do not modify */
 
3
 
 
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
 
5
/*
 
6
 * Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#include <glib.h>
 
23
#include <glib-object.h>
 
24
#include <gtk/gtk.h>
 
25
#include <folks/folks.h>
 
26
#include <stdlib.h>
 
27
#include <string.h>
 
28
#include <gee.h>
 
29
#include <float.h>
 
30
#include <math.h>
 
31
#include <glib/gi18n-lib.h>
 
32
 
 
33
 
 
34
#define CONTACTS_TYPE_ADDRESS_EDITOR (contacts_address_editor_get_type ())
 
35
#define CONTACTS_ADDRESS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditor))
 
36
#define CONTACTS_ADDRESS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditorClass))
 
37
#define CONTACTS_IS_ADDRESS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_ADDRESS_EDITOR))
 
38
#define CONTACTS_IS_ADDRESS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_ADDRESS_EDITOR))
 
39
#define CONTACTS_ADDRESS_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditorClass))
 
40
 
 
41
typedef struct _ContactsAddressEditor ContactsAddressEditor;
 
42
typedef struct _ContactsAddressEditorClass ContactsAddressEditorClass;
 
43
typedef struct _ContactsAddressEditorPrivate ContactsAddressEditorPrivate;
 
44
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 
45
#define _g_free0(var) (var = (g_free (var), NULL))
 
46
 
 
47
#define CONTACTS_TYPE_CONTACT_EDITOR (contacts_contact_editor_get_type ())
 
48
#define CONTACTS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor))
 
49
#define CONTACTS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorClass))
 
50
#define CONTACTS_IS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_EDITOR))
 
51
#define CONTACTS_IS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_EDITOR))
 
52
#define CONTACTS_CONTACT_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorClass))
 
53
 
 
54
typedef struct _ContactsContactEditor ContactsContactEditor;
 
55
typedef struct _ContactsContactEditorClass ContactsContactEditorClass;
 
56
typedef struct _ContactsContactEditorPrivate ContactsContactEditorPrivate;
 
57
 
 
58
#define CONTACTS_TYPE_CONTACT (contacts_contact_get_type ())
 
59
#define CONTACTS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT, ContactsContact))
 
60
#define CONTACTS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT, ContactsContactClass))
 
61
#define CONTACTS_IS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT))
 
62
#define CONTACTS_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT))
 
63
#define CONTACTS_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT, ContactsContactClass))
 
64
 
 
65
typedef struct _ContactsContact ContactsContact;
 
66
typedef struct _ContactsContactClass ContactsContactClass;
 
67
 
 
68
#define CONTACTS_CONTACT_EDITOR_TYPE_FIELD (contacts_contact_editor_field_get_type ())
 
69
 
 
70
#define CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA (contacts_contact_editor_row_data_get_type ())
 
71
typedef struct _ContactsContactEditorRowData ContactsContactEditorRowData;
 
72
typedef struct _ContactsContactEditorField ContactsContactEditorField;
 
73
 
 
74
#define CONTACTS_TYPE_TYPECOMBO (contacts_typecombo_get_type ())
 
75
#define CONTACTS_TYPECOMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_TYPECOMBO, ContactsTypeCombo))
 
76
#define CONTACTS_TYPECOMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_TYPECOMBO, ContactsTypeComboClass))
 
77
#define CONTACTS_IS_TYPECOMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_TYPECOMBO))
 
78
#define CONTACTS_IS_TYPECOMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_TYPECOMBO))
 
79
#define CONTACTS_TYPECOMBO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_TYPECOMBO, ContactsTypeComboClass))
 
80
 
 
81
typedef struct _ContactsTypeCombo ContactsTypeCombo;
 
82
typedef struct _ContactsTypeComboClass ContactsTypeComboClass;
 
83
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
 
84
 
 
85
#define CONTACTS_TYPE_TYPESET (contacts_typeset_get_type ())
 
86
#define CONTACTS_TYPESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_TYPESET, ContactsTypeSet))
 
87
#define CONTACTS_TYPESET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_TYPESET, ContactsTypeSetClass))
 
88
#define CONTACTS_IS_TYPESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_TYPESET))
 
89
#define CONTACTS_IS_TYPESET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_TYPESET))
 
90
#define CONTACTS_TYPESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_TYPESET, ContactsTypeSetClass))
 
91
 
 
92
typedef struct _ContactsTypeSet ContactsTypeSet;
 
93
typedef struct _ContactsTypeSetClass ContactsTypeSetClass;
 
94
typedef struct _Block22Data Block22Data;
 
95
typedef struct _Block23Data Block23Data;
 
96
typedef struct _Block24Data Block24Data;
 
97
typedef struct _Block25Data Block25Data;
 
98
typedef struct _Block26Data Block26Data;
 
99
#define _contacts_contact_editor_field_free0(var) ((var == NULL) ? NULL : (var = (contacts_contact_editor_field_free (var), NULL)))
 
100
#define _contacts_contact_editor_row_data_free0(var) ((var == NULL) ? NULL : (var = (contacts_contact_editor_row_data_free (var), NULL)))
 
101
 
 
102
#define CONTACTS_TYPE_CONTACT_FRAME (contacts_contact_frame_get_type ())
 
103
#define CONTACTS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrame))
 
104
#define CONTACTS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))
 
105
#define CONTACTS_IS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_FRAME))
 
106
#define CONTACTS_IS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_FRAME))
 
107
#define CONTACTS_CONTACT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))
 
108
 
 
109
typedef struct _ContactsContactFrame ContactsContactFrame;
 
110
typedef struct _ContactsContactFrameClass ContactsContactFrameClass;
 
111
typedef struct _Block27Data Block27Data;
 
112
typedef struct _ContactsContactPrivate ContactsContactPrivate;
 
113
 
 
114
#define CONTACTS_TYPE_STORE (contacts_store_get_type ())
 
115
#define CONTACTS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_STORE, ContactsStore))
 
116
#define CONTACTS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_STORE, ContactsStoreClass))
 
117
#define CONTACTS_IS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_STORE))
 
118
#define CONTACTS_IS_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_STORE))
 
119
#define CONTACTS_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_STORE, ContactsStoreClass))
 
120
 
 
121
typedef struct _ContactsStore ContactsStore;
 
122
typedef struct _ContactsStoreClass ContactsStoreClass;
 
123
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
 
124
 
 
125
#define CONTACTS_CONTACT_EDITOR_TYPE_PROPERTY_DATA (contacts_contact_editor_property_data_get_type ())
 
126
typedef struct _ContactsContactEditorPropertyData ContactsContactEditorPropertyData;
 
127
 
 
128
#define CONTACTS_TYPE_FAKE_PERSONA (contacts_fake_persona_get_type ())
 
129
#define CONTACTS_FAKE_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersona))
 
130
#define CONTACTS_FAKE_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersonaClass))
 
131
#define CONTACTS_IS_FAKE_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_FAKE_PERSONA))
 
132
#define CONTACTS_IS_FAKE_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_FAKE_PERSONA))
 
133
#define CONTACTS_FAKE_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_FAKE_PERSONA, ContactsFakePersonaClass))
 
134
 
 
135
typedef struct _ContactsFakePersona ContactsFakePersona;
 
136
typedef struct _ContactsFakePersonaClass ContactsFakePersonaClass;
 
137
 
 
138
struct _ContactsAddressEditor {
 
139
        GtkGrid parent_instance;
 
140
        ContactsAddressEditorPrivate * priv;
 
141
        GtkEntry* entries[7];
 
142
        FolksPostalAddressFieldDetails* details;
 
143
};
 
144
 
 
145
struct _ContactsAddressEditorClass {
 
146
        GtkGridClass parent_class;
 
147
};
 
148
 
 
149
struct _ContactsContactEditor {
 
150
        GtkGrid parent_instance;
 
151
        ContactsContactEditorPrivate * priv;
 
152
};
 
153
 
 
154
struct _ContactsContactEditorClass {
 
155
        GtkGridClass parent_class;
 
156
};
 
157
 
 
158
struct _ContactsContactEditorRowData {
 
159
        FolksAbstractFieldDetails* details;
 
160
};
 
161
 
 
162
struct _ContactsContactEditorField {
 
163
        gboolean changed;
 
164
        GeeHashMap* rows;
 
165
};
 
166
 
 
167
struct _ContactsContactEditorPrivate {
 
168
        ContactsContact* contact;
 
169
        gint last_row;
 
170
        GeeHashMap* writable_personas;
 
171
};
 
172
 
 
173
struct _Block22Data {
 
174
        int _ref_count_;
 
175
        ContactsContactEditor * self;
 
176
        GtkEntry* value_entry;
 
177
        gint row;
 
178
        gchar* value;
 
179
};
 
180
 
 
181
struct _Block23Data {
 
182
        int _ref_count_;
 
183
        ContactsContactEditor * self;
 
184
        GtkEntry* value_entry;
 
185
        gchar* value;
 
186
        gint row;
 
187
};
 
188
 
 
189
struct _Block24Data {
 
190
        int _ref_count_;
 
191
        ContactsContactEditor * self;
 
192
        GtkTextView* value_text;
 
193
        gchar* value;
 
194
        gint row;
 
195
};
 
196
 
 
197
struct _Block25Data {
 
198
        int _ref_count_;
 
199
        ContactsContactEditor * self;
 
200
        gint row;
 
201
};
 
202
 
 
203
struct _Block26Data {
 
204
        int _ref_count_;
 
205
        ContactsContactEditor * self;
 
206
        ContactsAddressEditor* value_address;
 
207
        gint row;
 
208
};
 
209
 
 
210
struct _Block27Data {
 
211
        int _ref_count_;
 
212
        ContactsContactEditor * self;
 
213
        ContactsContactFrame* image_frame;
 
214
        GtkEntry* name_entry;
 
215
        ContactsContact* c;
 
216
};
 
217
 
 
218
struct _ContactsContact {
 
219
        GObject parent_instance;
 
220
        ContactsContactPrivate * priv;
 
221
        ContactsStore* store;
 
222
        gboolean is_main;
 
223
        FolksPresenceType presence_type;
 
224
        gchar* presence_message;
 
225
        gboolean is_phone;
 
226
        FolksIndividual* individual;
 
227
};
 
228
 
 
229
struct _ContactsContactClass {
 
230
        GObjectClass parent_class;
 
231
};
 
232
 
 
233
struct _ContactsContactEditorPropertyData {
 
234
        FolksPersona* persona;
 
235
        GValue value;
 
236
};
 
237
 
 
238
 
 
239
static gpointer contacts_address_editor_parent_class = NULL;
 
240
extern gchar** contacts_contact_postal_element_props;
 
241
extern gint contacts_contact_postal_element_props_length1;
 
242
extern gchar** contacts_contact_postal_element_names;
 
243
extern gint contacts_contact_postal_element_names_length1;
 
244
static gpointer contacts_contact_editor_parent_class = NULL;
 
245
 
 
246
GType contacts_address_editor_get_type (void) G_GNUC_CONST;
 
247
enum  {
 
248
        CONTACTS_ADDRESS_EDITOR_DUMMY_PROPERTY
 
249
};
 
250
ContactsAddressEditor* contacts_address_editor_new (FolksPostalAddressFieldDetails* _details);
 
251
ContactsAddressEditor* contacts_address_editor_construct (GType object_type, FolksPostalAddressFieldDetails* _details);
 
252
static void _____lambda36_ (ContactsAddressEditor* self);
 
253
static void ______lambda36__gtk_editable_changed (GtkEditable* _sender, gpointer self);
 
254
static void contacts_address_editor_real_grab_focus (GtkWidget* base);
 
255
static void contacts_address_editor_finalize (GObject* obj);
 
256
GType contacts_contact_editor_get_type (void) G_GNUC_CONST;
 
257
GType contacts_contact_get_type (void) G_GNUC_CONST;
 
258
static GType contacts_contact_editor_field_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 
259
static GType contacts_contact_editor_row_data_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
 
260
static ContactsContactEditorRowData* contacts_contact_editor_row_data_dup (const ContactsContactEditorRowData* self);
 
261
static void contacts_contact_editor_row_data_free (ContactsContactEditorRowData* self);
 
262
static void contacts_contact_editor_row_data_copy (const ContactsContactEditorRowData* self, ContactsContactEditorRowData* dest);
 
263
static void contacts_contact_editor_row_data_destroy (ContactsContactEditorRowData* self);
 
264
static ContactsContactEditorField* contacts_contact_editor_field_dup (const ContactsContactEditorField* self);
 
265
static void contacts_contact_editor_field_free (ContactsContactEditorField* self);
 
266
static void contacts_contact_editor_field_copy (const ContactsContactEditorField* self, ContactsContactEditorField* dest);
 
267
static void contacts_contact_editor_field_destroy (ContactsContactEditorField* self);
 
268
#define CONTACTS_CONTACT_EDITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditorPrivate))
 
269
enum  {
 
270
        CONTACTS_CONTACT_EDITOR_DUMMY_PROPERTY
 
271
};
 
272
static void contacts_contact_editor_get_value_from_emails (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
273
GType contacts_typecombo_get_type (void) G_GNUC_CONST;
 
274
void contacts_typecombo_update_details (ContactsTypeCombo* self, FolksAbstractFieldDetails* details);
 
275
static void contacts_contact_editor_get_value_from_phones (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
276
static void contacts_contact_editor_get_value_from_urls (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
277
static void contacts_contact_editor_get_value_from_nickname (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
278
static void contacts_contact_editor_get_value_from_birthday (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
279
static void contacts_contact_editor_get_value_from_notes (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
280
static void contacts_contact_editor_get_value_from_addresses (ContactsContactEditor* self, GeeHashMap* rows, GValue* result);
 
281
static void contacts_contact_editor_set_field_changed (ContactsContactEditor* self, gint row);
 
282
static void contacts_contact_editor_remove_row (ContactsContactEditor* self, gint row);
 
283
GType contacts_typeset_get_type (void) G_GNUC_CONST;
 
284
static void contacts_contact_editor_attach_row_with_entry (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksAbstractFieldDetails* details, const gchar* value, const gchar* type);
 
285
static Block22Data* block22_data_ref (Block22Data* _data22_);
 
286
static void block22_data_unref (void * _userdata_);
 
287
ContactsTypeCombo* contacts_typecombo_new (ContactsTypeSet* type_set);
 
288
ContactsTypeCombo* contacts_typecombo_construct (GType object_type, ContactsTypeSet* type_set);
 
289
void contacts_typecombo_set_active (ContactsTypeCombo* self, FolksAbstractFieldDetails* details);
 
290
void contacts_typecombo_set_to (ContactsTypeCombo* self, const gchar* type);
 
291
static void __lambda37_ (Block22Data* _data22_);
 
292
static void ___lambda37__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self);
 
293
static void __lambda38_ (Block22Data* _data22_);
 
294
static void ___lambda38__gtk_editable_changed (GtkEditable* _sender, gpointer self);
 
295
static void __lambda39_ (Block22Data* _data22_);
 
296
static void ___lambda39__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
297
static void __lambda40_ (Block22Data* _data22_);
 
298
static void ___lambda40__gtk_widget_map (GtkWidget* _sender, gpointer self);
 
299
static void contacts_contact_editor_attach_row_with_entry_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row);
 
300
static Block23Data* block23_data_ref (Block23Data* _data23_);
 
301
static void block23_data_unref (void * _userdata_);
 
302
static void __lambda41_ (Block23Data* _data23_);
 
303
static void ___lambda41__gtk_editable_changed (GtkEditable* _sender, gpointer self);
 
304
static void __lambda42_ (Block23Data* _data23_);
 
305
static void ___lambda42__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
306
static void __lambda43_ (Block23Data* _data23_);
 
307
static void ___lambda43__gtk_widget_map (GtkWidget* _sender, gpointer self);
 
308
static void contacts_contact_editor_attach_row_with_text_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row);
 
309
static Block24Data* block24_data_ref (Block24Data* _data24_);
 
310
static void block24_data_unref (void * _userdata_);
 
311
static void __lambda44_ (Block24Data* _data24_);
 
312
static void ___lambda44__gtk_text_buffer_changed (GtkTextBuffer* _sender, gpointer self);
 
313
static void __lambda45_ (Block24Data* _data24_);
 
314
static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
315
static void __lambda46_ (Block24Data* _data24_);
 
316
static void ___lambda46__gtk_widget_map (GtkWidget* _sender, gpointer self);
 
317
static void contacts_contact_editor_attach_row_for_birthday (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, GDateTime* birthday, gint row);
 
318
static Block25Data* block25_data_ref (Block25Data* _data25_);
 
319
static void block25_data_unref (void * _userdata_);
 
320
static void __lambda47_ (Block25Data* _data25_);
 
321
static void ___lambda47__gtk_editable_changed (GtkEditable* _sender, gpointer self);
 
322
static void __lambda48_ (Block25Data* _data25_);
 
323
static void ___lambda48__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self);
 
324
static void __lambda49_ (Block25Data* _data25_);
 
325
static void ___lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
326
static void contacts_contact_editor_attach_row_for_address (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksPostalAddressFieldDetails* details, const gchar* type);
 
327
static Block26Data* block26_data_ref (Block26Data* _data26_);
 
328
static void block26_data_unref (void * _userdata_);
 
329
static void __lambda50_ (Block26Data* _data26_);
 
330
static void ___lambda50__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self);
 
331
static void __lambda51_ (Block26Data* _data26_);
 
332
static void ___lambda51__contacts_address_editor_changed (ContactsAddressEditor* _sender, gpointer self);
 
333
static void __lambda52_ (Block26Data* _data26_);
 
334
static void ___lambda52__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
335
static void __lambda53_ (Block26Data* _data26_);
 
336
static void ___lambda53__gtk_widget_map (GtkWidget* _sender, gpointer self);
 
337
static void contacts_contact_editor_add_edit_row (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, gint* row, gboolean add_empty, const gchar* type);
 
338
ContactsTypeSet* contacts_typeset_get_email (void);
 
339
GeeArrayList* contacts_contact_sort_fields (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GeeCollection* fields);
 
340
ContactsTypeSet* contacts_typeset_get_phone (void);
 
341
gboolean contacts_is_set (const gchar* str);
 
342
ContactsTypeSet* contacts_typeset_get_general (void);
 
343
static void contacts_contact_editor_insert_row_at (ContactsContactEditor* self, gint idx);
 
344
ContactsContactEditor* contacts_contact_editor_new (void);
 
345
ContactsContactEditor* contacts_contact_editor_construct (GType object_type);
 
346
void contacts_contact_editor_update (ContactsContactEditor* self, ContactsContact* c);
 
347
GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
 
348
static Block27Data* block27_data_ref (Block27Data* _data27_);
 
349
static void block27_data_unref (void * _userdata_);
 
350
#define PROFILE_SIZE 128
 
351
ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button);
 
352
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
 
353
static void __lambda54_ (Block27Data* _data27_);
 
354
void contacts_change_avatar (ContactsContact* contact, ContactsContactFrame* image_frame);
 
355
static void ___lambda54__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self);
 
356
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
 
357
static void __lambda69_ (Block27Data* _data27_, GtkWidget* w);
 
358
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
 
359
GType contacts_store_get_type (void) G_GNUC_CONST;
 
360
static void ___lambda69__gtk_callback (GtkWidget* widget, gpointer self);
 
361
const gchar* contacts_contact_get_display_name (ContactsContact* self);
 
362
static void __lambda70_ (Block27Data* _data27_);
 
363
static void ___lambda70__gtk_editable_changed (GtkEditable* _sender, gpointer self);
 
364
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self);
 
365
gchar* contacts_contact_format_persona_store_name_for_contact (FolksPersona* persona);
 
366
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1);
 
367
void contacts_contact_editor_clear (ContactsContactEditor* self);
 
368
GType contacts_contact_editor_property_data_get_type (void) G_GNUC_CONST;
 
369
ContactsContactEditorPropertyData* contacts_contact_editor_property_data_dup (const ContactsContactEditorPropertyData* self);
 
370
void contacts_contact_editor_property_data_free (ContactsContactEditorPropertyData* self);
 
371
void contacts_contact_editor_property_data_copy (const ContactsContactEditorPropertyData* self, ContactsContactEditorPropertyData* dest);
 
372
void contacts_contact_editor_property_data_destroy (ContactsContactEditorPropertyData* self);
 
373
GeeHashMap* contacts_contact_editor_properties_changed (ContactsContactEditor* self);
 
374
gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self);
 
375
void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result);
 
376
void contacts_contact_editor_add_new_row_for_property (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, const gchar* type);
 
377
ContactsFakePersona* contacts_fake_persona_new (ContactsContact* contact);
 
378
ContactsFakePersona* contacts_fake_persona_construct (GType object_type, ContactsContact* contact);
 
379
GType contacts_fake_persona_get_type (void) G_GNUC_CONST;
 
380
static void contacts_contact_editor_finalize (GObject* obj);
 
381
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
382
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
 
383
 
 
384
 
 
385
static gpointer _g_object_ref0 (gpointer self) {
 
386
        return self ? g_object_ref (self) : NULL;
 
387
}
 
388
 
 
389
 
 
390
static void _____lambda36_ (ContactsAddressEditor* self) {
 
391
        g_signal_emit_by_name (self, "changed");
 
392
}
 
393
 
 
394
 
 
395
static void ______lambda36__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
 
396
        _____lambda36_ (self);
 
397
}
 
398
 
 
399
 
 
400
ContactsAddressEditor* contacts_address_editor_construct (GType object_type, FolksPostalAddressFieldDetails* _details) {
 
401
        ContactsAddressEditor * self = NULL;
 
402
        FolksPostalAddressFieldDetails* _tmp0_;
 
403
        FolksPostalAddressFieldDetails* _tmp1_;
 
404
        g_return_val_if_fail (_details != NULL, NULL);
 
405
        self = (ContactsAddressEditor*) g_object_new (object_type, NULL);
 
406
        gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
 
407
        gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
 
408
        _tmp0_ = _details;
 
409
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
410
        _g_object_unref0 (self->details);
 
411
        self->details = _tmp1_;
 
412
        {
 
413
                gint i;
 
414
                i = 0;
 
415
                {
 
416
                        gboolean _tmp2_;
 
417
                        _tmp2_ = TRUE;
 
418
                        while (TRUE) {
 
419
                                gboolean _tmp3_;
 
420
                                gint _tmp5_;
 
421
                                gchar* postal_part = NULL;
 
422
                                FolksPostalAddressFieldDetails* _tmp6_;
 
423
                                gconstpointer _tmp7_;
 
424
                                FolksPostalAddress* _tmp8_;
 
425
                                gchar** _tmp9_;
 
426
                                gint _tmp9__length1;
 
427
                                gint _tmp10_;
 
428
                                const gchar* _tmp11_;
 
429
                                gint _tmp12_;
 
430
                                GtkEntry* _tmp13_;
 
431
                                GtkEntry* _tmp14_;
 
432
                                gint _tmp15_;
 
433
                                GtkEntry* _tmp16_;
 
434
                                gint _tmp17_;
 
435
                                GtkEntry* _tmp18_;
 
436
                                gchar** _tmp19_;
 
437
                                gint _tmp19__length1;
 
438
                                gint _tmp20_;
 
439
                                const gchar* _tmp21_;
 
440
                                const gchar* _tmp22_;
 
441
                                gint _tmp26_;
 
442
                                GtkEntry* _tmp27_;
 
443
                                GtkStyleContext* _tmp28_ = NULL;
 
444
                                gint _tmp29_;
 
445
                                GtkEntry* _tmp30_;
 
446
                                GtkStyleContext* _tmp31_ = NULL;
 
447
                                gint _tmp32_;
 
448
                                GtkEntry* _tmp33_;
 
449
                                gint _tmp34_;
 
450
                                GtkEntry* _tmp35_;
 
451
                                _tmp3_ = _tmp2_;
 
452
                                if (!_tmp3_) {
 
453
                                        gint _tmp4_;
 
454
                                        _tmp4_ = i;
 
455
                                        i = _tmp4_ + 1;
 
456
                                }
 
457
                                _tmp2_ = FALSE;
 
458
                                _tmp5_ = i;
 
459
                                if (!(_tmp5_ < 7)) {
 
460
                                        break;
 
461
                                }
 
462
                                _tmp6_ = self->details;
 
463
                                _tmp7_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp6_);
 
464
                                _tmp8_ = _tmp7_;
 
465
                                _tmp9_ = contacts_contact_postal_element_props;
 
466
                                _tmp9__length1 = contacts_contact_postal_element_props_length1;
 
467
                                _tmp10_ = i;
 
468
                                _tmp11_ = _tmp9_[_tmp10_];
 
469
                                g_object_get ((GObject*) ((FolksPostalAddress*) _tmp8_), _tmp11_, &postal_part, NULL);
 
470
                                _tmp12_ = i;
 
471
                                _tmp13_ = (GtkEntry*) gtk_entry_new ();
 
472
                                g_object_ref_sink (_tmp13_);
 
473
                                _g_object_unref0 (self->entries[_tmp12_]);
 
474
                                self->entries[_tmp12_] = _tmp13_;
 
475
                                _tmp14_ = self->entries[_tmp12_];
 
476
                                _tmp15_ = i;
 
477
                                _tmp16_ = self->entries[_tmp15_];
 
478
                                gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
 
479
                                _tmp17_ = i;
 
480
                                _tmp18_ = self->entries[_tmp17_];
 
481
                                _tmp19_ = contacts_contact_postal_element_names;
 
482
                                _tmp19__length1 = contacts_contact_postal_element_names_length1;
 
483
                                _tmp20_ = i;
 
484
                                _tmp21_ = _tmp19_[_tmp20_];
 
485
                                g_object_set ((GObject*) _tmp18_, "placeholder-text", _tmp21_, NULL);
 
486
                                _tmp22_ = postal_part;
 
487
                                if (_tmp22_ != NULL) {
 
488
                                        gint _tmp23_;
 
489
                                        GtkEntry* _tmp24_;
 
490
                                        const gchar* _tmp25_;
 
491
                                        _tmp23_ = i;
 
492
                                        _tmp24_ = self->entries[_tmp23_];
 
493
                                        _tmp25_ = postal_part;
 
494
                                        gtk_entry_set_text (_tmp24_, _tmp25_);
 
495
                                }
 
496
                                _tmp26_ = i;
 
497
                                _tmp27_ = self->entries[_tmp26_];
 
498
                                _tmp28_ = gtk_widget_get_style_context ((GtkWidget*) _tmp27_);
 
499
                                gtk_style_context_add_class (_tmp28_, "contacts-entry");
 
500
                                _tmp29_ = i;
 
501
                                _tmp30_ = self->entries[_tmp29_];
 
502
                                _tmp31_ = gtk_widget_get_style_context ((GtkWidget*) _tmp30_);
 
503
                                gtk_style_context_add_class (_tmp31_, "contacts-postal-entry");
 
504
                                _tmp32_ = i;
 
505
                                _tmp33_ = self->entries[_tmp32_];
 
506
                                gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp33_);
 
507
                                _tmp34_ = i;
 
508
                                _tmp35_ = self->entries[_tmp34_];
 
509
                                g_signal_connect_object ((GtkEditable*) _tmp35_, "changed", (GCallback) ______lambda36__gtk_editable_changed, self, 0);
 
510
                                _g_free0 (postal_part);
 
511
                        }
 
512
                }
 
513
        }
 
514
        return self;
 
515
}
 
516
 
 
517
 
 
518
ContactsAddressEditor* contacts_address_editor_new (FolksPostalAddressFieldDetails* _details) {
 
519
        return contacts_address_editor_construct (CONTACTS_TYPE_ADDRESS_EDITOR, _details);
 
520
}
 
521
 
 
522
 
 
523
static void contacts_address_editor_real_grab_focus (GtkWidget* base) {
 
524
        ContactsAddressEditor * self;
 
525
        GtkEntry* _tmp0_;
 
526
        self = (ContactsAddressEditor*) base;
 
527
        _tmp0_ = self->entries[0];
 
528
        gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
 
529
}
 
530
 
 
531
 
 
532
static void contacts_address_editor_class_init (ContactsAddressEditorClass * klass) {
 
533
        contacts_address_editor_parent_class = g_type_class_peek_parent (klass);
 
534
        GTK_WIDGET_CLASS (klass)->grab_focus = contacts_address_editor_real_grab_focus;
 
535
        G_OBJECT_CLASS (klass)->finalize = contacts_address_editor_finalize;
 
536
        g_signal_new ("changed", CONTACTS_TYPE_ADDRESS_EDITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
 
537
}
 
538
 
 
539
 
 
540
static void contacts_address_editor_instance_init (ContactsAddressEditor * self) {
 
541
}
 
542
 
 
543
 
 
544
static void contacts_address_editor_finalize (GObject* obj) {
 
545
        ContactsAddressEditor * self;
 
546
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_ADDRESS_EDITOR, ContactsAddressEditor);
 
547
        _vala_array_destroy (self->entries, 7, (GDestroyNotify) g_object_unref);
 
548
        _g_object_unref0 (self->details);
 
549
        G_OBJECT_CLASS (contacts_address_editor_parent_class)->finalize (obj);
 
550
}
 
551
 
 
552
 
 
553
GType contacts_address_editor_get_type (void) {
 
554
        static volatile gsize contacts_address_editor_type_id__volatile = 0;
 
555
        if (g_once_init_enter (&contacts_address_editor_type_id__volatile)) {
 
556
                static const GTypeInfo g_define_type_info = { sizeof (ContactsAddressEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_address_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsAddressEditor), 0, (GInstanceInitFunc) contacts_address_editor_instance_init, NULL };
 
557
                GType contacts_address_editor_type_id;
 
558
                contacts_address_editor_type_id = g_type_register_static (GTK_TYPE_GRID, "ContactsAddressEditor", &g_define_type_info, 0);
 
559
                g_once_init_leave (&contacts_address_editor_type_id__volatile, contacts_address_editor_type_id);
 
560
        }
 
561
        return contacts_address_editor_type_id__volatile;
 
562
}
 
563
 
 
564
 
 
565
static void contacts_contact_editor_get_value_from_emails (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
566
        GeeHashSet* _tmp0_;
 
567
        GeeHashSet* new_details;
 
568
        GeeHashSet* _tmp37_;
 
569
        GType _tmp38_ = 0UL;
 
570
        GValue _tmp39_ = {0};
 
571
        GValue new_value;
 
572
        GeeHashSet* _tmp40_;
 
573
        g_return_if_fail (self != NULL);
 
574
        g_return_if_fail (rows != NULL);
 
575
        _tmp0_ = gee_hash_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
 
576
        new_details = _tmp0_;
 
577
        {
 
578
                GeeHashMap* _tmp1_;
 
579
                GeeSet* _tmp2_;
 
580
                GeeSet* _tmp3_;
 
581
                GeeSet* _tmp4_;
 
582
                GeeIterator* _tmp5_ = NULL;
 
583
                GeeIterator* _tmp6_;
 
584
                GeeIterator* _row_entry_it;
 
585
                _tmp1_ = rows;
 
586
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
587
                _tmp3_ = _tmp2_;
 
588
                _tmp4_ = _tmp3_;
 
589
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
590
                _tmp6_ = _tmp5_;
 
591
                _g_object_unref0 (_tmp4_);
 
592
                _row_entry_it = _tmp6_;
 
593
                while (TRUE) {
 
594
                        GeeIterator* _tmp7_;
 
595
                        gboolean _tmp8_ = FALSE;
 
596
                        GeeIterator* _tmp9_;
 
597
                        gpointer _tmp10_ = NULL;
 
598
                        GeeMapEntry* row_entry;
 
599
                        GeeMapEntry* _tmp11_;
 
600
                        gconstpointer _tmp12_;
 
601
                        gint _tmp13_;
 
602
                        GtkWidget* _tmp14_ = NULL;
 
603
                        ContactsTypeCombo* _tmp15_;
 
604
                        ContactsTypeCombo* combo;
 
605
                        GeeMapEntry* _tmp16_;
 
606
                        gconstpointer _tmp17_;
 
607
                        gint _tmp18_;
 
608
                        GtkWidget* _tmp19_ = NULL;
 
609
                        GtkEntry* _tmp20_;
 
610
                        GtkEntry* entry;
 
611
                        ContactsTypeCombo* _tmp21_;
 
612
                        GeeMapEntry* _tmp22_;
 
613
                        gconstpointer _tmp23_;
 
614
                        ContactsContactEditorRowData* _tmp24_;
 
615
                        FolksAbstractFieldDetails* _tmp25_;
 
616
                        GtkEntry* _tmp26_;
 
617
                        const gchar* _tmp27_ = NULL;
 
618
                        GeeMapEntry* _tmp28_;
 
619
                        gconstpointer _tmp29_;
 
620
                        ContactsContactEditorRowData* _tmp30_;
 
621
                        FolksAbstractFieldDetails* _tmp31_;
 
622
                        GeeMultiMap* _tmp32_;
 
623
                        GeeMultiMap* _tmp33_;
 
624
                        FolksEmailFieldDetails* _tmp34_;
 
625
                        FolksEmailFieldDetails* details;
 
626
                        GeeHashSet* _tmp35_;
 
627
                        FolksEmailFieldDetails* _tmp36_;
 
628
                        _tmp7_ = _row_entry_it;
 
629
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
630
                        if (!_tmp8_) {
 
631
                                break;
 
632
                        }
 
633
                        _tmp9_ = _row_entry_it;
 
634
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
635
                        row_entry = (GeeMapEntry*) _tmp10_;
 
636
                        _tmp11_ = row_entry;
 
637
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
638
                        _tmp13_ = _tmp12_;
 
639
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
 
640
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
 
641
                        combo = _tmp15_;
 
642
                        _tmp16_ = row_entry;
 
643
                        _tmp17_ = gee_map_entry_get_key (_tmp16_);
 
644
                        _tmp18_ = _tmp17_;
 
645
                        _tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
 
646
                        _tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp19_) : NULL);
 
647
                        entry = _tmp20_;
 
648
                        _tmp21_ = combo;
 
649
                        _tmp22_ = row_entry;
 
650
                        _tmp23_ = gee_map_entry_get_value (_tmp22_);
 
651
                        _tmp24_ = _tmp23_;
 
652
                        _tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
 
653
                        contacts_typecombo_update_details (_tmp21_, _tmp25_);
 
654
                        _tmp26_ = entry;
 
655
                        _tmp27_ = gtk_entry_get_text (_tmp26_);
 
656
                        _tmp28_ = row_entry;
 
657
                        _tmp29_ = gee_map_entry_get_value (_tmp28_);
 
658
                        _tmp30_ = _tmp29_;
 
659
                        _tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
 
660
                        _tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
 
661
                        _tmp33_ = _tmp32_;
 
662
                        _tmp34_ = folks_email_field_details_new (_tmp27_, _tmp33_);
 
663
                        details = _tmp34_;
 
664
                        _tmp35_ = new_details;
 
665
                        _tmp36_ = details;
 
666
                        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp36_);
 
667
                        _g_object_unref0 (details);
 
668
                        _g_object_unref0 (entry);
 
669
                        _g_object_unref0 (combo);
 
670
                        _g_object_unref0 (row_entry);
 
671
                }
 
672
                _g_object_unref0 (_row_entry_it);
 
673
        }
 
674
        _tmp37_ = new_details;
 
675
        _tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
 
676
        g_value_init (&_tmp39_, _tmp38_);
 
677
        new_value = _tmp39_;
 
678
        _tmp40_ = new_details;
 
679
        g_value_set_object (&new_value, (GObject*) _tmp40_);
 
680
        *result = new_value;
 
681
        _g_object_unref0 (new_details);
 
682
        return;
 
683
}
 
684
 
 
685
 
 
686
static void contacts_contact_editor_get_value_from_phones (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
687
        GeeHashSet* _tmp0_;
 
688
        GeeHashSet* new_details;
 
689
        GeeHashSet* _tmp37_;
 
690
        GType _tmp38_ = 0UL;
 
691
        GValue _tmp39_ = {0};
 
692
        GValue new_value;
 
693
        GeeHashSet* _tmp40_;
 
694
        g_return_if_fail (self != NULL);
 
695
        g_return_if_fail (rows != NULL);
 
696
        _tmp0_ = gee_hash_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
 
697
        new_details = _tmp0_;
 
698
        {
 
699
                GeeHashMap* _tmp1_;
 
700
                GeeSet* _tmp2_;
 
701
                GeeSet* _tmp3_;
 
702
                GeeSet* _tmp4_;
 
703
                GeeIterator* _tmp5_ = NULL;
 
704
                GeeIterator* _tmp6_;
 
705
                GeeIterator* _row_entry_it;
 
706
                _tmp1_ = rows;
 
707
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
708
                _tmp3_ = _tmp2_;
 
709
                _tmp4_ = _tmp3_;
 
710
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
711
                _tmp6_ = _tmp5_;
 
712
                _g_object_unref0 (_tmp4_);
 
713
                _row_entry_it = _tmp6_;
 
714
                while (TRUE) {
 
715
                        GeeIterator* _tmp7_;
 
716
                        gboolean _tmp8_ = FALSE;
 
717
                        GeeIterator* _tmp9_;
 
718
                        gpointer _tmp10_ = NULL;
 
719
                        GeeMapEntry* row_entry;
 
720
                        GeeMapEntry* _tmp11_;
 
721
                        gconstpointer _tmp12_;
 
722
                        gint _tmp13_;
 
723
                        GtkWidget* _tmp14_ = NULL;
 
724
                        ContactsTypeCombo* _tmp15_;
 
725
                        ContactsTypeCombo* combo;
 
726
                        GeeMapEntry* _tmp16_;
 
727
                        gconstpointer _tmp17_;
 
728
                        gint _tmp18_;
 
729
                        GtkWidget* _tmp19_ = NULL;
 
730
                        GtkEntry* _tmp20_;
 
731
                        GtkEntry* entry;
 
732
                        ContactsTypeCombo* _tmp21_;
 
733
                        GeeMapEntry* _tmp22_;
 
734
                        gconstpointer _tmp23_;
 
735
                        ContactsContactEditorRowData* _tmp24_;
 
736
                        FolksAbstractFieldDetails* _tmp25_;
 
737
                        GtkEntry* _tmp26_;
 
738
                        const gchar* _tmp27_ = NULL;
 
739
                        GeeMapEntry* _tmp28_;
 
740
                        gconstpointer _tmp29_;
 
741
                        ContactsContactEditorRowData* _tmp30_;
 
742
                        FolksAbstractFieldDetails* _tmp31_;
 
743
                        GeeMultiMap* _tmp32_;
 
744
                        GeeMultiMap* _tmp33_;
 
745
                        FolksPhoneFieldDetails* _tmp34_;
 
746
                        FolksPhoneFieldDetails* details;
 
747
                        GeeHashSet* _tmp35_;
 
748
                        FolksPhoneFieldDetails* _tmp36_;
 
749
                        _tmp7_ = _row_entry_it;
 
750
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
751
                        if (!_tmp8_) {
 
752
                                break;
 
753
                        }
 
754
                        _tmp9_ = _row_entry_it;
 
755
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
756
                        row_entry = (GeeMapEntry*) _tmp10_;
 
757
                        _tmp11_ = row_entry;
 
758
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
759
                        _tmp13_ = _tmp12_;
 
760
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
 
761
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
 
762
                        combo = _tmp15_;
 
763
                        _tmp16_ = row_entry;
 
764
                        _tmp17_ = gee_map_entry_get_key (_tmp16_);
 
765
                        _tmp18_ = _tmp17_;
 
766
                        _tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
 
767
                        _tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp19_) : NULL);
 
768
                        entry = _tmp20_;
 
769
                        _tmp21_ = combo;
 
770
                        _tmp22_ = row_entry;
 
771
                        _tmp23_ = gee_map_entry_get_value (_tmp22_);
 
772
                        _tmp24_ = _tmp23_;
 
773
                        _tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
 
774
                        contacts_typecombo_update_details (_tmp21_, _tmp25_);
 
775
                        _tmp26_ = entry;
 
776
                        _tmp27_ = gtk_entry_get_text (_tmp26_);
 
777
                        _tmp28_ = row_entry;
 
778
                        _tmp29_ = gee_map_entry_get_value (_tmp28_);
 
779
                        _tmp30_ = _tmp29_;
 
780
                        _tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
 
781
                        _tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
 
782
                        _tmp33_ = _tmp32_;
 
783
                        _tmp34_ = folks_phone_field_details_new (_tmp27_, _tmp33_);
 
784
                        details = _tmp34_;
 
785
                        _tmp35_ = new_details;
 
786
                        _tmp36_ = details;
 
787
                        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp36_);
 
788
                        _g_object_unref0 (details);
 
789
                        _g_object_unref0 (entry);
 
790
                        _g_object_unref0 (combo);
 
791
                        _g_object_unref0 (row_entry);
 
792
                }
 
793
                _g_object_unref0 (_row_entry_it);
 
794
        }
 
795
        _tmp37_ = new_details;
 
796
        _tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
 
797
        g_value_init (&_tmp39_, _tmp38_);
 
798
        new_value = _tmp39_;
 
799
        _tmp40_ = new_details;
 
800
        g_value_set_object (&new_value, (GObject*) _tmp40_);
 
801
        *result = new_value;
 
802
        _g_object_unref0 (new_details);
 
803
        return;
 
804
}
 
805
 
 
806
 
 
807
static void contacts_contact_editor_get_value_from_urls (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
808
        GeeHashSet* _tmp0_;
 
809
        GeeHashSet* new_details;
 
810
        GeeHashSet* _tmp27_;
 
811
        GType _tmp28_ = 0UL;
 
812
        GValue _tmp29_ = {0};
 
813
        GValue new_value;
 
814
        GeeHashSet* _tmp30_;
 
815
        g_return_if_fail (self != NULL);
 
816
        g_return_if_fail (rows != NULL);
 
817
        _tmp0_ = gee_hash_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
 
818
        new_details = _tmp0_;
 
819
        {
 
820
                GeeHashMap* _tmp1_;
 
821
                GeeSet* _tmp2_;
 
822
                GeeSet* _tmp3_;
 
823
                GeeSet* _tmp4_;
 
824
                GeeIterator* _tmp5_ = NULL;
 
825
                GeeIterator* _tmp6_;
 
826
                GeeIterator* _row_entry_it;
 
827
                _tmp1_ = rows;
 
828
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
829
                _tmp3_ = _tmp2_;
 
830
                _tmp4_ = _tmp3_;
 
831
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
832
                _tmp6_ = _tmp5_;
 
833
                _g_object_unref0 (_tmp4_);
 
834
                _row_entry_it = _tmp6_;
 
835
                while (TRUE) {
 
836
                        GeeIterator* _tmp7_;
 
837
                        gboolean _tmp8_ = FALSE;
 
838
                        GeeIterator* _tmp9_;
 
839
                        gpointer _tmp10_ = NULL;
 
840
                        GeeMapEntry* row_entry;
 
841
                        GeeMapEntry* _tmp11_;
 
842
                        gconstpointer _tmp12_;
 
843
                        gint _tmp13_;
 
844
                        GtkWidget* _tmp14_ = NULL;
 
845
                        GtkEntry* _tmp15_;
 
846
                        GtkEntry* entry;
 
847
                        GtkEntry* _tmp16_;
 
848
                        const gchar* _tmp17_ = NULL;
 
849
                        GeeMapEntry* _tmp18_;
 
850
                        gconstpointer _tmp19_;
 
851
                        ContactsContactEditorRowData* _tmp20_;
 
852
                        FolksAbstractFieldDetails* _tmp21_;
 
853
                        GeeMultiMap* _tmp22_;
 
854
                        GeeMultiMap* _tmp23_;
 
855
                        FolksUrlFieldDetails* _tmp24_;
 
856
                        FolksUrlFieldDetails* details;
 
857
                        GeeHashSet* _tmp25_;
 
858
                        FolksUrlFieldDetails* _tmp26_;
 
859
                        _tmp7_ = _row_entry_it;
 
860
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
861
                        if (!_tmp8_) {
 
862
                                break;
 
863
                        }
 
864
                        _tmp9_ = _row_entry_it;
 
865
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
866
                        row_entry = (GeeMapEntry*) _tmp10_;
 
867
                        _tmp11_ = row_entry;
 
868
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
869
                        _tmp13_ = _tmp12_;
 
870
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
 
871
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp14_) : NULL);
 
872
                        entry = _tmp15_;
 
873
                        _tmp16_ = entry;
 
874
                        _tmp17_ = gtk_entry_get_text (_tmp16_);
 
875
                        _tmp18_ = row_entry;
 
876
                        _tmp19_ = gee_map_entry_get_value (_tmp18_);
 
877
                        _tmp20_ = _tmp19_;
 
878
                        _tmp21_ = (*((ContactsContactEditorRowData*) _tmp20_)).details;
 
879
                        _tmp22_ = folks_abstract_field_details_get_parameters (_tmp21_);
 
880
                        _tmp23_ = _tmp22_;
 
881
                        _tmp24_ = folks_url_field_details_new (_tmp17_, _tmp23_);
 
882
                        details = _tmp24_;
 
883
                        _tmp25_ = new_details;
 
884
                        _tmp26_ = details;
 
885
                        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
 
886
                        _g_object_unref0 (details);
 
887
                        _g_object_unref0 (entry);
 
888
                        _g_object_unref0 (row_entry);
 
889
                }
 
890
                _g_object_unref0 (_row_entry_it);
 
891
        }
 
892
        _tmp27_ = new_details;
 
893
        _tmp28_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp27_);
 
894
        g_value_init (&_tmp29_, _tmp28_);
 
895
        new_value = _tmp29_;
 
896
        _tmp30_ = new_details;
 
897
        g_value_set_object (&new_value, (GObject*) _tmp30_);
 
898
        *result = new_value;
 
899
        _g_object_unref0 (new_details);
 
900
        return;
 
901
}
 
902
 
 
903
 
 
904
static void contacts_contact_editor_get_value_from_nickname (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
905
        GValue _tmp0_ = {0};
 
906
        GValue new_value;
 
907
        g_return_if_fail (self != NULL);
 
908
        g_return_if_fail (rows != NULL);
 
909
        g_value_init (&_tmp0_, G_TYPE_STRING);
 
910
        new_value = _tmp0_;
 
911
        {
 
912
                GeeHashMap* _tmp1_;
 
913
                GeeSet* _tmp2_;
 
914
                GeeSet* _tmp3_;
 
915
                GeeSet* _tmp4_;
 
916
                GeeIterator* _tmp5_ = NULL;
 
917
                GeeIterator* _tmp6_;
 
918
                GeeIterator* _row_entry_it;
 
919
                _tmp1_ = rows;
 
920
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
921
                _tmp3_ = _tmp2_;
 
922
                _tmp4_ = _tmp3_;
 
923
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
924
                _tmp6_ = _tmp5_;
 
925
                _g_object_unref0 (_tmp4_);
 
926
                _row_entry_it = _tmp6_;
 
927
                while (TRUE) {
 
928
                        GeeIterator* _tmp7_;
 
929
                        gboolean _tmp8_ = FALSE;
 
930
                        GeeIterator* _tmp9_;
 
931
                        gpointer _tmp10_ = NULL;
 
932
                        GeeMapEntry* row_entry;
 
933
                        GeeMapEntry* _tmp11_;
 
934
                        gconstpointer _tmp12_;
 
935
                        gint _tmp13_;
 
936
                        GtkWidget* _tmp14_ = NULL;
 
937
                        GtkEntry* _tmp15_;
 
938
                        GtkEntry* entry;
 
939
                        GtkEntry* _tmp16_;
 
940
                        const gchar* _tmp17_ = NULL;
 
941
                        _tmp7_ = _row_entry_it;
 
942
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
943
                        if (!_tmp8_) {
 
944
                                break;
 
945
                        }
 
946
                        _tmp9_ = _row_entry_it;
 
947
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
948
                        row_entry = (GeeMapEntry*) _tmp10_;
 
949
                        _tmp11_ = row_entry;
 
950
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
951
                        _tmp13_ = _tmp12_;
 
952
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
 
953
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp14_) : NULL);
 
954
                        entry = _tmp15_;
 
955
                        _tmp16_ = entry;
 
956
                        _tmp17_ = gtk_entry_get_text (_tmp16_);
 
957
                        g_value_set_string (&new_value, _tmp17_);
 
958
                        _g_object_unref0 (entry);
 
959
                        _g_object_unref0 (row_entry);
 
960
                }
 
961
                _g_object_unref0 (_row_entry_it);
 
962
        }
 
963
        *result = new_value;
 
964
        return;
 
965
}
 
966
 
 
967
 
 
968
static void contacts_contact_editor_get_value_from_birthday (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
969
        GValue _tmp0_ = {0};
 
970
        GValue new_value;
 
971
        g_return_if_fail (self != NULL);
 
972
        g_return_if_fail (rows != NULL);
 
973
        g_value_init (&_tmp0_, G_TYPE_DATE_TIME);
 
974
        new_value = _tmp0_;
 
975
        {
 
976
                GeeHashMap* _tmp1_;
 
977
                GeeSet* _tmp2_;
 
978
                GeeSet* _tmp3_;
 
979
                GeeSet* _tmp4_;
 
980
                GeeIterator* _tmp5_ = NULL;
 
981
                GeeIterator* _tmp6_;
 
982
                GeeIterator* _row_entry_it;
 
983
                _tmp1_ = rows;
 
984
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
985
                _tmp3_ = _tmp2_;
 
986
                _tmp4_ = _tmp3_;
 
987
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
988
                _tmp6_ = _tmp5_;
 
989
                _g_object_unref0 (_tmp4_);
 
990
                _row_entry_it = _tmp6_;
 
991
                while (TRUE) {
 
992
                        GeeIterator* _tmp7_;
 
993
                        gboolean _tmp8_ = FALSE;
 
994
                        GeeIterator* _tmp9_;
 
995
                        gpointer _tmp10_ = NULL;
 
996
                        GeeMapEntry* row_entry;
 
997
                        GeeMapEntry* _tmp11_;
 
998
                        gconstpointer _tmp12_;
 
999
                        gint _tmp13_;
 
1000
                        GtkWidget* _tmp14_ = NULL;
 
1001
                        GtkGrid* _tmp15_;
 
1002
                        GtkGrid* box;
 
1003
                        GtkGrid* _tmp16_;
 
1004
                        GtkWidget* _tmp17_ = NULL;
 
1005
                        GtkSpinButton* _tmp18_;
 
1006
                        GtkSpinButton* day_spin;
 
1007
                        GtkGrid* _tmp19_;
 
1008
                        GtkWidget* _tmp20_ = NULL;
 
1009
                        GtkComboBoxText* _tmp21_;
 
1010
                        GtkComboBoxText* combo;
 
1011
                        GtkGrid* _tmp22_;
 
1012
                        gconstpointer _tmp23_ = NULL;
 
1013
                        GtkComboBoxText* _tmp24_;
 
1014
                        gint _tmp25_ = 0;
 
1015
                        GtkSpinButton* _tmp26_;
 
1016
                        gdouble _tmp27_ = 0.0;
 
1017
                        GDateTime* _tmp28_;
 
1018
                        GDateTime* bday;
 
1019
                        GDateTime* _tmp29_;
 
1020
                        GDateTime* _tmp30_ = NULL;
 
1021
                        GDateTime* _tmp31_;
 
1022
                        _tmp7_ = _row_entry_it;
 
1023
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
1024
                        if (!_tmp8_) {
 
1025
                                break;
 
1026
                        }
 
1027
                        _tmp9_ = _row_entry_it;
 
1028
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
1029
                        row_entry = (GeeMapEntry*) _tmp10_;
 
1030
                        _tmp11_ = row_entry;
 
1031
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
1032
                        _tmp13_ = _tmp12_;
 
1033
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
 
1034
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp14_) : NULL);
 
1035
                        box = _tmp15_;
 
1036
                        _tmp16_ = box;
 
1037
                        _tmp17_ = gtk_grid_get_child_at (_tmp16_, 0, 0);
 
1038
                        _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, GTK_TYPE_SPIN_BUTTON) ? ((GtkSpinButton*) _tmp17_) : NULL);
 
1039
                        day_spin = _tmp18_;
 
1040
                        _tmp19_ = box;
 
1041
                        _tmp20_ = gtk_grid_get_child_at (_tmp19_, 1, 0);
 
1042
                        _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GTK_TYPE_COMBO_BOX_TEXT) ? ((GtkComboBoxText*) _tmp20_) : NULL);
 
1043
                        combo = _tmp21_;
 
1044
                        _tmp22_ = box;
 
1045
                        _tmp23_ = g_object_get_data ((GObject*) _tmp22_, "year");
 
1046
                        _tmp24_ = combo;
 
1047
                        _tmp25_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp24_);
 
1048
                        _tmp26_ = day_spin;
 
1049
                        _tmp27_ = gtk_spin_button_get_value (_tmp26_);
 
1050
                        _tmp28_ = g_date_time_new_local ((gint) ((gint) ((gintptr) _tmp23_)), _tmp25_ + 1, (gint) _tmp27_, 0, 0, (gdouble) 0);
 
1051
                        bday = _tmp28_;
 
1052
                        _tmp29_ = bday;
 
1053
                        _tmp30_ = g_date_time_to_utc (_tmp29_);
 
1054
                        _g_date_time_unref0 (bday);
 
1055
                        bday = _tmp30_;
 
1056
                        _tmp31_ = bday;
 
1057
                        g_value_set_boxed (&new_value, _tmp31_);
 
1058
                        _g_date_time_unref0 (bday);
 
1059
                        _g_object_unref0 (combo);
 
1060
                        _g_object_unref0 (day_spin);
 
1061
                        _g_object_unref0 (box);
 
1062
                        _g_object_unref0 (row_entry);
 
1063
                }
 
1064
                _g_object_unref0 (_row_entry_it);
 
1065
        }
 
1066
        *result = new_value;
 
1067
        return;
 
1068
}
 
1069
 
 
1070
 
 
1071
static void contacts_contact_editor_get_value_from_notes (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
1072
        GeeHashSet* _tmp0_;
 
1073
        GeeHashSet* new_details;
 
1074
        GeeHashSet* _tmp38_;
 
1075
        GType _tmp39_ = 0UL;
 
1076
        GValue _tmp40_ = {0};
 
1077
        GValue new_value;
 
1078
        GeeHashSet* _tmp41_;
 
1079
        g_return_if_fail (self != NULL);
 
1080
        g_return_if_fail (rows != NULL);
 
1081
        _tmp0_ = gee_hash_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
 
1082
        new_details = _tmp0_;
 
1083
        {
 
1084
                GeeHashMap* _tmp1_;
 
1085
                GeeSet* _tmp2_;
 
1086
                GeeSet* _tmp3_;
 
1087
                GeeSet* _tmp4_;
 
1088
                GeeIterator* _tmp5_ = NULL;
 
1089
                GeeIterator* _tmp6_;
 
1090
                GeeIterator* _row_entry_it;
 
1091
                _tmp1_ = rows;
 
1092
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
1093
                _tmp3_ = _tmp2_;
 
1094
                _tmp4_ = _tmp3_;
 
1095
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
1096
                _tmp6_ = _tmp5_;
 
1097
                _g_object_unref0 (_tmp4_);
 
1098
                _row_entry_it = _tmp6_;
 
1099
                while (TRUE) {
 
1100
                        GeeIterator* _tmp7_;
 
1101
                        gboolean _tmp8_ = FALSE;
 
1102
                        GeeIterator* _tmp9_;
 
1103
                        gpointer _tmp10_ = NULL;
 
1104
                        GeeMapEntry* row_entry;
 
1105
                        GeeMapEntry* _tmp11_;
 
1106
                        gconstpointer _tmp12_;
 
1107
                        gint _tmp13_;
 
1108
                        GtkWidget* _tmp14_ = NULL;
 
1109
                        GtkWidget* _tmp15_ = NULL;
 
1110
                        GtkTextView* _tmp16_;
 
1111
                        GtkTextView* text;
 
1112
                        GtkTextIter start = {0};
 
1113
                        GtkTextIter end = {0};
 
1114
                        GtkTextView* _tmp17_;
 
1115
                        GtkTextBuffer* _tmp18_ = NULL;
 
1116
                        GtkTextIter _tmp19_ = {0};
 
1117
                        GtkTextView* _tmp20_;
 
1118
                        GtkTextBuffer* _tmp21_ = NULL;
 
1119
                        GtkTextIter _tmp22_ = {0};
 
1120
                        GtkTextView* _tmp23_;
 
1121
                        GtkTextBuffer* _tmp24_ = NULL;
 
1122
                        GtkTextIter _tmp25_;
 
1123
                        GtkTextIter _tmp26_;
 
1124
                        gchar* _tmp27_ = NULL;
 
1125
                        gchar* value;
 
1126
                        const gchar* _tmp28_;
 
1127
                        GeeMapEntry* _tmp29_;
 
1128
                        gconstpointer _tmp30_;
 
1129
                        ContactsContactEditorRowData* _tmp31_;
 
1130
                        FolksAbstractFieldDetails* _tmp32_;
 
1131
                        GeeMultiMap* _tmp33_;
 
1132
                        GeeMultiMap* _tmp34_;
 
1133
                        FolksNoteFieldDetails* _tmp35_;
 
1134
                        FolksNoteFieldDetails* details;
 
1135
                        GeeHashSet* _tmp36_;
 
1136
                        FolksNoteFieldDetails* _tmp37_;
 
1137
                        _tmp7_ = _row_entry_it;
 
1138
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
1139
                        if (!_tmp8_) {
 
1140
                                break;
 
1141
                        }
 
1142
                        _tmp9_ = _row_entry_it;
 
1143
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
1144
                        row_entry = (GeeMapEntry*) _tmp10_;
 
1145
                        _tmp11_ = row_entry;
 
1146
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
1147
                        _tmp13_ = _tmp12_;
 
1148
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp13_));
 
1149
                        _tmp15_ = gtk_bin_get_child (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, GTK_TYPE_BIN) ? ((GtkBin*) _tmp14_) : NULL);
 
1150
                        _tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, GTK_TYPE_TEXT_VIEW) ? ((GtkTextView*) _tmp15_) : NULL);
 
1151
                        text = _tmp16_;
 
1152
                        _tmp17_ = text;
 
1153
                        _tmp18_ = gtk_text_view_get_buffer (_tmp17_);
 
1154
                        gtk_text_buffer_get_start_iter (_tmp18_, &_tmp19_);
 
1155
                        start = _tmp19_;
 
1156
                        _tmp20_ = text;
 
1157
                        _tmp21_ = gtk_text_view_get_buffer (_tmp20_);
 
1158
                        gtk_text_buffer_get_end_iter (_tmp21_, &_tmp22_);
 
1159
                        end = _tmp22_;
 
1160
                        _tmp23_ = text;
 
1161
                        _tmp24_ = gtk_text_view_get_buffer (_tmp23_);
 
1162
                        _tmp25_ = start;
 
1163
                        _tmp26_ = end;
 
1164
                        _tmp27_ = gtk_text_buffer_get_text (_tmp24_, &_tmp25_, &_tmp26_, TRUE);
 
1165
                        value = _tmp27_;
 
1166
                        _tmp28_ = value;
 
1167
                        _tmp29_ = row_entry;
 
1168
                        _tmp30_ = gee_map_entry_get_value (_tmp29_);
 
1169
                        _tmp31_ = _tmp30_;
 
1170
                        _tmp32_ = (*((ContactsContactEditorRowData*) _tmp31_)).details;
 
1171
                        _tmp33_ = folks_abstract_field_details_get_parameters (_tmp32_);
 
1172
                        _tmp34_ = _tmp33_;
 
1173
                        _tmp35_ = folks_note_field_details_new (_tmp28_, _tmp34_, NULL);
 
1174
                        details = _tmp35_;
 
1175
                        _tmp36_ = new_details;
 
1176
                        _tmp37_ = details;
 
1177
                        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp36_, _tmp37_);
 
1178
                        _g_object_unref0 (details);
 
1179
                        _g_free0 (value);
 
1180
                        _g_object_unref0 (text);
 
1181
                        _g_object_unref0 (row_entry);
 
1182
                }
 
1183
                _g_object_unref0 (_row_entry_it);
 
1184
        }
 
1185
        _tmp38_ = new_details;
 
1186
        _tmp39_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp38_);
 
1187
        g_value_init (&_tmp40_, _tmp39_);
 
1188
        new_value = _tmp40_;
 
1189
        _tmp41_ = new_details;
 
1190
        g_value_set_object (&new_value, (GObject*) _tmp41_);
 
1191
        *result = new_value;
 
1192
        _g_object_unref0 (new_details);
 
1193
        return;
 
1194
}
 
1195
 
 
1196
 
 
1197
static void contacts_contact_editor_get_value_from_addresses (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
 
1198
        GeeHashSet* _tmp0_;
 
1199
        GeeHashSet* new_details;
 
1200
        GeeHashSet* _tmp104_;
 
1201
        GType _tmp105_ = 0UL;
 
1202
        GValue _tmp106_ = {0};
 
1203
        GValue new_value;
 
1204
        GeeHashSet* _tmp107_;
 
1205
        g_return_if_fail (self != NULL);
 
1206
        g_return_if_fail (rows != NULL);
 
1207
        _tmp0_ = gee_hash_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
 
1208
        new_details = _tmp0_;
 
1209
        {
 
1210
                GeeHashMap* _tmp1_;
 
1211
                GeeSet* _tmp2_;
 
1212
                GeeSet* _tmp3_;
 
1213
                GeeSet* _tmp4_;
 
1214
                GeeIterator* _tmp5_ = NULL;
 
1215
                GeeIterator* _tmp6_;
 
1216
                GeeIterator* _row_entry_it;
 
1217
                _tmp1_ = rows;
 
1218
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
1219
                _tmp3_ = _tmp2_;
 
1220
                _tmp4_ = _tmp3_;
 
1221
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
1222
                _tmp6_ = _tmp5_;
 
1223
                _g_object_unref0 (_tmp4_);
 
1224
                _row_entry_it = _tmp6_;
 
1225
                while (TRUE) {
 
1226
                        GeeIterator* _tmp7_;
 
1227
                        gboolean _tmp8_ = FALSE;
 
1228
                        GeeIterator* _tmp9_;
 
1229
                        gpointer _tmp10_ = NULL;
 
1230
                        GeeMapEntry* row_entry;
 
1231
                        GeeMapEntry* _tmp11_;
 
1232
                        gconstpointer _tmp12_;
 
1233
                        gint _tmp13_;
 
1234
                        GtkWidget* _tmp14_ = NULL;
 
1235
                        ContactsTypeCombo* _tmp15_;
 
1236
                        ContactsTypeCombo* combo;
 
1237
                        GeeMapEntry* _tmp16_;
 
1238
                        gconstpointer _tmp17_;
 
1239
                        gint _tmp18_;
 
1240
                        GtkWidget* _tmp19_ = NULL;
 
1241
                        ContactsAddressEditor* _tmp20_;
 
1242
                        ContactsAddressEditor* addr_editor;
 
1243
                        ContactsTypeCombo* _tmp21_;
 
1244
                        GeeMapEntry* _tmp22_;
 
1245
                        gconstpointer _tmp23_;
 
1246
                        ContactsContactEditorRowData* _tmp24_;
 
1247
                        FolksAbstractFieldDetails* _tmp25_;
 
1248
                        ContactsAddressEditor* _tmp26_;
 
1249
                        FolksPostalAddressFieldDetails* _tmp27_;
 
1250
                        gconstpointer _tmp28_;
 
1251
                        FolksPostalAddress* _tmp29_;
 
1252
                        const gchar* _tmp30_;
 
1253
                        const gchar* _tmp31_;
 
1254
                        ContactsAddressEditor* _tmp32_;
 
1255
                        FolksPostalAddressFieldDetails* _tmp33_;
 
1256
                        gconstpointer _tmp34_;
 
1257
                        FolksPostalAddress* _tmp35_;
 
1258
                        const gchar* _tmp36_;
 
1259
                        const gchar* _tmp37_;
 
1260
                        ContactsAddressEditor* _tmp38_;
 
1261
                        FolksPostalAddressFieldDetails* _tmp39_;
 
1262
                        gconstpointer _tmp40_;
 
1263
                        FolksPostalAddress* _tmp41_;
 
1264
                        const gchar* _tmp42_;
 
1265
                        const gchar* _tmp43_;
 
1266
                        ContactsAddressEditor* _tmp44_;
 
1267
                        FolksPostalAddressFieldDetails* _tmp45_;
 
1268
                        gconstpointer _tmp46_;
 
1269
                        FolksPostalAddress* _tmp47_;
 
1270
                        const gchar* _tmp48_;
 
1271
                        const gchar* _tmp49_;
 
1272
                        ContactsAddressEditor* _tmp50_;
 
1273
                        FolksPostalAddressFieldDetails* _tmp51_;
 
1274
                        gconstpointer _tmp52_;
 
1275
                        FolksPostalAddress* _tmp53_;
 
1276
                        const gchar* _tmp54_;
 
1277
                        const gchar* _tmp55_;
 
1278
                        ContactsAddressEditor* _tmp56_;
 
1279
                        FolksPostalAddressFieldDetails* _tmp57_;
 
1280
                        gconstpointer _tmp58_;
 
1281
                        FolksPostalAddress* _tmp59_;
 
1282
                        const gchar* _tmp60_;
 
1283
                        const gchar* _tmp61_;
 
1284
                        ContactsAddressEditor* _tmp62_;
 
1285
                        FolksPostalAddressFieldDetails* _tmp63_;
 
1286
                        gconstpointer _tmp64_;
 
1287
                        FolksPostalAddress* _tmp65_;
 
1288
                        const gchar* _tmp66_;
 
1289
                        const gchar* _tmp67_;
 
1290
                        ContactsAddressEditor* _tmp68_;
 
1291
                        FolksPostalAddressFieldDetails* _tmp69_;
 
1292
                        gconstpointer _tmp70_;
 
1293
                        FolksPostalAddress* _tmp71_;
 
1294
                        const gchar* _tmp72_;
 
1295
                        const gchar* _tmp73_;
 
1296
                        ContactsAddressEditor* _tmp74_;
 
1297
                        FolksPostalAddressFieldDetails* _tmp75_;
 
1298
                        gconstpointer _tmp76_;
 
1299
                        FolksPostalAddress* _tmp77_;
 
1300
                        const gchar* _tmp78_;
 
1301
                        const gchar* _tmp79_;
 
1302
                        FolksPostalAddress* _tmp80_;
 
1303
                        FolksPostalAddress* new_value;
 
1304
                        FolksPostalAddress* _tmp94_;
 
1305
                        GeeMapEntry* _tmp95_;
 
1306
                        gconstpointer _tmp96_;
 
1307
                        ContactsContactEditorRowData* _tmp97_;
 
1308
                        FolksAbstractFieldDetails* _tmp98_;
 
1309
                        GeeMultiMap* _tmp99_;
 
1310
                        GeeMultiMap* _tmp100_;
 
1311
                        FolksPostalAddressFieldDetails* _tmp101_;
 
1312
                        FolksPostalAddressFieldDetails* details;
 
1313
                        GeeHashSet* _tmp102_;
 
1314
                        FolksPostalAddressFieldDetails* _tmp103_;
 
1315
                        _tmp7_ = _row_entry_it;
 
1316
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
1317
                        if (!_tmp8_) {
 
1318
                                break;
 
1319
                        }
 
1320
                        _tmp9_ = _row_entry_it;
 
1321
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
1322
                        row_entry = (GeeMapEntry*) _tmp10_;
 
1323
                        _tmp11_ = row_entry;
 
1324
                        _tmp12_ = gee_map_entry_get_key (_tmp11_);
 
1325
                        _tmp13_ = _tmp12_;
 
1326
                        _tmp14_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, (gint) ((gintptr) _tmp13_));
 
1327
                        _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, CONTACTS_TYPE_TYPECOMBO) ? ((ContactsTypeCombo*) _tmp14_) : NULL);
 
1328
                        combo = _tmp15_;
 
1329
                        _tmp16_ = row_entry;
 
1330
                        _tmp17_ = gee_map_entry_get_key (_tmp16_);
 
1331
                        _tmp18_ = _tmp17_;
 
1332
                        _tmp19_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, (gint) ((gintptr) _tmp18_));
 
1333
                        _tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, CONTACTS_TYPE_ADDRESS_EDITOR) ? ((ContactsAddressEditor*) _tmp19_) : NULL);
 
1334
                        addr_editor = _tmp20_;
 
1335
                        _tmp21_ = combo;
 
1336
                        _tmp22_ = row_entry;
 
1337
                        _tmp23_ = gee_map_entry_get_value (_tmp22_);
 
1338
                        _tmp24_ = _tmp23_;
 
1339
                        _tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
 
1340
                        contacts_typecombo_update_details (_tmp21_, _tmp25_);
 
1341
                        _tmp26_ = addr_editor;
 
1342
                        _tmp27_ = _tmp26_->details;
 
1343
                        _tmp28_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp27_);
 
1344
                        _tmp29_ = _tmp28_;
 
1345
                        _tmp30_ = folks_postal_address_get_po_box ((FolksPostalAddress*) _tmp29_);
 
1346
                        _tmp31_ = _tmp30_;
 
1347
                        _tmp32_ = addr_editor;
 
1348
                        _tmp33_ = _tmp32_->details;
 
1349
                        _tmp34_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp33_);
 
1350
                        _tmp35_ = _tmp34_;
 
1351
                        _tmp36_ = folks_postal_address_get_extension ((FolksPostalAddress*) _tmp35_);
 
1352
                        _tmp37_ = _tmp36_;
 
1353
                        _tmp38_ = addr_editor;
 
1354
                        _tmp39_ = _tmp38_->details;
 
1355
                        _tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
 
1356
                        _tmp41_ = _tmp40_;
 
1357
                        _tmp42_ = folks_postal_address_get_street ((FolksPostalAddress*) _tmp41_);
 
1358
                        _tmp43_ = _tmp42_;
 
1359
                        _tmp44_ = addr_editor;
 
1360
                        _tmp45_ = _tmp44_->details;
 
1361
                        _tmp46_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp45_);
 
1362
                        _tmp47_ = _tmp46_;
 
1363
                        _tmp48_ = folks_postal_address_get_locality ((FolksPostalAddress*) _tmp47_);
 
1364
                        _tmp49_ = _tmp48_;
 
1365
                        _tmp50_ = addr_editor;
 
1366
                        _tmp51_ = _tmp50_->details;
 
1367
                        _tmp52_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp51_);
 
1368
                        _tmp53_ = _tmp52_;
 
1369
                        _tmp54_ = folks_postal_address_get_region ((FolksPostalAddress*) _tmp53_);
 
1370
                        _tmp55_ = _tmp54_;
 
1371
                        _tmp56_ = addr_editor;
 
1372
                        _tmp57_ = _tmp56_->details;
 
1373
                        _tmp58_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp57_);
 
1374
                        _tmp59_ = _tmp58_;
 
1375
                        _tmp60_ = folks_postal_address_get_postal_code ((FolksPostalAddress*) _tmp59_);
 
1376
                        _tmp61_ = _tmp60_;
 
1377
                        _tmp62_ = addr_editor;
 
1378
                        _tmp63_ = _tmp62_->details;
 
1379
                        _tmp64_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp63_);
 
1380
                        _tmp65_ = _tmp64_;
 
1381
                        _tmp66_ = folks_postal_address_get_country ((FolksPostalAddress*) _tmp65_);
 
1382
                        _tmp67_ = _tmp66_;
 
1383
                        _tmp68_ = addr_editor;
 
1384
                        _tmp69_ = _tmp68_->details;
 
1385
                        _tmp70_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp69_);
 
1386
                        _tmp71_ = _tmp70_;
 
1387
                        _tmp72_ = folks_postal_address_get_address_format ((FolksPostalAddress*) _tmp71_);
 
1388
                        _tmp73_ = _tmp72_;
 
1389
                        _tmp74_ = addr_editor;
 
1390
                        _tmp75_ = _tmp74_->details;
 
1391
                        _tmp76_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp75_);
 
1392
                        _tmp77_ = _tmp76_;
 
1393
                        _tmp78_ = folks_postal_address_get_uid ((FolksPostalAddress*) _tmp77_);
 
1394
                        _tmp79_ = _tmp78_;
 
1395
                        _tmp80_ = folks_postal_address_new (_tmp31_, _tmp37_, _tmp43_, _tmp49_, _tmp55_, _tmp61_, _tmp67_, _tmp73_, _tmp79_);
 
1396
                        new_value = _tmp80_;
 
1397
                        {
 
1398
                                gint i;
 
1399
                                i = 0;
 
1400
                                {
 
1401
                                        gboolean _tmp81_;
 
1402
                                        _tmp81_ = TRUE;
 
1403
                                        while (TRUE) {
 
1404
                                                gboolean _tmp82_;
 
1405
                                                gint _tmp84_;
 
1406
                                                ContactsAddressEditor* _tmp85_;
 
1407
                                                FolksPostalAddress* _tmp86_;
 
1408
                                                gchar** _tmp87_;
 
1409
                                                gint _tmp87__length1;
 
1410
                                                gint _tmp88_;
 
1411
                                                const gchar* _tmp89_;
 
1412
                                                ContactsAddressEditor* _tmp90_;
 
1413
                                                gint _tmp91_;
 
1414
                                                GtkEntry* _tmp92_;
 
1415
                                                const gchar* _tmp93_ = NULL;
 
1416
                                                _tmp82_ = _tmp81_;
 
1417
                                                if (!_tmp82_) {
 
1418
                                                        gint _tmp83_;
 
1419
                                                        _tmp83_ = i;
 
1420
                                                        i = _tmp83_ + 1;
 
1421
                                                }
 
1422
                                                _tmp81_ = FALSE;
 
1423
                                                _tmp84_ = i;
 
1424
                                                _tmp85_ = addr_editor;
 
1425
                                                if (!(_tmp84_ < 7)) {
 
1426
                                                        break;
 
1427
                                                }
 
1428
                                                _tmp86_ = new_value;
 
1429
                                                _tmp87_ = contacts_contact_postal_element_props;
 
1430
                                                _tmp87__length1 = contacts_contact_postal_element_props_length1;
 
1431
                                                _tmp88_ = i;
 
1432
                                                _tmp89_ = _tmp87_[_tmp88_];
 
1433
                                                _tmp90_ = addr_editor;
 
1434
                                                _tmp91_ = i;
 
1435
                                                _tmp92_ = _tmp90_->entries[_tmp91_];
 
1436
                                                _tmp93_ = gtk_entry_get_text (_tmp92_);
 
1437
                                                g_object_set ((GObject*) _tmp86_, _tmp89_, _tmp93_, NULL);
 
1438
                                        }
 
1439
                                }
 
1440
                        }
 
1441
                        _tmp94_ = new_value;
 
1442
                        _tmp95_ = row_entry;
 
1443
                        _tmp96_ = gee_map_entry_get_value (_tmp95_);
 
1444
                        _tmp97_ = _tmp96_;
 
1445
                        _tmp98_ = (*((ContactsContactEditorRowData*) _tmp97_)).details;
 
1446
                        _tmp99_ = folks_abstract_field_details_get_parameters (_tmp98_);
 
1447
                        _tmp100_ = _tmp99_;
 
1448
                        _tmp101_ = folks_postal_address_field_details_new (_tmp94_, _tmp100_);
 
1449
                        details = _tmp101_;
 
1450
                        _tmp102_ = new_details;
 
1451
                        _tmp103_ = details;
 
1452
                        gee_abstract_collection_add ((GeeAbstractCollection*) _tmp102_, _tmp103_);
 
1453
                        _g_object_unref0 (details);
 
1454
                        _g_object_unref0 (new_value);
 
1455
                        _g_object_unref0 (addr_editor);
 
1456
                        _g_object_unref0 (combo);
 
1457
                        _g_object_unref0 (row_entry);
 
1458
                }
 
1459
                _g_object_unref0 (_row_entry_it);
 
1460
        }
 
1461
        _tmp104_ = new_details;
 
1462
        _tmp105_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp104_);
 
1463
        g_value_init (&_tmp106_, _tmp105_);
 
1464
        new_value = _tmp106_;
 
1465
        _tmp107_ = new_details;
 
1466
        g_value_set_object (&new_value, (GObject*) _tmp107_);
 
1467
        *result = new_value;
 
1468
        _g_object_unref0 (new_details);
 
1469
        return;
 
1470
}
 
1471
 
 
1472
 
 
1473
static void contacts_contact_editor_set_field_changed (ContactsContactEditor* self, gint row) {
 
1474
        g_return_if_fail (self != NULL);
 
1475
        {
 
1476
                GeeHashMap* _tmp0_;
 
1477
                GeeCollection* _tmp1_;
 
1478
                GeeCollection* _tmp2_;
 
1479
                GeeCollection* _tmp3_;
 
1480
                GeeIterator* _tmp4_ = NULL;
 
1481
                GeeIterator* _tmp5_;
 
1482
                GeeIterator* _fields_it;
 
1483
                _tmp0_ = self->priv->writable_personas;
 
1484
                _tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
 
1485
                _tmp2_ = _tmp1_;
 
1486
                _tmp3_ = _tmp2_;
 
1487
                _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
 
1488
                _tmp5_ = _tmp4_;
 
1489
                _g_object_unref0 (_tmp3_);
 
1490
                _fields_it = _tmp5_;
 
1491
                while (TRUE) {
 
1492
                        GeeIterator* _tmp6_;
 
1493
                        gboolean _tmp7_ = FALSE;
 
1494
                        GeeIterator* _tmp8_;
 
1495
                        gpointer _tmp9_ = NULL;
 
1496
                        GeeHashMap* fields;
 
1497
                        _tmp6_ = _fields_it;
 
1498
                        _tmp7_ = gee_iterator_next (_tmp6_);
 
1499
                        if (!_tmp7_) {
 
1500
                                break;
 
1501
                        }
 
1502
                        _tmp8_ = _fields_it;
 
1503
                        _tmp9_ = gee_iterator_get (_tmp8_);
 
1504
                        fields = (GeeHashMap*) _tmp9_;
 
1505
                        {
 
1506
                                GeeHashMap* _tmp10_;
 
1507
                                GeeSet* _tmp11_;
 
1508
                                GeeSet* _tmp12_;
 
1509
                                GeeSet* _tmp13_;
 
1510
                                GeeIterator* _tmp14_ = NULL;
 
1511
                                GeeIterator* _tmp15_;
 
1512
                                GeeIterator* _entry_it;
 
1513
                                _tmp10_ = fields;
 
1514
                                _tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
 
1515
                                _tmp12_ = _tmp11_;
 
1516
                                _tmp13_ = _tmp12_;
 
1517
                                _tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
 
1518
                                _tmp15_ = _tmp14_;
 
1519
                                _g_object_unref0 (_tmp13_);
 
1520
                                _entry_it = _tmp15_;
 
1521
                                while (TRUE) {
 
1522
                                        GeeIterator* _tmp16_;
 
1523
                                        gboolean _tmp17_ = FALSE;
 
1524
                                        GeeIterator* _tmp18_;
 
1525
                                        gpointer _tmp19_ = NULL;
 
1526
                                        GeeMapEntry* entry;
 
1527
                                        GeeMapEntry* _tmp20_;
 
1528
                                        gconstpointer _tmp21_;
 
1529
                                        ContactsContactEditorField* _tmp22_;
 
1530
                                        GeeHashMap* _tmp23_;
 
1531
                                        GeeSet* _tmp24_;
 
1532
                                        GeeSet* _tmp25_;
 
1533
                                        GeeSet* _tmp26_;
 
1534
                                        gint _tmp27_;
 
1535
                                        gboolean _tmp28_ = FALSE;
 
1536
                                        gboolean _tmp29_;
 
1537
                                        _tmp16_ = _entry_it;
 
1538
                                        _tmp17_ = gee_iterator_next (_tmp16_);
 
1539
                                        if (!_tmp17_) {
 
1540
                                                break;
 
1541
                                        }
 
1542
                                        _tmp18_ = _entry_it;
 
1543
                                        _tmp19_ = gee_iterator_get (_tmp18_);
 
1544
                                        entry = (GeeMapEntry*) _tmp19_;
 
1545
                                        _tmp20_ = entry;
 
1546
                                        _tmp21_ = gee_map_entry_get_value (_tmp20_);
 
1547
                                        _tmp22_ = _tmp21_;
 
1548
                                        _tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
 
1549
                                        _tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
 
1550
                                        _tmp25_ = _tmp24_;
 
1551
                                        _tmp26_ = _tmp25_;
 
1552
                                        _tmp27_ = row;
 
1553
                                        _tmp28_ = gee_collection_contains ((GeeCollection*) _tmp26_, (gpointer) ((gintptr) _tmp27_));
 
1554
                                        _tmp29_ = _tmp28_;
 
1555
                                        _g_object_unref0 (_tmp26_);
 
1556
                                        if (_tmp29_) {
 
1557
                                                GeeMapEntry* _tmp30_;
 
1558
                                                gconstpointer _tmp31_;
 
1559
                                                ContactsContactEditorField* _tmp32_;
 
1560
                                                gboolean _tmp33_;
 
1561
                                                GeeMapEntry* _tmp34_;
 
1562
                                                gconstpointer _tmp35_;
 
1563
                                                ContactsContactEditorField* _tmp36_;
 
1564
                                                _tmp30_ = entry;
 
1565
                                                _tmp31_ = gee_map_entry_get_value (_tmp30_);
 
1566
                                                _tmp32_ = _tmp31_;
 
1567
                                                _tmp33_ = (*((ContactsContactEditorField*) _tmp32_)).changed;
 
1568
                                                if (_tmp33_) {
 
1569
                                                        _g_object_unref0 (entry);
 
1570
                                                        _g_object_unref0 (_entry_it);
 
1571
                                                        _g_object_unref0 (fields);
 
1572
                                                        _g_object_unref0 (_fields_it);
 
1573
                                                        return;
 
1574
                                                }
 
1575
                                                _tmp34_ = entry;
 
1576
                                                _tmp35_ = gee_map_entry_get_value (_tmp34_);
 
1577
                                                _tmp36_ = _tmp35_;
 
1578
                                                (*((ContactsContactEditorField*) _tmp36_)).changed = TRUE;
 
1579
                                                _g_object_unref0 (entry);
 
1580
                                                _g_object_unref0 (_entry_it);
 
1581
                                                _g_object_unref0 (fields);
 
1582
                                                _g_object_unref0 (_fields_it);
 
1583
                                                return;
 
1584
                                        }
 
1585
                                        _g_object_unref0 (entry);
 
1586
                                }
 
1587
                                _g_object_unref0 (_entry_it);
 
1588
                        }
 
1589
                        _g_object_unref0 (fields);
 
1590
                }
 
1591
                _g_object_unref0 (_fields_it);
 
1592
        }
 
1593
}
 
1594
 
 
1595
 
 
1596
static void contacts_contact_editor_remove_row (ContactsContactEditor* self, gint row) {
 
1597
        g_return_if_fail (self != NULL);
 
1598
        {
 
1599
                GeeHashMap* _tmp0_;
 
1600
                GeeCollection* _tmp1_;
 
1601
                GeeCollection* _tmp2_;
 
1602
                GeeCollection* _tmp3_;
 
1603
                GeeIterator* _tmp4_ = NULL;
 
1604
                GeeIterator* _tmp5_;
 
1605
                GeeIterator* _fields_it;
 
1606
                _tmp0_ = self->priv->writable_personas;
 
1607
                _tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
 
1608
                _tmp2_ = _tmp1_;
 
1609
                _tmp3_ = _tmp2_;
 
1610
                _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
 
1611
                _tmp5_ = _tmp4_;
 
1612
                _g_object_unref0 (_tmp3_);
 
1613
                _fields_it = _tmp5_;
 
1614
                while (TRUE) {
 
1615
                        GeeIterator* _tmp6_;
 
1616
                        gboolean _tmp7_ = FALSE;
 
1617
                        GeeIterator* _tmp8_;
 
1618
                        gpointer _tmp9_ = NULL;
 
1619
                        GeeHashMap* fields;
 
1620
                        _tmp6_ = _fields_it;
 
1621
                        _tmp7_ = gee_iterator_next (_tmp6_);
 
1622
                        if (!_tmp7_) {
 
1623
                                break;
 
1624
                        }
 
1625
                        _tmp8_ = _fields_it;
 
1626
                        _tmp9_ = gee_iterator_get (_tmp8_);
 
1627
                        fields = (GeeHashMap*) _tmp9_;
 
1628
                        {
 
1629
                                GeeHashMap* _tmp10_;
 
1630
                                GeeSet* _tmp11_;
 
1631
                                GeeSet* _tmp12_;
 
1632
                                GeeSet* _tmp13_;
 
1633
                                GeeIterator* _tmp14_ = NULL;
 
1634
                                GeeIterator* _tmp15_;
 
1635
                                GeeIterator* _field_entry_it;
 
1636
                                _tmp10_ = fields;
 
1637
                                _tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
 
1638
                                _tmp12_ = _tmp11_;
 
1639
                                _tmp13_ = _tmp12_;
 
1640
                                _tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
 
1641
                                _tmp15_ = _tmp14_;
 
1642
                                _g_object_unref0 (_tmp13_);
 
1643
                                _field_entry_it = _tmp15_;
 
1644
                                while (TRUE) {
 
1645
                                        GeeIterator* _tmp16_;
 
1646
                                        gboolean _tmp17_ = FALSE;
 
1647
                                        GeeIterator* _tmp18_;
 
1648
                                        gpointer _tmp19_ = NULL;
 
1649
                                        GeeMapEntry* field_entry;
 
1650
                                        _tmp16_ = _field_entry_it;
 
1651
                                        _tmp17_ = gee_iterator_next (_tmp16_);
 
1652
                                        if (!_tmp17_) {
 
1653
                                                break;
 
1654
                                        }
 
1655
                                        _tmp18_ = _field_entry_it;
 
1656
                                        _tmp19_ = gee_iterator_get (_tmp18_);
 
1657
                                        field_entry = (GeeMapEntry*) _tmp19_;
 
1658
                                        {
 
1659
                                                GeeMapEntry* _tmp20_;
 
1660
                                                gconstpointer _tmp21_;
 
1661
                                                ContactsContactEditorField* _tmp22_;
 
1662
                                                GeeHashMap* _tmp23_;
 
1663
                                                GeeSet* _tmp24_;
 
1664
                                                GeeSet* _tmp25_;
 
1665
                                                GeeSet* _tmp26_;
 
1666
                                                GeeIterator* _tmp27_ = NULL;
 
1667
                                                GeeIterator* _tmp28_;
 
1668
                                                GeeIterator* _idx_it;
 
1669
                                                _tmp20_ = field_entry;
 
1670
                                                _tmp21_ = gee_map_entry_get_value (_tmp20_);
 
1671
                                                _tmp22_ = _tmp21_;
 
1672
                                                _tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
 
1673
                                                _tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
 
1674
                                                _tmp25_ = _tmp24_;
 
1675
                                                _tmp26_ = _tmp25_;
 
1676
                                                _tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
 
1677
                                                _tmp28_ = _tmp27_;
 
1678
                                                _g_object_unref0 (_tmp26_);
 
1679
                                                _idx_it = _tmp28_;
 
1680
                                                while (TRUE) {
 
1681
                                                        GeeIterator* _tmp29_;
 
1682
                                                        gboolean _tmp30_ = FALSE;
 
1683
                                                        GeeIterator* _tmp31_;
 
1684
                                                        gpointer _tmp32_ = NULL;
 
1685
                                                        gint idx;
 
1686
                                                        gint _tmp33_;
 
1687
                                                        gint _tmp34_;
 
1688
                                                        _tmp29_ = _idx_it;
 
1689
                                                        _tmp30_ = gee_iterator_next (_tmp29_);
 
1690
                                                        if (!_tmp30_) {
 
1691
                                                                break;
 
1692
                                                        }
 
1693
                                                        _tmp31_ = _idx_it;
 
1694
                                                        _tmp32_ = gee_iterator_get (_tmp31_);
 
1695
                                                        idx = (gint) ((gintptr) _tmp32_);
 
1696
                                                        _tmp33_ = idx;
 
1697
                                                        _tmp34_ = row;
 
1698
                                                        if (_tmp33_ == _tmp34_) {
 
1699
                                                                gint _tmp35_;
 
1700
                                                                GtkWidget* _tmp36_ = NULL;
 
1701
                                                                GtkWidget* _tmp37_;
 
1702
                                                                GtkWidget* child;
 
1703
                                                                GtkWidget* _tmp38_;
 
1704
                                                                gint _tmp39_;
 
1705
                                                                GtkWidget* _tmp40_ = NULL;
 
1706
                                                                GtkWidget* _tmp41_;
 
1707
                                                                GtkWidget* _tmp42_;
 
1708
                                                                gint _tmp43_;
 
1709
                                                                GtkWidget* _tmp44_ = NULL;
 
1710
                                                                GtkWidget* _tmp45_;
 
1711
                                                                GtkWidget* _tmp46_;
 
1712
                                                                GeeMapEntry* _tmp47_;
 
1713
                                                                gconstpointer _tmp48_;
 
1714
                                                                ContactsContactEditorField* _tmp49_;
 
1715
                                                                GeeMapEntry* _tmp50_;
 
1716
                                                                gconstpointer _tmp51_;
 
1717
                                                                ContactsContactEditorField* _tmp52_;
 
1718
                                                                GeeHashMap* _tmp53_;
 
1719
                                                                gint _tmp54_;
 
1720
                                                                _tmp35_ = row;
 
1721
                                                                _tmp36_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp35_);
 
1722
                                                                _tmp37_ = _g_object_ref0 (_tmp36_);
 
1723
                                                                child = _tmp37_;
 
1724
                                                                _tmp38_ = child;
 
1725
                                                                gtk_widget_destroy (_tmp38_);
 
1726
                                                                _tmp39_ = row;
 
1727
                                                                _tmp40_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, _tmp39_);
 
1728
                                                                _tmp41_ = _g_object_ref0 (_tmp40_);
 
1729
                                                                _g_object_unref0 (child);
 
1730
                                                                child = _tmp41_;
 
1731
                                                                _tmp42_ = child;
 
1732
                                                                gtk_widget_destroy (_tmp42_);
 
1733
                                                                _tmp43_ = row;
 
1734
                                                                _tmp44_ = gtk_grid_get_child_at ((GtkGrid*) self, 3, _tmp43_);
 
1735
                                                                _tmp45_ = _g_object_ref0 (_tmp44_);
 
1736
                                                                _g_object_unref0 (child);
 
1737
                                                                child = _tmp45_;
 
1738
                                                                _tmp46_ = child;
 
1739
                                                                gtk_widget_destroy (_tmp46_);
 
1740
                                                                _tmp47_ = field_entry;
 
1741
                                                                _tmp48_ = gee_map_entry_get_value (_tmp47_);
 
1742
                                                                _tmp49_ = _tmp48_;
 
1743
                                                                (*((ContactsContactEditorField*) _tmp49_)).changed = TRUE;
 
1744
                                                                _tmp50_ = field_entry;
 
1745
                                                                _tmp51_ = gee_map_entry_get_value (_tmp50_);
 
1746
                                                                _tmp52_ = _tmp51_;
 
1747
                                                                _tmp53_ = (*((ContactsContactEditorField*) _tmp52_)).rows;
 
1748
                                                                _tmp54_ = row;
 
1749
                                                                gee_abstract_map_unset ((GeeAbstractMap*) _tmp53_, (gpointer) ((gintptr) _tmp54_), NULL);
 
1750
                                                                _g_object_unref0 (child);
 
1751
                                                                _g_object_unref0 (_idx_it);
 
1752
                                                                _g_object_unref0 (field_entry);
 
1753
                                                                _g_object_unref0 (_field_entry_it);
 
1754
                                                                _g_object_unref0 (fields);
 
1755
                                                                _g_object_unref0 (_fields_it);
 
1756
                                                                return;
 
1757
                                                        }
 
1758
                                                }
 
1759
                                                _g_object_unref0 (_idx_it);
 
1760
                                        }
 
1761
                                        _g_object_unref0 (field_entry);
 
1762
                                }
 
1763
                                _g_object_unref0 (_field_entry_it);
 
1764
                        }
 
1765
                        _g_object_unref0 (fields);
 
1766
                }
 
1767
                _g_object_unref0 (_fields_it);
 
1768
        }
 
1769
}
 
1770
 
 
1771
 
 
1772
static Block22Data* block22_data_ref (Block22Data* _data22_) {
 
1773
        g_atomic_int_inc (&_data22_->_ref_count_);
 
1774
        return _data22_;
 
1775
}
 
1776
 
 
1777
 
 
1778
static void block22_data_unref (void * _userdata_) {
 
1779
        Block22Data* _data22_;
 
1780
        _data22_ = (Block22Data*) _userdata_;
 
1781
        if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
 
1782
                ContactsContactEditor * self;
 
1783
                self = _data22_->self;
 
1784
                _g_object_unref0 (_data22_->value_entry);
 
1785
                _g_free0 (_data22_->value);
 
1786
                _g_object_unref0 (self);
 
1787
                g_slice_free (Block22Data, _data22_);
 
1788
        }
 
1789
}
 
1790
 
 
1791
 
 
1792
static void __lambda37_ (Block22Data* _data22_) {
 
1793
        ContactsContactEditor * self;
 
1794
        gint _tmp0_;
 
1795
        self = _data22_->self;
 
1796
        _tmp0_ = _data22_->row;
 
1797
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
1798
}
 
1799
 
 
1800
 
 
1801
static void ___lambda37__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
 
1802
        __lambda37_ (self);
 
1803
}
 
1804
 
 
1805
 
 
1806
static void __lambda38_ (Block22Data* _data22_) {
 
1807
        ContactsContactEditor * self;
 
1808
        gint _tmp0_;
 
1809
        self = _data22_->self;
 
1810
        _tmp0_ = _data22_->row;
 
1811
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
1812
}
 
1813
 
 
1814
 
 
1815
static void ___lambda38__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
 
1816
        __lambda38_ (self);
 
1817
}
 
1818
 
 
1819
 
 
1820
static void __lambda39_ (Block22Data* _data22_) {
 
1821
        ContactsContactEditor * self;
 
1822
        gint _tmp0_;
 
1823
        self = _data22_->self;
 
1824
        _tmp0_ = _data22_->row;
 
1825
        contacts_contact_editor_remove_row (self, _tmp0_);
 
1826
}
 
1827
 
 
1828
 
 
1829
static void ___lambda39__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
1830
        __lambda39_ (self);
 
1831
}
 
1832
 
 
1833
 
 
1834
static void __lambda40_ (Block22Data* _data22_) {
 
1835
        ContactsContactEditor * self;
 
1836
        const gchar* _tmp0_;
 
1837
        self = _data22_->self;
 
1838
        _tmp0_ = _data22_->value;
 
1839
        if (g_strcmp0 (_tmp0_, "") == 0) {
 
1840
                gtk_widget_grab_focus ((GtkWidget*) _data22_->value_entry);
 
1841
        }
 
1842
}
 
1843
 
 
1844
 
 
1845
static void ___lambda40__gtk_widget_map (GtkWidget* _sender, gpointer self) {
 
1846
        __lambda40_ (self);
 
1847
}
 
1848
 
 
1849
 
 
1850
static void contacts_contact_editor_attach_row_with_entry (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksAbstractFieldDetails* details, const gchar* value, const gchar* type) {
 
1851
        Block22Data* _data22_;
 
1852
        gint _tmp0_;
 
1853
        const gchar* _tmp1_;
 
1854
        gchar* _tmp2_;
 
1855
        ContactsTypeSet* _tmp3_;
 
1856
        ContactsTypeCombo* _tmp4_;
 
1857
        ContactsTypeCombo* combo;
 
1858
        ContactsTypeCombo* _tmp5_;
 
1859
        ContactsTypeCombo* _tmp6_;
 
1860
        FolksAbstractFieldDetails* _tmp7_;
 
1861
        const gchar* _tmp8_;
 
1862
        ContactsTypeCombo* _tmp11_;
 
1863
        gint _tmp12_;
 
1864
        GtkEntry* _tmp13_;
 
1865
        const gchar* _tmp14_;
 
1866
        gint _tmp15_;
 
1867
        GtkButton* _tmp16_;
 
1868
        GtkButton* delete_button;
 
1869
        GtkImage* _tmp17_;
 
1870
        GtkImage* image;
 
1871
        gint _tmp18_;
 
1872
        ContactsTypeCombo* _tmp19_;
 
1873
        g_return_if_fail (self != NULL);
 
1874
        g_return_if_fail (type_set != NULL);
 
1875
        g_return_if_fail (details != NULL);
 
1876
        g_return_if_fail (value != NULL);
 
1877
        _data22_ = g_slice_new0 (Block22Data);
 
1878
        _data22_->_ref_count_ = 1;
 
1879
        _data22_->self = g_object_ref (self);
 
1880
        _tmp0_ = row;
 
1881
        _data22_->row = _tmp0_;
 
1882
        _tmp1_ = value;
 
1883
        _tmp2_ = g_strdup (_tmp1_);
 
1884
        _g_free0 (_data22_->value);
 
1885
        _data22_->value = _tmp2_;
 
1886
        _tmp3_ = type_set;
 
1887
        _tmp4_ = contacts_typecombo_new (_tmp3_);
 
1888
        g_object_ref_sink (_tmp4_);
 
1889
        combo = _tmp4_;
 
1890
        _tmp5_ = combo;
 
1891
        gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, FALSE);
 
1892
        _tmp6_ = combo;
 
1893
        _tmp7_ = details;
 
1894
        contacts_typecombo_set_active (_tmp6_, _tmp7_);
 
1895
        _tmp8_ = type;
 
1896
        if (_tmp8_ != NULL) {
 
1897
                ContactsTypeCombo* _tmp9_;
 
1898
                const gchar* _tmp10_;
 
1899
                _tmp9_ = combo;
 
1900
                _tmp10_ = type;
 
1901
                contacts_typecombo_set_to (_tmp9_, _tmp10_);
 
1902
        }
 
1903
        _tmp11_ = combo;
 
1904
        _tmp12_ = _data22_->row;
 
1905
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp11_, 0, _tmp12_, 1, 1);
 
1906
        _tmp13_ = (GtkEntry*) gtk_entry_new ();
 
1907
        g_object_ref_sink (_tmp13_);
 
1908
        _data22_->value_entry = _tmp13_;
 
1909
        _tmp14_ = _data22_->value;
 
1910
        gtk_entry_set_text (_data22_->value_entry, _tmp14_);
 
1911
        gtk_widget_set_hexpand ((GtkWidget*) _data22_->value_entry, TRUE);
 
1912
        _tmp15_ = _data22_->row;
 
1913
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _data22_->value_entry, 1, _tmp15_, 2, 1);
 
1914
        _tmp16_ = (GtkButton*) gtk_button_new ();
 
1915
        g_object_ref_sink (_tmp16_);
 
1916
        delete_button = _tmp16_;
 
1917
        _tmp17_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
 
1918
        g_object_ref_sink (_tmp17_);
 
1919
        image = _tmp17_;
 
1920
        gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
 
1921
        _tmp18_ = _data22_->row;
 
1922
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp18_, 1, 1);
 
1923
        _tmp19_ = combo;
 
1924
        g_signal_connect_data (_tmp19_, "changed", (GCallback) ___lambda37__contacts_typecombo_changed, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
 
1925
        g_signal_connect_data ((GtkEditable*) _data22_->value_entry, "changed", (GCallback) ___lambda38__gtk_editable_changed, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
 
1926
        g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda39__gtk_button_clicked, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
 
1927
        g_signal_connect_data ((GtkWidget*) _data22_->value_entry, "map", (GCallback) ___lambda40__gtk_widget_map, block22_data_ref (_data22_), (GClosureNotify) block22_data_unref, 0);
 
1928
        _g_object_unref0 (image);
 
1929
        _g_object_unref0 (delete_button);
 
1930
        _g_object_unref0 (combo);
 
1931
        block22_data_unref (_data22_);
 
1932
        _data22_ = NULL;
 
1933
}
 
1934
 
 
1935
 
 
1936
static Block23Data* block23_data_ref (Block23Data* _data23_) {
 
1937
        g_atomic_int_inc (&_data23_->_ref_count_);
 
1938
        return _data23_;
 
1939
}
 
1940
 
 
1941
 
 
1942
static void block23_data_unref (void * _userdata_) {
 
1943
        Block23Data* _data23_;
 
1944
        _data23_ = (Block23Data*) _userdata_;
 
1945
        if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
 
1946
                ContactsContactEditor * self;
 
1947
                self = _data23_->self;
 
1948
                _g_object_unref0 (_data23_->value_entry);
 
1949
                _g_free0 (_data23_->value);
 
1950
                _g_object_unref0 (self);
 
1951
                g_slice_free (Block23Data, _data23_);
 
1952
        }
 
1953
}
 
1954
 
 
1955
 
 
1956
static void __lambda41_ (Block23Data* _data23_) {
 
1957
        ContactsContactEditor * self;
 
1958
        gint _tmp0_;
 
1959
        self = _data23_->self;
 
1960
        _tmp0_ = _data23_->row;
 
1961
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
1962
}
 
1963
 
 
1964
 
 
1965
static void ___lambda41__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
 
1966
        __lambda41_ (self);
 
1967
}
 
1968
 
 
1969
 
 
1970
static void __lambda42_ (Block23Data* _data23_) {
 
1971
        ContactsContactEditor * self;
 
1972
        gint _tmp0_;
 
1973
        self = _data23_->self;
 
1974
        _tmp0_ = _data23_->row;
 
1975
        contacts_contact_editor_remove_row (self, _tmp0_);
 
1976
}
 
1977
 
 
1978
 
 
1979
static void ___lambda42__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
1980
        __lambda42_ (self);
 
1981
}
 
1982
 
 
1983
 
 
1984
static void __lambda43_ (Block23Data* _data23_) {
 
1985
        ContactsContactEditor * self;
 
1986
        const gchar* _tmp0_;
 
1987
        self = _data23_->self;
 
1988
        _tmp0_ = _data23_->value;
 
1989
        if (g_strcmp0 (_tmp0_, "") == 0) {
 
1990
                gtk_widget_grab_focus ((GtkWidget*) _data23_->value_entry);
 
1991
        }
 
1992
}
 
1993
 
 
1994
 
 
1995
static void ___lambda43__gtk_widget_map (GtkWidget* _sender, gpointer self) {
 
1996
        __lambda43_ (self);
 
1997
}
 
1998
 
 
1999
 
 
2000
static void contacts_contact_editor_attach_row_with_entry_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row) {
 
2001
        Block23Data* _data23_;
 
2002
        const gchar* _tmp0_;
 
2003
        gchar* _tmp1_;
 
2004
        gint _tmp2_;
 
2005
        const gchar* _tmp3_;
 
2006
        GtkLabel* _tmp4_;
 
2007
        GtkLabel* title_label;
 
2008
        gint _tmp5_;
 
2009
        GtkEntry* _tmp6_;
 
2010
        const gchar* _tmp7_;
 
2011
        gint _tmp8_;
 
2012
        GtkButton* _tmp9_;
 
2013
        GtkButton* delete_button;
 
2014
        GtkImage* _tmp10_;
 
2015
        GtkImage* image;
 
2016
        gint _tmp11_;
 
2017
        g_return_if_fail (self != NULL);
 
2018
        g_return_if_fail (title != NULL);
 
2019
        g_return_if_fail (value != NULL);
 
2020
        _data23_ = g_slice_new0 (Block23Data);
 
2021
        _data23_->_ref_count_ = 1;
 
2022
        _data23_->self = g_object_ref (self);
 
2023
        _tmp0_ = value;
 
2024
        _tmp1_ = g_strdup (_tmp0_);
 
2025
        _g_free0 (_data23_->value);
 
2026
        _data23_->value = _tmp1_;
 
2027
        _tmp2_ = row;
 
2028
        _data23_->row = _tmp2_;
 
2029
        _tmp3_ = title;
 
2030
        _tmp4_ = (GtkLabel*) gtk_label_new (_tmp3_);
 
2031
        g_object_ref_sink (_tmp4_);
 
2032
        title_label = _tmp4_;
 
2033
        gtk_widget_set_hexpand ((GtkWidget*) title_label, FALSE);
 
2034
        gtk_widget_set_halign ((GtkWidget*) title_label, GTK_ALIGN_START);
 
2035
        gtk_widget_set_margin_right ((GtkWidget*) title_label, 6);
 
2036
        _tmp5_ = _data23_->row;
 
2037
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) title_label, 0, _tmp5_, 1, 1);
 
2038
        _tmp6_ = (GtkEntry*) gtk_entry_new ();
 
2039
        g_object_ref_sink (_tmp6_);
 
2040
        _data23_->value_entry = _tmp6_;
 
2041
        _tmp7_ = _data23_->value;
 
2042
        gtk_entry_set_text (_data23_->value_entry, _tmp7_);
 
2043
        gtk_widget_set_hexpand ((GtkWidget*) _data23_->value_entry, TRUE);
 
2044
        _tmp8_ = _data23_->row;
 
2045
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _data23_->value_entry, 1, _tmp8_, 2, 1);
 
2046
        _tmp9_ = (GtkButton*) gtk_button_new ();
 
2047
        g_object_ref_sink (_tmp9_);
 
2048
        delete_button = _tmp9_;
 
2049
        _tmp10_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
 
2050
        g_object_ref_sink (_tmp10_);
 
2051
        image = _tmp10_;
 
2052
        gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
 
2053
        _tmp11_ = _data23_->row;
 
2054
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp11_, 1, 1);
 
2055
        g_signal_connect_data ((GtkEditable*) _data23_->value_entry, "changed", (GCallback) ___lambda41__gtk_editable_changed, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
 
2056
        g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda42__gtk_button_clicked, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
 
2057
        g_signal_connect_data ((GtkWidget*) _data23_->value_entry, "map", (GCallback) ___lambda43__gtk_widget_map, block23_data_ref (_data23_), (GClosureNotify) block23_data_unref, 0);
 
2058
        _g_object_unref0 (image);
 
2059
        _g_object_unref0 (delete_button);
 
2060
        _g_object_unref0 (title_label);
 
2061
        block23_data_unref (_data23_);
 
2062
        _data23_ = NULL;
 
2063
}
 
2064
 
 
2065
 
 
2066
static Block24Data* block24_data_ref (Block24Data* _data24_) {
 
2067
        g_atomic_int_inc (&_data24_->_ref_count_);
 
2068
        return _data24_;
 
2069
}
 
2070
 
 
2071
 
 
2072
static void block24_data_unref (void * _userdata_) {
 
2073
        Block24Data* _data24_;
 
2074
        _data24_ = (Block24Data*) _userdata_;
 
2075
        if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
 
2076
                ContactsContactEditor * self;
 
2077
                self = _data24_->self;
 
2078
                _g_object_unref0 (_data24_->value_text);
 
2079
                _g_free0 (_data24_->value);
 
2080
                _g_object_unref0 (self);
 
2081
                g_slice_free (Block24Data, _data24_);
 
2082
        }
 
2083
}
 
2084
 
 
2085
 
 
2086
static void __lambda44_ (Block24Data* _data24_) {
 
2087
        ContactsContactEditor * self;
 
2088
        gint _tmp0_;
 
2089
        self = _data24_->self;
 
2090
        _tmp0_ = _data24_->row;
 
2091
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
2092
}
 
2093
 
 
2094
 
 
2095
static void ___lambda44__gtk_text_buffer_changed (GtkTextBuffer* _sender, gpointer self) {
 
2096
        __lambda44_ (self);
 
2097
}
 
2098
 
 
2099
 
 
2100
static void __lambda45_ (Block24Data* _data24_) {
 
2101
        ContactsContactEditor * self;
 
2102
        gint _tmp0_;
 
2103
        self = _data24_->self;
 
2104
        _tmp0_ = _data24_->row;
 
2105
        contacts_contact_editor_remove_row (self, _tmp0_);
 
2106
}
 
2107
 
 
2108
 
 
2109
static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
2110
        __lambda45_ (self);
 
2111
}
 
2112
 
 
2113
 
 
2114
static void __lambda46_ (Block24Data* _data24_) {
 
2115
        ContactsContactEditor * self;
 
2116
        const gchar* _tmp0_;
 
2117
        self = _data24_->self;
 
2118
        _tmp0_ = _data24_->value;
 
2119
        if (g_strcmp0 (_tmp0_, "") == 0) {
 
2120
                gtk_widget_grab_focus ((GtkWidget*) _data24_->value_text);
 
2121
        }
 
2122
}
 
2123
 
 
2124
 
 
2125
static void ___lambda46__gtk_widget_map (GtkWidget* _sender, gpointer self) {
 
2126
        __lambda46_ (self);
 
2127
}
 
2128
 
 
2129
 
 
2130
static void contacts_contact_editor_attach_row_with_text_labeled (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, const gchar* value, gint row) {
 
2131
        Block24Data* _data24_;
 
2132
        const gchar* _tmp0_;
 
2133
        gchar* _tmp1_;
 
2134
        gint _tmp2_;
 
2135
        const gchar* _tmp3_;
 
2136
        GtkLabel* _tmp4_;
 
2137
        GtkLabel* title_label;
 
2138
        gint _tmp5_;
 
2139
        GtkScrolledWindow* _tmp6_;
 
2140
        GtkScrolledWindow* sw;
 
2141
        GtkTextView* _tmp7_;
 
2142
        GtkTextBuffer* _tmp8_ = NULL;
 
2143
        const gchar* _tmp9_;
 
2144
        GtkStyleContext* _tmp10_ = NULL;
 
2145
        gint _tmp11_;
 
2146
        GtkButton* _tmp12_;
 
2147
        GtkButton* delete_button;
 
2148
        GtkImage* _tmp13_;
 
2149
        GtkImage* image;
 
2150
        gint _tmp14_;
 
2151
        GtkTextBuffer* _tmp15_ = NULL;
 
2152
        g_return_if_fail (self != NULL);
 
2153
        g_return_if_fail (title != NULL);
 
2154
        g_return_if_fail (value != NULL);
 
2155
        _data24_ = g_slice_new0 (Block24Data);
 
2156
        _data24_->_ref_count_ = 1;
 
2157
        _data24_->self = g_object_ref (self);
 
2158
        _tmp0_ = value;
 
2159
        _tmp1_ = g_strdup (_tmp0_);
 
2160
        _g_free0 (_data24_->value);
 
2161
        _data24_->value = _tmp1_;
 
2162
        _tmp2_ = row;
 
2163
        _data24_->row = _tmp2_;
 
2164
        _tmp3_ = title;
 
2165
        _tmp4_ = (GtkLabel*) gtk_label_new (_tmp3_);
 
2166
        g_object_ref_sink (_tmp4_);
 
2167
        title_label = _tmp4_;
 
2168
        gtk_widget_set_hexpand ((GtkWidget*) title_label, FALSE);
 
2169
        gtk_widget_set_halign ((GtkWidget*) title_label, GTK_ALIGN_START);
 
2170
        gtk_widget_set_valign ((GtkWidget*) title_label, GTK_ALIGN_START);
 
2171
        gtk_widget_set_margin_top ((GtkWidget*) title_label, 3);
 
2172
        gtk_widget_set_margin_right ((GtkWidget*) title_label, 6);
 
2173
        _tmp5_ = _data24_->row;
 
2174
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) title_label, 0, _tmp5_, 1, 1);
 
2175
        _tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
 
2176
        g_object_ref_sink (_tmp6_);
 
2177
        sw = _tmp6_;
 
2178
        gtk_scrolled_window_set_shadow_type (sw, GTK_SHADOW_OUT);
 
2179
        gtk_widget_set_size_request ((GtkWidget*) sw, -1, 100);
 
2180
        _tmp7_ = (GtkTextView*) gtk_text_view_new ();
 
2181
        g_object_ref_sink (_tmp7_);
 
2182
        _data24_->value_text = _tmp7_;
 
2183
        _tmp8_ = gtk_text_view_get_buffer (_data24_->value_text);
 
2184
        _tmp9_ = _data24_->value;
 
2185
        gtk_text_buffer_set_text (_tmp8_, _tmp9_, -1);
 
2186
        gtk_widget_set_hexpand ((GtkWidget*) _data24_->value_text, TRUE);
 
2187
        _tmp10_ = gtk_widget_get_style_context ((GtkWidget*) _data24_->value_text);
 
2188
        gtk_style_context_add_class (_tmp10_, "contacts-entry");
 
2189
        gtk_container_add ((GtkContainer*) sw, (GtkWidget*) _data24_->value_text);
 
2190
        _tmp11_ = _data24_->row;
 
2191
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) sw, 1, _tmp11_, 2, 1);
 
2192
        _tmp12_ = (GtkButton*) gtk_button_new ();
 
2193
        g_object_ref_sink (_tmp12_);
 
2194
        delete_button = _tmp12_;
 
2195
        _tmp13_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
 
2196
        g_object_ref_sink (_tmp13_);
 
2197
        image = _tmp13_;
 
2198
        gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
 
2199
        gtk_widget_set_valign ((GtkWidget*) delete_button, GTK_ALIGN_START);
 
2200
        _tmp14_ = _data24_->row;
 
2201
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp14_, 1, 1);
 
2202
        _tmp15_ = gtk_text_view_get_buffer (_data24_->value_text);
 
2203
        g_signal_connect_data (_tmp15_, "changed", (GCallback) ___lambda44__gtk_text_buffer_changed, block24_data_ref (_data24_), (GClosureNotify) block24_data_unref, 0);
 
2204
        g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda45__gtk_button_clicked, block24_data_ref (_data24_), (GClosureNotify) block24_data_unref, 0);
 
2205
        g_signal_connect_data ((GtkWidget*) _data24_->value_text, "map", (GCallback) ___lambda46__gtk_widget_map, block24_data_ref (_data24_), (GClosureNotify) block24_data_unref, 0);
 
2206
        _g_object_unref0 (image);
 
2207
        _g_object_unref0 (delete_button);
 
2208
        _g_object_unref0 (sw);
 
2209
        _g_object_unref0 (title_label);
 
2210
        block24_data_unref (_data24_);
 
2211
        _data24_ = NULL;
 
2212
}
 
2213
 
 
2214
 
 
2215
static Block25Data* block25_data_ref (Block25Data* _data25_) {
 
2216
        g_atomic_int_inc (&_data25_->_ref_count_);
 
2217
        return _data25_;
 
2218
}
 
2219
 
 
2220
 
 
2221
static void block25_data_unref (void * _userdata_) {
 
2222
        Block25Data* _data25_;
 
2223
        _data25_ = (Block25Data*) _userdata_;
 
2224
        if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
 
2225
                ContactsContactEditor * self;
 
2226
                self = _data25_->self;
 
2227
                _g_object_unref0 (self);
 
2228
                g_slice_free (Block25Data, _data25_);
 
2229
        }
 
2230
}
 
2231
 
 
2232
 
 
2233
static void __lambda47_ (Block25Data* _data25_) {
 
2234
        ContactsContactEditor * self;
 
2235
        gint _tmp0_;
 
2236
        self = _data25_->self;
 
2237
        _tmp0_ = _data25_->row;
 
2238
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
2239
}
 
2240
 
 
2241
 
 
2242
static void ___lambda47__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
 
2243
        __lambda47_ (self);
 
2244
}
 
2245
 
 
2246
 
 
2247
static void __lambda48_ (Block25Data* _data25_) {
 
2248
        ContactsContactEditor * self;
 
2249
        gint _tmp0_;
 
2250
        self = _data25_->self;
 
2251
        _tmp0_ = _data25_->row;
 
2252
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
2253
}
 
2254
 
 
2255
 
 
2256
static void ___lambda48__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
 
2257
        __lambda48_ (self);
 
2258
}
 
2259
 
 
2260
 
 
2261
static void __lambda49_ (Block25Data* _data25_) {
 
2262
        ContactsContactEditor * self;
 
2263
        gint _tmp0_;
 
2264
        self = _data25_->self;
 
2265
        _tmp0_ = _data25_->row;
 
2266
        contacts_contact_editor_remove_row (self, _tmp0_);
 
2267
}
 
2268
 
 
2269
 
 
2270
static void ___lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
2271
        __lambda49_ (self);
 
2272
}
 
2273
 
 
2274
 
 
2275
static void contacts_contact_editor_attach_row_for_birthday (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, GDateTime* birthday, gint row) {
 
2276
        Block25Data* _data25_;
 
2277
        gint _tmp0_;
 
2278
        const gchar* _tmp1_;
 
2279
        GtkLabel* _tmp2_;
 
2280
        GtkLabel* title_label;
 
2281
        gint _tmp3_;
 
2282
        GtkGrid* _tmp4_;
 
2283
        GtkGrid* box;
 
2284
        GtkSpinButton* _tmp5_;
 
2285
        GtkSpinButton* day_spin;
 
2286
        GDateTime* _tmp6_;
 
2287
        GDateTime* _tmp7_ = NULL;
 
2288
        GDateTime* _tmp8_;
 
2289
        gint _tmp9_ = 0;
 
2290
        GtkComboBoxText* _tmp10_;
 
2291
        GtkComboBoxText* combo;
 
2292
        const gchar* _tmp11_ = NULL;
 
2293
        const gchar* _tmp12_ = NULL;
 
2294
        const gchar* _tmp13_ = NULL;
 
2295
        const gchar* _tmp14_ = NULL;
 
2296
        const gchar* _tmp15_ = NULL;
 
2297
        const gchar* _tmp16_ = NULL;
 
2298
        const gchar* _tmp17_ = NULL;
 
2299
        const gchar* _tmp18_ = NULL;
 
2300
        const gchar* _tmp19_ = NULL;
 
2301
        const gchar* _tmp20_ = NULL;
 
2302
        const gchar* _tmp21_ = NULL;
 
2303
        const gchar* _tmp22_ = NULL;
 
2304
        GDateTime* _tmp23_;
 
2305
        GDateTime* _tmp24_ = NULL;
 
2306
        GDateTime* _tmp25_;
 
2307
        gint _tmp26_ = 0;
 
2308
        GtkStyleContext* _tmp27_ = NULL;
 
2309
        GDateTime* _tmp28_;
 
2310
        GDateTime* _tmp29_ = NULL;
 
2311
        GDateTime* _tmp30_;
 
2312
        gint _tmp31_ = 0;
 
2313
        gint _tmp32_;
 
2314
        GtkButton* _tmp33_;
 
2315
        GtkButton* delete_button;
 
2316
        GtkImage* _tmp34_;
 
2317
        GtkImage* image;
 
2318
        gint _tmp35_;
 
2319
        g_return_if_fail (self != NULL);
 
2320
        g_return_if_fail (title != NULL);
 
2321
        g_return_if_fail (birthday != NULL);
 
2322
        _data25_ = g_slice_new0 (Block25Data);
 
2323
        _data25_->_ref_count_ = 1;
 
2324
        _data25_->self = g_object_ref (self);
 
2325
        _tmp0_ = row;
 
2326
        _data25_->row = _tmp0_;
 
2327
        _tmp1_ = title;
 
2328
        _tmp2_ = (GtkLabel*) gtk_label_new (_tmp1_);
 
2329
        g_object_ref_sink (_tmp2_);
 
2330
        title_label = _tmp2_;
 
2331
        gtk_widget_set_hexpand ((GtkWidget*) title_label, FALSE);
 
2332
        gtk_widget_set_halign ((GtkWidget*) title_label, GTK_ALIGN_START);
 
2333
        gtk_widget_set_margin_right ((GtkWidget*) title_label, 6);
 
2334
        _tmp3_ = _data25_->row;
 
2335
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) title_label, 0, _tmp3_, 1, 1);
 
2336
        _tmp4_ = (GtkGrid*) gtk_grid_new ();
 
2337
        g_object_ref_sink (_tmp4_);
 
2338
        box = _tmp4_;
 
2339
        gtk_grid_set_column_spacing (box, (guint) 12);
 
2340
        _tmp5_ = (GtkSpinButton*) gtk_spin_button_new_with_range (1.0, 31.0, 1.0);
 
2341
        g_object_ref_sink (_tmp5_);
 
2342
        day_spin = _tmp5_;
 
2343
        gtk_spin_button_set_digits (day_spin, (guint) 0);
 
2344
        gtk_spin_button_set_numeric (day_spin, TRUE);
 
2345
        _tmp6_ = birthday;
 
2346
        _tmp7_ = g_date_time_to_local (_tmp6_);
 
2347
        _tmp8_ = _tmp7_;
 
2348
        _tmp9_ = g_date_time_get_day_of_month (_tmp8_);
 
2349
        gtk_spin_button_set_value (day_spin, (gdouble) _tmp9_);
 
2350
        _g_date_time_unref0 (_tmp8_);
 
2351
        _tmp10_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
 
2352
        g_object_ref_sink (_tmp10_);
 
2353
        combo = _tmp10_;
 
2354
        _tmp11_ = _ ("January");
 
2355
        gtk_combo_box_text_append_text (combo, _tmp11_);
 
2356
        _tmp12_ = _ ("February");
 
2357
        gtk_combo_box_text_append_text (combo, _tmp12_);
 
2358
        _tmp13_ = _ ("March");
 
2359
        gtk_combo_box_text_append_text (combo, _tmp13_);
 
2360
        _tmp14_ = _ ("April");
 
2361
        gtk_combo_box_text_append_text (combo, _tmp14_);
 
2362
        _tmp15_ = _ ("May");
 
2363
        gtk_combo_box_text_append_text (combo, _tmp15_);
 
2364
        _tmp16_ = _ ("June");
 
2365
        gtk_combo_box_text_append_text (combo, _tmp16_);
 
2366
        _tmp17_ = _ ("July");
 
2367
        gtk_combo_box_text_append_text (combo, _tmp17_);
 
2368
        _tmp18_ = _ ("August");
 
2369
        gtk_combo_box_text_append_text (combo, _tmp18_);
 
2370
        _tmp19_ = _ ("September");
 
2371
        gtk_combo_box_text_append_text (combo, _tmp19_);
 
2372
        _tmp20_ = _ ("October");
 
2373
        gtk_combo_box_text_append_text (combo, _tmp20_);
 
2374
        _tmp21_ = _ ("November");
 
2375
        gtk_combo_box_text_append_text (combo, _tmp21_);
 
2376
        _tmp22_ = _ ("December");
 
2377
        gtk_combo_box_text_append_text (combo, _tmp22_);
 
2378
        _tmp23_ = birthday;
 
2379
        _tmp24_ = g_date_time_to_local (_tmp23_);
 
2380
        _tmp25_ = _tmp24_;
 
2381
        _tmp26_ = g_date_time_get_month (_tmp25_);
 
2382
        gtk_combo_box_set_active ((GtkComboBox*) combo, _tmp26_ - 1);
 
2383
        _g_date_time_unref0 (_tmp25_);
 
2384
        _tmp27_ = gtk_widget_get_style_context ((GtkWidget*) combo);
 
2385
        gtk_style_context_add_class (_tmp27_, "contacts-combo");
 
2386
        gtk_widget_set_hexpand ((GtkWidget*) combo, TRUE);
 
2387
        _tmp28_ = birthday;
 
2388
        _tmp29_ = g_date_time_to_local (_tmp28_);
 
2389
        _tmp30_ = _tmp29_;
 
2390
        _tmp31_ = g_date_time_get_year (_tmp30_);
 
2391
        g_object_set_data_full ((GObject*) box, "year", (gpointer) ((gintptr) _tmp31_), NULL);
 
2392
        _g_date_time_unref0 (_tmp30_);
 
2393
        gtk_container_add ((GtkContainer*) box, (GtkWidget*) day_spin);
 
2394
        gtk_container_add ((GtkContainer*) box, (GtkWidget*) combo);
 
2395
        _tmp32_ = _data25_->row;
 
2396
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) box, 1, _tmp32_, 2, 1);
 
2397
        _tmp33_ = (GtkButton*) gtk_button_new ();
 
2398
        g_object_ref_sink (_tmp33_);
 
2399
        delete_button = _tmp33_;
 
2400
        _tmp34_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
 
2401
        g_object_ref_sink (_tmp34_);
 
2402
        image = _tmp34_;
 
2403
        gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
 
2404
        _tmp35_ = _data25_->row;
 
2405
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp35_, 1, 1);
 
2406
        g_signal_connect_data ((GtkEditable*) day_spin, "changed", (GCallback) ___lambda47__gtk_editable_changed, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
 
2407
        g_signal_connect_data ((GtkComboBox*) combo, "changed", (GCallback) ___lambda48__gtk_combo_box_changed, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
 
2408
        g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda49__gtk_button_clicked, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
 
2409
        _g_object_unref0 (image);
 
2410
        _g_object_unref0 (delete_button);
 
2411
        _g_object_unref0 (combo);
 
2412
        _g_object_unref0 (day_spin);
 
2413
        _g_object_unref0 (box);
 
2414
        _g_object_unref0 (title_label);
 
2415
        block25_data_unref (_data25_);
 
2416
        _data25_ = NULL;
 
2417
}
 
2418
 
 
2419
 
 
2420
static Block26Data* block26_data_ref (Block26Data* _data26_) {
 
2421
        g_atomic_int_inc (&_data26_->_ref_count_);
 
2422
        return _data26_;
 
2423
}
 
2424
 
 
2425
 
 
2426
static void block26_data_unref (void * _userdata_) {
 
2427
        Block26Data* _data26_;
 
2428
        _data26_ = (Block26Data*) _userdata_;
 
2429
        if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
 
2430
                ContactsContactEditor * self;
 
2431
                self = _data26_->self;
 
2432
                _g_object_unref0 (_data26_->value_address);
 
2433
                _g_object_unref0 (self);
 
2434
                g_slice_free (Block26Data, _data26_);
 
2435
        }
 
2436
}
 
2437
 
 
2438
 
 
2439
static void __lambda50_ (Block26Data* _data26_) {
 
2440
        ContactsContactEditor * self;
 
2441
        gint _tmp0_;
 
2442
        self = _data26_->self;
 
2443
        _tmp0_ = _data26_->row;
 
2444
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
2445
}
 
2446
 
 
2447
 
 
2448
static void ___lambda50__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
 
2449
        __lambda50_ (self);
 
2450
}
 
2451
 
 
2452
 
 
2453
static void __lambda51_ (Block26Data* _data26_) {
 
2454
        ContactsContactEditor * self;
 
2455
        gint _tmp0_;
 
2456
        self = _data26_->self;
 
2457
        _tmp0_ = _data26_->row;
 
2458
        contacts_contact_editor_set_field_changed (self, _tmp0_);
 
2459
}
 
2460
 
 
2461
 
 
2462
static void ___lambda51__contacts_address_editor_changed (ContactsAddressEditor* _sender, gpointer self) {
 
2463
        __lambda51_ (self);
 
2464
}
 
2465
 
 
2466
 
 
2467
static void __lambda52_ (Block26Data* _data26_) {
 
2468
        ContactsContactEditor * self;
 
2469
        gint _tmp0_;
 
2470
        self = _data26_->self;
 
2471
        _tmp0_ = _data26_->row;
 
2472
        contacts_contact_editor_remove_row (self, _tmp0_);
 
2473
}
 
2474
 
 
2475
 
 
2476
static void ___lambda52__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
2477
        __lambda52_ (self);
 
2478
}
 
2479
 
 
2480
 
 
2481
static void __lambda53_ (Block26Data* _data26_) {
 
2482
        ContactsContactEditor * self;
 
2483
        self = _data26_->self;
 
2484
        gtk_widget_grab_focus ((GtkWidget*) _data26_->value_address);
 
2485
}
 
2486
 
 
2487
 
 
2488
static void ___lambda53__gtk_widget_map (GtkWidget* _sender, gpointer self) {
 
2489
        __lambda53_ (self);
 
2490
}
 
2491
 
 
2492
 
 
2493
static void contacts_contact_editor_attach_row_for_address (ContactsContactEditor* self, gint row, ContactsTypeSet* type_set, FolksPostalAddressFieldDetails* details, const gchar* type) {
 
2494
        Block26Data* _data26_;
 
2495
        gint _tmp0_;
 
2496
        ContactsTypeSet* _tmp1_;
 
2497
        ContactsTypeCombo* _tmp2_;
 
2498
        ContactsTypeCombo* combo;
 
2499
        ContactsTypeCombo* _tmp3_;
 
2500
        ContactsTypeCombo* _tmp4_;
 
2501
        FolksPostalAddressFieldDetails* _tmp5_;
 
2502
        const gchar* _tmp6_;
 
2503
        ContactsTypeCombo* _tmp9_;
 
2504
        gint _tmp10_;
 
2505
        FolksPostalAddressFieldDetails* _tmp11_;
 
2506
        ContactsAddressEditor* _tmp12_;
 
2507
        gint _tmp13_;
 
2508
        GtkButton* _tmp14_;
 
2509
        GtkButton* delete_button;
 
2510
        GtkImage* _tmp15_;
 
2511
        GtkImage* image;
 
2512
        gint _tmp16_;
 
2513
        ContactsTypeCombo* _tmp17_;
 
2514
        g_return_if_fail (self != NULL);
 
2515
        g_return_if_fail (type_set != NULL);
 
2516
        g_return_if_fail (details != NULL);
 
2517
        _data26_ = g_slice_new0 (Block26Data);
 
2518
        _data26_->_ref_count_ = 1;
 
2519
        _data26_->self = g_object_ref (self);
 
2520
        _tmp0_ = row;
 
2521
        _data26_->row = _tmp0_;
 
2522
        _tmp1_ = type_set;
 
2523
        _tmp2_ = contacts_typecombo_new (_tmp1_);
 
2524
        g_object_ref_sink (_tmp2_);
 
2525
        combo = _tmp2_;
 
2526
        _tmp3_ = combo;
 
2527
        gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
 
2528
        _tmp4_ = combo;
 
2529
        _tmp5_ = details;
 
2530
        contacts_typecombo_set_active (_tmp4_, (FolksAbstractFieldDetails*) _tmp5_);
 
2531
        _tmp6_ = type;
 
2532
        if (_tmp6_ != NULL) {
 
2533
                ContactsTypeCombo* _tmp7_;
 
2534
                const gchar* _tmp8_;
 
2535
                _tmp7_ = combo;
 
2536
                _tmp8_ = type;
 
2537
                contacts_typecombo_set_to (_tmp7_, _tmp8_);
 
2538
        }
 
2539
        _tmp9_ = combo;
 
2540
        _tmp10_ = _data26_->row;
 
2541
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp9_, 0, _tmp10_, 1, 1);
 
2542
        _tmp11_ = details;
 
2543
        _tmp12_ = contacts_address_editor_new (_tmp11_);
 
2544
        g_object_ref_sink (_tmp12_);
 
2545
        _data26_->value_address = _tmp12_;
 
2546
        _tmp13_ = _data26_->row;
 
2547
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _data26_->value_address, 1, _tmp13_, 2, 1);
 
2548
        _tmp14_ = (GtkButton*) gtk_button_new ();
 
2549
        g_object_ref_sink (_tmp14_);
 
2550
        delete_button = _tmp14_;
 
2551
        _tmp15_ = (GtkImage*) gtk_image_new_from_icon_name ("user-trash-symbolic", GTK_ICON_SIZE_MENU);
 
2552
        g_object_ref_sink (_tmp15_);
 
2553
        image = _tmp15_;
 
2554
        gtk_container_add ((GtkContainer*) delete_button, (GtkWidget*) image);
 
2555
        gtk_widget_set_valign ((GtkWidget*) delete_button, GTK_ALIGN_START);
 
2556
        _tmp16_ = _data26_->row;
 
2557
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) delete_button, 3, _tmp16_, 1, 1);
 
2558
        _tmp17_ = combo;
 
2559
        g_signal_connect_data (_tmp17_, "changed", (GCallback) ___lambda50__contacts_typecombo_changed, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
 
2560
        g_signal_connect_data (_data26_->value_address, "changed", (GCallback) ___lambda51__contacts_address_editor_changed, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
 
2561
        g_signal_connect_data (delete_button, "clicked", (GCallback) ___lambda52__gtk_button_clicked, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
 
2562
        g_signal_connect_data ((GtkWidget*) _data26_->value_address, "map", (GCallback) ___lambda53__gtk_widget_map, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
 
2563
        _g_object_unref0 (image);
 
2564
        _g_object_unref0 (delete_button);
 
2565
        _g_object_unref0 (combo);
 
2566
        block26_data_unref (_data26_);
 
2567
        _data26_ = NULL;
 
2568
}
 
2569
 
 
2570
 
 
2571
static void contacts_contact_editor_add_edit_row (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, gint* row, gboolean add_empty, const gchar* type) {
 
2572
        const gchar* _tmp0_;
 
2573
        const gchar* _tmp1_;
 
2574
        GQuark _tmp3_ = 0U;
 
2575
        static GQuark _tmp2_label0 = 0;
 
2576
        static GQuark _tmp2_label1 = 0;
 
2577
        static GQuark _tmp2_label2 = 0;
 
2578
        static GQuark _tmp2_label3 = 0;
 
2579
        static GQuark _tmp2_label4 = 0;
 
2580
        static GQuark _tmp2_label5 = 0;
 
2581
        static GQuark _tmp2_label6 = 0;
 
2582
        g_return_if_fail (self != NULL);
 
2583
        g_return_if_fail (p != NULL);
 
2584
        g_return_if_fail (prop_name != NULL);
 
2585
        _tmp0_ = prop_name;
 
2586
        _tmp1_ = _tmp0_;
 
2587
        _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
 
2588
        if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("email-addresses")))) {
 
2589
                switch (0) {
 
2590
                        default:
 
2591
                        {
 
2592
                                GeeHashMap* _tmp4_;
 
2593
                                GeeHashMap* rows;
 
2594
                                gboolean _tmp5_;
 
2595
                                GeeHashMap* _tmp47_;
 
2596
                                gboolean _tmp48_;
 
2597
                                gboolean _tmp49_;
 
2598
                                _tmp4_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
2599
                                rows = _tmp4_;
 
2600
                                _tmp5_ = add_empty;
 
2601
                                if (_tmp5_) {
 
2602
                                        FolksEmailFieldDetails* _tmp6_;
 
2603
                                        FolksEmailFieldDetails* detail_field;
 
2604
                                        gint _tmp7_;
 
2605
                                        ContactsTypeSet* _tmp8_;
 
2606
                                        ContactsTypeSet* _tmp9_;
 
2607
                                        FolksEmailFieldDetails* _tmp10_;
 
2608
                                        const gchar* _tmp11_;
 
2609
                                        GeeHashMap* _tmp12_;
 
2610
                                        gint _tmp13_;
 
2611
                                        FolksEmailFieldDetails* _tmp14_;
 
2612
                                        ContactsContactEditorRowData _tmp15_ = {0};
 
2613
                                        gint _tmp16_;
 
2614
                                        _tmp6_ = folks_email_field_details_new ("", NULL);
 
2615
                                        detail_field = _tmp6_;
 
2616
                                        _tmp7_ = *row;
 
2617
                                        _tmp8_ = contacts_typeset_get_email ();
 
2618
                                        _tmp9_ = _tmp8_;
 
2619
                                        _tmp10_ = detail_field;
 
2620
                                        _tmp11_ = type;
 
2621
                                        contacts_contact_editor_attach_row_with_entry (self, _tmp7_, _tmp9_, (FolksAbstractFieldDetails*) _tmp10_, "", _tmp11_);
 
2622
                                        _tmp12_ = rows;
 
2623
                                        _tmp13_ = *row;
 
2624
                                        _tmp14_ = detail_field;
 
2625
                                        _g_object_unref0 (_tmp15_.details);
 
2626
                                        _tmp15_.details = (FolksAbstractFieldDetails*) _tmp14_;
 
2627
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, (gpointer) ((gintptr) _tmp13_), &_tmp15_);
 
2628
                                        _tmp16_ = *row;
 
2629
                                        *row = _tmp16_ + 1;
 
2630
                                        _g_object_unref0 (detail_field);
 
2631
                                } else {
 
2632
                                        FolksPersona* _tmp17_;
 
2633
                                        FolksEmailDetails* _tmp18_;
 
2634
                                        FolksEmailDetails* details;
 
2635
                                        FolksEmailDetails* _tmp19_;
 
2636
                                        _tmp17_ = p;
 
2637
                                        _tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _tmp17_) : NULL);
 
2638
                                        details = _tmp18_;
 
2639
                                        _tmp19_ = details;
 
2640
                                        if (_tmp19_ != NULL) {
 
2641
                                                FolksEmailDetails* _tmp20_;
 
2642
                                                GeeSet* _tmp21_;
 
2643
                                                GeeSet* _tmp22_;
 
2644
                                                GeeArrayList* _tmp23_ = NULL;
 
2645
                                                GeeArrayList* emails;
 
2646
                                                _tmp20_ = details;
 
2647
                                                _tmp21_ = folks_email_details_get_email_addresses (_tmp20_);
 
2648
                                                _tmp22_ = _tmp21_;
 
2649
                                                _tmp23_ = contacts_contact_sort_fields (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeCollection*) _tmp22_);
 
2650
                                                emails = _tmp23_;
 
2651
                                                {
 
2652
                                                        GeeArrayList* _tmp24_;
 
2653
                                                        GeeArrayList* _tmp25_;
 
2654
                                                        GeeArrayList* _email_list;
 
2655
                                                        GeeArrayList* _tmp26_;
 
2656
                                                        gint _tmp27_;
 
2657
                                                        gint _tmp28_;
 
2658
                                                        gint _email_size;
 
2659
                                                        gint _email_index;
 
2660
                                                        _tmp24_ = emails;
 
2661
                                                        _tmp25_ = _g_object_ref0 (_tmp24_);
 
2662
                                                        _email_list = _tmp25_;
 
2663
                                                        _tmp26_ = _email_list;
 
2664
                                                        _tmp27_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp26_);
 
2665
                                                        _tmp28_ = _tmp27_;
 
2666
                                                        _email_size = _tmp28_;
 
2667
                                                        _email_index = -1;
 
2668
                                                        while (TRUE) {
 
2669
                                                                gint _tmp29_;
 
2670
                                                                gint _tmp30_;
 
2671
                                                                gint _tmp31_;
 
2672
                                                                GeeArrayList* _tmp32_;
 
2673
                                                                gint _tmp33_;
 
2674
                                                                gpointer _tmp34_ = NULL;
 
2675
                                                                FolksEmailFieldDetails* email;
 
2676
                                                                gint _tmp35_;
 
2677
                                                                ContactsTypeSet* _tmp36_;
 
2678
                                                                ContactsTypeSet* _tmp37_;
 
2679
                                                                FolksEmailFieldDetails* _tmp38_;
 
2680
                                                                FolksEmailFieldDetails* _tmp39_;
 
2681
                                                                gconstpointer _tmp40_;
 
2682
                                                                const gchar* _tmp41_;
 
2683
                                                                GeeHashMap* _tmp42_;
 
2684
                                                                gint _tmp43_;
 
2685
                                                                FolksEmailFieldDetails* _tmp44_;
 
2686
                                                                ContactsContactEditorRowData _tmp45_ = {0};
 
2687
                                                                gint _tmp46_;
 
2688
                                                                _tmp29_ = _email_index;
 
2689
                                                                _email_index = _tmp29_ + 1;
 
2690
                                                                _tmp30_ = _email_index;
 
2691
                                                                _tmp31_ = _email_size;
 
2692
                                                                if (!(_tmp30_ < _tmp31_)) {
 
2693
                                                                        break;
 
2694
                                                                }
 
2695
                                                                _tmp32_ = _email_list;
 
2696
                                                                _tmp33_ = _email_index;
 
2697
                                                                _tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, _tmp33_);
 
2698
                                                                email = (FolksEmailFieldDetails*) _tmp34_;
 
2699
                                                                _tmp35_ = *row;
 
2700
                                                                _tmp36_ = contacts_typeset_get_email ();
 
2701
                                                                _tmp37_ = _tmp36_;
 
2702
                                                                _tmp38_ = email;
 
2703
                                                                _tmp39_ = email;
 
2704
                                                                _tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
 
2705
                                                                _tmp41_ = _tmp40_;
 
2706
                                                                contacts_contact_editor_attach_row_with_entry (self, _tmp35_, _tmp37_, (FolksAbstractFieldDetails*) _tmp38_, (const gchar*) _tmp41_, NULL);
 
2707
                                                                _tmp42_ = rows;
 
2708
                                                                _tmp43_ = *row;
 
2709
                                                                _tmp44_ = email;
 
2710
                                                                _g_object_unref0 (_tmp45_.details);
 
2711
                                                                _tmp45_.details = (FolksAbstractFieldDetails*) _tmp44_;
 
2712
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp42_, (gpointer) ((gintptr) _tmp43_), &_tmp45_);
 
2713
                                                                _tmp46_ = *row;
 
2714
                                                                *row = _tmp46_ + 1;
 
2715
                                                                _g_object_unref0 (email);
 
2716
                                                        }
 
2717
                                                        _g_object_unref0 (_email_list);
 
2718
                                                }
 
2719
                                                _g_object_unref0 (emails);
 
2720
                                        }
 
2721
                                        _g_object_unref0 (details);
 
2722
                                }
 
2723
                                _tmp47_ = rows;
 
2724
                                _tmp48_ = gee_map_get_is_empty ((GeeMap*) _tmp47_);
 
2725
                                _tmp49_ = _tmp48_;
 
2726
                                if (!_tmp49_) {
 
2727
                                        GeeHashMap* _tmp50_;
 
2728
                                        FolksPersona* _tmp51_;
 
2729
                                        gpointer _tmp52_ = NULL;
 
2730
                                        GeeHashMap* _tmp53_;
 
2731
                                        const gchar* _tmp54_;
 
2732
                                        gboolean _tmp55_ = FALSE;
 
2733
                                        gboolean _tmp56_;
 
2734
                                        _tmp50_ = self->priv->writable_personas;
 
2735
                                        _tmp51_ = p;
 
2736
                                        _tmp52_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp50_, _tmp51_);
 
2737
                                        _tmp53_ = (GeeHashMap*) _tmp52_;
 
2738
                                        _tmp54_ = prop_name;
 
2739
                                        _tmp55_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp53_, _tmp54_);
 
2740
                                        _tmp56_ = _tmp55_;
 
2741
                                        _g_object_unref0 (_tmp53_);
 
2742
                                        if (_tmp56_) {
 
2743
                                                {
 
2744
                                                        GeeHashMap* _tmp57_;
 
2745
                                                        GeeSet* _tmp58_;
 
2746
                                                        GeeSet* _tmp59_;
 
2747
                                                        GeeSet* _tmp60_;
 
2748
                                                        GeeIterator* _tmp61_ = NULL;
 
2749
                                                        GeeIterator* _tmp62_;
 
2750
                                                        GeeIterator* _entry_it;
 
2751
                                                        _tmp57_ = rows;
 
2752
                                                        _tmp58_ = gee_abstract_map_get_entries ((GeeMap*) _tmp57_);
 
2753
                                                        _tmp59_ = _tmp58_;
 
2754
                                                        _tmp60_ = _tmp59_;
 
2755
                                                        _tmp61_ = gee_iterable_iterator ((GeeIterable*) _tmp60_);
 
2756
                                                        _tmp62_ = _tmp61_;
 
2757
                                                        _g_object_unref0 (_tmp60_);
 
2758
                                                        _entry_it = _tmp62_;
 
2759
                                                        while (TRUE) {
 
2760
                                                                GeeIterator* _tmp63_;
 
2761
                                                                gboolean _tmp64_ = FALSE;
 
2762
                                                                GeeIterator* _tmp65_;
 
2763
                                                                gpointer _tmp66_ = NULL;
 
2764
                                                                GeeMapEntry* entry;
 
2765
                                                                GeeHashMap* _tmp67_;
 
2766
                                                                FolksPersona* _tmp68_;
 
2767
                                                                gpointer _tmp69_ = NULL;
 
2768
                                                                GeeHashMap* _tmp70_;
 
2769
                                                                const gchar* _tmp71_;
 
2770
                                                                gpointer _tmp72_ = NULL;
 
2771
                                                                ContactsContactEditorField* _tmp73_;
 
2772
                                                                GeeHashMap* _tmp74_;
 
2773
                                                                GeeMapEntry* _tmp75_;
 
2774
                                                                gconstpointer _tmp76_;
 
2775
                                                                gint _tmp77_;
 
2776
                                                                GeeMapEntry* _tmp78_;
 
2777
                                                                gconstpointer _tmp79_;
 
2778
                                                                ContactsContactEditorRowData* _tmp80_;
 
2779
                                                                _tmp63_ = _entry_it;
 
2780
                                                                _tmp64_ = gee_iterator_next (_tmp63_);
 
2781
                                                                if (!_tmp64_) {
 
2782
                                                                        break;
 
2783
                                                                }
 
2784
                                                                _tmp65_ = _entry_it;
 
2785
                                                                _tmp66_ = gee_iterator_get (_tmp65_);
 
2786
                                                                entry = (GeeMapEntry*) _tmp66_;
 
2787
                                                                _tmp67_ = self->priv->writable_personas;
 
2788
                                                                _tmp68_ = p;
 
2789
                                                                _tmp69_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp67_, _tmp68_);
 
2790
                                                                _tmp70_ = (GeeHashMap*) _tmp69_;
 
2791
                                                                _tmp71_ = prop_name;
 
2792
                                                                _tmp72_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp70_, _tmp71_);
 
2793
                                                                _tmp73_ = (ContactsContactEditorField*) _tmp72_;
 
2794
                                                                _tmp74_ = (*_tmp73_).rows;
 
2795
                                                                _tmp75_ = entry;
 
2796
                                                                _tmp76_ = gee_map_entry_get_key (_tmp75_);
 
2797
                                                                _tmp77_ = _tmp76_;
 
2798
                                                                _tmp78_ = entry;
 
2799
                                                                _tmp79_ = gee_map_entry_get_value (_tmp78_);
 
2800
                                                                _tmp80_ = _tmp79_;
 
2801
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp74_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp77_))), (ContactsContactEditorRowData*) _tmp80_);
 
2802
                                                                _contacts_contact_editor_field_free0 (_tmp73_);
 
2803
                                                                _g_object_unref0 (_tmp70_);
 
2804
                                                                _g_object_unref0 (entry);
 
2805
                                                        }
 
2806
                                                        _g_object_unref0 (_entry_it);
 
2807
                                                }
 
2808
                                        } else {
 
2809
                                                GeeHashMap* _tmp81_;
 
2810
                                                FolksPersona* _tmp82_;
 
2811
                                                gpointer _tmp83_ = NULL;
 
2812
                                                GeeHashMap* _tmp84_;
 
2813
                                                const gchar* _tmp85_;
 
2814
                                                GeeHashMap* _tmp86_;
 
2815
                                                ContactsContactEditorField _tmp87_ = {0};
 
2816
                                                _tmp81_ = self->priv->writable_personas;
 
2817
                                                _tmp82_ = p;
 
2818
                                                _tmp83_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp81_, _tmp82_);
 
2819
                                                _tmp84_ = (GeeHashMap*) _tmp83_;
 
2820
                                                _tmp85_ = prop_name;
 
2821
                                                _tmp86_ = rows;
 
2822
                                                _tmp87_.changed = FALSE;
 
2823
                                                _g_object_unref0 (_tmp87_.rows);
 
2824
                                                _tmp87_.rows = _tmp86_;
 
2825
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp84_, _tmp85_, &_tmp87_);
 
2826
                                                _g_object_unref0 (_tmp84_);
 
2827
                                        }
 
2828
                                }
 
2829
                                _g_object_unref0 (rows);
 
2830
                                break;
 
2831
                        }
 
2832
                }
 
2833
        } else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("phone-numbers")))) {
 
2834
                switch (0) {
 
2835
                        default:
 
2836
                        {
 
2837
                                GeeHashMap* _tmp88_;
 
2838
                                GeeHashMap* rows;
 
2839
                                gboolean _tmp89_;
 
2840
                                GeeHashMap* _tmp132_;
 
2841
                                gboolean _tmp133_;
 
2842
                                gboolean _tmp134_;
 
2843
                                _tmp88_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
2844
                                rows = _tmp88_;
 
2845
                                _tmp89_ = add_empty;
 
2846
                                if (_tmp89_) {
 
2847
                                        FolksPhoneFieldDetails* _tmp90_;
 
2848
                                        FolksPhoneFieldDetails* detail_field;
 
2849
                                        gint _tmp91_;
 
2850
                                        ContactsTypeSet* _tmp92_;
 
2851
                                        ContactsTypeSet* _tmp93_;
 
2852
                                        FolksPhoneFieldDetails* _tmp94_;
 
2853
                                        const gchar* _tmp95_;
 
2854
                                        GeeHashMap* _tmp96_;
 
2855
                                        gint _tmp97_;
 
2856
                                        FolksPhoneFieldDetails* _tmp98_;
 
2857
                                        ContactsContactEditorRowData _tmp99_ = {0};
 
2858
                                        gint _tmp100_;
 
2859
                                        _tmp90_ = folks_phone_field_details_new ("", NULL);
 
2860
                                        detail_field = _tmp90_;
 
2861
                                        _tmp91_ = *row;
 
2862
                                        _tmp92_ = contacts_typeset_get_phone ();
 
2863
                                        _tmp93_ = _tmp92_;
 
2864
                                        _tmp94_ = detail_field;
 
2865
                                        _tmp95_ = type;
 
2866
                                        contacts_contact_editor_attach_row_with_entry (self, _tmp91_, _tmp93_, (FolksAbstractFieldDetails*) _tmp94_, "", _tmp95_);
 
2867
                                        _tmp96_ = rows;
 
2868
                                        _tmp97_ = *row;
 
2869
                                        _tmp98_ = detail_field;
 
2870
                                        _g_object_unref0 (_tmp99_.details);
 
2871
                                        _tmp99_.details = (FolksAbstractFieldDetails*) _tmp98_;
 
2872
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp96_, (gpointer) ((gintptr) _tmp97_), &_tmp99_);
 
2873
                                        _tmp100_ = *row;
 
2874
                                        *row = _tmp100_ + 1;
 
2875
                                        _g_object_unref0 (detail_field);
 
2876
                                } else {
 
2877
                                        FolksPersona* _tmp101_;
 
2878
                                        FolksPhoneDetails* _tmp102_;
 
2879
                                        FolksPhoneDetails* details;
 
2880
                                        FolksPhoneDetails* _tmp103_;
 
2881
                                        _tmp101_ = p;
 
2882
                                        _tmp102_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp101_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _tmp101_) : NULL);
 
2883
                                        details = _tmp102_;
 
2884
                                        _tmp103_ = details;
 
2885
                                        if (_tmp103_ != NULL) {
 
2886
                                                FolksPhoneDetails* _tmp104_;
 
2887
                                                GeeSet* _tmp105_;
 
2888
                                                GeeSet* _tmp106_;
 
2889
                                                GeeArrayList* _tmp107_ = NULL;
 
2890
                                                GeeArrayList* phones;
 
2891
                                                _tmp104_ = details;
 
2892
                                                _tmp105_ = folks_phone_details_get_phone_numbers (_tmp104_);
 
2893
                                                _tmp106_ = _tmp105_;
 
2894
                                                _tmp107_ = contacts_contact_sort_fields (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeCollection*) _tmp106_);
 
2895
                                                phones = _tmp107_;
 
2896
                                                {
 
2897
                                                        GeeArrayList* _tmp108_;
 
2898
                                                        GeeArrayList* _tmp109_;
 
2899
                                                        GeeArrayList* _phone_list;
 
2900
                                                        GeeArrayList* _tmp110_;
 
2901
                                                        gint _tmp111_;
 
2902
                                                        gint _tmp112_;
 
2903
                                                        gint _phone_size;
 
2904
                                                        gint _phone_index;
 
2905
                                                        _tmp108_ = phones;
 
2906
                                                        _tmp109_ = _g_object_ref0 (_tmp108_);
 
2907
                                                        _phone_list = _tmp109_;
 
2908
                                                        _tmp110_ = _phone_list;
 
2909
                                                        _tmp111_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp110_);
 
2910
                                                        _tmp112_ = _tmp111_;
 
2911
                                                        _phone_size = _tmp112_;
 
2912
                                                        _phone_index = -1;
 
2913
                                                        while (TRUE) {
 
2914
                                                                gint _tmp113_;
 
2915
                                                                gint _tmp114_;
 
2916
                                                                gint _tmp115_;
 
2917
                                                                GeeArrayList* _tmp116_;
 
2918
                                                                gint _tmp117_;
 
2919
                                                                gpointer _tmp118_ = NULL;
 
2920
                                                                FolksPhoneFieldDetails* phone;
 
2921
                                                                gint _tmp119_;
 
2922
                                                                ContactsTypeSet* _tmp120_;
 
2923
                                                                ContactsTypeSet* _tmp121_;
 
2924
                                                                FolksPhoneFieldDetails* _tmp122_;
 
2925
                                                                FolksPhoneFieldDetails* _tmp123_;
 
2926
                                                                gconstpointer _tmp124_;
 
2927
                                                                const gchar* _tmp125_;
 
2928
                                                                const gchar* _tmp126_;
 
2929
                                                                GeeHashMap* _tmp127_;
 
2930
                                                                gint _tmp128_;
 
2931
                                                                FolksPhoneFieldDetails* _tmp129_;
 
2932
                                                                ContactsContactEditorRowData _tmp130_ = {0};
 
2933
                                                                gint _tmp131_;
 
2934
                                                                _tmp113_ = _phone_index;
 
2935
                                                                _phone_index = _tmp113_ + 1;
 
2936
                                                                _tmp114_ = _phone_index;
 
2937
                                                                _tmp115_ = _phone_size;
 
2938
                                                                if (!(_tmp114_ < _tmp115_)) {
 
2939
                                                                        break;
 
2940
                                                                }
 
2941
                                                                _tmp116_ = _phone_list;
 
2942
                                                                _tmp117_ = _phone_index;
 
2943
                                                                _tmp118_ = gee_abstract_list_get ((GeeAbstractList*) _tmp116_, _tmp117_);
 
2944
                                                                phone = (FolksPhoneFieldDetails*) _tmp118_;
 
2945
                                                                _tmp119_ = *row;
 
2946
                                                                _tmp120_ = contacts_typeset_get_phone ();
 
2947
                                                                _tmp121_ = _tmp120_;
 
2948
                                                                _tmp122_ = phone;
 
2949
                                                                _tmp123_ = phone;
 
2950
                                                                _tmp124_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp123_);
 
2951
                                                                _tmp125_ = _tmp124_;
 
2952
                                                                _tmp126_ = type;
 
2953
                                                                contacts_contact_editor_attach_row_with_entry (self, _tmp119_, _tmp121_, (FolksAbstractFieldDetails*) _tmp122_, (const gchar*) _tmp125_, _tmp126_);
 
2954
                                                                _tmp127_ = rows;
 
2955
                                                                _tmp128_ = *row;
 
2956
                                                                _tmp129_ = phone;
 
2957
                                                                _g_object_unref0 (_tmp130_.details);
 
2958
                                                                _tmp130_.details = (FolksAbstractFieldDetails*) _tmp129_;
 
2959
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp127_, (gpointer) ((gintptr) _tmp128_), &_tmp130_);
 
2960
                                                                _tmp131_ = *row;
 
2961
                                                                *row = _tmp131_ + 1;
 
2962
                                                                _g_object_unref0 (phone);
 
2963
                                                        }
 
2964
                                                        _g_object_unref0 (_phone_list);
 
2965
                                                }
 
2966
                                                _g_object_unref0 (phones);
 
2967
                                        }
 
2968
                                        _g_object_unref0 (details);
 
2969
                                }
 
2970
                                _tmp132_ = rows;
 
2971
                                _tmp133_ = gee_map_get_is_empty ((GeeMap*) _tmp132_);
 
2972
                                _tmp134_ = _tmp133_;
 
2973
                                if (!_tmp134_) {
 
2974
                                        GeeHashMap* _tmp135_;
 
2975
                                        FolksPersona* _tmp136_;
 
2976
                                        gpointer _tmp137_ = NULL;
 
2977
                                        GeeHashMap* _tmp138_;
 
2978
                                        const gchar* _tmp139_;
 
2979
                                        gboolean _tmp140_ = FALSE;
 
2980
                                        gboolean _tmp141_;
 
2981
                                        _tmp135_ = self->priv->writable_personas;
 
2982
                                        _tmp136_ = p;
 
2983
                                        _tmp137_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp135_, _tmp136_);
 
2984
                                        _tmp138_ = (GeeHashMap*) _tmp137_;
 
2985
                                        _tmp139_ = prop_name;
 
2986
                                        _tmp140_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp138_, _tmp139_);
 
2987
                                        _tmp141_ = _tmp140_;
 
2988
                                        _g_object_unref0 (_tmp138_);
 
2989
                                        if (_tmp141_) {
 
2990
                                                {
 
2991
                                                        GeeHashMap* _tmp142_;
 
2992
                                                        GeeSet* _tmp143_;
 
2993
                                                        GeeSet* _tmp144_;
 
2994
                                                        GeeSet* _tmp145_;
 
2995
                                                        GeeIterator* _tmp146_ = NULL;
 
2996
                                                        GeeIterator* _tmp147_;
 
2997
                                                        GeeIterator* _entry_it;
 
2998
                                                        _tmp142_ = rows;
 
2999
                                                        _tmp143_ = gee_abstract_map_get_entries ((GeeMap*) _tmp142_);
 
3000
                                                        _tmp144_ = _tmp143_;
 
3001
                                                        _tmp145_ = _tmp144_;
 
3002
                                                        _tmp146_ = gee_iterable_iterator ((GeeIterable*) _tmp145_);
 
3003
                                                        _tmp147_ = _tmp146_;
 
3004
                                                        _g_object_unref0 (_tmp145_);
 
3005
                                                        _entry_it = _tmp147_;
 
3006
                                                        while (TRUE) {
 
3007
                                                                GeeIterator* _tmp148_;
 
3008
                                                                gboolean _tmp149_ = FALSE;
 
3009
                                                                GeeIterator* _tmp150_;
 
3010
                                                                gpointer _tmp151_ = NULL;
 
3011
                                                                GeeMapEntry* entry;
 
3012
                                                                GeeHashMap* _tmp152_;
 
3013
                                                                FolksPersona* _tmp153_;
 
3014
                                                                gpointer _tmp154_ = NULL;
 
3015
                                                                GeeHashMap* _tmp155_;
 
3016
                                                                const gchar* _tmp156_;
 
3017
                                                                gpointer _tmp157_ = NULL;
 
3018
                                                                ContactsContactEditorField* _tmp158_;
 
3019
                                                                GeeHashMap* _tmp159_;
 
3020
                                                                GeeMapEntry* _tmp160_;
 
3021
                                                                gconstpointer _tmp161_;
 
3022
                                                                gint _tmp162_;
 
3023
                                                                GeeMapEntry* _tmp163_;
 
3024
                                                                gconstpointer _tmp164_;
 
3025
                                                                ContactsContactEditorRowData* _tmp165_;
 
3026
                                                                _tmp148_ = _entry_it;
 
3027
                                                                _tmp149_ = gee_iterator_next (_tmp148_);
 
3028
                                                                if (!_tmp149_) {
 
3029
                                                                        break;
 
3030
                                                                }
 
3031
                                                                _tmp150_ = _entry_it;
 
3032
                                                                _tmp151_ = gee_iterator_get (_tmp150_);
 
3033
                                                                entry = (GeeMapEntry*) _tmp151_;
 
3034
                                                                _tmp152_ = self->priv->writable_personas;
 
3035
                                                                _tmp153_ = p;
 
3036
                                                                _tmp154_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp152_, _tmp153_);
 
3037
                                                                _tmp155_ = (GeeHashMap*) _tmp154_;
 
3038
                                                                _tmp156_ = prop_name;
 
3039
                                                                _tmp157_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp155_, _tmp156_);
 
3040
                                                                _tmp158_ = (ContactsContactEditorField*) _tmp157_;
 
3041
                                                                _tmp159_ = (*_tmp158_).rows;
 
3042
                                                                _tmp160_ = entry;
 
3043
                                                                _tmp161_ = gee_map_entry_get_key (_tmp160_);
 
3044
                                                                _tmp162_ = _tmp161_;
 
3045
                                                                _tmp163_ = entry;
 
3046
                                                                _tmp164_ = gee_map_entry_get_value (_tmp163_);
 
3047
                                                                _tmp165_ = _tmp164_;
 
3048
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp159_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp162_))), (ContactsContactEditorRowData*) _tmp165_);
 
3049
                                                                _contacts_contact_editor_field_free0 (_tmp158_);
 
3050
                                                                _g_object_unref0 (_tmp155_);
 
3051
                                                                _g_object_unref0 (entry);
 
3052
                                                        }
 
3053
                                                        _g_object_unref0 (_entry_it);
 
3054
                                                }
 
3055
                                        } else {
 
3056
                                                GeeHashMap* _tmp166_;
 
3057
                                                FolksPersona* _tmp167_;
 
3058
                                                gpointer _tmp168_ = NULL;
 
3059
                                                GeeHashMap* _tmp169_;
 
3060
                                                const gchar* _tmp170_;
 
3061
                                                GeeHashMap* _tmp171_;
 
3062
                                                ContactsContactEditorField _tmp172_ = {0};
 
3063
                                                _tmp166_ = self->priv->writable_personas;
 
3064
                                                _tmp167_ = p;
 
3065
                                                _tmp168_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp166_, _tmp167_);
 
3066
                                                _tmp169_ = (GeeHashMap*) _tmp168_;
 
3067
                                                _tmp170_ = prop_name;
 
3068
                                                _tmp171_ = rows;
 
3069
                                                _tmp172_.changed = FALSE;
 
3070
                                                _g_object_unref0 (_tmp172_.rows);
 
3071
                                                _tmp172_.rows = _tmp171_;
 
3072
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp169_, _tmp170_, &_tmp172_);
 
3073
                                                _g_object_unref0 (_tmp169_);
 
3074
                                        }
 
3075
                                }
 
3076
                                _g_object_unref0 (rows);
 
3077
                                break;
 
3078
                        }
 
3079
                }
 
3080
        } else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("urls")))) {
 
3081
                switch (0) {
 
3082
                        default:
 
3083
                        {
 
3084
                                GeeHashMap* _tmp173_;
 
3085
                                GeeHashMap* rows;
 
3086
                                gboolean _tmp174_;
 
3087
                                GeeHashMap* _tmp206_;
 
3088
                                gboolean _tmp207_;
 
3089
                                gboolean _tmp208_;
 
3090
                                _tmp173_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3091
                                rows = _tmp173_;
 
3092
                                _tmp174_ = add_empty;
 
3093
                                if (_tmp174_) {
 
3094
                                        FolksUrlFieldDetails* _tmp175_;
 
3095
                                        FolksUrlFieldDetails* detail_field;
 
3096
                                        const gchar* _tmp176_ = NULL;
 
3097
                                        FolksUrlFieldDetails* _tmp177_;
 
3098
                                        gint _tmp178_;
 
3099
                                        GeeHashMap* _tmp179_;
 
3100
                                        gint _tmp180_;
 
3101
                                        FolksUrlFieldDetails* _tmp181_;
 
3102
                                        ContactsContactEditorRowData _tmp182_ = {0};
 
3103
                                        gint _tmp183_;
 
3104
                                        _tmp175_ = folks_url_field_details_new ("", NULL);
 
3105
                                        detail_field = _tmp175_;
 
3106
                                        _tmp176_ = _ ("Website");
 
3107
                                        _tmp177_ = detail_field;
 
3108
                                        _tmp178_ = *row;
 
3109
                                        contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp176_, (FolksAbstractFieldDetails*) _tmp177_, "", _tmp178_);
 
3110
                                        _tmp179_ = rows;
 
3111
                                        _tmp180_ = *row;
 
3112
                                        _tmp181_ = detail_field;
 
3113
                                        _g_object_unref0 (_tmp182_.details);
 
3114
                                        _tmp182_.details = (FolksAbstractFieldDetails*) _tmp181_;
 
3115
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp179_, (gpointer) ((gintptr) _tmp180_), &_tmp182_);
 
3116
                                        _tmp183_ = *row;
 
3117
                                        *row = _tmp183_ + 1;
 
3118
                                        _g_object_unref0 (detail_field);
 
3119
                                } else {
 
3120
                                        FolksPersona* _tmp184_;
 
3121
                                        FolksUrlDetails* _tmp185_;
 
3122
                                        FolksUrlDetails* url_details;
 
3123
                                        FolksUrlDetails* _tmp186_;
 
3124
                                        _tmp184_ = p;
 
3125
                                        _tmp185_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp184_, FOLKS_TYPE_URL_DETAILS) ? ((FolksUrlDetails*) _tmp184_) : NULL);
 
3126
                                        url_details = _tmp185_;
 
3127
                                        _tmp186_ = url_details;
 
3128
                                        if (_tmp186_ != NULL) {
 
3129
                                                {
 
3130
                                                        FolksUrlDetails* _tmp187_;
 
3131
                                                        GeeSet* _tmp188_;
 
3132
                                                        GeeSet* _tmp189_;
 
3133
                                                        GeeIterator* _tmp190_ = NULL;
 
3134
                                                        GeeIterator* _url_it;
 
3135
                                                        _tmp187_ = url_details;
 
3136
                                                        _tmp188_ = folks_url_details_get_urls (_tmp187_);
 
3137
                                                        _tmp189_ = _tmp188_;
 
3138
                                                        _tmp190_ = gee_iterable_iterator ((GeeIterable*) _tmp189_);
 
3139
                                                        _url_it = _tmp190_;
 
3140
                                                        while (TRUE) {
 
3141
                                                                GeeIterator* _tmp191_;
 
3142
                                                                gboolean _tmp192_ = FALSE;
 
3143
                                                                GeeIterator* _tmp193_;
 
3144
                                                                gpointer _tmp194_ = NULL;
 
3145
                                                                FolksUrlFieldDetails* url;
 
3146
                                                                const gchar* _tmp195_ = NULL;
 
3147
                                                                FolksUrlFieldDetails* _tmp196_;
 
3148
                                                                FolksUrlFieldDetails* _tmp197_;
 
3149
                                                                gconstpointer _tmp198_;
 
3150
                                                                const gchar* _tmp199_;
 
3151
                                                                gint _tmp200_;
 
3152
                                                                GeeHashMap* _tmp201_;
 
3153
                                                                gint _tmp202_;
 
3154
                                                                FolksUrlFieldDetails* _tmp203_;
 
3155
                                                                ContactsContactEditorRowData _tmp204_ = {0};
 
3156
                                                                gint _tmp205_;
 
3157
                                                                _tmp191_ = _url_it;
 
3158
                                                                _tmp192_ = gee_iterator_next (_tmp191_);
 
3159
                                                                if (!_tmp192_) {
 
3160
                                                                        break;
 
3161
                                                                }
 
3162
                                                                _tmp193_ = _url_it;
 
3163
                                                                _tmp194_ = gee_iterator_get (_tmp193_);
 
3164
                                                                url = (FolksUrlFieldDetails*) _tmp194_;
 
3165
                                                                _tmp195_ = _ ("Website");
 
3166
                                                                _tmp196_ = url;
 
3167
                                                                _tmp197_ = url;
 
3168
                                                                _tmp198_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp197_);
 
3169
                                                                _tmp199_ = _tmp198_;
 
3170
                                                                _tmp200_ = *row;
 
3171
                                                                contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp195_, (FolksAbstractFieldDetails*) _tmp196_, (const gchar*) _tmp199_, _tmp200_);
 
3172
                                                                _tmp201_ = rows;
 
3173
                                                                _tmp202_ = *row;
 
3174
                                                                _tmp203_ = url;
 
3175
                                                                _g_object_unref0 (_tmp204_.details);
 
3176
                                                                _tmp204_.details = (FolksAbstractFieldDetails*) _tmp203_;
 
3177
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp201_, (gpointer) ((gintptr) _tmp202_), &_tmp204_);
 
3178
                                                                _tmp205_ = *row;
 
3179
                                                                *row = _tmp205_ + 1;
 
3180
                                                                _g_object_unref0 (url);
 
3181
                                                        }
 
3182
                                                        _g_object_unref0 (_url_it);
 
3183
                                                }
 
3184
                                        }
 
3185
                                        _g_object_unref0 (url_details);
 
3186
                                }
 
3187
                                _tmp206_ = rows;
 
3188
                                _tmp207_ = gee_map_get_is_empty ((GeeMap*) _tmp206_);
 
3189
                                _tmp208_ = _tmp207_;
 
3190
                                if (!_tmp208_) {
 
3191
                                        GeeHashMap* _tmp209_;
 
3192
                                        FolksPersona* _tmp210_;
 
3193
                                        gpointer _tmp211_ = NULL;
 
3194
                                        GeeHashMap* _tmp212_;
 
3195
                                        const gchar* _tmp213_;
 
3196
                                        gboolean _tmp214_ = FALSE;
 
3197
                                        gboolean _tmp215_;
 
3198
                                        _tmp209_ = self->priv->writable_personas;
 
3199
                                        _tmp210_ = p;
 
3200
                                        _tmp211_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp209_, _tmp210_);
 
3201
                                        _tmp212_ = (GeeHashMap*) _tmp211_;
 
3202
                                        _tmp213_ = prop_name;
 
3203
                                        _tmp214_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp212_, _tmp213_);
 
3204
                                        _tmp215_ = _tmp214_;
 
3205
                                        _g_object_unref0 (_tmp212_);
 
3206
                                        if (_tmp215_) {
 
3207
                                                {
 
3208
                                                        GeeHashMap* _tmp216_;
 
3209
                                                        GeeSet* _tmp217_;
 
3210
                                                        GeeSet* _tmp218_;
 
3211
                                                        GeeSet* _tmp219_;
 
3212
                                                        GeeIterator* _tmp220_ = NULL;
 
3213
                                                        GeeIterator* _tmp221_;
 
3214
                                                        GeeIterator* _entry_it;
 
3215
                                                        _tmp216_ = rows;
 
3216
                                                        _tmp217_ = gee_abstract_map_get_entries ((GeeMap*) _tmp216_);
 
3217
                                                        _tmp218_ = _tmp217_;
 
3218
                                                        _tmp219_ = _tmp218_;
 
3219
                                                        _tmp220_ = gee_iterable_iterator ((GeeIterable*) _tmp219_);
 
3220
                                                        _tmp221_ = _tmp220_;
 
3221
                                                        _g_object_unref0 (_tmp219_);
 
3222
                                                        _entry_it = _tmp221_;
 
3223
                                                        while (TRUE) {
 
3224
                                                                GeeIterator* _tmp222_;
 
3225
                                                                gboolean _tmp223_ = FALSE;
 
3226
                                                                GeeIterator* _tmp224_;
 
3227
                                                                gpointer _tmp225_ = NULL;
 
3228
                                                                GeeMapEntry* entry;
 
3229
                                                                GeeHashMap* _tmp226_;
 
3230
                                                                FolksPersona* _tmp227_;
 
3231
                                                                gpointer _tmp228_ = NULL;
 
3232
                                                                GeeHashMap* _tmp229_;
 
3233
                                                                const gchar* _tmp230_;
 
3234
                                                                gpointer _tmp231_ = NULL;
 
3235
                                                                ContactsContactEditorField* _tmp232_;
 
3236
                                                                GeeHashMap* _tmp233_;
 
3237
                                                                GeeMapEntry* _tmp234_;
 
3238
                                                                gconstpointer _tmp235_;
 
3239
                                                                gint _tmp236_;
 
3240
                                                                GeeMapEntry* _tmp237_;
 
3241
                                                                gconstpointer _tmp238_;
 
3242
                                                                ContactsContactEditorRowData* _tmp239_;
 
3243
                                                                _tmp222_ = _entry_it;
 
3244
                                                                _tmp223_ = gee_iterator_next (_tmp222_);
 
3245
                                                                if (!_tmp223_) {
 
3246
                                                                        break;
 
3247
                                                                }
 
3248
                                                                _tmp224_ = _entry_it;
 
3249
                                                                _tmp225_ = gee_iterator_get (_tmp224_);
 
3250
                                                                entry = (GeeMapEntry*) _tmp225_;
 
3251
                                                                _tmp226_ = self->priv->writable_personas;
 
3252
                                                                _tmp227_ = p;
 
3253
                                                                _tmp228_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp226_, _tmp227_);
 
3254
                                                                _tmp229_ = (GeeHashMap*) _tmp228_;
 
3255
                                                                _tmp230_ = prop_name;
 
3256
                                                                _tmp231_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp229_, _tmp230_);
 
3257
                                                                _tmp232_ = (ContactsContactEditorField*) _tmp231_;
 
3258
                                                                _tmp233_ = (*_tmp232_).rows;
 
3259
                                                                _tmp234_ = entry;
 
3260
                                                                _tmp235_ = gee_map_entry_get_key (_tmp234_);
 
3261
                                                                _tmp236_ = _tmp235_;
 
3262
                                                                _tmp237_ = entry;
 
3263
                                                                _tmp238_ = gee_map_entry_get_value (_tmp237_);
 
3264
                                                                _tmp239_ = _tmp238_;
 
3265
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp233_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp236_))), (ContactsContactEditorRowData*) _tmp239_);
 
3266
                                                                _contacts_contact_editor_field_free0 (_tmp232_);
 
3267
                                                                _g_object_unref0 (_tmp229_);
 
3268
                                                                _g_object_unref0 (entry);
 
3269
                                                        }
 
3270
                                                        _g_object_unref0 (_entry_it);
 
3271
                                                }
 
3272
                                        } else {
 
3273
                                                GeeHashMap* _tmp240_;
 
3274
                                                FolksPersona* _tmp241_;
 
3275
                                                gpointer _tmp242_ = NULL;
 
3276
                                                GeeHashMap* _tmp243_;
 
3277
                                                const gchar* _tmp244_;
 
3278
                                                GeeHashMap* _tmp245_;
 
3279
                                                ContactsContactEditorField _tmp246_ = {0};
 
3280
                                                _tmp240_ = self->priv->writable_personas;
 
3281
                                                _tmp241_ = p;
 
3282
                                                _tmp242_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp240_, _tmp241_);
 
3283
                                                _tmp243_ = (GeeHashMap*) _tmp242_;
 
3284
                                                _tmp244_ = prop_name;
 
3285
                                                _tmp245_ = rows;
 
3286
                                                _tmp246_.changed = FALSE;
 
3287
                                                _g_object_unref0 (_tmp246_.rows);
 
3288
                                                _tmp246_.rows = _tmp245_;
 
3289
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp243_, _tmp244_, &_tmp246_);
 
3290
                                                _g_object_unref0 (_tmp243_);
 
3291
                                        }
 
3292
                                }
 
3293
                                _g_object_unref0 (rows);
 
3294
                                break;
 
3295
                        }
 
3296
                }
 
3297
        } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("nickname")))) {
 
3298
                switch (0) {
 
3299
                        default:
 
3300
                        {
 
3301
                                GeeHashMap* _tmp247_;
 
3302
                                GeeHashMap* rows;
 
3303
                                gboolean _tmp248_;
 
3304
                                GeeHashMap* _tmp271_;
 
3305
                                gboolean _tmp272_;
 
3306
                                gboolean _tmp273_;
 
3307
                                _tmp247_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3308
                                rows = _tmp247_;
 
3309
                                _tmp248_ = add_empty;
 
3310
                                if (_tmp248_) {
 
3311
                                        const gchar* _tmp249_ = NULL;
 
3312
                                        gint _tmp250_;
 
3313
                                        GeeHashMap* _tmp251_;
 
3314
                                        gint _tmp252_;
 
3315
                                        ContactsContactEditorRowData _tmp253_ = {0};
 
3316
                                        gint _tmp254_;
 
3317
                                        _tmp249_ = _ ("Nickname");
 
3318
                                        _tmp250_ = *row;
 
3319
                                        contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp249_, NULL, "", _tmp250_);
 
3320
                                        _tmp251_ = rows;
 
3321
                                        _tmp252_ = *row;
 
3322
                                        _g_object_unref0 (_tmp253_.details);
 
3323
                                        _tmp253_.details = NULL;
 
3324
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp251_, (gpointer) ((gintptr) _tmp252_), &_tmp253_);
 
3325
                                        _tmp254_ = *row;
 
3326
                                        *row = _tmp254_ + 1;
 
3327
                                } else {
 
3328
                                        FolksPersona* _tmp255_;
 
3329
                                        FolksNameDetails* _tmp256_;
 
3330
                                        FolksNameDetails* name_details;
 
3331
                                        FolksNameDetails* _tmp257_;
 
3332
                                        _tmp255_ = p;
 
3333
                                        _tmp256_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp255_, FOLKS_TYPE_NAME_DETAILS) ? ((FolksNameDetails*) _tmp255_) : NULL);
 
3334
                                        name_details = _tmp256_;
 
3335
                                        _tmp257_ = name_details;
 
3336
                                        if (_tmp257_ != NULL) {
 
3337
                                                FolksNameDetails* _tmp258_;
 
3338
                                                const gchar* _tmp259_;
 
3339
                                                const gchar* _tmp260_;
 
3340
                                                gboolean _tmp261_ = FALSE;
 
3341
                                                _tmp258_ = name_details;
 
3342
                                                _tmp259_ = folks_name_details_get_nickname (_tmp258_);
 
3343
                                                _tmp260_ = _tmp259_;
 
3344
                                                _tmp261_ = contacts_is_set (_tmp260_);
 
3345
                                                if (_tmp261_) {
 
3346
                                                        const gchar* _tmp262_ = NULL;
 
3347
                                                        FolksNameDetails* _tmp263_;
 
3348
                                                        const gchar* _tmp264_;
 
3349
                                                        const gchar* _tmp265_;
 
3350
                                                        gint _tmp266_;
 
3351
                                                        GeeHashMap* _tmp267_;
 
3352
                                                        gint _tmp268_;
 
3353
                                                        ContactsContactEditorRowData _tmp269_ = {0};
 
3354
                                                        gint _tmp270_;
 
3355
                                                        _tmp262_ = _ ("Nickname");
 
3356
                                                        _tmp263_ = name_details;
 
3357
                                                        _tmp264_ = folks_name_details_get_nickname (_tmp263_);
 
3358
                                                        _tmp265_ = _tmp264_;
 
3359
                                                        _tmp266_ = *row;
 
3360
                                                        contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp262_, NULL, _tmp265_, _tmp266_);
 
3361
                                                        _tmp267_ = rows;
 
3362
                                                        _tmp268_ = *row;
 
3363
                                                        _g_object_unref0 (_tmp269_.details);
 
3364
                                                        _tmp269_.details = NULL;
 
3365
                                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp267_, (gpointer) ((gintptr) _tmp268_), &_tmp269_);
 
3366
                                                        _tmp270_ = *row;
 
3367
                                                        *row = _tmp270_ + 1;
 
3368
                                                }
 
3369
                                        }
 
3370
                                        _g_object_unref0 (name_details);
 
3371
                                }
 
3372
                                _tmp271_ = rows;
 
3373
                                _tmp272_ = gee_map_get_is_empty ((GeeMap*) _tmp271_);
 
3374
                                _tmp273_ = _tmp272_;
 
3375
                                if (!_tmp273_) {
 
3376
                                        GeeHashMap* _tmp274_;
 
3377
                                        FolksPersona* _tmp275_;
 
3378
                                        gpointer _tmp276_ = NULL;
 
3379
                                        GeeHashMap* _tmp277_;
 
3380
                                        const gchar* _tmp278_;
 
3381
                                        gboolean _tmp279_ = FALSE;
 
3382
                                        gboolean _tmp280_;
 
3383
                                        _tmp274_ = self->priv->writable_personas;
 
3384
                                        _tmp275_ = p;
 
3385
                                        _tmp276_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp274_, _tmp275_);
 
3386
                                        _tmp277_ = (GeeHashMap*) _tmp276_;
 
3387
                                        _tmp278_ = prop_name;
 
3388
                                        _tmp279_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp277_, _tmp278_);
 
3389
                                        _tmp280_ = _tmp279_;
 
3390
                                        _g_object_unref0 (_tmp277_);
 
3391
                                        if (_tmp280_) {
 
3392
                                                {
 
3393
                                                        GeeHashMap* _tmp281_;
 
3394
                                                        GeeSet* _tmp282_;
 
3395
                                                        GeeSet* _tmp283_;
 
3396
                                                        GeeSet* _tmp284_;
 
3397
                                                        GeeIterator* _tmp285_ = NULL;
 
3398
                                                        GeeIterator* _tmp286_;
 
3399
                                                        GeeIterator* _entry_it;
 
3400
                                                        _tmp281_ = rows;
 
3401
                                                        _tmp282_ = gee_abstract_map_get_entries ((GeeMap*) _tmp281_);
 
3402
                                                        _tmp283_ = _tmp282_;
 
3403
                                                        _tmp284_ = _tmp283_;
 
3404
                                                        _tmp285_ = gee_iterable_iterator ((GeeIterable*) _tmp284_);
 
3405
                                                        _tmp286_ = _tmp285_;
 
3406
                                                        _g_object_unref0 (_tmp284_);
 
3407
                                                        _entry_it = _tmp286_;
 
3408
                                                        while (TRUE) {
 
3409
                                                                GeeIterator* _tmp287_;
 
3410
                                                                gboolean _tmp288_ = FALSE;
 
3411
                                                                GeeIterator* _tmp289_;
 
3412
                                                                gpointer _tmp290_ = NULL;
 
3413
                                                                GeeMapEntry* entry;
 
3414
                                                                GeeHashMap* _tmp291_;
 
3415
                                                                FolksPersona* _tmp292_;
 
3416
                                                                gpointer _tmp293_ = NULL;
 
3417
                                                                GeeHashMap* _tmp294_;
 
3418
                                                                const gchar* _tmp295_;
 
3419
                                                                gpointer _tmp296_ = NULL;
 
3420
                                                                ContactsContactEditorField* _tmp297_;
 
3421
                                                                GeeHashMap* _tmp298_;
 
3422
                                                                GeeMapEntry* _tmp299_;
 
3423
                                                                gconstpointer _tmp300_;
 
3424
                                                                gint _tmp301_;
 
3425
                                                                GeeMapEntry* _tmp302_;
 
3426
                                                                gconstpointer _tmp303_;
 
3427
                                                                ContactsContactEditorRowData* _tmp304_;
 
3428
                                                                _tmp287_ = _entry_it;
 
3429
                                                                _tmp288_ = gee_iterator_next (_tmp287_);
 
3430
                                                                if (!_tmp288_) {
 
3431
                                                                        break;
 
3432
                                                                }
 
3433
                                                                _tmp289_ = _entry_it;
 
3434
                                                                _tmp290_ = gee_iterator_get (_tmp289_);
 
3435
                                                                entry = (GeeMapEntry*) _tmp290_;
 
3436
                                                                _tmp291_ = self->priv->writable_personas;
 
3437
                                                                _tmp292_ = p;
 
3438
                                                                _tmp293_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp291_, _tmp292_);
 
3439
                                                                _tmp294_ = (GeeHashMap*) _tmp293_;
 
3440
                                                                _tmp295_ = prop_name;
 
3441
                                                                _tmp296_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp294_, _tmp295_);
 
3442
                                                                _tmp297_ = (ContactsContactEditorField*) _tmp296_;
 
3443
                                                                _tmp298_ = (*_tmp297_).rows;
 
3444
                                                                _tmp299_ = entry;
 
3445
                                                                _tmp300_ = gee_map_entry_get_key (_tmp299_);
 
3446
                                                                _tmp301_ = _tmp300_;
 
3447
                                                                _tmp302_ = entry;
 
3448
                                                                _tmp303_ = gee_map_entry_get_value (_tmp302_);
 
3449
                                                                _tmp304_ = _tmp303_;
 
3450
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp298_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp301_))), (ContactsContactEditorRowData*) _tmp304_);
 
3451
                                                                _contacts_contact_editor_field_free0 (_tmp297_);
 
3452
                                                                _g_object_unref0 (_tmp294_);
 
3453
                                                                _g_object_unref0 (entry);
 
3454
                                                        }
 
3455
                                                        _g_object_unref0 (_entry_it);
 
3456
                                                }
 
3457
                                        } else {
 
3458
                                                GeeHashMap* _tmp305_;
 
3459
                                                FolksPersona* _tmp306_;
 
3460
                                                gpointer _tmp307_ = NULL;
 
3461
                                                GeeHashMap* _tmp308_;
 
3462
                                                const gchar* _tmp309_;
 
3463
                                                GeeHashMap* _tmp310_;
 
3464
                                                ContactsContactEditorField _tmp311_ = {0};
 
3465
                                                _tmp305_ = self->priv->writable_personas;
 
3466
                                                _tmp306_ = p;
 
3467
                                                _tmp307_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp305_, _tmp306_);
 
3468
                                                _tmp308_ = (GeeHashMap*) _tmp307_;
 
3469
                                                _tmp309_ = prop_name;
 
3470
                                                _tmp310_ = rows;
 
3471
                                                _tmp311_.changed = FALSE;
 
3472
                                                _g_object_unref0 (_tmp311_.rows);
 
3473
                                                _tmp311_.rows = _tmp310_;
 
3474
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp308_, _tmp309_, &_tmp311_);
 
3475
                                                _g_object_unref0 (_tmp308_);
 
3476
                                        }
 
3477
                                }
 
3478
                                _g_object_unref0 (rows);
 
3479
                                break;
 
3480
                        }
 
3481
                }
 
3482
        } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("birthday")))) {
 
3483
                switch (0) {
 
3484
                        default:
 
3485
                        {
 
3486
                                GeeHashMap* _tmp312_;
 
3487
                                GeeHashMap* rows;
 
3488
                                gboolean _tmp313_;
 
3489
                                GeeHashMap* _tmp337_;
 
3490
                                gboolean _tmp338_;
 
3491
                                gboolean _tmp339_;
 
3492
                                _tmp312_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3493
                                rows = _tmp312_;
 
3494
                                _tmp313_ = add_empty;
 
3495
                                if (_tmp313_) {
 
3496
                                        GDateTime* _tmp314_;
 
3497
                                        GDateTime* today;
 
3498
                                        const gchar* _tmp315_ = NULL;
 
3499
                                        GDateTime* _tmp316_;
 
3500
                                        gint _tmp317_;
 
3501
                                        GeeHashMap* _tmp318_;
 
3502
                                        gint _tmp319_;
 
3503
                                        ContactsContactEditorRowData _tmp320_ = {0};
 
3504
                                        gint _tmp321_;
 
3505
                                        _tmp314_ = g_date_time_new_now_local ();
 
3506
                                        today = _tmp314_;
 
3507
                                        _tmp315_ = _ ("Birthday");
 
3508
                                        _tmp316_ = today;
 
3509
                                        _tmp317_ = *row;
 
3510
                                        contacts_contact_editor_attach_row_for_birthday (self, _tmp315_, NULL, _tmp316_, _tmp317_);
 
3511
                                        _tmp318_ = rows;
 
3512
                                        _tmp319_ = *row;
 
3513
                                        _g_object_unref0 (_tmp320_.details);
 
3514
                                        _tmp320_.details = NULL;
 
3515
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp318_, (gpointer) ((gintptr) _tmp319_), &_tmp320_);
 
3516
                                        _tmp321_ = *row;
 
3517
                                        *row = _tmp321_ + 1;
 
3518
                                        _g_date_time_unref0 (today);
 
3519
                                } else {
 
3520
                                        FolksPersona* _tmp322_;
 
3521
                                        FolksBirthdayDetails* _tmp323_;
 
3522
                                        FolksBirthdayDetails* birthday_details;
 
3523
                                        FolksBirthdayDetails* _tmp324_;
 
3524
                                        _tmp322_ = p;
 
3525
                                        _tmp323_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp322_, FOLKS_TYPE_BIRTHDAY_DETAILS) ? ((FolksBirthdayDetails*) _tmp322_) : NULL);
 
3526
                                        birthday_details = _tmp323_;
 
3527
                                        _tmp324_ = birthday_details;
 
3528
                                        if (_tmp324_ != NULL) {
 
3529
                                                FolksBirthdayDetails* _tmp325_;
 
3530
                                                GDateTime* _tmp326_;
 
3531
                                                GDateTime* _tmp327_;
 
3532
                                                _tmp325_ = birthday_details;
 
3533
                                                _tmp326_ = folks_birthday_details_get_birthday (_tmp325_);
 
3534
                                                _tmp327_ = _tmp326_;
 
3535
                                                if (_tmp327_ != NULL) {
 
3536
                                                        const gchar* _tmp328_ = NULL;
 
3537
                                                        FolksBirthdayDetails* _tmp329_;
 
3538
                                                        GDateTime* _tmp330_;
 
3539
                                                        GDateTime* _tmp331_;
 
3540
                                                        gint _tmp332_;
 
3541
                                                        GeeHashMap* _tmp333_;
 
3542
                                                        gint _tmp334_;
 
3543
                                                        ContactsContactEditorRowData _tmp335_ = {0};
 
3544
                                                        gint _tmp336_;
 
3545
                                                        _tmp328_ = _ ("Birthday");
 
3546
                                                        _tmp329_ = birthday_details;
 
3547
                                                        _tmp330_ = folks_birthday_details_get_birthday (_tmp329_);
 
3548
                                                        _tmp331_ = _tmp330_;
 
3549
                                                        _tmp332_ = *row;
 
3550
                                                        contacts_contact_editor_attach_row_for_birthday (self, _tmp328_, NULL, _tmp331_, _tmp332_);
 
3551
                                                        _tmp333_ = rows;
 
3552
                                                        _tmp334_ = *row;
 
3553
                                                        _g_object_unref0 (_tmp335_.details);
 
3554
                                                        _tmp335_.details = NULL;
 
3555
                                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp333_, (gpointer) ((gintptr) _tmp334_), &_tmp335_);
 
3556
                                                        _tmp336_ = *row;
 
3557
                                                        *row = _tmp336_ + 1;
 
3558
                                                }
 
3559
                                        }
 
3560
                                        _g_object_unref0 (birthday_details);
 
3561
                                }
 
3562
                                _tmp337_ = rows;
 
3563
                                _tmp338_ = gee_map_get_is_empty ((GeeMap*) _tmp337_);
 
3564
                                _tmp339_ = _tmp338_;
 
3565
                                if (!_tmp339_) {
 
3566
                                        GeeHashMap* _tmp340_;
 
3567
                                        FolksPersona* _tmp341_;
 
3568
                                        gpointer _tmp342_ = NULL;
 
3569
                                        GeeHashMap* _tmp343_;
 
3570
                                        const gchar* _tmp344_;
 
3571
                                        gboolean _tmp345_;
 
3572
                                        GeeHashMap* _tmp346_;
 
3573
                                        ContactsContactEditorField _tmp347_ = {0};
 
3574
                                        _tmp340_ = self->priv->writable_personas;
 
3575
                                        _tmp341_ = p;
 
3576
                                        _tmp342_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp340_, _tmp341_);
 
3577
                                        _tmp343_ = (GeeHashMap*) _tmp342_;
 
3578
                                        _tmp344_ = prop_name;
 
3579
                                        _tmp345_ = add_empty;
 
3580
                                        _tmp346_ = rows;
 
3581
                                        _tmp347_.changed = _tmp345_;
 
3582
                                        _g_object_unref0 (_tmp347_.rows);
 
3583
                                        _tmp347_.rows = _tmp346_;
 
3584
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp343_, _tmp344_, &_tmp347_);
 
3585
                                        _g_object_unref0 (_tmp343_);
 
3586
                                }
 
3587
                                _g_object_unref0 (rows);
 
3588
                                break;
 
3589
                        }
 
3590
                }
 
3591
        } else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("notes")))) {
 
3592
                switch (0) {
 
3593
                        default:
 
3594
                        {
 
3595
                                GeeHashMap* _tmp348_;
 
3596
                                GeeHashMap* rows;
 
3597
                                gboolean _tmp349_;
 
3598
                                GeeHashMap* _tmp384_;
 
3599
                                gboolean _tmp385_;
 
3600
                                gboolean _tmp386_;
 
3601
                                _tmp348_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3602
                                rows = _tmp348_;
 
3603
                                _tmp349_ = add_empty;
 
3604
                                if (_tmp349_) {
 
3605
                                        FolksNoteFieldDetails* _tmp350_;
 
3606
                                        FolksNoteFieldDetails* detail_field;
 
3607
                                        const gchar* _tmp351_ = NULL;
 
3608
                                        FolksNoteFieldDetails* _tmp352_;
 
3609
                                        gint _tmp353_;
 
3610
                                        GeeHashMap* _tmp354_;
 
3611
                                        gint _tmp355_;
 
3612
                                        FolksNoteFieldDetails* _tmp356_;
 
3613
                                        ContactsContactEditorRowData _tmp357_ = {0};
 
3614
                                        gint _tmp358_;
 
3615
                                        _tmp350_ = folks_note_field_details_new ("", NULL, NULL);
 
3616
                                        detail_field = _tmp350_;
 
3617
                                        _tmp351_ = _ ("Note");
 
3618
                                        _tmp352_ = detail_field;
 
3619
                                        _tmp353_ = *row;
 
3620
                                        contacts_contact_editor_attach_row_with_text_labeled (self, _tmp351_, (FolksAbstractFieldDetails*) _tmp352_, "", _tmp353_);
 
3621
                                        _tmp354_ = rows;
 
3622
                                        _tmp355_ = *row;
 
3623
                                        _tmp356_ = detail_field;
 
3624
                                        _g_object_unref0 (_tmp357_.details);
 
3625
                                        _tmp357_.details = (FolksAbstractFieldDetails*) _tmp356_;
 
3626
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp354_, (gpointer) ((gintptr) _tmp355_), &_tmp357_);
 
3627
                                        _tmp358_ = *row;
 
3628
                                        *row = _tmp358_ + 1;
 
3629
                                        _g_object_unref0 (detail_field);
 
3630
                                } else {
 
3631
                                        FolksPersona* _tmp359_;
 
3632
                                        FolksNoteDetails* _tmp360_;
 
3633
                                        FolksNoteDetails* note_details;
 
3634
                                        gboolean _tmp361_ = FALSE;
 
3635
                                        FolksNoteDetails* _tmp362_;
 
3636
                                        gboolean _tmp364_;
 
3637
                                        _tmp359_ = p;
 
3638
                                        _tmp360_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp359_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _tmp359_) : NULL);
 
3639
                                        note_details = _tmp360_;
 
3640
                                        _tmp362_ = note_details;
 
3641
                                        if (_tmp362_ != NULL) {
 
3642
                                                _tmp361_ = TRUE;
 
3643
                                        } else {
 
3644
                                                gboolean _tmp363_;
 
3645
                                                _tmp363_ = add_empty;
 
3646
                                                _tmp361_ = _tmp363_;
 
3647
                                        }
 
3648
                                        _tmp364_ = _tmp361_;
 
3649
                                        if (_tmp364_) {
 
3650
                                                {
 
3651
                                                        FolksNoteDetails* _tmp365_;
 
3652
                                                        GeeSet* _tmp366_;
 
3653
                                                        GeeSet* _tmp367_;
 
3654
                                                        GeeIterator* _tmp368_ = NULL;
 
3655
                                                        GeeIterator* _note_it;
 
3656
                                                        _tmp365_ = note_details;
 
3657
                                                        _tmp366_ = folks_note_details_get_notes (_tmp365_);
 
3658
                                                        _tmp367_ = _tmp366_;
 
3659
                                                        _tmp368_ = gee_iterable_iterator ((GeeIterable*) _tmp367_);
 
3660
                                                        _note_it = _tmp368_;
 
3661
                                                        while (TRUE) {
 
3662
                                                                GeeIterator* _tmp369_;
 
3663
                                                                gboolean _tmp370_ = FALSE;
 
3664
                                                                GeeIterator* _tmp371_;
 
3665
                                                                gpointer _tmp372_ = NULL;
 
3666
                                                                FolksNoteFieldDetails* note;
 
3667
                                                                const gchar* _tmp373_ = NULL;
 
3668
                                                                FolksNoteFieldDetails* _tmp374_;
 
3669
                                                                FolksNoteFieldDetails* _tmp375_;
 
3670
                                                                gconstpointer _tmp376_;
 
3671
                                                                const gchar* _tmp377_;
 
3672
                                                                gint _tmp378_;
 
3673
                                                                GeeHashMap* _tmp379_;
 
3674
                                                                gint _tmp380_;
 
3675
                                                                FolksNoteFieldDetails* _tmp381_;
 
3676
                                                                ContactsContactEditorRowData _tmp382_ = {0};
 
3677
                                                                gint _tmp383_;
 
3678
                                                                _tmp369_ = _note_it;
 
3679
                                                                _tmp370_ = gee_iterator_next (_tmp369_);
 
3680
                                                                if (!_tmp370_) {
 
3681
                                                                        break;
 
3682
                                                                }
 
3683
                                                                _tmp371_ = _note_it;
 
3684
                                                                _tmp372_ = gee_iterator_get (_tmp371_);
 
3685
                                                                note = (FolksNoteFieldDetails*) _tmp372_;
 
3686
                                                                _tmp373_ = _ ("Note");
 
3687
                                                                _tmp374_ = note;
 
3688
                                                                _tmp375_ = note;
 
3689
                                                                _tmp376_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp375_);
 
3690
                                                                _tmp377_ = _tmp376_;
 
3691
                                                                _tmp378_ = *row;
 
3692
                                                                contacts_contact_editor_attach_row_with_text_labeled (self, _tmp373_, (FolksAbstractFieldDetails*) _tmp374_, (const gchar*) _tmp377_, _tmp378_);
 
3693
                                                                _tmp379_ = rows;
 
3694
                                                                _tmp380_ = *row;
 
3695
                                                                _tmp381_ = note;
 
3696
                                                                _g_object_unref0 (_tmp382_.details);
 
3697
                                                                _tmp382_.details = (FolksAbstractFieldDetails*) _tmp381_;
 
3698
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp379_, (gpointer) ((gintptr) _tmp380_), &_tmp382_);
 
3699
                                                                _tmp383_ = *row;
 
3700
                                                                *row = _tmp383_ + 1;
 
3701
                                                                _g_object_unref0 (note);
 
3702
                                                        }
 
3703
                                                        _g_object_unref0 (_note_it);
 
3704
                                                }
 
3705
                                        }
 
3706
                                        _g_object_unref0 (note_details);
 
3707
                                }
 
3708
                                _tmp384_ = rows;
 
3709
                                _tmp385_ = gee_map_get_is_empty ((GeeMap*) _tmp384_);
 
3710
                                _tmp386_ = _tmp385_;
 
3711
                                if (!_tmp386_) {
 
3712
                                        GeeHashMap* _tmp387_;
 
3713
                                        FolksPersona* _tmp388_;
 
3714
                                        gpointer _tmp389_ = NULL;
 
3715
                                        GeeHashMap* _tmp390_;
 
3716
                                        const gchar* _tmp391_;
 
3717
                                        gboolean _tmp392_ = FALSE;
 
3718
                                        gboolean _tmp393_;
 
3719
                                        _tmp387_ = self->priv->writable_personas;
 
3720
                                        _tmp388_ = p;
 
3721
                                        _tmp389_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp387_, _tmp388_);
 
3722
                                        _tmp390_ = (GeeHashMap*) _tmp389_;
 
3723
                                        _tmp391_ = prop_name;
 
3724
                                        _tmp392_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp390_, _tmp391_);
 
3725
                                        _tmp393_ = _tmp392_;
 
3726
                                        _g_object_unref0 (_tmp390_);
 
3727
                                        if (_tmp393_) {
 
3728
                                                {
 
3729
                                                        GeeHashMap* _tmp394_;
 
3730
                                                        GeeSet* _tmp395_;
 
3731
                                                        GeeSet* _tmp396_;
 
3732
                                                        GeeSet* _tmp397_;
 
3733
                                                        GeeIterator* _tmp398_ = NULL;
 
3734
                                                        GeeIterator* _tmp399_;
 
3735
                                                        GeeIterator* _entry_it;
 
3736
                                                        _tmp394_ = rows;
 
3737
                                                        _tmp395_ = gee_abstract_map_get_entries ((GeeMap*) _tmp394_);
 
3738
                                                        _tmp396_ = _tmp395_;
 
3739
                                                        _tmp397_ = _tmp396_;
 
3740
                                                        _tmp398_ = gee_iterable_iterator ((GeeIterable*) _tmp397_);
 
3741
                                                        _tmp399_ = _tmp398_;
 
3742
                                                        _g_object_unref0 (_tmp397_);
 
3743
                                                        _entry_it = _tmp399_;
 
3744
                                                        while (TRUE) {
 
3745
                                                                GeeIterator* _tmp400_;
 
3746
                                                                gboolean _tmp401_ = FALSE;
 
3747
                                                                GeeIterator* _tmp402_;
 
3748
                                                                gpointer _tmp403_ = NULL;
 
3749
                                                                GeeMapEntry* entry;
 
3750
                                                                GeeHashMap* _tmp404_;
 
3751
                                                                FolksPersona* _tmp405_;
 
3752
                                                                gpointer _tmp406_ = NULL;
 
3753
                                                                GeeHashMap* _tmp407_;
 
3754
                                                                const gchar* _tmp408_;
 
3755
                                                                gpointer _tmp409_ = NULL;
 
3756
                                                                ContactsContactEditorField* _tmp410_;
 
3757
                                                                GeeHashMap* _tmp411_;
 
3758
                                                                GeeMapEntry* _tmp412_;
 
3759
                                                                gconstpointer _tmp413_;
 
3760
                                                                gint _tmp414_;
 
3761
                                                                GeeMapEntry* _tmp415_;
 
3762
                                                                gconstpointer _tmp416_;
 
3763
                                                                ContactsContactEditorRowData* _tmp417_;
 
3764
                                                                _tmp400_ = _entry_it;
 
3765
                                                                _tmp401_ = gee_iterator_next (_tmp400_);
 
3766
                                                                if (!_tmp401_) {
 
3767
                                                                        break;
 
3768
                                                                }
 
3769
                                                                _tmp402_ = _entry_it;
 
3770
                                                                _tmp403_ = gee_iterator_get (_tmp402_);
 
3771
                                                                entry = (GeeMapEntry*) _tmp403_;
 
3772
                                                                _tmp404_ = self->priv->writable_personas;
 
3773
                                                                _tmp405_ = p;
 
3774
                                                                _tmp406_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp404_, _tmp405_);
 
3775
                                                                _tmp407_ = (GeeHashMap*) _tmp406_;
 
3776
                                                                _tmp408_ = prop_name;
 
3777
                                                                _tmp409_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp407_, _tmp408_);
 
3778
                                                                _tmp410_ = (ContactsContactEditorField*) _tmp409_;
 
3779
                                                                _tmp411_ = (*_tmp410_).rows;
 
3780
                                                                _tmp412_ = entry;
 
3781
                                                                _tmp413_ = gee_map_entry_get_key (_tmp412_);
 
3782
                                                                _tmp414_ = _tmp413_;
 
3783
                                                                _tmp415_ = entry;
 
3784
                                                                _tmp416_ = gee_map_entry_get_value (_tmp415_);
 
3785
                                                                _tmp417_ = _tmp416_;
 
3786
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp411_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp414_))), (ContactsContactEditorRowData*) _tmp417_);
 
3787
                                                                _contacts_contact_editor_field_free0 (_tmp410_);
 
3788
                                                                _g_object_unref0 (_tmp407_);
 
3789
                                                                _g_object_unref0 (entry);
 
3790
                                                        }
 
3791
                                                        _g_object_unref0 (_entry_it);
 
3792
                                                }
 
3793
                                        } else {
 
3794
                                                GeeHashMap* _tmp418_;
 
3795
                                                FolksPersona* _tmp419_;
 
3796
                                                gpointer _tmp420_ = NULL;
 
3797
                                                GeeHashMap* _tmp421_;
 
3798
                                                const gchar* _tmp422_;
 
3799
                                                GeeHashMap* _tmp423_;
 
3800
                                                ContactsContactEditorField _tmp424_ = {0};
 
3801
                                                _tmp418_ = self->priv->writable_personas;
 
3802
                                                _tmp419_ = p;
 
3803
                                                _tmp420_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp418_, _tmp419_);
 
3804
                                                _tmp421_ = (GeeHashMap*) _tmp420_;
 
3805
                                                _tmp422_ = prop_name;
 
3806
                                                _tmp423_ = rows;
 
3807
                                                _tmp424_.changed = FALSE;
 
3808
                                                _g_object_unref0 (_tmp424_.rows);
 
3809
                                                _tmp424_.rows = _tmp423_;
 
3810
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp421_, _tmp422_, &_tmp424_);
 
3811
                                                _g_object_unref0 (_tmp421_);
 
3812
                                        }
 
3813
                                }
 
3814
                                _g_object_unref0 (rows);
 
3815
                                break;
 
3816
                        }
 
3817
                }
 
3818
        } else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("postal-addresses")))) {
 
3819
                switch (0) {
 
3820
                        default:
 
3821
                        {
 
3822
                                GeeHashMap* _tmp425_;
 
3823
                                GeeHashMap* rows;
 
3824
                                gboolean _tmp426_;
 
3825
                                GeeHashMap* _tmp462_;
 
3826
                                gboolean _tmp463_;
 
3827
                                gboolean _tmp464_;
 
3828
                                _tmp425_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3829
                                rows = _tmp425_;
 
3830
                                _tmp426_ = add_empty;
 
3831
                                if (_tmp426_) {
 
3832
                                        FolksPostalAddress* _tmp427_;
 
3833
                                        FolksPostalAddress* _tmp428_;
 
3834
                                        FolksPostalAddressFieldDetails* _tmp429_;
 
3835
                                        FolksPostalAddressFieldDetails* _tmp430_;
 
3836
                                        FolksPostalAddressFieldDetails* detail_field;
 
3837
                                        gint _tmp431_;
 
3838
                                        ContactsTypeSet* _tmp432_;
 
3839
                                        ContactsTypeSet* _tmp433_;
 
3840
                                        FolksPostalAddressFieldDetails* _tmp434_;
 
3841
                                        const gchar* _tmp435_;
 
3842
                                        GeeHashMap* _tmp436_;
 
3843
                                        gint _tmp437_;
 
3844
                                        FolksPostalAddressFieldDetails* _tmp438_;
 
3845
                                        ContactsContactEditorRowData _tmp439_ = {0};
 
3846
                                        gint _tmp440_;
 
3847
                                        _tmp427_ = folks_postal_address_new (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
3848
                                        _tmp428_ = _tmp427_;
 
3849
                                        _tmp429_ = folks_postal_address_field_details_new (_tmp428_, NULL);
 
3850
                                        _tmp430_ = _tmp429_;
 
3851
                                        _g_object_unref0 (_tmp428_);
 
3852
                                        detail_field = _tmp430_;
 
3853
                                        _tmp431_ = *row;
 
3854
                                        _tmp432_ = contacts_typeset_get_general ();
 
3855
                                        _tmp433_ = _tmp432_;
 
3856
                                        _tmp434_ = detail_field;
 
3857
                                        _tmp435_ = type;
 
3858
                                        contacts_contact_editor_attach_row_for_address (self, _tmp431_, _tmp433_, _tmp434_, _tmp435_);
 
3859
                                        _tmp436_ = rows;
 
3860
                                        _tmp437_ = *row;
 
3861
                                        _tmp438_ = detail_field;
 
3862
                                        _g_object_unref0 (_tmp439_.details);
 
3863
                                        _tmp439_.details = (FolksAbstractFieldDetails*) _tmp438_;
 
3864
                                        gee_abstract_map_set ((GeeAbstractMap*) _tmp436_, (gpointer) ((gintptr) _tmp437_), &_tmp439_);
 
3865
                                        _tmp440_ = *row;
 
3866
                                        *row = _tmp440_ + 1;
 
3867
                                        _g_object_unref0 (detail_field);
 
3868
                                } else {
 
3869
                                        FolksPersona* _tmp441_;
 
3870
                                        FolksPostalAddressDetails* _tmp442_;
 
3871
                                        FolksPostalAddressDetails* address_details;
 
3872
                                        FolksPostalAddressDetails* _tmp443_;
 
3873
                                        _tmp441_ = p;
 
3874
                                        _tmp442_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp441_, FOLKS_TYPE_POSTAL_ADDRESS_DETAILS) ? ((FolksPostalAddressDetails*) _tmp441_) : NULL);
 
3875
                                        address_details = _tmp442_;
 
3876
                                        _tmp443_ = address_details;
 
3877
                                        if (_tmp443_ != NULL) {
 
3878
                                                {
 
3879
                                                        FolksPostalAddressDetails* _tmp444_;
 
3880
                                                        GeeSet* _tmp445_;
 
3881
                                                        GeeSet* _tmp446_;
 
3882
                                                        GeeIterator* _tmp447_ = NULL;
 
3883
                                                        GeeIterator* _addr_it;
 
3884
                                                        _tmp444_ = address_details;
 
3885
                                                        _tmp445_ = folks_postal_address_details_get_postal_addresses (_tmp444_);
 
3886
                                                        _tmp446_ = _tmp445_;
 
3887
                                                        _tmp447_ = gee_iterable_iterator ((GeeIterable*) _tmp446_);
 
3888
                                                        _addr_it = _tmp447_;
 
3889
                                                        while (TRUE) {
 
3890
                                                                GeeIterator* _tmp448_;
 
3891
                                                                gboolean _tmp449_ = FALSE;
 
3892
                                                                GeeIterator* _tmp450_;
 
3893
                                                                gpointer _tmp451_ = NULL;
 
3894
                                                                FolksPostalAddressFieldDetails* addr;
 
3895
                                                                gint _tmp452_;
 
3896
                                                                ContactsTypeSet* _tmp453_;
 
3897
                                                                ContactsTypeSet* _tmp454_;
 
3898
                                                                FolksPostalAddressFieldDetails* _tmp455_;
 
3899
                                                                const gchar* _tmp456_;
 
3900
                                                                GeeHashMap* _tmp457_;
 
3901
                                                                gint _tmp458_;
 
3902
                                                                FolksPostalAddressFieldDetails* _tmp459_;
 
3903
                                                                ContactsContactEditorRowData _tmp460_ = {0};
 
3904
                                                                gint _tmp461_;
 
3905
                                                                _tmp448_ = _addr_it;
 
3906
                                                                _tmp449_ = gee_iterator_next (_tmp448_);
 
3907
                                                                if (!_tmp449_) {
 
3908
                                                                        break;
 
3909
                                                                }
 
3910
                                                                _tmp450_ = _addr_it;
 
3911
                                                                _tmp451_ = gee_iterator_get (_tmp450_);
 
3912
                                                                addr = (FolksPostalAddressFieldDetails*) _tmp451_;
 
3913
                                                                _tmp452_ = *row;
 
3914
                                                                _tmp453_ = contacts_typeset_get_general ();
 
3915
                                                                _tmp454_ = _tmp453_;
 
3916
                                                                _tmp455_ = addr;
 
3917
                                                                _tmp456_ = type;
 
3918
                                                                contacts_contact_editor_attach_row_for_address (self, _tmp452_, _tmp454_, _tmp455_, _tmp456_);
 
3919
                                                                _tmp457_ = rows;
 
3920
                                                                _tmp458_ = *row;
 
3921
                                                                _tmp459_ = addr;
 
3922
                                                                _g_object_unref0 (_tmp460_.details);
 
3923
                                                                _tmp460_.details = (FolksAbstractFieldDetails*) _tmp459_;
 
3924
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp457_, (gpointer) ((gintptr) _tmp458_), &_tmp460_);
 
3925
                                                                _tmp461_ = *row;
 
3926
                                                                *row = _tmp461_ + 1;
 
3927
                                                                _g_object_unref0 (addr);
 
3928
                                                        }
 
3929
                                                        _g_object_unref0 (_addr_it);
 
3930
                                                }
 
3931
                                        }
 
3932
                                        _g_object_unref0 (address_details);
 
3933
                                }
 
3934
                                _tmp462_ = rows;
 
3935
                                _tmp463_ = gee_map_get_is_empty ((GeeMap*) _tmp462_);
 
3936
                                _tmp464_ = _tmp463_;
 
3937
                                if (!_tmp464_) {
 
3938
                                        GeeHashMap* _tmp465_;
 
3939
                                        FolksPersona* _tmp466_;
 
3940
                                        gpointer _tmp467_ = NULL;
 
3941
                                        GeeHashMap* _tmp468_;
 
3942
                                        const gchar* _tmp469_;
 
3943
                                        gboolean _tmp470_ = FALSE;
 
3944
                                        gboolean _tmp471_;
 
3945
                                        _tmp465_ = self->priv->writable_personas;
 
3946
                                        _tmp466_ = p;
 
3947
                                        _tmp467_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp465_, _tmp466_);
 
3948
                                        _tmp468_ = (GeeHashMap*) _tmp467_;
 
3949
                                        _tmp469_ = prop_name;
 
3950
                                        _tmp470_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp468_, _tmp469_);
 
3951
                                        _tmp471_ = _tmp470_;
 
3952
                                        _g_object_unref0 (_tmp468_);
 
3953
                                        if (_tmp471_) {
 
3954
                                                {
 
3955
                                                        GeeHashMap* _tmp472_;
 
3956
                                                        GeeSet* _tmp473_;
 
3957
                                                        GeeSet* _tmp474_;
 
3958
                                                        GeeSet* _tmp475_;
 
3959
                                                        GeeIterator* _tmp476_ = NULL;
 
3960
                                                        GeeIterator* _tmp477_;
 
3961
                                                        GeeIterator* _entry_it;
 
3962
                                                        _tmp472_ = rows;
 
3963
                                                        _tmp473_ = gee_abstract_map_get_entries ((GeeMap*) _tmp472_);
 
3964
                                                        _tmp474_ = _tmp473_;
 
3965
                                                        _tmp475_ = _tmp474_;
 
3966
                                                        _tmp476_ = gee_iterable_iterator ((GeeIterable*) _tmp475_);
 
3967
                                                        _tmp477_ = _tmp476_;
 
3968
                                                        _g_object_unref0 (_tmp475_);
 
3969
                                                        _entry_it = _tmp477_;
 
3970
                                                        while (TRUE) {
 
3971
                                                                GeeIterator* _tmp478_;
 
3972
                                                                gboolean _tmp479_ = FALSE;
 
3973
                                                                GeeIterator* _tmp480_;
 
3974
                                                                gpointer _tmp481_ = NULL;
 
3975
                                                                GeeMapEntry* entry;
 
3976
                                                                GeeHashMap* _tmp482_;
 
3977
                                                                FolksPersona* _tmp483_;
 
3978
                                                                gpointer _tmp484_ = NULL;
 
3979
                                                                GeeHashMap* _tmp485_;
 
3980
                                                                const gchar* _tmp486_;
 
3981
                                                                gpointer _tmp487_ = NULL;
 
3982
                                                                ContactsContactEditorField* _tmp488_;
 
3983
                                                                GeeHashMap* _tmp489_;
 
3984
                                                                GeeMapEntry* _tmp490_;
 
3985
                                                                gconstpointer _tmp491_;
 
3986
                                                                gint _tmp492_;
 
3987
                                                                GeeMapEntry* _tmp493_;
 
3988
                                                                gconstpointer _tmp494_;
 
3989
                                                                ContactsContactEditorRowData* _tmp495_;
 
3990
                                                                _tmp478_ = _entry_it;
 
3991
                                                                _tmp479_ = gee_iterator_next (_tmp478_);
 
3992
                                                                if (!_tmp479_) {
 
3993
                                                                        break;
 
3994
                                                                }
 
3995
                                                                _tmp480_ = _entry_it;
 
3996
                                                                _tmp481_ = gee_iterator_get (_tmp480_);
 
3997
                                                                entry = (GeeMapEntry*) _tmp481_;
 
3998
                                                                _tmp482_ = self->priv->writable_personas;
 
3999
                                                                _tmp483_ = p;
 
4000
                                                                _tmp484_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp482_, _tmp483_);
 
4001
                                                                _tmp485_ = (GeeHashMap*) _tmp484_;
 
4002
                                                                _tmp486_ = prop_name;
 
4003
                                                                _tmp487_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp485_, _tmp486_);
 
4004
                                                                _tmp488_ = (ContactsContactEditorField*) _tmp487_;
 
4005
                                                                _tmp489_ = (*_tmp488_).rows;
 
4006
                                                                _tmp490_ = entry;
 
4007
                                                                _tmp491_ = gee_map_entry_get_key (_tmp490_);
 
4008
                                                                _tmp492_ = _tmp491_;
 
4009
                                                                _tmp493_ = entry;
 
4010
                                                                _tmp494_ = gee_map_entry_get_value (_tmp493_);
 
4011
                                                                _tmp495_ = _tmp494_;
 
4012
                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp489_, (gpointer) ((gintptr) ((gint) ((gintptr) _tmp492_))), (ContactsContactEditorRowData*) _tmp495_);
 
4013
                                                                _contacts_contact_editor_field_free0 (_tmp488_);
 
4014
                                                                _g_object_unref0 (_tmp485_);
 
4015
                                                                _g_object_unref0 (entry);
 
4016
                                                        }
 
4017
                                                        _g_object_unref0 (_entry_it);
 
4018
                                                }
 
4019
                                        } else {
 
4020
                                                GeeHashMap* _tmp496_;
 
4021
                                                FolksPersona* _tmp497_;
 
4022
                                                gpointer _tmp498_ = NULL;
 
4023
                                                GeeHashMap* _tmp499_;
 
4024
                                                const gchar* _tmp500_;
 
4025
                                                GeeHashMap* _tmp501_;
 
4026
                                                ContactsContactEditorField _tmp502_ = {0};
 
4027
                                                _tmp496_ = self->priv->writable_personas;
 
4028
                                                _tmp497_ = p;
 
4029
                                                _tmp498_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp496_, _tmp497_);
 
4030
                                                _tmp499_ = (GeeHashMap*) _tmp498_;
 
4031
                                                _tmp500_ = prop_name;
 
4032
                                                _tmp501_ = rows;
 
4033
                                                _tmp502_.changed = FALSE;
 
4034
                                                _g_object_unref0 (_tmp502_.rows);
 
4035
                                                _tmp502_.rows = _tmp501_;
 
4036
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp499_, _tmp500_, &_tmp502_);
 
4037
                                                _g_object_unref0 (_tmp499_);
 
4038
                                        }
 
4039
                                }
 
4040
                                _g_object_unref0 (rows);
 
4041
                                break;
 
4042
                        }
 
4043
                }
 
4044
        }
 
4045
}
 
4046
 
 
4047
 
 
4048
static void contacts_contact_editor_insert_row_at (ContactsContactEditor* self, gint idx) {
 
4049
        gint _tmp55_;
 
4050
        g_return_if_fail (self != NULL);
 
4051
        {
 
4052
                GeeHashMap* _tmp0_;
 
4053
                GeeCollection* _tmp1_;
 
4054
                GeeCollection* _tmp2_;
 
4055
                GeeCollection* _tmp3_;
 
4056
                GeeIterator* _tmp4_ = NULL;
 
4057
                GeeIterator* _tmp5_;
 
4058
                GeeIterator* _field_maps_it;
 
4059
                _tmp0_ = self->priv->writable_personas;
 
4060
                _tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
 
4061
                _tmp2_ = _tmp1_;
 
4062
                _tmp3_ = _tmp2_;
 
4063
                _tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
 
4064
                _tmp5_ = _tmp4_;
 
4065
                _g_object_unref0 (_tmp3_);
 
4066
                _field_maps_it = _tmp5_;
 
4067
                while (TRUE) {
 
4068
                        GeeIterator* _tmp6_;
 
4069
                        gboolean _tmp7_ = FALSE;
 
4070
                        GeeIterator* _tmp8_;
 
4071
                        gpointer _tmp9_ = NULL;
 
4072
                        GeeHashMap* field_maps;
 
4073
                        _tmp6_ = _field_maps_it;
 
4074
                        _tmp7_ = gee_iterator_next (_tmp6_);
 
4075
                        if (!_tmp7_) {
 
4076
                                break;
 
4077
                        }
 
4078
                        _tmp8_ = _field_maps_it;
 
4079
                        _tmp9_ = gee_iterator_get (_tmp8_);
 
4080
                        field_maps = (GeeHashMap*) _tmp9_;
 
4081
                        {
 
4082
                                GeeHashMap* _tmp10_;
 
4083
                                GeeCollection* _tmp11_;
 
4084
                                GeeCollection* _tmp12_;
 
4085
                                GeeCollection* _tmp13_;
 
4086
                                GeeIterator* _tmp14_ = NULL;
 
4087
                                GeeIterator* _tmp15_;
 
4088
                                GeeIterator* _field_it;
 
4089
                                _tmp10_ = field_maps;
 
4090
                                _tmp11_ = gee_abstract_map_get_values ((GeeMap*) _tmp10_);
 
4091
                                _tmp12_ = _tmp11_;
 
4092
                                _tmp13_ = _tmp12_;
 
4093
                                _tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
 
4094
                                _tmp15_ = _tmp14_;
 
4095
                                _g_object_unref0 (_tmp13_);
 
4096
                                _field_it = _tmp15_;
 
4097
                                while (TRUE) {
 
4098
                                        GeeIterator* _tmp16_;
 
4099
                                        gboolean _tmp17_ = FALSE;
 
4100
                                        GeeIterator* _tmp18_;
 
4101
                                        gpointer _tmp19_ = NULL;
 
4102
                                        ContactsContactEditorField* field;
 
4103
                                        _tmp16_ = _field_it;
 
4104
                                        _tmp17_ = gee_iterator_next (_tmp16_);
 
4105
                                        if (!_tmp17_) {
 
4106
                                                break;
 
4107
                                        }
 
4108
                                        _tmp18_ = _field_it;
 
4109
                                        _tmp19_ = gee_iterator_get (_tmp18_);
 
4110
                                        field = (ContactsContactEditorField*) _tmp19_;
 
4111
                                        {
 
4112
                                                ContactsContactEditorField* _tmp20_;
 
4113
                                                GeeHashMap* _tmp21_;
 
4114
                                                GeeSet* _tmp22_;
 
4115
                                                GeeSet* _tmp23_;
 
4116
                                                GeeSet* _tmp24_;
 
4117
                                                GeeIterator* _tmp25_ = NULL;
 
4118
                                                GeeIterator* _tmp26_;
 
4119
                                                GeeIterator* _row_it;
 
4120
                                                _tmp20_ = field;
 
4121
                                                _tmp21_ = (*_tmp20_).rows;
 
4122
                                                _tmp22_ = gee_abstract_map_get_keys ((GeeMap*) _tmp21_);
 
4123
                                                _tmp23_ = _tmp22_;
 
4124
                                                _tmp24_ = _tmp23_;
 
4125
                                                _tmp25_ = gee_iterable_iterator ((GeeIterable*) _tmp24_);
 
4126
                                                _tmp26_ = _tmp25_;
 
4127
                                                _g_object_unref0 (_tmp24_);
 
4128
                                                _row_it = _tmp26_;
 
4129
                                                while (TRUE) {
 
4130
                                                        GeeIterator* _tmp27_;
 
4131
                                                        gboolean _tmp28_ = FALSE;
 
4132
                                                        GeeIterator* _tmp29_;
 
4133
                                                        gpointer _tmp30_ = NULL;
 
4134
                                                        gint row;
 
4135
                                                        gint _tmp31_;
 
4136
                                                        gint _tmp32_;
 
4137
                                                        _tmp27_ = _row_it;
 
4138
                                                        _tmp28_ = gee_iterator_next (_tmp27_);
 
4139
                                                        if (!_tmp28_) {
 
4140
                                                                break;
 
4141
                                                        }
 
4142
                                                        _tmp29_ = _row_it;
 
4143
                                                        _tmp30_ = gee_iterator_get (_tmp29_);
 
4144
                                                        row = (gint) ((gintptr) _tmp30_);
 
4145
                                                        _tmp31_ = row;
 
4146
                                                        _tmp32_ = idx;
 
4147
                                                        if (_tmp31_ >= _tmp32_) {
 
4148
                                                                GeeHashMap* _tmp33_;
 
4149
                                                                GeeHashMap* new_rows;
 
4150
                                                                ContactsContactEditorField* _tmp52_;
 
4151
                                                                GeeHashMap* _tmp53_;
 
4152
                                                                GeeHashMap* _tmp54_;
 
4153
                                                                _tmp33_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, CONTACTS_CONTACT_EDITOR_TYPE_ROW_DATA, (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, contacts_contact_editor_row_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
4154
                                                                new_rows = _tmp33_;
 
4155
                                                                {
 
4156
                                                                        ContactsContactEditorField* _tmp34_;
 
4157
                                                                        GeeHashMap* _tmp35_;
 
4158
                                                                        GeeSet* _tmp36_;
 
4159
                                                                        GeeSet* _tmp37_;
 
4160
                                                                        GeeSet* _tmp38_;
 
4161
                                                                        GeeIterator* _tmp39_ = NULL;
 
4162
                                                                        GeeIterator* _tmp40_;
 
4163
                                                                        GeeIterator* _old_row_it;
 
4164
                                                                        _tmp34_ = field;
 
4165
                                                                        _tmp35_ = (*_tmp34_).rows;
 
4166
                                                                        _tmp36_ = gee_abstract_map_get_keys ((GeeMap*) _tmp35_);
 
4167
                                                                        _tmp37_ = _tmp36_;
 
4168
                                                                        _tmp38_ = _tmp37_;
 
4169
                                                                        _tmp39_ = gee_iterable_iterator ((GeeIterable*) _tmp38_);
 
4170
                                                                        _tmp40_ = _tmp39_;
 
4171
                                                                        _g_object_unref0 (_tmp38_);
 
4172
                                                                        _old_row_it = _tmp40_;
 
4173
                                                                        while (TRUE) {
 
4174
                                                                                GeeIterator* _tmp41_;
 
4175
                                                                                gboolean _tmp42_ = FALSE;
 
4176
                                                                                GeeIterator* _tmp43_;
 
4177
                                                                                gpointer _tmp44_ = NULL;
 
4178
                                                                                gint old_row;
 
4179
                                                                                GeeHashMap* _tmp45_;
 
4180
                                                                                gint _tmp46_;
 
4181
                                                                                ContactsContactEditorField* _tmp47_;
 
4182
                                                                                GeeHashMap* _tmp48_;
 
4183
                                                                                gint _tmp49_;
 
4184
                                                                                gpointer _tmp50_ = NULL;
 
4185
                                                                                ContactsContactEditorRowData* _tmp51_;
 
4186
                                                                                _tmp41_ = _old_row_it;
 
4187
                                                                                _tmp42_ = gee_iterator_next (_tmp41_);
 
4188
                                                                                if (!_tmp42_) {
 
4189
                                                                                        break;
 
4190
                                                                                }
 
4191
                                                                                _tmp43_ = _old_row_it;
 
4192
                                                                                _tmp44_ = gee_iterator_get (_tmp43_);
 
4193
                                                                                old_row = (gint) ((gintptr) _tmp44_);
 
4194
                                                                                _tmp45_ = new_rows;
 
4195
                                                                                _tmp46_ = old_row;
 
4196
                                                                                _tmp47_ = field;
 
4197
                                                                                _tmp48_ = (*_tmp47_).rows;
 
4198
                                                                                _tmp49_ = old_row;
 
4199
                                                                                _tmp50_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp48_, (gpointer) ((gintptr) _tmp49_));
 
4200
                                                                                _tmp51_ = (ContactsContactEditorRowData*) _tmp50_;
 
4201
                                                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp45_, (gpointer) ((gintptr) (_tmp46_ + 1)), _tmp51_);
 
4202
                                                                                _contacts_contact_editor_row_data_free0 (_tmp51_);
 
4203
                                                                        }
 
4204
                                                                        _g_object_unref0 (_old_row_it);
 
4205
                                                                }
 
4206
                                                                _tmp52_ = field;
 
4207
                                                                _tmp53_ = new_rows;
 
4208
                                                                _tmp54_ = _g_object_ref0 (_tmp53_);
 
4209
                                                                _g_object_unref0 ((*_tmp52_).rows);
 
4210
                                                                (*_tmp52_).rows = _tmp54_;
 
4211
                                                                _g_object_unref0 (new_rows);
 
4212
                                                                break;
 
4213
                                                        }
 
4214
                                                }
 
4215
                                                _g_object_unref0 (_row_it);
 
4216
                                        }
 
4217
                                        _contacts_contact_editor_field_free0 (field);
 
4218
                                }
 
4219
                                _g_object_unref0 (_field_it);
 
4220
                        }
 
4221
                        _g_object_unref0 (field_maps);
 
4222
                }
 
4223
                _g_object_unref0 (_field_maps_it);
 
4224
        }
 
4225
        _tmp55_ = idx;
 
4226
        gtk_grid_insert_row ((GtkGrid*) self, _tmp55_);
 
4227
}
 
4228
 
 
4229
 
 
4230
ContactsContactEditor* contacts_contact_editor_construct (GType object_type) {
 
4231
        ContactsContactEditor * self = NULL;
 
4232
        GeeHashMap* _tmp0_;
 
4233
        self = (ContactsContactEditor*) g_object_new (object_type, NULL);
 
4234
        gtk_grid_set_row_spacing ((GtkGrid*) self, (guint) 12);
 
4235
        gtk_grid_set_column_spacing ((GtkGrid*) self, (guint) 16);
 
4236
        _tmp0_ = gee_hash_map_new (FOLKS_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, GEE_TYPE_HASH_MAP, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
4237
        _g_object_unref0 (self->priv->writable_personas);
 
4238
        self->priv->writable_personas = _tmp0_;
 
4239
        return self;
 
4240
}
 
4241
 
 
4242
 
 
4243
ContactsContactEditor* contacts_contact_editor_new (void) {
 
4244
        return contacts_contact_editor_construct (CONTACTS_TYPE_CONTACT_EDITOR);
 
4245
}
 
4246
 
 
4247
 
 
4248
static Block27Data* block27_data_ref (Block27Data* _data27_) {
 
4249
        g_atomic_int_inc (&_data27_->_ref_count_);
 
4250
        return _data27_;
 
4251
}
 
4252
 
 
4253
 
 
4254
static void block27_data_unref (void * _userdata_) {
 
4255
        Block27Data* _data27_;
 
4256
        _data27_ = (Block27Data*) _userdata_;
 
4257
        if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
 
4258
                ContactsContactEditor * self;
 
4259
                self = _data27_->self;
 
4260
                _g_object_unref0 (_data27_->name_entry);
 
4261
                _g_object_unref0 (_data27_->image_frame);
 
4262
                _g_object_unref0 (_data27_->c);
 
4263
                _g_object_unref0 (self);
 
4264
                g_slice_free (Block27Data, _data27_);
 
4265
        }
 
4266
}
 
4267
 
 
4268
 
 
4269
static void __lambda54_ (Block27Data* _data27_) {
 
4270
        ContactsContactEditor * self;
 
4271
        ContactsContact* _tmp0_;
 
4272
        ContactsContactFrame* _tmp1_;
 
4273
        self = _data27_->self;
 
4274
        _tmp0_ = _data27_->c;
 
4275
        _tmp1_ = _data27_->image_frame;
 
4276
        contacts_change_avatar (_tmp0_, _tmp1_);
 
4277
}
 
4278
 
 
4279
 
 
4280
static void ___lambda54__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self) {
 
4281
        __lambda54_ (self);
 
4282
}
 
4283
 
 
4284
 
 
4285
static void __lambda69_ (Block27Data* _data27_, GtkWidget* w) {
 
4286
        ContactsContactEditor * self;
 
4287
        GtkWidget* _tmp0_;
 
4288
        ContactsContact* _tmp1_;
 
4289
        FolksIndividual* _tmp2_;
 
4290
        ContactsContact* _tmp3_;
 
4291
        self = _data27_->self;
 
4292
        g_return_if_fail (w != NULL);
 
4293
        _tmp0_ = w;
 
4294
        _tmp1_ = _data27_->c;
 
4295
        _tmp2_ = _tmp1_->individual;
 
4296
        _tmp3_ = _data27_->c;
 
4297
        contacts_contact_frame_set_image (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, CONTACTS_TYPE_CONTACT_FRAME) ? ((ContactsContactFrame*) _tmp0_) : NULL, (FolksAvatarDetails*) _tmp2_, _tmp3_);
 
4298
}
 
4299
 
 
4300
 
 
4301
static void ___lambda69__gtk_callback (GtkWidget* widget, gpointer self) {
 
4302
        __lambda69_ (self, widget);
 
4303
}
 
4304
 
 
4305
 
 
4306
static void __lambda70_ (Block27Data* _data27_) {
 
4307
        ContactsContactEditor * self;
 
4308
        GtkEntry* _tmp0_;
 
4309
        self = _data27_->self;
 
4310
        _tmp0_ = _data27_->name_entry;
 
4311
        g_object_set_data_full ((GObject*) _tmp0_, "changed", (gpointer) ((gintptr) TRUE), NULL);
 
4312
}
 
4313
 
 
4314
 
 
4315
static void ___lambda70__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
 
4316
        __lambda70_ (self);
 
4317
}
 
4318
 
 
4319
 
 
4320
void contacts_contact_editor_update (ContactsContactEditor* self, ContactsContact* c) {
 
4321
        Block27Data* _data27_;
 
4322
        ContactsContact* _tmp0_;
 
4323
        ContactsContact* _tmp1_;
 
4324
        ContactsContact* _tmp2_;
 
4325
        ContactsContact* _tmp3_;
 
4326
        ContactsContactFrame* _tmp4_;
 
4327
        ContactsContactFrame* _tmp5_;
 
4328
        ContactsContactFrame* _tmp6_;
 
4329
        ContactsContactFrame* _tmp7_;
 
4330
        GtkWidget* _tmp8_ = NULL;
 
4331
        ContactsContactFrame* _tmp9_;
 
4332
        ContactsContact* _tmp10_;
 
4333
        ContactsContactFrame* _tmp11_;
 
4334
        ContactsContactFrame* _tmp12_;
 
4335
        GtkEntry* _tmp13_;
 
4336
        GtkEntry* _tmp14_;
 
4337
        GtkEntry* _tmp15_;
 
4338
        GtkEntry* _tmp16_;
 
4339
        ContactsContact* _tmp17_;
 
4340
        const gchar* _tmp18_;
 
4341
        const gchar* _tmp19_;
 
4342
        GtkEntry* _tmp20_;
 
4343
        GtkEntry* _tmp21_;
 
4344
        GtkEntry* _tmp22_;
 
4345
        gint i;
 
4346
        gint last_store_position;
 
4347
        gboolean is_first_persona;
 
4348
        ContactsContact* _tmp23_;
 
4349
        GeeList* _tmp24_ = NULL;
 
4350
        GeeList* personas;
 
4351
        g_return_if_fail (self != NULL);
 
4352
        g_return_if_fail (c != NULL);
 
4353
        _data27_ = g_slice_new0 (Block27Data);
 
4354
        _data27_->_ref_count_ = 1;
 
4355
        _data27_->self = g_object_ref (self);
 
4356
        _tmp0_ = c;
 
4357
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
4358
        _g_object_unref0 (_data27_->c);
 
4359
        _data27_->c = _tmp1_;
 
4360
        _tmp2_ = _data27_->c;
 
4361
        _tmp3_ = _g_object_ref0 (_tmp2_);
 
4362
        _g_object_unref0 (self->priv->contact);
 
4363
        self->priv->contact = _tmp3_;
 
4364
        _tmp4_ = contacts_contact_frame_new (PROFILE_SIZE, TRUE);
 
4365
        g_object_ref_sink (_tmp4_);
 
4366
        _data27_->image_frame = _tmp4_;
 
4367
        _tmp5_ = _data27_->image_frame;
 
4368
        gtk_widget_set_vexpand ((GtkWidget*) _tmp5_, FALSE);
 
4369
        _tmp6_ = _data27_->image_frame;
 
4370
        gtk_widget_set_valign ((GtkWidget*) _tmp6_, GTK_ALIGN_START);
 
4371
        _tmp7_ = _data27_->image_frame;
 
4372
        _tmp8_ = gtk_bin_get_child ((GtkBin*) _tmp7_);
 
4373
        gtk_button_set_relief (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp8_) : NULL, GTK_RELIEF_NORMAL);
 
4374
        _tmp9_ = _data27_->image_frame;
 
4375
        g_signal_connect_data (_tmp9_, "clicked", (GCallback) ___lambda54__contacts_contact_frame_clicked, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
 
4376
        _tmp10_ = _data27_->c;
 
4377
        _tmp11_ = _data27_->image_frame;
 
4378
        contacts_contact_keep_widget_uptodate (_tmp10_, (GtkWidget*) _tmp11_, ___lambda69__gtk_callback, _data27_);
 
4379
        _tmp12_ = _data27_->image_frame;
 
4380
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp12_, 0, 0, 1, 3);
 
4381
        _tmp13_ = (GtkEntry*) gtk_entry_new ();
 
4382
        g_object_ref_sink (_tmp13_);
 
4383
        _data27_->name_entry = _tmp13_;
 
4384
        _tmp14_ = _data27_->name_entry;
 
4385
        gtk_widget_set_hexpand ((GtkWidget*) _tmp14_, TRUE);
 
4386
        _tmp15_ = _data27_->name_entry;
 
4387
        gtk_widget_set_valign ((GtkWidget*) _tmp15_, GTK_ALIGN_CENTER);
 
4388
        _tmp16_ = _data27_->name_entry;
 
4389
        _tmp17_ = _data27_->c;
 
4390
        _tmp18_ = contacts_contact_get_display_name (_tmp17_);
 
4391
        _tmp19_ = _tmp18_;
 
4392
        gtk_entry_set_text (_tmp16_, _tmp19_);
 
4393
        _tmp20_ = _data27_->name_entry;
 
4394
        g_object_set_data_full ((GObject*) _tmp20_, "changed", (gpointer) ((gintptr) FALSE), NULL);
 
4395
        _tmp21_ = _data27_->name_entry;
 
4396
        gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp21_, 1, 0, 2, 1);
 
4397
        _tmp22_ = _data27_->name_entry;
 
4398
        g_signal_connect_data ((GtkEditable*) _tmp22_, "changed", (GCallback) ___lambda70__gtk_editable_changed, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
 
4399
        i = 3;
 
4400
        last_store_position = 0;
 
4401
        is_first_persona = TRUE;
 
4402
        _tmp23_ = _data27_->c;
 
4403
        _tmp24_ = contacts_contact_get_personas_for_display (_tmp23_);
 
4404
        personas = _tmp24_;
 
4405
        {
 
4406
                GeeList* _tmp25_;
 
4407
                GeeList* _tmp26_;
 
4408
                GeeList* _p_list;
 
4409
                GeeList* _tmp27_;
 
4410
                gint _tmp28_;
 
4411
                gint _tmp29_;
 
4412
                gint _p_size;
 
4413
                gint _p_index;
 
4414
                _tmp25_ = personas;
 
4415
                _tmp26_ = _g_object_ref0 (_tmp25_);
 
4416
                _p_list = _tmp26_;
 
4417
                _tmp27_ = _p_list;
 
4418
                _tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
 
4419
                _tmp29_ = _tmp28_;
 
4420
                _p_size = _tmp29_;
 
4421
                _p_index = -1;
 
4422
                while (TRUE) {
 
4423
                        gint _tmp30_;
 
4424
                        gint _tmp31_;
 
4425
                        gint _tmp32_;
 
4426
                        GeeList* _tmp33_;
 
4427
                        gint _tmp34_;
 
4428
                        gpointer _tmp35_ = NULL;
 
4429
                        FolksPersona* p;
 
4430
                        gboolean _tmp36_;
 
4431
                        FolksPersona* _tmp51_;
 
4432
                        gchar** _tmp52_;
 
4433
                        gint _tmp52__length1;
 
4434
                        gchar** _tmp53_;
 
4435
                        gint _tmp53__length1;
 
4436
                        gint _tmp54_ = 0;
 
4437
                        gchar** _tmp55_ = NULL;
 
4438
                        gchar** rw_props;
 
4439
                        gint rw_props_length1;
 
4440
                        gint _rw_props_size_;
 
4441
                        gchar** _tmp56_;
 
4442
                        gint _tmp56__length1;
 
4443
                        gboolean _tmp65_;
 
4444
                        gint _tmp67_;
 
4445
                        gint _tmp68_;
 
4446
                        gint _tmp69_;
 
4447
                        _tmp30_ = _p_index;
 
4448
                        _p_index = _tmp30_ + 1;
 
4449
                        _tmp31_ = _p_index;
 
4450
                        _tmp32_ = _p_size;
 
4451
                        if (!(_tmp31_ < _tmp32_)) {
 
4452
                                break;
 
4453
                        }
 
4454
                        _tmp33_ = _p_list;
 
4455
                        _tmp34_ = _p_index;
 
4456
                        _tmp35_ = gee_list_get (_tmp33_, _tmp34_);
 
4457
                        p = (FolksPersona*) _tmp35_;
 
4458
                        _tmp36_ = is_first_persona;
 
4459
                        if (!_tmp36_) {
 
4460
                                GtkLabel* _tmp37_;
 
4461
                                GtkLabel* store_name;
 
4462
                                GtkLabel* _tmp38_;
 
4463
                                FolksPersona* _tmp39_;
 
4464
                                gchar* _tmp40_ = NULL;
 
4465
                                gchar* _tmp41_;
 
4466
                                gchar* _tmp42_ = NULL;
 
4467
                                gchar* _tmp43_;
 
4468
                                GtkLabel* _tmp44_;
 
4469
                                GtkLabel* _tmp45_;
 
4470
                                GtkLabel* _tmp46_;
 
4471
                                GtkLabel* _tmp47_;
 
4472
                                gint _tmp48_;
 
4473
                                gint _tmp49_;
 
4474
                                gint _tmp50_;
 
4475
                                _tmp37_ = (GtkLabel*) gtk_label_new ("");
 
4476
                                g_object_ref_sink (_tmp37_);
 
4477
                                store_name = _tmp37_;
 
4478
                                _tmp38_ = store_name;
 
4479
                                _tmp39_ = p;
 
4480
                                _tmp40_ = contacts_contact_format_persona_store_name_for_contact (_tmp39_);
 
4481
                                _tmp41_ = _tmp40_;
 
4482
                                _tmp42_ = g_markup_printf_escaped ("<span font='16px bold'>%s</span>", _tmp41_);
 
4483
                                _tmp43_ = _tmp42_;
 
4484
                                gtk_label_set_markup (_tmp38_, _tmp43_);
 
4485
                                _g_free0 (_tmp43_);
 
4486
                                _g_free0 (_tmp41_);
 
4487
                                _tmp44_ = store_name;
 
4488
                                gtk_widget_set_halign ((GtkWidget*) _tmp44_, GTK_ALIGN_START);
 
4489
                                _tmp45_ = store_name;
 
4490
                                g_object_set ((GtkMisc*) _tmp45_, "xalign", 0.0f, NULL);
 
4491
                                _tmp46_ = store_name;
 
4492
                                gtk_widget_set_margin_left ((GtkWidget*) _tmp46_, 6);
 
4493
                                _tmp47_ = store_name;
 
4494
                                _tmp48_ = i;
 
4495
                                gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp47_, 0, _tmp48_, 1, 1);
 
4496
                                _tmp49_ = i;
 
4497
                                i = _tmp49_ + 1;
 
4498
                                _tmp50_ = i;
 
4499
                                last_store_position = _tmp50_;
 
4500
                                _g_object_unref0 (store_name);
 
4501
                        }
 
4502
                        _tmp51_ = p;
 
4503
                        _tmp52_ = folks_persona_get_writeable_properties (_tmp51_, &_tmp52__length1);
 
4504
                        _tmp53_ = _tmp52_;
 
4505
                        _tmp53__length1 = _tmp52__length1;
 
4506
                        _tmp55_ = contacts_contact_sort_persona_properties (_tmp53_, _tmp53__length1, &_tmp54_);
 
4507
                        rw_props = _tmp55_;
 
4508
                        rw_props_length1 = _tmp54_;
 
4509
                        _rw_props_size_ = rw_props_length1;
 
4510
                        _tmp56_ = rw_props;
 
4511
                        _tmp56__length1 = rw_props_length1;
 
4512
                        if (_tmp56__length1 != 0) {
 
4513
                                GeeHashMap* _tmp57_;
 
4514
                                FolksPersona* _tmp58_;
 
4515
                                GeeHashMap* _tmp59_;
 
4516
                                GeeHashMap* _tmp60_;
 
4517
                                gchar** _tmp61_;
 
4518
                                gint _tmp61__length1;
 
4519
                                _tmp57_ = self->priv->writable_personas;
 
4520
                                _tmp58_ = p;
 
4521
                                _tmp59_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_FIELD, (GBoxedCopyFunc) contacts_contact_editor_field_dup, contacts_contact_editor_field_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
4522
                                _tmp60_ = _tmp59_;
 
4523
                                gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp58_, _tmp60_);
 
4524
                                _g_object_unref0 (_tmp60_);
 
4525
                                _tmp61_ = rw_props;
 
4526
                                _tmp61__length1 = rw_props_length1;
 
4527
                                {
 
4528
                                        gchar** prop_collection = NULL;
 
4529
                                        gint prop_collection_length1 = 0;
 
4530
                                        gint _prop_collection_size_ = 0;
 
4531
                                        gint prop_it = 0;
 
4532
                                        prop_collection = _tmp61_;
 
4533
                                        prop_collection_length1 = _tmp61__length1;
 
4534
                                        for (prop_it = 0; prop_it < _tmp61__length1; prop_it = prop_it + 1) {
 
4535
                                                gchar* _tmp62_;
 
4536
                                                gchar* prop = NULL;
 
4537
                                                _tmp62_ = g_strdup (prop_collection[prop_it]);
 
4538
                                                prop = _tmp62_;
 
4539
                                                {
 
4540
                                                        FolksPersona* _tmp63_;
 
4541
                                                        const gchar* _tmp64_;
 
4542
                                                        _tmp63_ = p;
 
4543
                                                        _tmp64_ = prop;
 
4544
                                                        contacts_contact_editor_add_edit_row (self, _tmp63_, _tmp64_, &i, FALSE, NULL);
 
4545
                                                        _g_free0 (prop);
 
4546
                                                }
 
4547
                                        }
 
4548
                                }
 
4549
                        }
 
4550
                        _tmp65_ = is_first_persona;
 
4551
                        if (_tmp65_) {
 
4552
                                gint _tmp66_;
 
4553
                                _tmp66_ = i;
 
4554
                                self->priv->last_row = _tmp66_ - 1;
 
4555
                        }
 
4556
                        _tmp67_ = i;
 
4557
                        if (_tmp67_ != 3) {
 
4558
                                is_first_persona = FALSE;
 
4559
                        }
 
4560
                        _tmp68_ = i;
 
4561
                        _tmp69_ = last_store_position;
 
4562
                        if (_tmp68_ == _tmp69_) {
 
4563
                                gint _tmp70_;
 
4564
                                gint _tmp71_;
 
4565
                                GtkWidget* _tmp72_ = NULL;
 
4566
                                _tmp70_ = i;
 
4567
                                i = _tmp70_ - 1;
 
4568
                                _tmp71_ = i;
 
4569
                                _tmp72_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp71_);
 
4570
                                gtk_widget_destroy (_tmp72_);
 
4571
                        }
 
4572
                        rw_props = (_vala_array_free (rw_props, rw_props_length1, (GDestroyNotify) g_free), NULL);
 
4573
                        _g_object_unref0 (p);
 
4574
                }
 
4575
                _g_object_unref0 (_p_list);
 
4576
        }
 
4577
        _g_object_unref0 (personas);
 
4578
        block27_data_unref (_data27_);
 
4579
        _data27_ = NULL;
 
4580
}
 
4581
 
 
4582
 
 
4583
void contacts_contact_editor_clear (ContactsContactEditor* self) {
 
4584
        GList* _tmp0_ = NULL;
 
4585
        g_return_if_fail (self != NULL);
 
4586
        _tmp0_ = gtk_container_get_children ((GtkContainer*) self);
 
4587
        {
 
4588
                GList* w_collection = NULL;
 
4589
                GList* w_it = NULL;
 
4590
                w_collection = _tmp0_;
 
4591
                for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
 
4592
                        GtkWidget* w = NULL;
 
4593
                        w = (GtkWidget*) w_it->data;
 
4594
                        {
 
4595
                                GtkWidget* _tmp1_;
 
4596
                                _tmp1_ = w;
 
4597
                                gtk_widget_destroy (_tmp1_);
 
4598
                        }
 
4599
                }
 
4600
                _g_list_free0 (w_collection);
 
4601
        }
 
4602
}
 
4603
 
 
4604
 
 
4605
GeeHashMap* contacts_contact_editor_properties_changed (ContactsContactEditor* self) {
 
4606
        GeeHashMap* result = NULL;
 
4607
        GeeHashMap* _tmp0_;
 
4608
        GeeHashMap* props_set;
 
4609
        g_return_val_if_fail (self != NULL, NULL);
 
4610
        _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_PROPERTY_DATA, (GBoxedCopyFunc) contacts_contact_editor_property_data_dup, contacts_contact_editor_property_data_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
4611
        props_set = _tmp0_;
 
4612
        {
 
4613
                GeeHashMap* _tmp1_;
 
4614
                GeeSet* _tmp2_;
 
4615
                GeeSet* _tmp3_;
 
4616
                GeeSet* _tmp4_;
 
4617
                GeeIterator* _tmp5_ = NULL;
 
4618
                GeeIterator* _tmp6_;
 
4619
                GeeIterator* _entry_it;
 
4620
                _tmp1_ = self->priv->writable_personas;
 
4621
                _tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
 
4622
                _tmp3_ = _tmp2_;
 
4623
                _tmp4_ = _tmp3_;
 
4624
                _tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
 
4625
                _tmp6_ = _tmp5_;
 
4626
                _g_object_unref0 (_tmp4_);
 
4627
                _entry_it = _tmp6_;
 
4628
                while (TRUE) {
 
4629
                        GeeIterator* _tmp7_;
 
4630
                        gboolean _tmp8_ = FALSE;
 
4631
                        GeeIterator* _tmp9_;
 
4632
                        gpointer _tmp10_ = NULL;
 
4633
                        GeeMapEntry* entry;
 
4634
                        _tmp7_ = _entry_it;
 
4635
                        _tmp8_ = gee_iterator_next (_tmp7_);
 
4636
                        if (!_tmp8_) {
 
4637
                                break;
 
4638
                        }
 
4639
                        _tmp9_ = _entry_it;
 
4640
                        _tmp10_ = gee_iterator_get (_tmp9_);
 
4641
                        entry = (GeeMapEntry*) _tmp10_;
 
4642
                        {
 
4643
                                GeeMapEntry* _tmp11_;
 
4644
                                gconstpointer _tmp12_;
 
4645
                                GeeHashMap* _tmp13_;
 
4646
                                GeeSet* _tmp14_;
 
4647
                                GeeSet* _tmp15_;
 
4648
                                GeeSet* _tmp16_;
 
4649
                                GeeIterator* _tmp17_ = NULL;
 
4650
                                GeeIterator* _tmp18_;
 
4651
                                GeeIterator* _field_entry_it;
 
4652
                                _tmp11_ = entry;
 
4653
                                _tmp12_ = gee_map_entry_get_value (_tmp11_);
 
4654
                                _tmp13_ = _tmp12_;
 
4655
                                _tmp14_ = gee_abstract_map_get_entries ((GeeMap*) ((GeeHashMap*) _tmp13_));
 
4656
                                _tmp15_ = _tmp14_;
 
4657
                                _tmp16_ = _tmp15_;
 
4658
                                _tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
 
4659
                                _tmp18_ = _tmp17_;
 
4660
                                _g_object_unref0 (_tmp16_);
 
4661
                                _field_entry_it = _tmp18_;
 
4662
                                while (TRUE) {
 
4663
                                        GeeIterator* _tmp19_;
 
4664
                                        gboolean _tmp20_ = FALSE;
 
4665
                                        GeeIterator* _tmp21_;
 
4666
                                        gpointer _tmp22_ = NULL;
 
4667
                                        GeeMapEntry* field_entry;
 
4668
                                        gboolean _tmp23_ = FALSE;
 
4669
                                        GeeMapEntry* _tmp24_;
 
4670
                                        gconstpointer _tmp25_;
 
4671
                                        ContactsContactEditorField* _tmp26_;
 
4672
                                        gboolean _tmp27_;
 
4673
                                        gboolean _tmp33_;
 
4674
                                        _tmp19_ = _field_entry_it;
 
4675
                                        _tmp20_ = gee_iterator_next (_tmp19_);
 
4676
                                        if (!_tmp20_) {
 
4677
                                                break;
 
4678
                                        }
 
4679
                                        _tmp21_ = _field_entry_it;
 
4680
                                        _tmp22_ = gee_iterator_get (_tmp21_);
 
4681
                                        field_entry = (GeeMapEntry*) _tmp22_;
 
4682
                                        _tmp24_ = field_entry;
 
4683
                                        _tmp25_ = gee_map_entry_get_value (_tmp24_);
 
4684
                                        _tmp26_ = _tmp25_;
 
4685
                                        _tmp27_ = (*((ContactsContactEditorField*) _tmp26_)).changed;
 
4686
                                        if (_tmp27_) {
 
4687
                                                GeeHashMap* _tmp28_;
 
4688
                                                GeeMapEntry* _tmp29_;
 
4689
                                                gconstpointer _tmp30_;
 
4690
                                                const gchar* _tmp31_;
 
4691
                                                gboolean _tmp32_ = FALSE;
 
4692
                                                _tmp28_ = props_set;
 
4693
                                                _tmp29_ = field_entry;
 
4694
                                                _tmp30_ = gee_map_entry_get_key (_tmp29_);
 
4695
                                                _tmp31_ = _tmp30_;
 
4696
                                                _tmp32_ = gee_map_contains ((GeeMap*) _tmp28_, (const gchar*) _tmp31_);
 
4697
                                                _tmp23_ = !_tmp32_;
 
4698
                                        } else {
 
4699
                                                _tmp23_ = FALSE;
 
4700
                                        }
 
4701
                                        _tmp33_ = _tmp23_;
 
4702
                                        if (_tmp33_) {
 
4703
                                                ContactsContactEditorPropertyData p = {0};
 
4704
                                                GeeMapEntry* _tmp34_;
 
4705
                                                gconstpointer _tmp35_;
 
4706
                                                FolksPersona* _tmp36_;
 
4707
                                                FolksPersona* _tmp37_;
 
4708
                                                GeeMapEntry* _tmp38_;
 
4709
                                                gconstpointer _tmp39_;
 
4710
                                                const gchar* _tmp40_;
 
4711
                                                const gchar* _tmp41_;
 
4712
                                                GQuark _tmp43_ = 0U;
 
4713
                                                static GQuark _tmp42_label0 = 0;
 
4714
                                                static GQuark _tmp42_label1 = 0;
 
4715
                                                static GQuark _tmp42_label2 = 0;
 
4716
                                                static GQuark _tmp42_label3 = 0;
 
4717
                                                static GQuark _tmp42_label4 = 0;
 
4718
                                                static GQuark _tmp42_label5 = 0;
 
4719
                                                static GQuark _tmp42_label6 = 0;
 
4720
                                                GeeHashMap* _tmp79_;
 
4721
                                                GeeMapEntry* _tmp80_;
 
4722
                                                gconstpointer _tmp81_;
 
4723
                                                const gchar* _tmp82_;
 
4724
                                                ContactsContactEditorPropertyData _tmp83_;
 
4725
                                                memset (&p, 0, sizeof (ContactsContactEditorPropertyData));
 
4726
                                                _tmp34_ = entry;
 
4727
                                                _tmp35_ = gee_map_entry_get_key (_tmp34_);
 
4728
                                                _tmp36_ = _tmp35_;
 
4729
                                                _tmp37_ = _g_object_ref0 ((FolksPersona*) _tmp36_);
 
4730
                                                _g_object_unref0 (p.persona);
 
4731
                                                p.persona = _tmp37_;
 
4732
                                                _tmp38_ = field_entry;
 
4733
                                                _tmp39_ = gee_map_entry_get_key (_tmp38_);
 
4734
                                                _tmp40_ = _tmp39_;
 
4735
                                                _tmp41_ = (const gchar*) _tmp40_;
 
4736
                                                _tmp43_ = (NULL == _tmp41_) ? 0 : g_quark_from_string (_tmp41_);
 
4737
                                                if (_tmp43_ == ((0 != _tmp42_label0) ? _tmp42_label0 : (_tmp42_label0 = g_quark_from_static_string ("email-addresses")))) {
 
4738
                                                        switch (0) {
 
4739
                                                                default:
 
4740
                                                                {
 
4741
                                                                        GeeMapEntry* _tmp44_;
 
4742
                                                                        gconstpointer _tmp45_;
 
4743
                                                                        ContactsContactEditorField* _tmp46_;
 
4744
                                                                        GeeHashMap* _tmp47_;
 
4745
                                                                        GValue _tmp48_ = {0};
 
4746
                                                                        _tmp44_ = field_entry;
 
4747
                                                                        _tmp45_ = gee_map_entry_get_value (_tmp44_);
 
4748
                                                                        _tmp46_ = _tmp45_;
 
4749
                                                                        _tmp47_ = (*((ContactsContactEditorField*) _tmp46_)).rows;
 
4750
                                                                        contacts_contact_editor_get_value_from_emails (self, _tmp47_, &_tmp48_);
 
4751
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4752
                                                                        p.value = _tmp48_;
 
4753
                                                                        break;
 
4754
                                                                }
 
4755
                                                        }
 
4756
                                                } else if (_tmp43_ == ((0 != _tmp42_label1) ? _tmp42_label1 : (_tmp42_label1 = g_quark_from_static_string ("phone-numbers")))) {
 
4757
                                                        switch (0) {
 
4758
                                                                default:
 
4759
                                                                {
 
4760
                                                                        GeeMapEntry* _tmp49_;
 
4761
                                                                        gconstpointer _tmp50_;
 
4762
                                                                        ContactsContactEditorField* _tmp51_;
 
4763
                                                                        GeeHashMap* _tmp52_;
 
4764
                                                                        GValue _tmp53_ = {0};
 
4765
                                                                        _tmp49_ = field_entry;
 
4766
                                                                        _tmp50_ = gee_map_entry_get_value (_tmp49_);
 
4767
                                                                        _tmp51_ = _tmp50_;
 
4768
                                                                        _tmp52_ = (*((ContactsContactEditorField*) _tmp51_)).rows;
 
4769
                                                                        contacts_contact_editor_get_value_from_phones (self, _tmp52_, &_tmp53_);
 
4770
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4771
                                                                        p.value = _tmp53_;
 
4772
                                                                        break;
 
4773
                                                                }
 
4774
                                                        }
 
4775
                                                } else if (_tmp43_ == ((0 != _tmp42_label2) ? _tmp42_label2 : (_tmp42_label2 = g_quark_from_static_string ("urls")))) {
 
4776
                                                        switch (0) {
 
4777
                                                                default:
 
4778
                                                                {
 
4779
                                                                        GeeMapEntry* _tmp54_;
 
4780
                                                                        gconstpointer _tmp55_;
 
4781
                                                                        ContactsContactEditorField* _tmp56_;
 
4782
                                                                        GeeHashMap* _tmp57_;
 
4783
                                                                        GValue _tmp58_ = {0};
 
4784
                                                                        _tmp54_ = field_entry;
 
4785
                                                                        _tmp55_ = gee_map_entry_get_value (_tmp54_);
 
4786
                                                                        _tmp56_ = _tmp55_;
 
4787
                                                                        _tmp57_ = (*((ContactsContactEditorField*) _tmp56_)).rows;
 
4788
                                                                        contacts_contact_editor_get_value_from_urls (self, _tmp57_, &_tmp58_);
 
4789
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4790
                                                                        p.value = _tmp58_;
 
4791
                                                                        break;
 
4792
                                                                }
 
4793
                                                        }
 
4794
                                                } else if (_tmp43_ == ((0 != _tmp42_label3) ? _tmp42_label3 : (_tmp42_label3 = g_quark_from_static_string ("nickname")))) {
 
4795
                                                        switch (0) {
 
4796
                                                                default:
 
4797
                                                                {
 
4798
                                                                        GeeMapEntry* _tmp59_;
 
4799
                                                                        gconstpointer _tmp60_;
 
4800
                                                                        ContactsContactEditorField* _tmp61_;
 
4801
                                                                        GeeHashMap* _tmp62_;
 
4802
                                                                        GValue _tmp63_ = {0};
 
4803
                                                                        _tmp59_ = field_entry;
 
4804
                                                                        _tmp60_ = gee_map_entry_get_value (_tmp59_);
 
4805
                                                                        _tmp61_ = _tmp60_;
 
4806
                                                                        _tmp62_ = (*((ContactsContactEditorField*) _tmp61_)).rows;
 
4807
                                                                        contacts_contact_editor_get_value_from_nickname (self, _tmp62_, &_tmp63_);
 
4808
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4809
                                                                        p.value = _tmp63_;
 
4810
                                                                        break;
 
4811
                                                                }
 
4812
                                                        }
 
4813
                                                } else if (_tmp43_ == ((0 != _tmp42_label4) ? _tmp42_label4 : (_tmp42_label4 = g_quark_from_static_string ("birthday")))) {
 
4814
                                                        switch (0) {
 
4815
                                                                default:
 
4816
                                                                {
 
4817
                                                                        GeeMapEntry* _tmp64_;
 
4818
                                                                        gconstpointer _tmp65_;
 
4819
                                                                        ContactsContactEditorField* _tmp66_;
 
4820
                                                                        GeeHashMap* _tmp67_;
 
4821
                                                                        GValue _tmp68_ = {0};
 
4822
                                                                        _tmp64_ = field_entry;
 
4823
                                                                        _tmp65_ = gee_map_entry_get_value (_tmp64_);
 
4824
                                                                        _tmp66_ = _tmp65_;
 
4825
                                                                        _tmp67_ = (*((ContactsContactEditorField*) _tmp66_)).rows;
 
4826
                                                                        contacts_contact_editor_get_value_from_birthday (self, _tmp67_, &_tmp68_);
 
4827
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4828
                                                                        p.value = _tmp68_;
 
4829
                                                                        break;
 
4830
                                                                }
 
4831
                                                        }
 
4832
                                                } else if (_tmp43_ == ((0 != _tmp42_label5) ? _tmp42_label5 : (_tmp42_label5 = g_quark_from_static_string ("notes")))) {
 
4833
                                                        switch (0) {
 
4834
                                                                default:
 
4835
                                                                {
 
4836
                                                                        GeeMapEntry* _tmp69_;
 
4837
                                                                        gconstpointer _tmp70_;
 
4838
                                                                        ContactsContactEditorField* _tmp71_;
 
4839
                                                                        GeeHashMap* _tmp72_;
 
4840
                                                                        GValue _tmp73_ = {0};
 
4841
                                                                        _tmp69_ = field_entry;
 
4842
                                                                        _tmp70_ = gee_map_entry_get_value (_tmp69_);
 
4843
                                                                        _tmp71_ = _tmp70_;
 
4844
                                                                        _tmp72_ = (*((ContactsContactEditorField*) _tmp71_)).rows;
 
4845
                                                                        contacts_contact_editor_get_value_from_notes (self, _tmp72_, &_tmp73_);
 
4846
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4847
                                                                        p.value = _tmp73_;
 
4848
                                                                        break;
 
4849
                                                                }
 
4850
                                                        }
 
4851
                                                } else if (_tmp43_ == ((0 != _tmp42_label6) ? _tmp42_label6 : (_tmp42_label6 = g_quark_from_static_string ("postal-addresses")))) {
 
4852
                                                        switch (0) {
 
4853
                                                                default:
 
4854
                                                                {
 
4855
                                                                        GeeMapEntry* _tmp74_;
 
4856
                                                                        gconstpointer _tmp75_;
 
4857
                                                                        ContactsContactEditorField* _tmp76_;
 
4858
                                                                        GeeHashMap* _tmp77_;
 
4859
                                                                        GValue _tmp78_ = {0};
 
4860
                                                                        _tmp74_ = field_entry;
 
4861
                                                                        _tmp75_ = gee_map_entry_get_value (_tmp74_);
 
4862
                                                                        _tmp76_ = _tmp75_;
 
4863
                                                                        _tmp77_ = (*((ContactsContactEditorField*) _tmp76_)).rows;
 
4864
                                                                        contacts_contact_editor_get_value_from_addresses (self, _tmp77_, &_tmp78_);
 
4865
                                                                        G_IS_VALUE (&p.value) ? (g_value_unset (&p.value), NULL) : NULL;
 
4866
                                                                        p.value = _tmp78_;
 
4867
                                                                        break;
 
4868
                                                                }
 
4869
                                                        }
 
4870
                                                }
 
4871
                                                _tmp79_ = props_set;
 
4872
                                                _tmp80_ = field_entry;
 
4873
                                                _tmp81_ = gee_map_entry_get_key (_tmp80_);
 
4874
                                                _tmp82_ = _tmp81_;
 
4875
                                                _tmp83_ = p;
 
4876
                                                gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (const gchar*) _tmp82_, &_tmp83_);
 
4877
                                                contacts_contact_editor_property_data_destroy (&p);
 
4878
                                        }
 
4879
                                        _g_object_unref0 (field_entry);
 
4880
                                }
 
4881
                                _g_object_unref0 (_field_entry_it);
 
4882
                        }
 
4883
                        _g_object_unref0 (entry);
 
4884
                }
 
4885
                _g_object_unref0 (_entry_it);
 
4886
        }
 
4887
        result = props_set;
 
4888
        return result;
 
4889
}
 
4890
 
 
4891
 
 
4892
gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self) {
 
4893
        gboolean result = FALSE;
 
4894
        GtkWidget* _tmp0_ = NULL;
 
4895
        GtkEntry* _tmp1_;
 
4896
        GtkEntry* name_entry;
 
4897
        gconstpointer _tmp2_ = NULL;
 
4898
        g_return_val_if_fail (self != NULL, FALSE);
 
4899
        _tmp0_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, 0);
 
4900
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp0_) : NULL);
 
4901
        name_entry = _tmp1_;
 
4902
        _tmp2_ = g_object_get_data ((GObject*) name_entry, "changed");
 
4903
        result = (gboolean) ((gintptr) _tmp2_);
 
4904
        _g_object_unref0 (name_entry);
 
4905
        return result;
 
4906
}
 
4907
 
 
4908
 
 
4909
void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result) {
 
4910
        GValue _tmp0_ = {0};
 
4911
        GValue v;
 
4912
        GtkWidget* _tmp1_ = NULL;
 
4913
        GtkEntry* _tmp2_;
 
4914
        GtkEntry* name_entry;
 
4915
        const gchar* _tmp3_ = NULL;
 
4916
        g_return_if_fail (self != NULL);
 
4917
        g_value_init (&_tmp0_, G_TYPE_STRING);
 
4918
        v = _tmp0_;
 
4919
        _tmp1_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, 0);
 
4920
        _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp1_) : NULL);
 
4921
        name_entry = _tmp2_;
 
4922
        _tmp3_ = gtk_entry_get_text (name_entry);
 
4923
        g_value_set_string (&v, _tmp3_);
 
4924
        *result = v;
 
4925
        _g_object_unref0 (name_entry);
 
4926
        return;
 
4927
}
 
4928
 
 
4929
 
 
4930
void contacts_contact_editor_add_new_row_for_property (ContactsContactEditor* self, FolksPersona* p, const gchar* prop_name, const gchar* type) {
 
4931
        FolksPersona* persona = NULL;
 
4932
        FolksPersona* _tmp0_;
 
4933
        gint next_idx;
 
4934
        gint _tmp44_ = 0;
 
4935
        gint _tmp45_;
 
4936
        gint _tmp48_;
 
4937
        gint _tmp49_;
 
4938
        FolksPersona* _tmp50_;
 
4939
        const gchar* _tmp51_;
 
4940
        const gchar* _tmp52_;
 
4941
        gint _tmp53_;
 
4942
        g_return_if_fail (self != NULL);
 
4943
        g_return_if_fail (prop_name != NULL);
 
4944
        _tmp0_ = p;
 
4945
        if (_tmp0_ == NULL) {
 
4946
                ContactsContact* _tmp1_;
 
4947
                ContactsFakePersona* _tmp2_;
 
4948
                GeeHashMap* _tmp3_;
 
4949
                FolksPersona* _tmp4_;
 
4950
                GeeHashMap* _tmp5_;
 
4951
                GeeHashMap* _tmp6_;
 
4952
                _tmp1_ = self->priv->contact;
 
4953
                _tmp2_ = contacts_fake_persona_new (_tmp1_);
 
4954
                _g_object_unref0 (persona);
 
4955
                persona = (FolksPersona*) _tmp2_;
 
4956
                _tmp3_ = self->priv->writable_personas;
 
4957
                _tmp4_ = persona;
 
4958
                _tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, CONTACTS_CONTACT_EDITOR_TYPE_FIELD, (GBoxedCopyFunc) contacts_contact_editor_field_dup, contacts_contact_editor_field_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 
4959
                _tmp6_ = _tmp5_;
 
4960
                gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp4_, _tmp6_);
 
4961
                _g_object_unref0 (_tmp6_);
 
4962
        } else {
 
4963
                FolksPersona* _tmp7_;
 
4964
                FolksPersona* _tmp8_;
 
4965
                _tmp7_ = p;
 
4966
                _tmp8_ = _g_object_ref0 (_tmp7_);
 
4967
                _g_object_unref0 (persona);
 
4968
                persona = _tmp8_;
 
4969
        }
 
4970
        next_idx = 0;
 
4971
        {
 
4972
                GeeHashMap* _tmp9_;
 
4973
                GeeCollection* _tmp10_;
 
4974
                GeeCollection* _tmp11_;
 
4975
                GeeCollection* _tmp12_;
 
4976
                GeeIterator* _tmp13_ = NULL;
 
4977
                GeeIterator* _tmp14_;
 
4978
                GeeIterator* _fields_it;
 
4979
                _tmp9_ = self->priv->writable_personas;
 
4980
                _tmp10_ = gee_abstract_map_get_values ((GeeMap*) _tmp9_);
 
4981
                _tmp11_ = _tmp10_;
 
4982
                _tmp12_ = _tmp11_;
 
4983
                _tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
 
4984
                _tmp14_ = _tmp13_;
 
4985
                _g_object_unref0 (_tmp12_);
 
4986
                _fields_it = _tmp14_;
 
4987
                while (TRUE) {
 
4988
                        GeeIterator* _tmp15_;
 
4989
                        gboolean _tmp16_ = FALSE;
 
4990
                        GeeIterator* _tmp17_;
 
4991
                        gpointer _tmp18_ = NULL;
 
4992
                        GeeHashMap* fields;
 
4993
                        GeeHashMap* _tmp19_;
 
4994
                        const gchar* _tmp20_;
 
4995
                        gboolean _tmp21_ = FALSE;
 
4996
                        _tmp15_ = _fields_it;
 
4997
                        _tmp16_ = gee_iterator_next (_tmp15_);
 
4998
                        if (!_tmp16_) {
 
4999
                                break;
 
5000
                        }
 
5001
                        _tmp17_ = _fields_it;
 
5002
                        _tmp18_ = gee_iterator_get (_tmp17_);
 
5003
                        fields = (GeeHashMap*) _tmp18_;
 
5004
                        _tmp19_ = fields;
 
5005
                        _tmp20_ = prop_name;
 
5006
                        _tmp21_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp19_, _tmp20_);
 
5007
                        if (_tmp21_) {
 
5008
                                {
 
5009
                                        GeeHashMap* _tmp22_;
 
5010
                                        const gchar* _tmp23_;
 
5011
                                        gpointer _tmp24_ = NULL;
 
5012
                                        ContactsContactEditorField* _tmp25_;
 
5013
                                        GeeHashMap* _tmp26_;
 
5014
                                        GeeSet* _tmp27_;
 
5015
                                        GeeSet* _tmp28_;
 
5016
                                        GeeSet* _tmp29_;
 
5017
                                        GeeIterator* _tmp30_ = NULL;
 
5018
                                        GeeIterator* _tmp31_;
 
5019
                                        GeeIterator* _idx_it;
 
5020
                                        _tmp22_ = fields;
 
5021
                                        _tmp23_ = prop_name;
 
5022
                                        _tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
 
5023
                                        _tmp25_ = (ContactsContactEditorField*) _tmp24_;
 
5024
                                        _tmp26_ = (*_tmp25_).rows;
 
5025
                                        _tmp27_ = gee_abstract_map_get_keys ((GeeMap*) _tmp26_);
 
5026
                                        _tmp28_ = _tmp27_;
 
5027
                                        _tmp29_ = _tmp28_;
 
5028
                                        _tmp30_ = gee_iterable_iterator ((GeeIterable*) _tmp29_);
 
5029
                                        _tmp31_ = _tmp30_;
 
5030
                                        _g_object_unref0 (_tmp29_);
 
5031
                                        _contacts_contact_editor_field_free0 (_tmp25_);
 
5032
                                        _idx_it = _tmp31_;
 
5033
                                        while (TRUE) {
 
5034
                                                GeeIterator* _tmp32_;
 
5035
                                                gboolean _tmp33_ = FALSE;
 
5036
                                                GeeIterator* _tmp34_;
 
5037
                                                gpointer _tmp35_ = NULL;
 
5038
                                                gint idx;
 
5039
                                                gint _tmp36_;
 
5040
                                                gint _tmp37_;
 
5041
                                                _tmp32_ = _idx_it;
 
5042
                                                _tmp33_ = gee_iterator_next (_tmp32_);
 
5043
                                                if (!_tmp33_) {
 
5044
                                                        break;
 
5045
                                                }
 
5046
                                                _tmp34_ = _idx_it;
 
5047
                                                _tmp35_ = gee_iterator_get (_tmp34_);
 
5048
                                                idx = (gint) ((gintptr) _tmp35_);
 
5049
                                                _tmp36_ = idx;
 
5050
                                                _tmp37_ = self->priv->last_row;
 
5051
                                                if (_tmp36_ < _tmp37_) {
 
5052
                                                        gint _tmp38_ = 0;
 
5053
                                                        gint _tmp39_;
 
5054
                                                        gint _tmp40_;
 
5055
                                                        gint _tmp43_;
 
5056
                                                        _tmp39_ = idx;
 
5057
                                                        _tmp40_ = next_idx;
 
5058
                                                        if (_tmp39_ > _tmp40_) {
 
5059
                                                                gint _tmp41_;
 
5060
                                                                _tmp41_ = idx;
 
5061
                                                                _tmp38_ = _tmp41_;
 
5062
                                                        } else {
 
5063
                                                                gint _tmp42_;
 
5064
                                                                _tmp42_ = next_idx;
 
5065
                                                                _tmp38_ = _tmp42_;
 
5066
                                                        }
 
5067
                                                        _tmp43_ = _tmp38_;
 
5068
                                                        next_idx = _tmp43_;
 
5069
                                                }
 
5070
                                        }
 
5071
                                        _g_object_unref0 (_idx_it);
 
5072
                                }
 
5073
                                _g_object_unref0 (fields);
 
5074
                                break;
 
5075
                        }
 
5076
                        _g_object_unref0 (fields);
 
5077
                }
 
5078
                _g_object_unref0 (_fields_it);
 
5079
        }
 
5080
        _tmp45_ = next_idx;
 
5081
        if (_tmp45_ == 0) {
 
5082
                gint _tmp46_;
 
5083
                _tmp46_ = self->priv->last_row;
 
5084
                _tmp44_ = _tmp46_;
 
5085
        } else {
 
5086
                gint _tmp47_;
 
5087
                _tmp47_ = next_idx;
 
5088
                _tmp44_ = _tmp47_;
 
5089
        }
 
5090
        _tmp48_ = _tmp44_;
 
5091
        next_idx = _tmp48_ + 1;
 
5092
        _tmp49_ = next_idx;
 
5093
        contacts_contact_editor_insert_row_at (self, _tmp49_);
 
5094
        _tmp50_ = persona;
 
5095
        _tmp51_ = prop_name;
 
5096
        _tmp52_ = type;
 
5097
        contacts_contact_editor_add_edit_row (self, _tmp50_, _tmp51_, &next_idx, TRUE, _tmp52_);
 
5098
        _tmp53_ = self->priv->last_row;
 
5099
        self->priv->last_row = _tmp53_ + 1;
 
5100
        gtk_widget_show_all ((GtkWidget*) self);
 
5101
        _g_object_unref0 (persona);
 
5102
}
 
5103
 
 
5104
 
 
5105
void contacts_contact_editor_property_data_copy (const ContactsContactEditorPropertyData* self, ContactsContactEditorPropertyData* dest) {
 
5106
        FolksPersona* _tmp0_;
 
5107
        FolksPersona* _tmp1_;
 
5108
        GValue _tmp2_;
 
5109
        GValue _tmp3_ = {0};
 
5110
        _tmp0_ = (*self).persona;
 
5111
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
5112
        _g_object_unref0 ((*dest).persona);
 
5113
        (*dest).persona = _tmp1_;
 
5114
        _tmp2_ = (*self).value;
 
5115
        if (G_IS_VALUE (&_tmp2_)) {
 
5116
                g_value_init (&_tmp3_, G_VALUE_TYPE (&_tmp2_));
 
5117
                g_value_copy (&_tmp2_, &_tmp3_);
 
5118
        } else {
 
5119
                _tmp3_ = _tmp2_;
 
5120
        }
 
5121
        G_IS_VALUE (&(*dest).value) ? (g_value_unset (&(*dest).value), NULL) : NULL;
 
5122
        (*dest).value = _tmp3_;
 
5123
}
 
5124
 
 
5125
 
 
5126
void contacts_contact_editor_property_data_destroy (ContactsContactEditorPropertyData* self) {
 
5127
        _g_object_unref0 ((*self).persona);
 
5128
        G_IS_VALUE (&(*self).value) ? (g_value_unset (&(*self).value), NULL) : NULL;
 
5129
}
 
5130
 
 
5131
 
 
5132
ContactsContactEditorPropertyData* contacts_contact_editor_property_data_dup (const ContactsContactEditorPropertyData* self) {
 
5133
        ContactsContactEditorPropertyData* dup;
 
5134
        dup = g_new0 (ContactsContactEditorPropertyData, 1);
 
5135
        contacts_contact_editor_property_data_copy (self, dup);
 
5136
        return dup;
 
5137
}
 
5138
 
 
5139
 
 
5140
void contacts_contact_editor_property_data_free (ContactsContactEditorPropertyData* self) {
 
5141
        contacts_contact_editor_property_data_destroy (self);
 
5142
        g_free (self);
 
5143
}
 
5144
 
 
5145
 
 
5146
GType contacts_contact_editor_property_data_get_type (void) {
 
5147
        static volatile gsize contacts_contact_editor_property_data_type_id__volatile = 0;
 
5148
        if (g_once_init_enter (&contacts_contact_editor_property_data_type_id__volatile)) {
 
5149
                GType contacts_contact_editor_property_data_type_id;
 
5150
                contacts_contact_editor_property_data_type_id = g_boxed_type_register_static ("ContactsContactEditorPropertyData", (GBoxedCopyFunc) contacts_contact_editor_property_data_dup, (GBoxedFreeFunc) contacts_contact_editor_property_data_free);
 
5151
                g_once_init_leave (&contacts_contact_editor_property_data_type_id__volatile, contacts_contact_editor_property_data_type_id);
 
5152
        }
 
5153
        return contacts_contact_editor_property_data_type_id__volatile;
 
5154
}
 
5155
 
 
5156
 
 
5157
static void contacts_contact_editor_row_data_copy (const ContactsContactEditorRowData* self, ContactsContactEditorRowData* dest) {
 
5158
        FolksAbstractFieldDetails* _tmp0_;
 
5159
        FolksAbstractFieldDetails* _tmp1_;
 
5160
        _tmp0_ = (*self).details;
 
5161
        _tmp1_ = _g_object_ref0 (_tmp0_);
 
5162
        _g_object_unref0 ((*dest).details);
 
5163
        (*dest).details = _tmp1_;
 
5164
}
 
5165
 
 
5166
 
 
5167
static void contacts_contact_editor_row_data_destroy (ContactsContactEditorRowData* self) {
 
5168
        _g_object_unref0 ((*self).details);
 
5169
}
 
5170
 
 
5171
 
 
5172
static ContactsContactEditorRowData* contacts_contact_editor_row_data_dup (const ContactsContactEditorRowData* self) {
 
5173
        ContactsContactEditorRowData* dup;
 
5174
        dup = g_new0 (ContactsContactEditorRowData, 1);
 
5175
        contacts_contact_editor_row_data_copy (self, dup);
 
5176
        return dup;
 
5177
}
 
5178
 
 
5179
 
 
5180
static void contacts_contact_editor_row_data_free (ContactsContactEditorRowData* self) {
 
5181
        contacts_contact_editor_row_data_destroy (self);
 
5182
        g_free (self);
 
5183
}
 
5184
 
 
5185
 
 
5186
static GType contacts_contact_editor_row_data_get_type (void) {
 
5187
        static volatile gsize contacts_contact_editor_row_data_type_id__volatile = 0;
 
5188
        if (g_once_init_enter (&contacts_contact_editor_row_data_type_id__volatile)) {
 
5189
                GType contacts_contact_editor_row_data_type_id;
 
5190
                contacts_contact_editor_row_data_type_id = g_boxed_type_register_static ("ContactsContactEditorRowData", (GBoxedCopyFunc) contacts_contact_editor_row_data_dup, (GBoxedFreeFunc) contacts_contact_editor_row_data_free);
 
5191
                g_once_init_leave (&contacts_contact_editor_row_data_type_id__volatile, contacts_contact_editor_row_data_type_id);
 
5192
        }
 
5193
        return contacts_contact_editor_row_data_type_id__volatile;
 
5194
}
 
5195
 
 
5196
 
 
5197
static void contacts_contact_editor_field_copy (const ContactsContactEditorField* self, ContactsContactEditorField* dest) {
 
5198
        gboolean _tmp0_;
 
5199
        GeeHashMap* _tmp1_;
 
5200
        GeeHashMap* _tmp2_;
 
5201
        _tmp0_ = (*self).changed;
 
5202
        (*dest).changed = _tmp0_;
 
5203
        _tmp1_ = (*self).rows;
 
5204
        _tmp2_ = _g_object_ref0 (_tmp1_);
 
5205
        _g_object_unref0 ((*dest).rows);
 
5206
        (*dest).rows = _tmp2_;
 
5207
}
 
5208
 
 
5209
 
 
5210
static void contacts_contact_editor_field_destroy (ContactsContactEditorField* self) {
 
5211
        _g_object_unref0 ((*self).rows);
 
5212
}
 
5213
 
 
5214
 
 
5215
static ContactsContactEditorField* contacts_contact_editor_field_dup (const ContactsContactEditorField* self) {
 
5216
        ContactsContactEditorField* dup;
 
5217
        dup = g_new0 (ContactsContactEditorField, 1);
 
5218
        contacts_contact_editor_field_copy (self, dup);
 
5219
        return dup;
 
5220
}
 
5221
 
 
5222
 
 
5223
static void contacts_contact_editor_field_free (ContactsContactEditorField* self) {
 
5224
        contacts_contact_editor_field_destroy (self);
 
5225
        g_free (self);
 
5226
}
 
5227
 
 
5228
 
 
5229
static GType contacts_contact_editor_field_get_type (void) {
 
5230
        static volatile gsize contacts_contact_editor_field_type_id__volatile = 0;
 
5231
        if (g_once_init_enter (&contacts_contact_editor_field_type_id__volatile)) {
 
5232
                GType contacts_contact_editor_field_type_id;
 
5233
                contacts_contact_editor_field_type_id = g_boxed_type_register_static ("ContactsContactEditorField", (GBoxedCopyFunc) contacts_contact_editor_field_dup, (GBoxedFreeFunc) contacts_contact_editor_field_free);
 
5234
                g_once_init_leave (&contacts_contact_editor_field_type_id__volatile, contacts_contact_editor_field_type_id);
 
5235
        }
 
5236
        return contacts_contact_editor_field_type_id__volatile;
 
5237
}
 
5238
 
 
5239
 
 
5240
static void contacts_contact_editor_class_init (ContactsContactEditorClass * klass) {
 
5241
        contacts_contact_editor_parent_class = g_type_class_peek_parent (klass);
 
5242
        g_type_class_add_private (klass, sizeof (ContactsContactEditorPrivate));
 
5243
        G_OBJECT_CLASS (klass)->finalize = contacts_contact_editor_finalize;
 
5244
}
 
5245
 
 
5246
 
 
5247
static void contacts_contact_editor_instance_init (ContactsContactEditor * self) {
 
5248
        self->priv = CONTACTS_CONTACT_EDITOR_GET_PRIVATE (self);
 
5249
}
 
5250
 
 
5251
 
 
5252
static void contacts_contact_editor_finalize (GObject* obj) {
 
5253
        ContactsContactEditor * self;
 
5254
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_EDITOR, ContactsContactEditor);
 
5255
        _g_object_unref0 (self->priv->contact);
 
5256
        _g_object_unref0 (self->priv->writable_personas);
 
5257
        G_OBJECT_CLASS (contacts_contact_editor_parent_class)->finalize (obj);
 
5258
}
 
5259
 
 
5260
 
 
5261
GType contacts_contact_editor_get_type (void) {
 
5262
        static volatile gsize contacts_contact_editor_type_id__volatile = 0;
 
5263
        if (g_once_init_enter (&contacts_contact_editor_type_id__volatile)) {
 
5264
                static const GTypeInfo g_define_type_info = { sizeof (ContactsContactEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_contact_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsContactEditor), 0, (GInstanceInitFunc) contacts_contact_editor_instance_init, NULL };
 
5265
                GType contacts_contact_editor_type_id;
 
5266
                contacts_contact_editor_type_id = g_type_register_static (GTK_TYPE_GRID, "ContactsContactEditor", &g_define_type_info, 0);
 
5267
                g_once_init_leave (&contacts_contact_editor_type_id__volatile, contacts_contact_editor_type_id);
 
5268
        }
 
5269
        return contacts_contact_editor_type_id__volatile;
 
5270
}
 
5271
 
 
5272
 
 
5273
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
5274
        if ((array != NULL) && (destroy_func != NULL)) {
 
5275
                int i;
 
5276
                for (i = 0; i < array_length; i = i + 1) {
 
5277
                        if (((gpointer*) array)[i] != NULL) {
 
5278
                                destroy_func (((gpointer*) array)[i]);
 
5279
                        }
 
5280
                }
 
5281
        }
 
5282
}
 
5283
 
 
5284
 
 
5285
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
 
5286
        _vala_array_destroy (array, array_length, destroy_func);
 
5287
        g_free (array);
 
5288
}
 
5289
 
 
5290
 
 
5291