~ubuntu-branches/ubuntu/utopic/unity-greeter/utopic

« back to all changes in this revision

Viewing changes to src/prompt-box.c

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2013-01-04 10:37:29 UTC
  • mto: This revision was merged to the branch mainline in revision 51.
  • Revision ID: package-import@ubuntu.com-20130104103729-ydal31wfuhirb8zb
Tags: upstream-13.04.0
ImportĀ upstreamĀ versionĀ 13.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* prompt-box.c generated by valac 0.16.1, the Vala compiler
 
1
/* prompt-box.c generated by valac 0.18.1, the Vala compiler
2
2
 * generated from prompt-box.vala, do not modify */
3
3
 
4
4
/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
86
86
typedef struct _FadingLabel FadingLabel;
87
87
typedef struct _FadingLabelClass FadingLabelClass;
88
88
 
 
89
#define TYPE_FLAT_BUTTON (flat_button_get_type ())
 
90
#define FLAT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAT_BUTTON, FlatButton))
 
91
#define FLAT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FLAT_BUTTON, FlatButtonClass))
 
92
#define IS_FLAT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAT_BUTTON))
 
93
#define IS_FLAT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FLAT_BUTTON))
 
94
#define FLAT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FLAT_BUTTON, FlatButtonClass))
 
95
 
 
96
typedef struct _FlatButton FlatButton;
 
97
typedef struct _FlatButtonClass FlatButtonClass;
 
98
 
89
99
#define TYPE_ACTIVE_INDICATOR (active_indicator_get_type ())
90
100
#define ACTIVE_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ACTIVE_INDICATOR, ActiveIndicator))
91
101
#define ACTIVE_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ACTIVE_INDICATOR, ActiveIndicatorClass))
109
119
#define PROMPT_BOX_TYPE_PROMPT_VISIBILITY (prompt_box_prompt_visibility_get_type ())
110
120
#define _g_free0(var) (var = (g_free (var), NULL))
111
121
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
112
 
#define _pango_font_description_free0(var) ((var == NULL) ? NULL : (var = (pango_font_description_free (var), NULL)))
 
122
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
113
123
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
114
124
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
115
125
 
159
169
        GtkGrid* box_grid;
160
170
        GtkGrid* name_grid;
161
171
        FadingLabel* name_label;
162
 
        GtkButton* option_button;
 
172
        FlatButton* option_button;
163
173
        GtkWidget* small_box_widget;
164
174
        FadingLabel* small_name_label;
165
175
        gint start_row;
187
197
        gdouble _position;
188
198
        GtkFixed* fixed;
189
199
        GtkWidget* zone;
190
 
        gint name_grid_height;
191
200
        ActiveIndicator* active_indicator;
192
201
        CachedImage* option_image;
193
202
        CachedImage* message_image;
218
227
};
219
228
 
220
229
struct _ActiveIndicator {
221
 
        GtkLabel parent_instance;
 
230
        GtkImage parent_instance;
222
231
        ActiveIndicatorPrivate * priv;
223
232
};
224
233
 
225
234
struct _ActiveIndicatorClass {
226
 
        GtkLabelClass parent_class;
 
235
        GtkImageClass parent_class;
227
236
};
228
237
 
229
238
struct _ActiveIndicatorPrivate {
240
249
GType fadable_box_get_type (void) G_GNUC_CONST;
241
250
GType prompt_box_get_type (void) G_GNUC_CONST;
242
251
GType fading_label_get_type (void) G_GNUC_CONST;
 
252
GType flat_button_get_type (void) G_GNUC_CONST;
243
253
GType active_indicator_get_type (void) G_GNUC_CONST;
244
254
GType cached_image_get_type (void) G_GNUC_CONST;
245
255
static GType prompt_box_prompt_visibility_get_type (void) G_GNUC_UNUSED;
251
261
        PROMPT_BOX_LABEL,
252
262
        PROMPT_BOX_POSITION
253
263
};
254
 
#define grid_size 40
255
 
#define PROMPT_BOX_NAME_MARGIN_TOP 12
256
264
#define PROMPT_BOX_COL_ACTIVE 0
257
265
#define PROMPT_BOX_COL_CONTENT 1
258
266
#define PROMPT_BOX_COL_SPACER 2
269
277
static GtkGrid* prompt_box_real_create_name_grid (PromptBox* self);
270
278
FadingLabel* fading_label_new (const gchar* text);
271
279
FadingLabel* fading_label_construct (GType object_type, const gchar* text);
 
280
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
 
281
#define grid_size 40
272
282
CachedImage* cached_image_new (GdkPixbuf* pixbuf);
273
283
CachedImage* cached_image_construct (GType object_type, GdkPixbuf* pixbuf);
 
284
FlatButton* flat_button_new (void);
 
285
FlatButton* flat_button_construct (GType object_type);
 
286
#define ACTIVE_INDICATOR_WIDTH 8
274
287
static void prompt_box_option_button_clicked_cb (PromptBox* self, GtkButton* button);
275
288
static void _prompt_box_option_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self);
276
 
void unity_greeter_add_style_class (GtkWidget* widget);
277
289
GtkGrid* prompt_box_create_small_name_grid (PromptBox* self);
278
290
static GtkGrid* prompt_box_real_create_small_name_grid (PromptBox* self);
279
291
void prompt_box_set_start_row (PromptBox* self);
315
327
static void __lambda11_ (PromptBox* self, GtkWidget* w);
316
328
static void ___lambda11__gtk_callback (GtkWidget* widget, gpointer self);
317
329
void prompt_box_attach_item (PromptBox* self, GtkWidget* w, gboolean add_style_class);
 
330
void unity_greeter_add_style_class (GtkWidget* widget);
318
331
void prompt_box_add_message (PromptBox* self, const gchar* text, gboolean is_error);
319
332
DashEntry* prompt_box_add_prompt (PromptBox* self, const gchar* text, const gchar* accessible_text, gboolean is_secret);
320
333
static void __lambda12_ (PromptBox* self, GtkWidget* w);
359
372
static GObject * prompt_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
360
373
ActiveIndicator* active_indicator_new (void);
361
374
ActiveIndicator* active_indicator_construct (GType object_type);
 
375
#define ACTIVE_INDICATOR_HEIGHT 7
362
376
static gboolean _prompt_box___lambda16_ (PromptBox* self);
363
377
static gboolean __prompt_box___lambda16__gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
364
378
static void prompt_box_finalize (GObject* obj);
369
383
        ACTIVE_INDICATOR_DUMMY_PROPERTY,
370
384
        ACTIVE_INDICATOR_ACTIVE
371
385
};
372
 
#define ACTIVE_INDICATOR_WIDTH 4
373
 
#define ACTIVE_INDICATOR_HEIGHT 5
374
386
static void active_indicator_real_get_preferred_width (GtkWidget* base, gint* min, gint* nat);
375
387
static void active_indicator_real_get_preferred_height (GtkWidget* base, gint* min, gint* nat);
376
388
static gboolean active_indicator_real_draw (GtkWidget* base, cairo_t* c);
412
424
}
413
425
 
414
426
 
 
427
static void _vala_PangoFontDescription_free (PangoFontDescription* self) {
 
428
        g_boxed_free (pango_font_description_get_type (), self);
 
429
}
 
430
 
 
431
 
415
432
static void _prompt_box_option_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) {
416
433
        prompt_box_option_button_clicked_cb (self, _sender);
417
434
}
420
437
static GtkGrid* prompt_box_real_create_name_grid (PromptBox* self) {
421
438
        GtkGrid* result = NULL;
422
439
        GtkGrid* _tmp0_;
423
 
        GtkGrid* _tmp1_;
424
440
        GtkGrid* name_grid;
 
441
        FadingLabel* _tmp1_;
425
442
        FadingLabel* _tmp2_;
426
 
        FadingLabel* _tmp3_;
427
 
        FadingLabel* _tmp4_;
428
 
        PangoFontDescription* _tmp5_ = NULL;
429
 
        PangoFontDescription* _tmp6_;
 
443
        PangoFontDescription* _tmp3_ = NULL;
 
444
        PangoFontDescription* _tmp4_;
 
445
        FadingLabel* _tmp5_;
 
446
        GdkRGBA _tmp6_ = {0};
430
447
        FadingLabel* _tmp7_;
431
 
        GdkRGBA _tmp8_ = {0};
 
448
        FadingLabel* _tmp8_;
432
449
        FadingLabel* _tmp9_;
433
450
        FadingLabel* _tmp10_;
434
451
        FadingLabel* _tmp11_;
435
452
        FadingLabel* _tmp12_;
436
453
        FadingLabel* _tmp13_;
437
 
        gint _tmp14_;
438
 
        FadingLabel* _tmp15_;
439
 
        FadingLabel* _tmp16_;
440
 
        CachedImage* _tmp17_;
441
 
        CachedImage* _tmp18_;
442
 
        GtkAlignment* _tmp28_;
443
 
        GtkAlignment* _tmp29_;
 
454
        FadingLabel* _tmp14_;
 
455
        CachedImage* _tmp15_;
 
456
        GtkAlignment* _tmp25_;
444
457
        GtkAlignment* align;
445
 
        gint _tmp30_;
446
 
        CachedImage* _tmp31_;
447
 
        GtkButton* _tmp32_;
448
 
        GtkButton* _tmp33_;
449
 
        GtkButton* _tmp34_;
450
 
        GtkButton* _tmp35_;
451
 
        GtkButton* _tmp36_;
452
 
        GtkButton* _tmp37_;
453
 
        GtkButton* _tmp38_;
454
 
        GtkButton* _tmp39_;
455
 
        GtkButton* _tmp40_;
456
 
        AtkObject* _tmp41_ = NULL;
457
 
        const gchar* _tmp42_ = NULL;
458
 
        GtkButton* _tmp43_;
459
 
        CachedImage* _tmp44_;
460
 
        CachedImage* _tmp45_;
461
 
        CachedImage* _tmp46_;
462
 
        GtkButton* _tmp47_;
463
 
        GtkButton* _tmp53_;
464
 
        CachedImage* _tmp54_;
465
 
        GtkButton* _tmp55_;
 
458
        CachedImage* _tmp26_;
 
459
        FlatButton* _tmp27_;
 
460
        FlatButton* _tmp28_;
 
461
        FlatButton* _tmp29_;
 
462
        FlatButton* _tmp30_;
 
463
        FlatButton* _tmp31_;
 
464
        GtkGrid* _tmp32_;
 
465
        gint _tmp33_;
 
466
        gint _tmp34_;
 
467
        FlatButton* _tmp35_;
 
468
        FlatButton* _tmp36_;
 
469
        FlatButton* _tmp37_;
 
470
        AtkObject* _tmp38_ = NULL;
 
471
        const gchar* _tmp39_ = NULL;
 
472
        FlatButton* _tmp40_;
 
473
        CachedImage* _tmp41_;
 
474
        CachedImage* _tmp42_;
 
475
        FlatButton* _tmp48_;
 
476
        CachedImage* _tmp49_;
 
477
        FlatButton* _tmp50_;
466
478
        GError * _inner_error_ = NULL;
467
479
        _tmp0_ = (GtkGrid*) gtk_grid_new ();
468
 
        _tmp1_ = g_object_ref_sink (_tmp0_);
469
 
        name_grid = _tmp1_;
 
480
        g_object_ref_sink (_tmp0_);
 
481
        name_grid = _tmp0_;
470
482
        gtk_grid_set_column_spacing (name_grid, 4);
471
483
        gtk_widget_set_hexpand ((GtkWidget*) name_grid, TRUE);
472
 
        _tmp2_ = fading_label_new ("");
473
 
        _tmp3_ = g_object_ref_sink (_tmp2_);
 
484
        _tmp1_ = fading_label_new ("");
 
485
        g_object_ref_sink (_tmp1_);
474
486
        _g_object_unref0 (self->name_label);
475
 
        self->name_label = _tmp3_;
476
 
        _tmp4_ = self->name_label;
477
 
        _tmp5_ = pango_font_description_from_string ("Ubuntu 13");
478
 
        _tmp6_ = _tmp5_;
479
 
        gtk_widget_override_font ((GtkWidget*) _tmp4_, _tmp6_);
480
 
        _pango_font_description_free0 (_tmp6_);
 
487
        self->name_label = _tmp1_;
 
488
        _tmp2_ = self->name_label;
 
489
        _tmp3_ = pango_font_description_from_string ("Ubuntu 13");
 
490
        _tmp4_ = _tmp3_;
 
491
        gtk_widget_override_font ((GtkWidget*) _tmp2_, _tmp4_);
 
492
        __vala_PangoFontDescription_free0 (_tmp4_);
 
493
        _tmp5_ = self->name_label;
 
494
        _tmp6_.red = (gdouble) 1.0f;
 
495
        _tmp6_.green = (gdouble) 1.0f;
 
496
        _tmp6_.blue = (gdouble) 1.0f;
 
497
        _tmp6_.alpha = (gdouble) 1.0f;
 
498
        gtk_widget_override_color ((GtkWidget*) _tmp5_, GTK_STATE_FLAG_NORMAL, &_tmp6_);
481
499
        _tmp7_ = self->name_label;
482
 
        _tmp8_.red = (gdouble) 1.0f;
483
 
        _tmp8_.green = (gdouble) 1.0f;
484
 
        _tmp8_.blue = (gdouble) 1.0f;
485
 
        _tmp8_.alpha = (gdouble) 1.0f;
486
 
        gtk_widget_override_color ((GtkWidget*) _tmp7_, GTK_STATE_FLAG_NORMAL, &_tmp8_);
 
500
        gtk_widget_set_valign ((GtkWidget*) _tmp7_, GTK_ALIGN_START);
 
501
        _tmp8_ = self->name_label;
 
502
        gtk_widget_set_vexpand ((GtkWidget*) _tmp8_, TRUE);
487
503
        _tmp9_ = self->name_label;
488
 
        gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, PROMPT_BOX_NAME_MARGIN_TOP);
 
