~ubuntu-branches/ubuntu/raring/gnome-contacts/raring-proposed

« back to all changes in this revision

Viewing changes to src/contacts-link-dialog.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-18 09:56:41 UTC
  • mfrom: (1.3.5)
  • Revision ID: package-import@ubuntu.com-20120918095641-0yxjv943hl8gb686
Tags: 3.5.92-0ubuntu1
* New upstream bugfix release
* debian/control:
  - Drop build-depends on libgstreamer-plugins-base0.10-dev,
    libgstreamer0.10-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* contacts-link-dialog.c generated by valac 0.17.5.1-049a7, the Vala compiler
 
1
/* contacts-link-dialog.c generated by valac 0.17.5.2-8558, the Vala compiler
2
2
 * generated from contacts-link-dialog.vala, do not modify */
3
3
 
4
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
88
88
typedef struct _ContactsStore ContactsStore;
89
89
typedef struct _ContactsStoreClass ContactsStoreClass;
90
90
#define _g_free0(var) (var = (g_free (var), NULL))
91
 
typedef struct _Block25Data Block25Data;
 
91
typedef struct _Block24Data Block24Data;
92
92
 
93
93
#define CONTACTS_TYPE_LINK_OPERATION (contacts_link_operation_get_type ())
94
94
#define CONTACTS_LINK_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_LINK_OPERATION, ContactsLinkOperation))
99
99
 
100
100
typedef struct _ContactsLinkOperation ContactsLinkOperation;
101
101
typedef struct _ContactsLinkOperationClass ContactsLinkOperationClass;
 
102
typedef struct _Block25Data Block25Data;
102
103
typedef struct _Block26Data Block26Data;
103
 
typedef struct _Block27Data Block27Data;
104
104
 
105
105
#define CONTACTS_TYPE_APP (contacts_app_get_type ())
106
106
#define CONTACTS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_APP, ContactsApp))
161
161
        GObjectClass parent_class;
162
162
};
163
163
 
 
164
struct _Block24Data {
 
165
        int _ref_count_;
 
166
        ContactsLinkDialog * self;
 
167
        gchar* selected_contact_name;
 
168
};
 
169
 
164
170
struct _Block25Data {
165
171
        int _ref_count_;
166
 
        ContactsLinkDialog * self;
167
 
        gchar* selected_contact_name;
 
172
        Block24Data * _data24_;
 
173
        ContactsLinkOperation* operation;
 
174
        GtkInfoBar* undo_bar;
168
175
};
169
176
 
170
177
struct _Block26Data {
171
178
        int _ref_count_;
172
 
        Block25Data * _data25_;
173
 
        ContactsLinkOperation* operation;
174
 
        GtkInfoBar* undo_bar;
175
 
};
176
 
 
177
 
struct _Block27Data {
178
 
        int _ref_count_;
179
179
        ContactsLinkDialog * self;
180
180
        ContactsContact* contact;
181
181
};
223
223
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
224
224
GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
225
225
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
226
 
static void __lambda85_ (ContactsLinkDialog* self, GtkWidget* w);
 
226
static void __lambda83_ (ContactsLinkDialog* self, GtkWidget* w);
227
227
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
228
228
GType contacts_store_get_type (void) G_GNUC_CONST;
229
 
static void ___lambda85__gtk_callback (GtkWidget* widget, gpointer self);
 
229
static void ___lambda83__gtk_callback (GtkWidget* widget, gpointer self);
230
230
const gchar* contacts_contact_get_display_name (ContactsContact* self);
231
231
gchar* contacts_contact_format_persona_stores (ContactsContact* self);
232
 
static void ___lambda86_ (ContactsLinkDialog* self, GtkButton* button);
233
 
static Block25Data* block25_data_ref (Block25Data* _data25_);
234
 
static void block25_data_unref (void * _userdata_);
 
232
static void ___lambda84_ (ContactsLinkDialog* self, GtkButton* button);
 
233
static Block24Data* block24_data_ref (Block24Data* _data24_);
 
234
static void block24_data_unref (void * _userdata_);
235
235
void contacts_link_contacts (ContactsContact* main, ContactsContact* other, GAsyncReadyCallback _callback_, gpointer _user_data_);
236
236
GType contacts_link_operation_get_type (void) G_GNUC_CONST;
237
237
ContactsLinkOperation* contacts_link_contacts_finish (GAsyncResult* _res_);
238
 
