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

« back to all changes in this revision

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

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

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* contacts-avatar-dialog.c generated by valac 0.15.1.23-684b1, the Vala compiler
 
1
/* contacts-avatar-dialog.c generated by valac 0.20.1, the Vala compiler
2
2
 * generated from contacts-avatar-dialog.vala, do not modify */
3
3
 
4
4
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
23
23
#include <glib-object.h>
24
24
#include <gtk/gtk.h>
25
25
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
 
26
#include <um-crop-area.h>
 
27
#include <cheese-flash.h>
 
28
#include <cheese/cheese-camera-device-monitor.h>
 
29
#include <cheese/cheese-widget.h>
26
30
#include <gdk-pixbuf/gdk-pixbuf.h>
27
31
#include <math.h>
28
32
#include <folks/folks.h>
31
35
#include <string.h>
32
36
#include <gee.h>
33
37
#include <glib/gi18n-lib.h>
34
 
#include <um-crop-area.h>
35
38
#include <pango/pango.h>
 
39
#include <cheese/cheese-camera-device.h>
 
40
#include <cheese/cheese-camera.h>
36
41
 
37
42
 
38
43
#define CONTACTS_TYPE_AVATAR_DIALOG (contacts_avatar_dialog_get_type ())
66
71
typedef struct _ContactsContactFrame ContactsContactFrame;
67
72
typedef struct _ContactsContactFrameClass ContactsContactFrameClass;
68
73
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
69
 
typedef struct _Block35Data Block35Data;
 
74
typedef struct _Block41Data Block41Data;
70
75
typedef struct _ContactsContactPrivate ContactsContactPrivate;
71
76
 
72
77
#define CONTACTS_TYPE_STORE (contacts_store_get_type ())
80
85
typedef struct _ContactsStoreClass ContactsStoreClass;
81
86
#define _g_free0(var) (var = (g_free (var), NULL))
82
87
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
83
 
typedef struct _Block36Data Block36Data;
84
 
typedef struct _Block37Data Block37Data;
85
 
typedef struct _Block38Data Block38Data;
 
88
typedef struct _Block42Data Block42Data;
 
89
typedef struct _Block43Data Block43Data;
86
90
 
87
91
#define CONTACTS_TYPE_APP (contacts_app_get_type ())
88
92
#define CONTACTS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_APP, ContactsApp))
127
131
struct _ContactsAvatarDialogPrivate {
128
132
        GnomeDesktopThumbnailFactory* thumbnail_factory;
129
133
        ContactsContact* contact;
130
 
        GtkGrid* frame_grid;
131
 
        GtkScrolledWindow* scrolled;
132
 
        GtkToolButton* the_add_button;
133
 
        GtkToolButton* crop_button;
134
 
        GtkToolButton* cancel_button;
 
134
        GtkNotebook* notebook;
 
135
        UmCropArea* crop_area;
135
136
        GtkGrid* view_grid;
136
137
        ContactsContactFrame* main_frame;
 
138
        CheeseFlash* flash;
 
139
        CheeseCameraDeviceMonitor* camera_monitor;
 
140
        CheeseWidget* cheese;
 
141
        gint num_cameras;
137
142
        GdkPixbuf* new_pixbuf;
138
143
};
139
144
 
140
 
struct _Block35Data {
 
145
struct _Block41Data {
141
146
        int _ref_count_;
142
147
        ContactsAvatarDialog * self;
143
148
        GdkPixbuf* avatar_pixbuf;
158
163
        GObjectClass parent_class;
159
164
};
160
165
 
161
 
struct _Block36Data {
 
166
struct _Block42Data {
162
167
        int _ref_count_;
163
168
        ContactsAvatarDialog * self;
164
169
        GtkFileChooserDialog* chooser;
165
170
};
166
171
 
167
 
struct _Block37Data {
168
 
        int _ref_count_;
169
 
        Block36Data * _data36_;
170
 
        UmCropArea* crop_area;
171
 
};
172
 
 
173
 
struct _Block38Data {
 
172
struct _Block43Data {
174
173
        int _ref_count_;
175
174
        ContactsAvatarDialog * self;
 
175
        GtkToolButton* webcam_button;
176
176
        ContactsContact* contact;
177
177
};
178
178
 
180
180
        GtkApplication parent_instance;
181
181
        ContactsAppPrivate * priv;
182
182
        GSettings* settings;
 
183
        ContactsStore* contacts_store;
183
184
        ContactsWindow* window;
184
 
        ContactsStore* contacts_store;
185
185
};
186
186
 
187
187
struct _ContactsAppClass {
204
204
#define CONTACTS_AVATAR_DIALOG_n_columns 6
205
205
static GdkPixbuf* contacts_avatar_dialog_scale_pixbuf_for_avatar_use (ContactsAvatarDialog* self, GdkPixbuf* pixbuf);
206
206
static ContactsContactFrame* contacts_avatar_dialog_create_frame (ContactsAvatarDialog* self, GdkPixbuf* source_pixbuf);
207
 
static Block35Data* block35_data_ref (Block35Data* _data35_);
208
 
static void block35_data_unref (void * _userdata_);
 
207
static Block41Data* block41_data_ref (Block41Data* _data41_);
 
208
static void block41_data_unref (void * _userdata_);
209
209
ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button);
210
210
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
211
211
void contacts_contact_frame_set_pixbuf (ContactsContactFrame* self, GdkPixbuf* a_pixbuf);
212
 
static void __lambda35_ (Block35Data* _data35_);
 
212
static void __lambda55_ (Block41Data* _data41_);
213
213
static void contacts_avatar_dialog_selected_pixbuf (ContactsAvatarDialog* self, GdkPixbuf* pixbuf);
214
 
static void ___lambda35__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self);
 
214
static void ___lambda55__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self);
215
215
static ContactsContactFrame* contacts_avatar_dialog_frame_for_persona (ContactsAvatarDialog* self, FolksPersona* persona);
216
216
static ContactsContactFrame* contacts_avatar_dialog_frame_for_filename (ContactsAvatarDialog* self, const gchar* filename);
217
217
static void contacts_avatar_dialog_update_grid (ContactsAvatarDialog* self);
218
218
GType contacts_store_get_type (void) G_GNUC_CONST;
219
219
gchar** contacts_utils_get_stock_avatars (int* result_length1);
220
220
void contacts_avatar_dialog_update_preview (ContactsAvatarDialog* self, GtkFileChooser* chooser);
 
221
static void contacts_avatar_dialog_set_crop_widget (ContactsAvatarDialog* self, GdkPixbuf* pixbuf);
221
222
static void contacts_avatar_dialog_select_avatar_file_cb (ContactsAvatarDialog* self);
222
 
static Block36Data* block36_data_ref (Block36Data* _data36_);
223
 
static void block36_data_unref (void * _userdata_);
 
223
static Block42Data* block42_data_ref (Block42Data* _data42_);
 
224
static void block42_data_unref (void * _userdata_);
224
225
static void _contacts_avatar_dialog_update_preview_gtk_file_chooser_update_preview (GtkFileChooser* _sender, gpointer self);
225
 
static void __lambda36_ (Block36Data* _data36_, gint response);
226
 
static Block37Data* block37_data_ref (Block37Data* _data37_);
227
 
static void block37_data_unref (void * _userdata_);
228
 
static void ____lambda37_ (Block37Data* _data37_, GtkToolButton* button);
229
 
static void _____lambda37__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
230
 
static void ____lambda38_ (ContactsAvatarDialog* self, GtkToolButton* button);
231
 
static void _____lambda38__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
232
 
static void ___lambda36__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
 
226
static void __lambda56_ (Block42Data* _data42_, gint response);
 
227
static void ___lambda56__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
233
228
ContactsAvatarDialog* contacts_avatar_dialog_new (ContactsContact* contact);
234
229
ContactsAvatarDialog* contacts_avatar_dialog_construct (GType object_type, ContactsContact* contact);
235
 
static Block38Data* block38_data_ref (Block38Data* _data38_);
236
 
static void block38_data_unref (void * _userdata_);
 
230
static Block43Data* block43_data_ref (Block43Data* _data43_);
 
231
static void block43_data_unref (void * _userdata_);
237
232
GType contacts_app_get_type (void) G_GNUC_CONST;
238
233
GType contacts_window_get_type (void) G_GNUC_CONST;
239
234
void contacts_contact_keep_widget_uptodate (ContactsContact* self, GtkWidget* w, GtkCallback callback, void* callback_target);
240
 
static void __lambda39_ (Block38Data* _data38_, GtkWidget* w);
 
235
static void __lambda57_ (Block43Data* _data43_, GtkWidget* w);
241
236
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
242
 
static void ___lambda39__gtk_callback (GtkWidget* widget, gpointer self);
 
237
static void ___lambda57__gtk_callback (GtkWidget* widget, gpointer self);
243
238
const gchar* contacts_contact_get_display_name (ContactsContact* self);
244
239
static void _contacts_avatar_dialog_select_avatar_file_cb_gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
245
 
static void __lambda40_ (ContactsAvatarDialog* self, gint response_id);
 
240
static void __lambda58_ (Block43Data* _data43_);
 
241
static void ___lambda58__cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor* _sender, CheeseCameraDevice* device, gpointer self);
 
242
static void __lambda59_ (Block43Data* _data43_);
 
243
static void ___lambda59__cheese_camera_device_monitor_removed (CheeseCameraDeviceMonitor* _sender, const gchar* uuid, gpointer self);
 
244
static void __lambda60_ (ContactsAvatarDialog* self, GtkToolButton* button);
 
245
static void ___lambda60__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
 
246
static void __lambda61_ (ContactsAvatarDialog* self, GtkToolButton* button);
 
247
static void ___lambda61__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
 
248
static void __lambda62_ (ContactsAvatarDialog* self, GtkToolButton* button);
 
249
static void ___lambda62__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
 
250
static void __lambda63_ (ContactsAvatarDialog* self, GtkToolButton* button);
 
251
static void __lambda64_ (ContactsAvatarDialog* self, GdkPixbuf* pix);
 
252
static void ___lambda64__cheese_camera_photo_taken (CheeseCamera* _sender, GdkPixbuf* pixbuf, gpointer self);
 
253
static void ___lambda63__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
 
254
static void __lambda65_ (ContactsAvatarDialog* self, GtkToolButton* button);
 
255
static void ___lambda65__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self);
 
256
static void __lambda66_ (ContactsAvatarDialog* self, gint response_id);
246
257
ContactsMemoryIcon* contacts_memory_icon_new_from_pixbuf (GdkPixbuf* pixbuf, GError** error);
247
258
ContactsMemoryIcon* contacts_memory_icon_construct_from_pixbuf (GType object_type, GdkPixbuf* pixbuf, GError** error);
248
259
GType contacts_memory_icon_get_type (void) G_GNUC_CONST;
249
 
static void ___lambda40__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
 
260
static void ___lambda66__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
250
261
static void contacts_avatar_dialog_finalize (GObject* obj);
251
262
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
252
263
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
329
340
}
330
341
 
331
342
 
332
 