504
        g_object_set ((GtkMisc*) _tmp9_, "yalign", 0.5f, NULL);
489
505
        _tmp10_ = self->name_label;
490
 
        gtk_widget_set_valign ((GtkWidget*) _tmp10_, GTK_ALIGN_START);
 
506
        g_object_set ((GtkMisc*) _tmp10_, "xalign", 0.0f, NULL);
491
507
        _tmp11_ = self->name_label;
492
 
        gtk_widget_set_vexpand ((GtkWidget*) _tmp11_, TRUE);
 
508
        gtk_widget_set_margin_left ((GtkWidget*) _tmp11_, 2);
493
509
        _tmp12_ = self->name_label;
494
 
        g_object_set ((GtkMisc*) _tmp12_, "xalign", 0.0f, NULL);
 
510
        gtk_widget_set_size_request ((GtkWidget*) _tmp12_, -1, grid_size);
495
511
        _tmp13_ = self->name_label;
496
 
        _tmp14_ = self->priv->name_grid_height;
497
 
        gtk_widget_set_size_request ((GtkWidget*) _tmp13_, -1, _tmp14_);
498
 
        _tmp15_ = self->name_label;
499
 
        gtk_widget_show ((GtkWidget*) _tmp15_);
500
 
        _tmp16_ = self->name_label;
501
 
        gtk_grid_attach (name_grid, (GtkWidget*) _tmp16_, PROMPT_BOX_COL_NAME_LABEL, PROMPT_BOX_ROW_NAME, 1, 1);
502
 
        _tmp17_ = cached_image_new (NULL);
503
 
        _tmp18_ = g_object_ref_sink (_tmp17_);
 
512
        gtk_widget_show ((GtkWidget*) _tmp13_);
 
513
        _tmp14_ = self->name_label;
 
514
        gtk_grid_attach (name_grid, (GtkWidget*) _tmp14_, PROMPT_BOX_COL_NAME_LABEL, PROMPT_BOX_ROW_NAME, 1, 1);
 
515
        _tmp15_ = cached_image_new (NULL);
 
516
        g_object_ref_sink (_tmp15_);
504
517
        _g_object_unref0 (self->priv->message_image);
505
 
        self->priv->message_image = _tmp18_;
 
518
        self->priv->message_image = _tmp15_;
506
519
        {
507
 
                gchar* _tmp19_ = NULL;
508
 
                gchar* _tmp20_;
509
 
                GdkPixbuf* _tmp21_;
 
520
                gchar* _tmp16_ = NULL;
 
521
                gchar* _tmp17_;
 
522
                GdkPixbuf* _tmp18_;
 
523
                GdkPixbuf* _tmp19_;
 
524
                GdkPixbuf* _tmp20_;
 
525
                CachedImage* _tmp21_;
510
526
                GdkPixbuf* _tmp22_;
511
 
                GdkPixbuf* _tmp23_;
512
 
                CachedImage* _tmp24_;
513
 
                GdkPixbuf* _tmp25_;
514
 
                _tmp19_ = g_build_filename (PKGDATADIR, "message.png", NULL, NULL);
 
527
                _tmp16_ = g_build_filename (PKGDATADIR, "message.png", NULL, NULL);
 
528
                _tmp17_ = _tmp16_;
 
529
                _tmp18_ = gdk_pixbuf_new_from_file (_tmp17_, &_inner_error_);
 
530
                _tmp19_ = _tmp18_;
 
531
                _g_free0 (_tmp17_);
515
532
                _tmp20_ = _tmp19_;
516
 
                _tmp21_ = gdk_pixbuf_new_from_file (_tmp20_, &_inner_error_);
517
 
                _tmp22_ = _tmp21_;
518
 
                _g_free0 (_tmp20_);
519
 
                _tmp23_ = _tmp22_;
520
533
                if (_inner_error_ != NULL) {
521
 
                        goto __catch11_g_error;
 
534
                        goto __catch14_g_error;
522
535
                }
523
 
                _tmp24_ = self->priv->message_image;
524
 
                _tmp25_ = _tmp23_;
525
 
                g_object_set ((GtkImage*) _tmp24_, "pixbuf", _tmp25_, NULL);
526
 
                _g_object_unref0 (_tmp25_);
 
536
                _tmp21_ = self->priv->message_image;
 
537
                _tmp22_ = _tmp20_;
 
538
                g_object_set ((GtkImage*) _tmp21_, "pixbuf", _tmp22_, NULL);
 
539
                _g_object_unref0 (_tmp22_);
527
540
        }
528
 
        goto __finally11;
529
 
        __catch11_g_error:
 
541
        goto __finally14;
 
542
        __catch14_g_error:
530
543
        {
531
544
                GError* e = NULL;
532
 
                GError* _tmp26_;
533
 
                const gchar* _tmp27_;
 
545
                GError* _tmp23_;
 
546
                const gchar* _tmp24_;
534
547
                e = _inner_error_;
535
548
                _inner_error_ = NULL;
536
 
                _tmp26_ = e;
537
 
                _tmp27_ = _tmp26_->message;
538
 
                g_debug ("prompt-box.vala:195: Error loading message image: %s", _tmp27_);
 
549
                _tmp23_ = e;
 
550
                _tmp24_ = _tmp23_->message;
 
551
                g_debug ("prompt-box.vala:193: Error loading message image: %s", _tmp24_);
539
552
                _g_error_free0 (e);
540
553
        }
541
 
        __finally11:
 
554
        __finally14:
542
555
        if (_inner_error_ != NULL) {
543
556
                _g_object_unref0 (name_grid);
544
557
                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);
545
558
                g_clear_error (&_inner_error_);
546
559
                return NULL;
547
560
        }
548
 
        _tmp28_ = (GtkAlignment*) gtk_alignment_new (0.5f, 0.5f, 0.0f, 0.0f);
549
 
        _tmp29_ = g_object_ref_sink (_tmp28_);
550
 
        align = _tmp29_;
 
561
        _tmp25_ = (GtkAlignment*) gtk_alignment_new (0.5f, 0.5f, 0.0f, 0.0f);
 
562
        g_object_ref_sink (_tmp25_);
 
563
        align = _tmp25_;
551
564
        gtk_widget_set_valign ((GtkWidget*) align, GTK_ALIGN_START);
552
 
        gtk_widget_set_margin_top ((GtkWidget*) align, PROMPT_BOX_NAME_MARGIN_TOP);
553
 
        _tmp30_ = self->priv->name_grid_height;
554
 
        gtk_widget_set_size_request ((GtkWidget*) align, -1, _tmp30_);
555
 
        _tmp31_ = self->priv->message_image;
556
 
        gtk_container_add ((GtkContainer*) align, (GtkWidget*) _tmp31_);
 
565
        gtk_widget_set_size_request ((GtkWidget*) align, -1, grid_size);
 
566
        _tmp26_ = self->priv->message_image;
 
567
        gtk_container_add ((GtkContainer*) align, (GtkWidget*) _tmp26_);
557
568
        gtk_widget_show ((GtkWidget*) align);
558
569
        gtk_grid_attach (name_grid, (GtkWidget*) align, PROMPT_BOX_COL_NAME_MESSAGE, PROMPT_BOX_ROW_NAME, 1, 1);
559
 
        _tmp32_ = (GtkButton*) gtk_button_new ();
560
 
        _tmp33_ = g_object_ref_sink (_tmp32_);
 
570
        _tmp27_ = flat_button_new ();
 
571
        g_object_ref_sink (_tmp27_);
561
572
        _g_object_unref0 (self->option_button);
562
 
        self->option_button = _tmp33_;
563
 
        _tmp34_ = self->option_button;
564
 
        gtk_widget_set_hexpand ((GtkWidget*) _tmp34_, TRUE);
 
573
        self->option_button = _tmp27_;
 
574
        _tmp28_ = self->option_button;
 
575
        gtk_widget_set_hexpand ((GtkWidget*) _tmp28_, TRUE);
 
576
        _tmp29_ = self->option_button;
 
577
        gtk_widget_set_halign ((GtkWidget*) _tmp29_, GTK_ALIGN_END);
 
578
        _tmp30_ = self->option_button;
 
579
        gtk_widget_set_valign ((GtkWidget*) _tmp30_, GTK_ALIGN_START);
 
580
        _tmp31_ = self->option_button;
 
581
        _tmp32_ = self->box_grid;
 
582
        _tmp33_ = gtk_grid_get_column_spacing (_tmp32_);
 
583
        _tmp34_ = _tmp33_;
 
584
        gtk_widget_set_margin_top ((GtkWidget*) _tmp31_, ACTIVE_INDICATOR_WIDTH + _tmp34_);
565
585
        _tmp35_ = self->option_button;
566
 
        gtk_widget_set_halign ((GtkWidget*) _tmp35_, GTK_ALIGN_END);
 
586
        gtk_button_set_focus_on_click ((GtkButton*) _tmp35_, FALSE);
567
587
        _tmp36_ = self->option_button;
568
 
        gtk_widget_set_valign ((GtkWidget*) _tmp36_, GTK_ALIGN_START);
 
588
        gtk_button_set_relief ((GtkButton*) _tmp36_, GTK_RELIEF_NONE);
569
589
        _tmp37_ = self->option_button;
570
 
        gtk_widget_set_margin_top ((GtkWidget*) _tmp37_, PROMPT_BOX_NAME_MARGIN_TOP);
571
 
        _tmp38_ = self->option_button;
572
 
        gtk_button_set_focus_on_click (_tmp38_, FALSE);
573
 
        _tmp39_ = self->option_button;
574
 
        gtk_button_set_relief (_tmp39_, GTK_RELIEF_NONE);
 
590
        _tmp38_ = gtk_widget_get_accessible ((GtkWidget*) _tmp37_);
 
591
        _tmp39_ = _ ("Session Options");
 
592
        atk_object_set_name (_tmp38_, _tmp39_);
575
593
        _tmp40_ = self->option_button;
576
 
        _tmp41_ = gtk_widget_get_accessible ((GtkWidget*) _tmp40_);
577
 
        _tmp42_ = _ ("Session Options");
578
 
        atk_object_set_name (_tmp41_, _tmp42_);
579
 
        _tmp43_ = self->option_button;
580
 
        g_signal_connect_object (_tmp43_, "clicked", (GCallback) _prompt_box_option_button_clicked_cb_gtk_button_clicked, self, 0);
581
 
        _tmp44_ = cached_image_new (NULL);
582
 
        _tmp45_ = g_object_ref_sink (_tmp44_);
 
594
        g_signal_connect_object ((GtkButton*) _tmp40_, "clicked", (GCallback) _prompt_box_option_button_clicked_cb_gtk_button_clicked, self, 0);
 
595
        _tmp41_ = cached_image_new (NULL);
 
596
        g_object_ref_sink (_tmp41_);
583
597
        _g_object_unref0 (self->priv->option_image);
584
 
        self->priv->option_image = _tmp45_;
585
 
        _tmp46_ = self->priv->option_image;
586
 
        gtk_widget_show ((GtkWidget*) _tmp46_);
587
 
        _tmp47_ = self->option_button;
588
 
        unity_greeter_add_style_class ((GtkWidget*) _tmp47_);
 
598
        self->priv->option_image = _tmp41_;
 
599
        _tmp42_ = self->priv->option_image;
 
600
        gtk_widget_show ((GtkWidget*) _tmp42_);