static void __lambda87_ (Block25Data* _data25_, GObject* obj, GAsyncResult* _result_);
239
 
static Block26Data* block26_data_ref (Block26Data* _data26_);
240
 
static void block26_data_unref (void * _userdata_);
241
 
static void __lambda88_ (Block26Data* _data26_, gint response_id);
 
238
static void __lambda85_ (Block24Data* _data24_, GObject* obj, GAsyncResult* _result_);
 
239
static Block25Data* block25_data_ref (Block25Data* _data25_);
 
240
static void block25_data_unref (void * _userdata_);
 
241
static void __lambda86_ (Block25Data* _data25_, gint response_id);
242
242
void contacts_link_operation_undo (ContactsLinkOperation* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
243
243
void contacts_link_operation_undo_finish (ContactsLinkOperation* self, GAsyncResult* _res_);
244
 
static void ___lambda88__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
245
 
static gboolean __lambda89_ (Block26Data* _data26_);
246
 
static gboolean ___lambda89__gsource_func (gpointer self);
247
 
static void ___lambda87__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
248
 
static void ____lambda86__gtk_button_clicked (GtkButton* _sender, gpointer self);
 
244
static void ___lambda86__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self);
 
245
static gboolean __lambda87_ (Block25Data* _data25_);
 
246
static gboolean ___lambda87__gsource_func (gpointer self);
 
247
static void ___lambda85__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
 
248
static void ____lambda84__gtk_button_clicked (GtkButton* _sender, gpointer self);
249
249
GeeArrayList* contacts_contact_sort_fields (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GeeCollection* fields);
250
250
ContactsLinkDialog* contacts_link_dialog_new (ContactsContact* contact);
251
251
ContactsLinkDialog* contacts_link_dialog_construct (GType object_type, ContactsContact* contact);
252
 
static Block27Data* block27_data_ref (Block27Data* _data27_);
253
 
static void block27_data_unref (void * _userdata_);
 
252
static Block26Data* block26_data_ref (Block26Data* _data26_);
 
253
static void block26_data_unref (void * _userdata_);
254
254
GType contacts_app_get_type (void) G_GNUC_CONST;
255
255
GType contacts_window_get_type (void) G_GNUC_CONST;
256
256
GType contacts_view_text_display_get_type (void) G_GNUC_CONST;
266
266
static void _contacts_link_dialog_filter_entry_changed_gtk_editable_changed (GtkEditable* _sender, gpointer self);
267
267
static void contacts_link_dialog_filter_entry_clear (ContactsLinkDialog* self, GtkEntryIconPosition position);
268
268
static void _contacts_link_dialog_filter_entry_clear_gtk_entry_icon_press (GtkEntry* _sender, GtkEntryIconPosition p0, GdkEvent* p1, gpointer self);
269
 
static void __lambda90_ (ContactsLinkDialog* self, ContactsContact* c);
270
 
static void ___lambda90__contacts_view_selection_changed (ContactsView* _sender, ContactsContact* contact, gpointer self);
271
 
static void __lambda91_ (Block27Data* _data27_, gint response_id);
272
 
static void ___lambda92_ (Block27Data* _data27_, GObject* obj, GAsyncResult* _result_);
273
 
static void ____lambda92__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
274
 
static void ___lambda91__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
 
269
static void __lambda88_ (ContactsLinkDialog* self, ContactsContact* c);
 
270
static void ___lambda88__contacts_view_selection_changed (ContactsView* _sender, ContactsContact* contact, gpointer self);
 
271
static void __lambda89_ (Block26Data* _data26_, gint response_id);
 
272
static void ___lambda90_ (Block26Data* _data26_, GObject* obj, GAsyncResult* _result_);
 
273
static void ____lambda90__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
 
274
static void ___lambda89__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
275
275
static void contacts_link_dialog_refilter (ContactsLinkDialog* self);
276
276
gchar* contacts_utils_canonicalize_for_search (const gchar* str);
277
277
void contacts_view_set_filter_values (ContactsView* self, gchar** values, int values_length1);
299
299
}
300
300
 
301
301
 
302
 
