587
632
g_object_ref_sink (_tmp7_);
588
633
confirmation_dialog = _tmp7_;
589
634
_tmp8_ = confirmation_dialog;
590
gtk_dialog_add_button ((GtkDialog*) _tmp8_, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
591
_tmp9_ = confirmation_dialog;
592
gtk_dialog_add_button ((GtkDialog*) _tmp9_, GTK_STOCK_DELETE, (gint) GTK_RESPONSE_ACCEPT);
635
_tmp9_ = _ ("_Cancel");
636
gtk_dialog_add_button ((GtkDialog*) _tmp8_, _tmp9_, (gint) GTK_RESPONSE_CANCEL);
593
637
_tmp10_ = confirmation_dialog;
594
_tmp11_ = files_length;
595
_tmp12_ = ngettext ("If you delete an item, it will be permanently lost", "If you delete the items, they will be permanently lost", (gulong) _tmp11_);
596
gtk_message_dialog_format_secondary_text (_tmp10_, "%s", _tmp12_);
597
_tmp13_ = confirmation_dialog;
598
_tmp14_ = gtk_dialog_run ((GtkDialog*) _tmp13_);
601
if (_tmp15_ == ((gint) GTK_RESPONSE_ACCEPT)) {
602
GList* _tmp16_ = NULL;
638
_tmp11_ = _ ("_Delete");
639
gtk_dialog_add_button ((GtkDialog*) _tmp10_, _tmp11_, (gint) GTK_RESPONSE_ACCEPT);
640
_tmp12_ = confirmation_dialog;
641
_tmp13_ = files_length;
642
_tmp14_ = ngettext ("If you delete an item, it will be permanently lost", "If you delete the items, they will be permanently lost", (gulong) _tmp13_);
643
gtk_message_dialog_format_secondary_text (_tmp12_, "%s", _tmp14_);
644
_tmp15_ = confirmation_dialog;
645
_tmp16_ = gtk_dialog_run ((GtkDialog*) _tmp15_);
648
if (_tmp17_ == ((gint) GTK_RESPONSE_ACCEPT)) {
649
GList* _tmp18_ = NULL;
605
652
GList* file_collection = NULL;
606
653
GList* file_it = NULL;
607
file_collection = _tmp16_;
654
file_collection = _tmp18_;
608
655
for (file_it = file_collection; file_it != NULL; file_it = file_it->next) {
609
GFile* _tmp17_ = NULL;
656
GFile* _tmp19_ = NULL;
610
657
GFile* file = NULL;
611
_tmp17_ = _g_object_ref0 ((GFile*) file_it->data);
658
_tmp19_ = _g_object_ref0 ((GFile*) file_it->data);
614
GFile* _tmp18_ = NULL;
616
if (_tmp18_ == NULL) {
661
GFile* _tmp20_ = NULL;
663
if (_tmp20_ == NULL) {
617
664
_g_object_unref0 (file);
618
665
_g_object_unref0 (confirmation_dialog);
619
666
__g_list_free__g_object_unref0_0 (files);
623
GFile* _tmp19_ = NULL;
625
g_file_delete (_tmp19_, NULL, &_inner_error_);
670
GFile* _tmp21_ = NULL;
672
g_file_delete (_tmp21_, NULL, &_inner_error_);
626
673
if (_inner_error_ != NULL) {
627
goto __catch8_g_error;
674
goto __catch5_g_error;
633
680
GError* err = NULL;
634
GError* _tmp20_ = NULL;
635
const gchar* _tmp21_ = NULL;
636
gboolean _tmp22_ = FALSE;
681
GError* _tmp22_ = NULL;
682
const gchar* _tmp23_ = NULL;
683
gboolean _tmp24_ = FALSE;
637
684
err = _inner_error_;
638
685
_inner_error_ = NULL;
640
_tmp21_ = _tmp20_->message;
641
g_warning ("cheese-window.vala:241: Unable to delete file: %s", _tmp21_);
642
_tmp22_ = skip_all_errors;
687
_tmp23_ = _tmp22_->message;
688
g_warning ("cheese-window.vala:269: Unable to delete file: %s", _tmp23_);
689
_tmp24_ = skip_all_errors;
644
691
GtkMessageDialog* error_dialog = NULL;
645
GFile* _tmp23_ = NULL;
646
gchar* _tmp24_ = NULL;
647
gchar* _tmp25_ = NULL;
648
GtkMessageDialog* _tmp26_ = NULL;
649
GtkMessageDialog* _tmp27_ = NULL;
692
GFile* _tmp25_ = NULL;
693
gchar* _tmp26_ = NULL;
694
gchar* _tmp27_ = NULL;
650
695
GtkMessageDialog* _tmp28_ = NULL;
651
696
GtkMessageDialog* _tmp29_ = NULL;
652
697
GtkMessageDialog* _tmp30_ = NULL;
653
GtkMessageDialog* _tmp31_ = NULL;
656
GtkMessageDialog* _tmp35_ = NULL;
658
_tmp24_ = g_file_get_path (_tmp23_);
660
_tmp26_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, "Could not delete %s", _tmp25_);
661
g_object_ref_sink (_tmp26_);
698
const gchar* _tmp31_ = NULL;
699
GtkMessageDialog* _tmp32_ = NULL;
700
GtkMessageDialog* _tmp33_ = NULL;
701
GtkMessageDialog* _tmp34_ = NULL;
704
GtkMessageDialog* _tmp38_ = NULL;
706
_tmp26_ = g_file_get_path (_tmp25_);
662
707
_tmp27_ = _tmp26_;
664
error_dialog = _tmp27_;
665
_tmp28_ = error_dialog;
666
gtk_dialog_add_button ((GtkDialog*) _tmp28_, GTK_STOCK_CANCEL, (gint) GTK_RESPONSE_CANCEL);
667
_tmp29_ = error_dialog;
668
gtk_dialog_add_button ((GtkDialog*) _tmp29_, "Skip", (gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP);
708
_tmp28_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, "Could not delete %s", _tmp27_);
709
g_object_ref_sink (_tmp28_);
712
error_dialog = _tmp29_;
669
713
_tmp30_ = error_dialog;
670
gtk_dialog_add_button ((GtkDialog*) _tmp30_, "Skip all", (gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP_ALL);
671
_tmp31_ = error_dialog;
672
_tmp32_ = gtk_dialog_run ((GtkDialog*) _tmp31_);
673
error_response = _tmp32_;
674
_tmp33_ = error_response;
675
if (_tmp33_ == ((gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP_ALL)) {
714
_tmp31_ = _ ("_Cancel");
715
gtk_dialog_add_button ((GtkDialog*) _tmp30_, _tmp31_, (gint) GTK_RESPONSE_CANCEL);
716
_tmp32_ = error_dialog;
717
gtk_dialog_add_button ((GtkDialog*) _tmp32_, "Skip", (gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP);
718
_tmp33_ = error_dialog;
719
gtk_dialog_add_button ((GtkDialog*) _tmp33_, "Skip all", (gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP_ALL);
720
_tmp34_ = error_dialog;
721
_tmp35_ = gtk_dialog_run ((GtkDialog*) _tmp34_);
722
error_response = _tmp35_;
723
_tmp36_ = error_response;
724
if (_tmp36_ == ((gint) CHEESE_MAIN_WINDOW_DELETE_RESPONSE_SKIP_ALL)) {
676
725
skip_all_errors = TRUE;
679
_tmp34_ = error_response;
680
if (_tmp34_ == ((gint) GTK_RESPONSE_CANCEL)) {
728
_tmp37_ = error_response;
729
if (_tmp37_ == ((gint) GTK_RESPONSE_CANCEL)) {
681
730
_g_object_unref0 (error_dialog);
682
731
_g_error_free0 (err);
683
732
_g_object_unref0 (file);
687
_tmp35_ = error_dialog;
688
gtk_widget_destroy ((GtkWidget*) _tmp35_);
736
_tmp38_ = error_dialog;
737
gtk_widget_destroy ((GtkWidget*) _tmp38_);
689
738
_g_object_unref0 (error_dialog);
691
740
_g_error_free0 (err);
694
743
if (_inner_error_ != NULL) {
695
744
_g_object_unref0 (file);
696
745
_g_object_unref0 (confirmation_dialog);
868
917
_tmp3_ = _ ("Save File");
869
_tmp4_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp3_, (GtkWindow*) self, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL, NULL);
870
g_object_ref_sink (_tmp4_);
918
_tmp4_ = _ ("_Cancel");
920
_tmp6_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp3_, (GtkWindow*) self, GTK_FILE_CHOOSER_ACTION_SAVE, _tmp4_, GTK_RESPONSE_CANCEL, _tmp5_, GTK_RESPONSE_ACCEPT, NULL, NULL);
921
g_object_ref_sink (_tmp6_);
871
922
_g_object_unref0 (save_as_dialog);
872
save_as_dialog = _tmp4_;
873
_tmp5_ = save_as_dialog;
874
gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _tmp5_, TRUE);
876
_tmp7_ = g_filename_display_basename (_tmp6_);
923
save_as_dialog = _tmp6_;
924
_tmp7_ = save_as_dialog;
925
gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _tmp7_, TRUE);
927
_tmp9_ = g_filename_display_basename (_tmp8_);
877
928
_g_free0 (basename);
879
_tmp8_ = save_as_dialog;
881
gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp8_, _tmp9_);
882
930
_tmp10_ = save_as_dialog;
883
_tmp11_ = g_get_home_dir ();
884
gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp10_, _tmp11_);
932
gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp10_, _tmp11_);
885
933
_tmp12_ = save_as_dialog;
886
_tmp13_ = gtk_dialog_run ((GtkDialog*) _tmp12_);
934
_tmp13_ = g_get_home_dir ();
935
gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp12_, _tmp13_);
888
936
_tmp14_ = save_as_dialog;
889
gtk_widget_hide ((GtkWidget*) _tmp14_);
891
if (_tmp15_ == ((gint) GTK_RESPONSE_ACCEPT)) {
937
_tmp15_ = gtk_dialog_run ((GtkDialog*) _tmp14_);
939
_tmp16_ = save_as_dialog;
940
gtk_widget_hide ((GtkWidget*) _tmp16_);
942
if (_tmp17_ == ((gint) GTK_RESPONSE_ACCEPT)) {
892
943
gchar* target_filename = NULL;
893
GtkFileChooserDialog* _tmp16_ = NULL;
894
gchar* _tmp17_ = NULL;
944
GtkFileChooserDialog* _tmp18_ = NULL;
945
gchar* _tmp19_ = NULL;
895
946
GFile* src = NULL;
896
const gchar* _tmp18_ = NULL;
897
GFile* _tmp19_ = NULL;
899
947
const gchar* _tmp20_ = NULL;
900
948
GFile* _tmp21_ = NULL;
901
_tmp16_ = save_as_dialog;
902
_tmp17_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp16_);
950
const gchar* _tmp22_ = NULL;
951
GFile* _tmp23_ = NULL;
952
_tmp18_ = save_as_dialog;
953
_tmp19_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp18_);
903
954
_g_free0 (target_filename);
904
target_filename = _tmp17_;
906
_tmp19_ = g_file_new_for_path (_tmp18_);
908
_tmp20_ = target_filename;
955
target_filename = _tmp19_;
909
957
_tmp21_ = g_file_new_for_path (_tmp20_);
959
_tmp22_ = target_filename;
960
_tmp23_ = g_file_new_for_path (_tmp22_);
912
GFile* _tmp22_ = NULL;
913
GFile* _tmp23_ = NULL;
916
g_file_copy (_tmp22_, _tmp23_, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_inner_error_);
963
GFile* _tmp24_ = NULL;
964
GFile* _tmp25_ = NULL;
967
g_file_copy (_tmp24_, _tmp25_, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_inner_error_);
917
968
if (_inner_error_ != NULL) {
918
goto __catch10_g_error;
969
goto __catch7_g_error;
924
975
GError* err = NULL;
925
976
GtkMessageDialog* error_dialog = NULL;
926
const gchar* _tmp24_ = NULL;
927
const gchar* _tmp25_ = NULL;
928
GtkMessageDialog* _tmp26_ = NULL;
929
GtkMessageDialog* _tmp27_ = NULL;
977
const gchar* _tmp26_ = NULL;
978
const gchar* _tmp27_ = NULL;
930
979
GtkMessageDialog* _tmp28_ = NULL;
980
GtkMessageDialog* _tmp29_ = NULL;
981
GtkMessageDialog* _tmp30_ = NULL;
931
982
err = _inner_error_;
932
983
_inner_error_ = NULL;
933
_tmp24_ = _ ("Could not save %s");
934
_tmp25_ = target_filename;
935
_tmp26_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _tmp24_, _tmp25_);
936
g_object_ref_sink (_tmp26_);
937
error_dialog = _tmp26_;
938
_tmp27_ = error_dialog;
939
gtk_dialog_run ((GtkDialog*) _tmp27_);
940
_tmp28_ = error_dialog;
941
gtk_widget_destroy ((GtkWidget*) _tmp28_);
984
_tmp26_ = _ ("Could not save %s");
985
_tmp27_ = target_filename;
986
_tmp28_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _tmp26_, _tmp27_);
987
g_object_ref_sink (_tmp28_);
988
error_dialog = _tmp28_;
989
_tmp29_ = error_dialog;
990
gtk_dialog_run ((GtkDialog*) _tmp29_);
991
_tmp30_ = error_dialog;
992
gtk_widget_destroy ((GtkWidget*) _tmp30_);
942
993
_g_object_unref0 (error_dialog);
943
994
_g_error_free0 (err);
946
997
if (_inner_error_ != NULL) {
947
998
_g_object_unref0 (dest);
948
999
_g_object_unref0 (src);
1322
1363
_tmp4_ = self->priv->thumbnails_bottom;
1323
1364
gtk_widget_hide ((GtkWidget*) _tmp4_);
1325
_tmp5_ = self->priv->leave_fullscreen_button_container;
1326
gtk_widget_set_no_show_all ((GtkWidget*) _tmp5_, FALSE);
1327
_tmp6_ = self->priv->leave_fullscreen_button_container;
1328
gtk_widget_show_all ((GtkWidget*) _tmp6_);
1329
_tmp7_ = self->priv->buttons;
1330
_tmp7__length1 = self->priv->buttons_length1;
1332
GtkButton** b_collection = NULL;
1333
gint b_collection_length1 = 0;
1334
gint _b_collection_size_ = 0;
1336
b_collection = _tmp7_;
1337
b_collection_length1 = _tmp7__length1;
1338
for (b_it = 0; b_it < _tmp7__length1; b_it = b_it + 1) {
1339
GtkButton* _tmp8_ = NULL;
1340
GtkButton* b = NULL;
1341
_tmp8_ = _g_object_ref0 (b_collection[b_it]);
1344
GtkButton* _tmp9_ = NULL;
1345
const gchar* _tmp10_ = NULL;
1347
_tmp10_ = gtk_buildable_get_name ((GtkBuildable*) _tmp9_);
1348
if (g_strcmp0 (_tmp10_, "take_action_button") != 0) {
1349
GtkButton* _tmp11_ = NULL;
1351
gtk_button_set_relief (_tmp11_, GTK_RELIEF_NONE);
1353
_g_object_unref0 (b);
1366
_tmp5_ = self->priv->leave_fullscreen_button_box;
1367
gtk_widget_set_no_show_all (_tmp5_, FALSE);
1368
_tmp6_ = self->priv->leave_fullscreen_button_box;
1369
gtk_widget_show_all (_tmp6_);
1357
1370
gtk_window_fullscreen ((GtkWindow*) self);
1358
_tmp12_ = self->priv->viewport_widget;
1359
g_signal_connect_object ((GtkWidget*) _tmp12_, "motion-notify-event", (GCallback) _cheese_main_window_fullscreen_motion_notify_callback_gtk_widget_motion_notify_event, self, 0);
1371
_tmp7_ = self->priv->viewport_widget;
1372
g_signal_connect_object ((GtkWidget*) _tmp7_, "motion-notify-event", (GCallback) _cheese_main_window_fullscreen_motion_notify_callback_gtk_widget_motion_notify_event, self, 0);
1360
1373
cheese_main_window_set_fullscreen_timeout (self);
1362
gboolean _tmp13_ = FALSE;
1363
GtkGrid* _tmp16_ = NULL;
1364
GtkButton** _tmp17_ = NULL;
1365
gint _tmp17__length1 = 0;
1366
GtkGrid* _tmp22_ = NULL;
1367
GtkClutterEmbed* _tmp23_ = NULL;
1369
_tmp13_ = self->priv->is_wide_mode;
1371
GtkAlignment* _tmp14_ = NULL;
1372
_tmp14_ = self->priv->thumbnails_right;
1373
gtk_widget_show_all ((GtkWidget*) _tmp14_);
1375
gboolean _tmp8_ = FALSE;
1376
GtkWidget* _tmp11_ = NULL;
1377
GtkWidget* _tmp12_ = NULL;
1378
GtkClutterEmbed* _tmp13_ = NULL;
1380
gboolean _tmp15_ = FALSE;
1381
_tmp8_ = self->priv->is_wide_mode;
1383
GtkAlignment* _tmp9_ = NULL;
1384
_tmp9_ = self->priv->thumbnails_right;
1385
gtk_widget_show_all ((GtkWidget*) _tmp9_);
1375
GtkAlignment* _tmp15_ = NULL;
1376
_tmp15_ = self->priv->thumbnails_bottom;
1377
gtk_widget_show_all ((GtkWidget*) _tmp15_);
1379
_tmp16_ = self->priv->leave_fullscreen_button_container;
1380
gtk_widget_hide ((GtkWidget*) _tmp16_);
1381
_tmp17_ = self->priv->buttons;
1382
_tmp17__length1 = self->priv->buttons_length1;
1384
GtkButton** b_collection = NULL;
1385
gint b_collection_length1 = 0;
1386
gint _b_collection_size_ = 0;
1388
b_collection = _tmp17_;
1389
b_collection_length1 = _tmp17__length1;
1390
for (b_it = 0; b_it < _tmp17__length1; b_it = b_it + 1) {
1391
GtkButton* _tmp18_ = NULL;
1392
GtkButton* b = NULL;
1393
_tmp18_ = _g_object_ref0 (b_collection[b_it]);
1396
GtkButton* _tmp19_ = NULL;
1397
const gchar* _tmp20_ = NULL;
1399
_tmp20_ = gtk_buildable_get_name ((GtkBuildable*) _tmp19_);
1400
if (g_strcmp0 (_tmp20_, "take_action_button") != 0) {
1401
GtkButton* _tmp21_ = NULL;
1403
gtk_button_set_relief (_tmp21_, GTK_RELIEF_NORMAL);
1405
_g_object_unref0 (b);
1387
GtkAlignment* _tmp10_ = NULL;
1388
_tmp10_ = self->priv->thumbnails_bottom;
1389
gtk_widget_show_all ((GtkWidget*) _tmp10_);
1391
_tmp11_ = self->priv->leave_fullscreen_button_box;
1392
gtk_widget_hide (_tmp11_);
1409
1393
cheese_main_window_clear_fullscreen_timeout (self);
1410
_tmp22_ = self->priv->buttons_area;
1411
gtk_widget_show ((GtkWidget*) _tmp22_);
1412
_tmp23_ = self->priv->viewport_widget;
1413
g_signal_parse_name ("motion-notify-event", GTK_TYPE_WIDGET, &_tmp24_, NULL, FALSE);
1414
g_signal_handlers_disconnect_matched ((GtkWidget*) _tmp23_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp24_, 0, NULL, (GCallback) _cheese_main_window_fullscreen_motion_notify_callback_gtk_widget_motion_notify_event, self);
1394
_tmp12_ = self->priv->buttons_area;
1395
gtk_widget_show (_tmp12_);
1396
_tmp13_ = self->priv->viewport_widget;
1397
g_signal_parse_name ("motion-notify-event", GTK_TYPE_WIDGET, &_tmp14_, NULL, FALSE);
1398
g_signal_handlers_disconnect_matched ((GtkWidget*) _tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _cheese_main_window_fullscreen_motion_notify_callback_gtk_widget_motion_notify_event, self);
1415
1399
gtk_window_unfullscreen ((GtkWindow*) self);
1400
_tmp15_ = self->priv->was_maximized;
1402
gtk_window_maximize ((GtkWindow*) self);
1404
gtk_window_unmaximize ((GtkWindow*) self);
1603
* Toggle whether the countdown is active.
1605
* @param action the action that emitted the signal
1607
void cheese_main_window_on_countdown_toggle (GtkToggleAction* action, CheeseMainWindow* self) {
1608
GSettings* _tmp0_ = NULL;
1609
GtkToggleAction* _tmp1_ = NULL;
1610
gboolean _tmp2_ = FALSE;
1611
gboolean _tmp3_ = FALSE;
1612
g_return_if_fail (self != NULL);
1613
g_return_if_fail (action != NULL);
1614
_tmp0_ = self->priv->settings;
1616
_tmp2_ = gtk_toggle_action_get_active (_tmp1_);
1618
g_settings_set_boolean (_tmp0_, "countdown", _tmp3_);
1623
1593
* The method to call when the countdown is finished.
1625
1595
static void cheese_main_window_finish_countdown_callback (CheeseMainWindow* self) {
1626
1596
gboolean _tmp0_ = FALSE;
1627
CheeseMediaMode _tmp12_ = 0;
1597
CheeseMediaMode _tmp11_ = 0;
1628
1598
g_return_if_fail (self != NULL);
1629
1599
_tmp0_ = self->priv->action_cancelled;
1630
1600
if (_tmp0_ == FALSE) {
1631
1601
gchar* file_name = NULL;
1632
1602
CheeseFileUtil* _tmp1_ = NULL;
1633
1603
CheeseMediaMode _tmp2_ = 0;
1634
const gchar* _tmp3_ = NULL;
1635
gchar* _tmp4_ = NULL;
1636
GSettings* _tmp5_ = NULL;
1637
gboolean _tmp6_ = FALSE;
1638
GtkGrid* _tmp8_ = NULL;
1639
const gchar* _tmp9_ = NULL;
1640
CheeseCamera* _tmp10_ = NULL;
1641
const gchar* _tmp11_ = NULL;
1604
gchar* _tmp3_ = NULL;
1605
GSettings* _tmp4_ = NULL;
1606
gboolean _tmp5_ = FALSE;
1607
GtkWidget* _tmp7_ = NULL;
1608
const gchar* _tmp8_ = NULL;
1609
CheeseCamera* _tmp9_ = NULL;
1610
const gchar* _tmp10_ = NULL;
1642
1611
_tmp1_ = self->priv->fileutil;
1643
1612
_tmp2_ = self->priv->current_mode;
1644
1613
_tmp3_ = cheese_fileutil_get_new_media_filename (_tmp1_, _tmp2_);
1645
_tmp4_ = g_strdup (_tmp3_);
1647
_tmp5_ = self->priv->settings;
1648
_tmp6_ = g_settings_get_boolean (_tmp5_, "flash");
1650
CheeseFlash* _tmp7_ = NULL;
1651
_tmp7_ = self->priv->flash;
1652
cheese_flash_fire (_tmp7_);
1615
_tmp4_ = self->priv->settings;
1616
_tmp5_ = g_settings_get_boolean (_tmp4_, "flash");
1618
CheeseFlash* _tmp6_ = NULL;
1619
_tmp6_ = self->priv->flash;
1620
cheese_flash_fire (_tmp6_);
1654
_tmp8_ = self->priv->main_vbox;
1655
_tmp9_ = _ ("Shutter sound");
1656
ca_gtk_play_for_widget ((GtkWidget*) _tmp8_, (guint32) 0, CA_PROP_EVENT_ID, "camera-shutter", CA_PROP_MEDIA_ROLE, "event", CA_PROP_EVENT_DESCRIPTION, _tmp9_, NULL, NULL);
1657
_tmp10_ = self->priv->camera;
1658
_tmp11_ = file_name;
1659
cheese_camera_take_photo (_tmp10_, _tmp11_);
1622
_tmp7_ = self->priv->main_vbox;
1623
_tmp8_ = _ ("Shutter sound");
1624
ca_gtk_play_for_widget (_tmp7_, (guint32) 0, CA_PROP_EVENT_ID, "camera-shutter", CA_PROP_MEDIA_ROLE, "event", CA_PROP_EVENT_DESCRIPTION, _tmp8_, NULL, NULL);
1625
_tmp9_ = self->priv->camera;
1626
_tmp10_ = file_name;
1627
cheese_camera_take_photo (_tmp9_, _tmp10_);
1660
1628
_g_free0 (file_name);
1662
_tmp12_ = self->priv->current_mode;
1663
if (_tmp12_ == CHEESE_MEDIA_MODE_PHOTO) {
1630
_tmp11_ = self->priv->current_mode;
1631
if (_tmp11_ == CHEESE_MEDIA_MODE_PHOTO) {
1664
1632
cheese_main_window_enable_mode_change (self);
1866
1826
CheeseCamera* _tmp1_ = NULL;
1867
1827
CheeseFileUtil* _tmp2_ = NULL;
1868
1828
CheeseMediaMode _tmp3_ = 0;
1869
const gchar* _tmp4_ = NULL;
1870
GtkLabel* _tmp5_ = NULL;
1871
const gchar* _tmp6_ = NULL;
1872
gchar* _tmp7_ = NULL;
1873
gchar* _tmp8_ = NULL;
1874
gchar* _tmp9_ = NULL;
1875
gchar* _tmp10_ = NULL;
1876
GtkButton* _tmp11_ = NULL;
1877
const gchar* _tmp12_ = NULL;
1878
GtkImage* _tmp13_ = NULL;
1829
gchar* _tmp4_ = NULL;
1830
gchar* _tmp5_ = NULL;
1831
GtkButton* _tmp6_ = NULL;
1832
const gchar* _tmp7_ = NULL;
1833
GtkImage* _tmp8_ = NULL;
1879
1834
_tmp1_ = self->priv->camera;
1880
1835
_tmp2_ = self->priv->fileutil;
1881
1836
_tmp3_ = self->priv->current_mode;
1882
1837
_tmp4_ = cheese_fileutil_get_new_media_filename (_tmp2_, _tmp3_);
1883
cheese_camera_start_video_recording (_tmp1_, _tmp4_);
1839
cheese_camera_start_video_recording (_tmp1_, _tmp5_);
1884
1841
g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, _cheese_main_window_update_timeout_layer_gsource_func, g_object_ref (self), g_object_unref);
1885
_tmp5_ = self->priv->take_action_button_label;
1886
_tmp6_ = _ ("Stop _Recording");
1887
_tmp7_ = g_strconcat ("<b>", _tmp6_, NULL);
1889
_tmp9_ = g_strconcat (_tmp8_, "</b>", NULL);
1891
gtk_label_set_label (_tmp5_, _tmp10_);
1842
_tmp6_ = self->priv->take_action_button;
1843
_tmp7_ = _ ("Stop recording");
1844
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp7_);
1845
_tmp8_ = self->priv->take_action_button_image;
1846
gtk_image_set_from_icon_name (_tmp8_, "media-playback-stop-symbolic", GTK_ICON_SIZE_BUTTON);
1847
self->priv->is_recording = TRUE;
1848
cheese_main_window_disable_mode_change (self);
1850
CheeseCamera* _tmp9_ = NULL;
1851
ClutterText* _tmp10_ = NULL;
1852
GtkButton* _tmp11_ = NULL;
1853
const gchar* _tmp12_ = NULL;
1854
GtkImage* _tmp13_ = NULL;
1855
_tmp9_ = self->priv->camera;
1856
cheese_camera_stop_video_recording (_tmp9_);
1857
_tmp10_ = self->priv->timeout_layer;
1858
clutter_text_set_text (_tmp10_, "00:00:00");
1894
1859
_tmp11_ = self->priv->take_action_button;
1895
_tmp12_ = _ ("Stop recording");
1860
_tmp12_ = _ ("Record a video");
1896
1861
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp11_, _tmp12_);
1897
1862
_tmp13_ = self->priv->take_action_button_image;
1898
gtk_image_set_from_stock (_tmp13_, GTK_STOCK_MEDIA_STOP, GTK_ICON_SIZE_BUTTON);
1899
self->priv->is_recording = TRUE;
1900
cheese_main_window_disable_mode_change (self);
1902
CheeseCamera* _tmp14_ = NULL;
1903
ClutterText* _tmp15_ = NULL;
1904
GtkLabel* _tmp16_ = NULL;
1905
const gchar* _tmp17_ = NULL;
1906
gchar* _tmp18_ = NULL;
1907
gchar* _tmp19_ = NULL;
1908
gchar* _tmp20_ = NULL;
1909
gchar* _tmp21_ = NULL;
1910
GtkButton* _tmp22_ = NULL;
1911
const gchar* _tmp23_ = NULL;
1912
GtkImage* _tmp24_ = NULL;
1913
_tmp14_ = self->priv->camera;
1914
cheese_camera_stop_video_recording (_tmp14_);
1915
_tmp15_ = self->priv->timeout_layer;
1916
clutter_text_set_text (_tmp15_, "00:00:00");
1917
_tmp16_ = self->priv->take_action_button_label;
1918
_tmp17_ = _ ("_Record a Video");
1919
_tmp18_ = g_strconcat ("<b>", _tmp17_, NULL);
1921
_tmp20_ = g_strconcat (_tmp19_, "</b>", NULL);
1923
gtk_label_set_label (_tmp16_, _tmp21_);
1926
_tmp22_ = self->priv->take_action_button;
1927
_tmp23_ = _ ("Record a video");
1928
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp22_, _tmp23_);
1929
_tmp24_ = self->priv->take_action_button_image;
1930
gtk_image_set_from_stock (_tmp24_, GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_BUTTON);
1863
gtk_image_set_from_icon_name (_tmp13_, "camera-web-symbolic", GTK_ICON_SIZE_BUTTON);
1931
1864
self->priv->is_recording = FALSE;
1932
1865
cheese_main_window_enable_mode_change (self);
1982
1915
g_return_if_fail (self != NULL);
1983
1916
_tmp0_ = is_start;
1985
GtkLabel* _tmp1_ = NULL;
1918
GtkButton* _tmp1_ = NULL;
1986
1919
const gchar* _tmp2_ = NULL;
1987
gchar* _tmp3_ = NULL;
1988
gchar* _tmp4_ = NULL;
1989
gchar* _tmp5_ = NULL;
1990
gchar* _tmp6_ = NULL;
1991
GtkButton* _tmp7_ = NULL;
1992
const gchar* _tmp8_ = NULL;
1993
1920
gint burst_delay = 0;
1994
GSettings* _tmp9_ = NULL;
1921
GSettings* _tmp3_ = NULL;
1996
1923
gint countdown_duration = 0;
1997
GSettings* _tmp11_ = NULL;
1999
gboolean _tmp13_ = FALSE;
2002
gboolean _tmp18_ = FALSE;
1924
GSettings* _tmp5_ = NULL;
1926
gboolean _tmp7_ = FALSE;
2003
1929
self->priv->is_bursting = TRUE;
2004
1930
cheese_main_window_disable_mode_change (self);
2005
_tmp1_ = self->priv->take_action_button_label;
2006
_tmp2_ = _ ("Stop _Taking Pictures");
2007
_tmp3_ = g_strconcat ("<b>", _tmp2_, NULL);
2009
_tmp5_ = g_strconcat (_tmp4_, "</b>", NULL);
2011
gtk_label_set_label (_tmp1_, _tmp6_);
2014
_tmp7_ = self->priv->take_action_button;
2015
_tmp8_ = _ ("Stop taking pictures");
2016
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp7_, _tmp8_);
1931
_tmp1_ = self->priv->take_action_button;
1932
_tmp2_ = _ ("Stop taking pictures");
1933
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp1_, _tmp2_);
2017
1934
cheese_main_window_burst_take_photo (self);
2018
_tmp9_ = self->priv->settings;
2019
_tmp10_ = g_settings_get_int (_tmp9_, "burst-delay");
2020
burst_delay = _tmp10_;
2021
_tmp11_ = self->priv->settings;
2022
_tmp12_ = g_settings_get_int (_tmp11_, "countdown-duration");
2023
countdown_duration = 500 + (_tmp12_ * 1000);
2024
_tmp14_ = burst_delay;
2025
_tmp15_ = countdown_duration;
2026
if ((_tmp14_ - _tmp15_) < 1000) {
2027
GSettings* _tmp16_ = NULL;
2028
gboolean _tmp17_ = FALSE;
2029
_tmp16_ = self->priv->settings;
2030
_tmp17_ = g_settings_get_boolean (_tmp16_, "countdown");
1935
_tmp3_ = self->priv->settings;
1936
_tmp4_ = g_settings_get_int (_tmp3_, "burst-delay");
1937
burst_delay = _tmp4_;
1938
_tmp5_ = self->priv->settings;
1939
_tmp6_ = g_settings_get_int (_tmp5_, "countdown-duration");
1940
countdown_duration = 500 + (_tmp6_ * 1000);
1941
_tmp8_ = burst_delay;
1942
_tmp9_ = countdown_duration;
1943
if ((_tmp8_ - _tmp9_) < 1000) {
1944
GSettings* _tmp10_ = NULL;
1945
gboolean _tmp11_ = FALSE;
1946
_tmp10_ = self->priv->settings;
1947
_tmp11_ = g_settings_get_boolean (_tmp10_, "countdown");
2039
_tmp19_ = countdown_duration;
2040
_tmp20_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) _tmp19_, _cheese_main_window_burst_take_photo_gsource_func, g_object_ref (self), g_object_unref);
2041
self->priv->burst_callback_id = _tmp20_;
1955
_tmp12_ = countdown_duration;
1956
_tmp13_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) _tmp12_, _cheese_main_window_burst_take_photo_gsource_func, g_object_ref (self), g_object_unref);
1957
self->priv->burst_callback_id = _tmp13_;
2045
_tmp21_ = burst_delay;
2046
_tmp22_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) _tmp21_, _cheese_main_window_burst_take_photo_gsource_func, g_object_ref (self), g_object_unref);
2047
self->priv->burst_callback_id = _tmp22_;
1961
_tmp14_ = burst_delay;
1962
_tmp15_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) _tmp14_, _cheese_main_window_burst_take_photo_gsource_func, g_object_ref (self), g_object_unref);
1963
self->priv->burst_callback_id = _tmp15_;
2050
gboolean _tmp23_ = FALSE;
2051
CheeseCountdown* _tmp24_ = NULL;
2052
gboolean _tmp27_ = FALSE;
2053
GtkLabel* _tmp29_ = NULL;
2054
const gchar* _tmp30_ = NULL;
2055
gchar* _tmp31_ = NULL;
2056
gchar* _tmp32_ = NULL;
2057
gchar* _tmp33_ = NULL;
2058
gchar* _tmp34_ = NULL;
2059
GtkButton* _tmp35_ = NULL;
2060
const gchar* _tmp36_ = NULL;
2061
CheeseFileUtil* _tmp37_ = NULL;
2063
_tmp24_ = self->priv->current_countdown;
2064
if (_tmp24_ != NULL) {
2065
CheeseCountdown* _tmp25_ = NULL;
2066
gboolean _tmp26_ = FALSE;
2067
_tmp25_ = self->priv->current_countdown;
2068
_tmp26_ = _tmp25_->running;
1966
gboolean _tmp16_ = FALSE;
1967
CheeseCountdown* _tmp17_ = NULL;
1968
GtkButton* _tmp21_ = NULL;
1969
const gchar* _tmp22_ = NULL;
1970
CheeseFileUtil* _tmp23_ = NULL;
1972
_tmp17_ = self->priv->current_countdown;
1973
if (_tmp17_ != NULL) {
1974
CheeseCountdown* _tmp18_ = NULL;
1975
gboolean _tmp19_ = FALSE;
1976
_tmp18_ = self->priv->current_countdown;
1977
_tmp19_ = _tmp18_->running;
2075
CheeseCountdown* _tmp28_ = NULL;
2076
_tmp28_ = self->priv->current_countdown;
2077
cheese_countdown_stop (_tmp28_);
1983
CheeseCountdown* _tmp20_ = NULL;
1984
_tmp20_ = self->priv->current_countdown;
1985
cheese_countdown_stop (_tmp20_);
2079
1987
self->priv->is_bursting = FALSE;
2080
1988
cheese_main_window_enable_mode_change (self);
2081
_tmp29_ = self->priv->take_action_button_label;
2082
_tmp30_ = _ ("Take Multiple Photos");
2083
_tmp31_ = g_strconcat ("<b>", _tmp30_, NULL);
2085
_tmp33_ = g_strconcat (_tmp32_, "</b>", NULL);
2087
gtk_label_set_label (_tmp29_, _tmp34_);
2090
_tmp35_ = self->priv->take_action_button;
2091
_tmp36_ = _ ("Take multiple photos");
2092
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp35_, _tmp36_);
1989
_tmp21_ = self->priv->take_action_button;
1990
_tmp22_ = _ ("Take multiple photos");
1991
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp21_, _tmp22_);
2093
1992
self->priv->burst_count = 0;
2094
_tmp37_ = self->priv->fileutil;
2095
cheese_fileutil_reset_burst (_tmp37_);
2096
_tmp38_ = self->priv->burst_callback_id;
2097
g_source_remove (_tmp38_);
1993
_tmp23_ = self->priv->fileutil;
1994
cheese_fileutil_reset_burst (_tmp23_);
1995
_tmp24_ = self->priv->burst_callback_id;
1996
g_source_remove (_tmp24_);
2856
2764
* Load the UI from the GtkBuilder description.
2858
2766
static void _cheese_main_window_on_stage_resize_clutter_actor_allocation_changed (ClutterActor* _sender, ClutterActorBox* box, ClutterAllocationFlags flags, gpointer self) {
2859
cheese_main_window_on_stage_resize (self, _sender, box, flags);
2767
cheese_main_window_on_stage_resize ((CheeseMainWindow*) self, _sender, box, flags);
2863
2771
static gboolean _cheese_main_window_on_thumbnail_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
2864
2772
gboolean result;
2865
result = cheese_main_window_on_thumbnail_button_press_event (self, _sender, event);
2773
result = cheese_main_window_on_thumbnail_button_press_event ((CheeseMainWindow*) self, _sender, event);
2870
2778
static gboolean _cheese_main_window_on_key_release_gtk_widget_key_release_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
2871
2779
gboolean result;
2872
result = cheese_main_window_on_key_release (self, event);
2780
result = cheese_main_window_on_key_release ((CheeseMainWindow*) self, event);
2877
2785
void cheese_main_window_setup_ui (CheeseMainWindow* self) {
2878
GtkBuilder* _tmp0_ = NULL;
2879
ClutterScript* _tmp1_ = NULL;
2880
CheeseFileUtil* _tmp2_ = NULL;
2881
CheeseFlash* _tmp3_ = NULL;
2882
GSettings* _tmp4_ = NULL;
2786
ClutterScript* _tmp0_ = NULL;
2787
CheeseFileUtil* _tmp1_ = NULL;
2788
CheeseFlash* _tmp2_ = NULL;
2789
GSettings* _tmp3_ = NULL;
2883
2790
GMenu* menu = NULL;
2791
GMenu* _tmp4_ = NULL;
2792
GMenu* section = NULL;
2884
2793
GMenu* _tmp5_ = NULL;
2885
GMenu* section = NULL;
2886
GMenu* _tmp6_ = NULL;
2887
GMenu* _tmp7_ = NULL;
2888
GMenu* _tmp8_ = NULL;
2889
2794
GMenuItem* item = NULL;
2890
const gchar* _tmp9_ = NULL;
2891
GMenuItem* _tmp10_ = NULL;
2795
const gchar* _tmp6_ = NULL;
2796
GMenuItem* _tmp7_ = NULL;
2797
GMenuItem* _tmp8_ = NULL;
2798
GMenuItem* _tmp9_ = NULL;
2799
const gchar* _tmp10_ = NULL;
2892
2800
GMenuItem* _tmp11_ = NULL;
2893
GMenu* _tmp12_ = NULL;
2801
GMenuItem* _tmp12_ = NULL;
2894
2802
GMenuItem* _tmp13_ = NULL;
2895
2803
const gchar* _tmp14_ = NULL;
2896
2804
GMenuItem* _tmp15_ = NULL;
2897
2805
GMenuItem* _tmp16_ = NULL;
2898
GMenu* _tmp17_ = NULL;
2899
GMenuItem* _tmp18_ = NULL;
2900
const gchar* _tmp19_ = NULL;
2806
GMenuItem* _tmp17_ = NULL;
2807
const gchar* _tmp18_ = NULL;
2808
GMenuItem* _tmp19_ = NULL;
2901
2809
GMenuItem* _tmp20_ = NULL;
2902
2810
GMenuItem* _tmp21_ = NULL;
2903
GMenu* _tmp22_ = NULL;
2904
GMenuItem* _tmp23_ = NULL;
2905
const gchar* _tmp24_ = NULL;
2906
GMenuItem* _tmp25_ = NULL;
2907
GMenuItem* _tmp26_ = NULL;
2908
GMenu* _tmp27_ = NULL;
2909
GMenuItem* _tmp28_ = NULL;
2910
GMenu* _tmp29_ = NULL;
2911
GtkMenu* _tmp30_ = NULL;
2912
GtkBuilder* _tmp39_ = NULL;
2913
GObject* _tmp40_ = NULL;
2914
GtkGrid* _tmp41_ = NULL;
2915
GtkBuilder* _tmp42_ = NULL;
2916
GObject* _tmp43_ = NULL;
2917
GtkWidget* _tmp44_ = NULL;
2918
GtkBuilder* _tmp45_ = NULL;
2919
GObject* _tmp46_ = NULL;
2920
GtkClutterEmbed* _tmp47_ = NULL;
2921
GtkClutterEmbed* _tmp48_ = NULL;
2922
ClutterActor* _tmp49_ = NULL;
2923
ClutterStage* _tmp50_ = NULL;
2924
GtkBuilder* _tmp51_ = NULL;
2925
GObject* _tmp52_ = NULL;
2926
GtkAlignment* _tmp53_ = NULL;
2927
GtkBuilder* _tmp54_ = NULL;
2928
GObject* _tmp55_ = NULL;
2929
GtkAlignment* _tmp56_ = NULL;
2930
GtkBuilder* _tmp57_ = NULL;
2931
GObject* _tmp58_ = NULL;
2932
GtkGrid* _tmp59_ = NULL;
2933
GtkBuilder* _tmp60_ = NULL;
2934
GObject* _tmp61_ = NULL;
2935
GtkToggleButton* _tmp62_ = NULL;
2936
GtkBuilder* _tmp63_ = NULL;
2937
GObject* _tmp64_ = NULL;
2938
GtkToggleButton* _tmp65_ = NULL;
2939
GtkBuilder* _tmp66_ = NULL;
2940
GObject* _tmp67_ = NULL;
2941
GtkToggleButton* _tmp68_ = NULL;
2942
GtkBuilder* _tmp69_ = NULL;
2943
GObject* _tmp70_ = NULL;
2944
GtkButton* _tmp71_ = NULL;
2945
GtkBuilder* _tmp72_ = NULL;
2946
GObject* _tmp73_ = NULL;
2947
GtkLabel* _tmp74_ = NULL;
2948
GtkBuilder* _tmp75_ = NULL;
2949
GObject* _tmp76_ = NULL;
2950
GtkImage* _tmp77_ = NULL;
2951
GtkBuilder* _tmp78_ = NULL;
2952
GObject* _tmp79_ = NULL;
2953
GtkToggleButton* _tmp80_ = NULL;
2954
GtkBuilder* _tmp81_ = NULL;
2955
GObject* _tmp82_ = NULL;
2956
GtkButton* _tmp83_ = NULL;
2957
GtkBuilder* _tmp84_ = NULL;
2958
GObject* _tmp85_ = NULL;
2959
GtkGrid* _tmp86_ = NULL;
2960
GtkBuilder* _tmp87_ = NULL;
2961
GObject* _tmp88_ = NULL;
2962
GtkAction* _tmp89_ = NULL;
2963
GtkToggleButton* _tmp90_ = NULL;
2964
GtkButton* _tmp91_ = NULL;
2965
GtkToggleButton* _tmp92_ = NULL;
2966
GtkButton* _tmp93_ = NULL;
2967
GtkToggleButton* _tmp94_ = NULL;
2968
GtkButton* _tmp95_ = NULL;
2969
GtkButton* _tmp96_ = NULL;
2970
GtkButton* _tmp97_ = NULL;
2971
GtkToggleButton* _tmp98_ = NULL;
2972
GtkButton* _tmp99_ = NULL;
2973
GtkButton* _tmp100_ = NULL;
2974
GtkButton* _tmp101_ = NULL;
2975
GtkButton** _tmp102_ = NULL;
2976
ClutterScript* _tmp103_ = NULL;
2977
GObject* _tmp104_ = NULL;
2978
ClutterTexture* _tmp105_ = NULL;
2979
ClutterScript* _tmp106_ = NULL;
2980
GObject* _tmp107_ = NULL;
2981
ClutterActor* _tmp108_ = NULL;
2982
ClutterScript* _tmp109_ = NULL;
2983
GObject* _tmp110_ = NULL;
2984
ClutterBinLayout* _tmp111_ = NULL;
2985
ClutterScript* _tmp112_ = NULL;
2986
GObject* _tmp113_ = NULL;
2987
ClutterText* _tmp114_ = NULL;
2988
ClutterScript* _tmp115_ = NULL;
2989
GObject* _tmp116_ = NULL;
2990
ClutterActor* _tmp117_ = NULL;
2991
ClutterScript* _tmp118_ = NULL;
2992
GObject* _tmp119_ = NULL;
2993
ClutterText* _tmp120_ = NULL;
2994
ClutterScript* _tmp121_ = NULL;
2995
GObject* _tmp122_ = NULL;
2996
ClutterText* _tmp123_ = NULL;
2997
ClutterTexture* _tmp124_ = NULL;
2998
ClutterTexture* _tmp125_ = NULL;
2999
ClutterStage* _tmp126_ = NULL;
3000
ClutterActor* _tmp127_ = NULL;
3001
ClutterActor* _tmp128_ = NULL;
3002
ClutterBinLayout* _tmp129_ = NULL;
3003
ClutterStage* _tmp130_ = NULL;
3004
ClutterActor* _tmp131_ = NULL;
3005
ClutterStage* _tmp132_ = NULL;
3006
ClutterText* _tmp133_ = NULL;
3007
ClutterStage* _tmp134_ = NULL;
3008
CheeseThumbView* _tmp135_ = NULL;
3009
CheeseThumbView* _tmp136_ = NULL;
3010
EogThumbNav* _tmp137_ = NULL;
3011
GtkMenu* _tmp138_ = NULL;
3012
CheeseThumbView* _tmp139_ = NULL;
2811
GtkMenu* _tmp22_ = NULL;
2812
GtkClutterEmbed* _tmp25_ = NULL;
2813
ClutterActor* _tmp26_ = NULL;
2814
ClutterStage* _tmp27_ = NULL;
2815
ClutterScript* _tmp28_ = NULL;
2816
GObject* _tmp29_ = NULL;
2817
ClutterTexture* _tmp30_ = NULL;
2818
ClutterScript* _tmp31_ = NULL;
2819
GObject* _tmp32_ = NULL;
2820
ClutterActor* _tmp33_ = NULL;
2821
ClutterScript* _tmp34_ = NULL;
2822
GObject* _tmp35_ = NULL;
2823
ClutterBinLayout* _tmp36_ = NULL;
2824
ClutterScript* _tmp37_ = NULL;
2825
GObject* _tmp38_ = NULL;
2826
ClutterText* _tmp39_ = NULL;
2827
ClutterScript* _tmp40_ = NULL;
2828
GObject* _tmp41_ = NULL;
2829
ClutterActor* _tmp42_ = NULL;
2830
ClutterScript* _tmp43_ = NULL;
2831
GObject* _tmp44_ = NULL;
2832
ClutterText* _tmp45_ = NULL;
2833
ClutterScript* _tmp46_ = NULL;
2834
GObject* _tmp47_ = NULL;
2835
ClutterText* _tmp48_ = NULL;
2836
ClutterTexture* _tmp49_ = NULL;
2837
ClutterTexture* _tmp50_ = NULL;
2838
ClutterStage* _tmp51_ = NULL;
2839
ClutterActor* _tmp52_ = NULL;
2840
ClutterActor* _tmp53_ = NULL;
2841
ClutterBinLayout* _tmp54_ = NULL;
2842
ClutterStage* _tmp55_ = NULL;
2843
ClutterActor* _tmp56_ = NULL;
2844
ClutterStage* _tmp57_ = NULL;
2845
ClutterText* _tmp58_ = NULL;
2846
ClutterStage* _tmp59_ = NULL;
2847
CheeseThumbView* _tmp60_ = NULL;
2848
CheeseThumbView* _tmp61_ = NULL;
2849
EogThumbNav* _tmp62_ = NULL;
2850
GtkMenu* _tmp63_ = NULL;
2851
CheeseThumbView* _tmp64_ = NULL;
3013
2852
GtkCssProvider* css = NULL;
3014
GdkScreen* _tmp146_ = NULL;
3015
GdkScreen* _tmp147_ = NULL;
3016
CheeseThumbView* _tmp148_ = NULL;
3017
GtkGrid* _tmp149_ = NULL;
3018
GtkGrid* _tmp150_ = NULL;
3019
GtkClutterEmbed* _tmp151_ = NULL;
2853
GdkScreen* _tmp68_ = NULL;
2854
GdkScreen* _tmp69_ = NULL;
2855
CheeseThumbView* _tmp70_ = NULL;
2856
GtkClutterEmbed* _tmp71_ = NULL;
3020
2857
GError * _inner_error_ = NULL;
3021
2858
g_return_if_fail (self != NULL);
3022
_tmp0_ = gtk_builder_new ();
3023
_g_object_unref0 (self->priv->gtk_builder);
3024
self->priv->gtk_builder = _tmp0_;
3025
_tmp1_ = clutter_script_new ();
2859
_tmp0_ = clutter_script_new ();
3026
2860
_g_object_unref0 (self->priv->clutter_builder);
3027
self->priv->clutter_builder = _tmp1_;
3028
_tmp2_ = cheese_fileutil_new ();
2861
self->priv->clutter_builder = _tmp0_;
2862
_tmp1_ = cheese_fileutil_new ();
3029
2863
_g_object_unref0 (self->priv->fileutil);
3030
self->priv->fileutil = _tmp2_;
3031
_tmp3_ = cheese_flash_new ((GtkWidget*) self);
3032
g_object_ref_sink (_tmp3_);
2864
self->priv->fileutil = _tmp1_;
2865
_tmp2_ = cheese_flash_new ((GtkWidget*) self);
2866
g_object_ref_sink (_tmp2_);
3033
2867
_g_object_unref0 (self->priv->flash);
3034
self->priv->flash = _tmp3_;
3035
_tmp4_ = g_settings_new ("org.gnome.Cheese");
2868
self->priv->flash = _tmp2_;
2869
_tmp3_ = g_settings_new ("org.gnome.Cheese");
3036
2870
_g_object_unref0 (self->priv->settings);
3037
self->priv->settings = _tmp4_;
2871
self->priv->settings = _tmp3_;
2872
_tmp4_ = g_menu_new ();
3038
2874
_tmp5_ = g_menu_new ();
3040
_tmp6_ = g_menu_new ();
3044
g_menu_append_section (_tmp7_, NULL, (GMenuModel*) _tmp8_);
3045
_tmp9_ = _ ("Open");
3046
_tmp10_ = g_menu_item_new (_tmp9_, "win.file-open");
3049
g_menu_item_set_attribute (_tmp11_, "accel", "s", "<Primary>o", NULL);
2876
g_menu_append_section (menu, NULL, (GMenuModel*) section);
2877
_tmp6_ = _ ("Open");
2878
_tmp7_ = g_menu_item_new (_tmp6_, "win.file-open");
2881
g_menu_item_set_attribute (_tmp8_, "accel", "s", "<Primary>o", NULL);
2883
g_menu_append_item (section, _tmp9_);
2884
_tmp10_ = _ ("Save _As…");
2885
_tmp11_ = g_menu_item_new (_tmp10_, "win.file-saveas");
2886
_g_object_unref0 (item);
2889
g_menu_item_set_attribute (_tmp12_, "accel", "s", "<Primary>S", NULL);
3051
2890
_tmp13_ = item;
3052
g_menu_append_item (_tmp12_, _tmp13_);
3053
_tmp14_ = _ ("Save _As…");
3054
_tmp15_ = g_menu_item_new (_tmp14_, "win.file-saveas");
2891
g_menu_append_item (section, _tmp13_);
2892
_tmp14_ = _ ("Move to _Trash");
2893
_tmp15_ = g_menu_item_new (_tmp14_, "win.file-trash");
3055
2894
_g_object_unref0 (item);
3056
2895
item = _tmp15_;
3057
2896
_tmp16_ = item;
3058
g_menu_item_set_attribute (_tmp16_, "accel", "s", "<Primary>S", NULL);
3061
g_menu_append_item (_tmp17_, _tmp18_);
3062
_tmp19_ = _ ("Move to _Trash");
3063
_tmp20_ = g_menu_item_new (_tmp19_, "win.file-trash");
2897
g_menu_item_set_attribute (_tmp16_, "accel", "s", "Delete", NULL);
2899
g_menu_append_item (section, _tmp17_);
2900
_tmp18_ = _ ("Delete");
2901
_tmp19_ = g_menu_item_new (_tmp18_, "win.file-delete");
3064
2902
_g_object_unref0 (item);
2905
g_menu_item_set_attribute (_tmp20_, "accel", "s", "<Shift>Delete", NULL);
3066
2906
_tmp21_ = item;
3067
g_menu_item_set_attribute (_tmp21_, "accel", "s", "Delete", NULL);
3070
g_menu_append_item (_tmp22_, _tmp23_);
3071
_tmp24_ = _ ("Delete");
3072
_tmp25_ = g_menu_item_new (_tmp24_, "win.file-delete");
3073
_g_object_unref0 (item);
3076
g_menu_item_set_attribute (_tmp26_, "accel", "s", "<Shift>Delete", NULL);
3079
g_menu_append_item (_tmp27_, _tmp28_);
3081
_tmp30_ = (GtkMenu*) gtk_menu_new_from_model ((GMenuModel*) _tmp29_);
3082
g_object_ref_sink (_tmp30_);
2907
g_menu_append_item (section, _tmp21_);
2908
_tmp22_ = (GtkMenu*) gtk_menu_new_from_model ((GMenuModel*) menu);
2909
g_object_ref_sink (_tmp22_);
3083
2910
_g_object_unref0 (self->priv->thumbnail_popup);
3084
self->priv->thumbnail_popup = _tmp30_;
2911
self->priv->thumbnail_popup = _tmp22_;
3085
2912
g_action_map_add_action_entries ((GActionMap*) self, CHEESE_MAIN_WINDOW_actions, G_N_ELEMENTS (CHEESE_MAIN_WINDOW_actions), self);
3087
GtkBuilder* _tmp31_ = NULL;
3088
gchar* _tmp32_ = NULL;
3089
gchar* _tmp33_ = NULL;
3090
GtkBuilder* _tmp34_ = NULL;
3091
ClutterScript* _tmp35_ = NULL;
3092
gchar* _tmp36_ = NULL;
3093
gchar* _tmp37_ = NULL;
3094
_tmp31_ = self->priv->gtk_builder;
3095
_tmp32_ = g_build_filename (PACKAGE_DATADIR, "cheese-main-window.ui", NULL);
3097
gtk_builder_add_from_file (_tmp31_, _tmp33_, &_inner_error_);
3099
if (_inner_error_ != NULL) {
3100
goto __catch11_g_error;
3102
_tmp34_ = self->priv->gtk_builder;
3103
gtk_builder_connect_signals (_tmp34_, self);
3104
_tmp35_ = self->priv->clutter_builder;
3105
_tmp36_ = g_build_filename (PACKAGE_DATADIR, "cheese-viewport.json", NULL);
3107
clutter_script_load_from_file (_tmp35_, _tmp37_, &_inner_error_);
3109
if (_inner_error_ != NULL) {
3110
goto __catch11_g_error;
2914
ClutterScript* _tmp23_ = NULL;
2915
_tmp23_ = self->priv->clutter_builder;
2916
clutter_script_load_from_resource (_tmp23_, "/org/gnome/Cheese/cheese-viewport.json", &_inner_error_);
2917
if (_inner_error_ != NULL) {
2918
goto __catch8_g_error;
3116
2924
GError* err = NULL;
3117
const gchar* _tmp38_ = NULL;
2925
const gchar* _tmp24_ = NULL;
3118
2926
err = _inner_error_;
3119
2927
_inner_error_ = NULL;
3120
_tmp38_ = err->message;
3121
g_error ("cheese-window.vala:1197: Error: %s", _tmp38_);
2928
_tmp24_ = err->message;
2929
g_error ("cheese-window.vala:1212: Error: %s", _tmp24_);
3122
2930
_g_error_free0 (err);
3125
2933
if (_inner_error_ != NULL) {
3126
2934
_g_object_unref0 (item);
3127
2935
_g_object_unref0 (section);
3130
2938
g_clear_error (&_inner_error_);
3133
_tmp39_ = self->priv->gtk_builder;
3134
_tmp40_ = gtk_builder_get_object (_tmp39_, "mainbox_normal");
3135
_tmp41_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp40_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp40_) : NULL);
3136
_g_object_unref0 (self->priv->main_vbox);
3137
self->priv->main_vbox = _tmp41_;
3138
_tmp42_ = self->priv->gtk_builder;
3139
_tmp43_ = gtk_builder_get_object (_tmp42_, "thumbnails");
3140
_tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp43_, GTK_TYPE_WIDGET) ? ((GtkWidget*) _tmp43_) : NULL);
3141
_g_object_unref0 (self->priv->thumbnails);
3142
self->priv->thumbnails = _tmp44_;
3143
_tmp45_ = self->priv->gtk_builder;
3144
_tmp46_ = gtk_builder_get_object (_tmp45_, "viewport");
3145
_tmp47_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp46_, gtk_clutter_embed_get_type ()) ? ((GtkClutterEmbed*) _tmp46_) : NULL);
3146
_g_object_unref0 (self->priv->viewport_widget);
3147
self->priv->viewport_widget = _tmp47_;
3148
_tmp48_ = self->priv->viewport_widget;
3149
_tmp49_ = gtk_clutter_embed_get_stage (_tmp48_);
3150
_tmp50_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp49_, clutter_stage_get_type ()) ? ((ClutterStage*) _tmp49_) : NULL);
2941
_tmp25_ = self->priv->viewport_widget;
2942
_tmp26_ = gtk_clutter_embed_get_stage (_tmp25_);
2943
_tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, clutter_stage_get_type ()) ? ((ClutterStage*) _tmp26_) : NULL);
3151
2944
_g_object_unref0 (self->priv->viewport);
3152
self->priv->viewport = _tmp50_;
3153
_tmp51_ = self->priv->gtk_builder;
3154
_tmp52_ = gtk_builder_get_object (_tmp51_, "thumbnails_right");
3155
_tmp53_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, GTK_TYPE_ALIGNMENT) ? ((GtkAlignment*) _tmp52_) : NULL);
3156
_g_object_unref0 (self->priv->thumbnails_right);
3157
self->priv->thumbnails_right = _tmp53_;
3158
_tmp54_ = self->priv->gtk_builder;
3159
_tmp55_ = gtk_builder_get_object (_tmp54_, "thumbnails_bottom");
3160
_tmp56_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp55_, GTK_TYPE_ALIGNMENT) ? ((GtkAlignment*) _tmp55_) : NULL);
3161
_g_object_unref0 (self->priv->thumbnails_bottom);
3162
self->priv->thumbnails_bottom = _tmp56_;
3163
_tmp57_ = self->priv->gtk_builder;
3164
_tmp58_ = gtk_builder_get_object (_tmp57_, "leave_fullscreen_button_bin");
3165
_tmp59_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp58_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp58_) : NULL);
3166
_g_object_unref0 (self->priv->leave_fullscreen_button_container);
3167
self->priv->leave_fullscreen_button_container = _tmp59_;
3168
_tmp60_ = self->priv->gtk_builder;
3169
_tmp61_ = gtk_builder_get_object (_tmp60_, "photo_toggle_button");
3170
_tmp62_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, GTK_TYPE_TOGGLE_BUTTON) ? ((GtkToggleButton*) _tmp61_) : NULL);
3171
_g_object_unref0 (self->priv->photo_toggle_button);
3172
self->priv->photo_toggle_button = _tmp62_;
3173
_tmp63_ = self->priv->gtk_builder;
3174
_tmp64_ = gtk_builder_get_object (_tmp63_, "video_toggle_button");
3175
_tmp65_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp64_, GTK_TYPE_TOGGLE_BUTTON) ? ((GtkToggleButton*) _tmp64_) : NULL);
3176
_g_object_unref0 (self->priv->video_toggle_button);
3177
self->priv->video_toggle_button = _tmp65_;
3178
_tmp66_ = self->priv->gtk_builder;
3179
_tmp67_ = gtk_builder_get_object (_tmp66_, "burst_toggle_button");
3180
_tmp68_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp67_, GTK_TYPE_TOGGLE_BUTTON) ? ((GtkToggleButton*) _tmp67_) : NULL);
3181
_g_object_unref0 (self->priv->burst_toggle_button);
3182
self->priv->burst_toggle_button = _tmp68_;
3183
_tmp69_ = self->priv->gtk_builder;
3184
_tmp70_ = gtk_builder_get_object (_tmp69_, "take_action_button");
3185
_tmp71_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp70_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp70_) : NULL);
3186
_g_object_unref0 (self->priv->take_action_button);
3187
self->priv->take_action_button = _tmp71_;
3188
_tmp72_ = self->priv->gtk_builder;
3189
_tmp73_ = gtk_builder_get_object (_tmp72_, "take_action_button_internal_label");
3190
_tmp74_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp73_, GTK_TYPE_LABEL) ? ((GtkLabel*) _tmp73_) : NULL);
3191
_g_object_unref0 (self->priv->take_action_button_label);
3192
self->priv->take_action_button_label = _tmp74_;
3193
_tmp75_ = self->priv->gtk_builder;
3194
_tmp76_ = gtk_builder_get_object (_tmp75_, "take_action_button_internal_image");
3195
_tmp77_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp76_, GTK_TYPE_IMAGE) ? ((GtkImage*) _tmp76_) : NULL);
3196
_g_object_unref0 (self->priv->take_action_button_image);
3197
self->priv->take_action_button_image = _tmp77_;
3198
_tmp78_ = self->priv->gtk_builder;
3199
_tmp79_ = gtk_builder_get_object (_tmp78_, "effects_toggle_button");
3200
_tmp80_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp79_, GTK_TYPE_TOGGLE_BUTTON) ? ((GtkToggleButton*) _tmp79_) : NULL);
3201
_g_object_unref0 (self->priv->effects_toggle_button);
3202
self->priv->effects_toggle_button = _tmp80_;
3203
_tmp81_ = self->priv->gtk_builder;
3204
_tmp82_ = gtk_builder_get_object (_tmp81_, "leave_fullscreen_button");
3205
_tmp83_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp82_, GTK_TYPE_BUTTON) ? ((GtkButton*) _tmp82_) : NULL);
3206
_g_object_unref0 (self->priv->leave_fullscreen_button);
3207
self->priv->leave_fullscreen_button = _tmp83_;
3208
_tmp84_ = self->priv->gtk_builder;
3209
_tmp85_ = gtk_builder_get_object (_tmp84_, "buttons_area");
3210
_tmp86_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp85_, GTK_TYPE_GRID) ? ((GtkGrid*) _tmp85_) : NULL);
3211
_g_object_unref0 (self->priv->buttons_area);
3212
self->priv->buttons_area = _tmp86_;
3213
_tmp87_ = self->priv->gtk_builder;
3214
_tmp88_ = gtk_builder_get_object (_tmp87_, "countdown");
3215
_tmp89_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp88_, GTK_TYPE_ACTION) ? ((GtkAction*) _tmp88_) : NULL);
3216
_g_object_unref0 (self->priv->countdown_action);
3217
self->priv->countdown_action = _tmp89_;
3218
_tmp90_ = self->priv->photo_toggle_button;
3219
_tmp91_ = _g_object_ref0 ((GtkButton*) _tmp90_);
3220
_tmp92_ = self->priv->video_toggle_button;
3221
_tmp93_ = _g_object_ref0 ((GtkButton*) _tmp92_);
3222
_tmp94_ = self->priv->burst_toggle_button;
3223
_tmp95_ = _g_object_ref0 ((GtkButton*) _tmp94_);
3224
_tmp96_ = self->priv->take_action_button;
3225
_tmp97_ = _g_object_ref0 (_tmp96_);
3226
_tmp98_ = self->priv->effects_toggle_button;
3227
_tmp99_ = _g_object_ref0 ((GtkButton*) _tmp98_);
3228
_tmp100_ = self->priv->leave_fullscreen_button;
3229
_tmp101_ = _g_object_ref0 (_tmp100_);
3230
_tmp102_ = g_new0 (GtkButton*, 6 + 1);
3231
_tmp102_[0] = _tmp91_;
3232
_tmp102_[1] = _tmp93_;
3233
_tmp102_[2] = _tmp95_;
3234
_tmp102_[3] = _tmp97_;
3235
_tmp102_[4] = _tmp99_;
3236
_tmp102_[5] = _tmp101_;
3237
self->priv->buttons = (_vala_array_free (self->priv->buttons, self->priv->buttons_length1, (GDestroyNotify) g_object_unref), NULL);
3238
self->priv->buttons = _tmp102_;
3239
self->priv->buttons_length1 = 6;
3240
self->priv->_buttons_size_ = self->priv->buttons_length1;
3241
_tmp103_ = self->priv->clutter_builder;
3242
_tmp104_ = clutter_script_get_object (_tmp103_, "video_preview");
3243
_tmp105_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp104_, clutter_texture_get_type ()) ? ((ClutterTexture*) _tmp104_) : NULL);
2945
self->priv->viewport = _tmp27_;
2946
_tmp28_ = self->priv->clutter_builder;
2947
_tmp29_ = clutter_script_get_object (_tmp28_, "video_preview");
2948
_tmp30_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp29_, clutter_texture_get_type ()) ? ((ClutterTexture*) _tmp29_) : NULL);
3244
2949
_g_object_unref0 (self->priv->video_preview);
3245
self->priv->video_preview = _tmp105_;
3246
_tmp106_ = self->priv->clutter_builder;
3247
_tmp107_ = clutter_script_get_object (_tmp106_, "viewport_layout");
3248
_tmp108_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp107_, clutter_actor_get_type ()) ? ((ClutterActor*) _tmp107_) : NULL);
2950
self->priv->video_preview = _tmp30_;
2951
_tmp31_ = self->priv->clutter_builder;
2952
_tmp32_ = clutter_script_get_object (_tmp31_, "viewport_layout");
2953
_tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, clutter_actor_get_type ()) ? ((ClutterActor*) _tmp32_) : NULL);
3249
2954
_g_object_unref0 (self->priv->viewport_layout);
3250
self->priv->viewport_layout = _tmp108_;
3251
_tmp109_ = self->priv->clutter_builder;
3252
_tmp110_ = clutter_script_get_object (_tmp109_, "viewport_layout_manager");
3253
_tmp111_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp110_, clutter_bin_layout_get_type ()) ? ((ClutterBinLayout*) _tmp110_) : NULL);
2955
self->priv->viewport_layout = _tmp33_;
2956
_tmp34_ = self->priv->clutter_builder;
2957
_tmp35_ = clutter_script_get_object (_tmp34_, "viewport_layout_manager");
2958
_tmp36_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp35_, clutter_bin_layout_get_type ()) ? ((ClutterBinLayout*) _tmp35_) : NULL);
3254
2959
_g_object_unref0 (self->priv->viewport_layout_manager);
3255
self->priv->viewport_layout_manager = _tmp111_;
3256
_tmp112_ = self->priv->clutter_builder;
3257
_tmp113_ = clutter_script_get_object (_tmp112_, "countdown_layer");
3258
_tmp114_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp113_, clutter_text_get_type ()) ? ((ClutterText*) _tmp113_) : NULL);
2960
self->priv->viewport_layout_manager = _tmp36_;
2961
_tmp37_ = self->priv->clutter_builder;
2962
_tmp38_ = clutter_script_get_object (_tmp37_, "countdown_layer");
2963
_tmp39_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp38_, clutter_text_get_type ()) ? ((ClutterText*) _tmp38_) : NULL);
3259
2964
_g_object_unref0 (self->priv->countdown_layer);
3260
self->priv->countdown_layer = _tmp114_;
3261
_tmp115_ = self->priv->clutter_builder;
3262
_tmp116_ = clutter_script_get_object (_tmp115_, "background");
3263
_tmp117_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp116_, clutter_actor_get_type ()) ? ((ClutterActor*) _tmp116_) : NULL);
2965
self->priv->countdown_layer = _tmp39_;
2966
_tmp40_ = self->priv->clutter_builder;
2967
_tmp41_ = clutter_script_get_object (_tmp40_, "background");
2968
_tmp42_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, clutter_actor_get_type ()) ? ((ClutterActor*) _tmp41_) : NULL);
3264
2969
_g_object_unref0 (self->priv->background_layer);
3265
self->priv->background_layer = _tmp117_;
3266
_tmp118_ = self->priv->clutter_builder;
3267
_tmp119_ = clutter_script_get_object (_tmp118_, "error_layer");
3268
_tmp120_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp119_, clutter_text_get_type ()) ? ((ClutterText*) _tmp119_) : NULL);
2970
self->priv->background_layer = _tmp42_;
2971
_tmp43_ = self->priv->clutter_builder;
2972
_tmp44_ = clutter_script_get_object (_tmp43_, "error_layer");
2973
_tmp45_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, clutter_text_get_type ()) ? ((ClutterText*) _tmp44_) : NULL);
3269
2974
_g_object_unref0 (self->priv->error_layer);
3270
self->priv->error_layer = _tmp120_;
3271
_tmp121_ = self->priv->clutter_builder;
3272
_tmp122_ = clutter_script_get_object (_tmp121_, "timeout_layer");
3273
_tmp123_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp122_, clutter_text_get_type ()) ? ((ClutterText*) _tmp122_) : NULL);
2975
self->priv->error_layer = _tmp45_;
2976
_tmp46_ = self->priv->clutter_builder;
2977
_tmp47_ = clutter_script_get_object (_tmp46_, "timeout_layer");
2978
_tmp48_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp47_, clutter_text_get_type ()) ? ((ClutterText*) _tmp47_) : NULL);
3274
2979
_g_object_unref0 (self->priv->timeout_layer);
3275
self->priv->timeout_layer = _tmp123_;
3276
_tmp124_ = self->priv->video_preview;
3277
clutter_texture_set_keep_aspect_ratio (_tmp124_, TRUE);
3278
_tmp125_ = self->priv->video_preview;
3279
clutter_actor_set_request_mode ((ClutterActor*) _tmp125_, CLUTTER_REQUEST_HEIGHT_FOR_WIDTH);
3280
_tmp126_ = self->priv->viewport;
3281
_tmp127_ = self->priv->background_layer;
3282
clutter_actor_add_child ((ClutterActor*) _tmp126_, _tmp127_);
3283
_tmp128_ = self->priv->viewport_layout;
3284
_tmp129_ = self->priv->viewport_layout_manager;
3285
clutter_actor_set_layout_manager (_tmp128_, (ClutterLayoutManager*) _tmp129_);
3286
_tmp130_ = self->priv->viewport;
3287
_tmp131_ = self->priv->viewport_layout;
3288
clutter_actor_add_child ((ClutterActor*) _tmp130_, _tmp131_);
3289
_tmp132_ = self->priv->viewport;
3290
_tmp133_ = self->priv->timeout_layer;
3291
clutter_actor_add_child ((ClutterActor*) _tmp132_, (ClutterActor*) _tmp133_);
3292
_tmp134_ = self->priv->viewport;
3293
g_signal_connect_object ((ClutterActor*) _tmp134_, "allocation-changed", (GCallback) _cheese_main_window_on_stage_resize_clutter_actor_allocation_changed, self, 0);
3294
_tmp135_ = cheese_thumb_view_new ();
3295
g_object_ref_sink (_tmp135_);
2980
self->priv->timeout_layer = _tmp48_;
2981
_tmp49_ = self->priv->video_preview;
2982
clutter_texture_set_keep_aspect_ratio (_tmp49_, TRUE);
2983
_tmp50_ = self->priv->video_preview;
2984
clutter_actor_set_request_mode ((ClutterActor*) _tmp50_, CLUTTER_REQUEST_HEIGHT_FOR_WIDTH);
2985
_tmp51_ = self->priv->viewport;
2986
_tmp52_ = self->priv->background_layer;
2987
clutter_actor_add_child ((ClutterActor*) _tmp51_, _tmp52_);
2988
_tmp53_ = self->priv->viewport_layout;
2989
_tmp54_ = self->priv->viewport_layout_manager;
2990
clutter_actor_set_layout_manager (_tmp53_, (ClutterLayoutManager*) _tmp54_);
2991
_tmp55_ = self->priv->viewport;
2992
_tmp56_ = self->priv->viewport_layout;
2993
clutter_actor_add_child ((ClutterActor*) _tmp55_, _tmp56_);
2994
_tmp57_ = self->priv->viewport;
2995
_tmp58_ = self->priv->timeout_layer;
2996
clutter_actor_add_child ((ClutterActor*) _tmp57_, (ClutterActor*) _tmp58_);
2997
_tmp59_ = self->priv->viewport;
2998
g_signal_connect_object ((ClutterActor*) _tmp59_, "allocation-changed", (GCallback) _cheese_main_window_on_stage_resize_clutter_actor_allocation_changed, self, 0);
2999
_tmp60_ = cheese_thumb_view_new ();
3000
g_object_ref_sink (_tmp60_);
3296
3001
_g_object_unref0 (self->priv->thumb_view);
3297
self->priv->thumb_view = _tmp135_;
3298
_tmp136_ = self->priv->thumb_view;
3299
_tmp137_ = eog_thumb_nav_new ((GtkWidget*) _tmp136_, FALSE);
3300
g_object_ref_sink (_tmp137_);
3002
self->priv->thumb_view = _tmp60_;
3003
_tmp61_ = self->priv->thumb_view;
3004
_tmp62_ = eog_thumb_nav_new ((GtkWidget*) _tmp61_, FALSE);
3005
g_object_ref_sink (_tmp62_);
3301
3006
_g_object_unref0 (self->priv->thumb_nav);
3302
self->priv->thumb_nav = _tmp137_;
3303
_tmp138_ = self->priv->thumbnail_popup;
3304
_tmp139_ = self->priv->thumb_view;
3305
gtk_menu_attach_to_widget (_tmp138_, (GtkWidget*) _tmp139_, NULL);
3007
self->priv->thumb_nav = _tmp62_;
3008
_tmp63_ = self->priv->thumbnail_popup;
3009
_tmp64_ = self->priv->thumb_view;
3010
gtk_menu_attach_to_widget (_tmp63_, (GtkWidget*) _tmp64_, NULL);
3307
GtkCssProvider* _tmp140_ = NULL;
3308
gchar* _tmp141_ = NULL;
3309
gchar* _tmp142_ = NULL;
3310
_tmp140_ = gtk_css_provider_new ();
3013
GFile* _tmp65_ = NULL;
3014
GtkCssProvider* _tmp66_ = NULL;
3015
_tmp65_ = g_file_new_for_uri ("resource:///org/gnome/Cheese/cheese.css");
3017
_tmp66_ = gtk_css_provider_new ();
3311
3018
_g_object_unref0 (css);
3313
_tmp141_ = g_build_filename (PACKAGE_DATADIR, "cheese.css", NULL);
3314
_tmp142_ = _tmp141_;
3315
gtk_css_provider_load_from_path (css, _tmp142_, &_inner_error_);
3316
_g_free0 (_tmp142_);
3020
gtk_css_provider_load_from_file (css, file, &_inner_error_);
3317
3021
if (_inner_error_ != NULL) {
3318
goto __catch12_g_error;
3022
_g_object_unref0 (file);
3023
goto __catch9_g_error;
3025
_g_object_unref0 (file);
3324
3030
GError* e = NULL;
3325
FILE* _tmp143_ = NULL;
3326
GError* _tmp144_ = NULL;
3327
const gchar* _tmp145_ = NULL;
3031
const gchar* _tmp67_ = NULL;
3328
3032
e = _inner_error_;
3329
3033
_inner_error_ = NULL;
3332
_tmp145_ = _tmp144_->message;
3333
fprintf (_tmp143_, "Error: %s\n", _tmp145_);
3034
_tmp67_ = e->message;
3035
g_error ("cheese-window.vala:1249: Error parsing CSS: %s\n", _tmp67_);
3334
3036
_g_error_free0 (e);
3337
3039
if (_inner_error_ != NULL) {
3338
3040
_g_object_unref0 (css);
3339
3041
_g_object_unref0 (item);
3414
3111
self->priv->current_mode = _tmp0_;
3415
3112
_tmp1_ = self->priv->current_mode;
3416
3113
cheese_main_window_set_resolution (self, _tmp1_);
3114
cheese_main_window_update_header_bar_title (self);
3417
3115
_tmp2_ = self->priv->timeout_layer;
3418
3116
clutter_actor_hide ((ClutterActor*) _tmp2_);
3419
3117
_tmp3_ = self->priv->current_mode;
3420
3118
switch (_tmp3_) {
3421
3119
case CHEESE_MEDIA_MODE_PHOTO:
3423
GtkLabel* _tmp4_ = NULL;
3121
GtkButton* _tmp4_ = NULL;
3424
3122
const gchar* _tmp5_ = NULL;
3425
gchar* _tmp6_ = NULL;
3426
gchar* _tmp7_ = NULL;
3427
gchar* _tmp8_ = NULL;
3428
gchar* _tmp9_ = NULL;
3123
_tmp4_ = self->priv->take_action_button;
3124
_tmp5_ = _ ("Take a photo using a webcam");
3125
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _tmp5_);
3128
case CHEESE_MEDIA_MODE_VIDEO:
3130
GtkButton* _tmp6_ = NULL;
3131
const gchar* _tmp7_ = NULL;
3132
ClutterText* _tmp8_ = NULL;
3133
ClutterText* _tmp9_ = NULL;
3134
_tmp6_ = self->priv->take_action_button;
3135
_tmp7_ = _ ("Record a video using a webcam");
3136
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _tmp7_);
3137
_tmp8_ = self->priv->timeout_layer;
3138
clutter_text_set_text (_tmp8_, "00:00:00");
3139
_tmp9_ = self->priv->timeout_layer;
3140
clutter_actor_show ((ClutterActor*) _tmp9_);
3143
case CHEESE_MEDIA_MODE_BURST:
3429
3145
GtkButton* _tmp10_ = NULL;
3430
3146
const gchar* _tmp11_ = NULL;
3431
_tmp4_ = self->priv->take_action_button_label;
3432
_tmp5_ = _ ("_Take a Photo");
3433
_tmp6_ = g_strconcat ("<b>", _tmp5_, NULL);
3435
_tmp8_ = g_strconcat (_tmp7_, "</b>", NULL);
3437
gtk_label_set_label (_tmp4_, _tmp9_);
3440
3147
_tmp10_ = self->priv->take_action_button;
3441
_tmp11_ = _ ("Take a photo using a webcam");
3148
_tmp11_ = _ ("Take multiple photos using a webcam");
3442
3149
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp10_, _tmp11_);
3445
case CHEESE_MEDIA_MODE_VIDEO:
3447
GtkLabel* _tmp12_ = NULL;
3448
const gchar* _tmp13_ = NULL;
3449
gchar* _tmp14_ = NULL;
3450
gchar* _tmp15_ = NULL;
3451
gchar* _tmp16_ = NULL;
3452
gchar* _tmp17_ = NULL;
3453
GtkButton* _tmp18_ = NULL;
3454
const gchar* _tmp19_ = NULL;
3455
ClutterText* _tmp20_ = NULL;
3456
ClutterText* _tmp21_ = NULL;
3457
_tmp12_ = self->priv->take_action_button_label;
3458
_tmp13_ = _ ("_Record a Video");
3459
_tmp14_ = g_strconcat ("<b>", _tmp13_, NULL);
3461
_tmp16_ = g_strconcat (_tmp15_, "</b>", NULL);
3463
gtk_label_set_label (_tmp12_, _tmp17_);
3466
_tmp18_ = self->priv->take_action_button;
3467
_tmp19_ = _ ("Record a video using a webcam");
3468
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp18_, _tmp19_);
3469
_tmp20_ = self->priv->timeout_layer;
3470
clutter_text_set_text (_tmp20_, "00:00:00");
3471
_tmp21_ = self->priv->timeout_layer;
3472
clutter_actor_show ((ClutterActor*) _tmp21_);
3475
case CHEESE_MEDIA_MODE_BURST:
3477
GtkLabel* _tmp22_ = NULL;
3478
const gchar* _tmp23_ = NULL;
3479
gchar* _tmp24_ = NULL;
3480
gchar* _tmp25_ = NULL;
3481
gchar* _tmp26_ = NULL;
3482
gchar* _tmp27_ = NULL;
3483
GtkButton* _tmp28_ = NULL;
3484
const gchar* _tmp29_ = NULL;
3485
_tmp22_ = self->priv->take_action_button_label;
3486
_tmp23_ = _ ("Take _Multiple Photos");
3487
_tmp24_ = g_strconcat ("<b>", _tmp23_, NULL);
3489
_tmp26_ = g_strconcat (_tmp25_, "</b>", NULL);
3491
gtk_label_set_label (_tmp22_, _tmp27_);
3494
_tmp28_ = self->priv->take_action_button;
3495
_tmp29_ = _ ("Take multiple photos using a webcam");
3496
gtk_widget_set_tooltip_text ((GtkWidget*) _tmp28_, _tmp29_);
3522
3226
static void cheese_main_window_class_init (CheeseMainWindowClass * klass) {
3227
gint CheeseMainWindow_private_offset;
3523
3228
cheese_main_window_parent_class = g_type_class_peek_parent (klass);
3524
3229
g_type_class_add_private (klass, sizeof (CheeseMainWindowPrivate));
3525
3230
G_OBJECT_CLASS (klass)->finalize = cheese_main_window_finalize;
3231
CheeseMainWindow_private_offset = g_type_class_get_instance_private_offset (klass);
3232
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Cheese/cheese-main-window.ui");
3233
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header_bar", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, header_bar));
3234
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "viewport_widget", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, viewport_widget));
3235
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_vbox", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, main_vbox));
3236
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "thumbnails_right", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, thumbnails_right));
3237
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "thumbnails_bottom", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, thumbnails_bottom));
3238
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "leave_fullscreen_button_box", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, leave_fullscreen_button_box));
3239
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "take_action_button", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, take_action_button));
3240
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "take_action_button_image", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, take_action_button_image));
3241
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "effects_toggle_button", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, effects_toggle_button));
3242
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "effects_prev_page_button_image", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, effects_prev_page_button_image));
3243
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "effects_next_page_button_image", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, effects_next_page_button_image));
3244
gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "buttons_area", FALSE, CheeseMainWindow_private_offset + G_STRUCT_OFFSET (CheeseMainWindowPrivate, buttons_area));
3529
3248
static void cheese_main_window_instance_init (CheeseMainWindow * self) {
3530
3249
self->priv = CHEESE_MAIN_WINDOW_GET_PRIVATE (self);
3531
3250
self->priv->current_effects_page = (guint) 0;
3251
gtk_widget_init_template (GTK_WIDGET (self));
3535
3255
static void cheese_main_window_finalize (GObject* obj) {
3536
3256
CheeseMainWindow * self;
3537
3257
self = G_TYPE_CHECK_INSTANCE_CAST (obj, CHEESE_TYPE_MAIN_WINDOW, CheeseMainWindow);
3538
_g_object_unref0 (self->priv->gtk_builder);
3539
3258
_g_object_unref0 (self->priv->clutter_builder);
3259
_g_object_unref0 (self->priv->header_bar);
3540
3260
_g_object_unref0 (self->priv->settings);
3541
_g_object_unref0 (self->priv->thumbnails);
3542
3261
_g_object_unref0 (self->priv->viewport_widget);
3543
3262
_g_object_unref0 (self->priv->main_vbox);
3544
3263
_g_object_unref0 (self->priv->thumb_nav);
3545
3264
_g_object_unref0 (self->priv->thumb_view);
3546
3265
_g_object_unref0 (self->priv->thumbnails_right);
3547
3266
_g_object_unref0 (self->priv->thumbnails_bottom);
3548
_g_object_unref0 (self->priv->leave_fullscreen_button_container);
3549
_g_object_unref0 (self->priv->photo_toggle_button);
3550
_g_object_unref0 (self->priv->video_toggle_button);
3551
_g_object_unref0 (self->priv->burst_toggle_button);
3267
_g_object_unref0 (self->priv->leave_fullscreen_button_box);
3552
3268
_g_object_unref0 (self->priv->take_action_button);
3553
_g_object_unref0 (self->priv->take_action_button_label);
3554
3269
_g_object_unref0 (self->priv->take_action_button_image);
3555
3270
_g_object_unref0 (self->priv->effects_toggle_button);
3556
_g_object_unref0 (self->priv->leave_fullscreen_button);
3271
_g_object_unref0 (self->priv->effects_prev_page_button_image);
3272
_g_object_unref0 (self->priv->effects_next_page_button_image);
3557
3273
_g_object_unref0 (self->priv->buttons_area);
3558
3274
_g_object_unref0 (self->priv->thumbnail_popup);
3559
3275
_g_object_unref0 (self->priv->viewport);