1
/* contacts-contact-editor.c generated by valac 0.20.1, the Vala compiler
2
* generated from contacts-contact-editor.vala, do not modify */
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
6
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
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.
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.
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/>.
23
#include <glib-object.h>
25
#include <folks/folks.h>
31
#include <glib/gi18n-lib.h>
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))
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))
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))
54
typedef struct _ContactsContactEditor ContactsContactEditor;
55
typedef struct _ContactsContactEditorClass ContactsContactEditorClass;
56
typedef struct _ContactsContactEditorPrivate ContactsContactEditorPrivate;
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))
65
typedef struct _ContactsContact ContactsContact;
66
typedef struct _ContactsContactClass ContactsContactClass;
68
#define CONTACTS_CONTACT_EDITOR_TYPE_FIELD (contacts_contact_editor_field_get_type ())
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;
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))
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)))
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))
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)))
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))
109
typedef struct _ContactsContactFrame ContactsContactFrame;
110
typedef struct _ContactsContactFrameClass ContactsContactFrameClass;
111
typedef struct _Block27Data Block27Data;
112
typedef struct _ContactsContactPrivate ContactsContactPrivate;
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))
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)))
125
#define CONTACTS_CONTACT_EDITOR_TYPE_PROPERTY_DATA (contacts_contact_editor_property_data_get_type ())
126
typedef struct _ContactsContactEditorPropertyData ContactsContactEditorPropertyData;
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))
135
typedef struct _ContactsFakePersona ContactsFakePersona;
136
typedef struct _ContactsFakePersonaClass ContactsFakePersonaClass;
138
struct _ContactsAddressEditor {
139
GtkGrid parent_instance;
140
ContactsAddressEditorPrivate * priv;
141
GtkEntry* entries[7];
142
FolksPostalAddressFieldDetails* details;
145
struct _ContactsAddressEditorClass {
146
GtkGridClass parent_class;
149
struct _ContactsContactEditor {
150
GtkGrid parent_instance;
151
ContactsContactEditorPrivate * priv;
154
struct _ContactsContactEditorClass {
155
GtkGridClass parent_class;
158
struct _ContactsContactEditorRowData {
159
FolksAbstractFieldDetails* details;
162
struct _ContactsContactEditorField {
167
struct _ContactsContactEditorPrivate {
168
ContactsContact* contact;
170
GeeHashMap* writable_personas;
173
struct _Block22Data {
175
ContactsContactEditor * self;
176
GtkEntry* value_entry;
181
struct _Block23Data {
183
ContactsContactEditor * self;
184
GtkEntry* value_entry;
189
struct _Block24Data {
191
ContactsContactEditor * self;
192
GtkTextView* value_text;
197
struct _Block25Data {
199
ContactsContactEditor * self;
203
struct _Block26Data {
205
ContactsContactEditor * self;
206
ContactsAddressEditor* value_address;
210
struct _Block27Data {
212
ContactsContactEditor * self;
213
ContactsContactFrame* image_frame;
214
GtkEntry* name_entry;
218
struct _ContactsContact {
219
GObject parent_instance;
220
ContactsContactPrivate * priv;
221
ContactsStore* store;
223
FolksPresenceType presence_type;
224
gchar* presence_message;
226
FolksIndividual* individual;
229
struct _ContactsContactClass {
230
GObjectClass parent_class;
233
struct _ContactsContactEditorPropertyData {
234
FolksPersona* persona;
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;
246
GType contacts_address_editor_get_type (void) G_GNUC_CONST;
248
CONTACTS_ADDRESS_EDITOR_DUMMY_PROPERTY
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))
270
CONTACTS_CONTACT_EDITOR_DUMMY_PROPERTY
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);
385
static gpointer _g_object_ref0 (gpointer self) {
386
return self ? g_object_ref (self) : NULL;
390
static void _____lambda36_ (ContactsAddressEditor* self) {
391
g_signal_emit_by_name (self, "changed");
395
static void ______lambda36__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
396
_____lambda36_ (self);
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);
409
_tmp1_ = _g_object_ref0 (_tmp0_);
410
_g_object_unref0 (self->details);
411
self->details = _tmp1_;
421
gchar* postal_part = NULL;
422
FolksPostalAddressFieldDetails* _tmp6_;
423
gconstpointer _tmp7_;
424
FolksPostalAddress* _tmp8_;
428
const gchar* _tmp11_;
437
gint _tmp19__length1;
439
const gchar* _tmp21_;
440
const gchar* _tmp22_;
443
GtkStyleContext* _tmp28_ = NULL;
446
GtkStyleContext* _tmp31_ = NULL;
462
_tmp6_ = self->details;
463
_tmp7_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp6_);
465
_tmp9_ = contacts_contact_postal_element_props;
466
_tmp9__length1 = contacts_contact_postal_element_props_length1;
468
_tmp11_ = _tmp9_[_tmp10_];
469
g_object_get ((GObject*) ((FolksPostalAddress*) _tmp8_), _tmp11_, &postal_part, NULL);
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_];
477
_tmp16_ = self->entries[_tmp15_];
478
gtk_widget_set_hexpand ((GtkWidget*) _tmp16_, TRUE);
480
_tmp18_ = self->entries[_tmp17_];
481
_tmp19_ = contacts_contact_postal_element_names;
482
_tmp19__length1 = contacts_contact_postal_element_names_length1;
484
_tmp21_ = _tmp19_[_tmp20_];
485
g_object_set ((GObject*) _tmp18_, "placeholder-text", _tmp21_, NULL);
486
_tmp22_ = postal_part;
487
if (_tmp22_ != NULL) {
490
const gchar* _tmp25_;
492
_tmp24_ = self->entries[_tmp23_];
493
_tmp25_ = postal_part;
494
gtk_entry_set_text (_tmp24_, _tmp25_);
497
_tmp27_ = self->entries[_tmp26_];
498
_tmp28_ = gtk_widget_get_style_context ((GtkWidget*) _tmp27_);
499
gtk_style_context_add_class (_tmp28_, "contacts-entry");
501
_tmp30_ = self->entries[_tmp29_];
502
_tmp31_ = gtk_widget_get_style_context ((GtkWidget*) _tmp30_);
503
gtk_style_context_add_class (_tmp31_, "contacts-postal-entry");
505
_tmp33_ = self->entries[_tmp32_];
506
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp33_);
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);
518
ContactsAddressEditor* contacts_address_editor_new (FolksPostalAddressFieldDetails* _details) {
519
return contacts_address_editor_construct (CONTACTS_TYPE_ADDRESS_EDITOR, _details);
523
static void contacts_address_editor_real_grab_focus (GtkWidget* base) {
524
ContactsAddressEditor * self;
526
self = (ContactsAddressEditor*) base;
527
_tmp0_ = self->entries[0];
528
gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
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);
540
static void contacts_address_editor_instance_init (ContactsAddressEditor * self) {
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);
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);
561
return contacts_address_editor_type_id__volatile;
565
static void contacts_contact_editor_get_value_from_emails (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
567
GeeHashSet* new_details;
570
GValue _tmp39_ = {0};
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_;
582
GeeIterator* _tmp5_ = NULL;
584
GeeIterator* _row_entry_it;
586
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
589
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
591
_g_object_unref0 (_tmp4_);
592
_row_entry_it = _tmp6_;
595
gboolean _tmp8_ = FALSE;
597
gpointer _tmp10_ = NULL;
598
GeeMapEntry* row_entry;
599
GeeMapEntry* _tmp11_;
600
gconstpointer _tmp12_;
602
GtkWidget* _tmp14_ = NULL;
603
ContactsTypeCombo* _tmp15_;
604
ContactsTypeCombo* combo;
605
GeeMapEntry* _tmp16_;
606
gconstpointer _tmp17_;
608
GtkWidget* _tmp19_ = NULL;
611
ContactsTypeCombo* _tmp21_;
612
GeeMapEntry* _tmp22_;
613
gconstpointer _tmp23_;
614
ContactsContactEditorRowData* _tmp24_;
615
FolksAbstractFieldDetails* _tmp25_;
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;
627
FolksEmailFieldDetails* _tmp36_;
628
_tmp7_ = _row_entry_it;
629
_tmp8_ = gee_iterator_next (_tmp7_);
633
_tmp9_ = _row_entry_it;
634
_tmp10_ = gee_iterator_get (_tmp9_);
635
row_entry = (GeeMapEntry*) _tmp10_;
637
_tmp12_ = gee_map_entry_get_key (_tmp11_);
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);
643
_tmp17_ = gee_map_entry_get_key (_tmp16_);
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);
650
_tmp23_ = gee_map_entry_get_value (_tmp22_);
652
_tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
653
contacts_typecombo_update_details (_tmp21_, _tmp25_);
655
_tmp27_ = gtk_entry_get_text (_tmp26_);
657
_tmp29_ = gee_map_entry_get_value (_tmp28_);
659
_tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
660
_tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
662
_tmp34_ = folks_email_field_details_new (_tmp27_, _tmp33_);
664
_tmp35_ = new_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);
672
_g_object_unref0 (_row_entry_it);
674
_tmp37_ = new_details;
675
_tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
676
g_value_init (&_tmp39_, _tmp38_);
678
_tmp40_ = new_details;
679
g_value_set_object (&new_value, (GObject*) _tmp40_);
681
_g_object_unref0 (new_details);
686
static void contacts_contact_editor_get_value_from_phones (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
688
GeeHashSet* new_details;
691
GValue _tmp39_ = {0};
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_;
703
GeeIterator* _tmp5_ = NULL;
705
GeeIterator* _row_entry_it;
707
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
710
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
712
_g_object_unref0 (_tmp4_);
713
_row_entry_it = _tmp6_;
716
gboolean _tmp8_ = FALSE;
718
gpointer _tmp10_ = NULL;
719
GeeMapEntry* row_entry;
720
GeeMapEntry* _tmp11_;
721
gconstpointer _tmp12_;
723
GtkWidget* _tmp14_ = NULL;
724
ContactsTypeCombo* _tmp15_;
725
ContactsTypeCombo* combo;
726
GeeMapEntry* _tmp16_;
727
gconstpointer _tmp17_;
729
GtkWidget* _tmp19_ = NULL;
732
ContactsTypeCombo* _tmp21_;
733
GeeMapEntry* _tmp22_;
734
gconstpointer _tmp23_;
735
ContactsContactEditorRowData* _tmp24_;
736
FolksAbstractFieldDetails* _tmp25_;
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;
748
FolksPhoneFieldDetails* _tmp36_;
749
_tmp7_ = _row_entry_it;
750
_tmp8_ = gee_iterator_next (_tmp7_);
754
_tmp9_ = _row_entry_it;
755
_tmp10_ = gee_iterator_get (_tmp9_);
756
row_entry = (GeeMapEntry*) _tmp10_;
758
_tmp12_ = gee_map_entry_get_key (_tmp11_);
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);
764
_tmp17_ = gee_map_entry_get_key (_tmp16_);
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);
771
_tmp23_ = gee_map_entry_get_value (_tmp22_);
773
_tmp25_ = (*((ContactsContactEditorRowData*) _tmp24_)).details;
774
contacts_typecombo_update_details (_tmp21_, _tmp25_);
776
_tmp27_ = gtk_entry_get_text (_tmp26_);
778
_tmp29_ = gee_map_entry_get_value (_tmp28_);
780
_tmp31_ = (*((ContactsContactEditorRowData*) _tmp30_)).details;
781
_tmp32_ = folks_abstract_field_details_get_parameters (_tmp31_);
783
_tmp34_ = folks_phone_field_details_new (_tmp27_, _tmp33_);
785
_tmp35_ = new_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);
793
_g_object_unref0 (_row_entry_it);
795
_tmp37_ = new_details;
796
_tmp38_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp37_);
797
g_value_init (&_tmp39_, _tmp38_);
799
_tmp40_ = new_details;
800
g_value_set_object (&new_value, (GObject*) _tmp40_);
802
_g_object_unref0 (new_details);
807
static void contacts_contact_editor_get_value_from_urls (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
809
GeeHashSet* new_details;
812
GValue _tmp29_ = {0};
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_;
824
GeeIterator* _tmp5_ = NULL;
826
GeeIterator* _row_entry_it;
828
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
831
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
833
_g_object_unref0 (_tmp4_);
834
_row_entry_it = _tmp6_;
837
gboolean _tmp8_ = FALSE;
839
gpointer _tmp10_ = NULL;
840
GeeMapEntry* row_entry;
841
GeeMapEntry* _tmp11_;
842
gconstpointer _tmp12_;
844
GtkWidget* _tmp14_ = NULL;
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;
858
FolksUrlFieldDetails* _tmp26_;
859
_tmp7_ = _row_entry_it;
860
_tmp8_ = gee_iterator_next (_tmp7_);
864
_tmp9_ = _row_entry_it;
865
_tmp10_ = gee_iterator_get (_tmp9_);
866
row_entry = (GeeMapEntry*) _tmp10_;
868
_tmp12_ = gee_map_entry_get_key (_tmp11_);
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);
874
_tmp17_ = gtk_entry_get_text (_tmp16_);
876
_tmp19_ = gee_map_entry_get_value (_tmp18_);
878
_tmp21_ = (*((ContactsContactEditorRowData*) _tmp20_)).details;
879
_tmp22_ = folks_abstract_field_details_get_parameters (_tmp21_);
881
_tmp24_ = folks_url_field_details_new (_tmp17_, _tmp23_);
883
_tmp25_ = new_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);
890
_g_object_unref0 (_row_entry_it);
892
_tmp27_ = new_details;
893
_tmp28_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp27_);
894
g_value_init (&_tmp29_, _tmp28_);
896
_tmp30_ = new_details;
897
g_value_set_object (&new_value, (GObject*) _tmp30_);
899
_g_object_unref0 (new_details);
904
static void contacts_contact_editor_get_value_from_nickname (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
907
g_return_if_fail (self != NULL);
908
g_return_if_fail (rows != NULL);
909
g_value_init (&_tmp0_, G_TYPE_STRING);
916
GeeIterator* _tmp5_ = NULL;
918
GeeIterator* _row_entry_it;
920
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
923
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
925
_g_object_unref0 (_tmp4_);
926
_row_entry_it = _tmp6_;
929
gboolean _tmp8_ = FALSE;
931
gpointer _tmp10_ = NULL;
932
GeeMapEntry* row_entry;
933
GeeMapEntry* _tmp11_;
934
gconstpointer _tmp12_;
936
GtkWidget* _tmp14_ = NULL;
940
const gchar* _tmp17_ = NULL;
941
_tmp7_ = _row_entry_it;
942
_tmp8_ = gee_iterator_next (_tmp7_);
946
_tmp9_ = _row_entry_it;
947
_tmp10_ = gee_iterator_get (_tmp9_);
948
row_entry = (GeeMapEntry*) _tmp10_;
950
_tmp12_ = gee_map_entry_get_key (_tmp11_);
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);
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);
961
_g_object_unref0 (_row_entry_it);
968
static void contacts_contact_editor_get_value_from_birthday (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
971
g_return_if_fail (self != NULL);
972
g_return_if_fail (rows != NULL);
973
g_value_init (&_tmp0_, G_TYPE_DATE_TIME);
980
GeeIterator* _tmp5_ = NULL;
982
GeeIterator* _row_entry_it;
984
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
987
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
989
_g_object_unref0 (_tmp4_);
990
_row_entry_it = _tmp6_;
993
gboolean _tmp8_ = FALSE;
995
gpointer _tmp10_ = NULL;
996
GeeMapEntry* row_entry;
997
GeeMapEntry* _tmp11_;
998
gconstpointer _tmp12_;
1000
GtkWidget* _tmp14_ = NULL;
1004
GtkWidget* _tmp17_ = NULL;
1005
GtkSpinButton* _tmp18_;
1006
GtkSpinButton* day_spin;
1008
GtkWidget* _tmp20_ = NULL;
1009
GtkComboBoxText* _tmp21_;
1010
GtkComboBoxText* combo;
1012
gconstpointer _tmp23_ = NULL;
1013
GtkComboBoxText* _tmp24_;
1015
GtkSpinButton* _tmp26_;
1016
gdouble _tmp27_ = 0.0;
1020
GDateTime* _tmp30_ = NULL;
1022
_tmp7_ = _row_entry_it;
1023
_tmp8_ = gee_iterator_next (_tmp7_);
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_);
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);
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);
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);
1045
_tmp23_ = g_object_get_data ((GObject*) _tmp22_, "year");
1047
_tmp25_ = gtk_combo_box_get_active ((GtkComboBox*) _tmp24_);
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);
1053
_tmp30_ = g_date_time_to_utc (_tmp29_);
1054
_g_date_time_unref0 (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);
1064
_g_object_unref0 (_row_entry_it);
1066
*result = new_value;
1071
static void contacts_contact_editor_get_value_from_notes (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
1073
GeeHashSet* new_details;
1074
GeeHashSet* _tmp38_;
1075
GType _tmp39_ = 0UL;
1076
GValue _tmp40_ = {0};
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_;
1088
GeeIterator* _tmp5_ = NULL;
1089
GeeIterator* _tmp6_;
1090
GeeIterator* _row_entry_it;
1092
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
1095
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
1097
_g_object_unref0 (_tmp4_);
1098
_row_entry_it = _tmp6_;
1100
GeeIterator* _tmp7_;
1101
gboolean _tmp8_ = FALSE;
1102
GeeIterator* _tmp9_;
1103
gpointer _tmp10_ = NULL;
1104
GeeMapEntry* row_entry;
1105
GeeMapEntry* _tmp11_;
1106
gconstpointer _tmp12_;
1108
GtkWidget* _tmp14_ = NULL;
1109
GtkWidget* _tmp15_ = NULL;
1110
GtkTextView* _tmp16_;
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;
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_);
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_);
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);
1153
_tmp18_ = gtk_text_view_get_buffer (_tmp17_);
1154
gtk_text_buffer_get_start_iter (_tmp18_, &_tmp19_);
1157
_tmp21_ = gtk_text_view_get_buffer (_tmp20_);
1158
gtk_text_buffer_get_end_iter (_tmp21_, &_tmp22_);
1161
_tmp24_ = gtk_text_view_get_buffer (_tmp23_);
1164
_tmp27_ = gtk_text_buffer_get_text (_tmp24_, &_tmp25_, &_tmp26_, TRUE);
1167
_tmp29_ = row_entry;
1168
_tmp30_ = gee_map_entry_get_value (_tmp29_);
1170
_tmp32_ = (*((ContactsContactEditorRowData*) _tmp31_)).details;
1171
_tmp33_ = folks_abstract_field_details_get_parameters (_tmp32_);
1173
_tmp35_ = folks_note_field_details_new (_tmp28_, _tmp34_, NULL);
1175
_tmp36_ = new_details;
1177
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp36_, _tmp37_);
1178
_g_object_unref0 (details);
1180
_g_object_unref0 (text);
1181
_g_object_unref0 (row_entry);
1183
_g_object_unref0 (_row_entry_it);
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);
1197
static void contacts_contact_editor_get_value_from_addresses (ContactsContactEditor* self, GeeHashMap* rows, GValue* result) {
1199
GeeHashSet* new_details;
1200
GeeHashSet* _tmp104_;
1201
GType _tmp105_ = 0UL;
1202
GValue _tmp106_ = {0};
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_;
1214
GeeIterator* _tmp5_ = NULL;
1215
GeeIterator* _tmp6_;
1216
GeeIterator* _row_entry_it;
1218
_tmp2_ = gee_abstract_map_get_entries ((GeeMap*) _tmp1_);
1221
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
1223
_g_object_unref0 (_tmp4_);
1224
_row_entry_it = _tmp6_;
1226
GeeIterator* _tmp7_;
1227
gboolean _tmp8_ = FALSE;
1228
GeeIterator* _tmp9_;
1229
gpointer _tmp10_ = NULL;
1230
GeeMapEntry* row_entry;
1231
GeeMapEntry* _tmp11_;
1232
gconstpointer _tmp12_;
1234
GtkWidget* _tmp14_ = NULL;
1235
ContactsTypeCombo* _tmp15_;
1236
ContactsTypeCombo* combo;
1237
GeeMapEntry* _tmp16_;
1238
gconstpointer _tmp17_;
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_);
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_);
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);
1329
_tmp16_ = row_entry;
1330
_tmp17_ = gee_map_entry_get_key (_tmp16_);
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_;
1336
_tmp22_ = row_entry;
1337
_tmp23_ = gee_map_entry_get_value (_tmp22_);
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_);
1345
_tmp30_ = folks_postal_address_get_po_box ((FolksPostalAddress*) _tmp29_);
1347
_tmp32_ = addr_editor;
1348
_tmp33_ = _tmp32_->details;
1349
_tmp34_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp33_);
1351
_tmp36_ = folks_postal_address_get_extension ((FolksPostalAddress*) _tmp35_);
1353
_tmp38_ = addr_editor;
1354
_tmp39_ = _tmp38_->details;
1355
_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
1357
_tmp42_ = folks_postal_address_get_street ((FolksPostalAddress*) _tmp41_);
1359
_tmp44_ = addr_editor;
1360
_tmp45_ = _tmp44_->details;
1361
_tmp46_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp45_);
1363
_tmp48_ = folks_postal_address_get_locality ((FolksPostalAddress*) _tmp47_);
1365
_tmp50_ = addr_editor;
1366
_tmp51_ = _tmp50_->details;
1367
_tmp52_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp51_);
1369
_tmp54_ = folks_postal_address_get_region ((FolksPostalAddress*) _tmp53_);
1371
_tmp56_ = addr_editor;
1372
_tmp57_ = _tmp56_->details;
1373
_tmp58_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp57_);
1375
_tmp60_ = folks_postal_address_get_postal_code ((FolksPostalAddress*) _tmp59_);
1377
_tmp62_ = addr_editor;
1378
_tmp63_ = _tmp62_->details;
1379
_tmp64_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp63_);
1381
_tmp66_ = folks_postal_address_get_country ((FolksPostalAddress*) _tmp65_);
1383
_tmp68_ = addr_editor;
1384
_tmp69_ = _tmp68_->details;
1385
_tmp70_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp69_);
1387
_tmp72_ = folks_postal_address_get_address_format ((FolksPostalAddress*) _tmp71_);
1389
_tmp74_ = addr_editor;
1390
_tmp75_ = _tmp74_->details;
1391
_tmp76_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp75_);
1393
_tmp78_ = folks_postal_address_get_uid ((FolksPostalAddress*) _tmp77_);
1395
_tmp80_ = folks_postal_address_new (_tmp31_, _tmp37_, _tmp43_, _tmp49_, _tmp55_, _tmp61_, _tmp67_, _tmp73_, _tmp79_);
1396
new_value = _tmp80_;
1406
ContactsAddressEditor* _tmp85_;
1407
FolksPostalAddress* _tmp86_;
1409
gint _tmp87__length1;
1411
const gchar* _tmp89_;
1412
ContactsAddressEditor* _tmp90_;
1415
const gchar* _tmp93_ = NULL;
1424
_tmp85_ = addr_editor;
1425
if (!(_tmp84_ < 7)) {
1428
_tmp86_ = new_value;
1429
_tmp87_ = contacts_contact_postal_element_props;
1430
_tmp87__length1 = contacts_contact_postal_element_props_length1;
1432
_tmp89_ = _tmp87_[_tmp88_];
1433
_tmp90_ = addr_editor;
1435
_tmp92_ = _tmp90_->entries[_tmp91_];
1436
_tmp93_ = gtk_entry_get_text (_tmp92_);
1437
g_object_set ((GObject*) _tmp86_, _tmp89_, _tmp93_, NULL);
1441
_tmp94_ = new_value;
1442
_tmp95_ = row_entry;
1443
_tmp96_ = gee_map_entry_get_value (_tmp95_);
1445
_tmp98_ = (*((ContactsContactEditorRowData*) _tmp97_)).details;
1446
_tmp99_ = folks_abstract_field_details_get_parameters (_tmp98_);
1448
_tmp101_ = folks_postal_address_field_details_new (_tmp94_, _tmp100_);
1450
_tmp102_ = new_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);
1459
_g_object_unref0 (_row_entry_it);
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);
1473
static void contacts_contact_editor_set_field_changed (ContactsContactEditor* self, gint row) {
1474
g_return_if_fail (self != NULL);
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_);
1487
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
1489
_g_object_unref0 (_tmp3_);
1490
_fields_it = _tmp5_;
1492
GeeIterator* _tmp6_;
1493
gboolean _tmp7_ = FALSE;
1494
GeeIterator* _tmp8_;
1495
gpointer _tmp9_ = NULL;
1497
_tmp6_ = _fields_it;
1498
_tmp7_ = gee_iterator_next (_tmp6_);
1502
_tmp8_ = _fields_it;
1503
_tmp9_ = gee_iterator_get (_tmp8_);
1504
fields = (GeeHashMap*) _tmp9_;
1506
GeeHashMap* _tmp10_;
1510
GeeIterator* _tmp14_ = NULL;
1511
GeeIterator* _tmp15_;
1512
GeeIterator* _entry_it;
1514
_tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
1517
_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
1519
_g_object_unref0 (_tmp13_);
1520
_entry_it = _tmp15_;
1522
GeeIterator* _tmp16_;
1523
gboolean _tmp17_ = FALSE;
1524
GeeIterator* _tmp18_;
1525
gpointer _tmp19_ = NULL;
1527
GeeMapEntry* _tmp20_;
1528
gconstpointer _tmp21_;
1529
ContactsContactEditorField* _tmp22_;
1530
GeeHashMap* _tmp23_;
1535
gboolean _tmp28_ = FALSE;
1537
_tmp16_ = _entry_it;
1538
_tmp17_ = gee_iterator_next (_tmp16_);
1542
_tmp18_ = _entry_it;
1543
_tmp19_ = gee_iterator_get (_tmp18_);
1544
entry = (GeeMapEntry*) _tmp19_;
1546
_tmp21_ = gee_map_entry_get_value (_tmp20_);
1548
_tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
1549
_tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
1553
_tmp28_ = gee_collection_contains ((GeeCollection*) _tmp26_, (gpointer) ((gintptr) _tmp27_));
1555
_g_object_unref0 (_tmp26_);
1557
GeeMapEntry* _tmp30_;
1558
gconstpointer _tmp31_;
1559
ContactsContactEditorField* _tmp32_;
1561
GeeMapEntry* _tmp34_;
1562
gconstpointer _tmp35_;
1563
ContactsContactEditorField* _tmp36_;
1565
_tmp31_ = gee_map_entry_get_value (_tmp30_);
1567
_tmp33_ = (*((ContactsContactEditorField*) _tmp32_)).changed;
1569
_g_object_unref0 (entry);
1570
_g_object_unref0 (_entry_it);
1571
_g_object_unref0 (fields);
1572
_g_object_unref0 (_fields_it);
1576
_tmp35_ = gee_map_entry_get_value (_tmp34_);
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);
1585
_g_object_unref0 (entry);
1587
_g_object_unref0 (_entry_it);
1589
_g_object_unref0 (fields);
1591
_g_object_unref0 (_fields_it);
1596
static void contacts_contact_editor_remove_row (ContactsContactEditor* self, gint row) {
1597
g_return_if_fail (self != NULL);
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_);
1610
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
1612
_g_object_unref0 (_tmp3_);
1613
_fields_it = _tmp5_;
1615
GeeIterator* _tmp6_;
1616
gboolean _tmp7_ = FALSE;
1617
GeeIterator* _tmp8_;
1618
gpointer _tmp9_ = NULL;
1620
_tmp6_ = _fields_it;
1621
_tmp7_ = gee_iterator_next (_tmp6_);
1625
_tmp8_ = _fields_it;
1626
_tmp9_ = gee_iterator_get (_tmp8_);
1627
fields = (GeeHashMap*) _tmp9_;
1629
GeeHashMap* _tmp10_;
1633
GeeIterator* _tmp14_ = NULL;
1634
GeeIterator* _tmp15_;
1635
GeeIterator* _field_entry_it;
1637
_tmp11_ = gee_abstract_map_get_entries ((GeeMap*) _tmp10_);
1640
_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
1642
_g_object_unref0 (_tmp13_);
1643
_field_entry_it = _tmp15_;
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_);
1655
_tmp18_ = _field_entry_it;
1656
_tmp19_ = gee_iterator_get (_tmp18_);
1657
field_entry = (GeeMapEntry*) _tmp19_;
1659
GeeMapEntry* _tmp20_;
1660
gconstpointer _tmp21_;
1661
ContactsContactEditorField* _tmp22_;
1662
GeeHashMap* _tmp23_;
1666
GeeIterator* _tmp27_ = NULL;
1667
GeeIterator* _tmp28_;
1668
GeeIterator* _idx_it;
1669
_tmp20_ = field_entry;
1670
_tmp21_ = gee_map_entry_get_value (_tmp20_);
1672
_tmp23_ = (*((ContactsContactEditorField*) _tmp22_)).rows;
1673
_tmp24_ = gee_abstract_map_get_keys ((GeeMap*) _tmp23_);
1676
_tmp27_ = gee_iterable_iterator ((GeeIterable*) _tmp26_);
1678
_g_object_unref0 (_tmp26_);
1681
GeeIterator* _tmp29_;
1682
gboolean _tmp30_ = FALSE;
1683
GeeIterator* _tmp31_;
1684
gpointer _tmp32_ = NULL;
1689
_tmp30_ = gee_iterator_next (_tmp29_);
1694
_tmp32_ = gee_iterator_get (_tmp31_);
1695
idx = (gint) ((gintptr) _tmp32_);
1698
if (_tmp33_ == _tmp34_) {
1700
GtkWidget* _tmp36_ = NULL;
1705
GtkWidget* _tmp40_ = NULL;
1709
GtkWidget* _tmp44_ = NULL;
1712
GeeMapEntry* _tmp47_;
1713
gconstpointer _tmp48_;
1714
ContactsContactEditorField* _tmp49_;
1715
GeeMapEntry* _tmp50_;
1716
gconstpointer _tmp51_;
1717
ContactsContactEditorField* _tmp52_;
1718
GeeHashMap* _tmp53_;
1721
_tmp36_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp35_);
1722
_tmp37_ = _g_object_ref0 (_tmp36_);
1725
gtk_widget_destroy (_tmp38_);
1727
_tmp40_ = gtk_grid_get_child_at ((GtkGrid*) self, 1, _tmp39_);
1728
_tmp41_ = _g_object_ref0 (_tmp40_);
1729
_g_object_unref0 (child);
1732
gtk_widget_destroy (_tmp42_);
1734
_tmp44_ = gtk_grid_get_child_at ((GtkGrid*) self, 3, _tmp43_);
1735
_tmp45_ = _g_object_ref0 (_tmp44_);
1736
_g_object_unref0 (child);
1739
gtk_widget_destroy (_tmp46_);
1740
_tmp47_ = field_entry;
1741
_tmp48_ = gee_map_entry_get_value (_tmp47_);
1743
(*((ContactsContactEditorField*) _tmp49_)).changed = TRUE;
1744
_tmp50_ = field_entry;
1745
_tmp51_ = gee_map_entry_get_value (_tmp50_);
1747
_tmp53_ = (*((ContactsContactEditorField*) _tmp52_)).rows;
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);
1759
_g_object_unref0 (_idx_it);
1761
_g_object_unref0 (field_entry);
1763
_g_object_unref0 (_field_entry_it);
1765
_g_object_unref0 (fields);
1767
_g_object_unref0 (_fields_it);
1772
static Block22Data* block22_data_ref (Block22Data* _data22_) {
1773
g_atomic_int_inc (&_data22_->_ref_count_);
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_);
1792
static void __lambda37_ (Block22Data* _data22_) {
1793
ContactsContactEditor * self;
1795
self = _data22_->self;
1796
_tmp0_ = _data22_->row;
1797
contacts_contact_editor_set_field_changed (self, _tmp0_);
1801
static void ___lambda37__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
1806
static void __lambda38_ (Block22Data* _data22_) {
1807
ContactsContactEditor * self;
1809
self = _data22_->self;
1810
_tmp0_ = _data22_->row;
1811
contacts_contact_editor_set_field_changed (self, _tmp0_);
1815
static void ___lambda38__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
1820
static void __lambda39_ (Block22Data* _data22_) {
1821
ContactsContactEditor * self;
1823
self = _data22_->self;
1824
_tmp0_ = _data22_->row;
1825
contacts_contact_editor_remove_row (self, _tmp0_);
1829
static void ___lambda39__gtk_button_clicked (GtkButton* _sender, gpointer self) {
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);
1845
static void ___lambda40__gtk_widget_map (GtkWidget* _sender, gpointer self) {
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_;
1853
const gchar* _tmp1_;
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_;
1865
const gchar* _tmp14_;
1868
GtkButton* delete_button;
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);
1881
_data22_->row = _tmp0_;
1883
_tmp2_ = g_strdup (_tmp1_);
1884
_g_free0 (_data22_->value);
1885
_data22_->value = _tmp2_;
1887
_tmp4_ = contacts_typecombo_new (_tmp3_);
1888
g_object_ref_sink (_tmp4_);
1891
gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, FALSE);
1894
contacts_typecombo_set_active (_tmp6_, _tmp7_);
1896
if (_tmp8_ != NULL) {
1897
ContactsTypeCombo* _tmp9_;
1898
const gchar* _tmp10_;
1901
contacts_typecombo_set_to (_tmp9_, _tmp10_);
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_);
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);
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_);
1936
static Block23Data* block23_data_ref (Block23Data* _data23_) {
1937
g_atomic_int_inc (&_data23_->_ref_count_);
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_);
1956
static void __lambda41_ (Block23Data* _data23_) {
1957
ContactsContactEditor * self;
1959
self = _data23_->self;
1960
_tmp0_ = _data23_->row;
1961
contacts_contact_editor_set_field_changed (self, _tmp0_);
1965
static void ___lambda41__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
1970
static void __lambda42_ (Block23Data* _data23_) {
1971
ContactsContactEditor * self;
1973
self = _data23_->self;
1974
_tmp0_ = _data23_->row;
1975
contacts_contact_editor_remove_row (self, _tmp0_);
1979
static void ___lambda42__gtk_button_clicked (GtkButton* _sender, gpointer self) {
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);
1995
static void ___lambda43__gtk_widget_map (GtkWidget* _sender, gpointer self) {
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_;
2005
const gchar* _tmp3_;
2007
GtkLabel* title_label;
2010
const gchar* _tmp7_;
2013
GtkButton* delete_button;
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);
2024
_tmp1_ = g_strdup (_tmp0_);
2025
_g_free0 (_data23_->value);
2026
_data23_->value = _tmp1_;
2028
_data23_->row = _tmp2_;
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_);
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_);
2066
static Block24Data* block24_data_ref (Block24Data* _data24_) {
2067
g_atomic_int_inc (&_data24_->_ref_count_);
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_);
2086
static void __lambda44_ (Block24Data* _data24_) {
2087
ContactsContactEditor * self;
2089
self = _data24_->self;
2090
_tmp0_ = _data24_->row;
2091
contacts_contact_editor_set_field_changed (self, _tmp0_);
2095
static void ___lambda44__gtk_text_buffer_changed (GtkTextBuffer* _sender, gpointer self) {
2100
static void __lambda45_ (Block24Data* _data24_) {
2101
ContactsContactEditor * self;
2103
self = _data24_->self;
2104
_tmp0_ = _data24_->row;
2105
contacts_contact_editor_remove_row (self, _tmp0_);
2109
static void ___lambda45__gtk_button_clicked (GtkButton* _sender, gpointer self) {
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);
2125
static void ___lambda46__gtk_widget_map (GtkWidget* _sender, gpointer self) {
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_;
2135
const gchar* _tmp3_;
2137
GtkLabel* title_label;
2139
GtkScrolledWindow* _tmp6_;
2140
GtkScrolledWindow* sw;
2141
GtkTextView* _tmp7_;
2142
GtkTextBuffer* _tmp8_ = NULL;
2143
const gchar* _tmp9_;
2144
GtkStyleContext* _tmp10_ = NULL;
2147
GtkButton* delete_button;
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);
2159
_tmp1_ = g_strdup (_tmp0_);
2160
_g_free0 (_data24_->value);
2161
_data24_->value = _tmp1_;
2163
_data24_->row = _tmp2_;
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_);
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_);
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_);
2215
static Block25Data* block25_data_ref (Block25Data* _data25_) {
2216
g_atomic_int_inc (&_data25_->_ref_count_);
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_);
2233
static void __lambda47_ (Block25Data* _data25_) {
2234
ContactsContactEditor * self;
2236
self = _data25_->self;
2237
_tmp0_ = _data25_->row;
2238
contacts_contact_editor_set_field_changed (self, _tmp0_);
2242
static void ___lambda47__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
2247
static void __lambda48_ (Block25Data* _data25_) {
2248
ContactsContactEditor * self;
2250
self = _data25_->self;
2251
_tmp0_ = _data25_->row;
2252
contacts_contact_editor_set_field_changed (self, _tmp0_);
2256
static void ___lambda48__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) {
2261
static void __lambda49_ (Block25Data* _data25_) {
2262
ContactsContactEditor * self;
2264
self = _data25_->self;
2265
_tmp0_ = _data25_->row;
2266
contacts_contact_editor_remove_row (self, _tmp0_);
2270
static void ___lambda49__gtk_button_clicked (GtkButton* _sender, gpointer self) {
2275
static void contacts_contact_editor_attach_row_for_birthday (ContactsContactEditor* self, const gchar* title, FolksAbstractFieldDetails* details, GDateTime* birthday, gint row) {
2276
Block25Data* _data25_;
2278
const gchar* _tmp1_;
2280
GtkLabel* title_label;
2284
GtkSpinButton* _tmp5_;
2285
GtkSpinButton* day_spin;
2287
GDateTime* _tmp7_ = NULL;
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;
2305
GDateTime* _tmp24_ = NULL;
2308
GtkStyleContext* _tmp27_ = NULL;
2310
GDateTime* _tmp29_ = NULL;
2315
GtkButton* delete_button;
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);
2326
_data25_->row = _tmp0_;
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_);
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_);
2343
gtk_spin_button_set_digits (day_spin, (guint) 0);
2344
gtk_spin_button_set_numeric (day_spin, TRUE);
2346
_tmp7_ = g_date_time_to_local (_tmp6_);
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_);
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_);
2379
_tmp24_ = g_date_time_to_local (_tmp23_);
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);
2388
_tmp29_ = g_date_time_to_local (_tmp28_);
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_);
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_);
2420
static Block26Data* block26_data_ref (Block26Data* _data26_) {
2421
g_atomic_int_inc (&_data26_->_ref_count_);
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_);
2439
static void __lambda50_ (Block26Data* _data26_) {
2440
ContactsContactEditor * self;
2442
self = _data26_->self;
2443
_tmp0_ = _data26_->row;
2444
contacts_contact_editor_set_field_changed (self, _tmp0_);
2448
static void ___lambda50__contacts_typecombo_changed (ContactsTypeCombo* _sender, gpointer self) {
2453
static void __lambda51_ (Block26Data* _data26_) {
2454
ContactsContactEditor * self;
2456
self = _data26_->self;
2457
_tmp0_ = _data26_->row;
2458
contacts_contact_editor_set_field_changed (self, _tmp0_);
2462
static void ___lambda51__contacts_address_editor_changed (ContactsAddressEditor* _sender, gpointer self) {
2467
static void __lambda52_ (Block26Data* _data26_) {
2468
ContactsContactEditor * self;
2470
self = _data26_->self;
2471
_tmp0_ = _data26_->row;
2472
contacts_contact_editor_remove_row (self, _tmp0_);
2476
static void ___lambda52__gtk_button_clicked (GtkButton* _sender, gpointer self) {
2481
static void __lambda53_ (Block26Data* _data26_) {
2482
ContactsContactEditor * self;
2483
self = _data26_->self;
2484
gtk_widget_grab_focus ((GtkWidget*) _data26_->value_address);
2488
static void ___lambda53__gtk_widget_map (GtkWidget* _sender, gpointer self) {
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_;
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_;
2505
FolksPostalAddressFieldDetails* _tmp11_;
2506
ContactsAddressEditor* _tmp12_;
2509
GtkButton* delete_button;
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);
2521
_data26_->row = _tmp0_;
2523
_tmp2_ = contacts_typecombo_new (_tmp1_);
2524
g_object_ref_sink (_tmp2_);
2527
gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, FALSE);
2530
contacts_typecombo_set_active (_tmp4_, (FolksAbstractFieldDetails*) _tmp5_);
2532
if (_tmp6_ != NULL) {
2533
ContactsTypeCombo* _tmp7_;
2534
const gchar* _tmp8_;
2537
contacts_typecombo_set_to (_tmp7_, _tmp8_);
2540
_tmp10_ = _data26_->row;
2541
gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp9_, 0, _tmp10_, 1, 1);
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_);
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);
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_);
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_;
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);
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")))) {
2595
GeeHashMap* _tmp47_;
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);
2602
FolksEmailFieldDetails* _tmp6_;
2603
FolksEmailFieldDetails* detail_field;
2605
ContactsTypeSet* _tmp8_;
2606
ContactsTypeSet* _tmp9_;
2607
FolksEmailFieldDetails* _tmp10_;
2608
const gchar* _tmp11_;
2609
GeeHashMap* _tmp12_;
2611
FolksEmailFieldDetails* _tmp14_;
2612
ContactsContactEditorRowData _tmp15_ = {0};
2614
_tmp6_ = folks_email_field_details_new ("", NULL);
2615
detail_field = _tmp6_;
2617
_tmp8_ = contacts_typeset_get_email ();
2619
_tmp10_ = detail_field;
2621
contacts_contact_editor_attach_row_with_entry (self, _tmp7_, _tmp9_, (FolksAbstractFieldDetails*) _tmp10_, "", _tmp11_);
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_);
2630
_g_object_unref0 (detail_field);
2632
FolksPersona* _tmp17_;
2633
FolksEmailDetails* _tmp18_;
2634
FolksEmailDetails* details;
2635
FolksEmailDetails* _tmp19_;
2637
_tmp18_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, FOLKS_TYPE_EMAIL_DETAILS) ? ((FolksEmailDetails*) _tmp17_) : NULL);
2640
if (_tmp19_ != NULL) {
2641
FolksEmailDetails* _tmp20_;
2644
GeeArrayList* _tmp23_ = NULL;
2645
GeeArrayList* emails;
2647
_tmp21_ = folks_email_details_get_email_addresses (_tmp20_);
2649
_tmp23_ = contacts_contact_sort_fields (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GeeCollection*) _tmp22_);
2652
GeeArrayList* _tmp24_;
2653
GeeArrayList* _tmp25_;
2654
GeeArrayList* _email_list;
2655
GeeArrayList* _tmp26_;
2661
_tmp25_ = _g_object_ref0 (_tmp24_);
2662
_email_list = _tmp25_;
2663
_tmp26_ = _email_list;
2664
_tmp27_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp26_);
2666
_email_size = _tmp28_;
2672
GeeArrayList* _tmp32_;
2674
gpointer _tmp34_ = NULL;
2675
FolksEmailFieldDetails* email;
2677
ContactsTypeSet* _tmp36_;
2678
ContactsTypeSet* _tmp37_;
2679
FolksEmailFieldDetails* _tmp38_;
2680
FolksEmailFieldDetails* _tmp39_;
2681
gconstpointer _tmp40_;
2682
const gchar* _tmp41_;
2683
GeeHashMap* _tmp42_;
2685
FolksEmailFieldDetails* _tmp44_;
2686
ContactsContactEditorRowData _tmp45_ = {0};
2688
_tmp29_ = _email_index;
2689
_email_index = _tmp29_ + 1;
2690
_tmp30_ = _email_index;
2691
_tmp31_ = _email_size;
2692
if (!(_tmp30_ < _tmp31_)) {
2695
_tmp32_ = _email_list;
2696
_tmp33_ = _email_index;
2697
_tmp34_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, _tmp33_);
2698
email = (FolksEmailFieldDetails*) _tmp34_;
2700
_tmp36_ = contacts_typeset_get_email ();
2704
_tmp40_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp39_);
2706
contacts_contact_editor_attach_row_with_entry (self, _tmp35_, _tmp37_, (FolksAbstractFieldDetails*) _tmp38_, (const gchar*) _tmp41_, NULL);
2710
_g_object_unref0 (_tmp45_.details);
2711
_tmp45_.details = (FolksAbstractFieldDetails*) _tmp44_;
2712
gee_abstract_map_set ((GeeAbstractMap*) _tmp42_, (gpointer) ((gintptr) _tmp43_), &_tmp45_);
2715
_g_object_unref0 (email);
2717
_g_object_unref0 (_email_list);
2719
_g_object_unref0 (emails);
2721
_g_object_unref0 (details);
2724
_tmp48_ = gee_map_get_is_empty ((GeeMap*) _tmp47_);
2727
GeeHashMap* _tmp50_;
2728
FolksPersona* _tmp51_;
2729
gpointer _tmp52_ = NULL;
2730
GeeHashMap* _tmp53_;
2731
const gchar* _tmp54_;
2732
gboolean _tmp55_ = FALSE;
2734
_tmp50_ = self->priv->writable_personas;
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_);
2741
_g_object_unref0 (_tmp53_);
2744
GeeHashMap* _tmp57_;
2748
GeeIterator* _tmp61_ = NULL;
2749
GeeIterator* _tmp62_;
2750
GeeIterator* _entry_it;
2752
_tmp58_ = gee_abstract_map_get_entries ((GeeMap*) _tmp57_);
2755
_tmp61_ = gee_iterable_iterator ((GeeIterable*) _tmp60_);
2757
_g_object_unref0 (_tmp60_);
2758
_entry_it = _tmp62_;
2760
GeeIterator* _tmp63_;
2761
gboolean _tmp64_ = FALSE;
2762
GeeIterator* _tmp65_;
2763
gpointer _tmp66_ = NULL;
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_;
2776
GeeMapEntry* _tmp78_;
2777
gconstpointer _tmp79_;
2778
ContactsContactEditorRowData* _tmp80_;
2779
_tmp63_ = _entry_it;
2780
_tmp64_ = gee_iterator_next (_tmp63_);
2784
_tmp65_ = _entry_it;
2785
_tmp66_ = gee_iterator_get (_tmp65_);
2786
entry = (GeeMapEntry*) _tmp66_;
2787
_tmp67_ = self->priv->writable_personas;
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;
2796
_tmp76_ = gee_map_entry_get_key (_tmp75_);
2799
_tmp79_ = gee_map_entry_get_value (_tmp78_);
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);
2806
_g_object_unref0 (_entry_it);
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;
2818
_tmp83_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp81_, _tmp82_);
2819
_tmp84_ = (GeeHashMap*) _tmp83_;
2820
_tmp85_ = prop_name;
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_);
2829
_g_object_unref0 (rows);
2833
} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("phone-numbers")))) {
2837
GeeHashMap* _tmp88_;
2840
GeeHashMap* _tmp132_;
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);
2845
_tmp89_ = add_empty;
2847
FolksPhoneFieldDetails* _tmp90_;
2848
FolksPhoneFieldDetails* detail_field;
2850
ContactsTypeSet* _tmp92_;
2851
ContactsTypeSet* _tmp93_;
2852
FolksPhoneFieldDetails* _tmp94_;
2853
const gchar* _tmp95_;
2854
GeeHashMap* _tmp96_;
2856
FolksPhoneFieldDetails* _tmp98_;
2857
ContactsContactEditorRowData _tmp99_ = {0};
2859
_tmp90_ = folks_phone_field_details_new ("", NULL);
2860
detail_field = _tmp90_;
2862
_tmp92_ = contacts_typeset_get_phone ();
2864
_tmp94_ = detail_field;
2866
contacts_contact_editor_attach_row_with_entry (self, _tmp91_, _tmp93_, (FolksAbstractFieldDetails*) _tmp94_, "", _tmp95_);
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_);
2874
*row = _tmp100_ + 1;
2875
_g_object_unref0 (detail_field);
2877
FolksPersona* _tmp101_;
2878
FolksPhoneDetails* _tmp102_;
2879
FolksPhoneDetails* details;
2880
FolksPhoneDetails* _tmp103_;
2882
_tmp102_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp101_, FOLKS_TYPE_PHONE_DETAILS) ? ((FolksPhoneDetails*) _tmp101_) : NULL);
2885
if (_tmp103_ != NULL) {
2886
FolksPhoneDetails* _tmp104_;
2889
GeeArrayList* _tmp107_ = NULL;
2890
GeeArrayList* phones;
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_);
2897
GeeArrayList* _tmp108_;
2898
GeeArrayList* _tmp109_;
2899
GeeArrayList* _phone_list;
2900
GeeArrayList* _tmp110_;
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_;
2917
GeeArrayList* _tmp116_;
2919
gpointer _tmp118_ = NULL;
2920
FolksPhoneFieldDetails* phone;
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_;
2931
FolksPhoneFieldDetails* _tmp129_;
2932
ContactsContactEditorRowData _tmp130_ = {0};
2934
_tmp113_ = _phone_index;
2935
_phone_index = _tmp113_ + 1;
2936
_tmp114_ = _phone_index;
2937
_tmp115_ = _phone_size;
2938
if (!(_tmp114_ < _tmp115_)) {
2941
_tmp116_ = _phone_list;
2942
_tmp117_ = _phone_index;
2943
_tmp118_ = gee_abstract_list_get ((GeeAbstractList*) _tmp116_, _tmp117_);
2944
phone = (FolksPhoneFieldDetails*) _tmp118_;
2946
_tmp120_ = contacts_typeset_get_phone ();
2947
_tmp121_ = _tmp120_;
2950
_tmp124_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp123_);
2951
_tmp125_ = _tmp124_;
2953
contacts_contact_editor_attach_row_with_entry (self, _tmp119_, _tmp121_, (FolksAbstractFieldDetails*) _tmp122_, (const gchar*) _tmp125_, _tmp126_);
2957
_g_object_unref0 (_tmp130_.details);
2958
_tmp130_.details = (FolksAbstractFieldDetails*) _tmp129_;
2959
gee_abstract_map_set ((GeeAbstractMap*) _tmp127_, (gpointer) ((gintptr) _tmp128_), &_tmp130_);
2961
*row = _tmp131_ + 1;
2962
_g_object_unref0 (phone);
2964
_g_object_unref0 (_phone_list);
2966
_g_object_unref0 (phones);
2968
_g_object_unref0 (details);
2971
_tmp133_ = gee_map_get_is_empty ((GeeMap*) _tmp132_);
2972
_tmp134_ = _tmp133_;
2974
GeeHashMap* _tmp135_;
2975
FolksPersona* _tmp136_;
2976
gpointer _tmp137_ = NULL;
2977
GeeHashMap* _tmp138_;
2978
const gchar* _tmp139_;
2979
gboolean _tmp140_ = FALSE;
2981
_tmp135_ = self->priv->writable_personas;
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_);
2991
GeeHashMap* _tmp142_;
2995
GeeIterator* _tmp146_ = NULL;
2996
GeeIterator* _tmp147_;
2997
GeeIterator* _entry_it;
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_;
3007
GeeIterator* _tmp148_;
3008
gboolean _tmp149_ = FALSE;
3009
GeeIterator* _tmp150_;
3010
gpointer _tmp151_ = NULL;
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_;
3023
GeeMapEntry* _tmp163_;
3024
gconstpointer _tmp164_;
3025
ContactsContactEditorRowData* _tmp165_;
3026
_tmp148_ = _entry_it;
3027
_tmp149_ = gee_iterator_next (_tmp148_);
3031
_tmp150_ = _entry_it;
3032
_tmp151_ = gee_iterator_get (_tmp150_);
3033
entry = (GeeMapEntry*) _tmp151_;
3034
_tmp152_ = self->priv->writable_personas;
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;
3043
_tmp161_ = gee_map_entry_get_key (_tmp160_);
3044
_tmp162_ = _tmp161_;
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);
3053
_g_object_unref0 (_entry_it);
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;
3065
_tmp168_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp166_, _tmp167_);
3066
_tmp169_ = (GeeHashMap*) _tmp168_;
3067
_tmp170_ = prop_name;
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_);
3076
_g_object_unref0 (rows);
3080
} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("urls")))) {
3084
GeeHashMap* _tmp173_;
3087
GeeHashMap* _tmp206_;
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);
3092
_tmp174_ = add_empty;
3094
FolksUrlFieldDetails* _tmp175_;
3095
FolksUrlFieldDetails* detail_field;
3096
const gchar* _tmp176_ = NULL;
3097
FolksUrlFieldDetails* _tmp177_;
3099
GeeHashMap* _tmp179_;
3101
FolksUrlFieldDetails* _tmp181_;
3102
ContactsContactEditorRowData _tmp182_ = {0};
3104
_tmp175_ = folks_url_field_details_new ("", NULL);
3105
detail_field = _tmp175_;
3106
_tmp176_ = _ ("Website");
3107
_tmp177_ = detail_field;
3109
contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp176_, (FolksAbstractFieldDetails*) _tmp177_, "", _tmp178_);
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_);
3117
*row = _tmp183_ + 1;
3118
_g_object_unref0 (detail_field);
3120
FolksPersona* _tmp184_;
3121
FolksUrlDetails* _tmp185_;
3122
FolksUrlDetails* url_details;
3123
FolksUrlDetails* _tmp186_;
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) {
3130
FolksUrlDetails* _tmp187_;
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_);
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_;
3152
GeeHashMap* _tmp201_;
3154
FolksUrlFieldDetails* _tmp203_;
3155
ContactsContactEditorRowData _tmp204_ = {0};
3158
_tmp192_ = gee_iterator_next (_tmp191_);
3163
_tmp194_ = gee_iterator_get (_tmp193_);
3164
url = (FolksUrlFieldDetails*) _tmp194_;
3165
_tmp195_ = _ ("Website");
3168
_tmp198_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp197_);
3169
_tmp199_ = _tmp198_;
3171
contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp195_, (FolksAbstractFieldDetails*) _tmp196_, (const gchar*) _tmp199_, _tmp200_);
3175
_g_object_unref0 (_tmp204_.details);
3176
_tmp204_.details = (FolksAbstractFieldDetails*) _tmp203_;
3177
gee_abstract_map_set ((GeeAbstractMap*) _tmp201_, (gpointer) ((gintptr) _tmp202_), &_tmp204_);
3179
*row = _tmp205_ + 1;
3180
_g_object_unref0 (url);
3182
_g_object_unref0 (_url_it);
3185
_g_object_unref0 (url_details);
3188
_tmp207_ = gee_map_get_is_empty ((GeeMap*) _tmp206_);
3189
_tmp208_ = _tmp207_;
3191
GeeHashMap* _tmp209_;
3192
FolksPersona* _tmp210_;
3193
gpointer _tmp211_ = NULL;
3194
GeeHashMap* _tmp212_;
3195
const gchar* _tmp213_;
3196
gboolean _tmp214_ = FALSE;
3198
_tmp209_ = self->priv->writable_personas;
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_);
3208
GeeHashMap* _tmp216_;
3212
GeeIterator* _tmp220_ = NULL;
3213
GeeIterator* _tmp221_;
3214
GeeIterator* _entry_it;
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_;
3224
GeeIterator* _tmp222_;
3225
gboolean _tmp223_ = FALSE;
3226
GeeIterator* _tmp224_;
3227
gpointer _tmp225_ = NULL;
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_;
3240
GeeMapEntry* _tmp237_;
3241
gconstpointer _tmp238_;
3242
ContactsContactEditorRowData* _tmp239_;
3243
_tmp222_ = _entry_it;
3244
_tmp223_ = gee_iterator_next (_tmp222_);
3248
_tmp224_ = _entry_it;
3249
_tmp225_ = gee_iterator_get (_tmp224_);
3250
entry = (GeeMapEntry*) _tmp225_;
3251
_tmp226_ = self->priv->writable_personas;
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;
3260
_tmp235_ = gee_map_entry_get_key (_tmp234_);
3261
_tmp236_ = _tmp235_;
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);
3270
_g_object_unref0 (_entry_it);
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;
3282
_tmp242_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp240_, _tmp241_);
3283
_tmp243_ = (GeeHashMap*) _tmp242_;
3284
_tmp244_ = prop_name;
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_);
3293
_g_object_unref0 (rows);
3297
} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("nickname")))) {
3301
GeeHashMap* _tmp247_;
3304
GeeHashMap* _tmp271_;
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);
3309
_tmp248_ = add_empty;
3311
const gchar* _tmp249_ = NULL;
3313
GeeHashMap* _tmp251_;
3315
ContactsContactEditorRowData _tmp253_ = {0};
3317
_tmp249_ = _ ("Nickname");
3319
contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp249_, NULL, "", _tmp250_);
3322
_g_object_unref0 (_tmp253_.details);
3323
_tmp253_.details = NULL;
3324
gee_abstract_map_set ((GeeAbstractMap*) _tmp251_, (gpointer) ((gintptr) _tmp252_), &_tmp253_);
3326
*row = _tmp254_ + 1;
3328
FolksPersona* _tmp255_;
3329
FolksNameDetails* _tmp256_;
3330
FolksNameDetails* name_details;
3331
FolksNameDetails* _tmp257_;
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_);
3346
const gchar* _tmp262_ = NULL;
3347
FolksNameDetails* _tmp263_;
3348
const gchar* _tmp264_;
3349
const gchar* _tmp265_;
3351
GeeHashMap* _tmp267_;
3353
ContactsContactEditorRowData _tmp269_ = {0};
3355
_tmp262_ = _ ("Nickname");
3356
_tmp263_ = name_details;
3357
_tmp264_ = folks_name_details_get_nickname (_tmp263_);
3358
_tmp265_ = _tmp264_;
3360
contacts_contact_editor_attach_row_with_entry_labeled (self, _tmp262_, NULL, _tmp265_, _tmp266_);
3363
_g_object_unref0 (_tmp269_.details);
3364
_tmp269_.details = NULL;
3365
gee_abstract_map_set ((GeeAbstractMap*) _tmp267_, (gpointer) ((gintptr) _tmp268_), &_tmp269_);
3367
*row = _tmp270_ + 1;
3370
_g_object_unref0 (name_details);
3373
_tmp272_ = gee_map_get_is_empty ((GeeMap*) _tmp271_);
3374
_tmp273_ = _tmp272_;
3376
GeeHashMap* _tmp274_;
3377
FolksPersona* _tmp275_;
3378
gpointer _tmp276_ = NULL;
3379
GeeHashMap* _tmp277_;
3380
const gchar* _tmp278_;
3381
gboolean _tmp279_ = FALSE;
3383
_tmp274_ = self->priv->writable_personas;
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_);
3393
GeeHashMap* _tmp281_;
3397
GeeIterator* _tmp285_ = NULL;
3398
GeeIterator* _tmp286_;
3399
GeeIterator* _entry_it;
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_;
3409
GeeIterator* _tmp287_;
3410
gboolean _tmp288_ = FALSE;
3411
GeeIterator* _tmp289_;
3412
gpointer _tmp290_ = NULL;
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_;
3425
GeeMapEntry* _tmp302_;
3426
gconstpointer _tmp303_;
3427
ContactsContactEditorRowData* _tmp304_;
3428
_tmp287_ = _entry_it;
3429
_tmp288_ = gee_iterator_next (_tmp287_);
3433
_tmp289_ = _entry_it;
3434
_tmp290_ = gee_iterator_get (_tmp289_);
3435
entry = (GeeMapEntry*) _tmp290_;
3436
_tmp291_ = self->priv->writable_personas;
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;
3445
_tmp300_ = gee_map_entry_get_key (_tmp299_);
3446
_tmp301_ = _tmp300_;
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);
3455
_g_object_unref0 (_entry_it);
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;
3467
_tmp307_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp305_, _tmp306_);
3468
_tmp308_ = (GeeHashMap*) _tmp307_;
3469
_tmp309_ = prop_name;
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_);
3478
_g_object_unref0 (rows);
3482
} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("birthday")))) {
3486
GeeHashMap* _tmp312_;
3489
GeeHashMap* _tmp337_;
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);
3494
_tmp313_ = add_empty;
3496
GDateTime* _tmp314_;
3498
const gchar* _tmp315_ = NULL;
3499
GDateTime* _tmp316_;
3501
GeeHashMap* _tmp318_;
3503
ContactsContactEditorRowData _tmp320_ = {0};
3505
_tmp314_ = g_date_time_new_now_local ();
3507
_tmp315_ = _ ("Birthday");
3510
contacts_contact_editor_attach_row_for_birthday (self, _tmp315_, NULL, _tmp316_, _tmp317_);
3513
_g_object_unref0 (_tmp320_.details);
3514
_tmp320_.details = NULL;
3515
gee_abstract_map_set ((GeeAbstractMap*) _tmp318_, (gpointer) ((gintptr) _tmp319_), &_tmp320_);
3517
*row = _tmp321_ + 1;
3518
_g_date_time_unref0 (today);
3520
FolksPersona* _tmp322_;
3521
FolksBirthdayDetails* _tmp323_;
3522
FolksBirthdayDetails* birthday_details;
3523
FolksBirthdayDetails* _tmp324_;
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_;
3541
GeeHashMap* _tmp333_;
3543
ContactsContactEditorRowData _tmp335_ = {0};
3545
_tmp328_ = _ ("Birthday");
3546
_tmp329_ = birthday_details;
3547
_tmp330_ = folks_birthday_details_get_birthday (_tmp329_);
3548
_tmp331_ = _tmp330_;
3550
contacts_contact_editor_attach_row_for_birthday (self, _tmp328_, NULL, _tmp331_, _tmp332_);
3553
_g_object_unref0 (_tmp335_.details);
3554
_tmp335_.details = NULL;
3555
gee_abstract_map_set ((GeeAbstractMap*) _tmp333_, (gpointer) ((gintptr) _tmp334_), &_tmp335_);
3557
*row = _tmp336_ + 1;
3560
_g_object_unref0 (birthday_details);
3563
_tmp338_ = gee_map_get_is_empty ((GeeMap*) _tmp337_);
3564
_tmp339_ = _tmp338_;
3566
GeeHashMap* _tmp340_;
3567
FolksPersona* _tmp341_;
3568
gpointer _tmp342_ = NULL;
3569
GeeHashMap* _tmp343_;
3570
const gchar* _tmp344_;
3572
GeeHashMap* _tmp346_;
3573
ContactsContactEditorField _tmp347_ = {0};
3574
_tmp340_ = self->priv->writable_personas;
3576
_tmp342_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp340_, _tmp341_);
3577
_tmp343_ = (GeeHashMap*) _tmp342_;
3578
_tmp344_ = prop_name;
3579
_tmp345_ = add_empty;
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_);
3587
_g_object_unref0 (rows);
3591
} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("notes")))) {
3595
GeeHashMap* _tmp348_;
3598
GeeHashMap* _tmp384_;
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);
3603
_tmp349_ = add_empty;
3605
FolksNoteFieldDetails* _tmp350_;
3606
FolksNoteFieldDetails* detail_field;
3607
const gchar* _tmp351_ = NULL;
3608
FolksNoteFieldDetails* _tmp352_;
3610
GeeHashMap* _tmp354_;
3612
FolksNoteFieldDetails* _tmp356_;
3613
ContactsContactEditorRowData _tmp357_ = {0};
3615
_tmp350_ = folks_note_field_details_new ("", NULL, NULL);
3616
detail_field = _tmp350_;
3617
_tmp351_ = _ ("Note");
3618
_tmp352_ = detail_field;
3620
contacts_contact_editor_attach_row_with_text_labeled (self, _tmp351_, (FolksAbstractFieldDetails*) _tmp352_, "", _tmp353_);
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_);
3628
*row = _tmp358_ + 1;
3629
_g_object_unref0 (detail_field);
3631
FolksPersona* _tmp359_;
3632
FolksNoteDetails* _tmp360_;
3633
FolksNoteDetails* note_details;
3634
gboolean _tmp361_ = FALSE;
3635
FolksNoteDetails* _tmp362_;
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) {
3645
_tmp363_ = add_empty;
3646
_tmp361_ = _tmp363_;
3648
_tmp364_ = _tmp361_;
3651
FolksNoteDetails* _tmp365_;
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_;
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_;
3673
GeeHashMap* _tmp379_;
3675
FolksNoteFieldDetails* _tmp381_;
3676
ContactsContactEditorRowData _tmp382_ = {0};
3678
_tmp369_ = _note_it;
3679
_tmp370_ = gee_iterator_next (_tmp369_);
3683
_tmp371_ = _note_it;
3684
_tmp372_ = gee_iterator_get (_tmp371_);
3685
note = (FolksNoteFieldDetails*) _tmp372_;
3686
_tmp373_ = _ ("Note");
3689
_tmp376_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp375_);
3690
_tmp377_ = _tmp376_;
3692
contacts_contact_editor_attach_row_with_text_labeled (self, _tmp373_, (FolksAbstractFieldDetails*) _tmp374_, (const gchar*) _tmp377_, _tmp378_);
3696
_g_object_unref0 (_tmp382_.details);
3697
_tmp382_.details = (FolksAbstractFieldDetails*) _tmp381_;
3698
gee_abstract_map_set ((GeeAbstractMap*) _tmp379_, (gpointer) ((gintptr) _tmp380_), &_tmp382_);
3700
*row = _tmp383_ + 1;
3701
_g_object_unref0 (note);
3703
_g_object_unref0 (_note_it);
3706
_g_object_unref0 (note_details);
3709
_tmp385_ = gee_map_get_is_empty ((GeeMap*) _tmp384_);
3710
_tmp386_ = _tmp385_;
3712
GeeHashMap* _tmp387_;
3713
FolksPersona* _tmp388_;
3714
gpointer _tmp389_ = NULL;
3715
GeeHashMap* _tmp390_;
3716
const gchar* _tmp391_;
3717
gboolean _tmp392_ = FALSE;
3719
_tmp387_ = self->priv->writable_personas;
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_);
3729
GeeHashMap* _tmp394_;
3733
GeeIterator* _tmp398_ = NULL;
3734
GeeIterator* _tmp399_;
3735
GeeIterator* _entry_it;
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_;
3745
GeeIterator* _tmp400_;
3746
gboolean _tmp401_ = FALSE;
3747
GeeIterator* _tmp402_;
3748
gpointer _tmp403_ = NULL;
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_;
3761
GeeMapEntry* _tmp415_;
3762
gconstpointer _tmp416_;
3763
ContactsContactEditorRowData* _tmp417_;
3764
_tmp400_ = _entry_it;
3765
_tmp401_ = gee_iterator_next (_tmp400_);
3769
_tmp402_ = _entry_it;
3770
_tmp403_ = gee_iterator_get (_tmp402_);
3771
entry = (GeeMapEntry*) _tmp403_;
3772
_tmp404_ = self->priv->writable_personas;
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;
3781
_tmp413_ = gee_map_entry_get_key (_tmp412_);
3782
_tmp414_ = _tmp413_;
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);
3791
_g_object_unref0 (_entry_it);
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;
3803
_tmp420_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp418_, _tmp419_);
3804
_tmp421_ = (GeeHashMap*) _tmp420_;
3805
_tmp422_ = prop_name;
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_);
3814
_g_object_unref0 (rows);
3818
} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("postal-addresses")))) {
3822
GeeHashMap* _tmp425_;
3825
GeeHashMap* _tmp462_;
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);
3830
_tmp426_ = add_empty;
3832
FolksPostalAddress* _tmp427_;
3833
FolksPostalAddress* _tmp428_;
3834
FolksPostalAddressFieldDetails* _tmp429_;
3835
FolksPostalAddressFieldDetails* _tmp430_;
3836
FolksPostalAddressFieldDetails* detail_field;
3838
ContactsTypeSet* _tmp432_;
3839
ContactsTypeSet* _tmp433_;
3840
FolksPostalAddressFieldDetails* _tmp434_;
3841
const gchar* _tmp435_;
3842
GeeHashMap* _tmp436_;
3844
FolksPostalAddressFieldDetails* _tmp438_;
3845
ContactsContactEditorRowData _tmp439_ = {0};
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_;
3854
_tmp432_ = contacts_typeset_get_general ();
3855
_tmp433_ = _tmp432_;
3856
_tmp434_ = detail_field;
3858
contacts_contact_editor_attach_row_for_address (self, _tmp431_, _tmp433_, _tmp434_, _tmp435_);
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_);
3866
*row = _tmp440_ + 1;
3867
_g_object_unref0 (detail_field);
3869
FolksPersona* _tmp441_;
3870
FolksPostalAddressDetails* _tmp442_;
3871
FolksPostalAddressDetails* address_details;
3872
FolksPostalAddressDetails* _tmp443_;
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) {
3879
FolksPostalAddressDetails* _tmp444_;
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_;
3890
GeeIterator* _tmp448_;
3891
gboolean _tmp449_ = FALSE;
3892
GeeIterator* _tmp450_;
3893
gpointer _tmp451_ = NULL;
3894
FolksPostalAddressFieldDetails* addr;
3896
ContactsTypeSet* _tmp453_;
3897
ContactsTypeSet* _tmp454_;
3898
FolksPostalAddressFieldDetails* _tmp455_;
3899
const gchar* _tmp456_;
3900
GeeHashMap* _tmp457_;
3902
FolksPostalAddressFieldDetails* _tmp459_;
3903
ContactsContactEditorRowData _tmp460_ = {0};
3905
_tmp448_ = _addr_it;
3906
_tmp449_ = gee_iterator_next (_tmp448_);
3910
_tmp450_ = _addr_it;
3911
_tmp451_ = gee_iterator_get (_tmp450_);
3912
addr = (FolksPostalAddressFieldDetails*) _tmp451_;
3914
_tmp453_ = contacts_typeset_get_general ();
3915
_tmp454_ = _tmp453_;
3918
contacts_contact_editor_attach_row_for_address (self, _tmp452_, _tmp454_, _tmp455_, _tmp456_);
3922
_g_object_unref0 (_tmp460_.details);
3923
_tmp460_.details = (FolksAbstractFieldDetails*) _tmp459_;
3924
gee_abstract_map_set ((GeeAbstractMap*) _tmp457_, (gpointer) ((gintptr) _tmp458_), &_tmp460_);
3926
*row = _tmp461_ + 1;
3927
_g_object_unref0 (addr);
3929
_g_object_unref0 (_addr_it);
3932
_g_object_unref0 (address_details);
3935
_tmp463_ = gee_map_get_is_empty ((GeeMap*) _tmp462_);
3936
_tmp464_ = _tmp463_;
3938
GeeHashMap* _tmp465_;
3939
FolksPersona* _tmp466_;
3940
gpointer _tmp467_ = NULL;
3941
GeeHashMap* _tmp468_;
3942
const gchar* _tmp469_;
3943
gboolean _tmp470_ = FALSE;
3945
_tmp465_ = self->priv->writable_personas;
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_);
3955
GeeHashMap* _tmp472_;
3959
GeeIterator* _tmp476_ = NULL;
3960
GeeIterator* _tmp477_;
3961
GeeIterator* _entry_it;
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_;
3971
GeeIterator* _tmp478_;
3972
gboolean _tmp479_ = FALSE;
3973
GeeIterator* _tmp480_;
3974
gpointer _tmp481_ = NULL;
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_;
3987
GeeMapEntry* _tmp493_;
3988
gconstpointer _tmp494_;
3989
ContactsContactEditorRowData* _tmp495_;
3990
_tmp478_ = _entry_it;
3991
_tmp479_ = gee_iterator_next (_tmp478_);
3995
_tmp480_ = _entry_it;
3996
_tmp481_ = gee_iterator_get (_tmp480_);
3997
entry = (GeeMapEntry*) _tmp481_;
3998
_tmp482_ = self->priv->writable_personas;
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;
4007
_tmp491_ = gee_map_entry_get_key (_tmp490_);
4008
_tmp492_ = _tmp491_;
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);
4017
_g_object_unref0 (_entry_it);
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;
4029
_tmp498_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp496_, _tmp497_);
4030
_tmp499_ = (GeeHashMap*) _tmp498_;
4031
_tmp500_ = prop_name;
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_);
4040
_g_object_unref0 (rows);
4048
static void contacts_contact_editor_insert_row_at (ContactsContactEditor* self, gint idx) {
4050
g_return_if_fail (self != NULL);
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_);
4063
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
4065
_g_object_unref0 (_tmp3_);
4066
_field_maps_it = _tmp5_;
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_);
4078
_tmp8_ = _field_maps_it;
4079
_tmp9_ = gee_iterator_get (_tmp8_);
4080
field_maps = (GeeHashMap*) _tmp9_;
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_);
4093
_tmp14_ = gee_iterable_iterator ((GeeIterable*) _tmp13_);
4095
_g_object_unref0 (_tmp13_);
4096
_field_it = _tmp15_;
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_);
4108
_tmp18_ = _field_it;
4109
_tmp19_ = gee_iterator_get (_tmp18_);
4110
field = (ContactsContactEditorField*) _tmp19_;
4112
ContactsContactEditorField* _tmp20_;
4113
GeeHashMap* _tmp21_;
4117
GeeIterator* _tmp25_ = NULL;
4118
GeeIterator* _tmp26_;
4119
GeeIterator* _row_it;
4121
_tmp21_ = (*_tmp20_).rows;
4122
_tmp22_ = gee_abstract_map_get_keys ((GeeMap*) _tmp21_);
4125
_tmp25_ = gee_iterable_iterator ((GeeIterable*) _tmp24_);
4127
_g_object_unref0 (_tmp24_);
4130
GeeIterator* _tmp27_;
4131
gboolean _tmp28_ = FALSE;
4132
GeeIterator* _tmp29_;
4133
gpointer _tmp30_ = NULL;
4138
_tmp28_ = gee_iterator_next (_tmp27_);
4143
_tmp30_ = gee_iterator_get (_tmp29_);
4144
row = (gint) ((gintptr) _tmp30_);
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);
4156
ContactsContactEditorField* _tmp34_;
4157
GeeHashMap* _tmp35_;
4161
GeeIterator* _tmp39_ = NULL;
4162
GeeIterator* _tmp40_;
4163
GeeIterator* _old_row_it;
4165
_tmp35_ = (*_tmp34_).rows;
4166
_tmp36_ = gee_abstract_map_get_keys ((GeeMap*) _tmp35_);
4169
_tmp39_ = gee_iterable_iterator ((GeeIterable*) _tmp38_);
4171
_g_object_unref0 (_tmp38_);
4172
_old_row_it = _tmp40_;
4174
GeeIterator* _tmp41_;
4175
gboolean _tmp42_ = FALSE;
4176
GeeIterator* _tmp43_;
4177
gpointer _tmp44_ = NULL;
4179
GeeHashMap* _tmp45_;
4181
ContactsContactEditorField* _tmp47_;
4182
GeeHashMap* _tmp48_;
4184
gpointer _tmp50_ = NULL;
4185
ContactsContactEditorRowData* _tmp51_;
4186
_tmp41_ = _old_row_it;
4187
_tmp42_ = gee_iterator_next (_tmp41_);
4191
_tmp43_ = _old_row_it;
4192
_tmp44_ = gee_iterator_get (_tmp43_);
4193
old_row = (gint) ((gintptr) _tmp44_);
4197
_tmp48_ = (*_tmp47_).rows;
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_);
4204
_g_object_unref0 (_old_row_it);
4208
_tmp54_ = _g_object_ref0 (_tmp53_);
4209
_g_object_unref0 ((*_tmp52_).rows);
4210
(*_tmp52_).rows = _tmp54_;
4211
_g_object_unref0 (new_rows);
4215
_g_object_unref0 (_row_it);
4217
_contacts_contact_editor_field_free0 (field);
4219
_g_object_unref0 (_field_it);
4221
_g_object_unref0 (field_maps);
4223
_g_object_unref0 (_field_maps_it);
4226
gtk_grid_insert_row ((GtkGrid*) self, _tmp55_);
4230
ContactsContactEditor* contacts_contact_editor_construct (GType object_type) {
4231
ContactsContactEditor * self = NULL;
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_;
4243
ContactsContactEditor* contacts_contact_editor_new (void) {
4244
return contacts_contact_editor_construct (CONTACTS_TYPE_CONTACT_EDITOR);
4248
static Block27Data* block27_data_ref (Block27Data* _data27_) {
4249
g_atomic_int_inc (&_data27_->_ref_count_);
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_);
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_);
4280
static void ___lambda54__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self) {
4285
static void __lambda69_ (Block27Data* _data27_, GtkWidget* w) {
4286
ContactsContactEditor * self;
4288
ContactsContact* _tmp1_;
4289
FolksIndividual* _tmp2_;
4290
ContactsContact* _tmp3_;
4291
self = _data27_->self;
4292
g_return_if_fail (w != NULL);
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_);
4301
static void ___lambda69__gtk_callback (GtkWidget* widget, gpointer self) {
4302
__lambda69_ (self, widget);
4306
static void __lambda70_ (Block27Data* _data27_) {
4307
ContactsContactEditor * self;
4309
self = _data27_->self;
4310
_tmp0_ = _data27_->name_entry;
4311
g_object_set_data_full ((GObject*) _tmp0_, "changed", (gpointer) ((gintptr) TRUE), NULL);
4315
static void ___lambda70__gtk_editable_changed (GtkEditable* _sender, gpointer self) {
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_;
4339
ContactsContact* _tmp17_;
4340
const gchar* _tmp18_;
4341
const gchar* _tmp19_;
4346
gint last_store_position;
4347
gboolean is_first_persona;
4348
ContactsContact* _tmp23_;
4349
GeeList* _tmp24_ = NULL;
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);
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_);
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);
4400
last_store_position = 0;
4401
is_first_persona = TRUE;
4402
_tmp23_ = _data27_->c;
4403
_tmp24_ = contacts_contact_get_personas_for_display (_tmp23_);
4415
_tmp26_ = _g_object_ref0 (_tmp25_);
4418
_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
4428
gpointer _tmp35_ = NULL;
4431
FolksPersona* _tmp51_;
4433
gint _tmp52__length1;
4435
gint _tmp53__length1;
4437
gchar** _tmp55_ = NULL;
4439
gint rw_props_length1;
4440
gint _rw_props_size_;
4442
gint _tmp56__length1;
4448
_p_index = _tmp30_ + 1;
4451
if (!(_tmp31_ < _tmp32_)) {
4456
_tmp35_ = gee_list_get (_tmp33_, _tmp34_);
4457
p = (FolksPersona*) _tmp35_;
4458
_tmp36_ = is_first_persona;
4461
GtkLabel* store_name;
4463
FolksPersona* _tmp39_;
4464
gchar* _tmp40_ = NULL;
4466
gchar* _tmp42_ = NULL;
4475
_tmp37_ = (GtkLabel*) gtk_label_new ("");
4476
g_object_ref_sink (_tmp37_);
4477
store_name = _tmp37_;
4478
_tmp38_ = store_name;
4480
_tmp40_ = contacts_contact_format_persona_store_name_for_contact (_tmp39_);
4482
_tmp42_ = g_markup_printf_escaped ("<span font='16px bold'>%s</span>", _tmp41_);
4484
gtk_label_set_markup (_tmp38_, _tmp43_);
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;
4495
gtk_grid_attach ((GtkGrid*) self, (GtkWidget*) _tmp47_, 0, _tmp48_, 1, 1);
4499
last_store_position = _tmp50_;
4500
_g_object_unref0 (store_name);
4503
_tmp52_ = folks_persona_get_writeable_properties (_tmp51_, &_tmp52__length1);
4505
_tmp53__length1 = _tmp52__length1;
4506
_tmp55_ = contacts_contact_sort_persona_properties (_tmp53_, _tmp53__length1, &_tmp54_);
4508
rw_props_length1 = _tmp54_;
4509
_rw_props_size_ = rw_props_length1;
4511
_tmp56__length1 = rw_props_length1;
4512
if (_tmp56__length1 != 0) {
4513
GeeHashMap* _tmp57_;
4514
FolksPersona* _tmp58_;
4515
GeeHashMap* _tmp59_;
4516
GeeHashMap* _tmp60_;
4518
gint _tmp61__length1;
4519
_tmp57_ = self->priv->writable_personas;
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);
4523
gee_abstract_map_set ((GeeAbstractMap*) _tmp57_, _tmp58_, _tmp60_);
4524
_g_object_unref0 (_tmp60_);
4526
_tmp61__length1 = rw_props_length1;
4528
gchar** prop_collection = NULL;
4529
gint prop_collection_length1 = 0;
4530
gint _prop_collection_size_ = 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) {
4537
_tmp62_ = g_strdup (prop_collection[prop_it]);
4540
FolksPersona* _tmp63_;
4541
const gchar* _tmp64_;
4544
contacts_contact_editor_add_edit_row (self, _tmp63_, _tmp64_, &i, FALSE, NULL);
4550
_tmp65_ = is_first_persona;
4554
self->priv->last_row = _tmp66_ - 1;
4558
is_first_persona = FALSE;
4561
_tmp69_ = last_store_position;
4562
if (_tmp68_ == _tmp69_) {
4565
GtkWidget* _tmp72_ = NULL;
4569
_tmp72_ = gtk_grid_get_child_at ((GtkGrid*) self, 0, _tmp71_);
4570
gtk_widget_destroy (_tmp72_);
4572
rw_props = (_vala_array_free (rw_props, rw_props_length1, (GDestroyNotify) g_free), NULL);
4573
_g_object_unref0 (p);
4575
_g_object_unref0 (_p_list);
4577
_g_object_unref0 (personas);
4578
block27_data_unref (_data27_);
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);
4588
GList* w_collection = 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;
4597
gtk_widget_destroy (_tmp1_);
4600
_g_list_free0 (w_collection);
4605
GeeHashMap* contacts_contact_editor_properties_changed (ContactsContactEditor* self) {
4606
GeeHashMap* result = NULL;
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);
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_);
4624
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
4626
_g_object_unref0 (_tmp4_);
4629
GeeIterator* _tmp7_;
4630
gboolean _tmp8_ = FALSE;
4631
GeeIterator* _tmp9_;
4632
gpointer _tmp10_ = NULL;
4635
_tmp8_ = gee_iterator_next (_tmp7_);
4640
_tmp10_ = gee_iterator_get (_tmp9_);
4641
entry = (GeeMapEntry*) _tmp10_;
4643
GeeMapEntry* _tmp11_;
4644
gconstpointer _tmp12_;
4645
GeeHashMap* _tmp13_;
4649
GeeIterator* _tmp17_ = NULL;
4650
GeeIterator* _tmp18_;
4651
GeeIterator* _field_entry_it;
4653
_tmp12_ = gee_map_entry_get_value (_tmp11_);
4655
_tmp14_ = gee_abstract_map_get_entries ((GeeMap*) ((GeeHashMap*) _tmp13_));
4658
_tmp17_ = gee_iterable_iterator ((GeeIterable*) _tmp16_);
4660
_g_object_unref0 (_tmp16_);
4661
_field_entry_it = _tmp18_;
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_;
4674
_tmp19_ = _field_entry_it;
4675
_tmp20_ = gee_iterator_next (_tmp19_);
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_);
4685
_tmp27_ = (*((ContactsContactEditorField*) _tmp26_)).changed;
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_);
4696
_tmp32_ = gee_map_contains ((GeeMap*) _tmp28_, (const gchar*) _tmp31_);
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));
4727
_tmp35_ = gee_map_entry_get_key (_tmp34_);
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_);
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")))) {
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_);
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;
4756
} else if (_tmp43_ == ((0 != _tmp42_label1) ? _tmp42_label1 : (_tmp42_label1 = g_quark_from_static_string ("phone-numbers")))) {
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_);
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;
4775
} else if (_tmp43_ == ((0 != _tmp42_label2) ? _tmp42_label2 : (_tmp42_label2 = g_quark_from_static_string ("urls")))) {
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_);
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;
4794
} else if (_tmp43_ == ((0 != _tmp42_label3) ? _tmp42_label3 : (_tmp42_label3 = g_quark_from_static_string ("nickname")))) {
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_);
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;
4813
} else if (_tmp43_ == ((0 != _tmp42_label4) ? _tmp42_label4 : (_tmp42_label4 = g_quark_from_static_string ("birthday")))) {
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_);
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;
4832
} else if (_tmp43_ == ((0 != _tmp42_label5) ? _tmp42_label5 : (_tmp42_label5 = g_quark_from_static_string ("notes")))) {
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_);
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;
4851
} else if (_tmp43_ == ((0 != _tmp42_label6) ? _tmp42_label6 : (_tmp42_label6 = g_quark_from_static_string ("postal-addresses")))) {
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_);
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;
4871
_tmp79_ = props_set;
4872
_tmp80_ = field_entry;
4873
_tmp81_ = gee_map_entry_get_key (_tmp80_);
4876
gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (const gchar*) _tmp82_, &_tmp83_);
4877
contacts_contact_editor_property_data_destroy (&p);
4879
_g_object_unref0 (field_entry);
4881
_g_object_unref0 (_field_entry_it);
4883
_g_object_unref0 (entry);
4885
_g_object_unref0 (_entry_it);
4892
gboolean contacts_contact_editor_name_changed (ContactsContactEditor* self) {
4893
gboolean result = FALSE;
4894
GtkWidget* _tmp0_ = NULL;
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);
4909
void contacts_contact_editor_get_full_name_value (ContactsContactEditor* self, GValue* result) {
4910
GValue _tmp0_ = {0};
4912
GtkWidget* _tmp1_ = NULL;
4914
GtkEntry* name_entry;
4915
const gchar* _tmp3_ = NULL;
4916
g_return_if_fail (self != NULL);
4917
g_value_init (&_tmp0_, G_TYPE_STRING);
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_);
4925
_g_object_unref0 (name_entry);
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_;
4938
FolksPersona* _tmp50_;
4939
const gchar* _tmp51_;
4940
const gchar* _tmp52_;
4942
g_return_if_fail (self != NULL);
4943
g_return_if_fail (prop_name != NULL);
4945
if (_tmp0_ == NULL) {
4946
ContactsContact* _tmp1_;
4947
ContactsFakePersona* _tmp2_;
4949
FolksPersona* _tmp4_;
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;
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);
4960
gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp4_, _tmp6_);
4961
_g_object_unref0 (_tmp6_);
4963
FolksPersona* _tmp7_;
4964
FolksPersona* _tmp8_;
4966
_tmp8_ = _g_object_ref0 (_tmp7_);
4967
_g_object_unref0 (persona);
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_);
4983
_tmp13_ = gee_iterable_iterator ((GeeIterable*) _tmp12_);
4985
_g_object_unref0 (_tmp12_);
4986
_fields_it = _tmp14_;
4988
GeeIterator* _tmp15_;
4989
gboolean _tmp16_ = FALSE;
4990
GeeIterator* _tmp17_;
4991
gpointer _tmp18_ = NULL;
4993
GeeHashMap* _tmp19_;
4994
const gchar* _tmp20_;
4995
gboolean _tmp21_ = FALSE;
4996
_tmp15_ = _fields_it;
4997
_tmp16_ = gee_iterator_next (_tmp15_);
5001
_tmp17_ = _fields_it;
5002
_tmp18_ = gee_iterator_get (_tmp17_);
5003
fields = (GeeHashMap*) _tmp18_;
5005
_tmp20_ = prop_name;
5006
_tmp21_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp19_, _tmp20_);
5009
GeeHashMap* _tmp22_;
5010
const gchar* _tmp23_;
5011
gpointer _tmp24_ = NULL;
5012
ContactsContactEditorField* _tmp25_;
5013
GeeHashMap* _tmp26_;
5017
GeeIterator* _tmp30_ = NULL;
5018
GeeIterator* _tmp31_;
5019
GeeIterator* _idx_it;
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_);
5028
_tmp30_ = gee_iterable_iterator ((GeeIterable*) _tmp29_);
5030
_g_object_unref0 (_tmp29_);
5031
_contacts_contact_editor_field_free0 (_tmp25_);
5034
GeeIterator* _tmp32_;
5035
gboolean _tmp33_ = FALSE;
5036
GeeIterator* _tmp34_;
5037
gpointer _tmp35_ = NULL;
5042
_tmp33_ = gee_iterator_next (_tmp32_);
5047
_tmp35_ = gee_iterator_get (_tmp34_);
5048
idx = (gint) ((gintptr) _tmp35_);
5050
_tmp37_ = self->priv->last_row;
5051
if (_tmp36_ < _tmp37_) {
5058
if (_tmp39_ > _tmp40_) {
5071
_g_object_unref0 (_idx_it);
5073
_g_object_unref0 (fields);
5076
_g_object_unref0 (fields);
5078
_g_object_unref0 (_fields_it);
5083
_tmp46_ = self->priv->last_row;
5091
next_idx = _tmp48_ + 1;
5093
contacts_contact_editor_insert_row_at (self, _tmp49_);
5095
_tmp51_ = prop_name;
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);
5105
void contacts_contact_editor_property_data_copy (const ContactsContactEditorPropertyData* self, ContactsContactEditorPropertyData* dest) {
5106
FolksPersona* _tmp0_;
5107
FolksPersona* _tmp1_;
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_);
5121
G_IS_VALUE (&(*dest).value) ? (g_value_unset (&(*dest).value), NULL) : NULL;
5122
(*dest).value = _tmp3_;
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;
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);
5140
void contacts_contact_editor_property_data_free (ContactsContactEditorPropertyData* self) {
5141
contacts_contact_editor_property_data_destroy (self);
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);
5153
return contacts_contact_editor_property_data_type_id__volatile;
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_;
5167
static void contacts_contact_editor_row_data_destroy (ContactsContactEditorRowData* self) {
5168
_g_object_unref0 ((*self).details);
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);
5180
static void contacts_contact_editor_row_data_free (ContactsContactEditorRowData* self) {
5181
contacts_contact_editor_row_data_destroy (self);
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);
5193
return contacts_contact_editor_row_data_type_id__volatile;
5197
static void contacts_contact_editor_field_copy (const ContactsContactEditorField* self, ContactsContactEditorField* dest) {
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_;
5210
static void contacts_contact_editor_field_destroy (ContactsContactEditorField* self) {
5211
_g_object_unref0 ((*self).rows);
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);
5223
static void contacts_contact_editor_field_free (ContactsContactEditorField* self) {
5224
contacts_contact_editor_field_destroy (self);
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);
5236
return contacts_contact_editor_field_type_id__volatile;
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;
5247
static void contacts_contact_editor_instance_init (ContactsContactEditor * self) {
5248
self->priv = CONTACTS_CONTACT_EDITOR_GET_PRIVATE (self);
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);
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);
5269
return contacts_contact_editor_type_id__volatile;
5273
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
5274
if ((array != NULL) && (destroy_func != NULL)) {
5276
for (i = 0; i < array_length; i = i + 1) {
5277
if (((gpointer*) array)[i] != NULL) {
5278
destroy_func (((gpointer*) array)[i]);
5285
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
5286
_vala_array_destroy (array, array_length, destroy_func);