static void __lambda85_ (ContactsLinkDialog* self, GtkWidget* w) {
 
302
static void __lambda83_ (ContactsLinkDialog* self, GtkWidget* w) {
303
303
        GtkWidget* _tmp0_;
304
304
        ContactsContact* _tmp1_;
305
305
        FolksIndividual* _tmp2_;
313
313
}
314
314
 
315
315
 
316
 
static void ___lambda85__gtk_callback (GtkWidget* widget, gpointer self) {
317
 
        __lambda85_ (self, widget);
 
316
static void ___lambda83__gtk_callback (GtkWidget* widget, gpointer self) {
 
317
        __lambda83_ (self, widget);
 
318
}
 
319
 
 
320
 
 
321
static Block24Data* block24_data_ref (Block24Data* _data24_) {
 
322
        g_atomic_int_inc (&_data24_->_ref_count_);
 
323
        return _data24_;
 
324
}
 
325
 
 
326
 
 
327
static void block24_data_unref (void * _userdata_) {
 
328
        Block24Data* _data24_;
 
329
        _data24_ = (Block24Data*) _userdata_;
 
330
        if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
 
331
                ContactsLinkDialog * self;
 
332
                self = _data24_->self;
 
333
                _g_free0 (_data24_->selected_contact_name);
 
334
                _g_object_unref0 (self);
 
335
                g_slice_free (Block24Data, _data24_);
 
336
        }
318
337
}
319
338
 
320
339
 
329
348
        _data25_ = (Block25Data*) _userdata_;
330
349
        if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
331
350
                ContactsLinkDialog * self;
332
 
                self = _data25_->self;
333
 
                _g_free0 (_data25_->selected_contact_name);
334
 
                _g_object_unref0 (self);
 
351
                self = _data25_->_data24_->self;
 
352
                _g_object_unref0 (_data25_->undo_bar);
 
353
                _g_object_unref0 (_data25_->operation);
 
354
                block24_data_unref (_data25_->_data24_);
 
355
                _data25_->_data24_ = NULL;
335
356
                g_slice_free (Block25Data, _data25_);
336
357
        }
337
358
}
338
359
 
339
360
 
340
 
static Block26Data* block26_data_ref (Block26Data* _data26_) {
341
 
        g_atomic_int_inc (&_data26_->_ref_count_);
342
 
        return _data26_;
343
 
}
344
 
 
345
 
 
346
 
static void block26_data_unref (void * _userdata_) {
347
 
        Block26Data* _data26_;
348
 
        _data26_ = (Block26Data*) _userdata_;
349
 
        if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
350
 
                ContactsLinkDialog * self;
351
 
                self = _data26_->_data25_->self;
352
 
                _g_object_unref0 (_data26_->undo_bar);
353
 
                _g_object_unref0 (_data26_->operation);
354
 
                block25_data_unref (_data26_->_data25_);
355
 
                _data26_->_data25_ = NULL;
356
 
                g_slice_free (Block26Data, _data26_);
357
 
        }
358
 
}
359
 
 
360
 
 
361
361
static gpointer _g_object_ref0 (gpointer self) {
362
362
        return self ? g_object_ref (self) : NULL;
363
363
}
364
364
 
365
365
 
366
 
static void __lambda88_ (Block26Data* _data26_, gint response_id) {
367
 
        Block25Data* _data25_;
 
366
static void __lambda86_ (Block25Data* _data25_, gint response_id) {
 
367
        Block24Data* _data24_;
368
368
        ContactsLinkDialog * self;
369
369
        gint _tmp0_;
370
 
        _data25_ = _data26_->_data25_;
371
 
        self = _data25_->self;
 
370
        _data24_ = _data25_->_data24_;
 
371
        self = _data24_->self;
372
372
        _tmp0_ = response_id;
373
373
        if (_tmp0_ == ((gint) GTK_RESPONSE_APPLY)) {
374
 
                contacts_link_operation_undo (_data26_->operation, NULL, NULL);
375
 
                gtk_widget_destroy ((GtkWidget*) _data26_->undo_bar);
 
374
                contacts_link_operation_undo (_data25_->operation, NULL, NULL);
 
375
                gtk_widget_destroy ((GtkWidget*) _data25_->undo_bar);
376
376
        }
377
377
}
378
378
 
379
379
 
380
 
static void ___lambda88__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
381
 
        __lambda88_ (self, response_id);
 
380
static void ___lambda86__gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) {
 
381
        __lambda86_ (self, response_id);
382
382
}
383
383
 
384
384
 
385
 