static Block35Data* block35_data_ref (Block35Data* _data35_) {
333
 
        g_atomic_int_inc (&_data35_->_ref_count_);
334
 
        return _data35_;
 
343
static Block41Data* block41_data_ref (Block41Data* _data41_) {
 
344
        g_atomic_int_inc (&_data41_->_ref_count_);
 
345
        return _data41_;
335
346
}
336
347
 
337
348
 
338
 
static void block35_data_unref (void * _userdata_) {
339
 
        Block35Data* _data35_;
340
 
        _data35_ = (Block35Data*) _userdata_;
341
 
        if (g_atomic_int_dec_and_test (&_data35_->_ref_count_)) {
 
349
static void block41_data_unref (void * _userdata_) {
 
350
        Block41Data* _data41_;
 
351
        _data41_ = (Block41Data*) _userdata_;
 
352
        if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
342
353
                ContactsAvatarDialog * self;
343
 
                self = _data35_->self;
344
 
                _g_object_unref0 (_data35_->avatar_pixbuf);
 
354
                self = _data41_->self;
 
355
                _g_object_unref0 (_data41_->avatar_pixbuf);
345
356
                _g_object_unref0 (self);
346
 
                g_slice_free (Block35Data, _data35_);
 
357
                g_slice_free (Block41Data, _data41_);
347
358
        }
348
359
}
349
360
 
350
361
 
351
 
static void __lambda35_ (Block35Data* _data35_) {
 
362
static void __lambda55_ (Block41Data* _data41_) {
352
363
        ContactsAvatarDialog * self;
353
 
        self = _data35_->self;
354
 
        contacts_avatar_dialog_selected_pixbuf (self, _data35_->avatar_pixbuf);
 
364
        self = _data41_->self;
 
365
        contacts_avatar_dialog_selected_pixbuf (self, _data41_->avatar_pixbuf);
355
366
}
356
367
 
357
368
 
358
 
static void ___lambda35__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self) {
359
 
        __lambda35_ (self);
 
369
static void ___lambda55__contacts_contact_frame_clicked (ContactsContactFrame* _sender, gpointer self) {
 
370
        __lambda55_ (self);
360
371
}
361
372
 
362
373
 
363
374
static ContactsContactFrame* contacts_avatar_dialog_create_frame (ContactsAvatarDialog* self, GdkPixbuf* source_pixbuf) {
364
375
        ContactsContactFrame* result = NULL;
365
 
        Block35Data* _data35_;
 
376
        Block41Data* _data41_;
366
377
        ContactsContactFrame* _tmp0_;
367
 
        ContactsContactFrame* _tmp1_;
368
378
        ContactsContactFrame* image_frame;
369
 
        GdkPixbuf* _tmp2_;
370
 
        GdkPixbuf* _tmp3_ = NULL;
 
379
        GdkPixbuf* _tmp1_;
 
380
        GdkPixbuf* _tmp2_ = NULL;
371
381
        GdkPixbuf* pixbuf;
372
 
        GdkPixbuf* _tmp4_;
373
 
        GdkPixbuf* _tmp5_ = NULL;
 
382
        GdkPixbuf* _tmp3_;
 
383
        GdkPixbuf* _tmp4_ = NULL;
374
384
        g_return_val_if_fail (self != NULL, NULL);
375
385
        g_return_val_if_fail (source_pixbuf != NULL, NULL);
376
 
        _data35_ = g_slice_new0 (Block35Data);
377
 
        _data35_->_ref_count_ = 1;
378
 
        _data35_->self = g_object_ref (self);
 
386
        _data41_ = g_slice_new0 (Block41Data);
 
387
        _data41_->_ref_count_ = 1;
 
388
        _data41_->self = g_object_ref (self);
379
389
        _tmp0_ = contacts_contact_frame_new (CONTACTS_AVATAR_DIALOG_icons_size, TRUE);
380
 
        _tmp1_ = g_object_ref_sink (_tmp0_);
381
 
        image_frame = _tmp1_;
382
 
        _tmp2_ = source_pixbuf;
383
 
        _tmp3_ = gdk_pixbuf_scale_simple (_tmp2_, CONTACTS_AVATAR_DIALOG_icons_size, CONTACTS_AVATAR_DIALOG_icons_size, GDK_INTERP_HYPER);
384
 
        pixbuf = _tmp3_;
 
390
        g_object_ref_sink (_tmp0_);
 
391
        image_frame = _tmp0_;
 
392
        _tmp1_ = source_pixbuf;
 
393
        _tmp2_ = gdk_pixbuf_scale_simple (_tmp1_, CONTACTS_AVATAR_DIALOG_icons_size, CONTACTS_AVATAR_DIALOG_icons_size, GDK_INTERP_HYPER);
 
394
        pixbuf = _tmp2_;
385
395
        contacts_contact_frame_set_pixbuf (image_frame, pixbuf);
386
 
        _tmp4_ = source_pixbuf;
387
 
        _tmp5_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, _tmp4_);
388
 
        _data35_->avatar_pixbuf = _tmp5_;
389
 
        g_signal_connect_data (image_frame, "clicked", (GCallback) ___lambda35__contacts_contact_frame_clicked, block35_data_ref (_data35_), (GClosureNotify) block35_data_unref, 0);
 
396
        _tmp3_ = source_pixbuf;
 
397
        _tmp4_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, _tmp3_);
 
398
        _data41_->avatar_pixbuf = _tmp4_;
 
399
        g_signal_connect_data (image_frame, "clicked", (GCallback) ___lambda55__contacts_contact_frame_clicked, block41_data_ref (_data41_), (GClosureNotify) block41_data_unref, 0);
390
400
        result = image_frame;
391
401
        _g_object_unref0 (pixbuf);
392
 
        block35_data_unref (_data35_);
393
 
        _data35_ = NULL;
 
402
        block41_data_unref (_data41_);
 
403
        _data41_ = NULL;
394
404
        return result;
395
405
}
396
406
 
407
417
        g_return_val_if_fail (self != NULL, NULL);
408
418
        g_return_val_if_fail (persona != NULL, NULL);
409
419
        _tmp0_ = persona;
410
 
        _tmp1_ = _g_object_ref0 (FOLKS_IS_AVATAR_DETAILS (_tmp0_) ? ((FolksAvatarDetails*) _tmp0_) : NULL);
 
420
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, FOLKS_TYPE_AVATAR_DETAILS) ? ((FolksAvatarDetails*) _tmp0_) : NULL);
411
421
        details = _tmp1_;
412
422
        _tmp3_ = details;
413
423
        if (_tmp3_ == NULL) {
444
454
                _tmp11_ = g_loadable_icon_load (_tmp10_, 128, NULL, NULL, &_inner_error_);
445
455
                stream = _tmp11_;
446
456
                if (_inner_error_ != NULL) {
447
 
                        goto __catch27_g_error;
 
457
                        goto __catch25_g_error;
448
458
                }
449
459
                _tmp12_ = stream;
450
460
                _tmp13_ = gdk_pixbuf_new_from_stream (_tmp12_, NULL, &_inner_error_);
451
461
                pixbuf = _tmp13_;
452
462
                if (_inner_error_ != NULL) {
453
463
                        _g_object_unref0 (stream);
454
 
                        goto __catch27_g_error;
 
464
                        goto __catch25_g_error;
455
465
                }
456
466
                _tmp14_ = pixbuf;
457
467
                _tmp15_ = contacts_avatar_dialog_create_frame (self, _tmp14_);
461
471
                _g_object_unref0 (details);
462
472
                return result;
463
473
        }
464
 
        goto __finally27;
465
 
        __catch27_g_error:
 
474
        goto __finally25;
 
475
        __catch25_g_error:
466
476
        {
467
477
                g_clear_error (&_inner_error_);
468
478
                _inner_error_ = NULL;
469
479
        }
470
 
        __finally27:
 
480
        __finally25:
471
481
        if (_inner_error_ != NULL) {
472
482
                _g_object_unref0 (details);
473
483
                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);
496
506
                _tmp1_ = gdk_pixbuf_new_from_file (_tmp0_, &_inner_error_);
497
507
                pixbuf = _tmp1_;
498
508
                if (_inner_error_ != NULL) {
499
 
                        goto __catch28_g_error;
 
509
                        goto __catch26_g_error;
500
510
                }
501
511
                _tmp2_ = contacts_avatar_dialog_create_frame (self, pixbuf);
502
512
                result = _tmp2_;
504
514
                _g_object_unref0 (image_frame);
505
515
                return result;
506
516
        }
507
 
        goto __finally28;
508
 
        __catch28_g_error:
 
517
        goto __finally26;
 
518
        __catch26_g_error:
509
519
        {
510
520
                g_clear_error (&_inner_error_);
511
521
                _inner_error_ = NULL;
512
522
        }
513
 
        __finally28:
 
523
        __finally26:
514
524
        if (_inner_error_ != NULL) {
515
525
                _g_object_unref0 (image_frame);
516
526
                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);
549
559
        gint j;
550
560
        gint _tmp20_;
551
561
        gint _tmp22_;
552
 
        gint _tmp28_ = 0;
553
 
        gchar** _tmp29_ = NULL;
 
562
        gint _tmp27_ = 0;
 
563
        gchar** _tmp28_ = NULL;
554
564
        gchar** stock_files;
555
565
        gint stock_files_length1;
556
566
        gint _stock_files_size_;
557
 
        gchar** _tmp30_;
558
 
        gint _tmp30__length1;
559
 
        GtkGrid* _tmp43_;
 
567
        gchar** _tmp29_;
 
568
        gint _tmp29__length1;
 
569
        GtkGrid* _tmp42_;
560
570
        g_return_if_fail (self != NULL);
561
571
        i = 0;
562
572
        j = 0;
634
644
        _tmp22_ = j;
635
645
        if (_tmp22_ != 0) {
636
646
                GtkSeparator* _tmp23_;
637
 
                GtkSeparator* _tmp24_;
638
647
                GtkSeparator* s;
639
 
                GtkGrid* _tmp25_;
640
 
                GtkSeparator* _tmp26_;
641
 
                gint _tmp27_;
 
648
                GtkGrid* _tmp24_;
 
649
                GtkSeparator* _tmp25_;
 
650
                gint _tmp26_;
642
651
                _tmp23_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
643
 
                _tmp24_ = g_object_ref_sink (_tmp23_);
644
 
                s = _tmp24_;
645
 
                _tmp25_ = self->priv->view_grid;
646
 
                _tmp26_ = s;
647
 
                _tmp27_ = j;
648
 
                j = _tmp27_ + 1;
649
 
                gtk_grid_attach (_tmp25_, (GtkWidget*) _tmp26_, 0, _tmp27_, CONTACTS_AVATAR_DIALOG_n_columns, 1);
 
652
                g_object_ref_sink (_tmp23_);
 
653
                s = _tmp23_;
 
654
                _tmp24_ = self->priv->view_grid;
 
655
                _tmp25_ = s;
 
656
                _tmp26_ = j;
 
657
                j = _tmp26_ + 1;
 
658
                gtk_grid_attach (_tmp24_, (GtkWidget*) _tmp25_, 0, _tmp26_, CONTACTS_AVATAR_DIALOG_n_columns, 1);
650
659
                _g_object_unref0 (s);
651
660
        }
652
 
        _tmp29_ = contacts_utils_get_stock_avatars (&_tmp28_);
653
 
        stock_files = _tmp29_;
654
 
        stock_files_length1 = _tmp28_;
 
661
        _tmp28_ = contacts_utils_get_stock_avatars (&_tmp27_);
 
662
        stock_files = _tmp28_;
 
663
        stock_files_length1 = _tmp27_;
655
664
        _stock_files_size_ = stock_files_length1;
656
 
        _tmp30_ = stock_files;
657
 
        _tmp30__length1 = stock_files_length1;
 
665
        _tmp29_ = stock_files;
 
666
        _tmp29__length1 = stock_files_length1;
658
667
        {
659
668
                gchar** file_name_collection = NULL;
660
669
                gint file_name_collection_length1 = 0;
661
670
                gint _file_name_collection_size_ = 0;
662
671
                gint file_name_it = 0;
663
 
                file_name_collection = _tmp30_;
664
 
                file_name_collection_length1 = _tmp30__length1;
665
 
                for (file_name_it = 0; file_name_it < _tmp30__length1; file_name_it = file_name_it + 1) {
666
 
                        gchar* _tmp31_;
 
672
                file_name_collection = _tmp29_;
 
673
                file_name_collection_length1 = _tmp29__length1;
 
674
                for (file_name_it = 0; file_name_it < _tmp29__length1; file_name_it = file_name_it + 1) {
 
675
                        gchar* _tmp30_;
667
676
                        gchar* file_name = NULL;
668
 
                        _tmp31_ = g_strdup (file_name_collection[file_name_it]);
669
 
                        file_name = _tmp31_;
 
677
                        _tmp30_ = g_strdup (file_name_collection[file_name_it]);
 
678
                        file_name = _tmp30_;
670
679
                        {
671
 
                                const gchar* _tmp32_;
672
 
                                ContactsContactFrame* _tmp33_ = NULL;
 
680
                                const gchar* _tmp31_;
 
681
                                ContactsContactFrame* _tmp32_ = NULL;
673
682
                                ContactsContactFrame* frame;
674
 
                                ContactsContactFrame* _tmp34_;
675
 
                                _tmp32_ = file_name;
676
 
                                _tmp33_ = contacts_avatar_dialog_frame_for_filename (self, _tmp32_);
677
 
                                frame = _tmp33_;
678
 
                                _tmp34_ = frame;
679
 
                                if (_tmp34_ != NULL) {
680
 
                                        GtkGrid* _tmp35_;
681
 
                                        ContactsContactFrame* _tmp36_;
 
683
                                ContactsContactFrame* _tmp33_;
 
684
                                _tmp31_ = file_name;
 
685
                                _tmp32_ = contacts_avatar_dialog_frame_for_filename (self, _tmp31_);
 
686
                                frame = _tmp32_;
 
687
                                _tmp33_ = frame;
 
688
                                if (_tmp33_ != NULL) {
 
689
                                        GtkGrid* _tmp34_;
 
690
                                        ContactsContactFrame* _tmp35_;
 
691
                                        gint _tmp36_;
682
692
                                        gint _tmp37_;
683
693
                                        gint _tmp38_;
684
694
                                        gint _tmp39_;
685
 
                                        gint _tmp40_;
686
 
                                        _tmp35_ = self->priv->view_grid;
687
 
                                        _tmp36_ = frame;
688
 
                                        _tmp37_ = i;
689
 
                                        _tmp38_ = j;
690
 
                                        gtk_grid_attach (_tmp35_, (GtkWidget*) _tmp36_, _tmp37_, _tmp38_, 1, 1);
 
695
                                        _tmp34_ = self->priv->view_grid;
 
696
                                        _tmp35_ = frame;
 
697
                                        _tmp36_ = i;
 
698
                                        _tmp37_ = j;
 
699
                                        gtk_grid_attach (_tmp34_, (GtkWidget*) _tmp35_, _tmp36_, _tmp37_, 1, 1);
 
700
                                        _tmp38_ = i;
 
701
                                        i = _tmp38_ + 1;
691
702
                                        _tmp39_ = i;
692
 
                                        i = _tmp39_ + 1;
693
 
                                        _tmp40_ = i;
694
 
                                        if (_tmp40_ >= CONTACTS_AVATAR_DIALOG_n_columns) {
 
703
                                        if (_tmp39_ >= CONTACTS_AVATAR_DIALOG_n_columns) {
 
704
                                                gint _tmp40_;
695
705
                                                gint _tmp41_;
696
 
                                                gint _tmp42_;
697
 
                                                _tmp41_ = i;
698
 
                                                i = _tmp41_ - CONTACTS_AVATAR_DIALOG_n_columns;
699
 
                                                _tmp42_ = j;
700
 
                                                j = _tmp42_ + 1;
 
706
                                                _tmp40_ = i;
 
707
                                                i = _tmp40_ - CONTACTS_AVATAR_DIALOG_n_columns;
 
708
                                                _tmp41_ = j;
 
709
                                                j = _tmp41_ + 1;
701
710
                                        }
702
711
                                }
703
712
                                _g_object_unref0 (frame);
705
714
                        }
706
715
                }
707
716
        }
708
 
        _tmp43_ = self->priv->view_grid;
709
 
        gtk_widget_show_all ((GtkWidget*) _tmp43_);
 
717
        _tmp42_ = self->priv->view_grid;
 
718
        gtk_widget_show_all ((GtkWidget*) _tmp42_);
710
719
        stock_files = (_vala_array_free (stock_files, stock_files_length1, (GDestroyNotify) g_free), NULL);
711
720
}
712
721
 
739
748
                pixbuf = NULL;
740
749
                _tmp3_ = chooser;
741
750
                _tmp4_ = gtk_file_chooser_get_preview_widget (_tmp3_);
742
 
                _tmp5_ = _g_object_ref0 (GTK_IS_IMAGE (_tmp4_) ? ((GtkImage*) _tmp4_) : NULL);
 
751
                _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, GTK_TYPE_IMAGE) ? ((GtkImage*) _tmp4_) : NULL);
