931
gboolean contacts_view_is_first (ContactsView* self, GtkTreeIter* iter) {
932
gboolean result = FALSE;
933
ContactsViewContactData* data = NULL;
934
GtkListStore* _tmp0_;
936
ContactsViewContactData* _tmp2_;
937
g_return_val_if_fail (self != NULL, FALSE);
938
g_return_val_if_fail (iter != NULL, FALSE);
939
_tmp0_ = self->priv->list_store;
941
gtk_tree_model_get ((GtkTreeModel*) _tmp0_, &_tmp1_, 1, &data, -1);
943
if (_tmp2_ != NULL) {
944
ContactsViewContactData* _tmp3_;
947
_tmp4_ = _tmp3_->is_first;
956
static gpointer _contacts_view_contact_data_ref0 (gpointer self) {
957
return self ? contacts_view_contact_data_ref (self) : NULL;
961
static ContactsViewContactData* contacts_view_get_previous (ContactsView* self, ContactsViewContactData* data) {
962
ContactsViewContactData* result = NULL;
963
ContactsViewContactData* previous;
964
ContactsViewContactData* _tmp0_;
967
GtkListStore* _tmp2_;
968
gboolean _tmp3_ = FALSE;
969
ContactsViewContactData* _tmp6_;
970
ContactsViewContactData* _tmp7_;
971
g_return_val_if_fail (self != NULL, NULL);
972
g_return_val_if_fail (data != NULL, NULL);
975
_tmp1_ = _tmp0_->iter;
977
_tmp2_ = self->priv->list_store;
978
_tmp3_ = gtk_tree_model_iter_previous ((GtkTreeModel*) _tmp2_, &iter);
980
GtkListStore* _tmp4_;
982
_tmp4_ = self->priv->list_store;
984
gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 1, &previous, -1);
987
_tmp7_ = _contacts_view_contact_data_ref0 (_tmp6_);
993
static ContactsViewContactData* contacts_view_get_next (ContactsView* self, ContactsViewContactData* data) {
994
ContactsViewContactData* result = NULL;
995
ContactsViewContactData* next;
996
ContactsViewContactData* _tmp0_;
999
GtkListStore* _tmp2_;
1000
gboolean _tmp3_ = FALSE;
1001
ContactsViewContactData* _tmp6_;
1002
ContactsViewContactData* _tmp7_;
1003
g_return_val_if_fail (self != NULL, NULL);
1004
g_return_val_if_fail (data != NULL, NULL);
1007
_tmp1_ = _tmp0_->iter;
1009
_tmp2_ = self->priv->list_store;
1010
_tmp3_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp2_, &iter);
1012
GtkListStore* _tmp4_;
1014
_tmp4_ = self->priv->list_store;
1016
gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 1, &next, -1);
1019
_tmp7_ = _contacts_view_contact_data_ref0 (_tmp6_);
1025
static void contacts_view_row_changed_no_resort (ContactsView* self, ContactsViewContactData* data) {
1026
GtkListStore* _tmp0_;
1027
ContactsViewContactData* _tmp1_;
1029
GtkTreePath* _tmp3_ = NULL;
1031
GtkListStore* _tmp4_;
1032
ContactsViewContactData* _tmp5_;
1034
g_return_if_fail (self != NULL);
1035
g_return_if_fail (data != NULL);
1036
_tmp0_ = self->priv->list_store;
1038
_tmp2_ = _tmp1_->iter;
1039
_tmp3_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp0_, &_tmp2_);
1041
_tmp4_ = self->priv->list_store;
1043
_tmp6_ = _tmp5_->iter;
1044
gtk_tree_model_row_changed ((GtkTreeModel*) _tmp4_, path, &_tmp6_);
1045
_gtk_tree_path_free0 (path);
1049
static void contacts_view_row_changed_resort (ContactsView* self, ContactsViewContactData* data) {
1050
GtkListStore* _tmp0_;
1051
ContactsViewContactData* _tmp1_;
786
static void contacts_view_update_data (ContactsView* self, ContactsViewContactData* data) {
787
ContactsViewContactData* _tmp0_;
788
ContactsContact* _tmp1_;
789
ContactsContact* _tmp2_;
1053
791
ContactsViewContactData* _tmp3_;
1054
ContactsContact* _tmp4_;
1055
g_return_if_fail (self != NULL);
1056
g_return_if_fail (data != NULL);
1057
_tmp0_ = self->priv->list_store;
1059
_tmp2_ = _tmp1_->iter;
1061
_tmp4_ = _tmp3_->contact;
1062
gtk_list_store_set (_tmp0_, &_tmp2_, 0, _tmp4_, -1);
1066
static gboolean contacts_view_update_is_first (ContactsView* self, ContactsViewContactData* data, ContactsViewContactData* previous) {
1067
gboolean result = FALSE;
1068
ContactsViewContactData* _tmp0_;
1070
gboolean old_is_first;
1071
ContactsViewContactData* _tmp2_;
1074
gboolean _tmp4_ = FALSE;
1075
ContactsViewContactData* _tmp5_;
1077
gboolean previous_is_custom;
1080
ContactsViewContactData* _tmp28_;
1082
g_return_val_if_fail (self != NULL, FALSE);
1083
g_return_val_if_fail (data != NULL, FALSE);
1085
_tmp1_ = _tmp0_->is_first;
1086
old_is_first = _tmp1_;
1088
_tmp3_ = _tmp2_->sort_prio;
1089
is_custom = _tmp3_ != 0;
1091
if (_tmp5_ != NULL) {
1092
ContactsViewContactData* _tmp6_;
1095
_tmp7_ = _tmp6_->sort_prio;
1096
_tmp4_ = _tmp7_ != 0;
1101
previous_is_custom = _tmp8_;
1104
ContactsViewContactData* _tmp10_;
1106
_tmp10_->is_first = FALSE;
1108
gboolean _tmp11_ = FALSE;
1109
ContactsViewContactData* _tmp12_;
1112
if (_tmp12_ != NULL) {
1114
_tmp13_ = previous_is_custom;
1121
ContactsViewContactData* _tmp15_;
1122
ContactsContact* _tmp16_;
1125
gunichar previous_initial;
1126
ContactsViewContactData* _tmp19_;
1127
ContactsContact* _tmp20_;
1131
ContactsViewContactData* _tmp23_;
1135
_tmp16_ = _tmp15_->contact;
1136
_tmp17_ = contacts_contact_get_initial_letter (_tmp16_);
1138
previous_initial = _tmp18_;
1140
_tmp20_ = _tmp19_->contact;
1141
_tmp21_ = contacts_contact_get_initial_letter (_tmp20_);
1145
_tmp24_ = previous_initial;
1147
_tmp23_->is_first = _tmp24_ != _tmp25_;
1149
ContactsViewContactData* _tmp26_;
1151
_tmp26_->is_first = TRUE;
1154
_tmp27_ = old_is_first;
1156
_tmp29_ = _tmp28_->is_first;
1157
if (_tmp27_ != _tmp29_) {
1158
ContactsViewContactData* _tmp30_;
1160
contacts_view_row_changed_no_resort (self, _tmp30_);
1169
static void contacts_view_add_custom_headers (ContactsView* self) {
1170
ContactsViewContactData* _tmp0_;
1171
GtkListStore* _tmp1_;
1172
ContactsViewContactData* _tmp2_;
1173
GtkTreeIter _tmp3_ = {0};
1174
GtkListStore* _tmp4_;
1175
ContactsViewContactData* _tmp5_;
1177
795
ContactsViewContactData* _tmp7_;
1178
ContactsViewContactData* _tmp8_;
1179
GtkListStore* _tmp9_;
1180
798
ContactsViewContactData* _tmp10_;
1181
GtkTreeIter _tmp11_ = {0};
1182
GtkListStore* _tmp12_;
1183
ContactsViewContactData* _tmp13_;
1184
GtkTreeIter _tmp14_;
1185
ContactsViewContactData* _tmp15_;
1186
g_return_if_fail (self != NULL);
1187
_tmp0_ = self->priv->suggestions_header_data;
1188
_tmp0_->visible = TRUE;
1189
_tmp1_ = self->priv->list_store;
1190
_tmp2_ = self->priv->suggestions_header_data;
1191
gtk_list_store_append (_tmp1_, &_tmp3_);
1192
_tmp2_->iter = _tmp3_;
1193
_tmp4_ = self->priv->list_store;
1194
_tmp5_ = self->priv->suggestions_header_data;
1195
_tmp6_ = _tmp5_->iter;
1196
_tmp7_ = self->priv->suggestions_header_data;
1197
gtk_list_store_set (_tmp4_, &_tmp6_, 1, _tmp7_, -1);
1198
_tmp8_ = self->priv->padding_data;
1199
_tmp8_->visible = TRUE;
1200
_tmp9_ = self->priv->list_store;
1201
_tmp10_ = self->priv->padding_data;
1202
gtk_list_store_append (_tmp9_, &_tmp11_);
1203
_tmp10_->iter = _tmp11_;
1204
_tmp12_ = self->priv->list_store;
1205
_tmp13_ = self->priv->padding_data;
1206
_tmp14_ = _tmp13_->iter;
1207
_tmp15_ = self->priv->padding_data;
1208
gtk_list_store_set (_tmp12_, &_tmp14_, 1, _tmp15_, -1);
1212
static void contacts_view_remove_custom_headers (ContactsView* self) {
1213
ContactsViewContactData* _tmp0_;
1214
GtkListStore* _tmp1_;
1215
ContactsViewContactData* _tmp2_;
1217
ContactsViewContactData* _tmp4_;
1218
GtkListStore* _tmp5_;
1219
ContactsViewContactData* _tmp6_;
1221
g_return_if_fail (self != NULL);
1222
_tmp0_ = self->priv->suggestions_header_data;
1223
_tmp0_->visible = FALSE;
1224
_tmp1_ = self->priv->list_store;
1225
_tmp2_ = self->priv->suggestions_header_data;
1226
_tmp3_ = _tmp2_->iter;
1227
gtk_list_store_remove (_tmp1_, &_tmp3_);
1228
_tmp4_ = self->priv->padding_data;
1229
_tmp4_->visible = FALSE;
1230
_tmp5_ = self->priv->list_store;
1231
_tmp6_ = self->priv->padding_data;
1232
_tmp7_ = _tmp6_->iter;
1233
gtk_list_store_remove (_tmp5_, &_tmp7_);
1237
static void contacts_view_add_to_model (ContactsView* self, ContactsViewContactData* data) {
1238
GtkListStore* _tmp0_;
1239
ContactsViewContactData* _tmp1_;
1240
GtkTreeIter _tmp2_ = {0};
1241
GtkListStore* _tmp3_;
1242
ContactsViewContactData* _tmp4_;
1244
ContactsViewContactData* _tmp6_;
1245
ContactsContact* _tmp7_;
1246
ContactsViewContactData* _tmp8_;
1247
ContactsViewContactData* _tmp9_;
1249
gboolean _tmp12_ = FALSE;
1250
ContactsViewContactData* _tmp13_;
799
gboolean _tmp11_ = FALSE;
800
ContactsViewContactData* _tmp12_;
1251
802
ContactsViewContactData* _tmp14_;
1252
ContactsViewContactData* _tmp15_ = NULL;
1253
ContactsViewContactData* _tmp16_;
1254
gboolean _tmp17_ = FALSE;
803
const gchar* _tmp15_;
804
gchar* _tmp16_ = NULL;
806
ContactsViewContactData* _tmp18_;
807
ContactsContactFrame* _tmp19_;
808
FolksIndividual* _tmp20_;
1257
809
g_return_if_fail (self != NULL);
1258
810
g_return_if_fail (data != NULL);
1259
_tmp0_ = self->priv->list_store;
1261
gtk_list_store_append (_tmp0_, &_tmp2_);
1262
_tmp1_->iter = _tmp2_;
1263
_tmp3_ = self->priv->list_store;
1265
_tmp5_ = _tmp4_->iter;
1267
_tmp7_ = _tmp6_->contact;
1269
gtk_list_store_set (_tmp3_, &_tmp5_, 0, _tmp7_, 1, _tmp8_, -1);
1271
_tmp10_ = _tmp9_->sort_prio;
1274
_tmp11_ = self->priv->custom_visible_count;
1275
self->priv->custom_visible_count = _tmp11_ + 1;
1277
contacts_view_add_custom_headers (self);
812
_tmp1_ = _tmp0_->contact;
813
_tmp2_ = _g_object_ref0 (_tmp1_);
816
_tmp4_ = contacts_contact_get_display_name (c);
818
_tmp6_ = g_strdup (_tmp5_);
819
_g_free0 (_tmp3_->display_name);
820
_tmp3_->display_name = _tmp6_;
822
_tmp8_ = contacts_contact_get_initial_letter (c);
824
_tmp7_->initial_letter = _tmp9_;
826
_tmp11_ = contacts_view_calculate_filtered (self, c);
827
_tmp10_->filtered = _tmp11_;
829
_tmp13_ = _tmp12_->label;
1282
_tmp15_ = contacts_view_get_previous (self, _tmp14_);
1284
_tmp17_ = contacts_view_update_is_first (self, _tmp13_, _tmp16_);
1286
_contacts_view_contact_data_unref0 (_tmp16_);
1288
ContactsViewContactData* _tmp19_;
1291
_tmp20_ = _tmp19_->is_first;
1298
ContactsViewContactData* _tmp22_;
1299
ContactsViewContactData* _tmp23_ = NULL;
1300
ContactsViewContactData* next;
1301
ContactsViewContactData* _tmp24_;
1303
_tmp23_ = contacts_view_get_next (self, _tmp22_);
1306
if (_tmp24_ != NULL) {
1307
ContactsViewContactData* _tmp25_;
1308
ContactsViewContactData* _tmp26_;
1311
contacts_view_update_is_first (self, _tmp25_, _tmp26_);
1313
_contacts_view_contact_data_unref0 (next);
1318
static void contacts_view_remove_from_model (ContactsView* self, ContactsViewContactData* data) {
1319
ContactsViewContactData* _tmp0_;
1321
ContactsViewContactData* next;
1322
ContactsViewContactData* _tmp3_;
1324
GtkListStore* _tmp7_;
1325
ContactsViewContactData* _tmp8_;
1327
ContactsViewContactData* _tmp10_;
1328
ContactsViewContactData* _tmp11_;
1329
g_return_if_fail (self != NULL);
1330
g_return_if_fail (data != NULL);
1332
_tmp1_ = _tmp0_->sort_prio;
1335
_tmp2_ = self->priv->custom_visible_count;
1336
self->priv->custom_visible_count = _tmp2_ - 1;
1338
contacts_view_remove_custom_headers (self);
1343
_tmp4_ = _tmp3_->is_first;
1345
ContactsViewContactData* _tmp5_;
1346
ContactsViewContactData* _tmp6_ = NULL;
1348
_tmp6_ = contacts_view_get_next (self, _tmp5_);
1349
_contacts_view_contact_data_unref0 (next);
1352
_tmp7_ = self->priv->list_store;
1354
_tmp9_ = _tmp8_->iter;
1355
gtk_list_store_remove (_tmp7_, &_tmp9_);
1357
_tmp10_->is_first = FALSE;
1359
if (_tmp11_ != NULL) {
1360
ContactsViewContactData* _tmp12_;
1361
ContactsViewContactData* _tmp13_;
1362
ContactsViewContactData* _tmp14_ = NULL;
1363
ContactsViewContactData* _tmp15_;
1366
_tmp14_ = contacts_view_get_previous (self, _tmp13_);
1368
contacts_view_update_is_first (self, _tmp12_, _tmp15_);
1369
_contacts_view_contact_data_unref0 (_tmp15_);
1371
_contacts_view_contact_data_unref0 (next);
1375
static void contacts_view_update_visible (ContactsView* self, ContactsViewContactData* data) {
1376
ContactsViewContactData* _tmp0_;
1378
gboolean was_visible;
1379
ContactsViewContactData* _tmp2_;
1380
ContactsViewContactData* _tmp3_;
1381
ContactsContact* _tmp4_;
1382
gboolean _tmp5_ = FALSE;
1383
gboolean _tmp6_ = FALSE;
1386
gboolean _tmp12_ = FALSE;
1389
g_return_if_fail (self != NULL);
1390
g_return_if_fail (data != NULL);
1392
_tmp1_ = _tmp0_->visible;
1393
was_visible = _tmp1_;
1396
_tmp4_ = _tmp3_->contact;
1397
_tmp5_ = contacts_view_apply_filter (self, _tmp4_);
1398
_tmp2_->visible = _tmp5_;
1399
_tmp7_ = was_visible;
1401
ContactsViewContactData* _tmp8_;
1404
_tmp9_ = _tmp8_->visible;
1411
ContactsViewContactData* _tmp11_;
1413
contacts_view_remove_from_model (self, _tmp11_);
1415
_tmp13_ = was_visible;
1417
ContactsViewContactData* _tmp14_;
1420
_tmp15_ = _tmp14_->visible;
1427
ContactsViewContactData* _tmp17_;
1429
contacts_view_add_to_model (self, _tmp17_);
1434
static void contacts_view_refilter (ContactsView* self) {
831
_tmp15_ = _tmp14_->display_name;
832
_tmp16_ = g_markup_printf_escaped ("<span font='16px'>%s</span>", _tmp15_);
834
gtk_label_set_markup (_tmp13_, _tmp17_);
837
_tmp19_ = _tmp18_->image_frame;
838
_tmp20_ = c->individual;
839
contacts_contact_frame_set_image (_tmp19_, (FolksAvatarDetails*) _tmp20_, c);
840
_g_object_unref0 (c);
844
static void contacts_view_update_all_filtered (ContactsView* self) {
1435
845
g_return_if_fail (self != NULL);
1437
ContactsStore* _tmp0_;
1438
GeeCollection* _tmp1_ = NULL;
848
GeeCollection* _tmp1_;
1439
849
GeeCollection* _tmp2_;
1440
GeeIterator* _tmp3_ = NULL;
1441
GeeIterator* _tmp4_;
1443
_tmp0_ = self->priv->contacts_store;
1444
_tmp1_ = contacts_store_get_contacts (_tmp0_);
850
GeeCollection* _tmp3_;
851
GeeIterator* _tmp4_ = NULL;
853
GeeIterator* _data_it;
854
_tmp0_ = self->priv->contacts;
855
_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
1445
856
_tmp2_ = _tmp1_;
1446
_tmp3_ = gee_iterable_iterator ((GeeIterable*) _tmp2_);
1448
_g_object_unref0 (_tmp2_);
858
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
860
_g_object_unref0 (_tmp3_);
1451
GeeIterator* _tmp5_;
1452
gboolean _tmp6_ = FALSE;
1453
GeeIterator* _tmp7_;
1454
gpointer _tmp8_ = NULL;
1456
ContactsContact* _tmp9_;
1457
ContactsViewContactData* _tmp10_ = NULL;
864
gboolean _tmp7_ = FALSE;
866
gpointer _tmp9_ = NULL;
867
ContactsViewContactData* data;
868
ContactsViewContactData* _tmp10_;
1458
869
ContactsViewContactData* _tmp11_;
1460
_tmp6_ = gee_iterator_next (_tmp5_);
870
ContactsContact* _tmp12_;
871
gboolean _tmp13_ = FALSE;
873
_tmp7_ = gee_iterator_next (_tmp6_);
1465
_tmp8_ = gee_iterator_get (_tmp7_);
1466
c = (ContactsContact*) _tmp8_;
1468
_tmp10_ = contacts_view_lookup_data (self, _tmp9_);
1470
contacts_view_update_visible (self, _tmp11_);
1471
_contacts_view_contact_data_unref0 (_tmp11_);
1472
_g_object_unref0 (c);
878
_tmp9_ = gee_iterator_get (_tmp8_);
879
data = (ContactsViewContactData*) _tmp9_;
882
_tmp12_ = _tmp11_->contact;
883
_tmp13_ = contacts_view_calculate_filtered (self, _tmp12_);
884
_tmp10_->filtered = _tmp13_;
885
_contacts_view_contact_data_unref0 (data);
1474
_g_object_unref0 (_c_it);
1479
void contacts_view_hide_contact (ContactsView* self, ContactsContact* contact) {
1481
ContactsContact* _tmp1_;
1482
g_return_if_fail (self != NULL);
1483
g_return_if_fail (contact != NULL);
1484
_tmp0_ = self->priv->hidden_contacts;
1486
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, _tmp1_);
1487
contacts_view_refilter (self);
1491
static gchar** _vala_array_dup4 (gchar** self, int length) {
1494
result = g_new0 (gchar*, length + 1);
1495
for (i = 0; i < length; i++) {
1497
_tmp0_ = g_strdup (self[i]);
1504
void contacts_view_set_filter_values (ContactsView* self, gchar** values, int values_length1) {
1506
gint _tmp0__length1;
1508
gint _tmp1__length1;
1509
g_return_if_fail (self != NULL);
1511
_tmp0__length1 = values_length1;
1512
_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup4 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
1513
_tmp1__length1 = _tmp0__length1;
1514
self->priv->filter_values = (_vala_array_free (self->priv->filter_values, self->priv->filter_values_length1, (GDestroyNotify) g_free), NULL);
1515
self->priv->filter_values = _tmp1_;
1516
self->priv->filter_values_length1 = _tmp1__length1;
1517
self->priv->_filter_values_size_ = self->priv->filter_values_length1;
1518
contacts_view_refilter (self);
887
_g_object_unref0 (_data_it);
1522
892
static void contacts_view_contact_changed_cb (ContactsView* self, ContactsStore* store, ContactsContact* c) {
1523
ContactsContact* _tmp0_;
1524
ContactsViewContactData* _tmp1_ = NULL;
894
ContactsContact* _tmp1_;
895
gpointer _tmp2_ = NULL;
1525
896
ContactsViewContactData* data;
1526
ContactsViewContactData* _tmp2_;
1528
gboolean was_visible;
1529
ContactsViewContactData* next;
1530
ContactsViewContactData* _tmp4_;
1532
ContactsViewContactData* _tmp8_;
1533
gboolean _tmp9_ = FALSE;
1536
898
g_return_if_fail (self != NULL);
1537
899
g_return_if_fail (store != NULL);
1538
900
g_return_if_fail (c != NULL);
1540
_tmp1_ = contacts_view_lookup_data (self, _tmp0_);
1543
_tmp3_ = _tmp2_->visible;
1544
was_visible = _tmp3_;
1547
_tmp5_ = _tmp4_->visible;
1549
ContactsViewContactData* _tmp6_;
1550
ContactsViewContactData* _tmp7_ = NULL;
1552
_tmp7_ = contacts_view_get_next (self, _tmp6_);
1553
_contacts_view_contact_data_unref0 (next);
901
_tmp0_ = self->priv->contacts;
903
_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
904
data = (ContactsViewContactData*) _tmp2_;
905
contacts_view_update_data (self, data);
907
egg_list_box_child_changed ((EggListBox*) self, (GtkWidget*) _tmp3_);
908
_contacts_view_contact_data_unref0 (data);
912
static Block36Data* block36_data_ref (Block36Data* _data36_) {
913
g_atomic_int_inc (&_data36_->_ref_count_);
918
static void block36_data_unref (void * _userdata_) {
919
Block36Data* _data36_;
920
_data36_ = (Block36Data*) _userdata_;
921
if (g_atomic_int_dec_and_test (&_data36_->_ref_count_)) {
923
self = _data36_->self;
924
_contacts_view_contact_data_unref0 (_data36_->data);
925
_g_object_unref0 (self);
926
g_slice_free (Block36Data, _data36_);
1557
contacts_view_update_visible (self, _tmp8_);
1558
_tmp10_ = was_visible;
1560
ContactsViewContactData* _tmp11_;
1563
_tmp12_ = _tmp11_->visible;
931
static void __lambda24_ (Block36Data* _data36_) {
933
ContactsViewContactData* _tmp0_;
934
GtkCheckButton* _tmp1_;
938
self = _data36_->self;
939
_tmp0_ = _data36_->data;
940
_tmp1_ = _tmp0_->selector_button;
941
_tmp2_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp1_);
945
_tmp4_ = self->priv->nr_contacts_marked;
946
self->priv->nr_contacts_marked = _tmp4_ + 1;
1570
ContactsViewContactData* _tmp14_;
1571
ContactsViewContactData* _tmp15_;
1572
ContactsViewContactData* _tmp20_;
1573
ContactsViewContactData* _tmp21_ = NULL;
1574
ContactsViewContactData* _tmp22_;
1576
contacts_view_row_changed_resort (self, _tmp14_);
1578
if (_tmp15_ != NULL) {
1579
ContactsViewContactData* _tmp16_;
1580
ContactsViewContactData* _tmp17_;
1581
ContactsViewContactData* _tmp18_ = NULL;
1582
ContactsViewContactData* _tmp19_;
1585
_tmp18_ = contacts_view_get_previous (self, _tmp17_);
1587
contacts_view_update_is_first (self, _tmp16_, _tmp19_);
1588
_contacts_view_contact_data_unref0 (_tmp19_);
1591
_tmp21_ = contacts_view_get_next (self, _tmp20_);
1592
_contacts_view_contact_data_unref0 (next);
1595
if (_tmp22_ != NULL) {
1596
ContactsViewContactData* _tmp23_;
1597
ContactsViewContactData* _tmp24_;
1600
contacts_view_update_is_first (self, _tmp23_, _tmp24_);
1603
_contacts_view_contact_data_unref0 (next);
1604
_contacts_view_contact_data_unref0 (data);
949
_tmp5_ = self->priv->nr_contacts_marked;
950
self->priv->nr_contacts_marked = _tmp5_ - 1;
952
_tmp6_ = self->priv->nr_contacts_marked;
953
g_signal_emit_by_name (self, "contacts-marked", _tmp6_);
1608
static ContactsViewContactData* contacts_view_lookup_data (ContactsView* self, ContactsContact* c) {
1609
ContactsViewContactData* result = NULL;
1610
ContactsContact* _tmp0_;
1611
gconstpointer _tmp1_ = NULL;
1612
ContactsViewContactData* _tmp2_;
1613
g_return_val_if_fail (self != NULL, NULL);
1614
g_return_val_if_fail (c != NULL, NULL);
1616
_tmp1_ = contacts_contact_lookup (_tmp0_, CONTACTS_VIEW_TYPE_CONTACT_DATA, (GBoxedCopyFunc) contacts_view_contact_data_ref, contacts_view_contact_data_unref, self);
1617
_tmp2_ = _contacts_view_contact_data_ref0 ((ContactsViewContactData*) _tmp1_);
957
static void ___lambda24__gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) {
1623
962
static void contacts_view_contact_added_cb (ContactsView* self, ContactsStore* store, ContactsContact* c) {
963
Block36Data* _data36_;
1624
964
ContactsViewContactData* _tmp0_;
1625
ContactsViewContactData* data;
1626
ContactsContact* _tmp1_;
965
ContactsViewContactData* _tmp1_;
1627
966
ContactsContact* _tmp2_;
1628
967
ContactsContact* _tmp3_;
1629
968
ContactsViewContactData* _tmp4_;
970
ContactsViewContactData* _tmp6_;
972
ContactsViewContactData* _tmp8_;
974
ContactsViewContactData* _tmp10_;
975
ContactsContactFrame* _tmp11_;
976
ContactsViewContactData* _tmp12_;
978
ContactsViewContactData* _tmp14_;
980
ContactsViewContactData* _tmp16_;
982
ContactsViewContactData* _tmp18_;
984
ContactsViewContactData* _tmp20_;
985
GtkCheckButton* _tmp21_;
986
ContactsViewContactData* _tmp22_;
987
GtkCheckButton* _tmp23_;
988
ContactsViewContactData* _tmp24_;
989
GtkCheckButton* _tmp25_;
990
ContactsViewContactData* _tmp26_;
991
GtkCheckButton* _tmp27_;
992
ContactsViewContactData* _tmp28_;
994
ContactsViewContactData* _tmp30_;
995
ContactsContactFrame* _tmp31_;
996
ContactsViewContactData* _tmp32_;
998
ContactsViewContactData* _tmp34_;
1000
ContactsViewContactData* _tmp36_;
1002
ContactsViewContactData* _tmp38_;
1003
GtkCheckButton* _tmp39_;
1004
ContactsViewTextDisplay _tmp40_;
1005
ContactsViewTextDisplay _tmp50_;
1006
ContactsViewContactData* _tmp63_;
1007
ContactsViewContactData* _tmp64_;
1008
GtkCheckButton* _tmp65_;
1009
ContactsViewContactData* _tmp66_;
1011
ContactsViewContactData* _tmp68_;
1012
ContactsViewContactData* _tmp69_;
1013
ContactsViewContactData* _tmp70_;
1016
GeeHashMap* _tmp75_;
1017
ContactsContact* _tmp76_;
1018
ContactsViewContactData* _tmp77_;
1019
ContactsViewContactData* _tmp78_;
1630
1021
g_return_if_fail (self != NULL);
1631
1022
g_return_if_fail (store != NULL);
1632
1023
g_return_if_fail (c != NULL);
1024
_data36_ = g_slice_new0 (Block36Data);
1025
_data36_->_ref_count_ = 1;
1026
_data36_->self = g_object_ref (self);
1633
1027
_tmp0_ = contacts_view_contact_data_new ();
1636
_tmp2_ = _g_object_ref0 (_tmp1_);
1637
_g_object_unref0 (data->contact);
1638
data->contact = _tmp2_;
1639
data->visible = FALSE;
1641
_tmp4_ = _contacts_view_contact_data_ref0 (data);
1642
contacts_contact_set_lookup (_tmp3_, CONTACTS_VIEW_TYPE_CONTACT_DATA, (GBoxedCopyFunc) contacts_view_contact_data_ref, contacts_view_contact_data_unref, self, _tmp4_);
1643
contacts_view_update_visible (self, data);
1644
_contacts_view_contact_data_unref0 (data);
1028
_data36_->data = _tmp0_;
1029
_tmp1_ = _data36_->data;
1031
_tmp3_ = _g_object_ref0 (_tmp2_);
1032
_g_object_unref0 (_tmp1_->contact);
1033
_tmp1_->contact = _tmp3_;
1034
_tmp4_ = _data36_->data;
1035
_tmp5_ = (GtkGrid*) gtk_grid_new ();
1036
g_object_ref_sink (_tmp5_);
1037
_g_object_unref0 (_tmp4_->grid);
1038
_tmp4_->grid = _tmp5_;
1039
_tmp6_ = _data36_->data;
1040
_tmp7_ = _tmp6_->grid;
1041
g_object_set ((GtkWidget*) _tmp7_, "margin", 12, NULL);
1042
_tmp8_ = _data36_->data;
1043
_tmp9_ = _tmp8_->grid;
1044
gtk_grid_set_column_spacing (_tmp9_, (guint) 10);
1045
_tmp10_ = _data36_->data;
1046
_tmp11_ = contacts_contact_frame_new (CONTACTS_CONTACT_SMALL_AVATAR_SIZE, FALSE);
1047
g_object_ref_sink (_tmp11_);
1048
_g_object_unref0 (_tmp10_->image_frame);
1049
_tmp10_->image_frame = _tmp11_;
1050
_tmp12_ = _data36_->data;
1051
_tmp13_ = (GtkLabel*) gtk_label_new ("");
1052
g_object_ref_sink (_tmp13_);
1053
_g_object_unref0 (_tmp12_->label);
1054
_tmp12_->label = _tmp13_;
1055
_tmp14_ = _data36_->data;
1056
_tmp15_ = _tmp14_->label;
1057
gtk_label_set_ellipsize (_tmp15_, PANGO_ELLIPSIZE_END);
1058
_tmp16_ = _data36_->data;
1059
_tmp17_ = _tmp16_->label;
1060
gtk_widget_set_valign ((GtkWidget*) _tmp17_, GTK_ALIGN_START);
1061
_tmp18_ = _data36_->data;
1062
_tmp19_ = _tmp18_->label;
1063
gtk_widget_set_halign ((GtkWidget*) _tmp19_, GTK_ALIGN_START);
1064
_tmp20_ = _data36_->data;
1065
_tmp21_ = (GtkCheckButton*) gtk_check_button_new ();
1066
g_object_ref_sink (_tmp21_);
1067
_g_object_unref0 (_tmp20_->selector_button);
1068
_tmp20_->selector_button = _tmp21_;
1069
_tmp22_ = _data36_->data;
1070
_tmp23_ = _tmp22_->selector_button;
1071
gtk_widget_set_valign ((GtkWidget*) _tmp23_, GTK_ALIGN_CENTER);
1072
_tmp24_ = _data36_->data;
1073
_tmp25_ = _tmp24_->selector_button;
1074
gtk_widget_set_halign ((GtkWidget*) _tmp25_, GTK_ALIGN_END);
1075
_tmp26_ = _data36_->data;
1076
_tmp27_ = _tmp26_->selector_button;
1077
gtk_widget_set_hexpand ((GtkWidget*) _tmp27_, TRUE);
1078
_tmp28_ = _data36_->data;
1079
_tmp29_ = _tmp28_->grid;
1080
_tmp30_ = _data36_->data;
1081
_tmp31_ = _tmp30_->image_frame;
1082
gtk_grid_attach (_tmp29_, (GtkWidget*) _tmp31_, 0, 0, 1, 2);
1083
_tmp32_ = _data36_->data;
1084
_tmp33_ = _tmp32_->grid;
1085
_tmp34_ = _data36_->data;
1086
_tmp35_ = _tmp34_->label;
1087
gtk_grid_attach (_tmp33_, (GtkWidget*) _tmp35_, 1, 0, 1, 1);
1088
_tmp36_ = _data36_->data;
1089
_tmp37_ = _tmp36_->grid;
1090
_tmp38_ = _data36_->data;
1091
_tmp39_ = _tmp38_->selector_button;
1092
gtk_grid_attach (_tmp37_, (GtkWidget*) _tmp39_, 2, 0, 1, 2);
1093
_tmp40_ = self->priv->text_display;
1094
if (_tmp40_ == CONTACTS_VIEW_TEXT_DISPLAY_PRESENCE) {
1095
ContactsContact* _tmp41_;
1096
GtkWidget* _tmp42_ = NULL;
1097
GtkWidget* merged_presence;
1102
ContactsViewContactData* _tmp47_;
1106
_tmp42_ = contacts_contact_create_merged_presence_widget (_tmp41_);
1107
merged_presence = _tmp42_;
1108
_tmp43_ = merged_presence;
1109
gtk_widget_set_halign (_tmp43_, GTK_ALIGN_START);
1110
_tmp44_ = merged_presence;
1111
gtk_widget_set_valign (_tmp44_, GTK_ALIGN_END);
1112
_tmp45_ = merged_presence;
1113
gtk_widget_set_vexpand (_tmp45_, FALSE);
1114
_tmp46_ = merged_presence;
1115
gtk_widget_set_margin_bottom (_tmp46_, 4);
1116
_tmp47_ = _data36_->data;
1117
_tmp48_ = _tmp47_->grid;
1118
_tmp49_ = merged_presence;
1119
gtk_grid_attach (_tmp48_, _tmp49_, 1, 1, 1, 1);
1120
_g_object_unref0 (merged_presence);
1122
_tmp50_ = self->priv->text_display;
1123
if (_tmp50_ == CONTACTS_VIEW_TEXT_DISPLAY_STORES) {
1127
ContactsContact* _tmp53_;
1128
gchar* _tmp54_ = NULL;
1130
gchar* _tmp56_ = NULL;
1134
ContactsViewContactData* _tmp60_;
1137
_tmp51_ = (GtkLabel*) gtk_label_new ("");
1138
g_object_ref_sink (_tmp51_);
1142
_tmp54_ = contacts_contact_format_persona_stores (_tmp53_);
1144
_tmp56_ = g_markup_printf_escaped ("<span font='12px'>%s</span>", _tmp55_);
1146
gtk_label_set_markup (_tmp52_, _tmp57_);
1150
gtk_label_set_ellipsize (_tmp58_, PANGO_ELLIPSIZE_END);
1152
gtk_widget_set_halign ((GtkWidget*) _tmp59_, GTK_ALIGN_START);
1153
_tmp60_ = _data36_->data;
1154
_tmp61_ = _tmp60_->grid;
1156
gtk_grid_attach (_tmp61_, (GtkWidget*) _tmp62_, 1, 1, 1, 1);
1157
_g_object_unref0 (stores);
1159
_tmp63_ = _data36_->data;
1160
contacts_view_update_data (self, _tmp63_);
1161
_tmp64_ = _data36_->data;
1162
_tmp65_ = _tmp64_->selector_button;
1163
g_signal_connect_data ((GtkToggleButton*) _tmp65_, "toggled", (GCallback) ___lambda24__gtk_toggle_button_toggled, block36_data_ref (_data36_), (GClosureNotify) block36_data_unref, 0);
1164
_tmp66_ = _data36_->data;
1165
_tmp67_ = _tmp66_->grid;
1166
_tmp68_ = _data36_->data;
1167
_tmp69_ = _contacts_view_contact_data_ref0 (_tmp68_);
1168
g_object_set_data_full ((GObject*) _tmp67_, "data", _tmp69_, contacts_view_contact_data_unref);
1169
_tmp70_ = _data36_->data;
1170
_tmp71_ = _tmp70_->grid;
1171
gtk_widget_show_all ((GtkWidget*) _tmp71_);
1172
_tmp72_ = self->priv->selectors_visible;
1174
ContactsViewContactData* _tmp73_;
1175
GtkCheckButton* _tmp74_;
1176
_tmp73_ = _data36_->data;
1177
_tmp74_ = _tmp73_->selector_button;
1178
gtk_widget_hide ((GtkWidget*) _tmp74_);
1180
_tmp75_ = self->priv->contacts;
1182
_tmp77_ = _data36_->data;
1183
gee_abstract_map_set ((GeeAbstractMap*) _tmp75_, _tmp76_, _tmp77_);
1184
_tmp78_ = _data36_->data;
1185
_tmp79_ = _tmp78_->grid;
1186
gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp79_);
1187
block36_data_unref (_data36_);
1648
1192
static void contacts_view_contact_removed_cb (ContactsView* self, ContactsStore* store, ContactsContact* c) {
1649
ContactsContact* _tmp0_;
1650
ContactsViewContactData* _tmp1_ = NULL;
1194
ContactsContact* _tmp1_;
1195
gpointer _tmp2_ = NULL;
1651
1196
ContactsViewContactData* data;
1652
ContactsViewContactData* _tmp2_;
1654
ContactsContact* _tmp5_;
1199
ContactsContactFrame* _tmp5_;
1201
ContactsContact* _tmp7_;
1655
1202
g_return_if_fail (self != NULL);
1656
1203
g_return_if_fail (store != NULL);
1657
1204
g_return_if_fail (c != NULL);
1659
_tmp1_ = contacts_view_lookup_data (self, _tmp0_);
1662
_tmp3_ = _tmp2_->visible;
1664
ContactsViewContactData* _tmp4_;
1666
contacts_view_remove_from_model (self, _tmp4_);
1669
contacts_contact_remove_lookup (_tmp5_, CONTACTS_VIEW_TYPE_CONTACT_DATA, (GBoxedCopyFunc) contacts_view_contact_data_ref, contacts_view_contact_data_unref, self);
1670
_contacts_view_contact_data_unref0 (data);
1674
gboolean contacts_view_lookup_iter (ContactsView* self, ContactsContact* c, GtkTreeIter* iter) {
1675
GtkTreeIter _vala_iter = {0};
1205
_tmp0_ = self->priv->contacts;
1207
_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
1208
data = (ContactsViewContactData*) _tmp2_;
1209
_tmp3_ = data->grid;
1210
gtk_widget_destroy ((GtkWidget*) _tmp3_);
1211
_tmp4_ = data->label;
1212
gtk_widget_destroy ((GtkWidget*) _tmp4_);
1213
_tmp5_ = data->image_frame;
1214
gtk_widget_destroy ((GtkWidget*) _tmp5_);
1215
_tmp6_ = self->priv->contacts;
1217
gee_abstract_map_unset ((GeeAbstractMap*) _tmp6_, _tmp7_, NULL);
1218
_contacts_view_contact_data_unref0 (data);
1222
static void contacts_view_real_child_selected (EggListBox* base, GtkWidget* child) {
1223
ContactsView * self;
1224
ContactsViewContactData* _tmp0_ = NULL;
1226
ContactsViewContactData* _tmp4_;
1227
ContactsViewContactData* _tmp5_;
1228
ContactsViewContactData* data;
1229
ContactsContact* _tmp6_ = NULL;
1230
ContactsViewContactData* _tmp7_;
1231
ContactsContact* _tmp10_;
1232
ContactsContact* _tmp11_;
1233
ContactsContact* contact;
1234
ContactsContact* _tmp12_;
1235
ContactsContact* _tmp13_;
1237
ContactsViewContactData* _tmp26_;
1238
self = (ContactsView*) base;
1240
if (_tmp1_ != NULL) {
1242
gconstpointer _tmp3_ = NULL;
1244
_tmp3_ = g_object_get_data ((GObject*) _tmp2_, "data");
1245
_tmp0_ = (ContactsViewContactData*) _tmp3_;
1250
_tmp5_ = _contacts_view_contact_data_ref0 (_tmp4_);
1253
if (_tmp7_ != NULL) {
1254
ContactsViewContactData* _tmp8_;
1255
ContactsContact* _tmp9_;
1257
_tmp9_ = _tmp8_->contact;
1263
_tmp11_ = _g_object_ref0 (_tmp10_);
1266
g_signal_emit_by_name (self, "selection-changed", _tmp12_);
1268
if (_tmp13_ != NULL) {
1269
ContactsContact* _tmp14_;
1271
contacts_contact_fetch_contact_info (_tmp14_);
1273
_tmp15_ = self->priv->last_selected;
1274
if (_tmp15_ != NULL) {
1276
gconstpointer _tmp17_ = NULL;
1277
ContactsViewContactData* _tmp18_;
1278
ContactsViewContactData* last_data;
1279
ContactsViewContactData* _tmp19_;
1281
GtkStateFlags _tmp21_ = 0;
1282
GtkStateFlags label_flags;
1283
GtkStateFlags _tmp22_;
1284
ContactsViewContactData* _tmp23_;
1286
GtkStateFlags _tmp25_;
1287
_tmp16_ = self->priv->last_selected;
1288
_tmp17_ = g_object_get_data ((GObject*) _tmp16_, "data");
1289
_tmp18_ = _contacts_view_contact_data_ref0 ((ContactsViewContactData*) _tmp17_);
1290
last_data = _tmp18_;
1291
_tmp19_ = last_data;
1292
_tmp20_ = _tmp19_->label;
1293
_tmp21_ = gtk_widget_get_state_flags ((GtkWidget*) _tmp20_);
1294
label_flags = _tmp21_;
1295
_tmp22_ = label_flags;
1296
label_flags = _tmp22_ & (~GTK_STATE_FLAG_SELECTED);
1297
_tmp23_ = last_data;
1298
_tmp24_ = _tmp23_->label;
1299
_tmp25_ = label_flags;
1300
gtk_widget_set_state_flags ((GtkWidget*) _tmp24_, _tmp25_, TRUE);
1301
_contacts_view_contact_data_unref0 (last_data);
1304
if (_tmp26_ != NULL) {
1305
ContactsViewContactData* _tmp27_;
1310
_tmp28_ = _tmp27_->label;
1311
gtk_widget_set_state_flags ((GtkWidget*) _tmp28_, GTK_STATE_FLAG_SELECTED, FALSE);
1313
_tmp30_ = _g_object_ref0 (_tmp29_);
1314
_g_object_unref0 (self->priv->last_selected);
1315
self->priv->last_selected = _tmp30_;
1317
_g_object_unref0 (contact);
1318
_contacts_view_contact_data_unref0 (data);
1322
static gboolean contacts_view_filter (ContactsView* self, GtkWidget* child) {
1676
1323
gboolean result = FALSE;
1677
ContactsContact* _tmp0_;
1678
ContactsViewContactData* _tmp1_ = NULL;
1325
gconstpointer _tmp1_ = NULL;
1326
ContactsViewContactData* _tmp2_;
1679
1327
ContactsViewContactData* data;
1681
1328
gboolean _tmp3_;
1682
1329
g_return_val_if_fail (self != NULL, FALSE);
1683
g_return_val_if_fail (c != NULL, FALSE);
1685
_tmp1_ = contacts_view_lookup_data (self, _tmp0_);
1687
_tmp2_ = data->iter;
1688
_vala_iter = _tmp2_;
1689
_tmp3_ = data->visible;
1330
g_return_val_if_fail (child != NULL, FALSE);
1332
_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "data");
1333
_tmp2_ = _contacts_view_contact_data_ref0 ((ContactsViewContactData*) _tmp1_);
1335
_tmp3_ = data->filtered;
1690
1336
result = _tmp3_;
1691
1337
_contacts_view_contact_data_unref0 (data);
1699
static Block30Data* block30_data_ref (Block30Data* _data30_) {
1700
g_atomic_int_inc (&_data30_->_ref_count_);
1705
static void block30_data_unref (void * _userdata_) {
1706
Block30Data* _data30_;
1707
_data30_ = (Block30Data*) _userdata_;
1708
if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
1709
ContactsView * self;
1710
self = _data30_->self;
1711
_g_object_unref0 (self);
1712
g_slice_free (Block30Data, _data30_);
1717
static gboolean __lambda22_ (ContactsView* self, GtkTreeSelection* selection, GtkTreeModel* model, GtkTreePath* path, gboolean path_currently_selected) {
1718
gboolean result = FALSE;
1719
ContactsContact* contact = NULL;
1720
GtkTreeIter iter = {0};
1721
GtkTreeModel* _tmp0_;
1722
GtkTreePath* _tmp1_;
1723
GtkTreeIter _tmp2_ = {0};
1724
GtkTreeModel* _tmp3_;
1726
g_return_val_if_fail (selection != NULL, FALSE);
1727
g_return_val_if_fail (model != NULL, FALSE);
1728
g_return_val_if_fail (path != NULL, FALSE);
1731
gtk_tree_model_get_iter (_tmp0_, &_tmp2_, _tmp1_);
1735
gtk_tree_model_get (_tmp3_, &_tmp4_, 0, &contact, -1);
1736
result = contact != NULL;
1737
_g_object_unref0 (contact);
1742
static gboolean ___lambda22__gtk_tree_selection_func (GtkTreeSelection* selection, GtkTreeModel* model, GtkTreePath* path, gboolean path_currently_selected, gpointer self) {
1744
result = __lambda22_ (self, selection, model, path, path_currently_selected);
1749
static void _contacts_view_contacts_selection_changed_gtk_tree_selection_changed (GtkTreeSelection* _sender, gpointer self) {
1750
contacts_view_contacts_selection_changed (self, _sender);
1754
static void __lambda23_ (ContactsView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
1755
ContactsContact* contact = NULL;
1756
GtkTreeModel* _tmp0_;
1758
ContactsContact* _tmp2_;
1759
GtkCellRenderer* _tmp5_;
1760
ContactsContact* _tmp6_;
1761
g_return_if_fail (column != NULL);
1762
g_return_if_fail (cell != NULL);
1763
g_return_if_fail (model != NULL);
1764
g_return_if_fail (iter != NULL);
1767
gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &contact, -1);
1769
if (_tmp2_ == NULL) {
1770
GtkCellRenderer* _tmp3_;
1771
GtkCellRenderer* _tmp4_;
1773
g_object_set ((GObject*) _tmp3_, "pixbuf", NULL, NULL);
1775
gtk_cell_renderer_set_visible (_tmp4_, FALSE);
1776
_g_object_unref0 (contact);
1780
gtk_cell_renderer_set_visible (_tmp5_, TRUE);
1782
if (_tmp6_ != NULL) {
1783
GtkCellRenderer* _tmp7_;
1784
ContactsContact* _tmp8_;
1789
_tmp9_ = contacts_contact_get_small_avatar (_tmp8_);
1791
g_object_set ((GObject*) _tmp7_, "pixbuf", _tmp10_, NULL);
1342
static void contacts_view_update_separator (ContactsView* self, GtkWidget** separator, GtkWidget* widget, GtkWidget* before_widget) {
1344
gconstpointer _tmp1_ = NULL;
1345
ContactsViewContactData* _tmp2_;
1346
ContactsViewContactData* w_data;
1347
ContactsViewContactData* before_data;
1349
gboolean _tmp7_ = FALSE;
1350
ContactsViewContactData* _tmp8_;
1352
gboolean _tmp26_ = FALSE;
1353
gboolean _tmp27_ = FALSE;
1354
ContactsViewContactData* _tmp28_;
1357
gboolean _tmp45_ = FALSE;
1358
ContactsViewContactData* _tmp46_;
1359
gboolean _tmp47_ = FALSE;
1361
ContactsViewContactData* _tmp68_;
1362
g_return_if_fail (self != NULL);
1363
g_return_if_fail (widget != NULL);
1365
_tmp1_ = g_object_get_data ((GObject*) _tmp0_, "data");
1366
_tmp2_ = _contacts_view_contact_data_ref0 ((ContactsViewContactData*) _tmp1_);
1369
_tmp3_ = before_widget;
1370
if (_tmp3_ != NULL) {
1372
gconstpointer _tmp5_ = NULL;
1373
ContactsViewContactData* _tmp6_;
1374
_tmp4_ = before_widget;
1375
_tmp5_ = g_object_get_data ((GObject*) _tmp4_, "data");
1376
_tmp6_ = _contacts_view_contact_data_ref0 ((ContactsViewContactData*) _tmp5_);
1377
_contacts_view_contact_data_unref0 (before_data);
1378
before_data = _tmp6_;
1380
_tmp8_ = before_data;
1381
if (_tmp8_ == NULL) {
1382
ContactsViewContactData* _tmp9_;
1385
_tmp10_ = _tmp9_->sort_prio;
1386
_tmp7_ = _tmp10_ > 0;
1793
GtkCellRenderer* _tmp11_;
1795
g_object_set ((GObject*) _tmp11_, "pixbuf", NULL, NULL);
1797
_g_object_unref0 (contact);
1801
static void ___lambda23__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
1802
__lambda23_ (self, cell_layout, cell, tree_model, iter);
1806
static void _contacts_cell_renderer_shape_render_shape_pango_cairo_shape_renderer_func (cairo_t* cr, PangoAttrShape* attr, gboolean do_path, gpointer self) {
1807
contacts_cell_renderer_shape_render_shape (self, cr, attr, do_path);
1811
static void __lambda24_ (Block30Data* _data30_, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
1812
ContactsView * self;
1813
ContactsContact* contact = NULL;
1814
GtkTreeModel* _tmp0_;
1816
ContactsContact* _tmp2_;
1817
GtkCellRenderer* _tmp4_;
1818
ContactsContact* _tmp5_;
1819
const gchar* _tmp6_;
1820
const gchar* _tmp7_;
1823
ContactsViewTextDisplay _tmp9_;
1824
self = _data30_->self;
1825
g_return_if_fail (column != NULL);
1826
g_return_if_fail (cell != NULL);
1827
g_return_if_fail (model != NULL);
1828
g_return_if_fail (iter != NULL);
1831
gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &contact, -1);
1833
if (_tmp2_ == NULL) {
1834
GtkCellRenderer* _tmp3_;
1836
gtk_cell_renderer_set_visible (_tmp3_, FALSE);
1837
_g_object_unref0 (contact);
1841
gtk_cell_renderer_set_visible (_tmp4_, TRUE);
1843
_tmp6_ = contacts_contact_get_display_name (_tmp5_);
1845
_tmp8_ = g_strdup (_tmp7_);
1847
_tmp9_ = _data30_->text_display;
1850
case CONTACTS_VIEW_TEXT_DISPLAY_NONE:
1852
GtkCellRenderer* _tmp10_;
1853
const gchar* _tmp11_;
1856
g_object_set ((GObject*) _tmp10_, "name", _tmp11_, "show_presence", FALSE, "message", "", NULL);
1859
case CONTACTS_VIEW_TEXT_DISPLAY_PRESENCE:
1861
GtkCellRenderer* _tmp12_;
1862
const gchar* _tmp13_;
1863
ContactsContact* _tmp14_;
1864
FolksPresenceType _tmp15_;
1865
ContactsContact* _tmp16_;
1866
const gchar* _tmp17_;
1867
ContactsContact* _tmp18_;
1872
_tmp15_ = _tmp14_->presence_type;
1874
_tmp17_ = _tmp16_->presence_message;
1876
_tmp19_ = _tmp18_->is_phone;
1877
g_object_set ((GObject*) _tmp12_, "name", _tmp13_, "show_presence", TRUE, "presence", _tmp15_, "message", _tmp17_, "is_phone", _tmp19_, NULL);
1880
case CONTACTS_VIEW_TEXT_DISPLAY_STORES:
1882
ContactsContact* _tmp20_;
1392
gboolean _tmp12_ = FALSE;
1395
_tmp13_ = *separator;
1396
if (_tmp13_ == NULL) {
1400
gconstpointer _tmp15_ = NULL;
1401
_tmp14_ = *separator;
1402
_tmp15_ = g_object_get_data ((GObject*) _tmp14_, "contacts-suggestions-header");
1403
_tmp12_ = !((gboolean) ((gintptr) _tmp15_));
1411
const gchar* _tmp20_ = NULL;
1883
1412
gchar* _tmp21_ = NULL;
1885
GtkCellRenderer* _tmp22_;
1886
const gchar* _tmp23_;
1887
const gchar* _tmp24_;
1889
_tmp21_ = contacts_contact_format_persona_stores (_tmp20_);
1894
g_object_set ((GObject*) _tmp22_, "name", _tmp23_, "show_presence", FALSE, "message", _tmp24_, NULL);
1900
_g_object_unref0 (contact);
1904
static void ___lambda24__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
1905
__lambda24_ (self, cell_layout, cell, tree_model, iter);
1909
static void __lambda25_ (ContactsView* self, GtkCellLayout* column, GtkCellRenderer* cell, GtkTreeModel* model, GtkTreeIter* iter) {
1910
ContactsContact* contact = NULL;
1911
GtkTreeModel* _tmp0_;
1913
GtkCellRenderer* _tmp2_;
1914
ContactsContact* _tmp3_;
1915
GtkCellRenderer* _tmp4_;
1918
g_return_if_fail (column != NULL);
1919
g_return_if_fail (cell != NULL);
1920
g_return_if_fail (model != NULL);
1921
g_return_if_fail (iter != NULL);
1924
gtk_tree_model_get (_tmp0_, &_tmp1_, 0, &contact, -1);
1927
gtk_cell_renderer_set_visible (_tmp2_, _tmp3_ == NULL);
1929
_tmp5_ = gtk_cell_renderer_get_visible (_tmp4_);
1933
gchar* _tmp8_ = NULL;
1935
GtkCellRenderer* _tmp9_;
1936
const gchar* _tmp10_;
1937
const gchar* _tmp11_;
1939
_tmp8_ = contacts_view_get_header_text (self, &_tmp7_);
1943
g_object_set ((GObject*) _tmp9_, "text", _tmp10_, NULL);
1945
if (g_strcmp0 (_tmp11_, "") == 0) {
1946
GtkCellRenderer* _tmp12_;
1948
g_object_set (_tmp12_, "height", 6, NULL);
1950
GtkCellRenderer* _tmp13_;
1952
g_object_set (_tmp13_, "height", -1, NULL);
1956
_g_object_unref0 (contact);
1960
static void ___lambda25__gtk_cell_layout_data_func (GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer self) {
1961
__lambda25_ (self, cell_layout, cell, tree_model, iter);
1965
static void contacts_view_init_view (ContactsView* self, ContactsViewTextDisplay text_display) {
1966
Block30Data* _data30_;
1967
ContactsViewTextDisplay _tmp0_;
1968
ContactsViewTextDisplay _tmp1_;
1969
GtkListStore* _tmp2_;
1971
GtkTreeSelection* _tmp3_ = NULL;
1972
GtkTreeSelection* _tmp4_;
1973
GtkTreeSelection* selection;
1974
GtkTreeViewColumn* _tmp5_;
1975
GtkTreeViewColumn* _tmp6_;
1976
GtkTreeViewColumn* column;
1977
GtkCellRendererPixbuf* _tmp7_;
1978
GtkCellRendererPixbuf* _tmp8_;
1979
GtkCellRendererPixbuf* icon;
1980
ContactsCellRendererShape* _tmp9_;
1981
ContactsCellRendererShape* _tmp10_;
1982
ContactsCellRendererShape* _tmp11_;
1983
PangoContext* _tmp12_ = NULL;
1984
ContactsCellRendererShape* _tmp13_;
1985
ContactsCellRendererShape* _tmp14_;
1986
ContactsCellRendererShape* _tmp15_;
1987
GtkCellRendererText* _tmp16_;
1988
GtkCellRendererText* _tmp17_;
1989
GtkCellRendererText* text;
1990
g_return_if_fail (self != NULL);
1991
_data30_ = g_slice_new0 (Block30Data);
1992
_data30_->_ref_count_ = 1;
1993
_data30_->self = g_object_ref (self);
1994
_tmp0_ = text_display;
1995
_data30_->text_display = _tmp0_;
1996
_tmp1_ = _data30_->text_display;
1997
self->priv->text_display = _tmp1_;
1998
_tmp2_ = self->priv->list_store;
1999
gtk_tree_view_set_model ((GtkTreeView*) self, (GtkTreeModel*) _tmp2_);
2000
gtk_tree_view_set_headers_visible ((GtkTreeView*) self, FALSE);
2002
_tmp3_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
2003
_tmp4_ = _g_object_ref0 (_tmp3_);
2005
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
2006
gtk_tree_selection_set_select_function (selection, ___lambda22__gtk_tree_selection_func, g_object_ref (self), g_object_unref);
2007
g_signal_connect_object (selection, "changed", (GCallback) _contacts_view_contacts_selection_changed_gtk_tree_selection_changed, self, 0);
2008
_tmp5_ = gtk_tree_view_column_new ();
2009
_tmp6_ = g_object_ref_sink (_tmp5_);
2011
gtk_tree_view_column_set_spacing (column, 8);
2012
_tmp7_ = (GtkCellRendererPixbuf*) gtk_cell_renderer_pixbuf_new ();
2013
_tmp8_ = g_object_ref_sink (_tmp7_);
2015
gtk_cell_renderer_set_padding ((GtkCellRenderer*) icon, 0, row_padding);
2016
g_object_set ((GtkCellRenderer*) icon, "xalign", 1.0f, NULL);
2017
g_object_set ((GtkCellRenderer*) icon, "yalign", 0.0f, NULL);
2018
g_object_set ((GtkCellRenderer*) icon, "width", CONTACTS_CONTACT_SMALL_AVATAR_SIZE + 12, NULL);
2019
gtk_cell_layout_pack_start ((GtkCellLayout*) column, (GtkCellRenderer*) icon, FALSE);
2020
gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) column, (GtkCellRenderer*) icon, ___lambda23__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
2021
_tmp9_ = contacts_cell_renderer_shape_new ();
2022
_tmp10_ = g_object_ref_sink (_tmp9_);
2023
_g_object_unref0 (self->priv->shape);
2024
self->priv->shape = _tmp10_;
2025
_tmp11_ = self->priv->shape;
2026
gtk_cell_renderer_set_padding ((GtkCellRenderer*) _tmp11_, 0, row_padding);
2027
_tmp12_ = gtk_widget_get_pango_context ((GtkWidget*) self);
2028
_tmp13_ = self->priv->shape;
2029
pango_cairo_context_set_shape_renderer (_tmp12_, _contacts_cell_renderer_shape_render_shape_pango_cairo_shape_renderer_func, g_object_ref (_tmp13_), g_object_unref);
2030
_tmp14_ = self->priv->shape;
2031
gtk_cell_layout_pack_start ((GtkCellLayout*) column, (GtkCellRenderer*) _tmp14_, TRUE);
2032
_tmp15_ = self->priv->shape;
2033
gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) column, (GtkCellRenderer*) _tmp15_, ___lambda24__gtk_cell_layout_data_func, block30_data_ref (_data30_), block30_data_unref);
2034
_tmp16_ = (GtkCellRendererText*) gtk_cell_renderer_text_new ();
2035
_tmp17_ = g_object_ref_sink (_tmp16_);
2037
gtk_cell_renderer_set_alignment ((GtkCellRenderer*) text, (gfloat) 0, (gfloat) 0);
2038
gtk_cell_layout_pack_start ((GtkCellLayout*) column, (GtkCellRenderer*) text, TRUE);
2039
g_object_set ((GObject*) text, "weight", PANGO_WEIGHT_BOLD, NULL);
2040
gtk_cell_layout_set_cell_data_func ((GtkCellLayout*) column, (GtkCellRenderer*) text, ___lambda25__gtk_cell_layout_data_func, g_object_ref (self), g_object_unref);
2041
gtk_tree_view_append_column ((GtkTreeView*) self, column);
2042
_g_object_unref0 (text);
2043
_g_object_unref0 (icon);
2044
_g_object_unref0 (column);
2045
_g_object_unref0 (selection);
2046
block30_data_unref (_data30_);
2051
static void contacts_view_contacts_selection_changed (ContactsView* self, GtkTreeSelection* selection) {
2052
GtkTreeIter iter = {0};
2053
GtkTreeModel* model = NULL;
2054
ContactsContact* contact;
2055
GtkTreeSelection* _tmp0_;
2056
GtkTreeModel* _tmp1_ = NULL;
2057
GtkTreeIter _tmp2_ = {0};
2058
gboolean _tmp3_ = FALSE;
2059
GtkTreeModel* _tmp4_;
2060
ContactsContact* _tmp7_;
2061
g_return_if_fail (self != NULL);
2062
g_return_if_fail (selection != NULL);
2065
_tmp3_ = gtk_tree_selection_get_selected (_tmp0_, &_tmp1_, &_tmp2_);
2066
_g_object_unref0 (model);
2067
_tmp4_ = _g_object_ref0 (_tmp1_);
2071
GtkTreeModel* _tmp5_;
2075
gtk_tree_model_get (_tmp5_, &_tmp6_, 0, &contact, -1);
2078
g_signal_emit_by_name (self, "selection-changed", _tmp7_);
2079
_g_object_unref0 (contact);
2080
_g_object_unref0 (model);
1417
_tmp17_ = (GtkLabel*) gtk_label_new ("");
1418
g_object_ref_sink (_tmp17_);
1421
g_object_set_data_full ((GObject*) _tmp18_, "contacts-suggestions-header", (gpointer) ((gintptr) TRUE), NULL);
1423
_tmp20_ = _ ("Suggestions");
1424
_tmp21_ = g_markup_printf_escaped ("<b>%s</b>", _tmp20_);
1426
gtk_label_set_markup (_tmp19_, _tmp22_);
1429
gtk_widget_set_halign ((GtkWidget*) _tmp23_, GTK_ALIGN_START);
1431
_tmp25_ = _g_object_ref0 ((GtkWidget*) _tmp24_);
1432
_g_object_unref0 (*separator);
1433
*separator = _tmp25_;
1434
_g_object_unref0 (l);
1436
_contacts_view_contact_data_unref0 (before_data);
1437
_contacts_view_contact_data_unref0 (w_data);
1440
_tmp28_ = before_data;
1441
if (_tmp28_ != NULL) {
1442
ContactsViewContactData* _tmp29_;
1444
_tmp29_ = before_data;
1445
_tmp30_ = _tmp29_->sort_prio;
1446
_tmp27_ = _tmp30_ > 0;
1452
ContactsViewContactData* _tmp32_;
1455
_tmp33_ = _tmp32_->sort_prio;
1456
_tmp26_ = _tmp33_ == 0;
1462
gboolean _tmp35_ = FALSE;
1465
_tmp36_ = *separator;
1466
if (_tmp36_ == NULL) {
1470
gconstpointer _tmp38_ = NULL;
1471
_tmp37_ = *separator;
1472
_tmp38_ = g_object_get_data ((GObject*) _tmp37_, "contacts-rest-header");
1473
_tmp35_ = !((gboolean) ((gintptr) _tmp38_));
1483
_tmp40_ = (GtkLabel*) gtk_label_new ("");
1484
g_object_ref_sink (_tmp40_);
1487
g_object_set_data_full ((GObject*) _tmp41_, "contacts-rest-header", (gpointer) ((gintptr) TRUE), NULL);
1489
gtk_widget_set_halign ((GtkWidget*) _tmp42_, GTK_ALIGN_START);
1491
_tmp44_ = _g_object_ref0 ((GtkWidget*) _tmp43_);
1492
_g_object_unref0 (*separator);
1493
*separator = _tmp44_;
1494
_g_object_unref0 (l);
1496
_contacts_view_contact_data_unref0 (before_data);
1497
_contacts_view_contact_data_unref0 (w_data);
1501
_tmp47_ = contacts_view_is_other (self, _tmp46_);
1503
gboolean _tmp48_ = FALSE;
1504
ContactsViewContactData* _tmp49_;
1506
_tmp49_ = before_data;
1507
if (_tmp49_ == NULL) {
1510
ContactsViewContactData* _tmp50_;
1511
gboolean _tmp51_ = FALSE;
1512
_tmp50_ = before_data;
1513
_tmp51_ = contacts_view_is_other (self, _tmp50_);
1523
gboolean _tmp54_ = FALSE;
1526
_tmp55_ = *separator;
1527
if (_tmp55_ == NULL) {
1531
gconstpointer _tmp57_ = NULL;
1532
_tmp56_ = *separator;
1533
_tmp57_ = g_object_get_data ((GObject*) _tmp56_, "contacts-other-header");
1534
_tmp54_ = !((gboolean) ((gintptr) _tmp57_));
1542
const gchar* _tmp62_ = NULL;
1543
gchar* _tmp63_ = NULL;
1548
_tmp59_ = (GtkLabel*) gtk_label_new ("");
1549
g_object_ref_sink (_tmp59_);
1552
g_object_set_data_full ((GObject*) _tmp60_, "contacts-other-header", (gpointer) ((gintptr) TRUE), NULL);
1554
_tmp62_ = _ ("Other Contacts");
1555
_tmp63_ = g_markup_printf_escaped ("<b>%s</b>", _tmp62_);
1557
gtk_label_set_markup (_tmp61_, _tmp64_);
1560
gtk_widget_set_halign ((GtkWidget*) _tmp65_, GTK_ALIGN_START);
1562
_tmp67_ = _g_object_ref0 ((GtkWidget*) _tmp66_);
1563
_g_object_unref0 (*separator);
1564
*separator = _tmp67_;
1565
_g_object_unref0 (l);
1567
_contacts_view_contact_data_unref0 (before_data);
1568
_contacts_view_contact_data_unref0 (w_data);
1571
_tmp68_ = before_data;
1572
if (_tmp68_ != NULL) {
1573
gboolean _tmp69_ = FALSE;
1576
_tmp70_ = *separator;
1577
if (_tmp70_ == NULL) {
1581
_tmp71_ = *separator;
1582
_tmp69_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, GTK_TYPE_SEPARATOR);
1586
GtkSeparator* _tmp73_;
1587
_tmp73_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
1588
g_object_ref_sink (_tmp73_);
1589
_g_object_unref0 (*separator);
1590
*separator = (GtkWidget*) _tmp73_;
1592
_contacts_view_contact_data_unref0 (before_data);
1593
_contacts_view_contact_data_unref0 (w_data);
1596
_g_object_unref0 (*separator);
1598
_contacts_view_contact_data_unref0 (before_data);
1599
_contacts_view_contact_data_unref0 (w_data);
2084
1603
void contacts_view_select_contact (ContactsView* self, ContactsContact* contact) {
2085
GtkTreeIter iter = {0};
2086
1604
ContactsContact* _tmp0_;
2087
GtkTreeIter _tmp1_ = {0};
2088
gboolean _tmp2_ = FALSE;
1606
ContactsContact* _tmp2_;
1607
gpointer _tmp3_ = NULL;
1608
ContactsViewContactData* data;
1609
ContactsViewContactData* _tmp4_;
2089
1611
g_return_if_fail (self != NULL);
2090
g_return_if_fail (contact != NULL);
2091
1612
_tmp0_ = contact;
2092
_tmp2_ = contacts_view_lookup_iter (self, _tmp0_, &_tmp1_);
2095
GtkTreeSelection* _tmp3_ = NULL;
2097
GtkListStore* _tmp5_;
2099
GtkTreePath* _tmp7_ = NULL;
2100
GtkTreePath* _tmp8_;
2101
_tmp3_ = gtk_tree_view_get_selection ((GtkTreeView*) self);
2103
gtk_tree_selection_select_iter (_tmp3_, &_tmp4_);
2104
_tmp5_ = self->priv->list_store;
2106
_tmp7_ = gtk_tree_model_get_path ((GtkTreeModel*) _tmp5_, &_tmp6_);
2108
gtk_tree_view_scroll_to_cell ((GtkTreeView*) self, _tmp8_, NULL, TRUE, 0.0f, 0.0f);
2109
_gtk_tree_path_free0 (_tmp8_);
1613
if (_tmp0_ == NULL) {
1614
egg_list_box_select_child ((EggListBox*) self, NULL);
1617
_tmp1_ = self->priv->contacts;
1619
_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp2_);
1620
data = (ContactsViewContactData*) _tmp3_;
1622
_tmp5_ = _tmp4_->grid;
1623
egg_list_box_select_child ((EggListBox*) self, (GtkWidget*) _tmp5_);
1624
_contacts_view_contact_data_unref0 (data);
1628
void contacts_view_show_selectors (ContactsView* self) {
1629
g_return_if_fail (self != NULL);
1632
GeeCollection* _tmp1_;
1633
GeeCollection* _tmp2_;
1634
GeeCollection* _tmp3_;
1635
GeeIterator* _tmp4_ = NULL;
1636
GeeIterator* _tmp5_;
1637
GeeIterator* _data_it;
1638
_tmp0_ = self->priv->contacts;
1639
_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
1642
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
1644
_g_object_unref0 (_tmp3_);
1647
GeeIterator* _tmp6_;
1648
gboolean _tmp7_ = FALSE;
1649
GeeIterator* _tmp8_;
1650
gpointer _tmp9_ = NULL;
1651
ContactsViewContactData* data;
1652
ContactsViewContactData* _tmp10_;
1653
GtkCheckButton* _tmp11_;
1655
_tmp7_ = gee_iterator_next (_tmp6_);
1660
_tmp9_ = gee_iterator_get (_tmp8_);
1661
data = (ContactsViewContactData*) _tmp9_;
1663
_tmp11_ = _tmp10_->selector_button;
1664
gtk_widget_show ((GtkWidget*) _tmp11_);
1665
_contacts_view_contact_data_unref0 (data);
1667
_g_object_unref0 (_data_it);
1669
self->priv->selectors_visible = TRUE;
1673
void contacts_view_hide_selectors (ContactsView* self) {
1674
g_return_if_fail (self != NULL);
1677
GeeCollection* _tmp1_;
1678
GeeCollection* _tmp2_;
1679
GeeCollection* _tmp3_;
1680
GeeIterator* _tmp4_ = NULL;
1681
GeeIterator* _tmp5_;
1682
GeeIterator* _data_it;
1683
_tmp0_ = self->priv->contacts;
1684
_tmp1_ = gee_abstract_map_get_values ((GeeMap*) _tmp0_);
1687
_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
1689
_g_object_unref0 (_tmp3_);
1692
GeeIterator* _tmp6_;
1693
gboolean _tmp7_ = FALSE;
1694
GeeIterator* _tmp8_;
1695
gpointer _tmp9_ = NULL;
1696
ContactsViewContactData* data;
1697
ContactsViewContactData* _tmp10_;
1698
GtkCheckButton* _tmp11_;
1699
ContactsViewContactData* _tmp12_;
1700
GtkCheckButton* _tmp13_;
1702
_tmp7_ = gee_iterator_next (_tmp6_);
1707
_tmp9_ = gee_iterator_get (_tmp8_);
1708
data = (ContactsViewContactData*) _tmp9_;
1710
_tmp11_ = _tmp10_->selector_button;
1711
gtk_widget_hide ((GtkWidget*) _tmp11_);
1713
_tmp13_ = _tmp12_->selector_button;
1714
gtk_toggle_button_set_active ((GtkToggleButton*) _tmp13_, FALSE);
1715
_contacts_view_contact_data_unref0 (data);
1717
_g_object_unref0 (_data_it);
1719
self->priv->selectors_visible = FALSE;
1720
self->priv->nr_contacts_marked = 0;
1724
GeeLinkedList* contacts_view_get_marked_contacts (ContactsView* self) {
1725
GeeLinkedList* result = NULL;
1726
GeeLinkedList* _tmp0_;
1728
g_return_val_if_fail (self != NULL, NULL);
1729
_tmp0_ = gee_linked_list_new (CONTACTS_TYPE_CONTACT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
1733
GeeCollection* _tmp2_;
1734
GeeCollection* _tmp3_;
1735
GeeCollection* _tmp4_;
1736
GeeIterator* _tmp5_ = NULL;
1737
GeeIterator* _tmp6_;
1738
GeeIterator* _data_it;
1739
_tmp1_ = self->priv->contacts;
1740
_tmp2_ = gee_abstract_map_get_values ((GeeMap*) _tmp1_);
1743
_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
1745
_g_object_unref0 (_tmp4_);
1748
GeeIterator* _tmp7_;
1749
gboolean _tmp8_ = FALSE;
1750
GeeIterator* _tmp9_;
1751
gpointer _tmp10_ = NULL;
1752
ContactsViewContactData* data;
1753
ContactsViewContactData* _tmp11_;
1754
GtkCheckButton* _tmp12_;
1758
_tmp8_ = gee_iterator_next (_tmp7_);
1763
_tmp10_ = gee_iterator_get (_tmp9_);
1764
data = (ContactsViewContactData*) _tmp10_;
1766
_tmp12_ = _tmp11_->selector_button;
1767
_tmp13_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp12_);
1770
GeeLinkedList* _tmp15_;
1771
ContactsViewContactData* _tmp16_;
1772
ContactsContact* _tmp17_;
1775
_tmp17_ = _tmp16_->contact;
1776
gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp17_);
1778
_contacts_view_contact_data_unref0 (data);
1780
_g_object_unref0 (_data_it);