268
Iagno* iagno_construct (GType object_type) {
274
const gchar* _tmp4_ = NULL;
281
GtkUIManager* _tmp10_;
307
static void iagno_real_activate (GApplication* base) {
314
GObject* _tmp9_ = NULL;
317
GObject* _tmp12_ = NULL;
321
const gchar* _tmp15_ = NULL;
324
GtkUIManager* _tmp18_;
282
325
GtkUIManager* ui_manager;
283
GtkActionGroup* _tmp11_;
326
GtkActionGroup* _tmp19_;
284
327
GtkActionGroup* action_group;
286
GtkAccelGroup* _tmp16_ = NULL;
287
GtkAction* _tmp17_ = NULL;
289
GtkAction* _tmp19_ = NULL;
292
GtkWidget* _tmp22_ = NULL;
328
GtkActionGroup* _tmp20_;
329
GtkActionGroup* _tmp21_;
330
GtkUIManager* _tmp22_;
331
GtkActionGroup* _tmp23_;
333
GtkUIManager* _tmp29_;
334
GtkAccelGroup* _tmp30_ = NULL;
335
GtkActionGroup* _tmp31_;
336
GtkAction* _tmp32_ = NULL;
338
GtkActionGroup* _tmp34_;
339
GtkAction* _tmp35_ = NULL;
342
GtkUIManager* _tmp38_;
343
GtkWidget* _tmp39_ = NULL;
294
345
GtkMenuBar* menubar;
303
gboolean _tmp32_ = FALSE;
305
gchar* _tmp34_ = NULL;
307
const gchar* _tmp35_;
308
GamesPreimage* _tmp36_ = NULL;
309
GamesPreimage* theme;
310
GamesPreimage* _tmp37_;
312
GamesPreimage* _tmp41_;
314
348
GameView* _tmp43_;
315
GtkStatusbar* _tmp44_;
316
GtkStatusbar* _tmp45_;
317
GtkStatusbar* _tmp46_;
318
GtkStatusbar* _tmp47_;
322
GtkStatusbar* _tmp50_;
323
const gchar* _tmp51_ = NULL;
333
const gchar* _tmp60_ = NULL;
357
gboolean _tmp52_ = FALSE;
360
gboolean _tmp55_ = FALSE;
362
gchar* _tmp57_ = NULL;
364
const gchar* _tmp58_;
365
GamesPreimage* _tmp59_ = NULL;
366
GamesPreimage* theme;
367
GamesPreimage* _tmp60_;
369
GamesPreimage* _tmp64_;
373
GtkStatusbar* _tmp68_;
342
374
GtkStatusbar* _tmp69_;
375
GtkStatusbar* _tmp70_;
377
GObject* _tmp72_ = NULL;
382
GtkStyleContext* _tmp76_ = NULL;
384
GtkSeparatorToolItem* _tmp78_;
385
GtkSeparatorToolItem* _tmp79_;
386
GtkToolItem* _tmp80_;
387
GtkToolItem* _tmp81_;
388
GtkToolItem* status_item;
389
GtkToolItem* _tmp82_;
390
GtkToolItem* _tmp83_;
391
GtkAlignment* _tmp84_;
392
GtkAlignment* _tmp85_;
393
GtkAlignment* status_alignment;
394
GtkAlignment* _tmp86_;
395
GtkStatusbar* _tmp87_;
396
GtkToolItem* _tmp88_;
397
GtkAlignment* _tmp89_;
399
GtkToolItem* _tmp91_;
406
GtkStatusbar* _tmp97_;
408
GtkUIManager* _tmp99_;
410
const gchar* _tmp101_ = NULL;
422
const gchar* _tmp112_ = NULL;
433
GtkStatusbar* _tmp123_;
344
436
GError * _inner_error_ = NULL;
345
self = (Iagno*) g_object_new (object_type, "application-id", "org.gnome.iagno", "flags", G_APPLICATION_FLAGS_NONE, NULL);
346
_tmp0_ = g_settings_new ("org.gnome.iagno");
437
self = (Iagno*) base;
438
_tmp0_ = self->priv->window;
439
if (_tmp0_ != NULL) {
441
_tmp1_ = self->priv->window;
442
gtk_widget_show ((GtkWidget*) _tmp1_);
445
_tmp2_ = g_settings_new ("org.gnome.iagno");
347
446
_g_object_unref0 (self->priv->settings);
348
self->priv->settings = _tmp0_;
349
_tmp1_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL);
350
_tmp2_ = g_object_ref_sink (_tmp1_);
351
_g_object_unref0 (self->priv->window);
352
self->priv->window = _tmp2_;
353
_tmp3_ = self->priv->window;
354
_tmp4_ = _ ("Iagno");
355
gtk_window_set_title (_tmp3_, _tmp4_);
356
_tmp5_ = self->priv->window;
357
games_settings_bind_window_state ("/org/gnome/iagno/", _tmp5_);
358
_tmp6_ = self->priv->window;
359
gtk_application_add_window ((GtkApplication*) self, _tmp6_);
360
_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
361
_tmp8_ = g_object_ref_sink (_tmp7_);
363
gtk_widget_show ((GtkWidget*) vbox);
364
_tmp9_ = self->priv->window;
365
gtk_container_add ((GtkContainer*) _tmp9_, (GtkWidget*) vbox);
366
_tmp10_ = gtk_ui_manager_new ();
367
ui_manager = _tmp10_;
368
_tmp11_ = gtk_action_group_new ("group");
369
action_group = _tmp11_;
370
gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
371
gtk_action_group_add_actions (action_group, IAGNO_actions, G_N_ELEMENTS (IAGNO_actions), self);
372
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
447
self->priv->settings = _tmp2_;
448
_tmp3_ = gtk_builder_new ();
374
const gchar* _tmp12_;
375
_tmp12_ = self->priv->ui_description;
376
gtk_ui_manager_add_ui_from_string (ui_manager, _tmp12_, (gssize) (-1), &_inner_error_);
453
gtk_builder_add_from_file (_tmp4_, DATA_DIRECTORY "/iagno.ui", &_inner_error_);
377
454
if (_inner_error_ != NULL) {
378
455
goto __catch0_g_error;
382
459
__catch0_g_error:
384
461
GError* e = NULL;
386
const gchar* _tmp14_;
387
465
e = _inner_error_;
388
466
_inner_error_ = NULL;
390
_tmp14_ = _tmp13_->message;
391
g_warning ("iagno.vala:96: Failed to load UI: %s", _tmp14_);
469
_tmp7_ = _tmp6_->message;
470
fprintf (_tmp5_, "Could not load UI: %s\n", _tmp7_);
392
471
_g_error_free0 (e);
472
_g_object_unref0 (builder);
395
476
if (_inner_error_ != NULL) {
477
_g_object_unref0 (builder);
478
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);
479
g_clear_error (&_inner_error_);
483
_tmp9_ = gtk_builder_get_object (_tmp8_, "window");
484
_tmp10_ = _g_object_ref0 (GTK_IS_WINDOW (_tmp9_) ? ((GtkWindow*) _tmp9_) : NULL);
485
_g_object_unref0 (self->priv->window);
486
self->priv->window = _tmp10_;
488
_tmp12_ = gtk_builder_get_object (_tmp11_, "grid");
489
_tmp13_ = _g_object_ref0 (GTK_IS_GRID (_tmp12_) ? ((GtkGrid*) _tmp12_) : NULL);
491
_tmp14_ = self->priv->window;
492
_tmp15_ = _ ("Iagno");
493
gtk_window_set_title (_tmp14_, _tmp15_);
494
_tmp16_ = self->priv->window;
495
games_settings_bind_window_state ("/org/gnome/iagno/", _tmp16_);
496
_tmp17_ = self->priv->window;
497
gtk_application_add_window ((GtkApplication*) self, _tmp17_);
498
_tmp18_ = gtk_ui_manager_new ();
499
ui_manager = _tmp18_;
500
_tmp19_ = gtk_action_group_new ("group");
501
action_group = _tmp19_;
502
_tmp20_ = action_group;
503
gtk_action_group_set_translation_domain (_tmp20_, GETTEXT_PACKAGE);
504
_tmp21_ = action_group;
505
gtk_action_group_add_actions (_tmp21_, IAGNO_actions, G_N_ELEMENTS (IAGNO_actions), self);
506
_tmp22_ = ui_manager;
507
_tmp23_ = action_group;
508
gtk_ui_manager_insert_action_group (_tmp22_, _tmp23_, 0);
510
GtkUIManager* _tmp24_;
511
const gchar* _tmp25_;
512
_tmp24_ = ui_manager;
513
_tmp25_ = self->priv->ui_description;
514
gtk_ui_manager_add_ui_from_string (_tmp24_, _tmp25_, (gssize) (-1), &_inner_error_);
515
if (_inner_error_ != NULL) {
516
goto __catch1_g_error;
524
const gchar* _tmp27_;
526
_inner_error_ = NULL;
528
_tmp27_ = _tmp26_->message;
529
g_warning ("iagno.vala:125: Failed to load UI: %s", _tmp27_);
533
if (_inner_error_ != NULL) {
396
534
_g_object_unref0 (action_group);
397
535
_g_object_unref0 (ui_manager);
398
_g_object_unref0 (vbox);
536
_g_object_unref0 (top_grid);
537
_g_object_unref0 (builder);
399
538
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);
400
539
g_clear_error (&_inner_error_);
403
_tmp15_ = self->priv->window;
404
_tmp16_ = gtk_ui_manager_get_accel_group (ui_manager);
405
gtk_window_add_accel_group (_tmp15_, _tmp16_);
406
_tmp17_ = gtk_action_group_get_action (action_group, "NewGame");
407
_tmp18_ = _g_object_ref0 (_tmp17_);
542
_tmp28_ = self->priv->window;
543
_tmp29_ = ui_manager;
544
_tmp30_ = gtk_ui_manager_get_accel_group (_tmp29_);
545
gtk_window_add_accel_group (_tmp28_, _tmp30_);
546
_tmp31_ = action_group;
547
_tmp32_ = gtk_action_group_get_action (_tmp31_, "NewGame");
548
_tmp33_ = _g_object_ref0 (_tmp32_);
408
549
_g_object_unref0 (self->priv->new_game_action);
409
self->priv->new_game_action = _tmp18_;
410
_tmp19_ = gtk_action_group_get_action (action_group, "UndoMove");
411
_tmp20_ = _g_object_ref0 (_tmp19_);
550
self->priv->new_game_action = _tmp33_;
551
_tmp34_ = action_group;
552
_tmp35_ = gtk_action_group_get_action (_tmp34_, "UndoMove");
553
_tmp36_ = _g_object_ref0 (_tmp35_);
412
554
_g_object_unref0 (self->priv->undo_action);
413
self->priv->undo_action = _tmp20_;
414
_tmp21_ = self->priv->undo_action;
415
gtk_action_set_sensitive (_tmp21_, FALSE);
416
_tmp22_ = gtk_ui_manager_get_widget (ui_manager, "/MainMenu");
417
_tmp23_ = _g_object_ref0 (GTK_MENU_BAR (_tmp22_));
420
gtk_box_pack_start (vbox, (GtkWidget*) _tmp24_, FALSE, FALSE, (guint) 0);
421
_tmp25_ = game_view_new ();
422
_tmp26_ = g_object_ref_sink (_tmp25_);
555
self->priv->undo_action = _tmp36_;
556
_tmp37_ = self->priv->undo_action;
557
gtk_action_set_sensitive (_tmp37_, FALSE);
558
_tmp38_ = ui_manager;
559
_tmp39_ = gtk_ui_manager_get_widget (_tmp38_, "/MainMenu");
560
_tmp40_ = _g_object_ref0 (GTK_MENU_BAR (_tmp39_));
564
gtk_grid_attach (_tmp41_, (GtkWidget*) _tmp42_, 0, 0, 1, 1);
565
_tmp43_ = game_view_new ();
566
_tmp44_ = g_object_ref_sink (_tmp43_);
423
567
_g_object_unref0 (self->priv->view);
424
self->priv->view = _tmp26_;
425
_tmp27_ = self->priv->view;
426
_tmp28_ = self->priv->game;
427
game_view_set_game (_tmp27_, _tmp28_);
428
_tmp29_ = self->priv->view;
429
g_signal_connect_object (_tmp29_, "move", (GCallback) _iagno_player_move_cb_game_view_move, self, 0);
430
_tmp30_ = self->priv->view;
431
_tmp31_ = self->priv->settings;
432
_tmp32_ = g_settings_get_boolean (_tmp31_, "show-grid");
433
game_view_set_show_grid (_tmp30_, _tmp32_);
434
_tmp33_ = self->priv->settings;
435
_tmp34_ = g_settings_get_string (_tmp33_, "tileset");
438
_tmp36_ = iagno_load_theme_texture (self, _tmp35_, FALSE);
441
if (_tmp37_ == NULL) {
442
const gchar* _tmp38_;
443
GamesPreimage* _tmp39_ = NULL;
445
g_warning ("iagno.vala:115: Unable to load theme %s, falling back to default", _tmp38_);
446
_tmp39_ = iagno_load_theme_texture (self, "black_and_white.svg", TRUE);
568
self->priv->view = _tmp44_;
569
_tmp45_ = self->priv->view;
570
gtk_widget_set_hexpand ((GtkWidget*) _tmp45_, TRUE);
571
_tmp46_ = self->priv->view;
572
gtk_widget_set_vexpand ((GtkWidget*) _tmp46_, TRUE);
573
_tmp47_ = self->priv->view;
574
_tmp48_ = self->priv->game;
575
game_view_set_game (_tmp47_, _tmp48_);
576
_tmp49_ = self->priv->view;
577
g_signal_connect_object (_tmp49_, "move", (GCallback) _iagno_player_move_cb_game_view_move, self, 0);
578
_tmp50_ = self->priv->view;
579
_tmp51_ = self->priv->settings;
580
_tmp52_ = g_settings_get_boolean (_tmp51_, "show-grid");
581
game_view_set_show_grid (_tmp50_, _tmp52_);
582
_tmp53_ = self->priv->view;
583
_tmp54_ = self->priv->settings;
584
_tmp55_ = g_settings_get_boolean (_tmp54_, "flip-final-results");
585
game_view_set_flip_final_result (_tmp53_, _tmp55_);
586
_tmp56_ = self->priv->settings;
587
_tmp57_ = g_settings_get_string (_tmp56_, "tileset");
590
_tmp59_ = iagno_load_theme_texture (self, _tmp58_, FALSE);
593
if (_tmp60_ == NULL) {
594
const gchar* _tmp61_;
595
GamesPreimage* _tmp62_ = NULL;
597
g_warning ("iagno.vala:147: Unable to load theme %s, falling back to default", _tmp61_);
598
_tmp62_ = iagno_load_theme_texture (self, "black_and_white.svg", TRUE);
447
599
_g_object_unref0 (theme);
450
_tmp40_ = self->priv->view;
452
game_view_set_theme (_tmp40_, _tmp41_);
453
_tmp42_ = self->priv->view;
454
gtk_widget_show ((GtkWidget*) _tmp42_);
455
_tmp43_ = self->priv->view;
456
gtk_box_pack_start (vbox, (GtkWidget*) _tmp43_, TRUE, TRUE, (guint) 0);
457
_tmp44_ = (GtkStatusbar*) gtk_statusbar_new ();
458
_tmp45_ = g_object_ref_sink (_tmp44_);
602
_tmp63_ = self->priv->view;
604
game_view_set_theme (_tmp63_, _tmp64_);
605
_tmp65_ = self->priv->view;
606
gtk_widget_show ((GtkWidget*) _tmp65_);
608
_tmp67_ = self->priv->view;
609
gtk_grid_attach (_tmp66_, (GtkWidget*) _tmp67_, 0, 2, 1, 1);
610
_tmp68_ = (GtkStatusbar*) gtk_statusbar_new ();
611
_tmp69_ = g_object_ref_sink (_tmp68_);
459
612
_g_object_unref0 (self->priv->statusbar);
460
self->priv->statusbar = _tmp45_;
461
_tmp46_ = self->priv->statusbar;
462
gtk_widget_show ((GtkWidget*) _tmp46_);
463
_tmp47_ = self->priv->statusbar;
464
gtk_box_pack_start (vbox, (GtkWidget*) _tmp47_, FALSE, FALSE, (guint) 0);
465
_tmp48_ = (GtkGrid*) gtk_grid_new ();
466
_tmp49_ = g_object_ref_sink (_tmp48_);
468
gtk_grid_set_column_spacing (grid, (guint) 6);
469
gtk_widget_show ((GtkWidget*) grid);
470
_tmp50_ = self->priv->statusbar;
471
gtk_box_pack_start ((GtkBox*) _tmp50_, (GtkWidget*) grid, FALSE, TRUE, (guint) 0);
472
_tmp51_ = _ ("Dark:");
473
_tmp52_ = (GtkLabel*) gtk_label_new (_tmp51_);
474
_tmp53_ = g_object_ref_sink (_tmp52_);
477
gtk_widget_show ((GtkWidget*) _tmp54_);
479
gtk_grid_attach (grid, (GtkWidget*) _tmp55_, 1, 0, 1, 1);
480
_tmp56_ = (GtkLabel*) gtk_label_new ("00");
481
_tmp57_ = g_object_ref_sink (_tmp56_);
613
self->priv->statusbar = _tmp69_;
614
_tmp70_ = self->priv->statusbar;
615
gtk_widget_show ((GtkWidget*) _tmp70_);
617
_tmp72_ = gtk_builder_get_object (_tmp71_, "toolbar");
618
_tmp73_ = _g_object_ref0 (GTK_IS_TOOLBAR (_tmp72_) ? ((GtkToolbar*) _tmp72_) : NULL);
621
gtk_toolbar_set_show_arrow (_tmp74_, FALSE);
623
_tmp76_ = gtk_widget_get_style_context ((GtkWidget*) _tmp75_);
624
gtk_style_context_add_class (_tmp76_, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
626
_tmp78_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
627
_tmp79_ = g_object_ref_sink (_tmp78_);
628
gtk_toolbar_insert (_tmp77_, (GtkToolItem*) _tmp79_, -1);
629
_g_object_unref0 (_tmp79_);
630
_tmp80_ = gtk_tool_item_new ();
631
_tmp81_ = g_object_ref_sink (_tmp80_);
632
status_item = _tmp81_;
633
_tmp82_ = status_item;
634
gtk_tool_item_set_visible_horizontal (_tmp82_, TRUE);
635
_tmp83_ = status_item;
636
gtk_tool_item_set_expand (_tmp83_, TRUE);
637
_tmp84_ = (GtkAlignment*) gtk_alignment_new (1.0f, 0.5f, 0.0f, 0.0f);
638
_tmp85_ = g_object_ref_sink (_tmp84_);
639
status_alignment = _tmp85_;
640
_tmp86_ = status_alignment;
641
_tmp87_ = self->priv->statusbar;
642
gtk_container_add ((GtkContainer*) _tmp86_, (GtkWidget*) _tmp87_);
643
_tmp88_ = status_item;
644
_tmp89_ = status_alignment;
645
gtk_container_add ((GtkContainer*) _tmp88_, (GtkWidget*) _tmp89_);
647
_tmp91_ = status_item;
648
gtk_toolbar_insert (_tmp90_, _tmp91_, -1);
650
gtk_widget_show_all ((GtkWidget*) _tmp92_);
651
_tmp93_ = (GtkGrid*) gtk_grid_new ();
652
_tmp94_ = g_object_ref_sink (_tmp93_);
655
gtk_grid_set_column_spacing (_tmp95_, (guint) 6);
657
gtk_widget_show ((GtkWidget*) _tmp96_);
658
_tmp97_ = self->priv->statusbar;
660
gtk_box_pack_start ((GtkBox*) _tmp97_, (GtkWidget*) _tmp98_, FALSE, TRUE, (guint) 0);
661
_tmp99_ = ui_manager;
663
games_stock_prepare_for_statusbar_tooltips (_tmp99_, (GtkWidget*) _tmp100_);
664
_tmp101_ = _ ("Dark:");
665
_tmp102_ = (GtkLabel*) gtk_label_new (_tmp101_);
666
_tmp103_ = g_object_ref_sink (_tmp102_);
669
gtk_widget_show ((GtkWidget*) _tmp104_);
672
gtk_grid_attach (_tmp105_, (GtkWidget*) _tmp106_, 1, 0, 1, 1);
673
_tmp107_ = (GtkLabel*) gtk_label_new ("00");
674
_tmp108_ = g_object_ref_sink (_tmp107_);
482
675
_g_object_unref0 (self->priv->dark_score_label);
483
self->priv->dark_score_label = _tmp57_;
484
_tmp58_ = self->priv->dark_score_label;
485
gtk_widget_show ((GtkWidget*) _tmp58_);
486
_tmp59_ = self->priv->dark_score_label;
487
gtk_grid_attach (grid, (GtkWidget*) _tmp59_, 2, 0, 1, 1);
488
_tmp60_ = _ ("Light:");
489
_tmp61_ = (GtkLabel*) gtk_label_new (_tmp60_);
490
_tmp62_ = g_object_ref_sink (_tmp61_);
676
self->priv->dark_score_label = _tmp108_;
677
_tmp109_ = self->priv->dark_score_label;
678
gtk_widget_show ((GtkWidget*) _tmp109_);
680
_tmp111_ = self->priv->dark_score_label;
681
gtk_grid_attach (_tmp110_, (GtkWidget*) _tmp111_, 2, 0, 1, 1);
682
_tmp112_ = _ ("Light:");
683
_tmp113_ = (GtkLabel*) gtk_label_new (_tmp112_);
684
_tmp114_ = g_object_ref_sink (_tmp113_);
491
685
_g_object_unref0 (label);
494
gtk_widget_show ((GtkWidget*) _tmp63_);
496
gtk_grid_attach (grid, (GtkWidget*) _tmp64_, 4, 0, 1, 1);
497
_tmp65_ = (GtkLabel*) gtk_label_new ("00");
498
_tmp66_ = g_object_ref_sink (_tmp65_);
688
gtk_widget_show ((GtkWidget*) _tmp115_);
691
gtk_grid_attach (_tmp116_, (GtkWidget*) _tmp117_, 4, 0, 1, 1);
692
_tmp118_ = (GtkLabel*) gtk_label_new ("00");
693
_tmp119_ = g_object_ref_sink (_tmp118_);
499
694
_g_object_unref0 (self->priv->light_score_label);
500
self->priv->light_score_label = _tmp66_;
501
_tmp67_ = self->priv->light_score_label;
502
gtk_widget_show ((GtkWidget*) _tmp67_);
503
_tmp68_ = self->priv->light_score_label;
504
gtk_grid_attach (grid, (GtkWidget*) _tmp68_, 5, 0, 1, 1);
505
_tmp69_ = self->priv->statusbar;
506
_tmp70_ = gtk_statusbar_get_context_id (_tmp69_, "iagno");
507
self->priv->statusbar_id = _tmp70_;
695
self->priv->light_score_label = _tmp119_;
696
_tmp120_ = self->priv->light_score_label;
697
gtk_widget_show ((GtkWidget*) _tmp120_);
699
_tmp122_ = self->priv->light_score_label;
700
gtk_grid_attach (_tmp121_, (GtkWidget*) _tmp122_, 5, 0, 1, 1);
701
_tmp123_ = self->priv->statusbar;
702
_tmp124_ = gtk_statusbar_get_context_id (_tmp123_, "iagno");
703
self->priv->statusbar_id = _tmp124_;
508
704
iagno_start_game (self);
705
_tmp125_ = self->priv->window;
706
gtk_widget_show ((GtkWidget*) _tmp125_);
509
707
_g_object_unref0 (label);
510
708
_g_object_unref0 (grid);
709
_g_object_unref0 (status_alignment);
710
_g_object_unref0 (status_item);
711
_g_object_unref0 (toolbar);
511
712
_g_object_unref0 (theme);
512
713
_g_free0 (tile_set);
513
714
_g_object_unref0 (menubar);
514
715
_g_object_unref0 (action_group);
515
716
_g_object_unref0 (ui_manager);
516
_g_object_unref0 (vbox);
521
Iagno* iagno_new (void) {
522
return iagno_construct (TYPE_IAGNO);
526
static void iagno_real_activate (GApplication* base) {
529
self = (Iagno*) base;
530
_tmp0_ = self->priv->window;
531
gtk_widget_show ((GtkWidget*) _tmp0_);
535
static void iagno_show (Iagno* self) {
537
g_return_if_fail (self != NULL);
538
_tmp0_ = self->priv->window;
539
gtk_widget_show ((GtkWidget*) _tmp0_);
717
_g_object_unref0 (top_grid);
718
_g_object_unref0 (builder);
1954
2185
_tmp168_ = self->priv->settings;
1955
2186
_tmp169_ = g_settings_get_boolean (_tmp168_, "show-grid");
1956
2187
gtk_toggle_button_set_active ((GtkToggleButton*) grid_button, _tmp169_);
1957
g_signal_connect_object ((GtkToggleButton*) grid_button, "toggled", (GCallback) _iagno_grid_select_gtk_toggle_button_toggled, self, 0);
2188
g_signal_connect_object ((GtkToggleButton*) grid_button, "toggled", (GCallback) _iagno_grid_toggled_cb_gtk_toggle_button_toggled, self, 0);
1958
2189
_tmp170_ = vbox;
1959
2190
gtk_box_pack_start (_tmp170_, (GtkWidget*) grid_button, FALSE, FALSE, (guint) 0);
1960
_tmp171_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
1961
_tmp172_ = g_object_ref_sink (_tmp171_);
1964
gtk_box_pack_start (_tmp173_, (GtkWidget*) hbox, FALSE, FALSE, (guint) 0);
1965
_tmp174_ = _ ("_Tile set:");
1966
_tmp175_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp174_);
1967
_tmp176_ = g_object_ref_sink (_tmp175_);
2191
_tmp171_ = _ ("_Flip final results");
2192
_tmp172_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp171_);
2193
_tmp173_ = g_object_ref_sink (_tmp172_);
2194
flip_final_button = _tmp173_;
2195
_tmp174_ = self->priv->settings;
2196
_tmp175_ = g_settings_get_boolean (_tmp174_, "flip-final-results");
2197
gtk_toggle_button_set_active ((GtkToggleButton*) flip_final_button, _tmp175_);
2198
g_signal_connect_object ((GtkToggleButton*) flip_final_button, "toggled", (GCallback) _iagno_flip_final_toggled_cb_gtk_toggle_button_toggled, self, 0);
2200
gtk_box_pack_start (_tmp176_, (GtkWidget*) flip_final_button, FALSE, FALSE, (guint) 0);
2201
_tmp177_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
2202
_tmp178_ = g_object_ref_sink (_tmp177_);
2205
gtk_box_pack_start (_tmp179_, (GtkWidget*) hbox, FALSE, FALSE, (guint) 0);
2206
_tmp180_ = _ ("_Tile set:");
2207
_tmp181_ = (GtkLabel*) gtk_label_new_with_mnemonic (_tmp180_);
2208
_tmp182_ = g_object_ref_sink (_tmp181_);
1968
2209
_g_object_unref0 (label);
1971
gtk_box_pack_start (hbox, (GtkWidget*) _tmp177_, FALSE, FALSE, (guint) 0);
1972
_tmp178_ = g_build_filename (DATA_DIRECTORY, "themes", NULL);
1973
_tmp179_ = _tmp178_;
1974
_tmp180_ = games_file_list_new_images (_tmp179_, NULL, NULL);
1975
_g_object_unref0 (self->priv->theme_file_list);
1976
self->priv->theme_file_list = _tmp180_;
1977
_g_free0 (_tmp179_);
1978
_tmp181_ = self->priv->theme_file_list;
1979
games_file_list_transform_basename (_tmp181_);
1980
_tmp182_ = self->priv->theme_file_list;
1981
_tmp183_ = self->priv->settings;
1982
_tmp184_ = g_settings_get_string (_tmp183_, "tileset");
2212
gtk_box_pack_start (hbox, (GtkWidget*) _tmp183_, FALSE, FALSE, (guint) 0);
2213
_tmp184_ = g_build_filename (DATA_DIRECTORY, "themes", NULL);
1983
2214
_tmp185_ = _tmp184_;
1984
_tmp186_ = games_file_list_create_widget (_tmp182_, _tmp185_, (guint) (GAMES_FILE_LIST_REMOVE_EXTENSION | GAMES_FILE_LIST_REPLACE_UNDERSCORES));
1985
_tmp187_ = GTK_COMBO_BOX (_tmp186_);
2215
_tmp186_ = games_file_list_new_images (_tmp185_, NULL, NULL);
2216
_g_object_unref0 (self->priv->theme_file_list);
2217
self->priv->theme_file_list = _tmp186_;
1986
2218
_g_free0 (_tmp185_);
1987
theme_combo = _tmp187_;
1989
gtk_label_set_mnemonic_widget (_tmp188_, (GtkWidget*) theme_combo);
2219
_tmp187_ = self->priv->theme_file_list;
2220
games_file_list_transform_basename (_tmp187_);
2221
_tmp188_ = self->priv->theme_file_list;
2222
_tmp189_ = self->priv->settings;
2223
_tmp190_ = g_settings_get_string (_tmp189_, "tileset");
2224
_tmp191_ = _tmp190_;
2225
_tmp192_ = games_file_list_create_widget (_tmp188_, _tmp191_, (guint) (GAMES_FILE_LIST_REMOVE_EXTENSION | GAMES_FILE_LIST_REPLACE_UNDERSCORES));
2226
_tmp193_ = GTK_COMBO_BOX (_tmp192_);
2227
_g_free0 (_tmp191_);
2228
theme_combo = _tmp193_;
2230
gtk_label_set_mnemonic_widget (_tmp194_, (GtkWidget*) theme_combo);
1990
2231
g_signal_connect_object (theme_combo, "changed", (GCallback) _iagno_theme_changed_cb_gtk_combo_box_changed, self, 0);
1991
2232
gtk_box_pack_start (hbox, (GtkWidget*) theme_combo, TRUE, TRUE, (guint) 0);
1993
gtk_widget_show_all ((GtkWidget*) _tmp189_);
2234
gtk_widget_show_all ((GtkWidget*) _tmp195_);
1994
2235
_g_object_unref0 (theme_combo);
1995
2236
_g_object_unref0 (hbox);
2237
_g_object_unref0 (flip_final_button);
1996
2238
_g_object_unref0 (grid_button);
1997
2239
_g_object_unref0 (computer_button);
1998
2240
_g_object_unref0 (frame);