727
739
FolksIndividualAggregator* contacts_store_get_aggregator (ContactsStore* self);
728
740
static void contacts_contact_ensure_primary_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
729
741
FolksPersona* contacts_contact_find_persona_from_store (ContactsContact* self, FolksPersonaStore* store);
730
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self);
731
static gint _contacts_contact_compare_persona_by_store_gcompare_func (gconstpointer a, gconstpointer b);
742
static gint __lambda3_ (ContactsContact* self, FolksPersona* a, FolksPersona* b);
743
static gboolean contacts_contact_persona_is_google (FolksPersona* persona);
744
static gint ___lambda3__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
732
745
gchar* contacts_contact_format_persona_stores (ContactsContact* self);
733
746
gchar* contacts_contact_format_persona_store_name_for_contact (FolksPersona* persona);
734
FolksPersonaStore** contacts_contact_get_eds_address_books (int* result_length1);
735
GType contacts_app_get_type (void) G_GNUC_CONST;
736
GType contacts_window_get_type (void) G_GNUC_CONST;
737
FolksBackendStore* contacts_store_get_backend_store (ContactsStore* self);
738
static void _vala_array_add9 (FolksPersonaStore*** array, int* length, int* size, FolksPersonaStore* value);
739
747
gchar* contacts_contact_format_persona_store_name (FolksPersonaStore* store);
740
748
gboolean contacts_contact_has_mainable_persona (ContactsContact* self);
741
749
static gboolean contacts_contact_non_linkable (ContactsContact* self);
742
750
gboolean contacts_contact_persona_is_google_profile (FolksPersona* persona);
743
751
gboolean contacts_contact_suggest_link_to (ContactsContact* self, ContactsContact* other);
744
752
gboolean contacts_store_may_suggest_link (ContactsStore* self, ContactsContact* a, ContactsContact* b);
753
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1);
754
static gint __lambda16_ (const gchar* a, const gchar* b);
755
static gint ___lambda16__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
756
static void contacts_contact_set_individual_property_data_free (gpointer _data);
757
void contacts_contact_set_individual_property (ContactsContact* contact, const gchar* property_name, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
758
FolksPersona* contacts_contact_set_individual_property_finish (GAsyncResult* _res_, GError** error);
759
static gboolean contacts_contact_set_individual_property_co (ContactsContactSetIndividualPropertyData* _data_);
760
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle);
761
void contacts_contact_set_persona_property (FolksPersona* persona, const gchar* property_name, GValue* new_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
762
void contacts_contact_set_persona_property_finish (GAsyncResult* _res_, GError** error);
763
static void contacts_contact_set_individual_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
764
void contacts_fake_persona_make_real_and_set (ContactsFakePersona* self, const gchar* property, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
765
FolksPersona* contacts_fake_persona_make_real_and_set_finish (ContactsFakePersona* self, GAsyncResult* _res_, GError** error);
745
766
TpAccount* contacts_contact_is_callable (ContactsContact* self, const gchar* proto, const gchar* id);
746
767
static void contacts_contact_create_primary_persona_for_details_data_free (gpointer _data);
747
void contacts_contact_create_primary_persona_for_details (GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
768
void contacts_contact_create_primary_persona_for_details (FolksPersonaStore* store, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
748
769
FolksPersona* contacts_contact_create_primary_persona_for_details_finish (GAsyncResult* _res_, GError** error);
749
770
static gboolean contacts_contact_create_primary_persona_for_details_co (ContactsContactCreatePrimaryPersonaForDetailsData* _data_);
750
771
static void contacts_contact_create_primary_persona_for_details_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
751
772
static void contacts_contact_set_persona_property_data_free (gpointer _data);
752
void contacts_contact_set_persona_property (FolksPersona* persona, const gchar* property_name, GValue* new_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
753
void contacts_contact_set_persona_property_finish (GAsyncResult* _res_, GError** error);
754
773
static gboolean contacts_contact_set_persona_property_co (ContactsContactSetPersonaPropertyData* _data_);
755
void contacts_fake_persona_make_real_and_set (ContactsFakePersona* self, const gchar* property, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_);
756
FolksPersona* contacts_fake_persona_make_real_and_set_finish (ContactsFakePersona* self, GAsyncResult* _res_, GError** error);
757
774
static void contacts_contact_set_persona_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
758
775
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
759
static Block12Data* block12_data_ref (Block12Data* _data12_);
760
static void block12_data_unref (void * _userdata_);
761
static void __lambda9_ (Block12Data* _data12_);
762
static void ___lambda9__contacts_contact_changed (ContactsContact* _sender, gpointer self);
763
static void __lambda10_ (Block12Data* _data12_);
764
static void ___lambda10__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
776
static Block3Data* block3_data_ref (Block3Data* _data3_);
777
static void block3_data_unref (void * _userdata_);
778
static void __lambda17_ (Block3Data* _data3_);
779
static void ___lambda17__contacts_contact_changed (ContactsContact* _sender, gpointer self);
780
static void __lambda18_ (Block3Data* _data3_);
781
static void ___lambda18__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
782
void contacts_contact_fetch_contact_info (ContactsContact* self);
765
783
GdkPixbuf* contacts_contact_get_small_avatar (ContactsContact* self);
784
GIcon* contacts_contact_get_serializable_avatar_icon (ContactsContact* self);
785
GVariant* contacts_contact_get_avatar_icon_data (ContactsContact* self);
766
786
const gchar* contacts_contact_get_display_name (ContactsContact* self);
767
787
gunichar contacts_contact_get_initial_letter (ContactsContact* self);
768
788
gboolean contacts_contact_get_is_hidden (ContactsContact* self);
1059
1090
GtkImage* _tmp4_;
1060
1091
GtkImage* _tmp5_;
1061
1092
GtkImage* _tmp6_;
1063
1094
GtkLabel* _tmp8_;
1064
1095
GtkLabel* _tmp9_;
1065
1096
GtkLabel* _tmp10_;
1066
1097
GtkLabel* _tmp11_;
1069
1100
GtkImage* _tmp14_;
1070
1101
GtkImage* _tmp15_;
1074
ContactsContact* _tmp19_;
1075
gulong _tmp20_ = 0UL;
1102
ContactsContact* _tmp16_;
1103
gulong _tmp17_ = 0UL;
1104
ContactsContact* _tmp18_;
1105
gulong _tmp19_ = 0UL;
1076
1106
g_return_val_if_fail (contact != NULL, NULL);
1077
_data10_ = g_slice_new0 (Block10Data);
1078
_data10_->_ref_count_ = 1;
1107
_data1_ = g_slice_new0 (Block1Data);
1108
_data1_->_ref_count_ = 1;
1079
1109
_tmp0_ = contact;
1080
1110
_tmp1_ = _g_object_ref0 (_tmp0_);
1081
_data10_->contact = _tmp1_;
1111
_g_object_unref0 (_data1_->contact);
1112
_data1_->contact = _tmp1_;
1082
1113
self = (ContactsContactPresence*) g_object_new (object_type, NULL);
1083
_data10_->self = g_object_ref (self);
1084
_tmp2_ = _data10_->contact;
1114
_data1_->self = g_object_ref (self);
1115
_tmp2_ = _data1_->contact;
1085
1116
_tmp3_ = _g_object_ref0 (_tmp2_);
1086
1117
_g_object_unref0 (self->priv->contact);
1087
1118
self->priv->contact = _tmp3_;
1088
1119
gtk_grid_set_column_spacing ((GtkGrid*) self, (guint) 4);
1089
1120
_tmp4_ = (GtkImage*) gtk_image_new ();
1090
_tmp5_ = g_object_ref_sink (_tmp4_);
1121
g_object_ref_sink (_tmp4_);
1091
1122
_g_object_unref0 (self->priv->image);
1092
self->priv->image = _tmp5_;
1123
self->priv->image = _tmp4_;
1124
_tmp5_ = self->priv->image;
1125
gtk_widget_set_no_show_all ((GtkWidget*) _tmp5_, TRUE);
1093
1126
_tmp6_ = self->priv->image;
1094
gtk_widget_set_no_show_all ((GtkWidget*) _tmp6_, TRUE);
1095
_tmp7_ = self->priv->image;
1096
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp7_);
1097
_tmp8_ = (GtkLabel*) gtk_label_new ("");
1098
_tmp9_ = g_object_ref_sink (_tmp8_);
1127
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp6_);
1128
_tmp7_ = (GtkLabel*) gtk_label_new ("");
1129
g_object_ref_sink (_tmp7_);
1099
1130
_g_object_unref0 (self->priv->label);
1100
self->priv->label = _tmp9_;
1131
self->priv->label = _tmp7_;
1132
_tmp8_ = self->priv->label;
1133
gtk_widget_set_no_show_all ((GtkWidget*) _tmp8_, TRUE);
1134
_tmp9_ = self->priv->label;
1135
gtk_label_set_ellipsize (_tmp9_, PANGO_ELLIPSIZE_END);
1101
1136
_tmp10_ = self->priv->label;
1102
gtk_widget_set_no_show_all ((GtkWidget*) _tmp10_, TRUE);
1137
g_object_set ((GtkMisc*) _tmp10_, "xalign", 0.0f, NULL);
1103
1138
_tmp11_ = self->priv->label;
1104
gtk_label_set_ellipsize (_tmp11_, PANGO_ELLIPSIZE_END);
1105
_tmp12_ = self->priv->label;
1106
g_object_set ((GtkMisc*) _tmp12_, "xalign", 0.0f, NULL);
1107
_tmp13_ = self->priv->label;
1108
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp13_);
1109
_tmp14_ = (GtkImage*) gtk_image_new ();
1110
_tmp15_ = g_object_ref_sink (_tmp14_);
1139
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp11_);
1140
_tmp12_ = (GtkImage*) gtk_image_new ();
1141
g_object_ref_sink (_tmp12_);
1111
1142
_g_object_unref0 (self->priv->phone_image);
1112
self->priv->phone_image = _tmp15_;
1113
_tmp16_ = self->priv->phone_image;
1114
gtk_widget_set_no_show_all ((GtkWidget*) _tmp16_, TRUE);
1115
_tmp17_ = self->priv->phone_image;
1116
gtk_image_set_from_icon_name (_tmp17_, "phone-symbolic", GTK_ICON_SIZE_MENU);
1117
_tmp18_ = self->priv->phone_image;
1118
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp18_);
1143
self->priv->phone_image = _tmp12_;
1144
_tmp13_ = self->priv->phone_image;
1145
gtk_widget_set_no_show_all ((GtkWidget*) _tmp13_, TRUE);
1146
_tmp14_ = self->priv->phone_image;
1147
gtk_image_set_from_icon_name (_tmp14_, "phone-symbolic", GTK_ICON_SIZE_MENU);
1148
_tmp15_ = self->priv->phone_image;
1149
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp15_);
1119
1150
contacts_contact_presence_update_presence_widgets (self);
1120
_tmp19_ = _data10_->contact;
1121
_tmp20_ = g_signal_connect_object (_tmp19_, "presence-changed", (GCallback) ___lambda4__contacts_contact_presence_changed, self, 0);
1122
_data10_->id = _tmp20_;
1123
g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda5__gtk_widget_destroy, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
1124
block10_data_unref (_data10_);
1151
_tmp16_ = _data1_->contact;
1152
_tmp17_ = g_signal_connect_object (_tmp16_, "presence-changed", (GCallback) ___lambda19__contacts_contact_presence_changed, self, 0);
1153
_data1_->id = _tmp17_;
1154
_tmp18_ = _data1_->contact;
1155
_tmp19_ = g_signal_connect_object (_tmp18_, "personas-changed", (GCallback) ___lambda20__contacts_contact_personas_changed, self, 0);
1156
_data1_->id2 = _tmp19_;
1157
g_signal_connect_data ((GtkWidget*) self, "destroy", (GCallback) ___lambda21__gtk_widget_destroy, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
1158
block1_data_unref (_data1_);
2686
gboolean contacts_contact_has_birthday (ContactsContact* self) {
2687
gboolean result = FALSE;
2688
FolksIndividual* _tmp0_;
2691
g_return_val_if_fail (self != NULL, FALSE);
2692
_tmp0_ = self->individual;
2693
_tmp1_ = folks_birthday_details_get_birthday ((FolksBirthdayDetails*) _tmp0_);
2695
result = _tmp2_ != NULL;
2700
gboolean contacts_contact_has_nickname (ContactsContact* self) {
2701
gboolean result = FALSE;
2702
gboolean _tmp0_ = FALSE;
2703
FolksIndividual* _tmp1_;
2704
const gchar* _tmp2_;
2705
const gchar* _tmp3_;
2707
g_return_val_if_fail (self != NULL, FALSE);
2708
_tmp1_ = self->individual;
2709
_tmp2_ = folks_name_details_get_nickname ((FolksNameDetails*) _tmp1_);
2711
if (_tmp3_ != NULL) {
2712
FolksIndividual* _tmp4_;
2713
const gchar* _tmp5_;
2714
const gchar* _tmp6_;
2715
_tmp4_ = self->individual;
2716
_tmp5_ = folks_name_details_get_nickname ((FolksNameDetails*) _tmp4_);
2718
_tmp0_ = g_strcmp0 (_tmp6_, "") != 0;
2728
gboolean contacts_contact_has_notes (ContactsContact* self) {
2729
gboolean result = FALSE;
2731
g_return_val_if_fail (self != NULL, FALSE);
2734
GeeList* _tmp0_ = NULL;
2741
_tmp0_ = contacts_contact_get_personas_for_display (self);
2744
_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
2754
gpointer _tmp9_ = NULL;
2756
FolksPersona* _tmp10_;
2757
FolksNoteDetails* _tmp11_;
2758
FolksNoteDetails* note_details;
2759
FolksNoteDetails* _tmp12_;
2761
_p_index = _tmp4_ + 1;
2764
if (!(_tmp5_ < _tmp6_)) {
2769
_tmp9_ = gee_list_get (_tmp7_, _tmp8_);
2770
p = (FolksPersona*) _tmp9_;
2772
_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, FOLKS_TYPE_NOTE_DETAILS) ? ((FolksNoteDetails*) _tmp10_) : NULL);
2773
note_details = _tmp11_;
2774
_tmp12_ = note_details;
2775
if (_tmp12_ != NULL) {
2777
FolksNoteDetails* _tmp13_;
2780
GeeIterator* _tmp16_ = NULL;
2781
GeeIterator* _note_it;
2782
_tmp13_ = note_details;
2783
_tmp14_ = folks_note_details_get_notes (_tmp13_);
2785
_tmp16_ = gee_iterable_iterator ((GeeIterable*) _tmp15_);
2788
GeeIterator* _tmp17_;
2789
gboolean _tmp18_ = FALSE;
2790
GeeIterator* _tmp19_;
2791
gpointer _tmp20_ = NULL;
2792
FolksNoteFieldDetails* note;
2793
FolksNoteFieldDetails* _tmp21_;
2794
gconstpointer _tmp22_;
2795
const gchar* _tmp23_;
2797
_tmp18_ = gee_iterator_next (_tmp17_);
2802
_tmp20_ = gee_iterator_get (_tmp19_);
2803
note = (FolksNoteFieldDetails*) _tmp20_;
2805
_tmp22_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp21_);
2807
if (g_strcmp0 ((const gchar*) _tmp23_, "") != 0) {
2809
_g_object_unref0 (note);
2810
_g_object_unref0 (_note_it);
2811
_g_object_unref0 (note_details);
2812
_g_object_unref0 (p);
2813
_g_object_unref0 (_p_list);
2816
_g_object_unref0 (note);
2818
_g_object_unref0 (_note_it);
2821
_g_object_unref0 (note_details);
2822
_g_object_unref0 (p);
2824
_g_object_unref0 (_p_list);
2650
2831
static gboolean string_contains (const gchar* self, const gchar* needle) {
2651
2832
gboolean result = FALSE;
2652
2833
const gchar* _tmp0_;
3178
3270
_g_object_unref0 (aa);
3181
g_warning ("contacts-contact.vala:617: Unsupported AbstractFieldDetails value type");
3273
g_warning ("contacts-contact.vala:662: Unsupported AbstractFieldDetails value type");
3187
gint contacts_contact_compare_persona_by_store (void* a, void* b) {
3190
FolksPersona* _tmp1_;
3191
FolksPersona* persona_a;
3193
FolksPersona* _tmp3_;
3194
FolksPersona* persona_b;
3195
FolksPersona* _tmp4_;
3196
FolksPersonaStore* _tmp5_;
3197
FolksPersonaStore* _tmp6_;
3198
FolksPersonaStore* _tmp7_;
3199
FolksPersonaStore* store_a;
3200
FolksPersona* _tmp8_;
3201
FolksPersonaStore* _tmp9_;
3202
FolksPersonaStore* _tmp10_;
3203
FolksPersonaStore* _tmp11_;
3204
FolksPersonaStore* store_b;
3205
FolksPersonaStore* _tmp12_;
3206
FolksPersonaStore* _tmp13_;
3207
gboolean _tmp28_ = FALSE;
3208
FolksPersonaStore* _tmp29_;
3212
FolksPersonaStore* _tmp36_;
3215
FolksPersonaStore* _tmp39_;
3218
gboolean _tmp42_ = FALSE;
3219
FolksPersonaStore* _tmp43_;
3220
const gchar* _tmp44_;
3221
const gchar* _tmp45_;
3223
FolksPersonaStore* _tmp58_;
3224
const gchar* _tmp59_;
3225
const gchar* _tmp60_;
3226
FolksPersonaStore* _tmp61_;
3227
const gchar* _tmp62_;
3228
const gchar* _tmp63_;
3229
GCompareFunc _tmp64_;
3230
FolksPersonaStore* _tmp65_;
3231
const gchar* _tmp66_;
3232
const gchar* _tmp67_;
3233
FolksPersonaStore* _tmp68_;
3234
const gchar* _tmp69_;
3235
const gchar* _tmp70_;
3238
_tmp1_ = _g_object_ref0 ((FolksPersona*) _tmp0_);
3241
_tmp3_ = _g_object_ref0 ((FolksPersona*) _tmp2_);
3244
_tmp5_ = folks_persona_get_store (_tmp4_);
3246
_tmp7_ = _g_object_ref0 (_tmp6_);
3249
_tmp9_ = folks_persona_get_store (_tmp8_);
3251
_tmp11_ = _g_object_ref0 (_tmp10_);
3255
if (_tmp12_ == _tmp13_) {
3256
FolksPersona* _tmp14_;
3257
gboolean _tmp15_ = FALSE;
3258
_tmp14_ = persona_a;
3259
_tmp15_ = contacts_contact_persona_is_google (_tmp14_);
3261
gboolean _tmp16_ = FALSE;
3262
FolksPersona* _tmp17_;
3263
gboolean _tmp18_ = FALSE;
3265
gboolean _tmp22_ = FALSE;
3266
FolksPersona* _tmp23_;
3267
gboolean _tmp24_ = FALSE;
3269
_tmp17_ = persona_a;
3270
_tmp18_ = contacts_contact_persona_is_google_other (_tmp17_);
3272
FolksPersona* _tmp19_;
3273
gboolean _tmp20_ = FALSE;
3274
_tmp19_ = persona_b;
3275
_tmp20_ = contacts_contact_persona_is_google_other (_tmp19_);
3283
_g_object_unref0 (store_b);
3284
_g_object_unref0 (store_a);
3285
_g_object_unref0 (persona_b);
3286
_g_object_unref0 (persona_a);
3289
_tmp23_ = persona_a;
3290
_tmp24_ = contacts_contact_persona_is_google_other (_tmp23_);
3292
FolksPersona* _tmp25_;
3293
gboolean _tmp26_ = FALSE;
3294
_tmp25_ = persona_b;
3295
_tmp26_ = contacts_contact_persona_is_google_other (_tmp25_);
3303
_g_object_unref0 (store_b);
3304
_g_object_unref0 (store_a);
3305
_g_object_unref0 (persona_b);
3306
_g_object_unref0 (persona_a);
3311
_g_object_unref0 (store_b);
3312
_g_object_unref0 (store_a);
3313
_g_object_unref0 (persona_b);
3314
_g_object_unref0 (persona_a);
3318
_tmp30_ = folks_persona_store_get_is_primary_store (_tmp29_);
3321
FolksPersonaStore* _tmp32_;
3325
_tmp33_ = folks_persona_store_get_is_primary_store (_tmp32_);
3334
_g_object_unref0 (store_b);
3335
_g_object_unref0 (store_a);
3336
_g_object_unref0 (persona_b);
3337
_g_object_unref0 (persona_a);
3341
_tmp37_ = folks_persona_store_get_is_primary_store (_tmp36_);
3345
_g_object_unref0 (store_b);
3346
_g_object_unref0 (store_a);
3347
_g_object_unref0 (persona_b);
3348
_g_object_unref0 (persona_a);
3352
_tmp40_ = folks_persona_store_get_is_primary_store (_tmp39_);
3356
_g_object_unref0 (store_b);
3357
_g_object_unref0 (store_a);
3358
_g_object_unref0 (persona_b);
3359
_g_object_unref0 (persona_a);
3363
_tmp44_ = folks_persona_store_get_type_id (_tmp43_);
3365
if (g_strcmp0 (_tmp45_, "eds") == 0) {
3366
FolksPersonaStore* _tmp46_;
3367
const gchar* _tmp47_;
3368
const gchar* _tmp48_;
3370
_tmp47_ = folks_persona_store_get_type_id (_tmp46_);
3372
_tmp42_ = g_strcmp0 (_tmp48_, "eds") == 0;
3378
GCompareFunc _tmp50_;
3379
FolksPersonaStore* _tmp51_;
3380
const gchar* _tmp52_;
3381
const gchar* _tmp53_;
3382
FolksPersonaStore* _tmp54_;
3383
const gchar* _tmp55_;
3384
const gchar* _tmp56_;
3386
_tmp50_ = g_strcmp0;
3388
_tmp52_ = folks_persona_store_get_id (_tmp51_);
3391
_tmp55_ = folks_persona_store_get_id (_tmp54_);
3393
_tmp57_ = _tmp50_ (_tmp53_, _tmp56_);
3395
_g_object_unref0 (store_b);
3396
_g_object_unref0 (store_a);
3397
_g_object_unref0 (persona_b);
3398
_g_object_unref0 (persona_a);
3402
_tmp59_ = folks_persona_store_get_type_id (_tmp58_);
3404
if (g_strcmp0 (_tmp60_, "eds") == 0) {
3406
_g_object_unref0 (store_b);
3407
_g_object_unref0 (store_a);
3408
_g_object_unref0 (persona_b);
3409
_g_object_unref0 (persona_a);
3413
_tmp62_ = folks_persona_store_get_type_id (_tmp61_);
3415
if (g_strcmp0 (_tmp63_, "eds") == 0) {
3417
_g_object_unref0 (store_b);
3418
_g_object_unref0 (store_a);
3419
_g_object_unref0 (persona_b);
3420
_g_object_unref0 (persona_a);
3423
_tmp64_ = g_strcmp0;
3425
_tmp66_ = folks_persona_store_get_id (_tmp65_);
3428
_tmp69_ = folks_persona_store_get_id (_tmp68_);
3430
_tmp71_ = _tmp64_ (_tmp67_, _tmp70_);
3432
_g_object_unref0 (store_b);
3433
_g_object_unref0 (store_a);
3434
_g_object_unref0 (persona_b);
3435
_g_object_unref0 (persona_a);
3440
static gint _contacts_contact_compare_fields_gcompare_func (gconstpointer a, gconstpointer b) {
3279
static gint _contacts_contact_compare_fields_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
3442
3281
result = contacts_contact_compare_fields (a, b);
4071
3909
GtkImage* _tmp13_;
4072
3910
GtkStyleContext* _tmp14_ = NULL;
4073
3911
const gchar* _tmp15_;
4074
self = _data11_->self;
3912
self = _data2_->self;
4075
3913
g_return_if_fail (pspec != NULL);
4076
_tmp0_ = _data11_->i;
4077
_tmp1_ = _data11_->tp;
3914
_tmp0_ = _data2_->i;
3915
_tmp1_ = _data2_->tp;
4078
3916
_tmp2_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp1_);
4079
3917
_tmp3_ = _tmp2_;
4080
3918
_tmp4_ = contacts_contact_presence_to_icon_full (_tmp3_);
4081
3919
_tmp5_ = _tmp4_;
4082
3920
gtk_image_set_from_icon_name (_tmp0_, _tmp5_, GTK_ICON_SIZE_MENU);
4083
3921
_g_free0 (_tmp5_);
4084
_tmp6_ = _data11_->i;
3922
_tmp6_ = _data2_->i;
4085
3923
_tmp7_ = gtk_widget_get_style_context ((GtkWidget*) _tmp6_);
4086
_tmp8_ = _data11_->last_class;
3924
_tmp8_ = _data2_->last_class;
4087
3925
gtk_style_context_remove_class (_tmp7_, _tmp8_);
4088
_tmp9_ = _data11_->tp;
3926
_tmp9_ = _data2_->tp;
4089
3927
_tmp10_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp9_);
4090
3928
_tmp11_ = _tmp10_;
4091
3929
_tmp12_ = contacts_contact_presence_to_class (_tmp11_);
4092
_g_free0 (_data11_->last_class);
4093
_data11_->last_class = _tmp12_;
4094
_tmp13_ = _data11_->i;
3930
_g_free0 (_data2_->last_class);
3931
_data2_->last_class = _tmp12_;
3932
_tmp13_ = _data2_->i;
4095
3933
_tmp14_ = gtk_widget_get_style_context ((GtkWidget*) _tmp13_);
4096
_tmp15_ = _data11_->last_class;
3934
_tmp15_ = _data2_->last_class;
4097
3935
gtk_style_context_add_class (_tmp14_, _tmp15_);
4101
static void ___lambda6__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
4102
__lambda6_ (self, pspec);
3939
static void ___lambda13__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
3940
__lambda13_ (self, pspec);
4106
static void __lambda7_ (Block11Data* _data11_, GParamSpec* pspec) {
3944
static void __lambda14_ (Block2Data* _data2_, GParamSpec* pspec) {
4107
3945
ContactsContact * self;
4108
3946
GtkImage* _tmp0_;
4109
3947
TpfPersona* _tmp1_;
4110
3948
const gchar* _tmp2_;
4111
3949
const gchar* _tmp3_;
4112
self = _data11_->self;
3950
self = _data2_->self;
4113
3951
g_return_if_fail (pspec != NULL);
4114
_tmp0_ = _data11_->i;
4115
_tmp1_ = _data11_->tp;
3952
_tmp0_ = _data2_->i;
3953
_tmp1_ = _data2_->tp;
4116
3954
_tmp2_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp1_);
4117
3955
_tmp3_ = _tmp2_;
4118
3956
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp0_, _tmp3_);
4122
static void ___lambda7__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
4123
__lambda7_ (self, pspec);
3960
static void ___lambda14__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
3961
__lambda14_ (self, pspec);
4127
static void __lambda8_ (Block11Data* _data11_) {
3965
static void __lambda15_ (Block2Data* _data2_) {
4128
3966
ContactsContact * self;
4129
3967
TpfPersona* _tmp0_;
4131
3969
TpfPersona* _tmp2_;
4133
self = _data11_->self;
4134
_tmp0_ = _data11_->tp;
4135
_tmp1_ = _data11_->id1;
3971
self = _data2_->self;
3972
_tmp0_ = _data2_->tp;
3973
_tmp1_ = _data2_->id1;
4136
3974
g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
4137
_tmp2_ = _data11_->tp;
4138
_tmp3_ = _data11_->id2;
3975
_tmp2_ = _data2_->tp;
3976
_tmp3_ = _data2_->id2;
4139
3977
g_signal_handler_disconnect ((GObject*) _tmp2_, _tmp3_);
4143
static void ___lambda8__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
3981
static void ___lambda15__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
4148
3986
GtkWidget* contacts_contact_create_presence_widget (ContactsContact* self, const gchar* protocol, const gchar* im_address) {
4149
3987
GtkWidget* result = NULL;
4150
Block11Data* _data11_;
3988
Block2Data* _data2_;
4151
3989
const gchar* _tmp0_;
4152
3990
const gchar* _tmp1_;
4153
3991
TpfPersona* _tmp2_ = NULL;
4154
3992
TpfPersona* _tmp3_;
4155
3993
GtkImage* _tmp4_;
4156
3994
GtkImage* _tmp5_;
3996
FolksPresenceType _tmp7_;
4159
3997
FolksPresenceType _tmp8_;
4160
FolksPresenceType _tmp9_;
4161
gchar* _tmp10_ = NULL;
4163
TpfPersona* _tmp12_;
3998
gchar* _tmp9_ = NULL;
4000
TpfPersona* _tmp11_;
4001
FolksPresenceType _tmp12_;
4164
4002
FolksPresenceType _tmp13_;
4165
FolksPresenceType _tmp14_;
4166
gchar* _tmp15_ = NULL;
4168
GtkStyleContext* _tmp17_ = NULL;
4169
const gchar* _tmp18_;
4171
TpfPersona* _tmp20_;
4003
gchar* _tmp14_ = NULL;
4005
GtkStyleContext* _tmp16_ = NULL;
4006
const gchar* _tmp17_;
4008
TpfPersona* _tmp19_;
4009
const gchar* _tmp20_;
4172
4010
const gchar* _tmp21_;
4173
const gchar* _tmp22_;
4174
TpfPersona* _tmp23_;
4175
gulong _tmp24_ = 0UL;
4176
TpfPersona* _tmp25_;
4177
gulong _tmp26_ = 0UL;
4011
TpfPersona* _tmp22_;
4012
gulong _tmp23_ = 0UL;
4013
TpfPersona* _tmp24_;
4014
gulong _tmp25_ = 0UL;
4178
4016
GtkImage* _tmp27_;
4181
4018
g_return_val_if_fail (self != NULL, NULL);
4182
4019
g_return_val_if_fail (protocol != NULL, NULL);
4183
4020
g_return_val_if_fail (im_address != NULL, NULL);
4184
_data11_ = g_slice_new0 (Block11Data);
4185
_data11_->_ref_count_ = 1;
4186
_data11_->self = g_object_ref (self);
4021
_data2_ = g_slice_new0 (Block2Data);
4022
_data2_->_ref_count_ = 1;
4023
_data2_->self = g_object_ref (self);
4187
4024
_tmp0_ = protocol;
4188
4025
_tmp1_ = im_address;
4189
4026
_tmp2_ = contacts_contact_find_im_persona (self, _tmp0_, _tmp1_);
4190
_data11_->tp = _tmp2_;
4191
_tmp3_ = _data11_->tp;
4027
_data2_->tp = _tmp2_;
4028
_tmp3_ = _data2_->tp;
4192
4029
if (_tmp3_ == NULL) {
4194
block11_data_unref (_data11_);
4031
block2_data_unref (_data2_);
4198
4035
_tmp4_ = (GtkImage*) gtk_image_new ();
4199
_tmp5_ = g_object_ref_sink (_tmp4_);
4200
_data11_->i = _tmp5_;
4201
_tmp6_ = _data11_->i;
4202
_tmp7_ = _data11_->tp;
4203
_tmp8_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp7_);
4205
_tmp10_ = contacts_contact_presence_to_icon_full (_tmp9_);
4207
gtk_image_set_from_icon_name (_tmp6_, _tmp11_, GTK_ICON_SIZE_MENU);
4209
_tmp12_ = _data11_->tp;
4210
_tmp13_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp12_);
4212
_tmp15_ = contacts_contact_presence_to_class (_tmp14_);
4213
_data11_->last_class = _tmp15_;
4214
_tmp16_ = _data11_->i;
4215
_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) _tmp16_);
4216
_tmp18_ = _data11_->last_class;
4217
gtk_style_context_add_class (_tmp17_, _tmp18_);
4218
_tmp19_ = _data11_->i;
4219
_tmp20_ = _data11_->tp;
4220
_tmp21_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp20_);
4222
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp19_, _tmp22_);
4223
_tmp23_ = _data11_->tp;
4224
_tmp24_ = g_signal_connect_data ((GObject*) _tmp23_, "notify::presence-type", (GCallback) ___lambda6__g_object_notify, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4225
_data11_->id1 = _tmp24_;
4226
_tmp25_ = _data11_->tp;
4227
_tmp26_ = g_signal_connect_data ((GObject*) _tmp25_, "notify::presence-message", (GCallback) ___lambda7__g_object_notify, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4228
_data11_->id2 = _tmp26_;
4229
_tmp27_ = _data11_->i;
4230
g_signal_connect_data ((GtkWidget*) _tmp27_, "destroy", (GCallback) ___lambda8__gtk_widget_destroy, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
4231
_tmp28_ = _data11_->i;
4232
_tmp29_ = _g_object_ref0 ((GtkWidget*) _tmp28_);
4234
block11_data_unref (_data11_);
4036
g_object_ref_sink (_tmp4_);
4037
_data2_->i = _tmp4_;
4038
_tmp5_ = _data2_->i;
4039
_tmp6_ = _data2_->tp;
4040
_tmp7_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp6_);
4042
_tmp9_ = contacts_contact_presence_to_icon_full (_tmp8_);
4044
gtk_image_set_from_icon_name (_tmp5_, _tmp10_, GTK_ICON_SIZE_MENU);
4046
_tmp11_ = _data2_->tp;
4047
_tmp12_ = folks_presence_details_get_presence_type ((FolksPresenceDetails*) _tmp11_);
4049
_tmp14_ = contacts_contact_presence_to_class (_tmp13_);
4050
_data2_->last_class = _tmp14_;
4051
_tmp15_ = _data2_->i;
4052
_tmp16_ = gtk_widget_get_style_context ((GtkWidget*) _tmp15_);
4053
_tmp17_ = _data2_->last_class;
4054
gtk_style_context_add_class (_tmp16_, _tmp17_);
4055
_tmp18_ = _data2_->i;
4056
_tmp19_ = _data2_->tp;
4057
_tmp20_ = folks_presence_details_get_presence_message ((FolksPresenceDetails*) _tmp19_);
4059
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp18_, _tmp21_);
4060
_tmp22_ = _data2_->tp;
4061
_tmp23_ = g_signal_connect_data ((GObject*) _tmp22_, "notify::presence-type", (GCallback) ___lambda13__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
4062
_data2_->id1 = _tmp23_;
4063
_tmp24_ = _data2_->tp;
4064
_tmp25_ = g_signal_connect_data ((GObject*) _tmp24_, "notify::presence-message", (GCallback) ___lambda14__g_object_notify, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
4065
_data2_->id2 = _tmp25_;
4066
_tmp26_ = _data2_->i;
4067
g_signal_connect_data ((GtkWidget*) _tmp26_, "destroy", (GCallback) ___lambda15__gtk_widget_destroy, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
4068
_tmp27_ = _data2_->i;
4069
_tmp28_ = _g_object_ref0 ((GtkWidget*) _tmp27_);
4071
block2_data_unref (_data2_);
5028
4852
_tmp21_ = gtk_icon_theme_lookup_icon (_tmp19_, "avatar-default-symbolic", _tmp20_, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
5029
4853
icon_info = _tmp21_;
5030
4854
_tmp22_ = icon_info;
5031
_tmp23_ = gtk_icon_info_load_icon (_tmp22_, &_inner_error_);
5033
if (_inner_error_ != NULL) {
5034
_gtk_icon_info_free0 (icon_info);
5035
_cairo_pattern_destroy0 (pat);
5036
_cairo_destroy0 (cr);
5037
_cairo_surface_destroy0 (cst);
5038
goto __catch5_g_error;
4855
if (_tmp22_ != NULL) {
4856
GtkIconInfo* _tmp23_;
4857
GdkPixbuf* _tmp24_ = NULL;
4873
_tmp23_ = icon_info;
4874
_tmp24_ = gtk_icon_info_load_icon (_tmp23_, &_inner_error_);
4876
if (_inner_error_ != NULL) {
4877
_gtk_icon_info_free0 (icon_info);
4878
_cairo_pattern_destroy0 (pat);
4879
_cairo_destroy0 (cr);
4880
_cairo_surface_destroy0 (cst);
4881
goto __catch1_g_error;
4886
_tmp29_ = avatar_size;
4888
_tmp31_ = avatar_size;
4889
gdk_cairo_set_source_pixbuf (_tmp26_, _tmp27_, (gdouble) ((_tmp28_ - _tmp29_) / 2), (gdouble) ((_tmp30_ - _tmp31_) / 2));
4890
_g_object_unref0 (_tmp27_);
4893
_tmp34_ = avatar_size;
4895
_tmp36_ = avatar_size;
4896
_tmp37_ = avatar_size;
4897
_tmp38_ = avatar_size;
4898
cairo_rectangle (_tmp32_, (gdouble) ((_tmp33_ - _tmp34_) / 2), (gdouble) ((_tmp35_ - _tmp36_) / 2), (gdouble) _tmp37_, (gdouble) _tmp38_);
4900
cairo_fill (_tmp39_);
5043
_tmp28_ = avatar_size;
5045
_tmp30_ = avatar_size;
5046
gdk_cairo_set_source_pixbuf (_tmp25_, _tmp26_, (gdouble) ((_tmp27_ - _tmp28_) / 2), (gdouble) ((_tmp29_ - _tmp30_) / 2));
5047
_g_object_unref0 (_tmp26_);
5050
_tmp33_ = avatar_size;
5052
_tmp35_ = avatar_size;
5053
_tmp36_ = avatar_size;
5054
_tmp37_ = avatar_size;
5055
cairo_rectangle (_tmp31_, (gdouble) ((_tmp32_ - _tmp33_) / 2), (gdouble) ((_tmp34_ - _tmp35_) / 2), (gdouble) _tmp36_, (gdouble) _tmp37_);
5057
cairo_fill (_tmp38_);
5060
4903
_tmp41_ = size;
5061
_tmp42_ = gdk_pixbuf_get_from_surface (_tmp39_, 0, 0, _tmp40_, _tmp41_);
4905
_tmp43_ = gdk_pixbuf_get_from_surface (_tmp40_, 0, 0, _tmp41_, _tmp42_);
5062
4906
_g_object_unref0 (pixbuf);
5064
4908
_gtk_icon_info_free0 (icon_info);
5065
4909
_cairo_pattern_destroy0 (pat);
5066
4910
_cairo_destroy0 (cr);
5067
4911
_cairo_surface_destroy0 (cst);
5072
4916
g_clear_error (&_inner_error_);
5073
4917
_inner_error_ = NULL;
5076
4920
if (_inner_error_ != NULL) {
5077
4921
_g_object_unref0 (pixbuf);
5078
4922
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5079
4923
g_clear_error (&_inner_error_);
5083
if (_tmp43_ == CONTACTS_CONTACT_SMALL_AVATAR_SIZE) {
4927
if (_tmp44_ == CONTACTS_CONTACT_SMALL_AVATAR_SIZE) {
5085
4928
GdkPixbuf* _tmp45_;
5087
_tmp45_ = _g_object_ref0 (_tmp44_);
4931
_tmp46_ = _g_object_ref0 (_tmp45_);
5088
4932
_g_object_unref0 (contacts_contact_fallback_pixbuf_default);
5089
contacts_contact_fallback_pixbuf_default = _tmp45_;
4933
contacts_contact_fallback_pixbuf_default = _tmp46_;
5092
if (_tmp46_ != NULL) {
4936
if (_tmp47_ != NULL) {
5093
4937
result = pixbuf;
5097
4940
_tmp48_ = size;
5098
_tmp49_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp47_, _tmp48_);
4942
_tmp50_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, _tmp48_, _tmp49_);
5102
4945
_tmp52_ = size;
5103
_tmp53_ = gdk_pixbuf_get_from_surface (_tmp50_, 0, 0, _tmp51_, _tmp52_);
4947
_tmp54_ = gdk_pixbuf_get_from_surface (_tmp51_, 0, 0, _tmp52_, _tmp53_);
5105
4949
_cairo_surface_destroy0 (cst);
5106
4950
_g_object_unref0 (pixbuf);
5804
static gint _contacts_contact_compare_persona_by_store_gcompare_func (gconstpointer a, gconstpointer b) {
5648
static gint __lambda3_ (ContactsContact* self, FolksPersona* a, FolksPersona* b) {
5650
FolksPersona* _tmp0_;
5651
FolksPersona* _tmp1_;
5652
FolksPersona* persona_a;
5653
FolksPersona* _tmp2_;
5654
FolksPersona* _tmp3_;
5655
FolksPersona* persona_b;
5656
FolksPersona* _tmp4_;
5657
FolksPersonaStore* _tmp5_;
5658
FolksPersonaStore* _tmp6_;
5659
FolksPersonaStore* _tmp7_;
5660
FolksPersonaStore* store_a;
5661
FolksPersona* _tmp8_;
5662
FolksPersonaStore* _tmp9_;
5663
FolksPersonaStore* _tmp10_;
5664
FolksPersonaStore* _tmp11_;
5665
FolksPersonaStore* store_b;
5666
FolksPersonaStore* _tmp12_;
5667
FolksPersonaStore* _tmp13_;
5668
gboolean _tmp28_ = FALSE;
5669
FolksPersonaStore* _tmp29_;
5673
FolksPersonaStore* _tmp36_;
5676
FolksPersonaStore* _tmp39_;
5679
gboolean _tmp42_ = FALSE;
5680
FolksPersonaStore* _tmp43_;
5681
const gchar* _tmp44_;
5682
const gchar* _tmp45_;
5684
FolksPersonaStore* _tmp58_;
5685
const gchar* _tmp59_;
5686
const gchar* _tmp60_;
5687
FolksPersonaStore* _tmp61_;
5688
const gchar* _tmp62_;
5689
const gchar* _tmp63_;
5690
GCompareFunc _tmp64_;
5691
FolksPersonaStore* _tmp65_;
5692
const gchar* _tmp66_;
5693
const gchar* _tmp67_;
5694
FolksPersonaStore* _tmp68_;
5695
const gchar* _tmp69_;
5696
const gchar* _tmp70_;
5698
g_return_val_if_fail (a != NULL, 0);
5699
g_return_val_if_fail (b != NULL, 0);
5701
_tmp1_ = _g_object_ref0 ((FolksPersona*) _tmp0_);
5704
_tmp3_ = _g_object_ref0 ((FolksPersona*) _tmp2_);
5707
_tmp5_ = folks_persona_get_store (_tmp4_);
5709
_tmp7_ = _g_object_ref0 (_tmp6_);
5712
_tmp9_ = folks_persona_get_store (_tmp8_);
5714
_tmp11_ = _g_object_ref0 (_tmp10_);
5718
if (_tmp12_ == _tmp13_) {
5719
FolksPersona* _tmp14_;
5720
gboolean _tmp15_ = FALSE;
5721
_tmp14_ = persona_a;
5722
_tmp15_ = contacts_contact_persona_is_google (_tmp14_);
5724
gboolean _tmp16_ = FALSE;
5725
FolksPersona* _tmp17_;
5726
gboolean _tmp18_ = FALSE;
5728
gboolean _tmp22_ = FALSE;
5729
FolksPersona* _tmp23_;
5730
gboolean _tmp24_ = FALSE;
5732
_tmp17_ = persona_a;
5733
_tmp18_ = contacts_contact_persona_is_google_other (_tmp17_);
5735
FolksPersona* _tmp19_;
5736
gboolean _tmp20_ = FALSE;
5737
_tmp19_ = persona_b;
5738
_tmp20_ = contacts_contact_persona_is_google_other (_tmp19_);
5746
_g_object_unref0 (store_b);
5747
_g_object_unref0 (store_a);
5748
_g_object_unref0 (persona_b);
5749
_g_object_unref0 (persona_a);
5752
_tmp23_ = persona_a;
5753
_tmp24_ = contacts_contact_persona_is_google_other (_tmp23_);
5755
FolksPersona* _tmp25_;
5756
gboolean _tmp26_ = FALSE;
5757
_tmp25_ = persona_b;
5758
_tmp26_ = contacts_contact_persona_is_google_other (_tmp25_);
5766
_g_object_unref0 (store_b);
5767
_g_object_unref0 (store_a);
5768
_g_object_unref0 (persona_b);
5769
_g_object_unref0 (persona_a);
5774
_g_object_unref0 (store_b);
5775
_g_object_unref0 (store_a);
5776
_g_object_unref0 (persona_b);
5777
_g_object_unref0 (persona_a);
5781
_tmp30_ = folks_persona_store_get_is_primary_store (_tmp29_);
5784
FolksPersonaStore* _tmp32_;
5788
_tmp33_ = folks_persona_store_get_is_primary_store (_tmp32_);
5797
_g_object_unref0 (store_b);
5798
_g_object_unref0 (store_a);
5799
_g_object_unref0 (persona_b);
5800
_g_object_unref0 (persona_a);
5804
_tmp37_ = folks_persona_store_get_is_primary_store (_tmp36_);
5808
_g_object_unref0 (store_b);
5809
_g_object_unref0 (store_a);
5810
_g_object_unref0 (persona_b);
5811
_g_object_unref0 (persona_a);
5815
_tmp40_ = folks_persona_store_get_is_primary_store (_tmp39_);
5819
_g_object_unref0 (store_b);
5820
_g_object_unref0 (store_a);
5821
_g_object_unref0 (persona_b);
5822
_g_object_unref0 (persona_a);
5826
_tmp44_ = folks_persona_store_get_type_id (_tmp43_);
5828
if (g_strcmp0 (_tmp45_, "eds") == 0) {
5829
FolksPersonaStore* _tmp46_;
5830
const gchar* _tmp47_;
5831
const gchar* _tmp48_;
5833
_tmp47_ = folks_persona_store_get_type_id (_tmp46_);
5835
_tmp42_ = g_strcmp0 (_tmp48_, "eds") == 0;
5841
GCompareFunc _tmp50_;
5842
FolksPersonaStore* _tmp51_;
5843
const gchar* _tmp52_;
5844
const gchar* _tmp53_;
5845
FolksPersonaStore* _tmp54_;
5846
const gchar* _tmp55_;
5847
const gchar* _tmp56_;
5849
_tmp50_ = g_strcmp0;
5851
_tmp52_ = folks_persona_store_get_id (_tmp51_);
5854
_tmp55_ = folks_persona_store_get_id (_tmp54_);
5856
_tmp57_ = _tmp50_ (_tmp53_, _tmp56_);
5858
_g_object_unref0 (store_b);
5859
_g_object_unref0 (store_a);
5860
_g_object_unref0 (persona_b);
5861
_g_object_unref0 (persona_a);
5865
_tmp59_ = folks_persona_store_get_type_id (_tmp58_);
5867
if (g_strcmp0 (_tmp60_, "eds") == 0) {
5869
_g_object_unref0 (store_b);
5870
_g_object_unref0 (store_a);
5871
_g_object_unref0 (persona_b);
5872
_g_object_unref0 (persona_a);
5876
_tmp62_ = folks_persona_store_get_type_id (_tmp61_);
5878
if (g_strcmp0 (_tmp63_, "eds") == 0) {
5880
_g_object_unref0 (store_b);
5881
_g_object_unref0 (store_a);
5882
_g_object_unref0 (persona_b);
5883
_g_object_unref0 (persona_a);
5886
_tmp64_ = g_strcmp0;
5888
_tmp66_ = folks_persona_store_get_id (_tmp65_);
5891
_tmp69_ = folks_persona_store_get_id (_tmp68_);
5893
_tmp71_ = _tmp64_ (_tmp67_, _tmp70_);
5895
_g_object_unref0 (store_b);
5896
_g_object_unref0 (store_a);
5897
_g_object_unref0 (persona_b);
5898
_g_object_unref0 (persona_a);
5903
static gint ___lambda3__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
5806
result = contacts_contact_compare_persona_by_store (a, b);
5905
result = __lambda3_ (self, a, b);
5811
5910
GeeList* contacts_contact_get_personas_for_display (ContactsContact* self) {
5812
5911
GeeList* result = NULL;
5912
GCompareDataFunc compare_persona_by_store;
5913
void* compare_persona_by_store_target;
5914
GDestroyNotify compare_persona_by_store_target_destroy_notify;
5813
5915
GeeArrayList* _tmp0_;
5814
5916
GeeArrayList* persona_list;
5985
static void _vala_array_add9 (FolksPersonaStore*** array, int* length, int* size, FolksPersonaStore* value) {
5986
if ((*length) == (*size)) {
5987
*size = (*size) ? (2 * (*size)) : 4;
5988
*array = g_renew (FolksPersonaStore*, *array, (*size) + 1);
5990
(*array)[(*length)++] = value;
5991
(*array)[*length] = NULL;
5995
FolksPersonaStore** contacts_contact_get_eds_address_books (int* result_length1) {
5996
FolksPersonaStore** result = NULL;
5997
FolksPersonaStore** _tmp0_ = NULL;
5998
FolksPersonaStore** stores;
5999
gint stores_length1;
6001
FolksPersonaStore** _tmp34_;
6002
gint _tmp34__length1;
6003
_tmp0_ = g_new0 (FolksPersonaStore*, 0 + 1);
6006
_stores_size_ = stores_length1;
6008
ContactsApp* _tmp1_;
6009
ContactsStore* _tmp2_;
6010
FolksBackendStore* _tmp3_;
6011
FolksBackendStore* _tmp4_;
6014
GeeCollection* _tmp7_;
6015
GeeCollection* _tmp8_;
6016
GeeCollection* _tmp9_;
6017
GeeIterator* _tmp10_ = NULL;
6018
GeeIterator* _tmp11_;
6019
GeeIterator* _backend_it;
6020
_tmp1_ = contacts_app_app;
6021
_tmp2_ = _tmp1_->contacts_store;
6022
_tmp3_ = contacts_store_get_backend_store (_tmp2_);
6024
_tmp5_ = folks_backend_store_get_enabled_backends (_tmp4_);
6026
_tmp7_ = gee_map_get_values (_tmp6_);
6029
_tmp10_ = gee_iterable_iterator ((GeeIterable*) _tmp9_);
6031
_g_object_unref0 (_tmp9_);
6032
_backend_it = _tmp11_;
6034
GeeIterator* _tmp12_;
6035
gboolean _tmp13_ = FALSE;
6036
GeeIterator* _tmp14_;
6037
gpointer _tmp15_ = NULL;
6038
FolksBackend* backend;
6039
_tmp12_ = _backend_it;
6040
_tmp13_ = gee_iterator_next (_tmp12_);
6044
_tmp14_ = _backend_it;
6045
_tmp15_ = gee_iterator_get (_tmp14_);
6046
backend = (FolksBackend*) _tmp15_;
6048
FolksBackend* _tmp16_;
6051
GeeCollection* _tmp19_;
6052
GeeCollection* _tmp20_;
6053
GeeCollection* _tmp21_;
6054
GeeIterator* _tmp22_ = NULL;
6055
GeeIterator* _tmp23_;
6056
GeeIterator* _persona_store_it;
6058
_tmp17_ = folks_backend_get_persona_stores (_tmp16_);
6060
_tmp19_ = gee_map_get_values (_tmp18_);
6063
_tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_);
6065
_g_object_unref0 (_tmp21_);
6066
_persona_store_it = _tmp23_;
6068
GeeIterator* _tmp24_;
6069
gboolean _tmp25_ = FALSE;
6070
GeeIterator* _tmp26_;
6071
gpointer _tmp27_ = NULL;
6072
FolksPersonaStore* persona_store;
6073
FolksPersonaStore* _tmp28_;
6074
const gchar* _tmp29_;
6075
const gchar* _tmp30_;
6076
_tmp24_ = _persona_store_it;
6077
_tmp25_ = gee_iterator_next (_tmp24_);
6081
_tmp26_ = _persona_store_it;
6082
_tmp27_ = gee_iterator_get (_tmp26_);
6083
persona_store = (FolksPersonaStore*) _tmp27_;
6084
_tmp28_ = persona_store;
6085
_tmp29_ = folks_persona_store_get_type_id (_tmp28_);
6087
if (g_strcmp0 (_tmp30_, "eds") == 0) {
6088
FolksPersonaStore** _tmp31_;
6089
gint _tmp31__length1;
6090
FolksPersonaStore* _tmp32_;
6091
FolksPersonaStore* _tmp33_;
6093
_tmp31__length1 = stores_length1;
6094
_tmp32_ = persona_store;
6095
_tmp33_ = _g_object_ref0 (_tmp32_);
6096
_vala_array_add9 (&stores, &stores_length1, &_stores_size_, _tmp33_);
6098
_g_object_unref0 (persona_store);
6100
_g_object_unref0 (_persona_store_it);
6102
_g_object_unref0 (backend);
6104
_g_object_unref0 (_backend_it);
6107
_tmp34__length1 = stores_length1;
6108
if (result_length1) {
6109
*result_length1 = _tmp34__length1;
6116
6098
gchar* contacts_contact_format_persona_store_name (FolksPersonaStore* store) {
6117
6099
gchar* result = NULL;
6118
6100
FolksPersonaStore* _tmp0_;
6661
static gint g_ptr_array_get_length (GPtrArray* self) {
6633
static gint __lambda16_ (const gchar* a, const gchar* b) {
6636
GeeHashMap* sorted_map;
6639
gint _tmp1__length1;
6640
const gchar* _tmp7_;
6643
const gchar* _tmp9_;
6646
gboolean _tmp11_ = FALSE;
6647
GeeHashMap* _tmp12_;
6648
const gchar* _tmp13_;
6649
gboolean _tmp14_ = FALSE;
6651
g_return_val_if_fail (a != NULL, 0);
6652
g_return_val_if_fail (b != NULL, 0);
6653
_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
6654
sorted_map = _tmp0_;
6656
_tmp1_ = contacts_contact_sorted_properties;
6657
_tmp1__length1 = contacts_contact_sorted_properties_length1;
6659
gchar** p_collection = NULL;
6660
gint p_collection_length1 = 0;
6661
gint _p_collection_size_ = 0;
6663
p_collection = _tmp1_;
6664
p_collection_length1 = _tmp1__length1;
6665
for (p_it = 0; p_it < _tmp1__length1; p_it = p_it + 1) {
6668
_tmp2_ = g_strdup (p_collection[p_it]);
6672
const gchar* _tmp4_;
6675
_tmp3_ = sorted_map;
6680
gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp4_, _tmp6_);
6686
_tmp8_ = g_strdup ((const gchar*) _tmp7_);
6689
_tmp10_ = g_strdup ((const gchar*) _tmp9_);
6691
_tmp12_ = sorted_map;
6693
_tmp14_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp12_, _tmp13_);
6695
GeeHashMap* _tmp15_;
6696
const gchar* _tmp16_;
6697
gboolean _tmp17_ = FALSE;
6698
_tmp15_ = sorted_map;
6700
_tmp17_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp15_, _tmp16_);
6707
GeeHashMap* _tmp19_;
6708
const gchar* _tmp20_;
6709
gpointer _tmp21_ = NULL;
6710
GeeHashMap* _tmp22_;
6711
const gchar* _tmp23_;
6712
gpointer _tmp24_ = NULL;
6713
GeeHashMap* _tmp25_;
6714
const gchar* _tmp26_;
6715
gpointer _tmp27_ = NULL;
6716
GeeHashMap* _tmp28_;
6717
const gchar* _tmp29_;
6718
gpointer _tmp30_ = NULL;
6719
_tmp19_ = sorted_map;
6721
_tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp20_);
6722
_tmp22_ = sorted_map;
6724
_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
6725
if (((gint) ((gintptr) _tmp21_)) < ((gint) ((gintptr) _tmp24_))) {
6729
_g_object_unref0 (sorted_map);
6732
_tmp25_ = sorted_map;
6734
_tmp27_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp25_, _tmp26_);
6735
_tmp28_ = sorted_map;
6737
_tmp30_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp28_, _tmp29_);
6738
if (((gint) ((gintptr) _tmp27_)) > ((gint) ((gintptr) _tmp30_))) {
6742
_g_object_unref0 (sorted_map);
6748
_g_object_unref0 (sorted_map);
6751
GeeHashMap* _tmp31_;
6752
const gchar* _tmp32_;
6753
gboolean _tmp33_ = FALSE;
6754
_tmp31_ = sorted_map;
6756
_tmp33_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp31_, _tmp32_);
6761
_g_object_unref0 (sorted_map);
6764
GeeHashMap* _tmp34_;
6765
const gchar* _tmp35_;
6766
gboolean _tmp36_ = FALSE;
6767
_tmp34_ = sorted_map;
6769
_tmp36_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp34_, _tmp35_);
6774
_g_object_unref0 (sorted_map);
6777
const gchar* _tmp37_;
6778
const gchar* _tmp38_;
6779
const gchar* _tmp39_;
6780
const gchar* _tmp40_;
6783
if (g_strcmp0 (_tmp37_, _tmp38_) < 0) {
6787
_g_object_unref0 (sorted_map);
6792
if (g_strcmp0 (_tmp39_, _tmp40_) > 0) {
6796
_g_object_unref0 (sorted_map);
6802
_g_object_unref0 (sorted_map);
6809
_g_object_unref0 (sorted_map);
6813
static gint ___lambda16__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
6664
g_return_val_if_fail (self != NULL, 0);
6666
result = (gint) _tmp0_;
6671
static void g_ptr_array_set_length (GPtrArray* self, gint value) {
6673
g_return_if_fail (self != NULL);
6675
g_ptr_array_set_size (self, _tmp0_);
6815
result = __lambda16_ (a, b);
6820
gchar** contacts_contact_sort_persona_properties (gchar** props, int props_length1, int* result_length1) {
6821
gchar** result = NULL;
6822
GCompareDataFunc compare_properties;
6823
void* compare_properties_target;
6824
GDestroyNotify compare_properties_target_destroy_notify;
6825
GeeArrayList* _tmp0_;
6826
GeeArrayList* sorted_props;
6828
gint _tmp1__length1;
6829
GeeArrayList* _tmp5_;
6830
GCompareDataFunc _tmp6_;
6831
void* _tmp6__target;
6832
GeeArrayList* _tmp7_;
6834
gpointer* _tmp9_ = NULL;
6836
gint _tmp10__length1;
6837
compare_properties = ___lambda16__gcompare_data_func;
6838
compare_properties_target = NULL;
6839
compare_properties_target_destroy_notify = NULL;
6840
_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
6841
sorted_props = _tmp0_;
6843
_tmp1__length1 = props_length1;
6845
gchar** s_collection = NULL;
6846
gint s_collection_length1 = 0;
6847
gint _s_collection_size_ = 0;
6849
s_collection = _tmp1_;
6850
s_collection_length1 = _tmp1__length1;
6851
for (s_it = 0; s_it < _tmp1__length1; s_it = s_it + 1) {
6854
_tmp2_ = g_strdup (s_collection[s_it]);
6857
GeeArrayList* _tmp3_;
6858
const gchar* _tmp4_;
6859
_tmp3_ = sorted_props;
6861
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _tmp4_);
6866
_tmp5_ = sorted_props;
6867
_tmp6_ = compare_properties;
6868
_tmp6__target = compare_properties_target;
6869
gee_list_sort ((GeeList*) _tmp5_, _tmp6_, _tmp6__target, NULL);
6870
_tmp7_ = sorted_props;
6871
_tmp9_ = gee_collection_to_array ((GeeCollection*) _tmp7_, &_tmp8_);
6873
_tmp10__length1 = _tmp8_;
6874
if (result_length1) {
6875
*result_length1 = _tmp10__length1;
6878
_g_object_unref0 (sorted_props);
6879
(compare_properties_target_destroy_notify == NULL) ? NULL : (compare_properties_target_destroy_notify (compare_properties_target), NULL);
6880
compare_properties = NULL;
6881
compare_properties_target = NULL;
6882
compare_properties_target_destroy_notify = NULL;
6887
static void contacts_contact_set_individual_property_data_free (gpointer _data) {
6888
ContactsContactSetIndividualPropertyData* _data_;
6890
_g_object_unref0 (_data_->contact);
6891
_g_free0 (_data_->property_name);
6892
G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
6893
_g_object_unref0 (_data_->result);
6894
g_slice_free (ContactsContactSetIndividualPropertyData, _data_);
6898
void contacts_contact_set_individual_property (ContactsContact* contact, const gchar* property_name, GValue* value, GAsyncReadyCallback _callback_, gpointer _user_data_) {
6899
ContactsContactSetIndividualPropertyData* _data_;
6900
ContactsContact* _tmp0_;
6901
ContactsContact* _tmp1_;
6902
const gchar* _tmp2_;
6905
GValue _tmp5_ = {0};
6906
_data_ = g_slice_new0 (ContactsContactSetIndividualPropertyData);
6907
_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, contacts_contact_set_individual_property);
6908
g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, contacts_contact_set_individual_property_data_free);
6910
_tmp1_ = _g_object_ref0 (_tmp0_);
6911
_g_object_unref0 (_data_->contact);
6912
_data_->contact = _tmp1_;
6913
_tmp2_ = property_name;
6914
_tmp3_ = g_strdup (_tmp2_);
6915
_g_free0 (_data_->property_name);
6916
_data_->property_name = _tmp3_;
6918
if (G_IS_VALUE (&_tmp4_)) {
6919
g_value_init (&_tmp5_, G_VALUE_TYPE (&_tmp4_));
6920
g_value_copy (&_tmp4_, &_tmp5_);
6924
G_IS_VALUE (&_data_->value) ? (g_value_unset (&_data_->value), NULL) : NULL;
6925
_data_->value = _tmp5_;
6926
contacts_contact_set_individual_property_co (_data_);
6930
FolksPersona* contacts_contact_set_individual_property_finish (GAsyncResult* _res_, GError** error) {
6931
FolksPersona* result;
6932
ContactsContactSetIndividualPropertyData* _data_;
6933
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
6936
_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
6937
result = _data_->result;
6938
_data_->result = NULL;
6943
static gboolean _vala_string_array_contains (gchar** stack, int stack_length, gchar* needle) {
6945
for (i = 0; i < stack_length; i++) {
6946
if (g_strcmp0 (stack[i], needle) == 0) {
6954
static void contacts_contact_set_individual_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
6955
ContactsContactSetIndividualPropertyData* _data_;
6956
_data_ = _user_data_;
6957
_data_->_source_object_ = source_object;
6958
_data_->_res_ = _res_;
6959
contacts_contact_set_individual_property_co (_data_);
6963
static gboolean contacts_contact_set_individual_property_co (ContactsContactSetIndividualPropertyData* _data_) {
6964
switch (_data_->_state_) {
6972
g_assert_not_reached ();
6975
_data_->did_set = FALSE;
6976
_data_->_tmp0_ = _data_->contact;
6977
_data_->_tmp1_ = _data_->_tmp0_->individual;
6978
_data_->_tmp2_ = folks_individual_get_personas (_data_->_tmp1_);
6979
_data_->_tmp3_ = _data_->_tmp2_;
6981
_data_->_tmp5_ = NULL;
6982
_data_->_tmp5_ = gee_collection_to_array ((GeeCollection*) _data_->_tmp3_, &_data_->_tmp4_);
6983
_data_->personas_copy = _data_->_tmp5_;
6984
_data_->personas_copy_length1 = _data_->_tmp4_;
6985
_data_->_personas_copy_size_ = _data_->personas_copy_length1;
6986
_data_->_tmp6_ = _data_->personas_copy;
6987
_data_->_tmp6__length1 = _data_->personas_copy_length1;
6989
_data_->p_collection_length1 = 0;
6990
_data_->_p_collection_size_ = 0;
6991
_data_->p_collection = _data_->_tmp6_;
6992
_data_->p_collection_length1 = _data_->_tmp6__length1;
6993
for (_data_->p_it = 0; _data_->p_it < _data_->_tmp6__length1; _data_->p_it = _data_->p_it + 1) {
6994
_data_->_tmp7_ = _g_object_ref0 (_data_->p_collection[_data_->p_it]);
6995
_data_->p = _data_->_tmp7_;
6997
_data_->_tmp8_ = _data_->property_name;
6998
_data_->_tmp9_ = _data_->p;
6999
_data_->_tmp10_ = folks_persona_get_writeable_properties (_data_->_tmp9_, &_data_->_tmp10__length1);
7000
_data_->_tmp11_ = _data_->_tmp10_;
7001
_data_->_tmp11__length1 = _data_->_tmp10__length1;
7002
if (_vala_string_array_contains (_data_->_tmp11_, _data_->_tmp11__length1, _data_->_tmp8_)) {
7003
_data_->did_set = TRUE;
7004
_data_->_tmp12_ = _data_->p;
7005
_data_->_tmp13_ = _data_->property_name;
7006
_data_->_tmp14_ = _data_->value;
7007
_data_->_state_ = 1;
7008
contacts_contact_set_persona_property (_data_->_tmp12_, _data_->_tmp13_, &_data_->_tmp14_, contacts_contact_set_individual_property_ready, _data_);
7011
contacts_contact_set_persona_property_finish (_data_->_res_, &_data_->_inner_error_);
7012
if (_data_->_inner_error_ != NULL) {
7013
g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7014
g_error_free (_data_->_inner_error_);
7015
_g_object_unref0 (_data_->p);
7016
_data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
7017
if (_data_->_state_ == 0) {
7018
g_simple_async_result_complete_in_idle (_data_->_async_result);
7020
g_simple_async_result_complete (_data_->_async_result);
7022
g_object_unref (_data_->_async_result);
7026
_g_object_unref0 (_data_->p);
7030
_data_->_tmp15_ = _data_->did_set;
7031
if (!_data_->_tmp15_) {
7032
_data_->_tmp16_ = _data_->contact;
7033
_data_->_tmp17_ = contacts_fake_persona_new (_data_->_tmp16_);
7034
_data_->fake = _data_->_tmp17_;
7035
_data_->_tmp18_ = _data_->fake;
7036
_data_->_tmp19_ = _data_->property_name;
7037
_data_->_tmp20_ = _data_->value;
7038
_data_->_state_ = 2;
7039
contacts_fake_persona_make_real_and_set (_data_->_tmp18_, _data_->_tmp19_, &_data_->_tmp20_, contacts_contact_set_individual_property_ready, _data_);
7042
_data_->_tmp21_ = NULL;
7043
_data_->_tmp21_ = contacts_fake_persona_make_real_and_set_finish (_data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
7044
_data_->_tmp22_ = _data_->_tmp21_;
7045
if (_data_->_inner_error_ != NULL) {
7046
g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
7047
g_error_free (_data_->_inner_error_);
7048
_g_object_unref0 (_data_->fake);
7049
_data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
7050
if (_data_->_state_ == 0) {
7051
g_simple_async_result_complete_in_idle (_data_->_async_result);
7053
g_simple_async_result_complete (_data_->_async_result);
7055
g_object_unref (_data_->_async_result);
7058
_data_->result = _data_->_tmp22_;
7059
_g_object_unref0 (_data_->fake);
7060
_data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
7061
if (_data_->_state_ == 0) {
7062
g_simple_async_result_complete_in_idle (_data_->_async_result);
7064
g_simple_async_result_complete (_data_->_async_result);
7066
g_object_unref (_data_->_async_result);
7069
_data_->result = NULL;
7070
_data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
7071
if (_data_->_state_ == 0) {
7072
g_simple_async_result_complete_in_idle (_data_->_async_result);
7074
g_simple_async_result_complete (_data_->_async_result);
7076
g_object_unref (_data_->_async_result);
7078
_data_->personas_copy = (_vala_array_free (_data_->personas_copy, _data_->personas_copy_length1, (GDestroyNotify) g_object_unref), NULL);
7079
if (_data_->_state_ == 0) {
7080
g_simple_async_result_complete_in_idle (_data_->_async_result);
7082
g_simple_async_result_complete (_data_->_async_result);
7084
g_object_unref (_data_->_async_result);
6712
7122
TpCapabilities* _tmp12_ = NULL;
6713
7123
TpCapabilities* caps;
6714
7124
TpCapabilities* _tmp13_;
6715
GPtrArray* _tmp14_ = NULL;
7125
gboolean _tmp14_ = FALSE;
6717
7126
_tmp9_ = t_persona;
6718
7127
_tmp10_ = tpf_persona_get_contact (_tmp9_);
6719
7128
_tmp11_ = _tmp10_;
6720
7129
_tmp12_ = tp_contact_get_capabilities (_tmp11_);
6721
7130
caps = _tmp12_;
6722
7131
_tmp13_ = caps;
6723
_tmp14_ = tp_capabilities_get_channel_classes (_tmp13_);
6724
classes = (GPtrArray*) _tmp14_;
6739
gconstpointer _tmp24_ = NULL;
6741
GValueArray* _tmp25_;
6743
GValueArray* _tmp27_;
6744
GValue* _tmp28_ = NULL;
6745
GValue fixed_prop_val;
6746
void* _tmp29_ = NULL;
6747
GHashTable* fixed_prop;
6748
GValueArray* _tmp30_;
6749
GValue* _tmp31_ = NULL;
6750
GValue allowed_prop_val;
6751
void* _tmp32_ = NULL;
6752
gchar** allowed_prop;
6753
gint allowed_prop_length1;
6754
gint _allowed_prop_size_;
6755
gboolean _tmp33_ = FALSE;
6756
GHashTable* _tmp34_;
6758
GHashTable* _tmp37_;
6759
gconstpointer _tmp38_ = NULL;
6760
const gchar* _tmp39_ = NULL;
6763
GHashTable* _tmp41_;
6764
gconstpointer _tmp42_ = NULL;
6768
const gchar* _tmp45_;
6778
_tmp20_ = g_ptr_array_get_length (_tmp19_);
6780
if (!(_tmp18_ < _tmp21_)) {
6785
_tmp24_ = g_ptr_array_index (_tmp22_, (guint) _tmp23_);
6786
clazz = (GValueArray*) _tmp24_;
6788
_tmp26_ = _tmp25_->n_values;
6789
if (_tmp26_ != ((guint) 2)) {
6793
_tmp28_ = g_value_array_get_nth (_tmp27_, (guint) 0);
6794
fixed_prop_val = *_tmp28_;
6795
_tmp29_ = g_value_get_boxed (&fixed_prop_val);
6796
fixed_prop = (GHashTable*) _tmp29_;
6798
_tmp31_ = g_value_array_get_nth (_tmp30_, (guint) 1);
6799
allowed_prop_val = *_tmp31_;
6800
_tmp32_ = g_value_get_boxed (&allowed_prop_val);
6801
allowed_prop = (gchar**) _tmp32_;
6802
allowed_prop_length1 = -1;
6803
_allowed_prop_size_ = allowed_prop_length1;
6804
_tmp34_ = fixed_prop;
6805
if (_tmp34_ == NULL) {
6809
gint _tmp35__length1;
6810
_tmp35_ = allowed_prop;
6811
_tmp35__length1 = allowed_prop_length1;
6812
_tmp33_ = _tmp35_ == NULL;
6818
_tmp37_ = fixed_prop;
6819
_tmp38_ = g_hash_table_lookup (_tmp37_, TP_PROP_CHANNEL_CHANNEL_TYPE);
6820
_tmp39_ = g_value_get_string ((GValue*) _tmp38_);
6821
_tmp40_ = g_strdup (_tmp39_);
6822
chan_type = _tmp40_;
6823
_tmp41_ = fixed_prop;
6824
_tmp42_ = g_hash_table_lookup (_tmp41_, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE);
6825
_tmp43_ = g_value_get_uint ((GValue*) _tmp42_);
6826
handle_type = _tmp43_;
6827
_tmp44_ = handle_type;
6828
if (_tmp44_ != ((guint) ((gint) TP_HANDLE_TYPE_CONTACT))) {
6829
_g_free0 (chan_type);
6832
_tmp45_ = chan_type;
6833
if (g_strcmp0 (_tmp45_, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA) == 0) {
6843
gint _tmp49__length1;
6845
const gchar* _tmp51_;
6847
gint _tmp52__length1;
6849
const gchar* _tmp54_;
6852
const gchar* _tmp56_;
6860
_tmp49_ = allowed_prop;
6861
_tmp49__length1 = allowed_prop_length1;
6863
_tmp51_ = _tmp49_[_tmp50_];
6864
if (!(_tmp51_ != NULL)) {
6867
_tmp52_ = allowed_prop;
6868
_tmp52__length1 = allowed_prop_length1;
6870
_tmp54_ = _tmp52_[_tmp53_];
6871
_tmp55_ = g_strdup (_tmp54_);
6874
if (g_strcmp0 (_tmp56_, TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO) == 0) {
6875
TpfPersona* _tmp57_;
6876
FolksPersonaStore* _tmp58_;
6877
FolksPersonaStore* _tmp59_;
6881
_tmp57_ = t_persona;
6882
_tmp58_ = folks_persona_get_store ((FolksPersona*) _tmp57_);
6884
_tmp60_ = tpf_persona_store_get_account (TPF_IS_PERSONA_STORE (_tmp59_) ? ((TpfPersonaStore*) _tmp59_) : NULL);
6886
_tmp62_ = _g_object_ref0 (_tmp61_);
6889
_g_free0 (chan_type);
6890
_g_object_unref0 (t_persona);
6898
_g_free0 (chan_type);
7132
_tmp14_ = tp_capabilities_supports_audio_call (_tmp13_, TP_HANDLE_TYPE_CONTACT);
7134
TpfPersona* _tmp15_;
7135
FolksPersonaStore* _tmp16_;
7136
FolksPersonaStore* _tmp17_;
7140
_tmp15_ = t_persona;
7141
_tmp16_ = folks_persona_get_store ((FolksPersona*) _tmp15_);
7143
_tmp18_ = tpf_persona_store_get_account (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, TPF_TYPE_PERSONA_STORE) ? ((TpfPersonaStore*) _tmp17_) : NULL);
7145
_tmp20_ = _g_object_ref0 (_tmp19_);
7147
_g_object_unref0 (t_persona);
7893
8108
GtkWidget* _tmp6_;
7894
8109
g_return_if_fail (self != NULL);
7895
8110
g_return_if_fail (w != NULL);
7896
_data12_ = g_slice_new0 (Block12Data);
7897
_data12_->_ref_count_ = 1;
7898
_data12_->self = g_object_ref (self);
8111
_data3_ = g_slice_new0 (Block3Data);
8112
_data3_->_ref_count_ = 1;
8113
_data3_->self = g_object_ref (self);
7900
8115
_tmp1_ = _g_object_ref0 (_tmp0_);
7901
_data12_->w = _tmp1_;
8116
_g_object_unref0 (_data3_->w);
8117
_data3_->w = _tmp1_;
7902
8118
_tmp2_ = callback;
7903
8119
_tmp2__target = callback_target;
7904
_data12_->callback = _tmp2_;
7905
_data12_->callback_target = _tmp2__target;
7906
_tmp3_ = _data12_->callback;
7907
_tmp3__target = _data12_->callback_target;
7908
_tmp4_ = _data12_->w;
8120
_data3_->callback = _tmp2_;
8121
_data3_->callback_target = _tmp2__target;
8122
_tmp3_ = _data3_->callback;
8123
_tmp3__target = _data3_->callback_target;
8124
_tmp4_ = _data3_->w;
7909
8125
_tmp3_ (_tmp4_, _tmp3__target);
7910
_tmp5_ = g_signal_connect_data (self, "changed", (GCallback) ___lambda9__contacts_contact_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
7911
_data12_->id = _tmp5_;
7912
_tmp6_ = _data12_->w;
7913
g_signal_connect_data (_tmp6_, "destroy", (GCallback) ___lambda10__gtk_widget_destroy, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
7914
block12_data_unref (_data12_);
8126
_tmp5_ = g_signal_connect_data (self, "changed", (GCallback) ___lambda17__contacts_contact_changed, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
8127
_data3_->id = _tmp5_;
8128
_tmp6_ = _data3_->w;
8129
g_signal_connect_data (_tmp6_, "destroy", (GCallback) ___lambda18__gtk_widget_destroy, block3_data_ref (_data3_), (GClosureNotify) block3_data_unref, 0);
8130
block3_data_unref (_data3_);
8135
void contacts_contact_fetch_contact_info (ContactsContact* self) {
8136
g_return_if_fail (self != NULL);
8138
FolksIndividual* _tmp0_;
8141
GeeIterator* _tmp3_ = NULL;
8143
_tmp0_ = self->individual;
8144
_tmp1_ = folks_individual_get_personas (_tmp0_);
8146
_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
8149
GeeIterator* _tmp4_;
8150
gboolean _tmp5_ = FALSE;
8151
GeeIterator* _tmp6_;
8152
gpointer _tmp7_ = NULL;
8154
FolksPersona* _tmp8_;
8157
TpfPersona* _tmp10_;
8159
_tmp5_ = gee_iterator_next (_tmp4_);
8164
_tmp7_ = gee_iterator_get (_tmp6_);
8165
p = (FolksPersona*) _tmp7_;
8167
_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, TPF_TYPE_PERSONA) ? ((TpfPersona*) _tmp8_) : NULL);
8170
if (_tmp10_ != NULL) {
8171
TpfPersona* _tmp11_;
8175
_tmp12_ = tpf_persona_get_contact (_tmp11_);
8177
tp_contact_request_contact_info_async (_tmp13_, NULL, NULL, NULL);
8179
_g_object_unref0 (tp);
8180
_g_object_unref0 (p);
8182
_g_object_unref0 (_p_it);
8226
GIcon* contacts_contact_get_serializable_avatar_icon (ContactsContact* self) {
8228
gboolean _tmp0_ = FALSE;
8229
FolksIndividual* _tmp1_;
8230
GLoadableIcon* _tmp2_;
8231
GLoadableIcon* _tmp3_;
8233
g_return_val_if_fail (self != NULL, NULL);
8234
_tmp1_ = self->individual;
8235
_tmp2_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp1_);
8237
if (_tmp3_ != NULL) {
8238
FolksIndividual* _tmp4_;
8239
GLoadableIcon* _tmp5_;
8240
GLoadableIcon* _tmp6_;
8241
gchar* _tmp7_ = NULL;
8243
_tmp4_ = self->individual;
8244
_tmp5_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp4_);
8246
_tmp7_ = g_icon_to_string ((GIcon*) _tmp6_);
8248
_tmp0_ = _tmp8_ != NULL;
8255
FolksIndividual* _tmp10_;
8256
GLoadableIcon* _tmp11_;
8257
GLoadableIcon* _tmp12_;
8258
_tmp10_ = self->individual;
8259
_tmp11_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp10_);
8261
result = (GIcon*) _tmp12_;
8269
GVariant* contacts_contact_get_avatar_icon_data (ContactsContact* self) {
8271
FolksIndividual* _tmp0_;
8272
GLoadableIcon* _tmp1_;
8273
GLoadableIcon* _tmp2_;
8274
FolksIndividual* _tmp3_;
8275
GLoadableIcon* _tmp4_;
8276
GLoadableIcon* _tmp5_;
8277
gchar* _tmp6_ = NULL;
8282
g_return_val_if_fail (self != NULL, NULL);
8283
_tmp0_ = self->individual;
8284
_tmp1_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp0_);
8286
if (_tmp2_ == NULL) {
8290
_tmp3_ = self->individual;
8291
_tmp4_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp3_);
8293
_tmp6_ = g_icon_to_string ((GIcon*) _tmp5_);
8295
_tmp8_ = _tmp7_ != NULL;
8301
_tmp9_ = self->priv->_avatar_icon_data;
8302
if (_tmp9_ == NULL) {
8305
const GVariantType* _tmp12_;
8309
guint8* _tmp16_ = NULL;
8313
GVariant* _tmp20_ = NULL;
8314
GVariant* pixel_data;
8326
gboolean _tmp32_ = FALSE;
8335
_tmp10_ = contacts_contact_get_small_avatar (self);
8337
if (_tmp11_ == NULL) {
8341
_tmp12_ = G_VARIANT_TYPE_BYTESTRING;
8342
_tmp13_ = contacts_contact_get_small_avatar (self);
8344
_tmp16_ = gdk_pixbuf_get_pixels_with_length (_tmp14_, &_tmp15_);
8345
_tmp17_ = contacts_contact_get_small_avatar (self);
8347
_tmp19_ = _g_object_ref0 (_tmp18_);
8348
_tmp20_ = g_variant_new_from_data (_tmp12_, _tmp16_, _tmp15_, TRUE, g_object_unref, _tmp19_);
8349
g_variant_ref_sink (_tmp20_);
8350
pixel_data = _tmp20_;
8351
_tmp21_ = contacts_contact_get_small_avatar (self);
8353
_tmp23_ = gdk_pixbuf_get_width (_tmp22_);
8354
_tmp24_ = contacts_contact_get_small_avatar (self);
8356
_tmp26_ = gdk_pixbuf_get_height (_tmp25_);
8357
_tmp27_ = contacts_contact_get_small_avatar (self);
8359
_tmp29_ = gdk_pixbuf_get_rowstride (_tmp28_);
8360
_tmp30_ = contacts_contact_get_small_avatar (self);
8362
_tmp32_ = gdk_pixbuf_get_has_alpha (_tmp31_);
8363
_tmp33_ = contacts_contact_get_small_avatar (self);
8365
_tmp35_ = gdk_pixbuf_get_bits_per_sample (_tmp34_);
8366
_tmp36_ = contacts_contact_get_small_avatar (self);
8368
_tmp38_ = gdk_pixbuf_get_n_channels (_tmp37_);
8369
_tmp39_ = pixel_data;
8370
_tmp40_ = g_variant_new ("(iiibii@ay)", _tmp23_, _tmp26_, _tmp29_, _tmp32_, _tmp35_, _tmp38_, _tmp39_, NULL);
8371
g_variant_ref_sink (_tmp40_);
8372
_g_variant_unref0 (self->priv->_avatar_icon_data);
8373
self->priv->_avatar_icon_data = _tmp40_;
8374
_g_variant_unref0 (pixel_data);
8376
_tmp41_ = self->priv->_avatar_icon_data;
7958
8382
const gchar* contacts_contact_get_display_name (ContactsContact* self) {
7959
8383
const gchar* result;
7960
8384
FolksIndividual* _tmp0_;