589
601
        {
590
 
                GtkCssProvider* _tmp48_;
 
602
                GtkCssProvider* _tmp43_;
591
603
                GtkCssProvider* style;
592
 
                GtkButton* _tmp49_;
593
 
                GtkStyleContext* _tmp50_ = NULL;
594
 
                _tmp48_ = gtk_css_provider_new ();
595
 
                style = _tmp48_;
 
604
                FlatButton* _tmp44_;
 
605
                GtkStyleContext* _tmp45_ = NULL;
 
606
                _tmp43_ = gtk_css_provider_new ();
 
607
                style = _tmp43_;
596
608
                gtk_css_provider_load_from_data (style, "* {padding: 2px;}", (gssize) (-1), &_inner_error_);
597
609
                if (_inner_error_ != NULL) {
598
610
                        _g_object_unref0 (style);
599
 
                        goto __catch12_g_error;
 
611
                        goto __catch15_g_error;
600
612
                }
601
 
                _tmp49_ = self->option_button;
602
 
                _tmp50_ = gtk_widget_get_style_context ((GtkWidget*) _tmp49_);
603
 
                gtk_style_context_add_provider (_tmp50_, (GtkStyleProvider*) style, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
613
                _tmp44_ = self->option_button;
 
614
                _tmp45_ = gtk_widget_get_style_context ((GtkWidget*) _tmp44_);
 
615
                gtk_style_context_add_provider (_tmp45_, (GtkStyleProvider*) style, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
604
616
                _g_object_unref0 (style);
605
617
        }
606
 
        goto __finally12;
607
 
        __catch12_g_error:
 
618
        goto __finally15;
 
619
        __catch15_g_error:
608
620
        {
609
621
                GError* e = NULL;
610
 
                GError* _tmp51_;
611
 
                const gchar* _tmp52_;
 
622
                GError* _tmp46_;
 
623
                const gchar* _tmp47_;
612
624
                e = _inner_error_;
613
625
                _inner_error_ = NULL;
614
 
                _tmp51_ = e;
615
 
                _tmp52_ = _tmp51_->message;
616
 
                g_debug ("prompt-box.vala:226: Internal error loading session chooser style: %s", _tmp52_);
 
626
                _tmp46_ = e;
 
627
                _tmp47_ = _tmp46_->message;
 
628
                g_debug ("prompt-box.vala:223: Internal error loading session chooser style: %s", _tmp47_);
617
629
                _g_error_free0 (e);
618
630
        }
619
 
        __finally12:
 
631
        __finally15:
620
632
        if (_inner_error_ != NULL) {
621
633
                _g_object_unref0 (align);
622
634
                _g_object_unref0 (name_grid);
624
636
                g_clear_error (&_inner_error_);
625
637
                return NULL;
626
638
        }
627
 
        _tmp53_ = self->option_button;
628
 
        _tmp54_ = self->priv->option_image;
629
 
        gtk_container_add ((GtkContainer*) _tmp53_, (GtkWidget*) _tmp54_);
630
 
        _tmp55_ = self->option_button;
631
 
        gtk_grid_attach (name_grid, (GtkWidget*) _tmp55_, PROMPT_BOX_COL_NAME_OPTIONS, PROMPT_BOX_ROW_NAME, 1, 1);
 
639
        _tmp48_ = self->option_button;
 
640
        _tmp49_ = self->priv->option_image;
 
641
        gtk_container_add ((GtkContainer*) _tmp48_, (GtkWidget*) _tmp49_);
 
642
        _tmp50_ = self->option_button;
 
643
        gtk_grid_attach (name_grid, (GtkWidget*) _tmp50_, PROMPT_BOX_COL_NAME_OPTIONS, PROMPT_BOX_ROW_NAME, 1, 1);
632
644
        gtk_widget_show ((GtkWidget*) name_grid);
633
645
        result = name_grid;
634
646
        _g_object_unref0 (align);
645
657
static GtkGrid* prompt_box_real_create_small_name_grid (PromptBox* self) {
646
658
        GtkGrid* result = NULL;
647
659
        GtkGrid* _tmp0_;
648
 
        GtkGrid* _tmp1_;
649
660
        GtkGrid* small_name_grid;
 
661
        FadingLabel* _tmp1_;
650
662
        FadingLabel* _tmp2_;
651
 
        FadingLabel* _tmp3_;
652
 
        FadingLabel* _tmp4_;
653
 
        PangoFontDescription* _tmp5_ = NULL;
654
 
        PangoFontDescription* _tmp6_;
 
663
        PangoFontDescription* _tmp3_ = NULL;
 
664
        PangoFontDescription* _tmp4_;
 
665
        FadingLabel* _tmp5_;
 
666
        GdkRGBA _tmp6_ = {0};
655
667
        FadingLabel* _tmp7_;
656
 
        GdkRGBA _tmp8_ = {0};
 
668
        FadingLabel* _tmp8_;
657
669
        FadingLabel* _tmp9_;
658
670
        FadingLabel* _tmp10_;
659
671
        FadingLabel* _tmp11_;
660
 
        gint _tmp12_;
661
 
        FadingLabel* _tmp13_;
662
 
        FadingLabel* _tmp14_;
 
672
        FadingLabel* _tmp12_;
 
673
        CachedImage* _tmp13_;
 
674
        CachedImage* _tmp14_;
663
675
        CachedImage* _tmp15_;
664
 
        CachedImage* _tmp16_;
665
 
        CachedImage* _tmp17_;
666
 
        CachedImage* _tmp18_;
667
 
        GdkPixbuf* _tmp19_ = NULL;
668
 
        GdkPixbuf* _tmp20_;
669
 
        GdkPixbuf* _tmp21_;
670
 
        GtkAlignment* _tmp22_;
671
 
        GtkAlignment* _tmp23_;
 
676
        GdkPixbuf* _tmp16_ = NULL;
 
677
        GdkPixbuf* _tmp17_;
 
678
        GdkPixbuf* _tmp18_;
 
679
        GtkAlignment* _tmp19_;
672
680
        GtkAlignment* align;
673
 
        gint _tmp24_;
674
 
        CachedImage* _tmp25_;
 
681
        CachedImage* _tmp20_;
675
682
        _tmp0_ = (GtkGrid*) gtk_grid_new ();
676
 
        _tmp1_ = g_object_ref_sink (_tmp0_);
677
 
        small_name_grid = _tmp1_;
 
683
        g_object_ref_sink (_tmp0_);
 
684
        small_name_grid = _tmp0_;
678
685
        gtk_grid_set_column_spacing (small_name_grid, 4);
679
 
        _tmp2_ = fading_label_new ("");
680
 
        _tmp3_ = g_object_ref_sink (_tmp2_);
 
686
        _tmp1_ = fading_label_new ("");
 
687
        g_object_ref_sink (_tmp1_);
681
688
        _g_object_unref0 (self->small_name_label);
682
 
        self->small_name_label = _tmp3_;
683
 
        _tmp4_ = self->small_name_label;
684
 
        _tmp5_ = pango_font_description_from_string ("Ubuntu 13");
685
 
        _tmp6_ = _tmp5_;
686
 
        gtk_widget_override_font ((GtkWidget*) _tmp4_, _tmp6_);
687
 
        _pango_font_description_free0 (_tmp6_);
 
689
        self->small_name_label = _tmp1_;
 
690
        _tmp2_ = self->small_name_label;
 
691
        _tmp3_ = pango_font_description_from_string ("Ubuntu 13");
 
692
        _tmp4_ = _tmp3_;
 
693
        gtk_widget_override_font ((GtkWidget*) _tmp2_, _tmp4_);
 
694
        __vala_PangoFontDescription_free0 (_tmp4_);
 
695
        _tmp5_ = self->small_name_label;
 
696
        _tmp6_.red = (gdouble) 1.0f;
 
697
        _tmp6_.green = (gdouble) 1.0f;
 
698
        _tmp6_.blue = (gdouble) 1.0f;
 
699
        _tmp6_.alpha = (gdouble) 1.0f;
 
700
        gtk_widget_override_color ((GtkWidget*) _tmp5_, GTK_STATE_FLAG_NORMAL, &_tmp6_);
688
701
        _tmp7_ = self->small_name_label;
689
 
        _tmp8_.red = (gdouble) 1.0f;
690
 
        _tmp8_.green = (gdouble) 1.0f;
691
 
        _tmp8_.blue = (gdouble) 1.0f;
692
 
        _tmp8_.alpha = (gdouble) 1.0f;
693
 
        gtk_widget_override_color ((GtkWidget*) _tmp7_, GTK_STATE_FLAG_NORMAL, &_tmp8_);
 
702
        g_object_set ((GtkMisc*) _tmp7_, "yalign", 0.5f, NULL);
 
703
        _tmp8_ = self->small_name_label;
 
704
        g_object_set ((GtkMisc*) _tmp8_, "xalign", 0.0f, NULL);
694
705
        _tmp9_ = self->small_name_label;
695
 
        gtk_widget_set_margin_top ((GtkWidget*) _tmp9_, PROMPT_BOX_NAME_MARGIN_TOP);
 
706
        gtk_widget_set_margin_left ((GtkWidget*) _tmp9_, 2);
696
707
        _tmp10_ = self->small_name_label;
697
 
        g_object_set ((GtkMisc*) _tmp10_, "xalign", 0.0f, NULL);
 
708
        gtk_widget_set_size_request ((GtkWidget*) _tmp10_, -1, grid_size);
698
709
        _tmp11_ = self->small_name_label;
699
 
        _tmp12_ = self->priv->name_grid_height;
700
 
        gtk_widget_set_size_request ((GtkWidget*) _tmp11_, -1, _tmp12_);
701
 
        _tmp13_ = self->small_name_label;
702
 
        gtk_widget_show ((GtkWidget*) _tmp13_);
703
 
        _tmp14_ = self->small_name_label;
704
 
        gtk_grid_attach (small_name_grid, (GtkWidget*) _tmp14_, 1, 0, 1, 1);
705
 
        _tmp15_ = cached_image_new (NULL);
706
 
        _tmp16_ = g_object_ref_sink (_tmp15_);
 
710
        gtk_widget_show ((GtkWidget*) _tmp11_);
 
711
        _tmp12_ = self->small_name_label;
 
712
        gtk_grid_attach (small_name_grid, (GtkWidget*) _tmp12_, 1, 0, 1, 1);
 
713
        _tmp13_ = cached_image_new (NULL);
 
714
        g_object_ref_sink (_tmp13_);
707
715
        _g_object_unref0 (self->priv->small_message_image);
708
 
        self->priv->small_message_image = _tmp16_;
709
 
        _tmp17_ = self->priv->small_message_image;
710
 
        _tmp18_ = self->priv->message_image;
711
 
        g_object_get ((GtkImage*) _tmp18_, "pixbuf", &_tmp19_, NULL);
712
 
        _tmp20_ = _tmp19_;
713
 
        _tmp21_ = _tmp20_;
714
 
        g_object_set ((GtkImage*) _tmp17_, "pixbuf", _tmp21_, NULL);
715
 
        _g_object_unref0 (_tmp21_);
716
 
        _tmp22_ = (GtkAlignment*) gtk_alignment_new (0.5f, 0.5f, 0.0f, 0.0f);
717
 
        _tmp23_ = g_object_ref_sink (_tmp22_);
718
 
        align = _tmp23_;
719
 
        gtk_widget_set_margin_top ((GtkWidget*) align, PROMPT_BOX_NAME_MARGIN_TOP);
720
 
        _tmp24_ = self->priv->name_grid_height;
721
 
        gtk_widget_set_size_request ((GtkWidget*) align, -1, _tmp24_);
722
 
        _tmp25_ = self->priv->small_message_image;
723
 
        gtk_container_add ((GtkContainer*) align, (GtkWidget*) _tmp25_);
 
716
        self->priv->small_message_image = _tmp13_;
 
717
        _tmp14_ = self->priv->small_message_image;
 
718
        _tmp15_ = self->priv->message_image;
 
719
        g_object_get ((GtkImage*) _tmp15_, "pixbuf", &_tmp16_, NULL);
 
720
        _tmp17_ = _tmp16_;
 
721
        _tmp18_ = _tmp17_;
 
722
        g_object_set ((GtkImage*) _tmp14_, "pixbuf", _tmp18_, NULL);
 
723
        _g_object_unref0 (_tmp18_);
 
724
        _tmp19_ = (GtkAlignment*) gtk_alignment_new (0.5f, 0.5f, 0.0f, 0.0f);
 
725
        g_object_ref_sink (_tmp19_);
 
726
        align = _tmp19_;
 
727
        gtk_widget_set_size_request ((GtkWidget*) align, -1, grid_size);
 
728
        _tmp20_ = self->priv->small_message_image;
 
729
        gtk_container_add ((GtkContainer*) align, (GtkWidget*) _tmp20_);
724
730
        gtk_widget_show ((GtkWidget*) align);
725
731
        gtk_grid_attach (small_name_grid, (GtkWidget*) align, 2, 0, 1, 1);
726
732
        gtk_widget_show ((GtkWidget*) small_name_grid);
801
807
        gint _tmp4_;
802
808
        gint _tmp5_ = 0;
803
809
        self = (PromptBox*) base;
804
 
        GTK_WIDGET_CLASS (prompt_box_parent_class)->get_preferred_height ((GtkWidget*) FADABLE_BOX (self), &_tmp0_, &_tmp1_);
 
810
        GTK_WIDGET_CLASS (prompt_box_parent_class)->get_preferred_height ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_FADABLE_BOX, FadableBox), &_tmp0_, &_tmp1_);
805
811
        _vala_min = _tmp0_;
806
812
        _vala_nat = _tmp1_;
807
813
        _tmp2_ = _vala_min;
838
844
 
839
845
 
840
846
void prompt_box_set_options_image (PromptBox* self, GdkPixbuf* image) {
841
 
        GtkButton* _tmp0_;
 
847
        FlatButton* _tmp0_;
842
848
        CachedImage* _tmp1_;
843
849
        GdkPixbuf* _tmp2_;
844
850
        GdkPixbuf* _tmp3_;
852
858
        g_object_set ((GtkImage*) _tmp1_, "pixbuf", _tmp2_, NULL);
853
859
        _tmp3_ = image;
854
860
        if (_tmp3_ == NULL) {
855
 
                GtkButton* _tmp4_;
 
861
                FlatButton* _tmp4_;
856
862
                _tmp4_ = self->option_button;
857
863
                gtk_widget_hide ((GtkWidget*) _tmp4_);
858
864
        } else {
859
 
                GtkButton* _tmp5_;
 
865
                FlatButton* _tmp5_;
860
866
                _tmp5_ = self->option_button;
861
867
                gtk_widget_show ((GtkWidget*) _tmp5_);
862
868
        }
1008
1014
        g_return_if_fail (w != NULL);
1009
1015
        _tmp0_ = w;
1010
1016
        _tmp1_ = g_object_get_data ((GObject*) _tmp0_, "prompt-box-is-error");
1011
 
        is_error = GPOINTER_TO_INT (_tmp1_);
 
1017
        is_error = (gboolean) ((gintptr) _tmp1_);
1012
1018
        _tmp2_ = is_error;
1013
1019
        if (_tmp2_) {
1014
1020
                GtkWidget* _tmp3_;
1034
1040
        GtkWidget* _tmp0_;
1035
1041
        g_return_if_fail (w != NULL);
1036
1042
        _tmp0_ = w;
1037
 
        if (IS_DASH_ENTRY (_tmp0_)) {
 
1043
        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_DASH_ENTRY)) {
1038
1044
                GtkWidget* _tmp1_;
1039
1045
                DashEntry* _tmp2_;
1040
1046
                DashEntry* e;
1041
1047
                DashEntry* _tmp3_;
1042
1048
                _tmp1_ = w;
1043
 
                _tmp2_ = _g_object_ref0 (IS_DASH_ENTRY (_tmp1_) ? ((DashEntry*) _tmp1_) : NULL);
 
1049
                _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_DASH_ENTRY) ? ((DashEntry*) _tmp1_) : NULL);
1044
1050
                e = _tmp2_;
1045
1051
                _tmp3_ = e;
1046
1052
                dash_entry_set_did_respond (_tmp3_, FALSE);
1098
1104
                        GtkWidget* _tmp4_;
1099
1105
                        Fadable* _tmp5_;
1100
1106
                        _tmp2_ = w;
1101
 
                        _tmp3_ = _g_object_ref0 (IS_FADABLE (_tmp2_) ? ((Fadable*) _tmp2_) : NULL);
 
1107
                        _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_FADABLE) ? ((Fadable*) _tmp2_) : NULL);