static gboolean __lambda89_ (Block26Data* _data26_) {
386
 
        Block25Data* _data25_;
 
385
static gboolean __lambda87_ (Block25Data* _data25_) {
 
386
        Block24Data* _data24_;
387
387
        ContactsLinkDialog * self;
388
388
        gboolean result = FALSE;
389
 
        _data25_ = _data26_->_data25_;
390
 
        self = _data25_->self;
391
 
        gtk_widget_destroy ((GtkWidget*) _data26_->undo_bar);
 
389
        _data24_ = _data25_->_data24_;
 
390
        self = _data24_->self;
 
391
        gtk_widget_destroy ((GtkWidget*) _data25_->undo_bar);
392
392
        result = FALSE;
393
393
        return result;
394
394
}
395
395
 
396
396
 
397
 
static gboolean ___lambda89__gsource_func (gpointer self) {
 
397
static gboolean ___lambda87__gsource_func (gpointer self) {
398
398
        gboolean result;
399
 
        result = __lambda89_ (self);
 
399
        result = __lambda87_ (self);
400
400
        return result;
401
401
}
402
402
 
403
403
 
404
 
static void __lambda87_ (Block25Data* _data25_, GObject* obj, GAsyncResult* _result_) {
 
404
static void __lambda85_ (Block24Data* _data24_, GObject* obj, GAsyncResult* _result_) {
405
405
        ContactsLinkDialog * self;
406
 
        Block26Data* _data26_;
 
406
        Block25Data* _data25_;
407
407
        GAsyncResult* _tmp0_;
408
408
        ContactsLinkOperation* _tmp1_ = NULL;
409
409
        const gchar* _tmp2_ = NULL;
418
418
        GtkLabel* _tmp10_;
419
419
        GtkLabel* message_label;
420
420
        GtkGrid* _tmp11_;
421
 
        self = _data25_->self;
 
421
        self = _data24_->self;
422
422
        g_return_if_fail (_result_ != NULL);
423
 
        _data26_ = g_slice_new0 (Block26Data);
424
 
        _data26_->_ref_count_ = 1;
425
 
        _data26_->_data25_ = block25_data_ref (_data25_);
 
423
        _data25_ = g_slice_new0 (Block25Data);
 
424
        _data25_->_ref_count_ = 1;
 
425
        _data25_->_data24_ = block24_data_ref (_data24_);
426
426
        _tmp0_ = _result_;
427
427
        _tmp1_ = contacts_link_contacts_finish (_tmp0_);
428
 
        _data26_->operation = _tmp1_;
 
428
        _data25_->operation = _tmp1_;
429
429
        _tmp2_ = _ ("Undo");
430
430
        _tmp3_ = (GtkInfoBar*) gtk_info_bar_new_with_buttons (_tmp2_, GTK_RESPONSE_APPLY, NULL, NULL);
431
431
        g_object_ref_sink (_tmp3_);
432
 
        _data26_->undo_bar = _tmp3_;
433
 
        gtk_info_bar_set_message_type (_data26_->undo_bar, GTK_MESSAGE_INFO);
434
 
        _tmp4_ = gtk_info_bar_get_content_area (_data26_->undo_bar);
 
432
        _data25_->undo_bar = _tmp3_;
 
433
        gtk_info_bar_set_message_type (_data25_->undo_bar, GTK_MESSAGE_INFO);
 
434
        _tmp4_ = gtk_info_bar_get_content_area (_data25_->undo_bar);
435
435
        _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_CONTAINER) ? ((GtkContainer*) _tmp4_) : NULL);
436
436
        container = _tmp5_;
437
437
        _tmp6_ = _ ("%s linked to the contact");
438
 
        _tmp7_ = g_strdup_printf (_tmp6_, _data25_->selected_contact_name);
 
438
        _tmp7_ = g_strdup_printf (_tmp6_, _data24_->selected_contact_name);
439
439
        _tmp8_ = _tmp7_;
440
440
        _tmp9_ = (GtkLabel*) gtk_label_new (_tmp8_);
441
441
        g_object_ref_sink (_tmp9_);
444
444
        message_label = _tmp10_;
445
445
        gtk_label_set_ellipsize (message_label, PANGO_ELLIPSIZE_END);
446
446
        gtk_container_add (container, (GtkWidget*) message_label);
447
 
        g_signal_connect_data (_data26_->undo_bar, "response", (GCallback) ___lambda88__gtk_info_bar_response, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
448
 
        g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 5000, ___lambda89__gsource_func, block26_data_ref (_data26_), block26_data_unref);
 
447
        g_signal_connect_data (_data25_->undo_bar, "response", (GCallback) ___lambda86__gtk_info_bar_response, block25_data_ref (_data25_), (GClosureNotify) block25_data_unref, 0);
 
448
        g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 5000, ___lambda87__gsource_func, block25_data_ref (_data25_), block25_data_unref);
449
449
        _tmp11_ = self->priv->list_grid;
450
 
        gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _data26_->undo_bar);