743
752
                preview = _tmp5_;
744
753
                _tmp6_ = uri;
745
754
                _tmp7_ = g_file_new_for_uri (_tmp6_);
753
762
                        _tmp9_ = g_file_query_info (_tmp8_, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_);
754
763
                        file_info = _tmp9_;
755
764
                        if (_inner_error_ != NULL) {
756
 
                                goto __catch29_g_error;
 
765
                                goto __catch27_g_error;
757
766
                        }
758
767
                        _tmp10_ = file_info;
759
768
                        if (_tmp10_ != NULL) {
785
794
                        }
786
795
                        _g_object_unref0 (file_info);
787
796
                }
788
 
                goto __finally29;
789
 
                __catch29_g_error:
 
797
                goto __finally27;
 
798
                __catch27_g_error:
790
799
                {
791
800
                        GError* e = NULL;
792
801
                        e = _inner_error_;
793
802
                        _inner_error_ = NULL;
794
803
                        _g_error_free0 (e);
795
804
                }
796
 
                __finally29:
 
805
                __finally27:
797
806
                if (_inner_error_ != NULL) {
798
807
                        _g_object_unref0 (file);
799
808
                        _g_object_unref0 (preview);
805
814
                }
806
815
                _tmp20_ = chooser;
807
816
                _tmp21_ = pixbuf;
808
 
                gtk_dialog_set_response_sensitive (GTK_IS_DIALOG (_tmp20_) ? ((GtkDialog*) _tmp20_) : NULL, (gint) GTK_RESPONSE_ACCEPT, _tmp21_ != NULL);
 
817
                gtk_dialog_set_response_sensitive (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, GTK_TYPE_DIALOG) ? ((GtkDialog*) _tmp20_) : NULL, (gint) GTK_RESPONSE_ACCEPT, _tmp21_ != NULL);
809
818
                _tmp22_ = pixbuf;
810
819
                if (_tmp22_ != NULL) {
811
820
                        GtkImage* _tmp23_;
828
837
}
829
838
 
830
839
 
831
 
static Block36Data* block36_data_ref (Block36Data* _data36_) {
832
 
        g_atomic_int_inc (&_data36_->_ref_count_);
833
 
        return _data36_;
834
 
}
835
 
 
836
 
 
837
 
static void block36_data_unref (void * _userdata_) {
838
 
        Block36Data* _data36_;
839
 
        _data36_ = (Block36Data*) _userdata_;
840
 
        if (g_atomic_int_dec_and_test (&_data36_->_ref_count_)) {
 
840
static void contacts_avatar_dialog_set_crop_widget (ContactsAvatarDialog* self, GdkPixbuf* pixbuf) {
 
841
        GtkNotebook* _tmp0_;
 
842
        GtkWidget* _tmp1_ = NULL;
 
843
        GtkGrid* _tmp2_;
 
844
        GtkGrid* frame_grid;
 
845
        UmCropArea* _tmp3_;
 
846
        UmCropArea* _tmp4_;
 
847
        UmCropArea* _tmp5_;
 
848
        UmCropArea* _tmp6_;
 
849
        UmCropArea* _tmp7_;
 
850
        UmCropArea* _tmp8_;
 
851
        GdkPixbuf* _tmp9_;
 
852
        UmCropArea* _tmp10_;
 
853
        GtkNotebook* _tmp11_;
 
854
        g_return_if_fail (self != NULL);
 
855
        g_return_if_fail (pixbuf != NULL);
 
856
        _tmp0_ = self->priv->notebook;
 
857
        _tmp1_ = gtk_notebook_get_nth_page (_tmp0_, 1);
 
858
        _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp1_) : NULL);
 
859
        frame_grid = _tmp2_;
 
860
        _tmp3_ = (UmCropArea*) um_crop_area_new ();
 
861
        g_object_ref_sink (_tmp3_);
 
862
        _g_object_unref0 (self->priv->crop_area);
 
863
        self->priv->crop_area = _tmp3_;
 
864
        _tmp4_ = self->priv->crop_area;
 
865
        gtk_widget_set_vexpand ((GtkWidget*) _tmp4_, TRUE);
 
866
        _tmp5_ = self->priv->crop_area;
 
867
        gtk_widget_set_hexpand ((GtkWidget*) _tmp5_, TRUE);
 
868
        _tmp6_ = self->priv->crop_area;
 
869
        um_crop_area_set_min_size (_tmp6_, 48, 48);
 
870
        _tmp7_ = self->priv->crop_area;
 
871
        um_crop_area_set_constrain_aspect (_tmp7_, TRUE);
 
872
        _tmp8_ = self->priv->crop_area;
 
873
        _tmp9_ = pixbuf;
 
874
        um_crop_area_set_picture (_tmp8_, _tmp9_);
 
875
        _tmp10_ = self->priv->crop_area;
 
876
        gtk_grid_attach (frame_grid, (GtkWidget*) _tmp10_, 0, 0, 1, 1);
 
877
        gtk_widget_show_all ((GtkWidget*) frame_grid);
 
878
        _tmp11_ = self->priv->notebook;
 
879
        gtk_notebook_set_current_page (_tmp11_, 1);
 
880
        _g_object_unref0 (frame_grid);
 
881
}
 
882
 
 
883
 
 
884
static Block42Data* block42_data_ref (Block42Data* _data42_) {
 
885
        g_atomic_int_inc (&_data42_->_ref_count_);
 
886
        return _data42_;
 
887
}
 
888
 
 
889
 
 
890
static void block42_data_unref (void * _userdata_) {
 
891
        Block42Data* _data42_;
 
892
        _data42_ = (Block42Data*) _userdata_;
 
893
        if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
841
894
                ContactsAvatarDialog * self;
842
 
                self = _data36_->self;
843
 
                _g_object_unref0 (_data36_->chooser);
 
895
                self = _data42_->self;
 
896
                _g_object_unref0 (_data42_->chooser);
844
897
                _g_object_unref0 (self);
845
 
                g_slice_free (Block36Data, _data36_);
 
898
                g_slice_free (Block42Data, _data42_);
846
899
        }
847
900
}
848
901
 
852
905
}
853
906
 
854
907
 
855
 
static Block37Data* block37_data_ref (Block37Data* _data37_) {
856
 
        g_atomic_int_inc (&_data37_->_ref_count_);
857
 
        return _data37_;
858
 
}
859
 
 
860
 
 
861
 
static void block37_data_unref (void * _userdata_) {
862
 
        Block37Data* _data37_;
863
 
        _data37_ = (Block37Data*) _userdata_;
864
 
        if (g_atomic_int_dec_and_test (&_data37_->_ref_count_)) {
865
 
                ContactsAvatarDialog * self;
866
 
                self = _data37_->_data36_->self;
867
 
                _g_object_unref0 (_data37_->crop_area);
868
 
                block36_data_unref (_data37_->_data36_);
869
 
                _data37_->_data36_ = NULL;
870
 
                g_slice_free (Block37Data, _data37_);
871
 
        }
872
 
}
873
 
 
874
 
 
875
 
static void ____lambda37_ (Block37Data* _data37_, GtkToolButton* button) {
876
 
        Block36Data* _data36_;
877
 
        ContactsAvatarDialog * self;
878
 
        UmCropArea* _tmp0_;
879
 
        GdkPixbuf* _tmp1_ = NULL;
880
 
        GdkPixbuf* pix;
881
 
        GdkPixbuf* _tmp2_ = NULL;
882
 
        GdkPixbuf* _tmp3_;
883
 
        UmCropArea* _tmp4_;
884
 
        GtkToolButton* _tmp5_;
885
 
        GtkToolButton* _tmp6_;
886
 
        GtkScrolledWindow* _tmp7_;
887
 
        GtkToolButton* _tmp8_;
888
 
        _data36_ = _data37_->_data36_;
889
 
        self = _data36_->self;
890
 
        g_return_if_fail (button != NULL);
891
 
        _tmp0_ = _data37_->crop_area;
892
 
        _tmp1_ = um_crop_area_get_picture (_tmp0_);
893
 
        pix = _tmp1_;
894
 
        _tmp2_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, pix);
895
 
        _tmp3_ = _tmp2_;
896
 
        contacts_avatar_dialog_selected_pixbuf (self, _tmp3_);
897
 
        _g_object_unref0 (_tmp3_);
898
 
        _tmp4_ = _data37_->crop_area;
899
 
        gtk_widget_destroy ((GtkWidget*) _tmp4_);
900
 
        _tmp5_ = self->priv->crop_button;
901
 
        gtk_widget_hide ((GtkWidget*) _tmp5_);
902
 
        _tmp6_ = self->priv->cancel_button;
903
 
        gtk_widget_hide ((GtkWidget*) _tmp6_);
904
 
        _tmp7_ = self->priv->scrolled;
905
 
        gtk_widget_show ((GtkWidget*) _tmp7_);
906
 
        _tmp8_ = self->priv->the_add_button;
907
 
        gtk_widget_show ((GtkWidget*) _tmp8_);
908
 
        _g_object_unref0 (pix);
909
 
}
910
 
 
911
 
 
912
 
static void _____lambda37__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
913
 
        ____lambda37_ (self, _sender);
914
 
}
915
 
 
916
 
 
917
 
static void ____lambda38_ (ContactsAvatarDialog* self, GtkToolButton* button) {
918
 
        GtkToolButton* _tmp0_;
919
 
        GtkToolButton* _tmp1_;
920
 
        GtkScrolledWindow* _tmp2_;
921
 
        GtkToolButton* _tmp3_;
922
 
        g_return_if_fail (button != NULL);
923
 
        _tmp0_ = self->priv->crop_button;
924
 
        gtk_widget_hide ((GtkWidget*) _tmp0_);
925
 
        _tmp1_ = self->priv->cancel_button;
926
 
        gtk_widget_hide ((GtkWidget*) _tmp1_);
927
 
        _tmp2_ = self->priv->scrolled;
928
 
        gtk_widget_show ((GtkWidget*) _tmp2_);
929
 
        _tmp3_ = self->priv->the_add_button;
930
 
        gtk_widget_show ((GtkWidget*) _tmp3_);
931
 
}
932
 
 
933
 
 
934
 
static void _____lambda38__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
935
 
        ____lambda38_ (self, _sender);
936
 
}
937
 
 
938
 
 
939
 
static void __lambda36_ (Block36Data* _data36_, gint response) {
 
908
static void __lambda56_ (Block42Data* _data42_, gint response) {
940
909
        ContactsAvatarDialog * self;
941
910
        gint _tmp0_;
942
 
        GtkFileChooserDialog* _tmp39_;
 
911
        GtkFileChooserDialog* _tmp22_;
943
912
        GError * _inner_error_ = NULL;
944
 
        self = _data36_->self;
 
913
        self = _data42_->self;
945
914
        _tmp0_ = response;
946
915
        if (_tmp0_ != ((gint) GTK_RESPONSE_ACCEPT)) {
947
916
                GtkFileChooserDialog* _tmp1_;
948
 
                _tmp1_ = _data36_->chooser;
 
917
                _tmp1_ = _data42_->chooser;
949
918
                gtk_widget_destroy ((GtkWidget*) _tmp1_);
950
919
                return;
951
920
        }
967
936
                GdkPixbuf* _tmp13_;
968
937
                gint _tmp14_ = 0;
969
938
                gboolean _tmp17_;
970
 
                _tmp2_ = _data36_->chooser;
 
939
                _tmp2_ = _data42_->chooser;
971
940
                _tmp3_ = gtk_file_chooser_get_uri ((GtkFileChooser*) _tmp2_);
972
941
                _tmp4_ = _tmp3_;
973
942
                _tmp5_ = g_file_new_for_uri (_tmp4_);
979
948
                in_stream = _tmp8_;
980
949
                if (_inner_error_ != NULL) {
981
950
                        _g_object_unref0 (file);
982
 
                        goto __catch30_g_error;
 
951
                        goto __catch28_g_error;
983
952
                }
984
953
                _tmp9_ = in_stream;
985
954
                _tmp10_ = gdk_pixbuf_new_from_stream ((GInputStream*) _tmp9_, NULL, &_inner_error_);
987
956
                if (_inner_error_ != NULL) {
988
957
                        _g_object_unref0 (in_stream);
989
958
                        _g_object_unref0 (file);
990
 
                        goto __catch30_g_error;
 
959
                        goto __catch28_g_error;
991
960
                }
992
961
                _tmp11_ = in_stream;
993
962
                g_input_stream_close ((GInputStream*) _tmp11_, NULL, &_inner_error_);
995
964
                        _g_object_unref0 (pixbuf);
996
965
                        _g_object_unref0 (in_stream);
997
966
                        _g_object_unref0 (file);
998
 
                        goto __catch30_g_error;
 
967
                        goto __catch28_g_error;
999
968
                }
1000
969
                _tmp13_ = pixbuf;
1001
970
                _tmp14_ = gdk_pixbuf_get_width (_tmp13_);
1010
979
                }
1011
980
                _tmp17_ = _tmp12_;
