1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
|
/* ImportQueuePage.c generated by valac 0.34.2, the Vala compiler
* generated from ImportQueuePage.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <pango/pango.h>
#define TYPE_PAGE (page_get_type ())
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
typedef struct _Page Page;
typedef struct _PageClass PageClass;
typedef struct _PagePrivate PagePrivate;
#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))
typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;
#define TYPE_FULLSCREEN_WINDOW (fullscreen_window_get_type ())
#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow))
#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))
#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW))
#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW))
#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))
typedef struct _FullscreenWindow FullscreenWindow;
typedef struct _FullscreenWindowClass FullscreenWindowClass;
#define TYPE_INJECTION_GROUP (injection_group_get_type ())
#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup))
#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass))
#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP))
#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP))
#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass))
typedef struct _InjectionGroup InjectionGroup;
typedef struct _InjectionGroupClass InjectionGroupClass;
#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ())
#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage))
#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))
#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE))
#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE))
#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))
typedef struct _SinglePhotoPage SinglePhotoPage;
typedef struct _SinglePhotoPageClass SinglePhotoPageClass;
typedef struct _SinglePhotoPagePrivate SinglePhotoPagePrivate;
#define TYPE_ZOOM_BUFFER (zoom_buffer_get_type ())
#define ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZOOM_BUFFER, ZoomBuffer))
#define ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZOOM_BUFFER, ZoomBufferClass))
#define IS_ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZOOM_BUFFER))
#define IS_ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZOOM_BUFFER))
#define ZOOM_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZOOM_BUFFER, ZoomBufferClass))
typedef struct _ZoomBuffer ZoomBuffer;
typedef struct _ZoomBufferClass ZoomBufferClass;
#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;
#define SINGLE_PHOTO_PAGE_TYPE_UPDATE_REASON (single_photo_page_update_reason_get_type ())
#define TYPE_IMPORT_QUEUE_PAGE (import_queue_page_get_type ())
#define IMPORT_QUEUE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_QUEUE_PAGE, ImportQueuePage))
#define IMPORT_QUEUE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_QUEUE_PAGE, ImportQueuePageClass))
#define IS_IMPORT_QUEUE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_QUEUE_PAGE))
#define IS_IMPORT_QUEUE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_QUEUE_PAGE))
#define IMPORT_QUEUE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_QUEUE_PAGE, ImportQueuePageClass))
typedef struct _ImportQueuePage ImportQueuePage;
typedef struct _ImportQueuePageClass ImportQueuePageClass;
typedef struct _ImportQueuePagePrivate ImportQueuePagePrivate;
#define TYPE_BATCH_IMPORT (batch_import_get_type ())
#define BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT, BatchImport))
#define BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT, BatchImportClass))
#define IS_BATCH_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT))
#define IS_BATCH_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT))
#define BATCH_IMPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT, BatchImportClass))
typedef struct _BatchImport BatchImport;
typedef struct _BatchImportClass BatchImportClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))
typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;
#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))
typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;
#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;
#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))
typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;
#define TYPE_IMPORT_MANIFEST (import_manifest_get_type ())
#define IMPORT_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_MANIFEST, ImportManifest))
#define IMPORT_MANIFEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_MANIFEST, ImportManifestClass))
#define IS_IMPORT_MANIFEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_MANIFEST))
#define IS_IMPORT_MANIFEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_MANIFEST))
#define IMPORT_MANIFEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_MANIFEST, ImportManifestClass))
typedef struct _ImportManifest ImportManifest;
typedef struct _ImportManifestClass ImportManifestClass;
#define TYPE_BATCH_IMPORT_ROLL (batch_import_roll_get_type ())
#define BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRoll))
#define BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))
#define IS_BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_ROLL))
#define IS_BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_ROLL))
#define BATCH_IMPORT_ROLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))
typedef struct _BatchImportRoll BatchImportRoll;
typedef struct _BatchImportRollClass BatchImportRollClass;
#define TYPE_IMPORT_RESULT (import_result_get_type ())
#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))
typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;
#define TYPE_DIRECTION (direction_get_type ())
#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))
typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;
#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))
typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))
typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;
#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))
typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;
#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;
#define TYPE_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))
typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;
#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ())
#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView))
#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW))
#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW))
#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
typedef struct _ThumbnailView ThumbnailView;
typedef struct _ThumbnailViewClass ThumbnailViewClass;
#define TYPE_PHOTO_VIEW (photo_view_get_type ())
#define PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_VIEW, PhotoView))
#define PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_VIEW, PhotoViewClass))
#define IS_PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_VIEW))
#define IS_PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_VIEW))
#define PHOTO_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_VIEW, PhotoViewClass))
typedef struct _PhotoView PhotoView;
typedef struct _PhotoViewClass PhotoViewClass;
#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))
typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;
#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))
typedef struct _Video Video;
typedef struct _VideoClass VideoClass;
#define TYPE_VIDEO_VIEW (video_view_get_type ())
#define VIDEO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_VIEW, VideoView))
#define VIDEO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_VIEW, VideoViewClass))
#define IS_VIDEO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_VIEW))
#define IS_VIDEO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_VIEW))
#define VIDEO_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_VIEW, VideoViewClass))
typedef struct _VideoView VideoView;
typedef struct _VideoViewClass VideoViewClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _Page {
GtkScrolledWindow parent_instance;
PagePrivate * priv;
GtkUIManager* ui;
GtkToolbar* toolbar;
gboolean in_view;
};
struct _PageClass {
GtkScrolledWindowClass parent_class;
void (*set_page_name) (Page* self, const gchar* page_name);
void (*set_container) (Page* self, GtkWindow* container);
void (*clear_container) (Page* self);
GtkMenuBar* (*get_menubar) (Page* self);
GtkWidget* (*get_page_ui_widget) (Page* self, const gchar* path);
GtkToolbar* (*get_toolbar) (Page* self);
GtkMenu* (*get_page_context_menu) (Page* self);
void (*switching_from) (Page* self);
void (*switched_to) (Page* self);
void (*ready) (Page* self);
void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw);
void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw);
void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames);
GtkActionEntry* (*init_collect_action_entries) (Page* self, int* result_length1);
GtkToggleActionEntry* (*init_collect_toggle_action_entries) (Page* self, int* result_length1);
void (*register_radio_actions) (Page* self, GtkActionGroup* action_group);
InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1);
void (*init_actions) (Page* self, gint selected_count, gint count);
void (*update_actions) (Page* self, gint selected_count, gint count);
gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result);
gboolean (*on_left_click) (Page* self, GdkEventButton* event);
gboolean (*on_middle_click) (Page* self, GdkEventButton* event);
gboolean (*on_right_click) (Page* self, GdkEventButton* event);
gboolean (*on_left_released) (Page* self, GdkEventButton* event);
gboolean (*on_middle_released) (Page* self, GdkEventButton* event);
gboolean (*on_right_released) (Page* self, GdkEventButton* event);
gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event);
gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event);
gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event);
gboolean (*on_alt_released) (Page* self, GdkEventKey* event);
gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event);
gboolean (*on_shift_released) (Page* self, GdkEventKey* event);
gboolean (*on_super_pressed) (Page* self, GdkEventKey* event);
gboolean (*on_super_released) (Page* self, GdkEventKey* event);
gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event);
gboolean (*on_app_key_released) (Page* self, GdkEventKey* event);
void (*on_move) (Page* self, GdkRectangle* rect);
void (*on_move_start) (Page* self, GdkRectangle* rect);
void (*on_move_finished) (Page* self, GdkRectangle* rect);
void (*on_resize) (Page* self, GdkRectangle* rect);
void (*on_resize_start) (Page* self, GdkRectangle* rect);
void (*on_resize_finished) (Page* self, GdkRectangle* rect);
gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect);
gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask);
gboolean (*on_leave_notify_event) (Page* self);
gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event);
gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event);
gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event);
gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event);
gboolean (*on_context_keypress) (Page* self);
gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event);
gboolean (*on_context_invoked) (Page* self);
void (*set_page_cursor) (Page* self, GdkCursorType cursor_type);
};
struct _Dimensions {
gint width;
gint height;
};
typedef enum {
SINGLE_PHOTO_PAGE_UPDATE_REASON_NEW_PIXBUF,
SINGLE_PHOTO_PAGE_UPDATE_REASON_QUALITY_IMPROVEMENT,
SINGLE_PHOTO_PAGE_UPDATE_REASON_RESIZED_CANVAS
} SinglePhotoPageUpdateReason;
struct _SinglePhotoPage {
Page parent_instance;
SinglePhotoPagePrivate * priv;
GtkDrawingArea* canvas;
GtkViewport* viewport;
};
struct _SinglePhotoPageClass {
PageClass parent_class;
gboolean (*is_zoom_supported) (SinglePhotoPage* self);
void (*cancel_zoom) (SinglePhotoPage* self);
void (*save_zoom_state) (SinglePhotoPage* self);
void (*restore_zoom_state) (SinglePhotoPage* self);
ZoomBuffer* (*get_zoom_buffer) (SinglePhotoPage* self);
void (*new_surface) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim);
void (*updated_pixbuf) (SinglePhotoPage* self, GdkPixbuf* pixbuf, SinglePhotoPageUpdateReason reason, Dimensions* old_dim);
void (*paint) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim);
void (*on_previous_photo) (SinglePhotoPage* self);
void (*on_next_photo) (SinglePhotoPage* self);
};
struct _ImportQueuePage {
SinglePhotoPage parent_instance;
ImportQueuePagePrivate * priv;
};
struct _ImportQueuePageClass {
SinglePhotoPageClass parent_class;
};
struct _ImportQueuePagePrivate {
GeeArrayList* queue;
GeeHashSet* cancel_unallowed;
BatchImport* current_batch;
GtkProgressBar* progress_bar;
gboolean stopped;
};
typedef enum {
IMPORT_RESULT_SUCCESS,
IMPORT_RESULT_FILE_ERROR,
IMPORT_RESULT_DECODE_ERROR,
IMPORT_RESULT_DATABASE_ERROR,
IMPORT_RESULT_USER_ABORT,
IMPORT_RESULT_NOT_A_FILE,
IMPORT_RESULT_PHOTO_EXISTS,
IMPORT_RESULT_UNSUPPORTED_FORMAT,
IMPORT_RESULT_NOT_AN_IMAGE,
IMPORT_RESULT_DISK_FAILURE,
IMPORT_RESULT_DISK_FULL,
IMPORT_RESULT_CAMERA_ERROR,
IMPORT_RESULT_FILE_WRITE_ERROR,
IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE
} ImportResult;
typedef enum {
DIRECTION_FORWARD,
DIRECTION_BACKWARD
} Direction;
static gpointer import_queue_page_parent_class = NULL;
GType page_get_type (void) G_GNUC_CONST;
GType page_window_get_type (void) G_GNUC_CONST;
GType fullscreen_window_get_type (void) G_GNUC_CONST;
gpointer injection_group_ref (gpointer instance);
void injection_group_unref (gpointer instance);
GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_injection_group (GValue* value, gpointer v_object);
void value_take_injection_group (GValue* value, gpointer v_object);
gpointer value_get_injection_group (const GValue* value);
GType injection_group_get_type (void) G_GNUC_CONST;
GType single_photo_page_get_type (void) G_GNUC_CONST;
GType zoom_buffer_get_type (void) G_GNUC_CONST;
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
GType single_photo_page_update_reason_get_type (void) G_GNUC_CONST;
GType import_queue_page_get_type (void) G_GNUC_CONST;
GType batch_import_get_type (void) G_GNUC_CONST;
#define IMPORT_QUEUE_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IMPORT_QUEUE_PAGE, ImportQueuePagePrivate))
enum {
IMPORT_QUEUE_PAGE_DUMMY_PROPERTY
};
#define IMPORT_QUEUE_PAGE_NAME _ ("Importing…")
ImportQueuePage* import_queue_page_new (void);
ImportQueuePage* import_queue_page_construct (GType object_type);
SinglePhotoPage* single_photo_page_construct (GType object_type, const gchar* page_name, gboolean scale_up_to_viewport);
GtkToolbar* page_get_toolbar (Page* self);
GtkAction* page_get_action (Page* self, const gchar* name);
static void import_queue_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames);
void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames);
static GtkActionEntry* import_queue_page_real_init_collect_action_entries (Page* base, int* result_length1);
GtkActionEntry* page_init_collect_action_entries (Page* self, int* result_length1);
#define RESOURCES_STOP_LABEL _ ("_Stop")
#define TRANSLATABLE "translatable"
static void import_queue_page_on_stop (ImportQueuePage* self);
static void _import_queue_page_on_stop_gtk_action_callback (GtkAction* action, gpointer self);
static void _vala_array_add87 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value);
void import_queue_page_enqueue_and_schedule (ImportQueuePage* self, BatchImport* batch_import, gboolean allow_user_cancel);
static void import_queue_page_on_starting (ImportQueuePage* self, BatchImport* batch_import);
static void _import_queue_page_on_starting_batch_import_starting (BatchImport* _sender, gpointer self);
static void import_queue_page_on_preparing (ImportQueuePage* self);
static void _import_queue_page_on_preparing_batch_import_preparing (BatchImport* _sender, gpointer self);
static void import_queue_page_on_progress (ImportQueuePage* self, guint64 completed_bytes, guint64 total_bytes);
static void _import_queue_page_on_progress_batch_import_progress (BatchImport* _sender, guint64 completed_bytes, guint64 total_bytes, gpointer self);
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
static void import_queue_page_on_imported (ImportQueuePage* self, ThumbnailSource* source, GdkPixbuf* pixbuf, gint to_follow);
GType media_source_get_type (void) G_GNUC_CONST;
static void _import_queue_page_on_imported_batch_import_imported (BatchImport* _sender, MediaSource* source, GdkPixbuf* pixbuf, gint to_follow, gpointer self);
gpointer import_manifest_ref (gpointer instance);
void import_manifest_unref (gpointer instance);
GParamSpec* param_spec_import_manifest (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_import_manifest (GValue* value, gpointer v_object);
void value_take_import_manifest (GValue* value, gpointer v_object);
gpointer value_get_import_manifest (const GValue* value);
GType import_manifest_get_type (void) G_GNUC_CONST;
gpointer batch_import_roll_ref (gpointer instance);
void batch_import_roll_unref (gpointer instance);
GParamSpec* param_spec_batch_import_roll (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_batch_import_roll (GValue* value, gpointer v_object);
void value_take_batch_import_roll (GValue* value, gpointer v_object);
gpointer value_get_batch_import_roll (const GValue* value);
GType batch_import_roll_get_type (void) G_GNUC_CONST;
static void import_queue_page_on_import_complete (ImportQueuePage* self, BatchImport* batch_import, ImportManifest* manifest, BatchImportRoll* import_roll);
static void _import_queue_page_on_import_complete_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self);
GType import_result_get_type (void) G_GNUC_CONST;
static void import_queue_page_on_fatal_error (ImportQueuePage* self, ImportResult _result_, const gchar* message);
static void _import_queue_page_on_fatal_error_batch_import_fatal_error (BatchImport* _sender, ImportResult _result_, const gchar* message, gpointer self);
void batch_import_schedule (BatchImport* self);
static void import_queue_page_update_stop_action (ImportQueuePage* self);
gint import_queue_page_get_batch_count (ImportQueuePage* self);
void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive);
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
void page_window_set_busy_cursor (PageWindow* self);
void batch_import_user_halt (BatchImport* self);
gboolean page_is_in_view (Page* self);
GType direction_get_type (void) G_GNUC_CONST;
void single_photo_page_set_pixbuf (SinglePhotoPage* self, GdkPixbuf* unscaled, Dimensions* max_dim, Direction* direction);
void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result);
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType view_collection_get_type (void) G_GNUC_CONST;
ViewCollection* page_get_view (Page* self);
void data_collection_clear (DataCollection* self);
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
gboolean data_collection_add (DataCollection* self, DataObject* object);
PhotoView* photo_view_new (PhotoSource* source);
PhotoView* photo_view_construct (GType object_type, PhotoSource* source);
GType data_view_get_type (void) G_GNUC_CONST;
GType thumbnail_view_get_type (void) G_GNUC_CONST;
GType photo_view_get_type (void) G_GNUC_CONST;
GType video_source_get_type (void) G_GNUC_CONST;
GType video_get_type (void) G_GNUC_CONST;
VideoView* video_view_new (VideoSource* source);
VideoView* video_view_construct (GType object_type, VideoSource* source);
GType video_view_get_type (void) G_GNUC_CONST;
gchar* data_object_get_name (DataObject* self);
void single_photo_page_blank_display (SinglePhotoPage* self);
void page_window_set_normal_cursor (PageWindow* self);
void app_window_error_message (const gchar* message, GtkWindow* parent);
static void import_queue_page_finalize (GObject* obj);
ImportQueuePage* import_queue_page_construct (GType object_type) {
ImportQueuePage * self = NULL;
GtkToolbar* toolbar = NULL;
GtkToolbar* _tmp0_ = NULL;
GtkToolButton* stop_button = NULL;
GtkToolButton* _tmp1_ = NULL;
GtkAction* _tmp2_ = NULL;
GtkAction* _tmp3_ = NULL;
GtkSeparatorToolItem* separator = NULL;
GtkSeparatorToolItem* _tmp4_ = NULL;
GtkToolItem* progress_item = NULL;
GtkToolItem* _tmp5_ = NULL;
GtkProgressBar* _tmp6_ = NULL;
GtkProgressBar* _tmp7_ = NULL;
#line 25 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self = (ImportQueuePage*) single_photo_page_construct (object_type, IMPORT_QUEUE_PAGE_NAME, FALSE);
#line 28 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = page_get_toolbar (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 28 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
toolbar = _tmp0_;
#line 31 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = (GtkToolButton*) gtk_tool_button_new (NULL, NULL);
#line 31 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_object_ref_sink (_tmp1_);
#line 31 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
stop_button = _tmp1_;
#line 32 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_tool_button_set_icon_name (stop_button, "stop");
#line 33 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = page_get_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Stop");
#line 33 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = _tmp2_;
#line 33 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_activatable_set_related_action (G_TYPE_CHECK_INSTANCE_CAST (stop_button, GTK_TYPE_ACTIVATABLE, GtkActivatable), _tmp3_);
#line 33 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp3_);
#line 35 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (stop_button, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 38 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = (GtkSeparatorToolItem*) gtk_separator_tool_item_new ();
#line 38 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_object_ref_sink (_tmp4_);
#line 38 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
separator = _tmp4_;
#line 39 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_separator_tool_item_set_draw (separator, FALSE);
#line 41 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_toolbar_insert (toolbar, G_TYPE_CHECK_INSTANCE_CAST (separator, gtk_tool_item_get_type (), GtkToolItem), -1);
#line 44 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = gtk_tool_item_new ();
#line 44 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_object_ref_sink (_tmp5_);
#line 44 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
progress_item = _tmp5_;
#line 45 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_tool_item_set_expand (progress_item, TRUE);
#line 46 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = self->priv->progress_bar;
#line 46 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (progress_item, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
#line 47 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = self->priv->progress_bar;
#line 47 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_show_text (_tmp7_, TRUE);
#line 49 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_toolbar_insert (toolbar, progress_item, -1);
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (progress_item);
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (separator);
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (stop_button);
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (toolbar);
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return self;
#line 632 "ImportQueuePage.c"
}
ImportQueuePage* import_queue_page_new (void) {
#line 24 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return import_queue_page_construct (TYPE_IMPORT_QUEUE_PAGE);
#line 639 "ImportQueuePage.c"
}
static void import_queue_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) {
ImportQueuePage * self;
GeeList* _tmp0_ = NULL;
GeeList* _tmp1_ = NULL;
#line 56 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_QUEUE_PAGE, ImportQueuePage);
#line 56 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (GEE_IS_LIST (ui_filenames));
#line 57 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = ui_filenames;
#line 57 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), "import_queue.ui");
#line 59 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = ui_filenames;
#line 59 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
PAGE_CLASS (import_queue_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), _tmp1_);
#line 659 "ImportQueuePage.c"
}
static void _import_queue_page_on_stop_gtk_action_callback (GtkAction* action, gpointer self) {
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_stop ((ImportQueuePage*) self);
#line 666 "ImportQueuePage.c"
}
static void _vala_array_add87 (GtkActionEntry** array, int* length, int* size, const GtkActionEntry* value) {
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if ((*length) == (*size)) {
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
*size = (*size) ? (2 * (*size)) : 4;
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
*array = g_renew (GtkActionEntry, *array, *size);
#line 677 "ImportQueuePage.c"
}
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
(*array)[(*length)++] = *value;
#line 681 "ImportQueuePage.c"
}
static GtkActionEntry* import_queue_page_real_init_collect_action_entries (Page* base, int* result_length1) {
ImportQueuePage * self;
GtkActionEntry* result = NULL;
GtkActionEntry* actions = NULL;
gint _tmp0_ = 0;
GtkActionEntry* _tmp1_ = NULL;
gint actions_length1 = 0;
gint _actions_size_ = 0;
GtkActionEntry stop = {0};
GtkActionEntry _tmp2_ = {0};
const gchar* _tmp3_ = NULL;
const gchar* _tmp4_ = NULL;
GtkActionEntry* _tmp5_ = NULL;
gint _tmp5__length1 = 0;
GtkActionEntry _tmp6_ = {0};
GtkActionEntry* _tmp7_ = NULL;
gint _tmp7__length1 = 0;
#line 62 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_IMPORT_QUEUE_PAGE, ImportQueuePage);
#line 63 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = PAGE_CLASS (import_queue_page_parent_class)->init_collect_action_entries (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), TYPE_PAGE, Page), &_tmp0_);
#line 63 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
actions = _tmp1_;
#line 63 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
actions_length1 = _tmp0_;
#line 63 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_actions_size_ = actions_length1;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.name = "Stop";
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.stock_id = RESOURCES_STOP_LABEL;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.label = TRANSLATABLE;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.accelerator = NULL;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.tooltip = TRANSLATABLE;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_.callback = (GCallback) _import_queue_page_on_stop_gtk_action_callback;
#line 65 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
stop = _tmp2_;
#line 67 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = _ ("_Stop Import");
#line 67 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
stop.label = _tmp3_;
#line 68 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = _ ("Stop importing photos");
#line 68 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
stop.tooltip = _tmp4_;
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = actions;
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5__length1 = actions_length1;
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = stop;
#line 69 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_array_add87 (&actions, &actions_length1, &_actions_size_, &_tmp6_);
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = actions;
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7__length1 = actions_length1;
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (result_length1) {
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
*result_length1 = _tmp7__length1;
#line 750 "ImportQueuePage.c"
}
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
result = _tmp7_;
#line 71 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return result;
#line 756 "ImportQueuePage.c"
}
static void _import_queue_page_on_starting_batch_import_starting (BatchImport* _sender, gpointer self) {
#line 77 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_starting ((ImportQueuePage*) self, _sender);
#line 763 "ImportQueuePage.c"
}
static void _import_queue_page_on_preparing_batch_import_preparing (BatchImport* _sender, gpointer self) {
#line 78 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_preparing ((ImportQueuePage*) self);
#line 770 "ImportQueuePage.c"
}
static void _import_queue_page_on_progress_batch_import_progress (BatchImport* _sender, guint64 completed_bytes, guint64 total_bytes, gpointer self) {
#line 79 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_progress ((ImportQueuePage*) self, completed_bytes, total_bytes);
#line 777 "ImportQueuePage.c"
}
static void _import_queue_page_on_imported_batch_import_imported (BatchImport* _sender, MediaSource* source, GdkPixbuf* pixbuf, gint to_follow, gpointer self) {
#line 80 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_imported ((ImportQueuePage*) self, source, pixbuf, to_follow);
#line 784 "ImportQueuePage.c"
}
static void _import_queue_page_on_import_complete_batch_import_import_complete (BatchImport* _sender, ImportManifest* manifest, BatchImportRoll* import_roll, gpointer self) {
#line 81 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_import_complete ((ImportQueuePage*) self, _sender, manifest, import_roll);
#line 791 "ImportQueuePage.c"
}
static void _import_queue_page_on_fatal_error_batch_import_fatal_error (BatchImport* _sender, ImportResult _result_, const gchar* message, gpointer self) {
#line 82 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_on_fatal_error ((ImportQueuePage*) self, _result_, message);
#line 798 "ImportQueuePage.c"
}
void import_queue_page_enqueue_and_schedule (ImportQueuePage* self, BatchImport* batch_import, gboolean allow_user_cancel) {
GeeArrayList* _tmp0_ = NULL;
BatchImport* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
BatchImport* _tmp3_ = NULL;
BatchImport* _tmp4_ = NULL;
BatchImport* _tmp5_ = NULL;
BatchImport* _tmp6_ = NULL;
BatchImport* _tmp7_ = NULL;
BatchImport* _tmp8_ = NULL;
gboolean _tmp9_ = FALSE;
GeeArrayList* _tmp12_ = NULL;
BatchImport* _tmp13_ = NULL;
BatchImport* _tmp14_ = NULL;
GeeArrayList* _tmp15_ = NULL;
gint _tmp16_ = 0;
gint _tmp17_ = 0;
#line 74 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 74 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_BATCH_IMPORT (batch_import));
#line 75 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = self->priv->queue;
#line 75 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = batch_import;
#line 75 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp1_);
#line 75 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_assert (!_tmp2_, "!queue.contains(batch_import)");
#line 77 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = batch_import;
#line 77 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp3_, "starting", (GCallback) _import_queue_page_on_starting_batch_import_starting, self, 0);
#line 78 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = batch_import;
#line 78 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp4_, "preparing", (GCallback) _import_queue_page_on_preparing_batch_import_preparing, self, 0);
#line 79 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = batch_import;
#line 79 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp5_, "progress", (GCallback) _import_queue_page_on_progress_batch_import_progress, self, 0);
#line 80 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = batch_import;
#line 80 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp6_, "imported", (GCallback) _import_queue_page_on_imported_batch_import_imported, self, 0);
#line 81 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = batch_import;
#line 81 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp7_, "import-complete", (GCallback) _import_queue_page_on_import_complete_batch_import_import_complete, self, 0);
#line 82 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp8_ = batch_import;
#line 82 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_connect_object (_tmp8_, "fatal-error", (GCallback) _import_queue_page_on_fatal_error_batch_import_fatal_error, self, 0);
#line 84 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp9_ = allow_user_cancel;
#line 84 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (!_tmp9_) {
#line 859 "ImportQueuePage.c"
GeeHashSet* _tmp10_ = NULL;
BatchImport* _tmp11_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp10_ = self->priv->cancel_unallowed;
#line 85 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp11_ = batch_import;
#line 85 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp11_);
#line 868 "ImportQueuePage.c"
}
#line 87 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp12_ = self->priv->queue;
#line 87 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp13_ = batch_import;
#line 87 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp13_);
#line 88 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp14_ = batch_import;
#line 88 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_emit_by_name (self, "batch-added", _tmp14_);
#line 90 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp15_ = self->priv->queue;
#line 90 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp16_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection));
#line 90 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp17_ = _tmp16_;
#line 90 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp17_ == 1) {
#line 888 "ImportQueuePage.c"
BatchImport* _tmp18_ = NULL;
#line 91 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp18_ = batch_import;
#line 91 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
batch_import_schedule (_tmp18_);
#line 894 "ImportQueuePage.c"
}
#line 93 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_update_stop_action (self);
#line 898 "ImportQueuePage.c"
}
gint import_queue_page_get_batch_count (ImportQueuePage* self) {
gint result = 0;
GeeArrayList* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
#line 96 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_val_if_fail (IS_IMPORT_QUEUE_PAGE (self), 0);
#line 97 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = self->priv->queue;
#line 97 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection));
#line 97 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = _tmp1_;
#line 97 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
result = _tmp2_;
#line 97 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return result;
#line 919 "ImportQueuePage.c"
}
static void import_queue_page_update_stop_action (ImportQueuePage* self) {
gboolean _tmp0_ = FALSE;
GeeHashSet* _tmp1_ = NULL;
BatchImport* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
#line 100 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = self->priv->cancel_unallowed;
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = self->priv->current_batch;
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp2_);
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (!_tmp3_) {
#line 938 "ImportQueuePage.c"
GeeArrayList* _tmp4_ = NULL;
gint _tmp5_ = 0;
gint _tmp6_ = 0;
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = self->priv->queue;
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = _tmp5_;
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = _tmp6_ > 0;
#line 950 "ImportQueuePage.c"
} else {
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = FALSE;
#line 954 "ImportQueuePage.c"
}
#line 101 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Stop", _tmp0_);
#line 958 "ImportQueuePage.c"
}
static gpointer _g_object_ref0 (gpointer self) {
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return self ? g_object_ref (self) : NULL;
#line 965 "ImportQueuePage.c"
}
static void import_queue_page_on_stop (ImportQueuePage* self) {
GeeArrayList* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
AppWindow* _tmp3_ = NULL;
AppWindow* _tmp4_ = NULL;
#line 104 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 105 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_update_stop_action (self);
#line 107 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = self->priv->queue;
#line 107 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection));
#line 107 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = _tmp1_;
#line 107 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp2_ == 0) {
#line 108 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return;
#line 989 "ImportQueuePage.c"
}
#line 110 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = app_window_get_instance ();
#line 110 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = _tmp3_;
#line 110 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_PAGE_WINDOW, PageWindow));
#line 110 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp4_);
#line 111 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->stopped = TRUE;
#line 1001 "ImportQueuePage.c"
{
GeeArrayList* _batch_import_list = NULL;
GeeArrayList* _tmp5_ = NULL;
GeeArrayList* _tmp6_ = NULL;
gint _batch_import_size = 0;
GeeArrayList* _tmp7_ = NULL;
gint _tmp8_ = 0;
gint _tmp9_ = 0;
gint _batch_import_index = 0;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = self->priv->queue;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = _g_object_ref0 (_tmp5_);
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_batch_import_list = _tmp6_;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = _batch_import_list;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp8_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection));
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp9_ = _tmp8_;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_batch_import_size = _tmp9_;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_batch_import_index = -1;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
while (TRUE) {
#line 1029 "ImportQueuePage.c"
gint _tmp10_ = 0;
gint _tmp11_ = 0;
gint _tmp12_ = 0;
BatchImport* batch_import = NULL;
GeeArrayList* _tmp13_ = NULL;
gint _tmp14_ = 0;
gpointer _tmp15_ = NULL;
BatchImport* _tmp16_ = NULL;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp10_ = _batch_import_index;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_batch_import_index = _tmp10_ + 1;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp11_ = _batch_import_index;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp12_ = _batch_import_size;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (!(_tmp11_ < _tmp12_)) {
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
break;
#line 1050 "ImportQueuePage.c"
}
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp13_ = _batch_import_list;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp14_ = _batch_import_index;
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp15_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp14_);
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
batch_import = (BatchImport*) _tmp15_;
#line 115 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp16_ = batch_import;
#line 115 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
batch_import_user_halt (_tmp16_);
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (batch_import);
#line 1066 "ImportQueuePage.c"
}
#line 114 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_batch_import_list);
#line 1070 "ImportQueuePage.c"
}
}
static void import_queue_page_on_starting (ImportQueuePage* self, BatchImport* batch_import) {
BatchImport* _tmp0_ = NULL;
BatchImport* _tmp1_ = NULL;
#line 118 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 118 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_BATCH_IMPORT (batch_import));
#line 119 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_update_stop_action (self);
#line 120 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = batch_import;
#line 120 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 120 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->current_batch);
#line 120 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->current_batch = _tmp1_;
#line 1092 "ImportQueuePage.c"
}
static void import_queue_page_on_preparing (ImportQueuePage* self) {
GtkProgressBar* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
GtkProgressBar* _tmp2_ = NULL;
#line 123 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 124 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = self->priv->progress_bar;
#line 124 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = _ ("Preparing to import…");
#line 124 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_text (_tmp0_, _tmp1_);
#line 125 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = self->priv->progress_bar;
#line 125 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_pulse (_tmp2_);
#line 1112 "ImportQueuePage.c"
}
static void import_queue_page_on_progress (ImportQueuePage* self, guint64 completed_bytes, guint64 total_bytes) {
gdouble _tmp0_ = 0.0;
guint64 _tmp1_ = 0ULL;
guint64 _tmp2_ = 0ULL;
gdouble pct = 0.0;
GtkProgressBar* _tmp5_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = completed_bytes;
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = total_bytes;
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp1_ <= _tmp2_) {
#line 1130 "ImportQueuePage.c"
guint64 _tmp3_ = 0ULL;
guint64 _tmp4_ = 0ULL;
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = completed_bytes;
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = total_bytes;
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = ((gdouble) _tmp3_) / ((gdouble) _tmp4_);
#line 1139 "ImportQueuePage.c"
} else {
#line 130 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = 0.0;
#line 1143 "ImportQueuePage.c"
}
#line 129 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
pct = _tmp0_;
#line 131 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = self->priv->progress_bar;
#line 131 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_fraction (_tmp5_, pct);
#line 1151 "ImportQueuePage.c"
}
static void import_queue_page_on_imported (ImportQueuePage* self, ThumbnailSource* source, GdkPixbuf* pixbuf, gint to_follow) {
gboolean _tmp0_ = FALSE;
gint _tmp1_ = 0;
GdkPixbuf* _tmp3_ = NULL;
GdkPixbuf* _tmp4_ = NULL;
Dimensions _tmp5_ = {0};
ViewCollection* _tmp6_ = NULL;
ViewCollection* _tmp7_ = NULL;
gboolean _tmp8_ = FALSE;
ThumbnailSource* _tmp9_ = NULL;
GtkProgressBar* _tmp22_ = NULL;
GtkProgressBar* _tmp23_ = NULL;
const gchar* _tmp24_ = NULL;
ThumbnailSource* _tmp25_ = NULL;
gchar* _tmp26_ = NULL;
gchar* _tmp27_ = NULL;
gchar* _tmp28_ = NULL;
gchar* _tmp29_ = NULL;
#line 138 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 138 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 138 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = to_follow;
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp1_ > 0) {
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = TRUE;
#line 1185 "ImportQueuePage.c"
} else {
gboolean _tmp2_ = FALSE;
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = page_is_in_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = !_tmp2_;
#line 1192 "ImportQueuePage.c"
}
#line 140 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp0_) {
#line 141 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
return;
#line 1198 "ImportQueuePage.c"
}
#line 143 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = pixbuf;
#line 143 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = pixbuf;
#line 143 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
dimensions_for_pixbuf (_tmp4_, &_tmp5_);
#line 143 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
single_photo_page_set_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), _tmp3_, &_tmp5_, NULL);
#line 146 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 146 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = _tmp6_;
#line 146 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
data_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_COLLECTION, DataCollection));
#line 146 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_data_collection_unref0 (_tmp7_);
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp9_ = source;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_LIBRARY_PHOTO)) {
#line 1220 "ImportQueuePage.c"
ViewCollection* _tmp10_ = NULL;
ViewCollection* _tmp11_ = NULL;
ThumbnailSource* _tmp12_ = NULL;
PhotoView* _tmp13_ = NULL;
PhotoView* _tmp14_ = NULL;
gboolean _tmp15_ = FALSE;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp10_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp11_ = _tmp10_;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp12_ = source;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp13_ = photo_view_new (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp12_) : NULL, TYPE_PHOTO_SOURCE, PhotoSource));
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp14_ = _tmp13_;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp15_ = data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject));
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp8_ = _tmp15_;
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp14_);
#line 147 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_data_collection_unref0 (_tmp11_);
#line 1245 "ImportQueuePage.c"
} else {
ViewCollection* _tmp16_ = NULL;
ViewCollection* _tmp17_ = NULL;
ThumbnailSource* _tmp18_ = NULL;
VideoView* _tmp19_ = NULL;
VideoView* _tmp20_ = NULL;
gboolean _tmp21_ = FALSE;
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp16_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp17_ = _tmp16_;
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp18_ = source;
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp19_ = video_view_new (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, TYPE_VIDEO) ? ((Video*) _tmp18_) : NULL, TYPE_VIDEO_SOURCE, VideoSource));
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp20_ = _tmp19_;
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp21_ = data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_OBJECT, DataObject));
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp8_ = _tmp21_;
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp20_);
#line 148 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_data_collection_unref0 (_tmp17_);
#line 1271 "ImportQueuePage.c"
}
#line 150 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp22_ = self->priv->progress_bar;
#line 150 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_ellipsize (_tmp22_, PANGO_ELLIPSIZE_MIDDLE);
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp23_ = self->priv->progress_bar;
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp24_ = _ ("Imported %s");
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp25_ = source;
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp26_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject));
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp27_ = _tmp26_;
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp28_ = g_strdup_printf (_tmp24_, _tmp27_);
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp29_ = _tmp28_;
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_text (_tmp23_, _tmp29_);
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_free0 (_tmp29_);
#line 151 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_free0 (_tmp27_);
#line 1297 "ImportQueuePage.c"
}
static void import_queue_page_on_import_complete (ImportQueuePage* self, BatchImport* batch_import, ImportManifest* manifest, BatchImportRoll* import_roll) {
BatchImport* _tmp0_ = NULL;
BatchImport* _tmp1_ = NULL;
GeeArrayList* _tmp2_ = NULL;
gint _tmp3_ = 0;
gint _tmp4_ = 0;
GeeArrayList* _tmp5_ = NULL;
gpointer _tmp6_ = NULL;
BatchImport* _tmp7_ = NULL;
BatchImport* _tmp8_ = NULL;
gboolean removed = FALSE;
GeeArrayList* _tmp9_ = NULL;
BatchImport* _tmp10_ = NULL;
gboolean _tmp11_ = FALSE;
gboolean _tmp12_ = FALSE;
GeeHashSet* _tmp13_ = NULL;
BatchImport* _tmp14_ = NULL;
BatchImport* _tmp15_ = NULL;
guint _tmp16_ = 0U;
BatchImport* _tmp17_ = NULL;
guint _tmp18_ = 0U;
BatchImport* _tmp19_ = NULL;
guint _tmp20_ = 0U;
BatchImport* _tmp21_ = NULL;
guint _tmp22_ = 0U;
BatchImport* _tmp23_ = NULL;
guint _tmp24_ = 0U;
BatchImport* _tmp25_ = NULL;
guint _tmp26_ = 0U;
GeeArrayList* _tmp27_ = NULL;
gint _tmp28_ = 0;
gint _tmp29_ = 0;
BatchImport* _tmp39_ = NULL;
#line 154 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 154 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_BATCH_IMPORT (batch_import));
#line 154 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_MANIFEST (manifest));
#line 154 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_BATCH_IMPORT_ROLL (import_roll));
#line 156 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = batch_import;
#line 156 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = self->priv->current_batch;
#line 156 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_assert (_tmp0_ == _tmp1_, "batch_import == current_batch");
#line 157 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->current_batch);
#line 157 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->current_batch = NULL;
#line 159 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = self->priv->queue;
#line 159 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 159 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp4_ = _tmp3_;
#line 159 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_assert (_tmp4_ > 0, "queue.size > 0");
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp5_ = self->priv->queue;
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp6_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp7_ = (BatchImport*) _tmp6_;
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp8_ = batch_import;
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_assert (_tmp7_ == _tmp8_, "queue.get(0) == batch_import");
#line 160 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp7_);
#line 162 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp9_ = self->priv->queue;
#line 162 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp10_ = batch_import;
#line 162 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp11_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_);
#line 162 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
removed = _tmp11_;
#line 163 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp12_ = removed;
#line 163 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_vala_assert (_tmp12_, "removed");
#line 166 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp13_ = self->priv->cancel_unallowed;
#line 166 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp14_ = batch_import;
#line 166 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp14_);
#line 169 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp15_ = batch_import;
#line 169 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("starting", TYPE_BATCH_IMPORT, &_tmp16_, NULL, FALSE);
#line 169 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _import_queue_page_on_starting_batch_import_starting, self);
#line 170 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp17_ = batch_import;
#line 170 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("preparing", TYPE_BATCH_IMPORT, &_tmp18_, NULL, FALSE);
#line 170 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp17_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp18_, 0, NULL, (GCallback) _import_queue_page_on_preparing_batch_import_preparing, self);
#line 171 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp19_ = batch_import;
#line 171 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("progress", TYPE_BATCH_IMPORT, &_tmp20_, NULL, FALSE);
#line 171 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp19_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _import_queue_page_on_progress_batch_import_progress, self);
#line 172 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp21_ = batch_import;
#line 172 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("imported", TYPE_BATCH_IMPORT, &_tmp22_, NULL, FALSE);
#line 172 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp21_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp22_, 0, NULL, (GCallback) _import_queue_page_on_imported_batch_import_imported, self);
#line 173 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp23_ = batch_import;
#line 173 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("import-complete", TYPE_BATCH_IMPORT, &_tmp24_, NULL, FALSE);
#line 173 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp23_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp24_, 0, NULL, (GCallback) _import_queue_page_on_import_complete_batch_import_import_complete, self);
#line 174 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp25_ = batch_import;
#line 174 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_parse_name ("fatal-error", TYPE_BATCH_IMPORT, &_tmp26_, NULL, FALSE);
#line 174 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_handlers_disconnect_matched (_tmp25_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp26_, 0, NULL, (GCallback) _import_queue_page_on_fatal_error_batch_import_fatal_error, self);
#line 177 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp27_ = self->priv->queue;
#line 177 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp28_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection));
#line 177 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp29_ = _tmp28_;
#line 177 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp29_ > 0) {
#line 1434 "ImportQueuePage.c"
GeeArrayList* _tmp30_ = NULL;
gpointer _tmp31_ = NULL;
BatchImport* _tmp32_ = NULL;
#line 178 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp30_ = self->priv->queue;
#line 178 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp31_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0);
#line 178 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp32_ = (BatchImport*) _tmp31_;
#line 178 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
batch_import_schedule (_tmp32_);
#line 178 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp32_);
#line 1448 "ImportQueuePage.c"
} else {
GtkProgressBar* _tmp33_ = NULL;
GtkProgressBar* _tmp34_ = NULL;
GtkProgressBar* _tmp35_ = NULL;
gboolean _tmp36_ = FALSE;
#line 181 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp33_ = self->priv->progress_bar;
#line 181 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_ellipsize (_tmp33_, PANGO_ELLIPSIZE_NONE);
#line 182 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp34_ = self->priv->progress_bar;
#line 182 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_text (_tmp34_, "");
#line 183 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp35_ = self->priv->progress_bar;
#line 183 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
gtk_progress_bar_set_fraction (_tmp35_, 0.0);
#line 190 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
single_photo_page_blank_display (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage));
#line 193 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp36_ = self->priv->stopped;
#line 193 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
if (_tmp36_) {
#line 1472 "ImportQueuePage.c"
AppWindow* _tmp37_ = NULL;
AppWindow* _tmp38_ = NULL;
#line 194 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp37_ = app_window_get_instance ();
#line 194 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp38_ = _tmp37_;
#line 194 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, TYPE_PAGE_WINDOW, PageWindow));
#line 194 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (_tmp38_);
#line 1483 "ImportQueuePage.c"
}
#line 196 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->stopped = FALSE;
#line 1487 "ImportQueuePage.c"
}
#line 199 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_update_stop_action (self);
#line 202 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp39_ = batch_import;
#line 202 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_emit_by_name (self, "batch-removed", _tmp39_);
#line 1495 "ImportQueuePage.c"
}
static void import_queue_page_on_fatal_error (ImportQueuePage* self, ImportResult _result_, const gchar* message) {
const gchar* _tmp0_ = NULL;
#line 205 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (IS_IMPORT_QUEUE_PAGE (self));
#line 205 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_return_if_fail (message != NULL);
#line 206 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = message;
#line 206 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
app_window_error_message (_tmp0_, NULL);
#line 1509 "ImportQueuePage.c"
}
static void import_queue_page_class_init (ImportQueuePageClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
import_queue_page_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_type_class_add_private (klass, sizeof (ImportQueuePagePrivate));
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
((PageClass *) klass)->init_collect_ui_filenames = import_queue_page_real_init_collect_ui_filenames;
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
((PageClass *) klass)->init_collect_action_entries = import_queue_page_real_init_collect_action_entries;
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
G_OBJECT_CLASS (klass)->finalize = import_queue_page_finalize;
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_new ("batch_added", TYPE_IMPORT_QUEUE_PAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_BATCH_IMPORT);
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_signal_new ("batch_removed", TYPE_IMPORT_QUEUE_PAGE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_BATCH_IMPORT);
#line 1528 "ImportQueuePage.c"
}
static void import_queue_page_instance_init (ImportQueuePage * self) {
GeeArrayList* _tmp0_ = NULL;
GeeHashSet* _tmp1_ = NULL;
GtkProgressBar* _tmp2_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv = IMPORT_QUEUE_PAGE_GET_PRIVATE (self);
#line 10 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp0_ = gee_array_list_new (TYPE_BATCH_IMPORT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 10 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->queue = _tmp0_;
#line 11 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp1_ = gee_hash_set_new (TYPE_BATCH_IMPORT, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 11 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->cancel_unallowed = _tmp1_;
#line 12 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->current_batch = NULL;
#line 13 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_tmp2_ = (GtkProgressBar*) gtk_progress_bar_new ();
#line 13 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
g_object_ref_sink (_tmp2_);
#line 13 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->progress_bar = _tmp2_;
#line 14 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self->priv->stopped = FALSE;
#line 1556 "ImportQueuePage.c"
}
static void import_queue_page_finalize (GObject* obj) {
ImportQueuePage * self;
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IMPORT_QUEUE_PAGE, ImportQueuePage);
#line 10 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->queue);
#line 11 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->cancel_unallowed);
#line 12 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->current_batch);
#line 13 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
_g_object_unref0 (self->priv->progress_bar);
#line 7 "/home/jens/Source/shotwell/src/library/ImportQueuePage.vala"
G_OBJECT_CLASS (import_queue_page_parent_class)->finalize (obj);
#line 1574 "ImportQueuePage.c"
}
GType import_queue_page_get_type (void) {
static volatile gsize import_queue_page_type_id__volatile = 0;
if (g_once_init_enter (&import_queue_page_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ImportQueuePageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) import_queue_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ImportQueuePage), 0, (GInstanceInitFunc) import_queue_page_instance_init, NULL };
GType import_queue_page_type_id;
import_queue_page_type_id = g_type_register_static (TYPE_SINGLE_PHOTO_PAGE, "ImportQueuePage", &g_define_type_info, 0);
g_once_init_leave (&import_queue_page_type_id__volatile, import_queue_page_type_id);
}
return import_queue_page_type_id__volatile;
}
|