451
 
        gtk_widget_show_all ((GtkWidget*) _data26_->undo_bar);
 
450
        gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _data25_->undo_bar);
 
451
        gtk_widget_show_all ((GtkWidget*) _data25_->undo_bar);
452
452
        _g_object_unref0 (message_label);
453
453
        _g_object_unref0 (container);
454
 
        block26_data_unref (_data26_);
455
 
        _data26_ = NULL;
456
 
}
457
 
 
458
 
 
459
 
static void ___lambda87__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
460
 
        __lambda87_ (self, source_object, res);
461
 
        block25_data_unref (self);
462
 
}
463
 
 
464
 
 
465
 
static void ___lambda86_ (ContactsLinkDialog* self, GtkButton* button) {
466
 
        Block25Data* _data25_;
 
454
        block25_data_unref (_data25_);
 
455
        _data25_ = NULL;
 
456
}
 
457
 
 
458
 
 
459
static void ___lambda85__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
 
460
        __lambda85_ (self, source_object, res);
 
461
        block24_data_unref (self);
 
462
}
 
463
 
 
464
 
 
465
static void ___lambda84_ (ContactsLinkDialog* self, GtkButton* button) {
 
466
        Block24Data* _data24_;
467
467
        ContactsContact* _tmp0_;
468
468
        const gchar* _tmp1_;
469
469
        const gchar* _tmp2_;
471
471
        ContactsContact* _tmp4_;
472
472
        ContactsContact* _tmp5_;
473
473
        g_return_if_fail (button != NULL);
474
 
        _data25_ = g_slice_new0 (Block25Data);
475
 
        _data25_->_ref_count_ = 1;
476
 
        _data25_->self = g_object_ref (self);
 
474
        _data24_ = g_slice_new0 (Block24Data);
 
475
        _data24_->_ref_count_ = 1;
 
476
        _data24_->self = g_object_ref (self);
477
477
        _tmp0_ = self->priv->selected_contact;
478
478
        _tmp1_ = contacts_contact_get_display_name (_tmp0_);
479
479
        _tmp2_ = _tmp1_;
480
480
        _tmp3_ = g_strdup (_tmp2_);
481
 
        _data25_->selected_contact_name = _tmp3_;
 
481
        _data24_->selected_contact_name = _tmp3_;
482
482
        _tmp4_ = self->priv->contact;
483
483
        _tmp5_ = self->priv->selected_contact;
484
 
        contacts_link_contacts (_tmp4_, _tmp5_, ___lambda87__gasync_ready_callback, block25_data_ref (_data25_));
485
 
        block25_data_unref (_data25_);
486
 
        _data25_ = NULL;
 
484
        contacts_link_contacts (_tmp4_, _tmp5_, ___lambda85__gasync_ready_callback, block24_data_ref (_data24_));
 
485
        block24_data_unref (_data24_);
 
486
        _data24_ = NULL;
487
487
}
488
488
 
489
489
 
490
 
static void ____lambda86__gtk_button_clicked (GtkButton* _sender, gpointer self) {
491
 
        ___lambda86_ (self, _sender);
 
490
static void ____lambda84__gtk_button_clicked (GtkButton* _sender, gpointer self) {
 
491
        ___lambda84_ (self, _sender);
492
492
}
493
493
 
494
494
 
586
586
        image_frame = _tmp4_;
587
587
        _tmp5_ = self->priv->contact;
588
588
        _tmp6_ = image_frame;
589
 
        contacts_contact_keep_widget_uptodate (_tmp5_, (GtkWidget*) _tmp6_, ___lambda85__gtk_callback, self);
 
589
        contacts_contact_keep_widget_uptodate (_tmp5_, (GtkWidget*) _tmp6_, ___lambda83__gtk_callback, self);
590
590
        _tmp7_ = image_frame;
591
591
        gtk_widget_set_hexpand ((GtkWidget*) _tmp7_, FALSE);
592
592
        _tmp8_ = self->priv->persona_grid;
675
675
                _tmp48_ = bbox;
676
676
                gtk_grid_attach (_tmp47_, (GtkWidget*) _tmp48_, 2, 0, 1, 2);
677
677
                _tmp49_ = link_button;
678
 
                g_signal_connect_object (_tmp49_, "clicked", (GCallback) ____lambda86__gtk_button_clicked, self, 0);
 
678
                g_signal_connect_object (_tmp49_, "clicked", (GCallback) ____lambda84__gtk_button_clicked, self, 0);
679
679
                _g_object_unref0 (bbox);
680
680
                _g_object_unref0 (link_button);
681
681
        }