1102
1108
                        f = _tmp3_;
1103
1109
                        _tmp4_ = w;
1104
1110
                        gtk_widget_set_sensitive (_tmp4_, TRUE);
1208
1214
void prompt_box_add_message (PromptBox* self, const gchar* text, gboolean is_error) {
1209
1215
        const gchar* _tmp0_;
1210
1216
        FadingLabel* _tmp1_;
1211
 
        FadingLabel* _tmp2_;
1212
1217
        FadingLabel* label;
1213
 
        FadingLabel* _tmp3_;
1214
 
        PangoFontDescription* _tmp4_ = NULL;
1215
 
        PangoFontDescription* _tmp5_;
1216
 
        GdkRGBA color = {0};
 
1218
        FadingLabel* _tmp2_;
 
1219
        PangoFontDescription* _tmp3_ = NULL;
 
1220
        PangoFontDescription* _tmp4_;
 
1221
        GdkRGBA _tmp5_ = {0};
 
1222
        GdkRGBA color;
1217
1223
        gboolean _tmp6_;
 
1224
        FadingLabel* _tmp7_;
 
1225
        GdkRGBA _tmp8_;
1218
1226
        FadingLabel* _tmp9_;
1219
 
        GdkRGBA _tmp10_;
1220
 
        FadingLabel* _tmp11_;
 
1227
        FadingLabel* _tmp10_;
 
1228
        gboolean _tmp11_;
1221
1229
        FadingLabel* _tmp12_;
1222
1230
        gboolean _tmp13_;
1223
 
        FadingLabel* _tmp14_;
1224
 
        gboolean _tmp15_;
1225
1231
        g_return_if_fail (self != NULL);
1226
1232
        g_return_if_fail (text != NULL);
1227
1233
        _tmp0_ = text;
1228
1234
        _tmp1_ = fading_label_new (_tmp0_);
1229
 
        _tmp2_ = g_object_ref_sink (_tmp1_);
1230
 
        label = _tmp2_;
1231
 
        _tmp3_ = label;
1232
 
        _tmp4_ = pango_font_description_from_string ("Ubuntu 10");
1233
 
        _tmp5_ = _tmp4_;
1234
 
        gtk_widget_override_font ((GtkWidget*) _tmp3_, _tmp5_);
1235
 
        _pango_font_description_free0 (_tmp5_);
 
1235
        g_object_ref_sink (_tmp1_);
 
1236
        label = _tmp1_;
 
1237
        _tmp2_ = label;
 
1238
        _tmp3_ = pango_font_description_from_string ("Ubuntu 10");
 
1239
        _tmp4_ = _tmp3_;
 
1240
        gtk_widget_override_font ((GtkWidget*) _tmp2_, _tmp4_);
 
1241
        __vala_PangoFontDescription_free0 (_tmp4_);
 
1242
        _tmp5_.red = (gdouble) 1.0f;
 
1243
        _tmp5_.green = (gdouble) 1.0f;
 
1244
        _tmp5_.blue = (gdouble) 1.0f;
 
1245
        _tmp5_.alpha = (gdouble) 1.0f;
 
1246
        color = _tmp5_;
1236
1247
        _tmp6_ = is_error;
1237
1248
        if (_tmp6_) {
1238
 
                GdkRGBA _tmp7_ = {0};
1239
 
                _tmp7_.red = (gdouble) 1.0f;
1240
 
                _tmp7_.green = (gdouble) 0.0f;
1241
 
                _tmp7_.blue = (gdouble) 0.0f;
1242
 
                _tmp7_.alpha = (gdouble) 1.0f;
1243
 
                color = _tmp7_;
1244
 
        } else {
1245
 
                GdkRGBA _tmp8_ = {0};
1246
 
                _tmp8_.red = (gdouble) 1.0f;
1247
 
                _tmp8_.green = (gdouble) 1.0f;
1248
 
                _tmp8_.blue = (gdouble) 1.0f;
1249
 
                _tmp8_.alpha = (gdouble) 1.0f;
1250
 
                color = _tmp8_;
 
1249
                gdk_rgba_parse (&color, "#df382c");
1251
1250
        }
 
1251
        _tmp7_ = label;
 
1252
        _tmp8_ = color;
 
1253
        gtk_widget_override_color ((GtkWidget*) _tmp7_, GTK_STATE_FLAG_NORMAL, &_tmp8_);
1252
1254
        _tmp9_ = label;
1253
 
        _tmp10_ = color;
1254
 
        gtk_widget_override_color ((GtkWidget*) _tmp9_, GTK_STATE_FLAG_NORMAL, &_tmp10_);
1255
 
        _tmp11_ = label;
1256
 
        g_object_set ((GtkMisc*) _tmp11_, "xalign", 0.0f, NULL);
 
1255
        g_object_set ((GtkMisc*) _tmp9_, "xalign", 0.0f, NULL);
 
1256
        _tmp10_ = label;
 
1257
        _tmp11_ = is_error;
 
1258
        g_object_set_data_full ((GObject*) _tmp10_, "prompt-box-is-error", (gpointer) ((gintptr) _tmp11_), NULL);
1257
1259
        _tmp12_ = label;
 
1260
        prompt_box_attach_item (self, (GtkWidget*) _tmp12_, TRUE);
1258
1261
        _tmp13_ = is_error;
1259
 
        g_object_set_data_full ((GObject*) _tmp12_, "prompt-box-is-error", GINT_TO_POINTER (_tmp13_), NULL);
1260
 
        _tmp14_ = label;
1261
 
        prompt_box_attach_item (self, (GtkWidget*) _tmp14_, TRUE);
1262
 
        _tmp15_ = is_error;
1263
 
        if (_tmp15_) {
 
1262
        if (_tmp13_) {
1264
1263
                prompt_box_set_has_errors (self, TRUE);
1265
1264
        }
1266
1265
        _g_object_unref0 (label);
1271
1270
        GtkWidget* _tmp0_;
1272
1271
        g_return_if_fail (w != NULL);
1273
1272
        _tmp0_ = w;
1274
 
        if (IS_DASH_ENTRY (_tmp0_)) {
 
1273
        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_DASH_ENTRY)) {
1275
1274
                GtkWidget* _tmp1_;
1276
1275
                DashEntry* _tmp2_;
1277
1276
                DashEntry* e;
1278
1277
                DashEntry* _tmp3_;
1279
1278
                _tmp1_ = w;
1280
 
                _tmp2_ = _g_object_ref0 (IS_DASH_ENTRY (_tmp1_) ? ((DashEntry*) _tmp1_) : NULL);
 
1279
                _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_DASH_ENTRY) ? ((DashEntry*) _tmp1_) : NULL);
1281
1280
                e = _tmp2_;
1282
1281
                _tmp3_ = e;