1012
981
                if (_tmp17_) {
1013
 
                        Block37Data* _data37_;
1014
 
                        UmCropArea* _tmp18_;
1015
 
                        UmCropArea* _tmp19_;
1016
 
                        UmCropArea* _tmp20_;
1017
 
                        UmCropArea* _tmp21_;
1018
 
                        UmCropArea* _tmp22_;
1019
 
                        UmCropArea* _tmp23_;
1020
 
                        UmCropArea* _tmp24_;
1021
 
                        GdkPixbuf* _tmp25_;
1022
 
                        GtkGrid* _tmp26_;
1023
 
                        UmCropArea* _tmp27_;
1024
 
                        GtkScrolledWindow* _tmp28_;
1025
 
                        UmCropArea* _tmp29_;
1026
 
                        GtkToolButton* _tmp30_;
1027
 
                        GtkToolButton* _tmp31_;
1028
 
                        GtkToolButton* _tmp32_;
1029
 
                        GtkToolButton* _tmp33_;
1030
 
                        GtkToolButton* _tmp34_;
1031
 
                        GtkScrolledWindow* _tmp35_;
1032
 
                        _data37_ = g_slice_new0 (Block37Data);
1033
 
                        _data37_->_ref_count_ = 1;
1034
 
                        _data37_->_data36_ = block36_data_ref (_data36_);
1035
 
                        _tmp18_ = (UmCropArea*) um_crop_area_new ();
1036
 
                        _tmp19_ = g_object_ref_sink (_tmp18_);
1037
 
                        _data37_->crop_area = _tmp19_;
1038
 
                        _tmp20_ = _data37_->crop_area;
1039
 
                        gtk_widget_set_vexpand ((GtkWidget*) _tmp20_, TRUE);
1040
 
                        _tmp21_ = _data37_->crop_area;
1041
 
                        gtk_widget_set_hexpand ((GtkWidget*) _tmp21_, TRUE);
1042
 
                        _tmp22_ = _data37_->crop_area;
1043
 
                        um_crop_area_set_min_size (_tmp22_, 48, 48);
1044
 
                        _tmp23_ = _data37_->crop_area;
1045
 
                        um_crop_area_set_constrain_aspect (_tmp23_, TRUE);
1046
 
                        _tmp24_ = _data37_->crop_area;
1047
 
                        _tmp25_ = pixbuf;
1048
 
                        um_crop_area_set_picture (_tmp24_, _tmp25_);
1049
 
                        _tmp26_ = self->priv->frame_grid;
1050
 
                        _tmp27_ = _data37_->crop_area;
1051
 
                        _tmp28_ = self->priv->scrolled;
1052
 
                        gtk_grid_attach_next_to (_tmp26_, (GtkWidget*) _tmp27_, (GtkWidget*) _tmp28_, GTK_POS_TOP, 1, 1);
1053
 
                        _tmp29_ = _data37_->crop_area;
1054
 
                        gtk_widget_show ((GtkWidget*) _tmp29_);
1055
 
                        _tmp30_ = self->priv->crop_button;
1056
 
                        gtk_widget_show ((GtkWidget*) _tmp30_);
1057
 
                        _tmp31_ = self->priv->crop_button;
1058
 
                        g_signal_connect_data (_tmp31_, "clicked", (GCallback) _____lambda37__gtk_tool_button_clicked, block37_data_ref (_data37_), (GClosureNotify) block37_data_unref, 0);
1059
 
                        _tmp32_ = self->priv->cancel_button;
1060
 
                        gtk_widget_show ((GtkWidget*) _tmp32_);
1061
 
                        _tmp33_ = self->priv->cancel_button;
1062
 
                        g_signal_connect_object (_tmp33_, "clicked", (GCallback) _____lambda38__gtk_tool_button_clicked, self, 0);
1063
 
                        _tmp34_ = self->priv->the_add_button;
1064
 
                        gtk_widget_hide ((GtkWidget*) _tmp34_);
1065
 
                        _tmp35_ = self->priv->scrolled;
1066
 
                        gtk_widget_hide ((GtkWidget*) _tmp35_);
1067
 
                        block37_data_unref (_data37_);
1068
 
                        _data37_ = NULL;
 
982
                        GdkPixbuf* _tmp18_;
 
983
                        _tmp18_ = pixbuf;
 
984
                        contacts_avatar_dialog_set_crop_widget (self, _tmp18_);
1069
985
                } else {
1070
 
                        GdkPixbuf* _tmp36_;
1071
 
                        GdkPixbuf* _tmp37_ = NULL;
1072
 
                        GdkPixbuf* _tmp38_;
1073
 
                        _tmp36_ = pixbuf;
1074
 
                        _tmp37_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, _tmp36_);
1075
 
                        _tmp38_ = _tmp37_;
1076
 
                        contacts_avatar_dialog_selected_pixbuf (self, _tmp38_);
1077
 
                        _g_object_unref0 (_tmp38_);
 
986
                        GdkPixbuf* _tmp19_;
 
987
                        GdkPixbuf* _tmp20_ = NULL;
 
988
                        GdkPixbuf* _tmp21_;
 
989
                        _tmp19_ = pixbuf;
 
990
                        _tmp20_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, _tmp19_);
 
991
                        _tmp21_ = _tmp20_;
 
992
                        contacts_avatar_dialog_selected_pixbuf (self, _tmp21_);
 
993
                        _g_object_unref0 (_tmp21_);
1078
994
                }
1079
995
                contacts_avatar_dialog_update_grid (self);
1080
996
                _g_object_unref0 (pixbuf);
1081
997
                _g_object_unref0 (in_stream);
1082
998
                _g_object_unref0 (file);
1083
999
        }
1084
 
        goto __finally30;
1085
 
        __catch30_g_error:
 
1000
        goto __finally28;
 
1001
        __catch28_g_error:
1086
1002
        {
1087
1003
                g_clear_error (&_inner_error_);
1088
1004
                _inner_error_ = NULL;
1089
1005
        }
1090
 
        __finally30:
 
1006
        __finally28:
1091
1007
        if (_inner_error_ != NULL) {
1092
1008
                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);
1093
1009
                g_clear_error (&_inner_error_);
1094
1010
                return;
1095
1011
        }
1096
 
        _tmp39_ = _data36_->chooser;
1097
 
        gtk_widget_destroy ((GtkWidget*) _tmp39_);
 
1012
        _tmp22_ = _data42_->chooser;
 
1013
        gtk_widget_destroy ((GtkWidget*) _tmp22_);
1098
1014
}
1099
1015
 
1100
1016
 
1101
 
static void ___lambda36__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
1102
 
        __lambda36_ (self, response_id);
 
1017
static void ___lambda56__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
 
1018
        __lambda56_ (self, response_id);
1103
1019
}
1104
1020
 
1105
1021
 
1106
1022
static void contacts_avatar_dialog_select_avatar_file_cb (ContactsAvatarDialog* self) {
1107
 
        Block36Data* _data36_;
 
1023
        Block42Data* _data42_;
1108
1024
        const gchar* _tmp0_ = NULL;
1109
1025
        GtkWidget* _tmp1_ = NULL;
1110
1026
        GtkFileChooserDialog* _tmp2_;
1111
1027
        GtkFileChooserDialog* _tmp3_;
1112
1028
        GtkFileChooserDialog* _tmp4_;
1113
 
        GtkFileChooserDialog* _tmp5_;
 
1029
        GtkImage* _tmp5_;
 
1030
        GtkImage* preview;
1114
1031
        GtkImage* _tmp6_;
1115
 
        GtkImage* _tmp7_;
1116
 
        GtkImage* preview;
 
1032
        GtkFileChooserDialog* _tmp7_;
1117
1033
        GtkImage* _tmp8_;
1118
1034
        GtkFileChooserDialog* _tmp9_;
1119
1035
        GtkImage* _tmp10_;
1120
1036
        GtkFileChooserDialog* _tmp11_;
1121
 
        GtkImage* _tmp12_;
1122
 
        GtkFileChooserDialog* _tmp13_;
1123
 
        const gchar* _tmp14_ = NULL;
1124
 
        gchar* _tmp15_;
 
1037
        const gchar* _tmp12_ = NULL;
 
1038
        gchar* _tmp13_;
1125
1039
        gchar* folder;
1126
 
        const gchar* _tmp16_;
1127
 
        GtkFileChooserDialog* _tmp19_;
1128
 
        GtkFileChooserDialog* _tmp20_;
 
1040
        const gchar* _tmp14_;
 
1041
        GtkFileChooserDialog* _tmp17_;
 
1042
        GtkFileChooserDialog* _tmp18_;
1129
1043
        g_return_if_fail (self != NULL);
1130
 
        _data36_ = g_slice_new0 (Block36Data);
1131
 
        _data36_->_ref_count_ = 1;
1132
 
        _data36_->self = g_object_ref (self);
 
1044
        _data42_ = g_slice_new0 (Block42Data);
 
1045
        _data42_->_ref_count_ = 1;
 
1046
        _data42_->self = g_object_ref (self);
1133
1047
        _tmp0_ = _ ("Browse for more pictures");
1134
1048
        _tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) self);
1135
 
        _tmp2_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, GTK_WINDOW (_tmp1_), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
1136
 
        _tmp3_ = g_object_ref_sink (_tmp2_);
1137
 
        _data36_->chooser = _tmp3_;
1138
 
        _tmp4_ = _data36_->chooser;
1139
 
        gtk_window_set_modal ((GtkWindow*) _tmp4_, TRUE);
1140
 
        _tmp5_ = _data36_->chooser;
1141
 
        gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp5_, FALSE);
1142
 
        _tmp6_ = (GtkImage*) gtk_image_new ();
1143
 
        _tmp7_ = g_object_ref_sink (_tmp6_);
1144
 
        preview = _tmp7_;
 
1049
        _tmp2_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GTK_TYPE_WINDOW, GtkWindow), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
 
1050
        g_object_ref_sink (_tmp2_);
 
1051
        _data42_->chooser = _tmp2_;
 
1052
        _tmp3_ = _data42_->chooser;
 
1053
        gtk_window_set_modal ((GtkWindow*) _tmp3_, TRUE);
 
1054
        _tmp4_ = _data42_->chooser;
 
1055
        gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp4_, FALSE);
 
1056
        _tmp5_ = (GtkImage*) gtk_image_new ();
 
1057
        g_object_ref_sink (_tmp5_);
 
1058
        preview = _tmp5_;
 
1059
        _tmp6_ = preview;
 
1060
        gtk_widget_set_size_request ((GtkWidget*) _tmp6_, 128, -1);
 
1061
        _tmp7_ = _data42_->chooser;
1145
1062
        _tmp8_ = preview;
1146
 
        gtk_widget_set_size_request ((GtkWidget*) _tmp8_, 128, -1);
1147
 
        _tmp9_ = _data36_->chooser;
 
1063
        gtk_file_chooser_set_preview_widget ((GtkFileChooser*) _tmp7_, (GtkWidget*) _tmp8_);
 
1064
        _tmp9_ = _data42_->chooser;
 
1065
        gtk_file_chooser_set_use_preview_label ((GtkFileChooser*) _tmp9_, FALSE);
1148
1066
        _tmp10_ = preview;
1149
 
        gtk_file_chooser_set_preview_widget ((GtkFileChooser*) _tmp9_, (GtkWidget*) _tmp10_);
1150
 
        _tmp11_ = _data36_->chooser;
1151
 
        gtk_file_chooser_set_use_preview_label ((GtkFileChooser*) _tmp11_, FALSE);
1152
 
        _tmp12_ = preview;
1153
 
        gtk_widget_show ((GtkWidget*) _tmp12_);
1154
 
        _tmp13_ = _data36_->chooser;
1155
 
        g_signal_connect_object ((GtkFileChooser*) _tmp13_, "update-preview", (GCallback) _contacts_avatar_dialog_update_preview_gtk_file_chooser_update_preview, self, 0);
1156
 
        _tmp14_ = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
1157
 
        _tmp15_ = g_strdup (_tmp14_);
1158
 
        folder = _tmp15_;
1159
 
        _tmp16_ = folder;
1160
 
        if (_tmp16_ != NULL) {
1161
 
                GtkFileChooserDialog* _tmp17_;
1162
 
                const gchar* _tmp18_;
1163
 
                _tmp17_ = _data36_->chooser;
1164
 
                _tmp18_ = folder;
1165
 
                gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp17_, _tmp18_);
 
1067
        gtk_widget_show ((GtkWidget*) _tmp10_);
 
1068
        _tmp11_ = _data42_->chooser;
 
1069
        g_signal_connect_object ((GtkFileChooser*) _tmp11_, "update-preview", (GCallback) _contacts_avatar_dialog_update_preview_gtk_file_chooser_update_preview, self, 0);
 
1070
        _tmp12_ = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
 
1071
        _tmp13_ = g_strdup (_tmp12_);
 
1072
        folder = _tmp13_;
 
1073
        _tmp14_ = folder;
 
1074
        if (_tmp14_ != NULL) {
 
1075
                GtkFileChooserDialog* _tmp15_;
 
1076
                const gchar* _tmp16_;
 
1077
                _tmp15_ = _data42_->chooser;
 
1078
                _tmp16_ = folder;
 
1079
                gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp15_, _tmp16_);
1166
1080
        }
1167
 
        _tmp19_ = _data36_->chooser;
1168
 
        g_signal_connect_data ((GtkDialog*) _tmp19_, "response", (GCallback) ___lambda36__gtk_dialog_response, block36_data_ref (_data36_), (GClosureNotify) block36_data_unref, 0);
1169
 
        _tmp20_ = _data36_->chooser;
1170
 
        gtk_window_present ((GtkWindow*) _tmp20_);
 
1081
        _tmp17_ = _data42_->chooser;
 
1082
        g_signal_connect_data ((GtkDialog*) _tmp17_, "response", (GCallback) ___lambda56__gtk_dialog_response, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
 
1083
        _tmp18_ = _data42_->chooser;
 
1084
        gtk_window_present ((GtkWindow*) _tmp18_);
1171
1085
        _g_free0 (folder);
1172
1086
        _g_object_unref0 (preview);
1173
 
        block36_data_unref (_data36_);
1174
 
        _data36_ = NULL;
1175
 
}
1176
 
 
1177
 
 
1178
 
static Block38Data* block38_data_ref (Block38Data* _data38_) {
1179
 
        g_atomic_int_inc (&_data38_->_ref_count_);
1180
 
        return _data38_;
1181
 
}
1182
 
 
1183
 
 
1184
 