888
888
}
889
889
 
890
890
 
891
 
static Block27Data* block27_data_ref (Block27Data* _data27_) {
892
 
        g_atomic_int_inc (&_data27_->_ref_count_);
893
 
        return _data27_;
 
891
static Block26Data* block26_data_ref (Block26Data* _data26_) {
 
892
        g_atomic_int_inc (&_data26_->_ref_count_);
 
893
        return _data26_;
894
894
}
895
895
 
896
896
 
897
 
static void block27_data_unref (void * _userdata_) {
898
 
        Block27Data* _data27_;
899
 
        _data27_ = (Block27Data*) _userdata_;
900
 
        if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
 
897
static void block26_data_unref (void * _userdata_) {
 
898
        Block26Data* _data26_;
 
899
        _data26_ = (Block26Data*) _userdata_;
 
900
        if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
901
901
                ContactsLinkDialog * self;
902
 
                self = _data27_->self;
903
 
                _g_object_unref0 (_data27_->contact);
 
902
                self = _data26_->self;
 
903
                _g_object_unref0 (_data26_->contact);
904
904
                _g_object_unref0 (self);
905
 
                g_slice_free (Block27Data, _data27_);
 
905
                g_slice_free (Block26Data, _data26_);
906
906
        }
907
907
}
908
908
 
917
917
}
918
918
 
919
919
 
920
 