1283
1282
                if (_tmp3_ != NULL) {
1432
1431
DashEntry* prompt_box_add_prompt (PromptBox* self, const gchar* text, const gchar* accessible_text, gboolean is_secret) {
1433
1432
        DashEntry* result = NULL;
1434
1433
        DashEntry* _tmp0_;
 
1434
        DashEntry* entry;
1435
1435
        DashEntry* _tmp1_;
1436
 
        DashEntry* entry;
1437
 
        DashEntry* _tmp2_;
1438
 
        const gchar* _tmp3_;
1439
 
        gboolean _tmp4_ = FALSE;
1440
 
        DashEntry* _tmp24_;
1441
 
        AtkObject* _tmp25_ = NULL;
1442
 
        AtkObject* _tmp26_;
 
1436
        const gchar* _tmp2_;
 
1437
        gboolean _tmp3_ = FALSE;
 
1438
        DashEntry* _tmp23_;
 
1439
        AtkObject* _tmp24_ = NULL;
 
1440
        AtkObject* _tmp25_;
1443
1441
        AtkObject* accessible;
1444
 
        const gchar* _tmp27_;
1445
 
        gboolean _tmp32_;
 
1442
        const gchar* _tmp26_;
 
1443
        gboolean _tmp31_;
 
1444
        DashEntry* _tmp34_;
1446
1445
        DashEntry* _tmp35_;
1447
 
        DashEntry* _tmp36_;
1448
1446
        g_return_val_if_fail (self != NULL, NULL);
1449
1447
        g_return_val_if_fail (text != NULL, NULL);
1450
1448
        prompt_box_foreach_prompt_widget (self, ___lambda12__gtk_callback, self);
1451
1449
        _tmp0_ = dash_entry_new ();
1452
 
        _tmp1_ = g_object_ref_sink (_tmp0_);
1453
 
        entry = _tmp1_;
1454
 
        _tmp2_ = entry;
1455
 
        gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE);
1456
 
        _tmp3_ = text;
1457
 
        _tmp4_ = string_contains (_tmp3_, "\n");
1458
 
        if (_tmp4_) {
1459
 
                const gchar* _tmp5_;
1460
 
                DashEntry* _tmp6_;
1461
 
                _tmp5_ = text;
1462
 
                prompt_box_add_message (self, _tmp5_, FALSE);
1463
 
                _tmp6_ = entry;
1464
 
                dash_entry_set_constant_placeholder_text (_tmp6_, "");
 
1450
        g_object_ref_sink (_tmp0_);
 
1451
        entry = _tmp0_;
 
1452
        _tmp1_ = entry;
 
1453
        gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, FALSE);
 
1454
        _tmp2_ = text;
 
1455
        _tmp3_ = string_contains (_tmp2_, "\n");
 
1456
        if (_tmp3_) {
 
1457
                const gchar* _tmp4_;
 
1458
                DashEntry* _tmp5_;
 
1459
                _tmp4_ = text;
 
1460
                prompt_box_add_message (self, _tmp4_, FALSE);
 
1461
                _tmp5_ = entry;
 
1462
                dash_entry_set_constant_placeholder_text (_tmp5_, "");
1465
1463
        } else {
1466
 
                const gchar* _tmp7_;
1467
 
                gchar* _tmp8_;
 
1464
                const gchar* _tmp6_;
 
1465
                gchar* _tmp7_;
1468
1466
                gchar* placeholder;
1469
 
                gboolean _tmp9_ = FALSE;
1470
 
                const gchar* _tmp10_;
1471
 
                gboolean _tmp11_ = FALSE;
1472
 
                gboolean _tmp14_;
1473
 
                DashEntry* _tmp22_;
1474
 
                const gchar* _tmp23_;
1475
 
                _tmp7_ = text;
1476
 
                _tmp8_ = g_strdup (_tmp7_);
1477
 
                placeholder = _tmp8_;
1478
 
                _tmp10_ = placeholder;
1479
 
                _tmp11_ = g_str_has_suffix (_tmp10_, ":");
1480
 
                if (_tmp11_) {
1481
 
                        _tmp9_ = TRUE;
 
1467
                gboolean _tmp8_ = FALSE;
 
1468
                const gchar* _tmp9_;
 
1469
                gboolean _tmp10_ = FALSE;
 
1470
                gboolean _tmp13_;
 
1471
                DashEntry* _tmp21_;
 
1472
                const gchar* _tmp22_;
 
1473
                _tmp6_ = text;
 
1474
                _tmp7_ = g_strdup (_tmp6_);
 
1475
                placeholder = _tmp7_;
 
1476
                _tmp9_ = placeholder;
 
1477
                _tmp10_ = g_str_has_suffix (_tmp9_, ":");
 
1478
                if (_tmp10_) {
 
1479
                        _tmp8_ = TRUE;
1482
1480
                } else {
1483
 
                        const gchar* _tmp12_;
1484
 
                        gboolean _tmp13_ = FALSE;
1485
 
                        _tmp12_ = placeholder;
1486
 
                        _tmp13_ = g_str_has_suffix (_tmp12_, "ļ¼š");
1487
 
                        _tmp9_ = _tmp13_;
 
1481
                        const gchar* _tmp11_;
 
1482
                        gboolean _tmp12_ = FALSE;
 
1483
                        _tmp11_ = placeholder;
 
1484
                        _tmp12_ = g_str_has_suffix (_tmp11_, "ļ¼š");
 
1485
                        _tmp8_ = _tmp12_;
1488
1486
                }
1489
 
                _tmp14_ = _tmp9_;
1490
 
                if (_tmp14_) {
1491
 
                        const gchar* _tmp15_;
1492
 
                        gint _tmp16_ = 0;
 
1487
                _tmp13_ = _tmp8_;
 
1488
                if (_tmp13_) {
 
1489
                        const gchar* _tmp14_;
 
1490
                        gint _tmp15_ = 0;
1493
1491
                        gint len;
 
1492
                        const gchar* _tmp16_;
1494
1493
                        const gchar* _tmp17_;
1495
 
                        const gchar* _tmp18_;
1496
 
                        gint _tmp19_;
1497
 
                        gint _tmp20_ = 0;
1498
 
                        gchar* _tmp21_ = NULL;
1499
 
                        _tmp15_ = placeholder;
1500
 
                        _tmp16_ = g_utf8_strlen (_tmp15_, (gssize) (-1));
1501
 
                        len = _tmp16_;
 
1494
                        gint _tmp18_;
 
1495
                        gint _tmp19_ = 0;
 
1496
                        gchar* _tmp20_ = NULL;
 
1497
                        _tmp14_ = placeholder;
 
1498
                        _tmp15_ = g_utf8_strlen (_tmp14_, (gssize) (-1));
 
1499
                        len = _tmp15_;
 
1500
                        _tmp16_ = placeholder;
1502
1501
                        _tmp17_ = placeholder;
1503
 
                        _tmp18_ = placeholder;
1504
 
                        _tmp19_ = len;
1505
 
                        _tmp20_ = string_index_of_nth_char (_tmp18_, (glong) (_tmp19_ - 1));
1506
 
                        _tmp21_ = string_substring (_tmp17_, (glong) 0, (glong) _tmp20_);
 
1502
                        _tmp18_ = len;
 
1503
                        _tmp19_ = string_index_of_nth_char (_tmp17_, (glong) (_tmp18_ - 1));
 
1504
                        _tmp20_ = string_substring (_tmp16_, (glong) 0, (glong) _tmp19_);
1507
1505
                        _g_free0 (placeholder);
1508
 
                        placeholder = _tmp21_;
 
1506
                        placeholder = _tmp20_;
1509
1507
                }
1510
 
                _tmp22_ = entry;
1511
 
                _tmp23_ = placeholder;
1512
 
                dash_entry_set_constant_placeholder_text (_tmp22_, _tmp23_);
 
1508
                _tmp21_ = entry;
 
1509
                _tmp22_ = placeholder;
 
1510
                dash_entry_set_constant_placeholder_text (_tmp21_, _tmp22_);
1513
1511
                _g_free0 (placeholder);
1514
1512
        }
1515
 
        _tmp24_ = entry;
1516
 
        _tmp25_ = gtk_widget_get_accessible ((GtkWidget*) _tmp24_);
1517
 
        _tmp26_ = _g_object_ref0 (_tmp25_);
1518
 
        accessible = _tmp26_;
1519
 
        _tmp27_ = accessible_text;
1520
 
        if (_tmp27_ != NULL) {
1521
 
                AtkObject* _tmp28_;
1522
 
                const gchar* _tmp29_;
1523
 
                _tmp28_ = accessible;
1524
 
                _tmp29_ = accessible_text;
1525
 
                atk_object_set_name (_tmp28_, _tmp29_);
 
1513
        _tmp23_ = entry;
 
1514
        _tmp24_ = gtk_widget_get_accessible ((GtkWidget*) _tmp23_);
 
1515
        _tmp25_ = _g_object_ref0 (_tmp24_);
 
1516
        accessible = _tmp25_;
 
1517
        _tmp26_ = accessible_text;
 
1518
        if (_tmp26_ != NULL) {
 
1519
                AtkObject* _tmp27_;
 
1520
                const gchar* _tmp28_;
 
1521
                _tmp27_ = accessible;
 
1522
                _tmp28_ = accessible_text;
 
1523
                atk_object_set_name (_tmp27_, _tmp28_);
1526
1524
        } else {
1527
 
                AtkObject* _tmp30_;
1528
 
                const gchar* _tmp31_;
1529
 
                _tmp30_ = accessible;
1530
 
                _tmp31_ = text;
1531
 
                atk_object_set_name (_tmp30_, _tmp31_);
 
1525
                AtkObject* _tmp29_;
 
1526
                const gchar* _tmp30_;
 
1527
                _tmp29_ = accessible;
 
1528
                _tmp30_ = text;
 
1529
                atk_object_set_name (_tmp29_, _tmp30_);
1532
1530
        }
1533
 
        _tmp32_ = is_secret;
1534
 
        if (_tmp32_) {
 
1531
        _tmp31_ = is_secret;
 
1532
        if (_tmp31_) {
 
1533
                DashEntry* _tmp32_;
1535
1534
                DashEntry* _tmp33_;
1536
 
                DashEntry* _tmp34_;
 
1535
                _tmp32_ = entry;
 
1536
                gtk_entry_set_visibility ((GtkEntry*) _tmp32_, FALSE);
1537
1537
                _tmp33_ = entry;
1538
 
                gtk_entry_set_visibility ((GtkEntry*) _tmp33_, FALSE);
1539
 
                _tmp34_ = entry;
1540
 
                g_object_set ((GtkEntry*) _tmp34_, "caps-lock-warning", TRUE, NULL);
 
1538
                g_object_set ((GtkEntry*) _tmp33_, "caps-lock-warning", TRUE, NULL);
1541
1539
        }
 
1540
        _tmp34_ = entry;
 
1541
        g_signal_connect_object (_tmp34_, "respond", (GCallback) _prompt_box_entry_activate_cb_dash_entry_respond, self, 0);
1542
1542
        _tmp35_ = entry;
1543
 
        g_signal_connect_object (_tmp35_, "respond", (GCallback) _prompt_box_entry_activate_cb_dash_entry_respond, self, 0);
1544
 
        _tmp36_ = entry;
1545
 
        prompt_box_attach_item (self, (GtkWidget*) _tmp36_, TRUE);
 
1543
        prompt_box_attach_item (self, (GtkWidget*) _tmp35_, TRUE);
1546
1544
        result = entry;
1547
1545
        _g_object_unref0 (accessible);
1548
1546
        return result;
1607
1605
        GtkComboBox* result = NULL;
1608
1606
        Block2Data* _data2_;
1609
1607
        gboolean _tmp0_;
 
1608
        GtkComboBoxText* _tmp3_;
 
1609
        GtkStyleContext* _tmp4_ = NULL;
1610
1610
        GtkComboBoxText* _tmp5_;
1611
 
        GtkStyleContext* _tmp6_ = NULL;
1612
 
        GtkComboBoxText* _tmp7_;
1613
 
        GtkWidget* _tmp8_ = NULL;
1614
 
        GtkStyleContext* _tmp9_ = NULL;
1615
 
        GtkComboBoxText* _tmp10_;
1616
 
        GtkWidget* _tmp11_ = NULL;
1617
 
        const gchar* _tmp12_;
1618
 
        PangoFontDescription* _tmp13_ = NULL;
1619
 
        PangoFontDescription* _tmp14_;
1620
 
        GtkComboBoxText* _tmp15_;
1621
 
        GPtrArray* _tmp16_;
1622
 
        GPtrArray* _tmp17_;
1623
 
        gint _tmp18_;
1624
 
        gint _tmp19_;
1625
 
        GtkComboBoxText* _tmp21_;
1626
 
        GtkComboBox* _tmp22_;
 
1611
        GtkWidget* _tmp6_ = NULL;
 
1612
        GtkStyleContext* _tmp7_ = NULL;
 
1613
        GtkComboBoxText* _tmp8_;
 
1614
        GtkWidget* _tmp9_ = NULL;
 
1615
        const gchar* _tmp10_;
 
1616
        PangoFontDescription* _tmp11_ = NULL;
 
1617
        PangoFontDescription* _tmp12_;
 
1618
        GtkComboBoxText* _tmp13_;
 
1619
        GPtrArray* _tmp14_;
 
1620
        GPtrArray* _tmp15_;
 
1621
        gint _tmp16_;
 
1622
        gint _tmp17_;
 
1623
        GtkComboBoxText* _tmp19_;
 
1624
        GtkComboBox* _tmp20_;
1627
1625
        g_return_val_if_fail (self != NULL, NULL);
1628
1626
        g_return_val_if_fail (texts != NULL, NULL);
1629
1627
        _data2_ = g_slice_new0 (Block2Data);
1632
1630
        _tmp0_ = read_only;
1633
1631
        if (_tmp0_) {
1634
1632
                GtkComboBoxText* _tmp1_;
 
1633
                _tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
 
1634
                g_object_ref_sink (_tmp1_);
 
1635
                _g_object_unref0 (_data2_->combo);
 
1636
                _data2_->combo = _tmp1_;
 
1637
        } else {
1635
1638
                GtkComboBoxText* _tmp2_;
1636
 
                _tmp1_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
1637
 
                _tmp2_ = g_object_ref_sink (_tmp1_);
 
1639
                _tmp2_ = (GtkComboBoxText*) gtk_combo_box_text_new_with_entry ();
 
1640
                g_object_ref_sink (_tmp2_);
1638
1641
                _g_object_unref0 (_data2_->combo);
1639
1642
                _data2_->combo = _tmp2_;
1640
 
        } else {
1641
 
                GtkComboBoxText* _tmp3_;
1642
 
                GtkComboBoxText* _tmp4_;
1643
 
                _tmp3_ = (GtkComboBoxText*) gtk_combo_box_text_new_with_entry ();
1644
 
                _tmp4_ = g_object_ref_sink (_tmp3_);
1645
 
                _g_object_unref0 (_data2_->combo);
1646
 
                _data2_->combo = _tmp4_;
1647
1643
        }
 
1644
        _tmp3_ = _data2_->combo;
 
1645
        _tmp4_ = gtk_widget_get_style_context ((GtkWidget*) _tmp3_);
 
1646
        gtk_style_context_add_class (_tmp4_, "lightdm-combo");
1648
1647
        _tmp5_ = _data2_->combo;
1649
 
        _tmp6_ = gtk_widget_get_style_context ((GtkWidget*) _tmp5_);
1650
 
        gtk_style_context_add_class (_tmp6_, "lightdm-combo");
1651
 
        _tmp7_ = _data2_->combo;
1652
 
        _tmp8_ = gtk_bin_get_child ((GtkBin*) _tmp7_);
1653
 
        _tmp9_ = gtk_widget_get_style_context (_tmp8_);
1654
 
        gtk_style_context_add_class (_tmp9_, "lightdm-combo");
1655
 
        _tmp10_ = _data2_->combo;
1656
 
        _tmp11_ = gtk_bin_get_child ((GtkBin*) _tmp10_);
1657
 
        _tmp12_ = dash_entry_font;
1658
 
        _tmp13_ = pango_font_description_from_string (_tmp12_);
1659
 
        _tmp14_ = _tmp13_;
1660
 
        gtk_widget_override_font (_tmp11_, _tmp14_);
1661
 
        _pango_font_description_free0 (_tmp14_);
1662
 
        _tmp15_ = _data2_->combo;
1663
 
        prompt_box_attach_item (self, (GtkWidget*) _tmp15_, FALSE);
1664
 
        _tmp16_ = texts;
1665
 
        g_ptr_array_foreach (_tmp16_, ___lambda14__gfunc, _data2_);
1666
 
        _tmp17_ = texts;
1667
 
        _tmp18_ = g_ptr_array_get_length (_tmp17_);
1668
 
        _tmp19_ = _tmp18_;
1669
 
        if (_tmp19_ > 0) {
1670
 
                GtkComboBoxText* _tmp20_;
1671
 
                _tmp20_ = _data2_->combo;
1672
 
                gtk_combo_box_set_active ((GtkComboBox*) _tmp20_, 0);
 
1648
        _tmp6_ = gtk_bin_get_child ((GtkBin*) _tmp5_);
 
1649
        _tmp7_ = gtk_widget_get_style_context (_tmp6_);
 
1650
        gtk_style_context_add_class (_tmp7_, "lightdm-combo");
 
1651
        _tmp8_ = _data2_->combo;
 
1652
        _tmp9_ = gtk_bin_get_child ((GtkBin*) _tmp8_);
 
1653
        _tmp10_ = dash_entry_font;
 
1654
        _tmp11_ = pango_font_description_from_string (_tmp10_);
 
1655
        _tmp12_ = _tmp11_;
 
1656
        gtk_widget_override_font (_tmp9_, _tmp12_);
 
1657
        __vala_PangoFontDescription_free0 (_tmp12_);
 
1658
        _tmp13_ = _data2_->combo;
 
1659
        prompt_box_attach_item (self, (GtkWidget*) _tmp13_, FALSE);
 
1660
        _tmp14_ = texts;
 
1661
        g_ptr_array_foreach (_tmp14_, ___lambda14__gfunc, _data2_);
 
1662
        _tmp15_ = texts;
 
1663
        _tmp16_ = g_ptr_array_get_length (_tmp15_);
 
1664
        _tmp17_ = _tmp16_;
 
1665
        if (_tmp17_ > 0) {
 
1666
                GtkComboBoxText* _tmp18_;
 
1667
                _tmp18_ = _data2_->combo;
 
1668
                gtk_combo_box_set_active ((GtkComboBox*) _tmp18_, 0);
1673
1669
        }
1674
 
        _tmp21_ = _data2_->combo;
1675
 
        _tmp22_ = _g_object_ref0 ((GtkComboBox*) _tmp21_);
1676
 
        result = _tmp22_;
 
1670
        _tmp19_ = _data2_->combo;
 
1671
        _tmp20_ = _g_object_ref0 ((GtkComboBox*) _tmp19_);
 
1672
        result = _tmp20_;
1677
1673
        block2_data_unref (_data2_);
1678
1674
        _data2_ = NULL;
1679
1675
        return result;
1715
1711
        self = _data3_->self;
1716
1712
        g_return_if_fail (w != NULL);
1717
1713
        _tmp0_ = w;
1718
 
        if (GTK_IS_ENTRY (_tmp0_)) {
 
1714
        if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_ENTRY)) {
1719
1715
                GtkWidget* _tmp1_;
1720
1716
                GtkEntry* _tmp2_;
1721
1717
                GtkEntry* e;
1722
1718
                GtkEntry* _tmp3_;
1723
1719
                _tmp1_ = w;
1724
 
                _tmp2_ = _g_object_ref0 (GTK_IS_ENTRY (_tmp1_) ? ((GtkEntry*) _tmp1_) : NULL);
 
1720
                _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp1_) : NULL);
1725
1721
                e = _tmp2_;
1726
1722
                _tmp3_ = e;
1727
1723
                if (_tmp3_ != NULL) {
1771
1767
void prompt_box_add_button (PromptBox* self, const gchar* text, const gchar* accessible_text) {
1772
1768
        const gchar* _tmp0_;
1773
1769
        DashButton* _tmp1_;
1774
 
        DashButton* _tmp2_;
1775
1770
        DashButton* button;
1776
 
        AtkObject* _tmp3_ = NULL;
1777
 
        AtkObject* _tmp4_;
 
1771
        AtkObject* _tmp2_ = NULL;
 
1772
        AtkObject* _tmp3_;
1778
1773
        AtkObject* accessible;
1779
 
        const gchar* _tmp5_;
 
1774
        const gchar* _tmp4_;
1780
1775
        g_return_if_fail (self != NULL);
1781
1776
        g_return_if_fail (text != NULL);
1782
1777
        _tmp0_ = text;
1783
1778
        _tmp1_ = dash_button_new (_tmp0_);
1784
 
        _tmp2_ = g_object_ref_sink (_tmp1_);
1785
 
        button = _tmp2_;
1786
 
        _tmp3_ = gtk_widget_get_accessible ((GtkWidget*) button);
1787
 
        _tmp4_ = _g_object_ref0 (_tmp3_);
1788
 
        accessible = _tmp4_;
1789
 
        _tmp5_ = accessible_text;
1790
 
        atk_object_set_name (accessible, _tmp5_);
 
1779
        g_object_ref_sink (_tmp1_);
 
1780
        button = _tmp1_;
 
1781
        _tmp2_ = gtk_widget_get_accessible ((GtkWidget*) button);
 
1782
        _tmp3_ = _g_object_ref0 (_tmp2_);
 
1783
        accessible = _tmp3_;
 
1784
        _tmp4_ = accessible_text;
 
1785
        atk_object_set_name (accessible, _tmp4_);
1791
1786
        g_signal_connect_object ((GtkButton*) button, "clicked", (GCallback) _prompt_box_button_clicked_cb_gtk_button_clicked, self, 0);
1792
1787
        prompt_box_attach_item (self, (GtkWidget*) button, TRUE);
1793
1788
        _g_object_unref0 (accessible);
1853
1848
        _g_object_unref0 (_data4_->best);
1854
1849
        _data4_->best = _tmp2_;
1855
1850
        _tmp3_ = w;
1856
 
        _tmp4_ = _g_object_ref0 (GTK_IS_ENTRY (_tmp3_) ? ((GtkEntry*) _tmp3_) : NULL);
 
1851
        _tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, GTK_TYPE_ENTRY) ? ((GtkEntry*) _tmp3_) : NULL);
1857
1852
        e = _tmp4_;
1858
1853
        _tmp5_ = w;
1859
 
        _tmp6_ = _g_object_ref0 (GTK_IS_BUTTON (_tmp5_) ? ((GtkButton*) _tmp5_) : NULL);
 
1854
        _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp5_) : NULL);
1860
1855
        b = _tmp6_;
1861
1856
        _tmp7_ = w;
1862
 
        _tmp8_ = _g_object_ref0 (GTK_IS_COMBO_BOX (_tmp7_) ? ((GtkComboBox*) _tmp7_) : NULL);
 
1857
        _tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, GTK_TYPE_COMBO_BOX) ? ((GtkComboBox*) _tmp7_) : NULL);