static void block38_data_unref (void * _userdata_) {
1185
 
        Block38Data* _data38_;
1186
 
        _data38_ = (Block38Data*) _userdata_;
1187
 
        if (g_atomic_int_dec_and_test (&_data38_->_ref_count_)) {
 
1087
        block42_data_unref (_data42_);
 
1088
        _data42_ = NULL;
 
1089
}
 
1090
 
 
1091
 
 
1092
static Block43Data* block43_data_ref (Block43Data* _data43_) {
 
1093
        g_atomic_int_inc (&_data43_->_ref_count_);
 
1094
        return _data43_;
 
1095
}
 
1096
 
 
1097
 
 
1098
static void block43_data_unref (void * _userdata_) {
 
1099
        Block43Data* _data43_;
 
1100
        _data43_ = (Block43Data*) _userdata_;
 
1101
        if (g_atomic_int_dec_and_test (&_data43_->_ref_count_)) {
1188
1102
                ContactsAvatarDialog * self;
1189
 
                self = _data38_->self;
1190
 
                _g_object_unref0 (_data38_->contact);
 
1103
                self = _data43_->self;
 
1104
                _g_object_unref0 (_data43_->webcam_button);
 
1105
                _g_object_unref0 (_data43_->contact);
1191
1106
                _g_object_unref0 (self);
1192
 
                g_slice_free (Block38Data, _data38_);
 
1107
                g_slice_free (Block43Data, _data43_);
1193
1108
        }
1194
1109
}
1195
1110
 
1196
1111
 
1197
 
static void __lambda39_ (Block38Data* _data38_, GtkWidget* w) {
 
1112
static void __lambda57_ (Block43Data* _data43_, GtkWidget* w) {
1198
1113
        ContactsAvatarDialog * self;
1199
1114
        GtkWidget* _tmp0_;
1200
1115
        ContactsContact* _tmp1_;
1201
1116
        FolksIndividual* _tmp2_;
1202
1117
        ContactsContact* _tmp3_;
1203
 
        self = _data38_->self;
 
1118
        self = _data43_->self;
1204
1119
        g_return_if_fail (w != NULL);
1205
1120
        _tmp0_ = w;
1206
 
        _tmp1_ = _data38_->contact;
 
1121
        _tmp1_ = _data43_->contact;
1207
1122
        _tmp2_ = _tmp1_->individual;
1208
 
        _tmp3_ = _data38_->contact;
1209
 
        contacts_contact_frame_set_image (CONTACTS_IS_CONTACT_FRAME (_tmp0_) ? ((ContactsContactFrame*) _tmp0_) : NULL, (FolksAvatarDetails*) _tmp2_, _tmp3_);
 
1123
        _tmp3_ = _data43_->contact;
 
1124
        contacts_contact_frame_set_image (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, CONTACTS_TYPE_CONTACT_FRAME) ? ((ContactsContactFrame*) _tmp0_) : NULL, (FolksAvatarDetails*) _tmp2_, _tmp3_);
1210
1125
}
1211
1126
 
1212
1127
 
1213
 
static void ___lambda39__gtk_callback (GtkWidget* widget, gpointer self) {
1214
 
        __lambda39_ (self, widget);
 
1128
static void ___lambda57__gtk_callback (GtkWidget* widget, gpointer self) {
 
1129
        __lambda57_ (self, widget);
1215
1130
}
1216
1131
 
1217
1132
 
1220
1135
}
1221
1136
 
1222
1137
 
1223
 
static void __lambda40_ (ContactsAvatarDialog* self, gint response_id) {
 
1138
static void __lambda58_ (Block43Data* _data43_) {
 
1139
        ContactsAvatarDialog * self;
 
1140
        gint _tmp0_;
 
1141
        gint _tmp1_;
 
1142
        self = _data43_->self;
 
1143
        _tmp0_ = self->priv->num_cameras;
 
1144
        self->priv->num_cameras = _tmp0_ + 1;
 
1145
        _tmp1_ = self->priv->num_cameras;
 
1146
        gtk_widget_set_sensitive ((GtkWidget*) _data43_->webcam_button, _tmp1_ > 0);
 
1147
}
 
1148
 
 
1149
 
 
1150
static void ___lambda58__cheese_camera_device_monitor_added (CheeseCameraDeviceMonitor* _sender, CheeseCameraDevice* device, gpointer self) {
 
1151
        __lambda58_ (self);
 
1152
}
 
1153
 
 
1154
 
 
1155
static void __lambda59_ (Block43Data* _data43_) {
 
1156
        ContactsAvatarDialog * self;
 
1157
        gint _tmp0_;
 
1158
        gint _tmp1_;
 
1159
        self = _data43_->self;
 
1160
        _tmp0_ = self->priv->num_cameras;
 
1161
        self->priv->num_cameras = _tmp0_ - 1;
 
1162
        _tmp1_ = self->priv->num_cameras;
 
1163
        gtk_widget_set_sensitive ((GtkWidget*) _data43_->webcam_button, _tmp1_ > 0);
 
1164
}
 
1165
 
 
1166
 
 
1167
static void ___lambda59__cheese_camera_device_monitor_removed (CheeseCameraDeviceMonitor* _sender, const gchar* uuid, gpointer self) {
 
1168
        __lambda59_ (self);
 
1169
}
 
1170
 
 
1171
 
 
1172
static void __lambda60_ (ContactsAvatarDialog* self, GtkToolButton* button) {
 
1173
        GtkNotebook* _tmp0_;
 
1174
        CheeseWidget* _tmp1_;
 
1175
        g_return_if_fail (button != NULL);
 
1176
        _tmp0_ = self->priv->notebook;
 
1177
        gtk_notebook_set_current_page (_tmp0_, 2);
 
1178
        _tmp1_ = self->priv->cheese;
 
1179
        gtk_widget_show ((GtkWidget*) _tmp1_);
 
1180
}
 
1181
 
 
1182
 
 
1183
static void ___lambda60__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
 
1184
        __lambda60_ (self, _sender);
 
1185
}
 
1186
 
 
1187
 
 
1188
static void __lambda61_ (ContactsAvatarDialog* self, GtkToolButton* button) {
 
1189
        UmCropArea* _tmp0_;
 
1190
        GdkPixbuf* _tmp1_ = NULL;
 
1191
        GdkPixbuf* pix;
 
1192
        GdkPixbuf* _tmp2_ = NULL;
 
1193
        GdkPixbuf* _tmp3_;
 
1194
        UmCropArea* _tmp4_;
 
1195
        GtkNotebook* _tmp5_;
 
1196
        g_return_if_fail (button != NULL);
 
1197
        _tmp0_ = self->priv->crop_area;
 
1198
        _tmp1_ = um_crop_area_get_picture (_tmp0_);
 
1199
        pix = _tmp1_;
 
1200
        _tmp2_ = contacts_avatar_dialog_scale_pixbuf_for_avatar_use (self, pix);
 
1201
        _tmp3_ = _tmp2_;
 
1202
        contacts_avatar_dialog_selected_pixbuf (self, _tmp3_);
 
1203
        _g_object_unref0 (_tmp3_);
 
1204
        _tmp4_ = self->priv->crop_area;
 
1205
        gtk_widget_destroy ((GtkWidget*) _tmp4_);
 
1206
        _tmp5_ = self->priv->notebook;
 
1207
        gtk_notebook_set_current_page (_tmp5_, 0);
 
1208
        _g_object_unref0 (pix);
 
1209
}
 
1210
 
 
1211
 
 
1212
static void ___lambda61__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
 
1213
        __lambda61_ (self, _sender);
 
1214
}
 
1215
 
 
1216
 
 
1217
static void __lambda62_ (ContactsAvatarDialog* self, GtkToolButton* button) {
 
1218
        UmCropArea* _tmp0_;
 
1219
        GtkNotebook* _tmp1_;
 
1220
        g_return_if_fail (button != NULL);
 
1221
        _tmp0_ = self->priv->crop_area;
 
1222
        gtk_widget_destroy ((GtkWidget*) _tmp0_);
 
1223
        _tmp1_ = self->priv->notebook;
 
1224
        gtk_notebook_set_current_page (_tmp1_, 0);
 
1225
}
 
1226
 
 
1227
 
 
1228
static void ___lambda62__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
 
1229
        __lambda62_ (self, _sender);
 
1230
}
 
1231
 
 
1232
 
 
1233
static void __lambda64_ (ContactsAvatarDialog* self, GdkPixbuf* pix) {
 
1234
        GdkPixbuf* _tmp0_;
 
1235
        CheeseWidget* _tmp1_;
 
1236
        g_return_if_fail (pix != NULL);
 
1237
        _tmp0_ = pix;
 
1238
        contacts_avatar_dialog_set_crop_widget (self, _tmp0_);
 
1239
        _tmp1_ = self->priv->cheese;
 
1240
        gtk_widget_hide ((GtkWidget*) _tmp1_);
 
1241
}
 
1242
 
 
1243
 
 
1244
static void ___lambda64__cheese_camera_photo_taken (CheeseCamera* _sender, GdkPixbuf* pixbuf, gpointer self) {
 
1245
        __lambda64_ (self, pixbuf);
 
1246
}
 
1247
 
 
1248
 
 
1249
static void __lambda63_ (ContactsAvatarDialog* self, GtkToolButton* button) {
 
1250
        CheeseWidget* _tmp0_;
 
1251
        GObject* _tmp1_ = NULL;
 
1252
        CheeseCamera* _tmp2_;
 
1253
        CheeseCamera* camera;
 
1254
        CheeseFlash* _tmp3_;
 
1255
        CheeseCamera* _tmp4_;
 
1256
        CheeseCamera* _tmp5_;
 
1257
        gboolean _tmp6_ = FALSE;
 
1258
        g_return_if_fail (button != NULL);
 
1259
        _tmp0_ = self->priv->cheese;
 
1260
        _tmp1_ = cheese_widget_get_camera (_tmp0_);
 
1261
        _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, CHEESE_TYPE_CAMERA) ? ((CheeseCamera*) _tmp1_) : NULL);
 
1262
        camera = _tmp2_;
 
1263
        _tmp3_ = self->priv->flash;
 
1264
        cheese_flash_fire (_tmp3_);
 
1265
        _tmp4_ = camera;
 
1266
        g_signal_connect_object (_tmp4_, "photo-taken", (GCallback) ___lambda64__cheese_camera_photo_taken, self, 0);
 
1267
        _tmp5_ = camera;
 
1268
        _tmp6_ = cheese_camera_take_photo_pixbuf (_tmp5_);
 
1269
        if (!_tmp6_) {
 
1270
                g_warning ("contacts-avatar-dialog.vala:409: Unable to take photo");
 
1271
        }
 
1272
        _g_object_unref0 (camera);
 
1273
}
 
1274
 
 
1275
 
 
1276
static void ___lambda63__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
 
1277
        __lambda63_ (self, _sender);
 
1278
}
 
1279
 
 
1280
 
 
1281
static void __lambda65_ (ContactsAvatarDialog* self, GtkToolButton* button) {
 
1282
        GtkNotebook* _tmp0_;
 
1283
        CheeseWidget* _tmp1_;
 
1284
        g_return_if_fail (button != NULL);
 
1285
        _tmp0_ = self->priv->notebook;
 
1286
        gtk_notebook_set_current_page (_tmp0_, 0);
 
1287
        _tmp1_ = self->priv->cheese;
 
1288
        gtk_widget_hide ((GtkWidget*) _tmp1_);
 
1289
}
 
1290
 
 
1291
 
 
1292
static void ___lambda65__gtk_tool_button_clicked (GtkToolButton* _sender, gpointer self) {
 
1293
        __lambda65_ (self, _sender);
 
1294
}
 
1295
 
 
1296
 
 
1297
static void __lambda66_ (ContactsAvatarDialog* self, gint response_id) {
1224
1298
        gint _tmp0_;
1225
1299
        GError * _inner_error_ = NULL;
1226
1300
        _tmp0_ = response_id;
1237
1311
                                _tmp3_ = contacts_memory_icon_new_from_pixbuf (_tmp2_, &_inner_error_);
1238
1312
                                icon = _tmp3_;
1239
1313
                                if (_inner_error_ != NULL) {
1240
 
                                        goto __catch31_g_error;
 
1314
                                        goto __catch29_g_error;
1241
1315
                                }
1242
1316
                                _tmp4_ = icon;
1243
1317
                                g_signal_emit_by_name (self, "set-avatar", (GIcon*) _tmp4_);
1244
1318
                                _g_object_unref0 (icon);
1245
1319
                        }
1246
 
                        goto __finally31;
1247
 
                        __catch31_g_error:
 
1320
                        goto __finally29;
 
1321
                        __catch29_g_error:
1248
1322
                        {
1249
1323
                                g_clear_error (&_inner_error_);
1250
1324
                                _inner_error_ = NULL;
1251
1325
                        }
1252
 
                        __finally31:
 
1326
                        __finally29:
1253
1327
                        if (_inner_error_ != NULL) {
1254
1328
                                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);
1255
1329
                                g_clear_error (&_inner_error_);
1257
1331
                        }
1258
1332
                }
1259
1333
        }
 
1334
        _g_object_unref0 (self->priv->cheese);
 
1335
        self->priv->cheese = NULL;
1260
1336
        gtk_widget_destroy ((GtkWidget*) self);
1261
1337
}
1262
1338
 
1263
1339
 
1264
 
static void ___lambda40__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
1265
 
        __lambda40_ (self, response_id);
 
1340
static void ___lambda66__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
 
1341
        __lambda66_ (self, response_id);
1266
1342
}
1267
1343
 
1268
1344
 