static void __lambda90_ (ContactsLinkDialog* self, ContactsContact* c) {
 
920
static void __lambda88_ (ContactsLinkDialog* self, ContactsContact* c) {
921
921
        ContactsContact* _tmp0_;
922
922
        ContactsContact* _tmp1_;
923
923
        _tmp0_ = c;
928
928
}
929
929
 
930
930
 
931
 
static void ___lambda90__contacts_view_selection_changed (ContactsView* _sender, ContactsContact* contact, gpointer self) {
932
 
        __lambda90_ (self, contact);
 
931
static void ___lambda88__contacts_view_selection_changed (ContactsView* _sender, ContactsContact* contact, gpointer self) {
 
932
        __lambda88_ (self, contact);
933
933
}
934
934
 
935
935
 
936
 
static void ___lambda92_ (Block27Data* _data27_, GObject* obj, GAsyncResult* _result_) {
 
936
static void ___lambda90_ (Block26Data* _data26_, GObject* obj, GAsyncResult* _result_) {
937
937
        ContactsLinkDialog * self;
938
938
        ContactsContact* _tmp0_;
939
939
        const gchar* _tmp1_;
948
948
        GAsyncResult* _tmp8_;
949
949
        ContactsLinkOperation* _tmp9_ = NULL;
950
950
        ContactsLinkOperation* operation;
951
 
        self = _data27_->self;
 
951
        self = _data26_->self;
952
952
        g_return_if_fail (_result_ != NULL);
953
953
        _tmp0_ = self->priv->selected_contact;
954
954
        _tmp1_ = contacts_contact_get_display_name (_tmp0_);
955
955
        _tmp2_ = _tmp1_;
956
956
        _tmp3_ = g_strdup (_tmp2_);
957
957
        main_contact_name = _tmp3_;
958
 
        _tmp4_ = _data27_->contact;
 
958
        _tmp4_ = _data26_->contact;
959
959
        _tmp5_ = contacts_contact_get_display_name (_tmp4_);
960
960
        _tmp6_ = _tmp5_;
961
961
        _tmp7_ = g_strdup (_tmp6_);
971
971
}
972
972
 
973
973
 
974
 
static void ____lambda92__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
975
 
        ___lambda92_ (self, source_object, res);
976
 
        block27_data_unref (self);
 
974
static void ____lambda90__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
 
975
        ___lambda90_ (self, source_object, res);
 
976
        block26_data_unref (self);
977
977
}
978
978
 
979
979
 
980
 
static void __lambda91_ (Block27Data* _data27_, gint response_id) {
 
980
static void __lambda89_ (Block26Data* _data26_, gint response_id) {
981
981
        ContactsLinkDialog * self;
982
982
        gboolean _tmp0_ = FALSE;
983
983
        gint _tmp1_;
984
984
        gboolean _tmp3_;
985
 
        self = _data27_->self;
 
985
        self = _data26_->self;
986
986
        _tmp1_ = response_id;
987
987
        if (_tmp1_ == ((gint) GTK_RESPONSE_APPLY)) {
988
988
                ContactsContact* _tmp2_;
996
996
                ContactsContact* _tmp4_;
997
997
                ContactsContact* _tmp5_;
998
998
                _tmp4_ = self->priv->selected_contact;
999
 
                _tmp5_ = _data27_->contact;
1000
 
                contacts_link_contacts (_tmp4_, _tmp5_, ____lambda92__gasync_ready_callback, block27_data_ref (_data27_));
 
999
                _tmp5_ = _data26_->contact;
 
1000
                contacts_link_contacts (_tmp4_, _tmp5_, ____lambda90__gasync_ready_callback, block26_data_ref (_data26_));
1001
1001
        } else {
1002
1002
                gtk_widget_destroy ((GtkWidget*) self);
1003
1003
        }
1005
1005
}
1006
1006
 
1007
1007
 
1008
 
static void ___lambda91__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
1009
 
        __lambda91_ (self, response_id);
 
1008
static void ___lambda89__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
 
1009
        __lambda89_ (self, response_id);
1010
1010
}
1011
1011
 
1012
1012
 
1013
1013
ContactsLinkDialog* contacts_link_dialog_construct (GType object_type, ContactsContact* contact) {
1014
1014
        ContactsLinkDialog * self = NULL;
1015
 
        Block27Data* _data27_;
 
1015
        Block26Data* _data26_;
1016
1016
        ContactsContact* _tmp0_;
1017
1017
        ContactsContact* _tmp1_;
1018
1018
        ContactsContact* _tmp2_;
1102
1102
        GtkScrolledWindow* _tmp119_;
1103
1103
        GtkGrid* _tmp120_;
1104
1104
        g_return_val_if_fail (contact != NULL, NULL);
1105
 
        _data27_ = g_slice_new0 (Block27Data);
1106
 
        _data27_->_ref_count_ = 1;
 
1105
        _data26_ = g_slice_new0 (Block26Data);
 
1106
        _data26_->_ref_count_ = 1;
1107
1107
        _tmp0_ = contact;
1108
1108
        _tmp1_ = _g_object_ref0 (_tmp0_);
1109
 
        _data27_->contact = _tmp1_;
 
1109
        _data26_->contact = _tmp1_;
1110
1110
        self = (ContactsLinkDialog*) g_object_new (object_type, NULL);
1111
 
        _data27_->self = g_object_ref (self);
1112
 
        _tmp2_ = _data27_->contact;
 
1111
        _data26_->self = g_object_ref (self);
 
1112
        _tmp2_ = _data26_->contact;
1113
1113
        _tmp3_ = _g_object_ref0 (_tmp2_);
1114
1114
        _g_object_unref0 (self->priv->contact);
1115
1115
        self->priv->contact = _tmp3_;
1119
1119
        _tmp6_ = _tmp5_->window;
1120
1120
        gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) _tmp6_);
1121
1121
        gtk_window_set_modal ((GtkWindow*) self, TRUE);
1122
 
        _tmp7_ = _data27_->contact;
 
1122
        _tmp7_ = _data26_->contact;
1123
1123
        _tmp8_ = _tmp7_->is_main;
1124
1124
        if (_tmp8_) {
1125
1125
                const gchar* _tmp9_ = NULL;
1132
1132
                _tmp11_ = _ ("Link");
1133
1133
                gtk_dialog_add_buttons ((GtkDialog*) self, _tmp10_, GTK_RESPONSE_CANCEL, _tmp11_, GTK_RESPONSE_APPLY, NULL, NULL);
1134
1134
        }
1135
 
        _tmp12_ = _data27_->contact;
 
1135
        _tmp12_ = _data26_->contact;
1136
1136
        _tmp13_ = _tmp12_->store;
1137
1137
        _tmp14_ = contacts_view_new (_tmp13_, CONTACTS_VIEW_TEXT_DISPLAY_STORES);
1138
1138
        g_object_ref_sink (_tmp14_);
1139
1139
        _g_object_unref0 (self->priv->view);
1140
1140
        self->priv->view = _tmp14_;
1141
1141
        _tmp15_ = self->priv->view;
1142
 
        _tmp16_ = _data27_->contact;
 
1142
        _tmp16_ = _data26_->contact;
1143
1143
        contacts_view_hide_contact (_tmp15_, _tmp16_);
1144
 
        _tmp17_ = _data27_->contact;
 
1144
        _tmp17_ = _data26_->contact;
1145
1145
        _tmp18_ = _tmp17_->is_main;
1146
1146
        if (_tmp18_) {
1147
1147
                ContactsView* _tmp19_;
1152
1152
                _tmp20_ = self->priv->view;
1153
1153
                contacts_view_set_show_subset (_tmp20_, CONTACTS_VIEW_SUBSET_ALL_SEPARATED);
1154
1154
        }
1155
 
        _tmp21_ = _data27_->contact;
 
1155
        _tmp21_ = _data26_->contact;
1156
1156
        _tmp22_ = _tmp21_->store;
1157
1157
        _tmp23_ = contacts_store_get_aggregator (_tmp22_);
1158
1158
        _tmp24_ = _tmp23_;
1159
 
        _tmp25_ = _data27_->contact;
 
1159
        _tmp25_ = _data26_->contact;
1160
1160
        _tmp26_ = _tmp25_->individual;
1161
1161
        _tmp27_ = folks_individual_aggregator_get_potential_matches (_tmp24_, _tmp26_, FOLKS_MATCH_RESULT_HIGH);
1162
1162
        matches = _tmp27_;
1238
1238
        _tmp55_ = (GtkLabel*) gtk_label_new ("");
1239
1239
        g_object_ref_sink (_tmp55_);
1240
1240
        label = _tmp55_;
1241
 
        _tmp56_ = _data27_->contact;
 
1241
        _tmp56_ = _data26_->contact;
1242
1242
        _tmp57_ = _tmp56_->is_main;
1243
1243
        if (_tmp57_) {
1244
1244
                GtkLabel* _tmp58_;
1254
1254
                gchar* _tmp68_;
1255
1255
                _tmp58_ = label;
1256
1256
                _tmp59_ = _ ("Link contacts to %s");
1257
 
                _tmp60_ = _data27_->contact;
 
1257
                _tmp60_ = _data26_->contact;
1258
1258
                _tmp61_ = contacts_contact_get_display_name (_tmp60_);
1259
1259
                _tmp62_ = _tmp61_;
1260
1260
                _tmp63_ = g_markup_printf_escaped (_tmp59_, _tmp62_);
1359
1359
        _tmp106_ = scrolled;
1360
1360
        gtk_container_add ((GtkContainer*) _tmp105_, (GtkWidget*) _tmp106_);
1361
1361
        _tmp107_ = self->priv->view;
1362
 
        g_signal_connect_object (_tmp107_, "selection-changed", (GCallback) ___lambda90__contacts_view_selection_changed, self, 0);
 
1362
        g_signal_connect_object (_tmp107_, "selection-changed", (GCallback) ___lambda88__contacts_view_selection_changed, self, 0);
1363
1363
        _tmp108_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
1364
1364
        g_object_ref_sink (_tmp108_);
1365
1365
        _g_object_unref0 (scrolled);
1388
1388
        _tmp119_ = scrolled;
1389
1389
        _tmp120_ = self->priv->persona_grid;
1390
1390
        gtk_scrolled_window_add_with_viewport (_tmp119_, (GtkWidget*) _tmp120_);
1391
 
        g_signal_connect_data ((GtkDialog*) self, "response", (GCallback) ___lambda91__gtk_dialog_response, block27_data_ref (_data27_), (GClosureNotify) block27_data_unref, 0);
 
1391
        g_signal_connect_data ((GtkDialog*) self, "response", (GCallback) ___lambda89__gtk_dialog_response, block26_data_ref (_data26_), (GClosureNotify) block26_data_unref, 0);
1392
1392
        gtk_window_set_default_size ((GtkWindow*) self, 710, 510);
1393
1393
        _g_object_unref0 (scrolled);
1394
1394
        _g_object_unref0 (search_entry_item);
1398
1398
        _g_object_unref0 (container);
1399
1399
        _g_object_unref0 (grid);
1400
1400
        _g_object_unref0 (matches);
1401
 
        block27_data_unref (_data27_);
1402
 
        _data27_ = NULL;
 
1401
        block26_data_unref (_data26_);
 
1402
        _data26_ = NULL;
1403
1403
        return self;
1404
1404
}
1405
1405