1863
1858
        c = _tmp8_;
1864
1859
        _tmp12_ = e;
1865
1860
        if (_tmp12_ != NULL) {
1939
1934
        self = (PromptBox*) base;
1940
1935
        g_return_if_fail (allocation != NULL);
1941
1936
        _tmp0_ = *allocation;
1942
 
        GTK_WIDGET_CLASS (prompt_box_parent_class)->size_allocate ((GtkWidget*) FADABLE_BOX (self), &_tmp0_);
 
1937
        GTK_WIDGET_CLASS (prompt_box_parent_class)->size_allocate ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_FADABLE_BOX, FadableBox), &_tmp0_);
1943
1938
        _tmp1_ = self->box_grid;
1944
1939
        _tmp2_ = *allocation;
1945
1940
        gtk_widget_size_allocate ((GtkWidget*) _tmp1_, &_tmp2_);
2191
2186
        GtkFixed* _tmp0_;
2192
2187
        GtkFixed* _tmp1_;
2193
2188
        GtkFixed* _tmp2_;
2194
 
        GtkFixed* _tmp3_;
2195
 
        GtkGrid* _tmp4_ = NULL;
 
2189
        GtkGrid* _tmp3_;
 
2190
        GtkGrid* _tmp4_;
2196
2191
        GtkGrid* _tmp5_;
2197
2192
        GtkGrid* _tmp6_;
2198
2193
        GtkGrid* _tmp7_;
2199
2194
        GtkGrid* _tmp8_;
2200
 
        GtkGrid* _tmp9_;
2201
 
        GtkGrid* _tmp10_;
 
2195
        ActiveIndicator* _tmp9_;
 
2196
        ActiveIndicator* _tmp10_;
2202
2197
        ActiveIndicator* _tmp11_;
2203
2198
        ActiveIndicator* _tmp12_;
2204
 
        ActiveIndicator* _tmp13_;
 
2199
        GtkGrid* _tmp13_;
2205
2200
        ActiveIndicator* _tmp14_;
2206
 
        ActiveIndicator* _tmp15_;
2207
 
        GtkGrid* _tmp16_;
 
2201
        gint _tmp15_;
 
2202
        ActiveIndicator* _tmp16_;
 
2203
        ActiveIndicator* dummy_indicator;
2208
2204
        ActiveIndicator* _tmp17_;
2209
 
        gint _tmp18_;
 
2205
        GtkGrid* _tmp18_;
2210
2206
        ActiveIndicator* _tmp19_;
2211
 
        ActiveIndicator* _tmp20_;
2212
 
        ActiveIndicator* dummy_indicator;
2213
 
        ActiveIndicator* _tmp21_;
2214
 
        GtkGrid* _tmp22_;
2215
 
        ActiveIndicator* _tmp23_;
2216
 
        gint _tmp24_;
2217
 
        GtkGrid* _tmp25_;
 
2207
        gint _tmp20_;
 
2208
        GtkGrid* _tmp21_;
 
2209
        GtkGrid* _tmp22_ = NULL;
 
2210
        GtkGrid* _tmp23_;
 
2211
        GtkGrid* _tmp24_;
 
2212
        gint _tmp25_;
2218
2213
        GtkGrid* _tmp26_;
 
2214
        GtkGrid* small_box_grid;
2219
2215
        GtkGrid* _tmp27_;
2220
 
        gint _tmp28_;
 
2216
        GtkGrid* _tmp28_;
2221
2217
        GtkGrid* _tmp29_;
2222
2218
        GtkGrid* _tmp30_;
2223
 
        GtkGrid* small_box_grid;
2224
 
        GtkGrid* _tmp31_;
2225
 
        GtkGrid* _tmp32_;
2226
 
        GtkGrid* _tmp33_;
2227
 
        GtkGrid* _tmp34_;
2228
 
        ActiveIndicator* _tmp35_;
 
2219
        ActiveIndicator* _tmp31_;
 
2220
        ActiveIndicator* _tmp32_;
 
2221
        ActiveIndicator* _tmp33_;
 
2222
        ActiveIndicator* _tmp34_;
 
2223
        GtkGrid* _tmp35_;
2229
2224
        ActiveIndicator* _tmp36_;
2230
 
        ActiveIndicator* _tmp37_;
2231
 
        ActiveIndicator* _tmp38_;
2232
 
        ActiveIndicator* _tmp39_;
2233
 
        GtkGrid* _tmp40_;
 
2225
        GtkGrid* _tmp37_ = NULL;
 
2226
        GtkGrid* small_name_grid;
 
2227
        GtkGrid* _tmp38_;
 
2228
        GtkGrid* _tmp39_;
 
2229
        ActiveIndicator* _tmp40_;
 
2230
        ActiveIndicator* small_dummy_indicator;
2234
2231
        ActiveIndicator* _tmp41_;
2235
 
        GtkGrid* _tmp42_ = NULL;
2236
 
        GtkGrid* small_name_grid;
2237
 
        GtkGrid* _tmp43_;
2238
 
        GtkGrid* _tmp44_;
2239
 
        ActiveIndicator* _tmp45_;
2240
 
        ActiveIndicator* _tmp46_;
2241
 
        ActiveIndicator* small_dummy_indicator;
2242
 
        ActiveIndicator* _tmp47_;
 
2232
        GtkGrid* _tmp42_;
 
2233
        ActiveIndicator* _tmp43_;
 
2234
        GtkEventBox* _tmp44_;
 
2235
        GtkEventBox* small_box_eventbox;
 
2236
        GtkEventBox* _tmp45_;
 
2237
        GtkEventBox* _tmp46_;
 
2238
        GtkEventBox* _tmp47_;
2243
2239
        GtkGrid* _tmp48_;
2244
 
        ActiveIndicator* _tmp49_;
 
2240
        GtkEventBox* _tmp49_;