1269
1345
ContactsAvatarDialog* contacts_avatar_dialog_construct (GType object_type, ContactsContact* contact) {
1270
1346
        ContactsAvatarDialog * self = NULL;
1271
 
        Block38Data* _data38_;
 
1347
        Block43Data* _data43_;
1272
1348
        ContactsContact* _tmp0_;
1273
1349
        ContactsContact* _tmp1_;
1274
1350
        GnomeDesktopThumbnailFactory* _tmp2_;
1279
1355
        ContactsWindow* _tmp7_;
1280
1356
        const gchar* _tmp8_ = NULL;
1281
1357
        GtkGrid* _tmp9_;
1282
 
        GtkGrid* _tmp10_;
1283
1358
        GtkGrid* grid;
1284
 
        GtkBox* _tmp11_ = NULL;
1285
 
        GtkContainer* _tmp12_;
 
1359
        GtkBox* _tmp10_ = NULL;
 
1360
        GtkContainer* _tmp11_;
1286
1361
        GtkContainer* container;
1287
 
        ContactsContactFrame* _tmp13_;
 
1362
        ContactsContactFrame* _tmp12_;
 
1363
        ContactsContact* _tmp13_;
1288
1364
        ContactsContactFrame* _tmp14_;
1289
 
        ContactsContact* _tmp15_;
 
1365
        ContactsContactFrame* _tmp15_;
1290
1366
        ContactsContactFrame* _tmp16_;
1291
 
        ContactsContactFrame* _tmp17_;
1292
 
        ContactsContactFrame* _tmp18_;
1293
 
        GtkLabel* _tmp19_;
1294
 
        GtkLabel* _tmp20_;
 
1367
        GtkLabel* _tmp17_;
1295
1368
        GtkLabel* label;
1296
 
        ContactsContact* _tmp21_;
1297
 
        const gchar* _tmp22_;
1298
 
        const gchar* _tmp23_;
1299
 
        gchar* _tmp24_;
1300
 
        gchar* _tmp25_;
1301
 
        gchar* _tmp26_;
1302
 
        gchar* _tmp27_;
1303
 
        GtkFrame* _tmp28_;
1304
 
        GtkFrame* _tmp29_;
 
1369
        ContactsContact* _tmp18_;
 
1370
        const gchar* _tmp19_;
 
1371
        const gchar* _tmp20_;
 
1372
        gchar* _tmp21_ = NULL;
 
1373
        gchar* _tmp22_;
 
1374
        GtkFrame* _tmp23_;
1305
1375
        GtkFrame* frame;
1306
 
        GtkStyleContext* _tmp30_ = NULL;
 
1376
        GtkStyleContext* _tmp24_ = NULL;
 
1377
        GtkNotebook* _tmp25_;
 
1378
        GtkNotebook* _tmp26_;
 
1379
        GtkNotebook* _tmp27_;
 
1380
        GtkGrid* _tmp28_;
 
1381
        GtkGrid* frame_grid;
 
1382
        GtkGrid* _tmp29_;
 
1383
        GtkScrolledWindow* _tmp30_;
 
1384
        GtkScrolledWindow* scrolled;
1307
1385
        GtkGrid* _tmp31_;
1308
1386
        GtkGrid* _tmp32_;
1309
1387
        GtkGrid* _tmp33_;
1310
 
        GtkGrid* _tmp34_;
1311
 
        GtkScrolledWindow* _tmp35_;
1312
 
        GtkScrolledWindow* _tmp36_;
1313
 
        GtkScrolledWindow* _tmp37_;
1314
 
        GtkScrolledWindow* _tmp38_;
1315
 
        GtkScrolledWindow* _tmp39_;
1316
 
        GtkScrolledWindow* _tmp40_;
1317
 
        GtkGrid* _tmp41_;
1318
 
        GtkScrolledWindow* _tmp42_;
1319
 
        GtkGrid* _tmp43_;
1320
 
        GtkGrid* _tmp44_;
1321
 
        GtkScrolledWindow* _tmp45_;
1322
 
        GtkGrid* _tmp46_;
1323
 
        GtkToolbar* _tmp47_;
1324
 
        GtkToolbar* _tmp48_;
 
1388
        GtkToolbar* _tmp34_;
1325
1389
        GtkToolbar* toolbar;
1326
 
        GtkStyleContext* _tmp49_ = NULL;
1327
 
        GtkGrid* _tmp50_;
1328
 
        GtkToolButton* _tmp51_;
1329
 
        GtkToolButton* _tmp52_;
1330
 
        GtkToolButton* _tmp53_;
1331
 
        GtkToolButton* _tmp54_;
1332
 
        GtkStyleContext* _tmp55_ = NULL;
1333
 
        GtkToolButton* _tmp56_;
1334
 
        GtkToolButton* _tmp57_;
1335
 
        GtkToolButton* _tmp58_;
1336
 
        GtkToolButton* _tmp59_;
1337
 
        GtkToolButton* _tmp60_;
1338
 
        GtkToolButton* _tmp61_;
1339
 
        GtkToolButton* _tmp62_;
1340
 
        GtkStyleContext* _tmp63_ = NULL;
 
1390
        GtkToolbar* _tmp35_;
 
1391
        GtkStyleContext* _tmp36_ = NULL;
 
1392
        GtkToolbar* _tmp37_;
 
1393
        GtkToolbar* _tmp38_;
 
1394
        GtkGrid* _tmp39_;
 
1395
        GtkToolbar* _tmp40_;
 
1396
        GtkToolButton* _tmp41_;
 
1397
        GtkToolButton* the_add_button;
 
1398
        GtkStyleContext* _tmp42_ = NULL;
 
1399
        GtkToolbar* _tmp43_;
 
1400
        GtkToolButton* _tmp44_;
 
1401
        GtkStyleContext* _tmp45_ = NULL;
 
1402
        GtkToolbar* _tmp46_;
 
1403
        CheeseCameraDeviceMonitor* _tmp47_;
 
1404
        CheeseCameraDeviceMonitor* _tmp48_;
 
1405
        CheeseCameraDeviceMonitor* _tmp49_;
 
1406
        CheeseCameraDeviceMonitor* _tmp50_;
 
1407
        GtkGrid* _tmp51_;
 
1408
        GtkNotebook* _tmp52_;
 
1409
        GtkGrid* _tmp53_;
 
1410
        GtkGrid* _tmp54_;
 
1411
        GtkGrid* _tmp55_;
 
1412
        GtkToolbar* _tmp56_;
 
1413
        GtkToolbar* _tmp57_;
 
1414
        GtkStyleContext* _tmp58_ = NULL;
 
1415
        GtkToolbar* _tmp59_;
 
1416
        GtkToolbar* _tmp60_;
 
1417
        GtkGrid* _tmp61_;
 
1418
        GtkToolbar* _tmp62_;
 
1419
        GtkToolButton* _tmp63_;
 
1420
        GtkToolButton* accept_button;
1341
1421
        GtkToolButton* _tmp64_;
1342
1422
        GtkToolButton* _tmp65_;
1343
 
        GtkToolButton* _tmp66_;
 
1423
        GtkStyleContext* _tmp66_ = NULL;
1344
1424
        GtkToolButton* _tmp67_;
1345
 
        GtkToolButton* _tmp68_;
 
1425
        GtkToolbar* _tmp68_;
1346
1426
        GtkToolButton* _tmp69_;
1347
 
        GtkStyleContext* _tmp70_ = NULL;
 
1427
        GtkToolButton* _tmp70_;
1348
1428
        GtkToolButton* _tmp71_;
 
1429
        GtkToolButton* cancel_button;
1349
1430
        GtkToolButton* _tmp72_;
1350
1431
        GtkToolButton* _tmp73_;
1351
 
        GtkToolButton* _tmp74_;
 
1432
        GtkStyleContext* _tmp74_ = NULL;
 
1433
        GtkToolButton* _tmp75_;
 
1434
        GtkToolbar* _tmp76_;
 
1435
        GtkToolButton* _tmp77_;
 
1436
        GtkToolButton* _tmp78_;
 
1437
        GtkGrid* _tmp79_;
 
1438
        GtkNotebook* _tmp80_;
 
1439
        GtkGrid* _tmp81_;
 
1440
        GtkGrid* _tmp82_;
 
1441
        GtkGrid* _tmp83_;
 
1442
        CheeseWidget* _tmp84_;
 
1443
        CheeseWidget* _tmp85_;
 
1444
        CheeseWidget* _tmp86_;
 
1445
        CheeseWidget* _tmp87_;
 
1446
        GtkGrid* _tmp88_;
 
1447
        CheeseWidget* _tmp89_;
 
1448
        CheeseFlash* _tmp90_;
 
1449
        GtkToolbar* _tmp91_;
 
1450
        GtkToolbar* _tmp92_;
 
1451
        GtkStyleContext* _tmp93_ = NULL;
 
1452
        GtkToolbar* _tmp94_;
 
1453
        GtkToolbar* _tmp95_;
 
1454
        GtkGrid* _tmp96_;
 
1455
        GtkToolbar* _tmp97_;
 
1456
        GtkToolButton* _tmp98_;
 
1457
        GtkToolButton* _tmp99_;
 
1458
        GtkToolButton* _tmp100_;
 
1459
        GtkStyleContext* _tmp101_ = NULL;
 
1460
        GtkToolButton* _tmp102_;
 
1461
        GtkToolbar* _tmp103_;
 
1462
        GtkToolButton* _tmp104_;
 
1463
        GtkToolButton* _tmp105_;
 
1464
        GtkToolButton* _tmp106_;
 
1465
        GtkToolButton* _tmp107_;
 
1466
        GtkToolButton* _tmp108_;
 
1467
        GtkStyleContext* _tmp109_ = NULL;
 
1468
        GtkToolButton* _tmp110_;
 
1469
        GtkToolbar* _tmp111_;
 
1470
        GtkToolButton* _tmp112_;
 
1471
        GtkToolButton* _tmp113_;
 
1472
        GtkGrid* _tmp114_;
 
1473
        GtkNotebook* _tmp115_;
 
1474
        GtkGrid* _tmp116_;
 
1475
        GtkNotebook* _tmp117_;
1352
1476
        g_return_val_if_fail (contact != NULL, NULL);
1353
 
        _data38_ = g_slice_new0 (Block38Data);
1354
 
        _data38_->_ref_count_ = 1;
 
1477
        _data43_ = g_slice_new0 (Block43Data);
 
1478
        _data43_->_ref_count_ = 1;
1355
1479
        _tmp0_ = contact;
1356
1480
        _tmp1_ = _g_object_ref0 (_tmp0_);
1357
 
        _data38_->contact = _tmp1_;
 
1481
        _g_object_unref0 (_data43_->contact);
 
1482
        _data43_->contact = _tmp1_;
1358
1483
        self = (ContactsAvatarDialog*) g_object_new (object_type, NULL);
1359
 
        _data38_->self = g_object_ref (self);
 
1484
        _data43_->self = g_object_ref (self);
1360
1485
        _tmp2_ = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_NORMAL);
1361
1486
        _g_object_unref0 (self->priv->thumbnail_factory);
1362
1487
        self->priv->thumbnail_factory = _tmp2_;
1363
 
        _tmp3_ = _data38_->contact;
 
1488
        _tmp3_ = _data43_->contact;
1364
1489
        _tmp4_ = _g_object_ref0 (_tmp3_);
1365
1490
        _g_object_unref0 (self->priv->contact);
1366
1491
        self->priv->contact = _tmp4_;
1373
1498
        _tmp8_ = _ ("Close");
1374
1499
        gtk_dialog_add_buttons ((GtkDialog*) self, _tmp8_, GTK_RESPONSE_CLOSE, NULL, NULL);
1375
1500
        _tmp9_ = (GtkGrid*) gtk_grid_new ();
1376
 
        _tmp10_ = g_object_ref_sink (_tmp9_);
1377
 
        grid = _tmp10_;
 
1501
        g_object_ref_sink (_tmp9_);
 
1502
        grid = _tmp9_;
1378
1503
        gtk_container_set_border_width ((GtkContainer*) grid, (guint) 8);
1379
1504
        gtk_grid_set_column_spacing (grid, (guint) 16);
1380
 
        _tmp11_ = gtk_dialog_get_content_area ((GtkDialog*) self);
1381
 
        _tmp12_ = _g_object_ref0 (GTK_IS_CONTAINER (_tmp11_) ? ((GtkContainer*) _tmp11_) : NULL);
1382
 
        container = _tmp12_;
 
1505
        _tmp10_ = gtk_dialog_get_content_area ((GtkDialog*) self);
 
1506
        _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, GTK_TYPE_CONTAINER) ? ((GtkContainer*) _tmp10_) : NULL);
 
1507
        container = _tmp11_;
1383
1508
        gtk_container_add (container, (GtkWidget*) grid);
1384
 
        _tmp13_ = contacts_contact_frame_new (CONTACTS_AVATAR_DIALOG_main_size, FALSE);
1385
 
        _tmp14_ = g_object_ref_sink (_tmp13_);
 
1509
        _tmp12_ = contacts_contact_frame_new (CONTACTS_AVATAR_DIALOG_main_size, FALSE);
 
1510
        g_object_ref_sink (_tmp12_);
1386
1511
        _g_object_unref0 (self->priv->main_frame);
1387
 
        self->priv->main_frame = _tmp14_;
1388
 
        _tmp15_ = _data38_->contact;
 
1512
        self->priv->main_frame = _tmp12_;
 
1513
        _tmp13_ = _data43_->contact;
 
1514
        _tmp14_ = self->priv->main_frame;
 
1515
        contacts_contact_keep_widget_uptodate (_tmp13_, (GtkWidget*) _tmp14_, ___lambda57__gtk_callback, _data43_);
 
1516
        _tmp15_ = self->priv->main_frame;
 
1517
        gtk_widget_set_hexpand ((GtkWidget*) _tmp15_, FALSE);
1389
1518
        _tmp16_ = self->priv->main_frame;
1390
 
        contacts_contact_keep_widget_uptodate (_tmp15_, (GtkWidget*) _tmp16_, ___lambda39__gtk_callback, _data38_);
1391
 
        _tmp17_ = self->priv->main_frame;
1392
 
        gtk_widget_set_hexpand ((GtkWidget*) _tmp17_, FALSE);
1393
 
        _tmp18_ = self->priv->main_frame;
1394
 
        gtk_grid_attach (grid, (GtkWidget*) _tmp18_, 0, 0, 1, 1);
1395
 
        _tmp19_ = (GtkLabel*) gtk_label_new ("");
1396
 
        _tmp20_ = g_object_ref_sink (_tmp19_);
1397
 
        label = _tmp20_;
1398
 
        _tmp21_ = _data38_->contact;
1399
 
        _tmp22_ = contacts_contact_get_display_name (_tmp21_);
1400
 
        _tmp23_ = _tmp22_;
1401
 
        _tmp24_ = g_strconcat ("<span font='16'>", _tmp23_, NULL);
1402
 
        _tmp25_ = _tmp24_;
1403
 
        _tmp26_ = g_strconcat (_tmp25_, "</span>", NULL);
1404
 
        _tmp27_ = _tmp26_;
1405
 
        gtk_label_set_markup (label, _tmp27_);
1406
 
        _g_free0 (_tmp27_);
1407
 
        _g_free0 (_tmp25_);
 
1519
        gtk_grid_attach (grid, (GtkWidget*) _tmp16_, 0, 0, 1, 1);
 
1520
        _tmp17_ = (GtkLabel*) gtk_label_new ("");
 
1521
        g_object_ref_sink (_tmp17_);
 
1522
        label = _tmp17_;
 
1523
        _tmp18_ = _data43_->contact;
 
1524
        _tmp19_ = contacts_contact_get_display_name (_tmp18_);
 
1525
        _tmp20_ = _tmp19_;
 
1526
        _tmp21_ = g_markup_printf_escaped ("<span font='16'>%s</span>", _tmp20_);
 
1527
        _tmp22_ = _tmp21_;
 
1528
        gtk_label_set_markup (label, _tmp22_);
 
1529
        _g_free0 (_tmp22_);
1408
1530
        gtk_widget_set_valign ((GtkWidget*) label, GTK_ALIGN_START);
1409
1531
        gtk_widget_set_halign ((GtkWidget*) label, GTK_ALIGN_START);
1410
1532
        gtk_widget_set_hexpand ((GtkWidget*) label, TRUE);
1413
1535
        gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
1414
1536
        gtk_grid_attach (grid, (GtkWidget*) label, 1, 0, 1, 1);
1415
1537
        gtk_grid_set_row_spacing (grid, (guint) 11);
1416
 
        _tmp28_ = (GtkFrame*) gtk_frame_new (NULL);
1417
 
        _tmp29_ = g_object_ref_sink (_tmp28_);
1418
 
        frame = _tmp29_;
1419
 
        _tmp30_ = gtk_widget_get_style_context ((GtkWidget*) frame);
1420
 
        gtk_style_context_add_class (_tmp30_, "contacts-avatar-frame");
 
1538
        _tmp23_ = (GtkFrame*) gtk_frame_new (NULL);
 
1539
        g_object_ref_sink (_tmp23_);
 
1540
        frame = _tmp23_;
 
1541
        _tmp24_ = gtk_widget_get_style_context ((GtkWidget*) frame);
 
1542
        gtk_style_context_add_class (_tmp24_, "contacts-avatar-frame");
1421
1543
        gtk_grid_attach (grid, (GtkWidget*) frame, 0, 1, 2, 1);
1422
 
        _tmp31_ = (GtkGrid*) gtk_grid_new ();
1423
 
        _tmp32_ = g_object_ref_sink (_tmp31_);
1424
 
        _g_object_unref0 (self->priv->frame_grid);
1425
 
        self->priv->frame_grid = _tmp32_;
1426
 
        _tmp33_ = self->priv->frame_grid;
1427
 
        gtk_orientable_set_orientation ((GtkOrientable*) _tmp33_, GTK_ORIENTATION_VERTICAL);
1428
 
        _tmp34_ = self->priv->frame_grid;
1429
 
        gtk_container_add ((GtkContainer*) frame, (GtkWidget*) _tmp34_);
1430
 
        _tmp35_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
1431
 
        _tmp36_ = g_object_ref_sink (_tmp35_);
1432
 
        _g_object_unref0 (self->priv->scrolled);
1433
 
        self->priv->scrolled = _tmp36_;
1434
 
        _tmp37_ = self->priv->scrolled;
1435
 
        gtk_scrolled_window_set_policy (_tmp37_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
1436
 
        _tmp38_ = self->priv->scrolled;
1437
 
        gtk_widget_set_vexpand ((GtkWidget*) _tmp38_, TRUE);
1438
 
        _tmp39_ = self->priv->scrolled;
1439
 
        gtk_widget_set_hexpand ((GtkWidget*) _tmp39_, TRUE);
1440
 
        _tmp40_ = self->priv->scrolled;
1441
 
        gtk_widget_set_size_request ((GtkWidget*) _tmp40_, -1, 300);
1442
 
        _tmp41_ = self->priv->frame_grid;
1443
 
        _tmp42_ = self->priv->scrolled;
1444
 
        gtk_container_add ((GtkContainer*) _tmp41_, (GtkWidget*) _tmp42_);
1445
 
        _tmp43_ = (GtkGrid*) gtk_grid_new ();
1446
 
        _tmp44_ = g_object_ref_sink (_tmp43_);
 
1544
        _tmp25_ = (GtkNotebook*) gtk_notebook_new ();
 
1545
        g_object_ref_sink (_tmp25_);
 
1546
        _g_object_unref0 (self->priv->notebook);
 
1547
        self->priv->notebook = _tmp25_;
 
1548
        _tmp26_ = self->priv->notebook;
 
1549
        gtk_notebook_set_show_tabs (_tmp26_, FALSE);
 
1550
        _tmp27_ = self->priv->notebook;
 
1551
        gtk_container_add ((GtkContainer*) frame, (GtkWidget*) _tmp27_);
 
1552
        _tmp28_ = (GtkGrid*) gtk_grid_new ();
 
1553
        g_object_ref_sink (_tmp28_);
 
1554
        frame_grid = _tmp28_;
 
1555
        _tmp29_ = frame_grid;
 
1556
        gtk_orientable_set_orientation ((GtkOrientable*) _tmp29_, GTK_ORIENTATION_VERTICAL);
 
1557
        _tmp30_ = (GtkScrolledWindow*) gtk_scrolled_window_new (NULL, NULL);
 
1558
        g_object_ref_sink (_tmp30_);
 
1559
        scrolled = _tmp30_;
 
1560
        gtk_scrolled_window_set_policy (scrolled, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 
1561
        gtk_widget_set_vexpand ((GtkWidget*) scrolled, TRUE);
 
1562
        gtk_widget_set_hexpand ((GtkWidget*) scrolled, TRUE);
 
1563
        gtk_widget_set_size_request ((GtkWidget*) scrolled, -1, 300);
 
1564
        _tmp31_ = frame_grid;
 
1565
        gtk_container_add ((GtkContainer*) _tmp31_, (GtkWidget*) scrolled);
 
1566
        _tmp32_ = (GtkGrid*) gtk_grid_new ();
 
1567
        g_object_ref_sink (_tmp32_);
1447
1568
        _g_object_unref0 (self->priv->view_grid);
1448
 
        self->priv->view_grid = _tmp44_;
1449
 
        _tmp45_ = self->priv->scrolled;
1450
 
        _tmp46_ = self->priv->view_grid;
1451
 
        gtk_scrolled_window_add_with_viewport (_tmp45_, (GtkWidget*) _tmp46_);
1452
 
        _tmp47_ = (GtkToolbar*) gtk_toolbar_new ();
1453
 
        _tmp48_ = g_object_ref_sink (_tmp47_);
1454
 
        toolbar = _tmp48_;
1455
 
        _tmp49_ = gtk_widget_get_style_context ((GtkWidget*) toolbar);
1456
 
        gtk_style_context_add_class (_tmp49_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
1457
 
        gtk_toolbar_set_icon_size (toolbar, GTK_ICON_SIZE_MENU);
1458
 
        gtk_widget_set_vexpand ((GtkWidget*) toolbar, FALSE);
1459
 
        _tmp50_ = self->priv->frame_grid;
1460
 
        gtk_container_add ((GtkContainer*) _tmp50_, (GtkWidget*) toolbar);
1461
 
        _tmp51_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
1462
 
        _tmp52_ = g_object_ref_sink (_tmp51_);
1463
 
        _g_object_unref0 (self->priv->the_add_button);
1464
 
        self->priv->the_add_button = _tmp52_;
1465
 
        _tmp53_ = self->priv->the_add_button;
1466
 
        gtk_tool_button_set_icon_name (_tmp53_, "list-add-symbolic");
1467
 
        _tmp54_ = self->priv->the_add_button;
1468
 
        _tmp55_ = gtk_widget_get_style_context ((GtkWidget*) _tmp54_);
1469
 
        gtk_style_context_add_class (_tmp55_, GTK_STYLE_CLASS_RAISED);
1470
 
        _tmp56_ = self->priv->the_add_button;
1471
 
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp56_, TRUE);
1472
 
        _tmp57_ = self->priv->the_add_button;
1473
 
        gtk_container_add ((GtkContainer*) toolbar, (GtkWidget*) _tmp57_);
1474
 
        _tmp58_ = self->priv->the_add_button;
1475
 
        g_signal_connect_object (_tmp58_, "clicked", (GCallback) _contacts_avatar_dialog_select_avatar_file_cb_gtk_tool_button_clicked, self, 0);
1476
 
        _tmp59_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
1477
 
        _tmp60_ = g_object_ref_sink (_tmp59_);
1478
 
        _g_object_unref0 (self->priv->crop_button);
1479
 
        self->priv->crop_button = _tmp60_;
1480
 
        _tmp61_ = self->priv->crop_button;
1481
 
        gtk_tool_button_set_icon_name (_tmp61_, "object-select-symbolic");
1482
 
        _tmp62_ = self->priv->crop_button;
1483
 
        _tmp63_ = gtk_widget_get_style_context ((GtkWidget*) _tmp62_);
1484
 
        gtk_style_context_add_class (_tmp63_, GTK_STYLE_CLASS_RAISED);
1485
 
        _tmp64_ = self->priv->crop_button;
1486
 
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp64_, TRUE);
1487
 
        _tmp65_ = self->priv->crop_button;
1488
 
        gtk_container_add ((GtkContainer*) toolbar, (GtkWidget*) _tmp65_);
1489
 
        _tmp66_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
1490
 
        _tmp67_ = g_object_ref_sink (_tmp66_);
1491
 
        _g_object_unref0 (self->priv->cancel_button);
1492
 
        self->priv->cancel_button = _tmp67_;
1493
 
        _tmp68_ = self->priv->cancel_button;
1494
 
        gtk_tool_button_set_icon_name (_tmp68_, "edit-undo-symbolic");
1495
 
        _tmp69_ = self->priv->cancel_button;
1496
 
        _tmp70_ = gtk_widget_get_style_context ((GtkWidget*) _tmp69_);
1497
 
        gtk_style_context_add_class (_tmp70_, GTK_STYLE_CLASS_RAISED);
1498
 
        _tmp71_ = self->priv->cancel_button;
1499
 
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp71_, TRUE);
1500
 
        _tmp72_ = self->priv->cancel_button;
1501
 
        gtk_container_add ((GtkContainer*) toolbar, (GtkWidget*) _tmp72_);
1502
 
        g_signal_connect_object ((GtkDialog*) self, "response", (GCallback) ___lambda40__gtk_dialog_response, self, 0);
 
1569
        self->priv->view_grid = _tmp32_;
 
1570
        _tmp33_ = self->priv->view_grid;
 
1571
        gtk_scrolled_window_add_with_viewport (scrolled, (GtkWidget*) _tmp33_);
 
1572
        _tmp34_ = (GtkToolbar*) gtk_toolbar_new ();
 
1573
        g_object_ref_sink (_tmp34_);
 
1574
        toolbar = _tmp34_;
 
1575
        _tmp35_ = toolbar;
 
1576
        _tmp36_ = gtk_widget_get_style_context ((GtkWidget*) _tmp35_);
 
1577
        gtk_style_context_add_class (_tmp36_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 
1578
        _tmp37_ = toolbar;
 
1579
        gtk_toolbar_set_icon_size (_tmp37_, GTK_ICON_SIZE_MENU);
 
1580
        _tmp38_ = toolbar;
 
1581
        gtk_widget_set_vexpand ((GtkWidget*) _tmp38_, FALSE);
 
1582
        _tmp39_ = frame_grid;
 
1583
        _tmp40_ = toolbar;
 
1584
        gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_);
 
1585
        _tmp41_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1586
        g_object_ref_sink (_tmp41_);
 
1587
        the_add_button = _tmp41_;
 
1588
        gtk_tool_button_set_icon_name (the_add_button, "list-add-symbolic");
 
1589
        _tmp42_ = gtk_widget_get_style_context ((GtkWidget*) the_add_button);
 
1590
        gtk_style_context_add_class (_tmp42_, GTK_STYLE_CLASS_RAISED);
 
1591
        gtk_tool_item_set_is_important ((GtkToolItem*) the_add_button, TRUE);
 
1592
        _tmp43_ = toolbar;
 
1593
        gtk_container_add ((GtkContainer*) _tmp43_, (GtkWidget*) the_add_button);
 
1594
        g_signal_connect_object (the_add_button, "clicked", (GCallback) _contacts_avatar_dialog_select_avatar_file_cb_gtk_tool_button_clicked, self, 0);
 
1595
        _tmp44_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1596
        g_object_ref_sink (_tmp44_);
 
1597
        _data43_->webcam_button = _tmp44_;
 
1598
        gtk_tool_button_set_icon_name (_data43_->webcam_button, "camera-photo-symbolic");
 
1599
        _tmp45_ = gtk_widget_get_style_context ((GtkWidget*) _data43_->webcam_button);
 
1600
        gtk_style_context_add_class (_tmp45_, GTK_STYLE_CLASS_RAISED);
 