2245
2241
        GtkEventBox* _tmp50_;
2246
 
        GtkEventBox* _tmp51_;
2247
 
        GtkEventBox* small_box_eventbox;
2248
 
        GtkEventBox* _tmp52_;
2249
 
        GtkEventBox* _tmp53_;
2250
 
        GtkEventBox* _tmp54_;
 
2242
        GtkWidget* _tmp51_;
 
2243
        GtkFixed* _tmp52_;
 
2244
        GtkWidget* _tmp53_;
 
2245
        GtkFixed* _tmp54_;
2251
2246
        GtkGrid* _tmp55_;
2252
 
        GtkEventBox* _tmp56_;
2253
 
        GtkEventBox* _tmp57_;
2254
 
        GtkWidget* _tmp58_;
2255
 
        GtkFixed* _tmp59_;
2256
 
        GtkWidget* _tmp60_;
2257
 
        GtkFixed* _tmp61_;
2258
 
        GtkGrid* _tmp62_;
2259
2247
        parent_class = G_OBJECT_CLASS (prompt_box_parent_class);
2260
2248
        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
2261
 
        self = PROMPT_BOX (obj);
 
2249
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PROMPT_BOX, PromptBox);
2262
2250
        prompt_box_set_start_row (self);
2263
2251
        prompt_box_reset_last_row (self);
2264
2252
        g_object_set ((GtkWidget*) self, "expand", TRUE, NULL);
2265
2253
        _tmp0_ = (GtkFixed*) gtk_fixed_new ();
2266
 
        _tmp1_ = g_object_ref_sink (_tmp0_);
 
2254
        g_object_ref_sink (_tmp0_);
2267
2255
        _g_object_unref0 (self->priv->fixed);
2268
 
        self->priv->fixed = _tmp1_;
 
2256
        self->priv->fixed = _tmp0_;
 
2257
        _tmp1_ = self->priv->fixed;
 
2258
        gtk_widget_show ((GtkWidget*) _tmp1_);
2269
2259
        _tmp2_ = self->priv->fixed;
2270
 
        gtk_widget_show ((GtkWidget*) _tmp2_);
2271
 
        _tmp3_ = self->priv->fixed;
2272
 
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp3_);
2273
 
        _tmp4_ = prompt_box_create_name_grid (self);
2274
 
        _g_object_unref0 (self->name_grid);
2275
 
        self->name_grid = _tmp4_;
2276
 
        _tmp5_ = (GtkGrid*) gtk_grid_new ();
2277
 
        _tmp6_ = g_object_ref_sink (_tmp5_);
 
2260
        gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp2_);
 
2261
        _tmp3_ = (GtkGrid*) gtk_grid_new ();
 
2262
        g_object_ref_sink (_tmp3_);
2278
2263
        _g_object_unref0 (self->box_grid);
2279
 
        self->box_grid = _tmp6_;
 
2264
        self->box_grid = _tmp3_;
 
2265
        _tmp4_ = self->box_grid;
 
2266
        gtk_grid_set_column_spacing (_tmp4_, 4);
 
2267
        _tmp5_ = self->box_grid;
 
2268
        gtk_grid_set_row_spacing (_tmp5_, 3);
 
2269
        _tmp6_ = self->box_grid;
 
2270
        gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, GREETER_LIST_BORDER);
2280
2271
        _tmp7_ = self->box_grid;
2281
 
        gtk_grid_set_column_spacing (_tmp7_, 4);
 
2272
        gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, 6);
2282
2273
        _tmp8_ = self->box_grid;
2283
 
        gtk_grid_set_row_spacing (_tmp8_, 3);
2284
 
        _tmp9_ = self->box_grid;
2285
 
        gtk_widget_set_margin_bottom ((GtkWidget*) _tmp9_, 10);
2286
 
        _tmp10_ = self->box_grid;
2287
 
        g_object_set ((GtkWidget*) _tmp10_, "expand", TRUE, NULL);
2288
 
        _tmp11_ = active_indicator_new ();
2289
 
        _tmp12_ = g_object_ref_sink (_tmp11_);
 
2274
        g_object_set ((GtkWidget*) _tmp8_, "expand", TRUE, NULL);
 
2275
        _tmp9_ = active_indicator_new ();
 
2276
        g_object_ref_sink (_tmp9_);
2290
2277
        _g_object_unref0 (self->priv->active_indicator);
2291
 
        self->priv->active_indicator = _tmp12_;
2292
 
        _tmp13_ = self->priv->active_indicator;
2293
 
        gtk_widget_set_valign ((GtkWidget*) _tmp13_, GTK_ALIGN_START);
 
2278
        self->priv->active_indicator = _tmp9_;
 
2279
        _tmp10_ = self->priv->active_indicator;
 
2280
        gtk_widget_set_valign ((GtkWidget*) _tmp10_, GTK_ALIGN_START);
 
2281
        _tmp11_ = self->priv->active_indicator;
 
2282
        gtk_widget_set_margin_top ((GtkWidget*) _tmp11_, (grid_size - ACTIVE_INDICATOR_HEIGHT) / 2);
 
2283
        _tmp12_ = self->priv->active_indicator;
 
2284
        gtk_widget_show ((GtkWidget*) _tmp12_);
 
2285
        _tmp13_ = self->box_grid;
2294
2286
        _tmp14_ = self->priv->active_indicator;
2295
 
        gtk_widget_set_margin_top ((GtkWidget*) _tmp14_, 12 + PROMPT_BOX_NAME_MARGIN_TOP);
2296
 
        _tmp15_ = self->priv->active_indicator;
2297
 
        gtk_widget_show ((GtkWidget*) _tmp15_);
2298
 
        _tmp16_ = self->box_grid;
2299
 
        _tmp17_ = self->priv->active_indicator;
2300
 
        _tmp18_ = self->last_row;
2301
 
        gtk_grid_attach (_tmp16_, (GtkWidget*) _tmp17_, PROMPT_BOX_COL_ACTIVE, _tmp18_, 1, 1);
2302
 
        _tmp19_ = active_indicator_new ();
2303
 
        _tmp20_ = g_object_ref_sink (_tmp19_);
2304
 
        dummy_indicator = _tmp20_;
2305
 
        _tmp21_ = dummy_indicator;
 
2287
        _tmp15_ = self->last_row;
 
2288
        gtk_grid_attach (_tmp13_, (GtkWidget*) _tmp14_, PROMPT_BOX_COL_ACTIVE, _tmp15_, 1, 1);
 
2289
        _tmp16_ = active_indicator_new ();
 
2290
        g_object_ref_sink (_tmp16_);
 
2291
        dummy_indicator = _tmp16_;
 
2292
        _tmp17_ = dummy_indicator;
 
2293
        gtk_widget_show ((GtkWidget*) _tmp17_);
 
2294
        _tmp18_ = self->box_grid;
 
2295
        _tmp19_ = dummy_indicator;
 
2296
        _tmp20_ = self->last_row;
 
2297
        gtk_grid_attach (_tmp18_, (GtkWidget*) _tmp19_, PROMPT_BOX_COL_SPACER, _tmp20_, 1, 1);
 
2298
        _tmp21_ = self->box_grid;
2306
2299
        gtk_widget_show ((GtkWidget*) _tmp21_);
2307
 
        _tmp22_ = self->box_grid;
2308
 
        _tmp23_ = dummy_indicator;
2309
 
        _tmp24_ = self->last_row;
2310
 
        gtk_grid_attach (_tmp22_, (GtkWidget*) _tmp23_, PROMPT_BOX_COL_SPACER, _tmp24_, 1, 1);
2311
 
        _tmp25_ = self->box_grid;
2312
 
        gtk_widget_show ((GtkWidget*) _tmp25_);
2313
 
        _tmp26_ = self->box_grid;
2314
 
        _tmp27_ = self->name_grid;
2315
 
        _tmp28_ = self->last_row;
2316
 
        gtk_grid_attach (_tmp26_, (GtkWidget*) _tmp27_, PROMPT_BOX_COL_CONTENT, _tmp28_, 1, 1);
2317
 
        _tmp29_ = (GtkGrid*) gtk_grid_new ();
2318
 
        _tmp30_ = g_object_ref_sink (_tmp29_);
2319
 
        small_box_grid = _tmp30_;
2320
 
        _tmp31_ = small_box_grid;
2321
 
        gtk_grid_set_column_spacing (_tmp31_, 4);
2322
 
        _tmp32_ = small_box_grid;
2323
 
        gtk_grid_set_row_spacing (_tmp32_, 6);
2324
 
        _tmp33_ = small_box_grid;
2325
 
        gtk_widget_set_hexpand ((GtkWidget*) _tmp33_, TRUE);
2326
 
        _tmp34_ = small_box_grid;
 
2300
        _tmp22_ = prompt_box_create_name_grid (self);
 
2301
        _g_object_unref0 (self->name_grid);
 
2302
        self->name_grid = _tmp22_;
 
2303
        _tmp23_ = self->box_grid;
 
2304
        _tmp24_ = self->name_grid;
 
2305
        _tmp25_ = self->last_row;
 
2306
        gtk_grid_attach (_tmp23_, (GtkWidget*) _tmp24_, PROMPT_BOX_COL_CONTENT, _tmp25_, 1, 1);
 
2307
        _tmp26_ = (GtkGrid*) gtk_grid_new ();
 
2308
        g_object_ref_sink (_tmp26_);
 
2309
        small_box_grid = _tmp26_;
 
2310
        _tmp27_ = small_box_grid;
 
2311
        gtk_grid_set_column_spacing (_tmp27_, 4);
 
2312
        _tmp28_ = small_box_grid;
 
2313
        gtk_grid_set_row_spacing (_tmp28_, 6);
 
2314
        _tmp29_ = small_box_grid;
 
2315
        gtk_widget_set_hexpand ((GtkWidget*) _tmp29_, TRUE);
 
2316
        _tmp30_ = small_box_grid;
 
2317
        gtk_widget_show ((GtkWidget*) _tmp30_);
 
2318
        _tmp31_ = active_indicator_new ();
 
2319
        g_object_ref_sink (_tmp31_);
 
2320
        _g_object_unref0 (self->priv->small_active_indicator);
 
2321
        self->priv->small_active_indicator = _tmp31_;
 
2322
        _tmp32_ = self->priv->small_active_indicator;
 
2323
        gtk_widget_set_valign ((GtkWidget*) _tmp32_, GTK_ALIGN_START);
 
2324
        _tmp33_ = self->priv->small_active_indicator;
 
2325
        gtk_widget_set_margin_top ((GtkWidget*) _tmp33_, (grid_size - ACTIVE_INDICATOR_HEIGHT) / 2);
 
2326
        _tmp34_ = self->priv->small_active_indicator;
2327
2327
        gtk_widget_show ((GtkWidget*) _tmp34_);
2328
 
        _tmp35_ = active_indicator_new ();
2329
 
        _tmp36_ = g_object_ref_sink (_tmp35_);
2330
 
        _g_object_unref0 (self->priv->small_active_indicator);
2331
 
        self->priv->small_active_indicator = _tmp36_;
2332
 
        _tmp37_ = self->priv->small_active_indicator;
2333
 
        gtk_widget_set_valign ((GtkWidget*) _tmp37_, GTK_ALIGN_CENTER);
2334
 
        _tmp38_ = self->priv->small_active_indicator;
2335
 
        gtk_widget_set_margin_top ((GtkWidget*) _tmp38_, PROMPT_BOX_NAME_MARGIN_TOP);
2336
 
        _tmp39_ = self->priv->small_active_indicator;
2337
 
        gtk_widget_show ((GtkWidget*) _tmp39_);
2338
 
        _tmp40_ = small_box_grid;
2339
 
        _tmp41_ = self->priv->small_active_indicator;
2340
 
        gtk_grid_attach (_tmp40_, (GtkWidget*) _tmp41_, 0, 0, 1, 1);
2341
 
        _tmp42_ = prompt_box_create_small_name_grid (self);
2342
 
        small_name_grid = _tmp42_;
2343
 
        _tmp43_ = small_box_grid;
2344
 
        _tmp44_ = small_name_grid;
2345
 
        gtk_grid_attach (_tmp43_, (GtkWidget*) _tmp44_, 1, 0, 1, 1);
2346
 
        _tmp45_ = active_indicator_new ();
2347
 
        _tmp46_ = g_object_ref_sink (_tmp45_);
2348
 
        small_dummy_indicator = _tmp46_;
2349
 
        _tmp47_ = small_dummy_indicator;
2350
 
        gtk_widget_show ((GtkWidget*) _tmp47_);
 
2328
        _tmp35_ = small_box_grid;
 
2329
        _tmp36_ = self->priv->small_active_indicator;
 
2330
        gtk_grid_attach (_tmp35_, (GtkWidget*) _tmp36_, 0, 0, 1, 1);
 
2331
        _tmp37_ = prompt_box_create_small_name_grid (self);
 
2332
        small_name_grid = _tmp37_;
 
2333
        _tmp38_ = small_box_grid;
 
2334
        _tmp39_ = small_name_grid;
 
2335
        gtk_grid_attach (_tmp38_, (GtkWidget*) _tmp39_, 1, 0, 1, 1);
 
2336
        _tmp40_ = active_indicator_new ();
 
2337
        g_object_ref_sink (_tmp40_);
 
2338
        small_dummy_indicator = _tmp40_;
 
2339
        _tmp41_ = small_dummy_indicator;
 
2340
        gtk_widget_show ((GtkWidget*) _tmp41_);
 
2341
        _tmp42_ = small_box_grid;
 
2342
        _tmp43_ = small_dummy_indicator;
 
2343
        gtk_grid_attach (_tmp42_, (GtkWidget*) _tmp43_, 3, 0, 1, 1);
 
2344
        _tmp44_ = (GtkEventBox*) gtk_event_box_new ();
 
2345
        g_object_ref_sink (_tmp44_);
 
2346
        small_box_eventbox = _tmp44_;
 
2347
        _tmp45_ = small_box_eventbox;
 
2348
        gtk_event_box_set_visible_window (_tmp45_, FALSE);
 
2349
        _tmp46_ = small_box_eventbox;
 
2350
        g_signal_connect_object ((GtkWidget*) _tmp46_, "button-release-event", (GCallback) __prompt_box___lambda16__gtk_widget_button_release_event, self, 0);
 
2351
        _tmp47_ = small_box_eventbox;
2351
2352
        _tmp48_ = small_box_grid;
2352
 
        _tmp49_ = small_dummy_indicator;
2353
 
        gtk_grid_attach (_tmp48_, (GtkWidget*) _tmp49_, 3, 0, 1, 1);
2354
 
        _tmp50_ = (GtkEventBox*) gtk_event_box_new ();
2355
 
        _tmp51_ = g_object_ref_sink (_tmp50_);
2356
 
        small_box_eventbox = _tmp51_;
2357
 
        _tmp52_ = small_box_eventbox;
2358
 
        gtk_event_box_set_visible_window (_tmp52_, FALSE);
2359
 
        _tmp53_ = small_box_eventbox;
2360
 
        g_signal_connect_object ((GtkWidget*) _tmp53_, "button-release-event", (GCallback) __prompt_box___lambda16__gtk_widget_button_release_event, self, 0);
2361
 
        _tmp54_ = small_box_eventbox;
2362
 
        _tmp55_ = small_box_grid;
 
2353
        gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_);
 
2354
        _tmp49_ = small_box_eventbox;
 
2355
        gtk_widget_show ((GtkWidget*) _tmp49_);
 
2356
        _tmp50_ = small_box_eventbox;
 
2357
        _tmp51_ = _g_object_ref0 ((GtkWidget*) _tmp50_);
 
2358
        _g_object_unref0 (self->small_box_widget);
 
2359
        self->small_box_widget = _tmp51_;
 
2360
        _tmp52_ = self->priv->fixed;
 
2361
        _tmp53_ = self->small_box_widget;
 
2362
        gtk_container_add ((GtkContainer*) _tmp52_, _tmp53_);
 
2363
        _tmp54_ = self->priv->fixed;
 
2364
        _tmp55_ = self->box_grid;
2363
2365
        gtk_container_add ((GtkContainer*) _tmp54_, (GtkWidget*) _tmp55_);
2364
 
        _tmp56_ = small_box_eventbox;
2365
 
        gtk_widget_show ((GtkWidget*) _tmp56_);
2366
 
        _tmp57_ = small_box_eventbox;
2367
 
        _tmp58_ = _g_object_ref0 ((GtkWidget*) _tmp57_);
2368
 
        _g_object_unref0 (self->small_box_widget);
2369
 
        self->small_box_widget = _tmp58_;
2370
 
        _tmp59_ = self->priv->fixed;
2371
 
        _tmp60_ = self->small_box_widget;
2372
 
        gtk_container_add ((GtkContainer*) _tmp59_, _tmp60_);
2373
 
        _tmp61_ = self->priv->fixed;
2374
 
        _tmp62_ = self->box_grid;
2375
 
        gtk_container_add ((GtkContainer*) _tmp61_, (GtkWidget*) _tmp62_);
2376
2366
        _g_object_unref0 (small_box_eventbox);
2377
2367
        _g_object_unref0 (small_dummy_indicator);
2378
2368
        _g_object_unref0 (small_name_grid);
2413
2403
        self->priv = PROMPT_BOX_GET_PRIVATE (self);
2414
2404
        self->priv->_has_errors = FALSE;
2415
2405
        self->priv->_position = (gdouble) 0;
2416
 
        self->priv->name_grid_height = grid_size - PROMPT_BOX_NAME_MARGIN_TOP;
2417
2406
        self->priv->prompt_visibility = PROMPT_BOX_PROMPT_VISIBILITY_HIDDEN;
2418
2407
}
2419
2408
 
2420
2409
 
2421
2410
static void prompt_box_finalize (GObject* obj) {
2422
2411
        PromptBox * self;
2423
 
        self = PROMPT_BOX (obj);
 
2412
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PROMPT_BOX, PromptBox);
2424
2413
        _g_free0 (self->priv->_id);
2425
2414
        _g_object_unref0 (self->priv->fixed);
2426
2415
        _g_object_unref0 (self->priv->zone);
2453
2442
 
2454
2443
static void _vala_prompt_box_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
2455
2444
        PromptBox * self;
2456
 
        self = PROMPT_BOX (object);
 
2445
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROMPT_BOX, PromptBox);
2457
2446
        switch (property_id) {
2458
2447
                case PROMPT_BOX_HAS_ERRORS:
2459
2448
                g_value_set_boolean (value, prompt_box_get_has_errors (self));
2476
2465
 
2477
2466
static void _vala_prompt_box_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
2478
2467
        PromptBox * self;
2479
 
        self = PROMPT_BOX (object);
 
2468
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROMPT_BOX, PromptBox);
2480
2469
        switch (property_id) {
2481
2470
                case PROMPT_BOX_HAS_ERRORS:
2482
2471
                prompt_box_set_has_errors (self, g_value_get_boolean (value));
2534
2523
        gboolean result = FALSE;
2535
2524
        gboolean _tmp0_;
2536
2525
        cairo_t* _tmp1_;
2537
 
        cairo_t* _tmp2_;
2538
 
        cairo_t* _tmp3_;
2539
 
        cairo_t* _tmp4_;
2540
 
        cairo_t* _tmp5_;
2541
 
        cairo_t* _tmp6_;
2542
 
        cairo_t* _tmp7_;
 
2526
        gboolean _tmp2_ = FALSE;
2543
2527
        self = (ActiveIndicator*) base;
2544
2528
        g_return_val_if_fail (c != NULL, FALSE);
2545
2529
        _tmp0_ = self->priv->_active;
2548
2532
                return result;
2549
2533
        }
2550
2534
        _tmp1_ = c;
2551
 
        cairo_move_to (_tmp1_, (gdouble) 0, (gdouble) 0);
2552
 
        _tmp2_ = c;
2553
 
        cairo_rel_line_to (_tmp2_, (gdouble) ACTIVE_INDICATOR_WIDTH, ACTIVE_INDICATOR_HEIGHT / 2.0);
2554
 
        _tmp3_ = c;
2555
 
        cairo_rel_line_to (_tmp3_, (gdouble) (-ACTIVE_INDICATOR_WIDTH), ACTIVE_INDICATOR_HEIGHT / 2.0);
2556
 
        _tmp4_ = c;
2557
 
        cairo_close_path (_tmp4_);
2558
 
        _tmp5_ = c;
2559
 
        cairo_set_source_rgb (_tmp5_, 1.0, 1.0, 1.0);
2560
 
        _tmp6_ = c;
2561
 
        cairo_stroke_preserve (_tmp6_);
2562
 
        _tmp7_ = c;
2563
 
        cairo_fill (_tmp7_);
2564
 
        result = FALSE;
 
2535
        _tmp2_ = GTK_WIDGET_CLASS (active_indicator_parent_class)->draw ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_IMAGE, GtkImage), _tmp1_);
 
2536
        result = _tmp2_;
2565
2537
        return result;
2566
2538
}
2567
2539
 
2611
2583
        GObject * obj;
2612
2584
        GObjectClass * parent_class;
2613
2585
        ActiveIndicator * self;
 
2586
        gchar* _tmp0_ = NULL;
 
2587
        gchar* filename;
 
2588
        GError * _inner_error_ = NULL;
2614
2589
        parent_class = G_OBJECT_CLASS (active_indicator_parent_class);
2615
2590
        obj = parent_class->constructor (type, n_construct_properties, construct_properties);
2616
 
        self = ACTIVE_INDICATOR (obj);
 
2591
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ACTIVE_INDICATOR, ActiveIndicator);
 
2592
        _tmp0_ = g_build_filename (PKGDATADIR, "active.png", NULL);
 
2593
        filename = _tmp0_;
 
2594
        {
 
2595
                const gchar* _tmp1_;
 
2596
                GdkPixbuf* _tmp2_;
 
2597
                GdkPixbuf* _tmp3_;
 
2598
                GdkPixbuf* _tmp4_;
 
2599
                _tmp1_ = filename;
 
2600
                _tmp2_ = gdk_pixbuf_new_from_file (_tmp1_, &_inner_error_);
 
2601
                _tmp3_ = _tmp2_;
 
2602
                if (_inner_error_ != NULL) {
 
2603
                        goto __catch16_g_error;
 
2604
                }
 
2605
                _tmp4_ = _tmp3_;
 
2606
                g_object_set ((GtkImage*) self, "pixbuf", _tmp4_, NULL);
 
2607
                _g_object_unref0 (_tmp4_);
 
2608
        }
 
2609
        goto __finally16;
 
2610
        __catch16_g_error:
 
2611
        {
 
2612
                GError* e = NULL;
 
2613
                GError* _tmp5_;
 
2614
                const gchar* _tmp6_;
 
2615
                e = _inner_error_;
 
2616
                _inner_error_ = NULL;
 
2617
                _tmp5_ = e;
 
2618
                _tmp6_ = _tmp5_->message;
 
2619
                g_debug ("prompt-box.vala:639: Could not load active image: %s", _tmp6_);
 
2620
                _g_error_free0 (e);
 
2621
        }
 
2622
        __finally16:
 
2623
        if (_inner_error_ != NULL) {
 
2624
                _g_free0 (filename);
 
2625
                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);
 
2626
                g_clear_error (&_inner_error_);
 
2627
        }
2617
2628
        g_signal_connect_object ((GObject*) self, "notify::active", (GCallback) __active_indicator___lambda6__g_object_notify, self, 0);
 
2629
        g_object_set ((GtkMisc*) self, "xalign", 0.0f, NULL);
 
2630
        _g_free0 (filename);
2618
2631
        return obj;
2619
2632
}
2620
2633
 
2640
2653
 
2641
2654
static void active_indicator_finalize (GObject* obj) {
2642
2655
        ActiveIndicator * self;
2643
 
        self = ACTIVE_INDICATOR (obj);
 
2656
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ACTIVE_INDICATOR, ActiveIndicator);
2644
2657
        G_OBJECT_CLASS (active_indicator_parent_class)->finalize (obj);
2645
2658
}
2646
2659
 
2650
2663
        if (g_once_init_enter (&active_indicator_type_id__volatile)) {
2651
2664
                static const GTypeInfo g_define_type_info = { sizeof (ActiveIndicatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) active_indicator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ActiveIndicator), 0, (GInstanceInitFunc) active_indicator_instance_init, NULL };
2652
2665
                GType active_indicator_type_id;
2653
 
                active_indicator_type_id = g_type_register_static (GTK_TYPE_LABEL, "ActiveIndicator", &g_define_type_info, 0);
 
2666
                active_indicator_type_id = g_type_register_static (GTK_TYPE_IMAGE, "ActiveIndicator", &g_define_type_info, 0);
2654
2667
                g_once_init_leave (&active_indicator_type_id__volatile, active_indicator_type_id);
2655
2668
        }
2656
2669
        return active_indicator_type_id__volatile;
2659
2672
 
2660
2673
static void _vala_active_indicator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
2661
2674
        ActiveIndicator * self;
2662
 
        self = ACTIVE_INDICATOR (object);
 
2675
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ACTIVE_INDICATOR, ActiveIndicator);
2663
2676
        switch (property_id) {
2664
2677
                case ACTIVE_INDICATOR_ACTIVE:
2665
2678
                g_value_set_boolean (value, active_indicator_get_active (self));
2673
2686
 
2674
2687
static void _vala_active_indicator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
2675
2688
        ActiveIndicator * self;
2676
 
        self = ACTIVE_INDICATOR (object);
 
2689
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ACTIVE_INDICATOR, ActiveIndicator);
2677
2690
        switch (property_id) {
2678
2691
                case ACTIVE_INDICATOR_ACTIVE:
2679
2692
                active_indicator_set_active (self, g_value_get_boolean (value));