1601
        gtk_tool_item_set_is_important ((GtkToolItem*) _data43_->webcam_button, TRUE);
 
1602
        gtk_widget_set_sensitive ((GtkWidget*) _data43_->webcam_button, FALSE);
 
1603
        _tmp46_ = toolbar;
 
1604
        gtk_container_add ((GtkContainer*) _tmp46_, (GtkWidget*) _data43_->webcam_button);
 
1605
        _tmp47_ = (CheeseCameraDeviceMonitor*) cheese_camera_device_monitor_new ();
 
1606
        _g_object_unref0 (self->priv->camera_monitor);
 
1607
        self->priv->camera_monitor = _tmp47_;
 
1608
        _tmp48_ = self->priv->camera_monitor;
 
1609
        g_signal_connect_data (_tmp48_, "added", (GCallback) ___lambda58__cheese_camera_device_monitor_added, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
 
1610
        _tmp49_ = self->priv->camera_monitor;
 
1611
        g_signal_connect_data (_tmp49_, "removed", (GCallback) ___lambda59__cheese_camera_device_monitor_removed, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
 
1612
        _tmp50_ = self->priv->camera_monitor;
 
1613
        cheese_camera_device_monitor_coldplug (_tmp50_);
 
1614
        g_signal_connect_object (_data43_->webcam_button, "clicked", (GCallback) ___lambda60__gtk_tool_button_clicked, self, 0);
 
1615
        _tmp51_ = frame_grid;
 
1616
        gtk_widget_show_all ((GtkWidget*) _tmp51_);
 
1617
        _tmp52_ = self->priv->notebook;
 
1618
        _tmp53_ = frame_grid;
 
1619
        gtk_notebook_append_page (_tmp52_, (GtkWidget*) _tmp53_, NULL);
 
1620
        _tmp54_ = (GtkGrid*) gtk_grid_new ();
 
1621
        g_object_ref_sink (_tmp54_);
 
1622
        _g_object_unref0 (frame_grid);
 
1623
        frame_grid = _tmp54_;
 
1624
        _tmp55_ = frame_grid;
 
1625
        gtk_orientable_set_orientation ((GtkOrientable*) _tmp55_, GTK_ORIENTATION_VERTICAL);
 
1626
        _tmp56_ = (GtkToolbar*) gtk_toolbar_new ();
 
1627
        g_object_ref_sink (_tmp56_);
 
1628
        _g_object_unref0 (toolbar);
 
1629
        toolbar = _tmp56_;
 
1630
        _tmp57_ = toolbar;
 
1631
        _tmp58_ = gtk_widget_get_style_context ((GtkWidget*) _tmp57_);
 
1632
        gtk_style_context_add_class (_tmp58_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 
1633
        _tmp59_ = toolbar;
 
1634
        gtk_toolbar_set_icon_size (_tmp59_, GTK_ICON_SIZE_MENU);
 
1635
        _tmp60_ = toolbar;
 
1636
        gtk_widget_set_vexpand ((GtkWidget*) _tmp60_, FALSE);
 
1637
        _tmp61_ = frame_grid;
 
1638
        _tmp62_ = toolbar;
 
1639
        gtk_grid_attach (_tmp61_, (GtkWidget*) _tmp62_, 0, 1, 1, 1);
 
1640
        _tmp63_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1641
        g_object_ref_sink (_tmp63_);
 
1642
        accept_button = _tmp63_;
 
1643
        _tmp64_ = accept_button;
 
1644
        gtk_tool_button_set_icon_name (_tmp64_, "object-select-symbolic");
 
1645
        _tmp65_ = accept_button;
 
1646
        _tmp66_ = gtk_widget_get_style_context ((GtkWidget*) _tmp65_);
 
1647
        gtk_style_context_add_class (_tmp66_, GTK_STYLE_CLASS_RAISED);
 
1648
        _tmp67_ = accept_button;
 
1649
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp67_, TRUE);
 
1650
        _tmp68_ = toolbar;
 
1651
        _tmp69_ = accept_button;
 
1652
        gtk_container_add ((GtkContainer*) _tmp68_, (GtkWidget*) _tmp69_);
 
1653
        _tmp70_ = accept_button;
 
1654
        g_signal_connect_object (_tmp70_, "clicked", (GCallback) ___lambda61__gtk_tool_button_clicked, self, 0);
 
1655
        _tmp71_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1656
        g_object_ref_sink (_tmp71_);
 
1657
        cancel_button = _tmp71_;
 
1658
        _tmp72_ = cancel_button;
 
1659
        gtk_tool_button_set_icon_name (_tmp72_, "edit-undo-symbolic");
 
1660
        _tmp73_ = cancel_button;
 
1661
        _tmp74_ = gtk_widget_get_style_context ((GtkWidget*) _tmp73_);
 
1662
        gtk_style_context_add_class (_tmp74_, GTK_STYLE_CLASS_RAISED);
 
1663
        _tmp75_ = cancel_button;
 
1664
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp75_, TRUE);
 
1665
        _tmp76_ = toolbar;
 
1666
        _tmp77_ = cancel_button;
 
1667
        gtk_container_add ((GtkContainer*) _tmp76_, (GtkWidget*) _tmp77_);
 
1668
        _tmp78_ = cancel_button;
 
1669
        g_signal_connect_object (_tmp78_, "clicked", (GCallback) ___lambda62__gtk_tool_button_clicked, self, 0);
 
1670
        _tmp79_ = frame_grid;
 
1671
        gtk_widget_show_all ((GtkWidget*) _tmp79_);
 
1672
        _tmp80_ = self->priv->notebook;
 
1673
        _tmp81_ = frame_grid;
 
1674
        gtk_notebook_append_page (_tmp80_, (GtkWidget*) _tmp81_, NULL);
 
1675
        _tmp82_ = (GtkGrid*) gtk_grid_new ();
 
1676
        g_object_ref_sink (_tmp82_);
 
1677
        _g_object_unref0 (frame_grid);
 
1678
        frame_grid = _tmp82_;
 
1679
        _tmp83_ = frame_grid;
 
1680
        gtk_orientable_set_orientation ((GtkOrientable*) _tmp83_, GTK_ORIENTATION_VERTICAL);
 
1681
        _tmp84_ = (CheeseWidget*) cheese_widget_new ();
 
1682
        g_object_ref_sink (_tmp84_);
 
1683
        _g_object_unref0 (self->priv->cheese);
 
1684
        self->priv->cheese = _tmp84_;
 
1685
        _tmp85_ = self->priv->cheese;
 
1686
        gtk_widget_set_vexpand ((GtkWidget*) _tmp85_, TRUE);
 
1687
        _tmp86_ = self->priv->cheese;
 
1688
        gtk_widget_set_hexpand ((GtkWidget*) _tmp86_, TRUE);
 
1689
        _tmp87_ = self->priv->cheese;
 
1690
        gtk_widget_set_no_show_all ((GtkWidget*) _tmp87_, TRUE);
 
1691
        _tmp88_ = frame_grid;
 
1692
        _tmp89_ = self->priv->cheese;
 
1693
        gtk_container_add ((GtkContainer*) _tmp88_, (GtkWidget*) _tmp89_);
 
1694
        _tmp90_ = (CheeseFlash*) cheese_flash_new ((GtkWidget*) self);
 
1695
        g_object_ref_sink (_tmp90_);
 
1696
        _g_object_unref0 (self->priv->flash);
 
1697
        self->priv->flash = _tmp90_;
 
1698
        _tmp91_ = (GtkToolbar*) gtk_toolbar_new ();
 
1699
        g_object_ref_sink (_tmp91_);
 
1700
        _g_object_unref0 (toolbar);
 
1701
        toolbar = _tmp91_;
 
1702
        _tmp92_ = toolbar;
 
1703
        _tmp93_ = gtk_widget_get_style_context ((GtkWidget*) _tmp92_);
 
1704
        gtk_style_context_add_class (_tmp93_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 
1705
        _tmp94_ = toolbar;
 
1706
        gtk_toolbar_set_icon_size (_tmp94_, GTK_ICON_SIZE_MENU);
 
1707
        _tmp95_ = toolbar;
 
1708
        gtk_widget_set_vexpand ((GtkWidget*) _tmp95_, FALSE);
 
1709
        _tmp96_ = frame_grid;
 
1710
        _tmp97_ = toolbar;
 
1711
        gtk_grid_attach (_tmp96_, (GtkWidget*) _tmp97_, 0, 1, 1, 1);
 
1712
        _tmp98_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1713
        g_object_ref_sink (_tmp98_);
 
1714
        _g_object_unref0 (accept_button);
 
1715
        accept_button = _tmp98_;
 
1716
        _tmp99_ = accept_button;
 
1717
        gtk_tool_button_set_icon_name (_tmp99_, "object-select-symbolic");
 
1718
        _tmp100_ = accept_button;
 
1719
        _tmp101_ = gtk_widget_get_style_context ((GtkWidget*) _tmp100_);
 
1720
        gtk_style_context_add_class (_tmp101_, GTK_STYLE_CLASS_RAISED);
 
1721
        _tmp102_ = accept_button;
 
1722
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp102_, TRUE);
 
1723
        _tmp103_ = toolbar;
 
1724
        _tmp104_ = accept_button;
 
1725
        gtk_container_add ((GtkContainer*) _tmp103_, (GtkWidget*) _tmp104_);
 
1726
        _tmp105_ = accept_button;
 
1727
        g_signal_connect_object (_tmp105_, "clicked", (GCallback) ___lambda63__gtk_tool_button_clicked, self, 0);
 
1728
        _tmp106_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
 
1729
        g_object_ref_sink (_tmp106_);
 
1730
        _g_object_unref0 (cancel_button);
 
1731
        cancel_button = _tmp106_;
 
1732
        _tmp107_ = cancel_button;
 
1733
        gtk_tool_button_set_icon_name (_tmp107_, "edit-undo-symbolic");
 
1734
        _tmp108_ = cancel_button;
 
1735
        _tmp109_ = gtk_widget_get_style_context ((GtkWidget*) _tmp108_);
 
1736
        gtk_style_context_add_class (_tmp109_, GTK_STYLE_CLASS_RAISED);
 
1737
        _tmp110_ = cancel_button;
 
1738
        gtk_tool_item_set_is_important ((GtkToolItem*) _tmp110_, TRUE);
 
1739
        _tmp111_ = toolbar;
 
1740
        _tmp112_ = cancel_button;
 
1741
        gtk_container_add ((GtkContainer*) _tmp111_, (GtkWidget*) _tmp112_);
 
1742
        _tmp113_ = cancel_button;
 
1743
        g_signal_connect_object (_tmp113_, "clicked", (GCallback) ___lambda65__gtk_tool_button_clicked, self, 0);
 
1744
        _tmp114_ = frame_grid;
 
1745
        gtk_widget_show_all ((GtkWidget*) _tmp114_);
 
1746
        _tmp115_ = self->priv->notebook;
 
1747
        _tmp116_ = frame_grid;
 
1748
        gtk_notebook_append_page (_tmp115_, (GtkWidget*) _tmp116_, NULL);
 
1749
        _tmp117_ = self->priv->notebook;
 
1750
        gtk_notebook_set_current_page (_tmp117_, 0);
 
1751
        g_signal_connect_object ((GtkDialog*) self, "response", (GCallback) ___lambda66__gtk_dialog_response, self, 0);
1503
1752
        contacts_avatar_dialog_update_grid (self);
1504
1753
        gtk_widget_show_all ((GtkWidget*) grid);
1505
 
        _tmp73_ = self->priv->crop_button;
1506
 
        gtk_widget_hide ((GtkWidget*) _tmp73_);
1507
 
        _tmp74_ = self->priv->cancel_button;
1508
 
        gtk_widget_hide ((GtkWidget*) _tmp74_);
 
1754
        _g_object_unref0 (cancel_button);
 
1755
        _g_object_unref0 (accept_button);
 
1756
        _g_object_unref0 (the_add_button);
1509
1757
        _g_object_unref0 (toolbar);
 
1758
        _g_object_unref0 (scrolled);
 
1759
        _g_object_unref0 (frame_grid);
1510
1760
        _g_object_unref0 (frame);
1511
1761
        _g_object_unref0 (label);
1512
1762
        _g_object_unref0 (container);
1513
1763
        _g_object_unref0 (grid);
1514
 
        block38_data_unref (_data38_);
1515
 
        _data38_ = NULL;
 
1764
        block43_data_unref (_data43_);
 
1765
        _data43_ = NULL;
1516
1766
        return self;
1517
1767
}
1518
1768
 
1537
1787
 
1538
1788
static void contacts_avatar_dialog_finalize (GObject* obj) {
1539
1789
        ContactsAvatarDialog * self;
1540
 
        self = CONTACTS_AVATAR_DIALOG (obj);
 
1790
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_AVATAR_DIALOG, ContactsAvatarDialog);
1541
1791
        _g_object_unref0 (self->priv->thumbnail_factory);
1542
1792
        _g_object_unref0 (self->priv->contact);
1543
 
        _g_object_unref0 (self->priv->frame_grid);
1544
 
        _g_object_unref0 (self->priv->scrolled);
1545
 
        _g_object_unref0 (self->priv->the_add_button);
1546
 
        _g_object_unref0 (self->priv->crop_button);
1547
 
        _g_object_unref0 (self->priv->cancel_button);
 
1793
        _g_object_unref0 (self->priv->notebook);
 
1794
        _g_object_unref0 (self->priv->crop_area);
1548
1795
        _g_object_unref0 (self->priv->view_grid);
1549
1796
        _g_object_unref0 (self->priv->main_frame);
 
1797
        _g_object_unref0 (self->priv->flash);
 
1798
        _g_object_unref0 (self->priv->camera_monitor);
 
1799
        _g_object_unref0 (self->priv->cheese);
1550
1800
        _g_object_unref0 (self->priv->new_pixbuf);
1551
1801
        G_OBJECT_CLASS (contacts_avatar_dialog_parent_class)->finalize (obj);
1552
1802
}