summaryrefslogtreecommitdiff
path: root/src/main.c
blob: 589461d61f250725ce7d6dac97f0b18ce5d0cc0b (plain)
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
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
/* main.c generated by valac 0.40.4, the Vala compiler
 * generated from main.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gee.h>
#include <gexiv2/gexiv2.h>
#include <unistd.h>


#define TYPE_SHOTWELL_COMMAND (shotwell_command_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define DB_TYPE_VERIFY_RESULT (db_verify_result_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_PROGRESS_DIALOG (progress_dialog_get_type ())
#define PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_DIALOG, ProgressDialog))
#define PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_DIALOG, ProgressDialogClass))
#define IS_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_DIALOG))
#define IS_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_DIALOG))
#define PROGRESS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_DIALOG, ProgressDialogClass))

typedef struct _ProgressDialog ProgressDialog;
typedef struct _ProgressDialogClass ProgressDialogClass;

#define TYPE_AGGREGATE_PROGRESS_MONITOR (aggregate_progress_monitor_get_type ())
#define AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitor))
#define AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass))
#define IS_AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR))
#define IS_AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR))
#define AGGREGATE_PROGRESS_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass))

typedef struct _AggregateProgressMonitor AggregateProgressMonitor;
typedef struct _AggregateProgressMonitorClass AggregateProgressMonitorClass;

#define TYPE_DATABASE_TABLE (database_table_get_type ())
#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable))
#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass))
#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE))
#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE))
#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass))

typedef struct _DatabaseTable DatabaseTable;
typedef struct _DatabaseTableClass DatabaseTableClass;

#define TYPE_PHOTO_TABLE (photo_table_get_type ())
#define PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_TABLE, PhotoTable))
#define PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_TABLE, PhotoTableClass))
#define IS_PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_TABLE))
#define IS_PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_TABLE))
#define PHOTO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_TABLE, PhotoTableClass))

typedef struct _PhotoTable PhotoTable;
typedef struct _PhotoTableClass PhotoTableClass;

#define TYPE_EVENT_TABLE (event_table_get_type ())
#define EVENT_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_TABLE, EventTable))
#define EVENT_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_TABLE, EventTableClass))
#define IS_EVENT_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_TABLE))
#define IS_EVENT_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_TABLE))
#define EVENT_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_TABLE, EventTableClass))

typedef struct _EventTable EventTable;
typedef struct _EventTableClass EventTableClass;

#define TYPE_TAG_TABLE (tag_table_get_type ())
#define TAG_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_TABLE, TagTable))
#define TAG_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_TABLE, TagTableClass))
#define IS_TAG_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_TABLE))
#define IS_TAG_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_TABLE))
#define TAG_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_TABLE, TagTableClass))

typedef struct _TagTable TagTable;
typedef struct _TagTableClass TagTableClass;

#define TYPE_VIDEO_TABLE (video_table_get_type ())
#define VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_TABLE, VideoTable))
#define VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_TABLE, VideoTableClass))
#define IS_VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_TABLE))
#define IS_VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_TABLE))
#define VIDEO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_TABLE, VideoTableClass))

typedef struct _VideoTable VideoTable;
typedef struct _VideoTableClass VideoTableClass;

#define TYPE_UPGRADES (upgrades_get_type ())
#define UPGRADES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UPGRADES, Upgrades))
#define UPGRADES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UPGRADES, UpgradesClass))
#define IS_UPGRADES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UPGRADES))
#define IS_UPGRADES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UPGRADES))
#define UPGRADES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UPGRADES, UpgradesClass))

typedef struct _Upgrades Upgrades;
typedef struct _UpgradesClass UpgradesClass;
#define _upgrades_unref0(var) ((var == NULL) ? NULL : (var = (upgrades_unref (var), NULL)))
#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL)))
#define _aggregate_progress_monitor_unref0(var) ((var == NULL) ? NULL : (var = (aggregate_progress_monitor_unref (var), NULL)))

#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ())
#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry))
#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))
#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY))
#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY))
#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))

typedef struct _MediaCollectionRegistry MediaCollectionRegistry;
typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass;

#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_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

#define TYPE_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ())
#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection))
#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION))
#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION))
#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))

typedef struct _MediaSourceCollection MediaSourceCollection;
typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass;

#define TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION (library_photo_source_collection_get_type ())
#define LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollection))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION))
#define LIBRARY_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass))

typedef struct _LibraryPhotoSourceCollection LibraryPhotoSourceCollection;
typedef struct _LibraryPhotoSourceCollectionClass LibraryPhotoSourceCollectionClass;

#define TYPE_VIDEO_SOURCE_COLLECTION (video_source_collection_get_type ())
#define VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection))
#define VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))
#define IS_VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE_COLLECTION))
#define IS_VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE_COLLECTION))
#define VIDEO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))

typedef struct _VideoSourceCollection VideoSourceCollection;
typedef struct _VideoSourceCollectionClass VideoSourceCollectionClass;

#define TYPE_APPLICATION (application_get_type ())
#define APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APPLICATION, Application))
#define APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APPLICATION, ApplicationClass))
#define IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APPLICATION))
#define IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APPLICATION))
#define APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APPLICATION, ApplicationClass))

typedef struct _Application Application;
typedef struct _ApplicationClass ApplicationClass;
#define _application_unref0(var) ((var == NULL) ? NULL : (var = (application_unref (var), NULL)))

#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_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_LIBRARY_WINDOW (library_window_get_type ())
#define LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_WINDOW, LibraryWindow))
#define LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_WINDOW, LibraryWindowClass))
#define IS_LIBRARY_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_WINDOW))
#define IS_LIBRARY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_WINDOW))
#define LIBRARY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_WINDOW, LibraryWindowClass))

typedef struct _LibraryWindow LibraryWindow;
typedef struct _LibraryWindowClass LibraryWindowClass;

#define TYPE_WELCOME_SERVICE_ENTRY (welcome_service_entry_get_type ())
#define WELCOME_SERVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WELCOME_SERVICE_ENTRY, WelcomeServiceEntry))
#define IS_WELCOME_SERVICE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WELCOME_SERVICE_ENTRY))
#define WELCOME_SERVICE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_WELCOME_SERVICE_ENTRY, WelcomeServiceEntryIface))

typedef struct _WelcomeServiceEntry WelcomeServiceEntry;
typedef struct _WelcomeServiceEntryIface WelcomeServiceEntryIface;

#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;

#define TYPE_WELCOME_DIALOG (welcome_dialog_get_type ())
#define WELCOME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WELCOME_DIALOG, WelcomeDialog))
#define WELCOME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WELCOME_DIALOG, WelcomeDialogClass))
#define IS_WELCOME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WELCOME_DIALOG))
#define IS_WELCOME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WELCOME_DIALOG))
#define WELCOME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WELCOME_DIALOG, WelcomeDialogClass))

typedef struct _WelcomeDialog WelcomeDialog;
typedef struct _WelcomeDialogClass WelcomeDialogClass;

#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 _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL)))

#define TYPE_BATCH_IMPORT_JOB (batch_import_job_get_type ())
#define BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJob))
#define BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))
#define IS_BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_JOB))
#define IS_BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_JOB))
#define BATCH_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))

typedef struct _BatchImportJob BatchImportJob;
typedef struct _BatchImportJobClass BatchImportJobClass;

#define TYPE_FILE_IMPORT_JOB (file_import_job_get_type ())
#define FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILE_IMPORT_JOB, FileImportJob))
#define FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILE_IMPORT_JOB, FileImportJobClass))
#define IS_FILE_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILE_IMPORT_JOB))
#define IS_FILE_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILE_IMPORT_JOB))
#define FILE_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILE_IMPORT_JOB, FileImportJobClass))

typedef struct _FileImportJob FileImportJob;
typedef struct _FileImportJobClass FileImportJobClass;
#define _batch_import_job_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_job_unref (var), NULL)))

#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 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;
typedef struct _ImportManifestPrivate ImportManifestPrivate;

#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_BATCH_IMPORT_RESULT (batch_import_result_get_type ())
#define BATCH_IMPORT_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_RESULT, BatchImportResult))
#define BATCH_IMPORT_RESULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_RESULT, BatchImportResultClass))
#define IS_BATCH_IMPORT_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_RESULT))
#define IS_BATCH_IMPORT_RESULT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_RESULT))
#define BATCH_IMPORT_RESULT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_RESULT, BatchImportResultClass))

typedef struct _BatchImportResult BatchImportResult;
typedef struct _BatchImportResultClass BatchImportResultClass;

#define IMPORT_UI_TYPE_QUESTION_PARAMS (import_ui_question_params_get_type ())
#define IMPORT_UI_QUESTION_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParams))
#define IMPORT_UI_QUESTION_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParamsClass))
#define IMPORT_UI_IS_QUESTION_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS))
#define IMPORT_UI_IS_QUESTION_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMPORT_UI_TYPE_QUESTION_PARAMS))
#define IMPORT_UI_QUESTION_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IMPORT_UI_TYPE_QUESTION_PARAMS, ImportUIQuestionParamsClass))

typedef struct _ImportUIQuestionParams ImportUIQuestionParams;
typedef struct _ImportUIQuestionParamsClass ImportUIQuestionParamsClass;

#define TYPE_DIRECT_WINDOW (direct_window_get_type ())
#define DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_WINDOW, DirectWindow))
#define DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_WINDOW, DirectWindowClass))
#define IS_DIRECT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_WINDOW))
#define IS_DIRECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_WINDOW))
#define DIRECT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_WINDOW, DirectWindowClass))

typedef struct _DirectWindow DirectWindow;
typedef struct _DirectWindowClass DirectWindowClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))

typedef enum  {
	SHOTWELL_COMMAND_MOUNTED_CAMERA = 1
} ShotwellCommand;

typedef enum  {
	DB_VERIFY_RESULT_OK,
	DB_VERIFY_RESULT_FUTURE_VERSION,
	DB_VERIFY_RESULT_UPGRADE_ERROR,
	DB_VERIFY_RESULT_NO_UPGRADE_AVAILABLE
} DbVerifyResult;

typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
struct _WelcomeServiceEntryIface {
	GTypeInterface parent_iface;
	gchar* (*get_service_name) (WelcomeServiceEntry* self);
	void (*execute) (WelcomeServiceEntry* self);
};

typedef void (*BatchImportImportReporter) (ImportManifest* manifest, BatchImportRoll* import_roll, void* user_data);
struct _ImportManifest {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ImportManifestPrivate * priv;
	GeeList* imported;
	GeeList* success;
	GeeList* camera_failed;
	GeeList* failed;
	GeeList* write_failed;
	GeeList* skipped_photos;
	GeeList* skipped_files;
	GeeList* aborted;
	GeeList* already_imported;
	GeeList* corrupt_files;
	GeeList* all;
	GTimer* timer;
};

struct _ImportManifestClass {
	GTypeClass parent_class;
	void (*finalize) (ImportManifest *self);
};


extern GTimer* startup_timer;
GTimer* startup_timer = NULL;
extern gboolean was_already_running;
gboolean was_already_running = FALSE;
extern gboolean commandline_options_no_startup_progress;
extern LibraryPhotoSourceCollection* library_photo_global;
extern VideoSourceCollection* video_global;
extern gboolean do_system_pictures_import;
extern gboolean do_external_import;
gboolean do_system_pictures_import = FALSE;
gboolean do_external_import = FALSE;
gboolean commandline_options_no_startup_progress = FALSE;
extern gchar* commandline_options_data_dir;
gchar* commandline_options_data_dir = NULL;
extern gboolean commandline_options_show_version;
gboolean commandline_options_show_version = FALSE;
extern gboolean commandline_options_no_runtime_monitoring;
gboolean commandline_options_no_runtime_monitoring = FALSE;
extern gboolean commandline_options_fullscreen;
gboolean commandline_options_fullscreen = FALSE;
extern GOptionEntry* commandline_options_entries;
extern gint commandline_options_entries_length1;
GOptionEntry* commandline_options_entries = NULL;
gint commandline_options_entries_length1 = 0;
static gint _commandline_options_entries_size_ = 0;

GType shotwell_command_get_type (void) G_GNUC_CONST;
void library_exec (gchar** mounts,
                   int mounts_length1);
gboolean application_get_is_remote (void);
void application_present_primary_instance (void);
void application_send_to_primary_instance (gchar** argv,
                                           int argv_length1);
void db_preconfigure (GFile* db_file);
GFile* app_dirs_get_data_subdir (const gchar* name,
                                 const gchar* subname);
void library_app_init (GError** error);
void app_window_panic (const gchar* msg);
GType db_verify_result_get_type (void) G_GNUC_CONST;
DbVerifyResult db_verify_database (gchar* * app_version,
                                   gint* schema_version);
#define RESOURCES_APP_VERSION _VERSION
#define DATABASE_TABLE_SCHEMA_VERSION 20
#define RESOURCES_HOME_URL "https://wiki.gnome.org/Apps/Shotwell"
GFile* app_dirs_get_data_dir (void);
const gchar* db_verify_result_to_string (DbVerifyResult self);
#define RESOURCES_APP_TITLE "Shotwell"
void database_table_terminate (void);
void upgrades_init (void);
GType progress_dialog_get_type (void) G_GNUC_CONST;
gpointer aggregate_progress_monitor_ref (gpointer instance);
void aggregate_progress_monitor_unref (gpointer instance);
GParamSpec* param_spec_aggregate_progress_monitor (const gchar* name,
                                                   const gchar* nick,
                                                   const gchar* blurb,
                                                   GType object_type,
                                                   GParamFlags flags);
void value_set_aggregate_progress_monitor (GValue* value,
                                           gpointer v_object);
void value_take_aggregate_progress_monitor (GValue* value,
                                            gpointer v_object);
gpointer value_get_aggregate_progress_monitor (const GValue* value);
GType aggregate_progress_monitor_get_type (void) G_GNUC_CONST;
gpointer database_table_ref (gpointer instance);
void database_table_unref (gpointer instance);
GParamSpec* param_spec_database_table (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
void value_set_database_table (GValue* value,
                               gpointer v_object);
void value_take_database_table (GValue* value,
                                gpointer v_object);
gpointer value_get_database_table (const GValue* value);
GType database_table_get_type (void) G_GNUC_CONST;
GType photo_table_get_type (void) G_GNUC_CONST;
PhotoTable* photo_table_get_instance (void);
gint database_table_get_row_count (DatabaseTable* self);
GType event_table_get_type (void) G_GNUC_CONST;
EventTable* event_table_get_instance (void);
GType tag_table_get_type (void) G_GNUC_CONST;
TagTable* tag_table_get_instance (void);
GType video_table_get_type (void) G_GNUC_CONST;
VideoTable* video_table_get_instance (void);
gpointer upgrades_ref (gpointer instance);
void upgrades_unref (gpointer instance);
GParamSpec* param_spec_upgrades (const gchar* name,
                                 const gchar* nick,
                                 const gchar* blurb,
                                 GType object_type,
                                 GParamFlags flags);
void value_set_upgrades (GValue* value,
                         gpointer v_object);
void value_take_upgrades (GValue* value,
                          gpointer v_object);
gpointer value_get_upgrades (const GValue* value);
GType upgrades_get_type (void) G_GNUC_CONST;
Upgrades* upgrades_get_instance (void);
guint64 upgrades_get_step_count (Upgrades* self);
ProgressDialog* progress_dialog_new (GtkWindow* owner,
                                     const gchar* text,
                                     GCancellable* cancellable);
ProgressDialog* progress_dialog_construct (GType object_type,
                                           GtkWindow* owner,
                                           const gchar* text,
                                           GCancellable* cancellable);
void progress_dialog_update_display_every (ProgressDialog* self,
                                           gint update_every);
void progress_dialog_set_minimum_on_screen_time_msec (ProgressDialog* self,
                                                      gint minimum_on_screen_time_msec);
gboolean progress_dialog_monitor (ProgressDialog* self,
                                  guint64 count,
                                  guint64 total,
                                  gboolean do_event_loop);
static gboolean _progress_dialog_monitor_progress_monitor (guint64 current,
                                                    guint64 total,
                                                    gboolean do_event_loop,
                                                    gpointer self);
AggregateProgressMonitor* aggregate_progress_monitor_new (guint64 grand_total,
                                                          ProgressMonitor wrapped_monitor,
                                                          void* wrapped_monitor_target);
AggregateProgressMonitor* aggregate_progress_monitor_construct (GType object_type,
                                                                guint64 grand_total,
                                                                ProgressMonitor wrapped_monitor,
                                                                void* wrapped_monitor_target);
gboolean aggregate_progress_monitor_monitor (AggregateProgressMonitor* self,
                                             guint64 count,
                                             guint64 total);
static gboolean _aggregate_progress_monitor_monitor_progress_monitor (guint64 current,
                                                               guint64 total,
                                                               gboolean do_event_loop,
                                                               gpointer self);
void thumbnail_cache_init (void);
void tombstone_init (void);
void library_files_select_copy_function (void);
void aggregate_progress_monitor_next_step (AggregateProgressMonitor* self,
                                           const gchar* name);
void library_photo_init (ProgressMonitor monitor,
                         void* monitor_target);
void video_init (ProgressMonitor monitor,
                 void* monitor_target);
void upgrades_execute (Upgrades* self,
                       ProgressMonitor monitor,
                       void* monitor_target);
void library_monitor_pool_init (void);
void media_collection_registry_init (void);
gpointer media_collection_registry_ref (gpointer instance);
void media_collection_registry_unref (gpointer instance);
GParamSpec* param_spec_media_collection_registry (const gchar* name,
                                                  const gchar* nick,
                                                  const gchar* blurb,
                                                  GType object_type,
                                                  GParamFlags flags);
void value_set_media_collection_registry (GValue* value,
                                          gpointer v_object);
void value_take_media_collection_registry (GValue* value,
                                           gpointer v_object);
gpointer value_get_media_collection_registry (const GValue* value);
GType media_collection_registry_get_type (void) G_GNUC_CONST;
MediaCollectionRegistry* media_collection_registry_get_instance (void);
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 source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType media_source_collection_get_type (void) G_GNUC_CONST;
void media_collection_registry_register_collection (MediaCollectionRegistry* self,
                                                    MediaSourceCollection* collection);
GType library_photo_source_collection_get_type (void) G_GNUC_CONST;
GType video_source_collection_get_type (void) G_GNUC_CONST;
void event_init (ProgressMonitor monitor,
                 void* monitor_target);
void tag_init (ProgressMonitor monitor,
               void* monitor_target);
void metadata_writer_init (void);
void desktop_integration_init (void);
gpointer application_ref (gpointer instance);
void application_unref (gpointer instance);
GParamSpec* param_spec_application (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
void value_set_application (GValue* value,
                            gpointer v_object);
void value_take_application (GValue* value,
                             gpointer v_object);
gpointer value_get_application (const GValue* value);
GType application_get_type (void) G_GNUC_CONST;
Application* application_get_instance (void);
GType page_window_get_type (void) G_GNUC_CONST;
GType app_window_get_type (void) G_GNUC_CONST;
GType library_window_get_type (void) G_GNUC_CONST;
LibraryWindow* library_window_new (ProgressMonitor progress_monitor,
                                   void* progress_monitor_target);
LibraryWindow* library_window_construct (GType object_type,
                                         ProgressMonitor progress_monitor,
                                         void* progress_monitor_target);
void library_window_mounted_camera_shell_notification (LibraryWindow* self,
                                                       const gchar* uri,
                                                       gboolean at_startup);
GType welcome_service_entry_get_type (void) G_GNUC_CONST;
GType configuration_facade_get_type (void) G_GNUC_CONST;
GType config_facade_get_type (void) G_GNUC_CONST;
ConfigFacade* config_facade_get_instance (void);
gboolean configuration_facade_get_show_welcome_dialog (ConfigurationFacade* self);
gint data_collection_get_count (DataCollection* self);
GType welcome_dialog_get_type (void) G_GNUC_CONST;
WelcomeDialog* welcome_dialog_new (GtkWindow* owner);
WelcomeDialog* welcome_dialog_construct (GType object_type,
                                         GtkWindow* owner);
void configuration_facade_set_show_welcome_dialog (ConfigurationFacade* self,
                                                   gboolean show);
gboolean welcome_dialog_execute (WelcomeDialog* self,
                                 WelcomeServiceEntry*** selected_import_entries,
                                 int* selected_import_entries_length1,
                                 gboolean* do_system_pictures_import);
void welcome_service_entry_execute (WelcomeServiceEntry* 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;
void run_system_pictures_import (ImportManifest* external_exclusion_manifest);
void application_start (Application* self,
                        gchar** argv,
                        int argv_length1);
void desktop_integration_terminate (void);
void metadata_writer_terminate (void);
void tag_terminate (void);
void event_terminate (void);
void library_photo_terminate (void);
void media_collection_registry_terminate (void);
void library_monitor_pool_terminate (void);
void tombstone_terminate (void);
void thumbnail_cache_terminate (void);
void video_terminate (void);
void library_app_terminate (void);
gpointer batch_import_job_ref (gpointer instance);
void batch_import_job_unref (gpointer instance);
GParamSpec* param_spec_batch_import_job (const gchar* name,
                                         const gchar* nick,
                                         const gchar* blurb,
                                         GType object_type,
                                         GParamFlags flags);
void value_set_batch_import_job (GValue* value,
                                 gpointer v_object);
void value_take_batch_import_job (GValue* value,
                                  gpointer v_object);
gpointer value_get_batch_import_job (const GValue* value);
GType batch_import_job_get_type (void) G_GNUC_CONST;
GType file_import_job_get_type (void) G_GNUC_CONST;
GFile* app_dirs_get_import_dir (void);
FileImportJob* file_import_job_new (GFile* file_or_dir,
                                    gboolean copy_to_library,
                                    gboolean recurse);
FileImportJob* file_import_job_construct (GType object_type,
                                          GFile* file_or_dir,
                                          gboolean copy_to_library,
                                          gboolean recurse);
AppWindow* app_window_get_instance (void);
GType batch_import_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;
void report_system_pictures_import (ImportManifest* manifest,
                                    BatchImportRoll* import_roll);
static void _report_system_pictures_import_batch_import_import_reporter (ImportManifest* manifest,
                                                                  BatchImportRoll* import_roll,
                                                                  gpointer self);
BatchImport* batch_import_new (GeeIterable* jobs,
                               const gchar* name,
                               BatchImportImportReporter reporter,
                               void* reporter_target,
                               GeeArrayList* prefailed,
                               GeeArrayList* pre_already_imported,
                               GCancellable* cancellable,
                               BatchImportRoll* import_roll,
                               ImportManifest* skip_manifest);
BatchImport* batch_import_construct (GType object_type,
                                     GeeIterable* jobs,
                                     const gchar* name,
                                     BatchImportImportReporter reporter,
                                     void* reporter_target,
                                     GeeArrayList* prefailed,
                                     GeeArrayList* pre_already_imported,
                                     GCancellable* cancellable,
                                     BatchImportRoll* import_roll,
                                     ImportManifest* skip_manifest);
void library_window_enqueue_batch_import (LibraryWindow* self,
                                          BatchImport* batch_import,
                                          gboolean allow_user_cancel);
void library_window_switch_to_import_queue_page (LibraryWindow* 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;
GType media_source_get_type (void) G_GNUC_CONST;
gpointer batch_import_result_ref (gpointer instance);
void batch_import_result_unref (gpointer instance);
GParamSpec* param_spec_batch_import_result (const gchar* name,
                                            const gchar* nick,
                                            const gchar* blurb,
                                            GType object_type,
                                            GParamFlags flags);
void value_set_batch_import_result (GValue* value,
                                    gpointer v_object);
void value_take_batch_import_result (GValue* value,
                                     gpointer v_object);
gpointer value_get_batch_import_result (const GValue* value);
GType batch_import_result_get_type (void) G_GNUC_CONST;
gpointer import_ui_question_params_ref (gpointer instance);
void import_ui_question_params_unref (gpointer instance);
GParamSpec* import_ui_param_spec_question_params (const gchar* name,
                                                  const gchar* nick,
                                                  const gchar* blurb,
                                                  GType object_type,
                                                  GParamFlags flags);
void import_ui_value_set_question_params (GValue* value,
                                          gpointer v_object);
void import_ui_value_take_question_params (GValue* value,
                                           gpointer v_object);
gpointer import_ui_value_get_question_params (const GValue* value);
GType import_ui_question_params_get_type (void) G_GNUC_CONST;
gboolean import_ui_report_manifest (ImportManifest* manifest,
                                    gboolean show_dest_id,
                                    ImportUIQuestionParams* question);
void editing_exec (const gchar* filename,
                   gboolean fullscreen);
void direct_preconfigure (GFile* initial_file);
void direct_app_init (GError** error);
GType direct_window_get_type (void) G_GNUC_CONST;
DirectWindow* direct_window_new (GFile* file);
DirectWindow* direct_window_construct (GType object_type,
                                       GFile* file);
GAction* app_window_get_common_action (AppWindow* self,
                                       const gchar* name);
void direct_app_terminate (void);
GOptionEntry* commandline_options_get_options (int* result_length1);
static GOptionEntry* _vala_array_dup22 (GOptionEntry* self,
                                 int length);
static void _vala_array_add72 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static void _vala_array_add73 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static void _vala_array_add74 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static void _vala_array_add75 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static void _vala_array_add76 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static void _vala_array_add77 (GOptionEntry* * array,
                        int* length,
                        int* size,
                        const GOptionEntry* value);
static GOptionEntry* _vala_array_dup23 (GOptionEntry* self,
                                 int length);
void _vala_main (gchar** args,
                 int args_length1);
void app_dirs_init (const gchar* arg0);
GFile* app_dirs_get_install_dir (void);
GFile* app_dirs_get_lib_dir (void);
#define RESOURCES_APP_GETTEXT_PACKAGE GETTEXT_PACKAGE
void app_dirs_terminate (void);
#define RESOURCES_GIT_VERSION _GIT_VERSION
gboolean library_window_is_mount_uri_supported (const gchar* uri);
static void _vala_array_add78 (gchar** * array,
                        int* length,
                        int* size,
                        gchar* value);
gboolean is_string_empty (const gchar* s);
#define DEBUG_LIBRARY_PREFIX "L"
#define DEBUG_VIEWER_PREFIX "V"
void debug_init (const gchar* app_version_prefix);
#define RESOURCES_APP_LIBRARY_ROLE _ ("Photo Manager")
#define RESOURCES_APP_DIRECT_ROLE _ ("Photo Viewer")
void application_init (gboolean is_direct);
void app_dirs_set_data_dir (const gchar* user_data_dir);
void app_dirs_try_migrate_data (void);
void app_dirs_verify_data_dir (void);
void app_dirs_verify_cache_dir (void);
void international_support_init (const gchar* package_name,
                                 gchar** args,
                                 int args_length1,
                                 const gchar* locale);
#define INTERNATIONAL_SUPPORT_SYSTEM_LOCALE ""
void resources_init (void);
void resources_terminate (void);
void application_terminate (void);
void debug_terminate (void);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);


GType
shotwell_command_get_type (void)
{
	static volatile gsize shotwell_command_type_id__volatile = 0;
	if (g_once_init_enter (&shotwell_command_type_id__volatile)) {
		static const GEnumValue values[] = {{SHOTWELL_COMMAND_MOUNTED_CAMERA, "SHOTWELL_COMMAND_MOUNTED_CAMERA", "mounted-camera"}, {0, NULL, NULL}};
		GType shotwell_command_type_id;
		shotwell_command_type_id = g_enum_register_static ("ShotwellCommand", values);
		g_once_init_leave (&shotwell_command_type_id__volatile, shotwell_command_type_id);
	}
	return shotwell_command_type_id__volatile;
}


static gboolean
_progress_dialog_monitor_progress_monitor (guint64 current,
                                           guint64 total,
                                           gboolean do_event_loop,
                                           gpointer self)
{
	gboolean result;
	result = progress_dialog_monitor ((ProgressDialog*) self, current, total, do_event_loop);
#line 113 "/home/jens/Source/shotwell/src/main.vala"
	return result;
#line 892 "main.c"
}


static gboolean
_aggregate_progress_monitor_monitor_progress_monitor (guint64 current,
                                                      guint64 total,
                                                      gboolean do_event_loop,
                                                      gpointer self)
{
	gboolean result;
	result = aggregate_progress_monitor_monitor ((AggregateProgressMonitor*) self, current, total);
#line 114 "/home/jens/Source/shotwell/src/main.vala"
	return result;
#line 906 "main.c"
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 186 "/home/jens/Source/shotwell/src/main.vala"
	return self ? g_object_ref (self) : NULL;
#line 915 "main.c"
}


void
library_exec (gchar** mounts,
              int mounts_length1)
{
	gboolean _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	gchar* errormsg = NULL;
	gchar* app_version = NULL;
	gint schema_version = 0;
	DbVerifyResult _result_ = 0;
	gchar* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	DbVerifyResult _tmp9_;
	DbVerifyResult _tmp10_;
	const gchar* _tmp27_;
	ProgressDialog* progress_dialog = NULL;
	AggregateProgressMonitor* aggregate_monitor = NULL;
	ProgressMonitor monitor = NULL;
	void* monitor_target;
	GDestroyNotify monitor_target_destroy_notify;
	gboolean _tmp33_;
	AggregateProgressMonitor* _tmp58_;
	ProgressMonitor _tmp60_;
	void* _tmp60__target;
	AggregateProgressMonitor* _tmp61_;
	ProgressMonitor _tmp63_;
	void* _tmp63__target;
	AggregateProgressMonitor* _tmp64_;
	Upgrades* _tmp66_;
	Upgrades* _tmp67_;
	MediaCollectionRegistry* registry = NULL;
	MediaCollectionRegistry* _tmp68_;
	MediaCollectionRegistry* _tmp69_;
	LibraryPhotoSourceCollection* _tmp70_;
	MediaCollectionRegistry* _tmp71_;
	VideoSourceCollection* _tmp72_;
	AggregateProgressMonitor* _tmp73_;
	ProgressMonitor _tmp75_;
	void* _tmp75__target;
	AggregateProgressMonitor* _tmp76_;
	ProgressMonitor _tmp78_;
	void* _tmp78__target;
	Application* _tmp79_;
	Application* _tmp80_;
	AggregateProgressMonitor* _tmp81_;
	LibraryWindow* library_window = NULL;
	ProgressMonitor _tmp83_;
	void* _tmp83__target;
	LibraryWindow* _tmp84_;
	AggregateProgressMonitor* _tmp85_;
	ProgressDialog* _tmp87_;
	LibraryWindow* _tmp92_;
	WelcomeServiceEntry** selected_import_entries = NULL;
	WelcomeServiceEntry** _tmp93_;
	gint selected_import_entries_length1;
	gint _selected_import_entries_size_;
	gboolean _tmp94_ = FALSE;
	ConfigFacade* _tmp95_;
	ConfigFacade* _tmp96_;
	gboolean _tmp97_;
	WelcomeServiceEntry** _tmp110_;
	gint _tmp110__length1;
	gboolean _tmp114_;
	GTimer* _tmp115_;
	gdouble _tmp116_;
	Application* _tmp117_;
	Application* _tmp118_;
	GError * _inner_error_ = NULL;
#line 16 "/home/jens/Source/shotwell/src/main.vala"
	was_already_running = application_get_is_remote ();
#line 18 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0_ = was_already_running;
#line 18 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp0_) {
#line 25 "/home/jens/Source/shotwell/src/main.vala"
		application_present_primary_instance ();
#line 26 "/home/jens/Source/shotwell/src/main.vala"
		application_send_to_primary_instance (mounts, mounts_length1);
#line 27 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1002 "main.c"
	}
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_tmp1_ = app_dirs_get_data_subdir ("data", NULL);
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_tmp2_ = _tmp1_;
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_tmp3_ = g_file_get_child (_tmp2_, "photo.db");
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_ = _tmp3_;
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	db_preconfigure (_tmp4_);
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (_tmp4_);
#line 31 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (_tmp2_);
#line 1018 "main.c"
	{
#line 35 "/home/jens/Source/shotwell/src/main.vala"
		library_app_init (&_inner_error_);
#line 35 "/home/jens/Source/shotwell/src/main.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1024 "main.c"
			goto __catch233_g_error;
		}
	}
	goto __finally233;
	__catch233_g_error:
	{
		GError* err = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
#line 34 "/home/jens/Source/shotwell/src/main.vala"
		err = _inner_error_;
#line 34 "/home/jens/Source/shotwell/src/main.vala"
		_inner_error_ = NULL;
#line 37 "/home/jens/Source/shotwell/src/main.vala"
		_tmp5_ = err;
#line 37 "/home/jens/Source/shotwell/src/main.vala"
		_tmp6_ = _tmp5_->message;
#line 37 "/home/jens/Source/shotwell/src/main.vala"
		app_window_panic (_tmp6_);
#line 39 "/home/jens/Source/shotwell/src/main.vala"
		_g_error_free0 (err);
#line 39 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1048 "main.c"
	}
	__finally233:
#line 34 "/home/jens/Source/shotwell/src/main.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 34 "/home/jens/Source/shotwell/src/main.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 34 "/home/jens/Source/shotwell/src/main.vala"
		g_clear_error (&_inner_error_);
#line 34 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1059 "main.c"
	}
#line 43 "/home/jens/Source/shotwell/src/main.vala"
	g_message ("main.vala:43: Verifying database…");
#line 44 "/home/jens/Source/shotwell/src/main.vala"
	errormsg = NULL;
#line 47 "/home/jens/Source/shotwell/src/main.vala"
	_tmp9_ = db_verify_database (&_tmp7_, &_tmp8_);
#line 47 "/home/jens/Source/shotwell/src/main.vala"
	_g_free0 (app_version);
#line 47 "/home/jens/Source/shotwell/src/main.vala"
	app_version = _tmp7_;
#line 47 "/home/jens/Source/shotwell/src/main.vala"
	schema_version = _tmp8_;
#line 47 "/home/jens/Source/shotwell/src/main.vala"
	_result_ = _tmp9_;
#line 48 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_ = _result_;
#line 48 "/home/jens/Source/shotwell/src/main.vala"
	switch (_tmp10_) {
#line 48 "/home/jens/Source/shotwell/src/main.vala"
		case DB_VERIFY_RESULT_OK:
#line 1081 "main.c"
		{
#line 51 "/home/jens/Source/shotwell/src/main.vala"
			break;
#line 1085 "main.c"
		}
#line 48 "/home/jens/Source/shotwell/src/main.vala"
		case DB_VERIFY_RESULT_FUTURE_VERSION:
#line 1089 "main.c"
		{
			const gchar* _tmp11_;
			gint _tmp12_;
			gchar* _tmp13_;
#line 54 "/home/jens/Source/shotwell/src/main.vala"
			_tmp11_ = app_version;
#line 54 "/home/jens/Source/shotwell/src/main.vala"
			_tmp12_ = schema_version;
#line 54 "/home/jens/Source/shotwell/src/main.vala"
			_tmp13_ = g_strdup_printf (_ ("Your photo library is not compatible with this version of Shotwell. It" \
" appears it was created by Shotwell %s (schema %d). This version is %s" \
" (schema %d). Please use the latest version of Shotwell."), _tmp11_, _tmp12_, RESOURCES_APP_VERSION, DATABASE_TABLE_SCHEMA_VERSION);
#line 54 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (errormsg);
#line 54 "/home/jens/Source/shotwell/src/main.vala"
			errormsg = _tmp13_;
#line 56 "/home/jens/Source/shotwell/src/main.vala"
			break;
#line 1106 "main.c"
		}
#line 48 "/home/jens/Source/shotwell/src/main.vala"
		case DB_VERIFY_RESULT_UPGRADE_ERROR:
#line 1110 "main.c"
		{
			const gchar* _tmp14_;
			gint _tmp15_;
			gchar* _tmp16_;
#line 59 "/home/jens/Source/shotwell/src/main.vala"
			_tmp14_ = app_version;
#line 59 "/home/jens/Source/shotwell/src/main.vala"
			_tmp15_ = schema_version;
#line 59 "/home/jens/Source/shotwell/src/main.vala"
			_tmp16_ = g_strdup_printf (_ ("Shotwell was unable to upgrade your photo library from version %s (sch" \
"ema %d) to %s (schema %d). For more information please check the Shotw" \
"ell Wiki at %s"), _tmp14_, _tmp15_, RESOURCES_APP_VERSION, DATABASE_TABLE_SCHEMA_VERSION, RESOURCES_HOME_URL);
#line 59 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (errormsg);
#line 59 "/home/jens/Source/shotwell/src/main.vala"
			errormsg = _tmp16_;
#line 62 "/home/jens/Source/shotwell/src/main.vala"
			break;
#line 1127 "main.c"
		}
#line 48 "/home/jens/Source/shotwell/src/main.vala"
		case DB_VERIFY_RESULT_NO_UPGRADE_AVAILABLE:
#line 1131 "main.c"
		{
			const gchar* _tmp17_;
			gint _tmp18_;
			GFile* _tmp19_;
			GFile* _tmp20_;
			gchar* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp17_ = app_version;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp18_ = schema_version;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp19_ = app_dirs_get_data_dir ();
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp20_ = _tmp19_;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp21_ = g_file_get_path (_tmp20_);
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp22_ = _tmp21_;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_tmp23_ = g_strdup_printf (_ ("Your photo library is not compatible with this version of Shotwell. It" \
" appears it was created by Shotwell %s (schema %d). This version is %s" \
" (schema %d). Please clear your library by deleting %s and re-import y" \
"our photos."), _tmp17_, _tmp18_, RESOURCES_APP_VERSION, DATABASE_TABLE_SCHEMA_VERSION, _tmp22_);
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (errormsg);
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			errormsg = _tmp23_;
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (_tmp22_);
#line 65 "/home/jens/Source/shotwell/src/main.vala"
			_g_object_unref0 (_tmp20_);
#line 68 "/home/jens/Source/shotwell/src/main.vala"
			break;
#line 1164 "main.c"
		}
		default:
		{
			DbVerifyResult _tmp24_;
			GEnumValue* _tmp25_;
			gchar* _tmp26_;
#line 71 "/home/jens/Source/shotwell/src/main.vala"
			_tmp24_ = _result_;
#line 72 "/home/jens/Source/shotwell/src/main.vala"
			_tmp25_ = g_enum_get_value (g_type_class_ref (DB_TYPE_VERIFY_RESULT), _tmp24_);
#line 71 "/home/jens/Source/shotwell/src/main.vala"
			_tmp26_ = g_strdup_printf (_ ("Unknown error attempting to verify Shotwell’s database: %s"), (_tmp25_ != NULL) ? _tmp25_->value_name : NULL);
#line 71 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (errormsg);
#line 71 "/home/jens/Source/shotwell/src/main.vala"
			errormsg = _tmp26_;
#line 73 "/home/jens/Source/shotwell/src/main.vala"
			break;
#line 1183 "main.c"
		}
	}
#line 76 "/home/jens/Source/shotwell/src/main.vala"
	_tmp27_ = errormsg;
#line 76 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp27_ != NULL) {
#line 1190 "main.c"
		GtkMessageDialog* dialog = NULL;
		const gchar* _tmp28_;
		GtkMessageDialog* _tmp29_;
		GtkMessageDialog* _tmp30_;
		GtkMessageDialog* _tmp31_;
		GtkMessageDialog* _tmp32_;
#line 77 "/home/jens/Source/shotwell/src/main.vala"
		_tmp28_ = errormsg;
#line 77 "/home/jens/Source/shotwell/src/main.vala"
		_tmp29_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", _tmp28_);
#line 77 "/home/jens/Source/shotwell/src/main.vala"
		g_object_ref_sink (_tmp29_);
#line 77 "/home/jens/Source/shotwell/src/main.vala"
		dialog = _tmp29_;
#line 79 "/home/jens/Source/shotwell/src/main.vala"
		_tmp30_ = dialog;
#line 79 "/home/jens/Source/shotwell/src/main.vala"
		gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_window_get_type (), GtkWindow), RESOURCES_APP_TITLE);
#line 80 "/home/jens/Source/shotwell/src/main.vala"
		_tmp31_ = dialog;
#line 80 "/home/jens/Source/shotwell/src/main.vala"
		gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_dialog_get_type (), GtkDialog));
#line 81 "/home/jens/Source/shotwell/src/main.vala"
		_tmp32_ = dialog;
#line 81 "/home/jens/Source/shotwell/src/main.vala"
		gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, gtk_widget_get_type (), GtkWidget));
#line 83 "/home/jens/Source/shotwell/src/main.vala"
		database_table_terminate ();
#line 85 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (dialog);
#line 85 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (app_version);
#line 85 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (errormsg);
#line 85 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1227 "main.c"
	}
#line 88 "/home/jens/Source/shotwell/src/main.vala"
	upgrades_init ();
#line 90 "/home/jens/Source/shotwell/src/main.vala"
	progress_dialog = NULL;
#line 91 "/home/jens/Source/shotwell/src/main.vala"
	aggregate_monitor = NULL;
#line 92 "/home/jens/Source/shotwell/src/main.vala"
	monitor = NULL;
#line 92 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target = NULL;
#line 92 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target_destroy_notify = NULL;
#line 94 "/home/jens/Source/shotwell/src/main.vala"
	_tmp33_ = commandline_options_no_startup_progress;
#line 94 "/home/jens/Source/shotwell/src/main.vala"
	if (!_tmp33_) {
#line 1245 "main.c"
		guint64 grand_total = 0ULL;
		PhotoTable* _tmp34_;
		PhotoTable* _tmp35_;
		EventTable* _tmp36_;
		EventTable* _tmp37_;
		TagTable* _tmp38_;
		TagTable* _tmp39_;
		VideoTable* _tmp40_;
		VideoTable* _tmp41_;
		Upgrades* _tmp42_;
		Upgrades* _tmp43_;
		guint64 _tmp44_;
		guint64 _tmp45_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp34_ = photo_table_get_instance ();
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp35_ = _tmp34_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp36_ = event_table_get_instance ();
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp37_ = _tmp36_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp38_ = tag_table_get_instance ();
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp39_ = _tmp38_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp40_ = video_table_get_instance ();
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp41_ = _tmp40_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp42_ = upgrades_get_instance ();
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp43_ = _tmp42_;
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_tmp44_ = (((database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_DATABASE_TABLE, DatabaseTable)) + database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TYPE_DATABASE_TABLE, DatabaseTable))) + database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, TYPE_DATABASE_TABLE, DatabaseTable))) + database_table_get_row_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_DATABASE_TABLE, DatabaseTable))) + upgrades_get_step_count (_tmp43_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_upgrades_unref0 (_tmp43_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_database_table_unref0 (_tmp41_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_database_table_unref0 (_tmp39_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_database_table_unref0 (_tmp37_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		_database_table_unref0 (_tmp35_);
#line 98 "/home/jens/Source/shotwell/src/main.vala"
		grand_total = _tmp44_;
#line 103 "/home/jens/Source/shotwell/src/main.vala"
		_tmp45_ = grand_total;
#line 103 "/home/jens/Source/shotwell/src/main.vala"
		if (_tmp45_ > ((guint64) 5000)) {
#line 1297 "main.c"
			ProgressDialog* _tmp46_;
			ProgressDialog* _tmp47_;
			ProgressDialog* _tmp48_;
			guint64 _tmp54_;
			ProgressDialog* _tmp55_;
			AggregateProgressMonitor* _tmp56_;
			AggregateProgressMonitor* _tmp57_;
#line 104 "/home/jens/Source/shotwell/src/main.vala"
			_tmp46_ = progress_dialog_new (NULL, _ ("Loading Shotwell"), NULL);
#line 104 "/home/jens/Source/shotwell/src/main.vala"
			g_object_ref_sink (_tmp46_);
#line 104 "/home/jens/Source/shotwell/src/main.vala"
			_g_object_unref0 (progress_dialog);
#line 104 "/home/jens/Source/shotwell/src/main.vala"
			progress_dialog = _tmp46_;
#line 105 "/home/jens/Source/shotwell/src/main.vala"
			_tmp47_ = progress_dialog;
#line 105 "/home/jens/Source/shotwell/src/main.vala"
			progress_dialog_update_display_every (_tmp47_, 100);
#line 106 "/home/jens/Source/shotwell/src/main.vala"
			_tmp48_ = progress_dialog;
#line 106 "/home/jens/Source/shotwell/src/main.vala"
			progress_dialog_set_minimum_on_screen_time_msec (_tmp48_, 250);
#line 1321 "main.c"
			{
				GdkPixbuf* _tmp49_ = NULL;
				GdkPixbuf* _tmp50_;
				ProgressDialog* _tmp51_;
#line 108 "/home/jens/Source/shotwell/src/main.vala"
				_tmp50_ = gdk_pixbuf_new_from_resource ("/org/gnome/Shotwell/icons/shotwell.svg", &_inner_error_);
#line 108 "/home/jens/Source/shotwell/src/main.vala"
				_tmp49_ = _tmp50_;
#line 108 "/home/jens/Source/shotwell/src/main.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1332 "main.c"
					goto __catch234_g_error;
				}
#line 108 "/home/jens/Source/shotwell/src/main.vala"
				_tmp51_ = progress_dialog;
#line 108 "/home/jens/Source/shotwell/src/main.vala"
				gtk_window_set_icon (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_window_get_type (), GtkWindow), _tmp49_);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_g_object_unref0 (_tmp49_);
#line 1341 "main.c"
			}
			goto __finally234;
			__catch234_g_error:
			{
				GError* err = NULL;
				GError* _tmp52_;
				const gchar* _tmp53_;
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				err = _inner_error_;
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_inner_error_ = NULL;
#line 110 "/home/jens/Source/shotwell/src/main.vala"
				_tmp52_ = err;
#line 110 "/home/jens/Source/shotwell/src/main.vala"
				_tmp53_ = _tmp52_->message;
#line 110 "/home/jens/Source/shotwell/src/main.vala"
				g_debug ("main.vala:110: Warning - could not load application icon for loading w" \
"indow: %s", _tmp53_);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_g_error_free0 (err);
#line 1361 "main.c"
			}
			__finally234:
#line 107 "/home/jens/Source/shotwell/src/main.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				monitor = NULL;
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				monitor_target = NULL;
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				monitor_target_destroy_notify = NULL;
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_aggregate_progress_monitor_unref0 (aggregate_monitor);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_g_object_unref0 (progress_dialog);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_g_free0 (app_version);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				_g_free0 (errormsg);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				g_clear_error (&_inner_error_);
#line 107 "/home/jens/Source/shotwell/src/main.vala"
				return;
#line 1388 "main.c"
			}
#line 113 "/home/jens/Source/shotwell/src/main.vala"
			_tmp54_ = grand_total;
#line 113 "/home/jens/Source/shotwell/src/main.vala"
			_tmp55_ = progress_dialog;
#line 113 "/home/jens/Source/shotwell/src/main.vala"
			_tmp56_ = aggregate_progress_monitor_new (_tmp54_, _progress_dialog_monitor_progress_monitor, _tmp55_);
#line 113 "/home/jens/Source/shotwell/src/main.vala"
			_aggregate_progress_monitor_unref0 (aggregate_monitor);
#line 113 "/home/jens/Source/shotwell/src/main.vala"
			aggregate_monitor = _tmp56_;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			_tmp57_ = aggregate_monitor;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor = NULL;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor_target = NULL;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor_target_destroy_notify = NULL;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor = _aggregate_progress_monitor_monitor_progress_monitor;
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor_target = aggregate_progress_monitor_ref (_tmp57_);
#line 114 "/home/jens/Source/shotwell/src/main.vala"
			monitor_target_destroy_notify = aggregate_progress_monitor_unref;
#line 1416 "main.c"
		}
	}
#line 118 "/home/jens/Source/shotwell/src/main.vala"
	thumbnail_cache_init ();
#line 119 "/home/jens/Source/shotwell/src/main.vala"
	tombstone_init ();
#line 121 "/home/jens/Source/shotwell/src/main.vala"
	library_files_select_copy_function ();
#line 123 "/home/jens/Source/shotwell/src/main.vala"
	_tmp58_ = aggregate_monitor;
#line 123 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp58_ != NULL) {
#line 1429 "main.c"
		AggregateProgressMonitor* _tmp59_;
#line 124 "/home/jens/Source/shotwell/src/main.vala"
		_tmp59_ = aggregate_monitor;
#line 124 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp59_, "LibraryPhoto.init");
#line 1435 "main.c"
	}
#line 125 "/home/jens/Source/shotwell/src/main.vala"
	_tmp60_ = monitor;
#line 125 "/home/jens/Source/shotwell/src/main.vala"
	_tmp60__target = monitor_target;
#line 125 "/home/jens/Source/shotwell/src/main.vala"
	library_photo_init (_tmp60_, _tmp60__target);
#line 126 "/home/jens/Source/shotwell/src/main.vala"
	_tmp61_ = aggregate_monitor;
#line 126 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp61_ != NULL) {
#line 1447 "main.c"
		AggregateProgressMonitor* _tmp62_;
#line 127 "/home/jens/Source/shotwell/src/main.vala"
		_tmp62_ = aggregate_monitor;
#line 127 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp62_, "Video.init");
#line 1453 "main.c"
	}
#line 128 "/home/jens/Source/shotwell/src/main.vala"
	_tmp63_ = monitor;
#line 128 "/home/jens/Source/shotwell/src/main.vala"
	_tmp63__target = monitor_target;
#line 128 "/home/jens/Source/shotwell/src/main.vala"
	video_init (_tmp63_, _tmp63__target);
#line 129 "/home/jens/Source/shotwell/src/main.vala"
	_tmp64_ = aggregate_monitor;
#line 129 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp64_ != NULL) {
#line 1465 "main.c"
		AggregateProgressMonitor* _tmp65_;
#line 130 "/home/jens/Source/shotwell/src/main.vala"
		_tmp65_ = aggregate_monitor;
#line 130 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp65_, "Upgrades.execute");
#line 1471 "main.c"
	}
#line 131 "/home/jens/Source/shotwell/src/main.vala"
	_tmp66_ = upgrades_get_instance ();
#line 131 "/home/jens/Source/shotwell/src/main.vala"
	_tmp67_ = _tmp66_;
#line 131 "/home/jens/Source/shotwell/src/main.vala"
	upgrades_execute (_tmp67_, NULL, NULL);
#line 131 "/home/jens/Source/shotwell/src/main.vala"
	_upgrades_unref0 (_tmp67_);
#line 133 "/home/jens/Source/shotwell/src/main.vala"
	library_monitor_pool_init ();
#line 134 "/home/jens/Source/shotwell/src/main.vala"
	media_collection_registry_init ();
#line 135 "/home/jens/Source/shotwell/src/main.vala"
	_tmp68_ = media_collection_registry_get_instance ();
#line 135 "/home/jens/Source/shotwell/src/main.vala"
	registry = _tmp68_;
#line 136 "/home/jens/Source/shotwell/src/main.vala"
	_tmp69_ = registry;
#line 136 "/home/jens/Source/shotwell/src/main.vala"
	_tmp70_ = library_photo_global;
#line 136 "/home/jens/Source/shotwell/src/main.vala"
	media_collection_registry_register_collection (_tmp69_, G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 137 "/home/jens/Source/shotwell/src/main.vala"
	_tmp71_ = registry;
#line 137 "/home/jens/Source/shotwell/src/main.vala"
	_tmp72_ = video_global;
#line 137 "/home/jens/Source/shotwell/src/main.vala"
	media_collection_registry_register_collection (_tmp71_, G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 139 "/home/jens/Source/shotwell/src/main.vala"
	_tmp73_ = aggregate_monitor;
#line 139 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp73_ != NULL) {
#line 1505 "main.c"
		AggregateProgressMonitor* _tmp74_;
#line 140 "/home/jens/Source/shotwell/src/main.vala"
		_tmp74_ = aggregate_monitor;
#line 140 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp74_, "Event.init");
#line 1511 "main.c"
	}
#line 141 "/home/jens/Source/shotwell/src/main.vala"
	_tmp75_ = monitor;
#line 141 "/home/jens/Source/shotwell/src/main.vala"
	_tmp75__target = monitor_target;
#line 141 "/home/jens/Source/shotwell/src/main.vala"
	event_init (_tmp75_, _tmp75__target);
#line 142 "/home/jens/Source/shotwell/src/main.vala"
	_tmp76_ = aggregate_monitor;
#line 142 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp76_ != NULL) {
#line 1523 "main.c"
		AggregateProgressMonitor* _tmp77_;
#line 143 "/home/jens/Source/shotwell/src/main.vala"
		_tmp77_ = aggregate_monitor;
#line 143 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp77_, "Tag.init");
#line 1529 "main.c"
	}
#line 144 "/home/jens/Source/shotwell/src/main.vala"
	_tmp78_ = monitor;
#line 144 "/home/jens/Source/shotwell/src/main.vala"
	_tmp78__target = monitor_target;
#line 144 "/home/jens/Source/shotwell/src/main.vala"
	tag_init (_tmp78_, _tmp78__target);
#line 146 "/home/jens/Source/shotwell/src/main.vala"
	metadata_writer_init ();
#line 147 "/home/jens/Source/shotwell/src/main.vala"
	desktop_integration_init ();
#line 149 "/home/jens/Source/shotwell/src/main.vala"
	_tmp79_ = application_get_instance ();
#line 149 "/home/jens/Source/shotwell/src/main.vala"
	_tmp80_ = _tmp79_;
#line 149 "/home/jens/Source/shotwell/src/main.vala"
	g_signal_emit_by_name (_tmp80_, "init-done");
#line 149 "/home/jens/Source/shotwell/src/main.vala"
	_application_unref0 (_tmp80_);
#line 152 "/home/jens/Source/shotwell/src/main.vala"
	_tmp81_ = aggregate_monitor;
#line 152 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp81_ != NULL) {
#line 1553 "main.c"
		AggregateProgressMonitor* _tmp82_;
#line 153 "/home/jens/Source/shotwell/src/main.vala"
		_tmp82_ = aggregate_monitor;
#line 153 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp82_, "LibraryWindow");
#line 1559 "main.c"
	}
#line 154 "/home/jens/Source/shotwell/src/main.vala"
	_tmp83_ = monitor;
#line 154 "/home/jens/Source/shotwell/src/main.vala"
	_tmp83__target = monitor_target;
#line 154 "/home/jens/Source/shotwell/src/main.vala"
	_tmp84_ = library_window_new (_tmp83_, _tmp83__target);
#line 154 "/home/jens/Source/shotwell/src/main.vala"
	g_object_ref_sink (_tmp84_);
#line 154 "/home/jens/Source/shotwell/src/main.vala"
	library_window = _tmp84_;
#line 156 "/home/jens/Source/shotwell/src/main.vala"
	_tmp85_ = aggregate_monitor;
#line 156 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp85_ != NULL) {
#line 1575 "main.c"
		AggregateProgressMonitor* _tmp86_;
#line 157 "/home/jens/Source/shotwell/src/main.vala"
		_tmp86_ = aggregate_monitor;
#line 157 "/home/jens/Source/shotwell/src/main.vala"
		aggregate_progress_monitor_next_step (_tmp86_, "done");
#line 1581 "main.c"
	}
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor = NULL;
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target = NULL;
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target_destroy_notify = NULL;
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor = NULL;
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target = NULL;
#line 162 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target_destroy_notify = NULL;
#line 163 "/home/jens/Source/shotwell/src/main.vala"
	_aggregate_progress_monitor_unref0 (aggregate_monitor);
#line 163 "/home/jens/Source/shotwell/src/main.vala"
	aggregate_monitor = NULL;
#line 164 "/home/jens/Source/shotwell/src/main.vala"
	_tmp87_ = progress_dialog;
#line 164 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp87_ != NULL) {
#line 1605 "main.c"
		ProgressDialog* _tmp88_;
#line 165 "/home/jens/Source/shotwell/src/main.vala"
		_tmp88_ = progress_dialog;
#line 165 "/home/jens/Source/shotwell/src/main.vala"
		gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, gtk_widget_get_type (), GtkWidget));
#line 1611 "main.c"
	}
#line 166 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (progress_dialog);
#line 166 "/home/jens/Source/shotwell/src/main.vala"
	progress_dialog = NULL;
#line 1617 "main.c"
	{
		gchar** mount_collection = NULL;
		gint mount_collection_length1 = 0;
		gint _mount_collection_size_ = 0;
		gint mount_it = 0;
#line 169 "/home/jens/Source/shotwell/src/main.vala"
		mount_collection = mounts;
#line 169 "/home/jens/Source/shotwell/src/main.vala"
		mount_collection_length1 = mounts_length1;
#line 169 "/home/jens/Source/shotwell/src/main.vala"
		for (mount_it = 0; mount_it < mounts_length1; mount_it = mount_it + 1) {
#line 1629 "main.c"
			gchar* _tmp89_;
			gchar* mount = NULL;
#line 169 "/home/jens/Source/shotwell/src/main.vala"
			_tmp89_ = g_strdup (mount_collection[mount_it]);
#line 169 "/home/jens/Source/shotwell/src/main.vala"
			mount = _tmp89_;
#line 1636 "main.c"
			{
				LibraryWindow* _tmp90_;
				const gchar* _tmp91_;
#line 170 "/home/jens/Source/shotwell/src/main.vala"
				_tmp90_ = library_window;
#line 170 "/home/jens/Source/shotwell/src/main.vala"
				_tmp91_ = mount;
#line 170 "/home/jens/Source/shotwell/src/main.vala"
				library_window_mounted_camera_shell_notification (_tmp90_, _tmp91_, TRUE);
#line 169 "/home/jens/Source/shotwell/src/main.vala"
				_g_free0 (mount);
#line 1648 "main.c"
			}
		}
	}
#line 172 "/home/jens/Source/shotwell/src/main.vala"
	_tmp92_ = library_window;
#line 172 "/home/jens/Source/shotwell/src/main.vala"
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp92_, gtk_widget_get_type (), GtkWidget));
#line 174 "/home/jens/Source/shotwell/src/main.vala"
	_tmp93_ = g_new0 (WelcomeServiceEntry*, 0 + 1);
#line 174 "/home/jens/Source/shotwell/src/main.vala"
	selected_import_entries = _tmp93_;
#line 174 "/home/jens/Source/shotwell/src/main.vala"
	selected_import_entries_length1 = 0;
#line 174 "/home/jens/Source/shotwell/src/main.vala"
	_selected_import_entries_size_ = selected_import_entries_length1;
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	_tmp95_ = config_facade_get_instance ();
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	_tmp96_ = _tmp95_;
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	_tmp97_ = configuration_facade_get_show_welcome_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp96_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (_tmp96_);
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp97_) {
#line 1674 "main.c"
		LibraryPhotoSourceCollection* _tmp98_;
#line 176 "/home/jens/Source/shotwell/src/main.vala"
		_tmp98_ = library_photo_global;
#line 176 "/home/jens/Source/shotwell/src/main.vala"
		_tmp94_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp98_, TYPE_DATA_COLLECTION, DataCollection)) == 0;
#line 1680 "main.c"
	} else {
#line 175 "/home/jens/Source/shotwell/src/main.vala"
		_tmp94_ = FALSE;
#line 1684 "main.c"
	}
#line 175 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp94_) {
#line 1688 "main.c"
		WelcomeDialog* welcome = NULL;
		LibraryWindow* _tmp99_;
		WelcomeDialog* _tmp100_;
		ConfigFacade* _tmp101_;
		ConfigFacade* _tmp102_;
		WelcomeDialog* _tmp103_;
		WelcomeServiceEntry** _tmp104_ = NULL;
		gint _tmp105_;
		gboolean _tmp106_ = FALSE;
		gboolean _tmp107_;
#line 177 "/home/jens/Source/shotwell/src/main.vala"
		_tmp99_ = library_window;
#line 177 "/home/jens/Source/shotwell/src/main.vala"
		_tmp100_ = welcome_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp99_, gtk_window_get_type (), GtkWindow));
#line 177 "/home/jens/Source/shotwell/src/main.vala"
		g_object_ref_sink (_tmp100_);
#line 177 "/home/jens/Source/shotwell/src/main.vala"
		welcome = _tmp100_;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_tmp101_ = config_facade_get_instance ();
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_tmp102_ = _tmp101_;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_tmp103_ = welcome;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_tmp107_ = welcome_dialog_execute (_tmp103_, &_tmp104_, &_tmp105_, &_tmp106_);
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		selected_import_entries = (_vala_array_free (selected_import_entries, selected_import_entries_length1, (GDestroyNotify) g_object_unref), NULL);
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		selected_import_entries = _tmp104_;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		selected_import_entries_length1 = _tmp105_;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_selected_import_entries_size_ = selected_import_entries_length1;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		do_system_pictures_import = _tmp106_;
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		configuration_facade_set_show_welcome_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp107_);
#line 178 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (_tmp102_);
#line 175 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (welcome);
#line 1731 "main.c"
	} else {
		ConfigFacade* _tmp108_;
		ConfigFacade* _tmp109_;
#line 181 "/home/jens/Source/shotwell/src/main.vala"
		_tmp108_ = config_facade_get_instance ();
#line 181 "/home/jens/Source/shotwell/src/main.vala"
		_tmp109_ = _tmp108_;
#line 181 "/home/jens/Source/shotwell/src/main.vala"
		configuration_facade_set_show_welcome_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), FALSE);
#line 181 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (_tmp109_);
#line 1743 "main.c"
	}
#line 184 "/home/jens/Source/shotwell/src/main.vala"
	_tmp110_ = selected_import_entries;
#line 184 "/home/jens/Source/shotwell/src/main.vala"
	_tmp110__length1 = selected_import_entries_length1;
#line 184 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp110__length1 > 0) {
#line 1751 "main.c"
		WelcomeServiceEntry** _tmp111_;
		gint _tmp111__length1;
#line 185 "/home/jens/Source/shotwell/src/main.vala"
		do_external_import = TRUE;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
		_tmp111_ = selected_import_entries;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
		_tmp111__length1 = selected_import_entries_length1;
#line 1760 "main.c"
		{
			WelcomeServiceEntry** entry_collection = NULL;
			gint entry_collection_length1 = 0;
			gint _entry_collection_size_ = 0;
			gint entry_it = 0;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
			entry_collection = _tmp111_;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
			entry_collection_length1 = _tmp111__length1;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
			for (entry_it = 0; entry_it < _tmp111__length1; entry_it = entry_it + 1) {
#line 1772 "main.c"
				WelcomeServiceEntry* _tmp112_;
				WelcomeServiceEntry* entry = NULL;
#line 186 "/home/jens/Source/shotwell/src/main.vala"
				_tmp112_ = _g_object_ref0 (entry_collection[entry_it]);
#line 186 "/home/jens/Source/shotwell/src/main.vala"
				entry = _tmp112_;
#line 1779 "main.c"
				{
					WelcomeServiceEntry* _tmp113_;
#line 187 "/home/jens/Source/shotwell/src/main.vala"
					_tmp113_ = entry;
#line 187 "/home/jens/Source/shotwell/src/main.vala"
					welcome_service_entry_execute (_tmp113_);
#line 186 "/home/jens/Source/shotwell/src/main.vala"
					_g_object_unref0 (entry);
#line 1788 "main.c"
				}
			}
		}
	}
#line 189 "/home/jens/Source/shotwell/src/main.vala"
	_tmp114_ = do_system_pictures_import;
#line 189 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp114_) {
#line 193 "/home/jens/Source/shotwell/src/main.vala"
		run_system_pictures_import (NULL);
#line 1799 "main.c"
	}
#line 196 "/home/jens/Source/shotwell/src/main.vala"
	_tmp115_ = startup_timer;
#line 196 "/home/jens/Source/shotwell/src/main.vala"
	_tmp116_ = g_timer_elapsed (_tmp115_, NULL);
#line 196 "/home/jens/Source/shotwell/src/main.vala"
	g_debug ("main.vala:196: %lf seconds to Gtk.main()", _tmp116_);
#line 198 "/home/jens/Source/shotwell/src/main.vala"
	_tmp117_ = application_get_instance ();
#line 198 "/home/jens/Source/shotwell/src/main.vala"
	_tmp118_ = _tmp117_;
#line 198 "/home/jens/Source/shotwell/src/main.vala"
	application_start (_tmp118_, NULL, 0);
#line 198 "/home/jens/Source/shotwell/src/main.vala"
	_application_unref0 (_tmp118_);
#line 200 "/home/jens/Source/shotwell/src/main.vala"
	desktop_integration_terminate ();
#line 201 "/home/jens/Source/shotwell/src/main.vala"
	metadata_writer_terminate ();
#line 202 "/home/jens/Source/shotwell/src/main.vala"
	tag_terminate ();
#line 203 "/home/jens/Source/shotwell/src/main.vala"
	event_terminate ();
#line 204 "/home/jens/Source/shotwell/src/main.vala"
	library_photo_terminate ();
#line 205 "/home/jens/Source/shotwell/src/main.vala"
	media_collection_registry_terminate ();
#line 206 "/home/jens/Source/shotwell/src/main.vala"
	library_monitor_pool_terminate ();
#line 207 "/home/jens/Source/shotwell/src/main.vala"
	tombstone_terminate ();
#line 208 "/home/jens/Source/shotwell/src/main.vala"
	thumbnail_cache_terminate ();
#line 209 "/home/jens/Source/shotwell/src/main.vala"
	video_terminate ();
#line 210 "/home/jens/Source/shotwell/src/main.vala"
	library_app_terminate ();
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	selected_import_entries = (_vala_array_free (selected_import_entries, selected_import_entries_length1, (GDestroyNotify) g_object_unref), NULL);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (library_window);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_media_collection_registry_unref0 (registry);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	monitor = NULL;
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target = NULL;
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	monitor_target_destroy_notify = NULL;
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_aggregate_progress_monitor_unref0 (aggregate_monitor);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (progress_dialog);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_g_free0 (app_version);
#line 15 "/home/jens/Source/shotwell/src/main.vala"
	_g_free0 (errormsg);
#line 1859 "main.c"
}


static void
_report_system_pictures_import_batch_import_import_reporter (ImportManifest* manifest,
                                                             BatchImportRoll* import_roll,
                                                             gpointer self)
{
#line 225 "/home/jens/Source/shotwell/src/main.vala"
	report_system_pictures_import (manifest, import_roll);
#line 1870 "main.c"
}


void
run_system_pictures_import (ImportManifest* external_exclusion_manifest)
{
	gboolean _tmp0_;
	GeeArrayList* jobs = NULL;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	FileImportJob* _tmp5_;
	FileImportJob* _tmp6_;
	LibraryWindow* library_window = NULL;
	AppWindow* _tmp7_;
	BatchImport* batch_import = NULL;
	GeeArrayList* _tmp8_;
	BatchImport* _tmp9_;
	LibraryWindow* _tmp10_;
	BatchImport* _tmp11_;
	LibraryWindow* _tmp12_;
#line 216 "/home/jens/Source/shotwell/src/main.vala"
	g_return_if_fail ((external_exclusion_manifest == NULL) || IS_IMPORT_MANIFEST (external_exclusion_manifest));
#line 217 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0_ = do_system_pictures_import;
#line 217 "/home/jens/Source/shotwell/src/main.vala"
	if (!_tmp0_) {
#line 218 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1901 "main.c"
	}
#line 220 "/home/jens/Source/shotwell/src/main.vala"
	_tmp1_ = gee_array_list_new (TYPE_FILE_IMPORT_JOB, (GBoxedCopyFunc) batch_import_job_ref, (GDestroyNotify) batch_import_job_unref, NULL, NULL, NULL);
#line 220 "/home/jens/Source/shotwell/src/main.vala"
	jobs = _tmp1_;
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_tmp2_ = jobs;
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_tmp3_ = app_dirs_get_import_dir ();
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_ = _tmp3_;
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_tmp5_ = file_import_job_new (_tmp4_, FALSE, TRUE);
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_tmp6_ = _tmp5_;
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp6_);
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_batch_import_job_unref0 (_tmp6_);
#line 221 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (_tmp4_);
#line 223 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_ = app_window_get_instance ();
#line 223 "/home/jens/Source/shotwell/src/main.vala"
	library_window = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_LIBRARY_WINDOW, LibraryWindow);
#line 225 "/home/jens/Source/shotwell/src/main.vala"
	_tmp8_ = jobs;
#line 225 "/home/jens/Source/shotwell/src/main.vala"
	_tmp9_ = batch_import_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable), "startup_import", _report_system_pictures_import_batch_import_import_reporter, NULL, NULL, NULL, NULL, NULL, external_exclusion_manifest);
#line 225 "/home/jens/Source/shotwell/src/main.vala"
	batch_import = _tmp9_;
#line 227 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_ = library_window;
#line 227 "/home/jens/Source/shotwell/src/main.vala"
	_tmp11_ = batch_import;
#line 227 "/home/jens/Source/shotwell/src/main.vala"
	library_window_enqueue_batch_import (_tmp10_, _tmp11_, TRUE);
#line 229 "/home/jens/Source/shotwell/src/main.vala"
	_tmp12_ = library_window;
#line 229 "/home/jens/Source/shotwell/src/main.vala"
	library_window_switch_to_import_queue_page (_tmp12_);
#line 216 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (batch_import);
#line 216 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (library_window);
#line 216 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (jobs);
#line 1949 "main.c"
}


void
report_system_pictures_import (ImportManifest* manifest,
                               BatchImportRoll* import_roll)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
#line 232 "/home/jens/Source/shotwell/src/main.vala"
	g_return_if_fail (IS_IMPORT_MANIFEST (manifest));
#line 232 "/home/jens/Source/shotwell/src/main.vala"
	g_return_if_fail (IS_BATCH_IMPORT_ROLL (import_roll));
#line 239 "/home/jens/Source/shotwell/src/main.vala"
	_tmp1_ = do_external_import;
#line 239 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp1_) {
#line 1967 "main.c"
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
#line 239 "/home/jens/Source/shotwell/src/main.vala"
		_tmp2_ = manifest->all;
#line 239 "/home/jens/Source/shotwell/src/main.vala"
		_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 239 "/home/jens/Source/shotwell/src/main.vala"
		_tmp4_ = _tmp3_;
#line 239 "/home/jens/Source/shotwell/src/main.vala"
		_tmp0_ = _tmp4_ == 0;
#line 1979 "main.c"
	} else {
#line 239 "/home/jens/Source/shotwell/src/main.vala"
		_tmp0_ = FALSE;
#line 1983 "main.c"
	}
#line 239 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp0_) {
#line 240 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 1989 "main.c"
	}
#line 242 "/home/jens/Source/shotwell/src/main.vala"
	import_ui_report_manifest (manifest, TRUE, NULL);
#line 1993 "main.c"
}


void
editing_exec (const gchar* filename,
              gboolean fullscreen)
{
	GFile* initial_file = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	DirectWindow* direct_window = NULL;
	GFile* _tmp4_;
	DirectWindow* _tmp5_;
	DirectWindow* _tmp6_;
	GTimer* _tmp7_;
	gdouble _tmp8_;
	Application* _tmp13_;
	Application* _tmp14_;
	GError * _inner_error_ = NULL;
#line 245 "/home/jens/Source/shotwell/src/main.vala"
	g_return_if_fail (filename != NULL);
#line 246 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0_ = g_file_new_for_commandline_arg (filename);
#line 246 "/home/jens/Source/shotwell/src/main.vala"
	initial_file = _tmp0_;
#line 249 "/home/jens/Source/shotwell/src/main.vala"
	_tmp1_ = initial_file;
#line 249 "/home/jens/Source/shotwell/src/main.vala"
	direct_preconfigure (_tmp1_);
#line 250 "/home/jens/Source/shotwell/src/main.vala"
	db_preconfigure (NULL);
#line 2025 "main.c"
	{
#line 254 "/home/jens/Source/shotwell/src/main.vala"
		direct_app_init (&_inner_error_);
#line 254 "/home/jens/Source/shotwell/src/main.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2031 "main.c"
			goto __catch235_g_error;
		}
	}
	goto __finally235;
	__catch235_g_error:
	{
		GError* err = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		err = _inner_error_;
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		_inner_error_ = NULL;
#line 256 "/home/jens/Source/shotwell/src/main.vala"
		_tmp2_ = err;
#line 256 "/home/jens/Source/shotwell/src/main.vala"
		_tmp3_ = _tmp2_->message;
#line 256 "/home/jens/Source/shotwell/src/main.vala"
		app_window_panic (_tmp3_);
#line 258 "/home/jens/Source/shotwell/src/main.vala"
		_g_error_free0 (err);
#line 258 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (initial_file);
#line 258 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 2057 "main.c"
	}
	__finally235:
#line 253 "/home/jens/Source/shotwell/src/main.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (initial_file);
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		g_clear_error (&_inner_error_);
#line 253 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 2070 "main.c"
	}
#line 262 "/home/jens/Source/shotwell/src/main.vala"
	desktop_integration_init ();
#line 268 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_ = initial_file;
#line 268 "/home/jens/Source/shotwell/src/main.vala"
	_tmp5_ = direct_window_new (_tmp4_);
#line 268 "/home/jens/Source/shotwell/src/main.vala"
	g_object_ref_sink (_tmp5_);
#line 268 "/home/jens/Source/shotwell/src/main.vala"
	direct_window = _tmp5_;
#line 269 "/home/jens/Source/shotwell/src/main.vala"
	_tmp6_ = direct_window;
#line 269 "/home/jens/Source/shotwell/src/main.vala"
	gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget));
#line 271 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_ = startup_timer;
#line 271 "/home/jens/Source/shotwell/src/main.vala"
	_tmp8_ = g_timer_elapsed (_tmp7_, NULL);
#line 271 "/home/jens/Source/shotwell/src/main.vala"
	g_debug ("main.vala:271: %lf seconds to Gtk.main()", _tmp8_);
#line 273 "/home/jens/Source/shotwell/src/main.vala"
	if (fullscreen) {
#line 2094 "main.c"
		GAction* action = NULL;
		DirectWindow* _tmp9_;
		GAction* _tmp10_;
		GAction* _tmp11_;
#line 274 "/home/jens/Source/shotwell/src/main.vala"
		_tmp9_ = direct_window;
#line 274 "/home/jens/Source/shotwell/src/main.vala"
		_tmp10_ = app_window_get_common_action (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_APP_WINDOW, AppWindow), "CommonFullscreen");
#line 274 "/home/jens/Source/shotwell/src/main.vala"
		action = _tmp10_;
#line 275 "/home/jens/Source/shotwell/src/main.vala"
		_tmp11_ = action;
#line 275 "/home/jens/Source/shotwell/src/main.vala"
		if (_tmp11_ != NULL) {
#line 2109 "main.c"
			GAction* _tmp12_;
#line 276 "/home/jens/Source/shotwell/src/main.vala"
			_tmp12_ = action;
#line 276 "/home/jens/Source/shotwell/src/main.vala"
			g_action_activate (_tmp12_, NULL);
#line 2115 "main.c"
		}
#line 273 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (action);
#line 2119 "main.c"
	}
#line 280 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_ = application_get_instance ();
#line 280 "/home/jens/Source/shotwell/src/main.vala"
	_tmp14_ = _tmp13_;
#line 280 "/home/jens/Source/shotwell/src/main.vala"
	application_start (_tmp14_, NULL, 0);
#line 280 "/home/jens/Source/shotwell/src/main.vala"
	_application_unref0 (_tmp14_);
#line 282 "/home/jens/Source/shotwell/src/main.vala"
	desktop_integration_terminate ();
#line 285 "/home/jens/Source/shotwell/src/main.vala"
	direct_app_terminate ();
#line 245 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (direct_window);
#line 245 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (initial_file);
#line 2137 "main.c"
}


static GOptionEntry*
_vala_array_dup22 (GOptionEntry* self,
                   int length)
{
#line 300 "/home/jens/Source/shotwell/src/main.vala"
	return g_memdup (self, length * sizeof (GOptionEntry));
#line 2147 "main.c"
}


static void
_vala_array_add72 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 304 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 304 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2163 "main.c"
	}
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2167 "main.c"
}


static void
_vala_array_add73 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 308 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 308 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2183 "main.c"
	}
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2187 "main.c"
}


static void
_vala_array_add74 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 312 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 312 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2203 "main.c"
	}
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2207 "main.c"
}


static void
_vala_array_add75 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 316 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 316 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2223 "main.c"
	}
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2227 "main.c"
}


static void
_vala_array_add76 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 320 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 320 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2243 "main.c"
	}
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2247 "main.c"
}


static void
_vala_array_add77 (GOptionEntry* * array,
                   int* length,
                   int* size,
                   const GOptionEntry* value)
{
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 323 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 323 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (GOptionEntry, *array, *size);
#line 2263 "main.c"
	}
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = *value;
#line 2267 "main.c"
}


static GOptionEntry*
_vala_array_dup23 (GOptionEntry* self,
                   int length)
{
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	return g_memdup (self, length * sizeof (GOptionEntry));
#line 2277 "main.c"
}


GOptionEntry*
commandline_options_get_options (int* result_length1)
{
	GOptionEntry* result = NULL;
	GOptionEntry* _tmp0_;
	gint _tmp0__length1;
	GOptionEntry datadir = {0};
	GOptionEntry _tmp4_ = {0};
	GOptionEntry* _tmp5_;
	gint _tmp5__length1;
	GOptionEntry _tmp6_;
	GOptionEntry no_monitoring = {0};
	GOptionEntry _tmp7_ = {0};
	GOptionEntry* _tmp8_;
	gint _tmp8__length1;
	GOptionEntry _tmp9_;
	GOptionEntry no_startup = {0};
	GOptionEntry _tmp10_ = {0};
	GOptionEntry* _tmp11_;
	gint _tmp11__length1;
	GOptionEntry _tmp12_;
	GOptionEntry version = {0};
	GOptionEntry _tmp13_ = {0};
	GOptionEntry* _tmp14_;
	gint _tmp14__length1;
	GOptionEntry _tmp15_;
	GOptionEntry fullscreen = {0};
	GOptionEntry _tmp16_ = {0};
	GOptionEntry* _tmp17_;
	gint _tmp17__length1;
	GOptionEntry _tmp18_;
	GOptionEntry terminator = {0};
	GOptionEntry _tmp19_ = {0};
	GOptionEntry* _tmp20_;
	gint _tmp20__length1;
	GOptionEntry _tmp21_;
	GOptionEntry* _tmp22_;
	gint _tmp22__length1;
	GOptionEntry* _tmp23_;
	gint _tmp23__length1;
	GOptionEntry* _tmp24_;
	gint _tmp24__length1;
#line 299 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0_ = commandline_options_entries;
#line 299 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0__length1 = commandline_options_entries_length1;
#line 299 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp0_ != NULL) {
#line 2329 "main.c"
		GOptionEntry* _tmp1_;
		gint _tmp1__length1;
		GOptionEntry* _tmp2_;
		gint _tmp2__length1;
		GOptionEntry* _tmp3_;
		gint _tmp3__length1;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp1_ = commandline_options_entries;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp1__length1 = commandline_options_entries_length1;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp2_ = (_tmp1_ != NULL) ? _vala_array_dup22 (_tmp1_, _tmp1__length1) : ((gpointer) _tmp1_);
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp2__length1 = _tmp1__length1;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp3_ = _tmp2_;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		_tmp3__length1 = _tmp2__length1;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		if (result_length1) {
#line 300 "/home/jens/Source/shotwell/src/main.vala"
			*result_length1 = _tmp3__length1;
#line 2352 "main.c"
		}
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		result = _tmp3_;
#line 300 "/home/jens/Source/shotwell/src/main.vala"
		return result;
#line 2358 "main.c"
	}
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.long_name = "datadir";
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.short_name = 'd';
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.flags = 0;
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.arg = G_OPTION_ARG_FILENAME;
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.arg_data = &commandline_options_data_dir;
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.description = _ ("Path to Shotwell’s private data");
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	_tmp4_.arg_description = _ ("DIRECTORY");
#line 302 "/home/jens/Source/shotwell/src/main.vala"
	datadir = _tmp4_;
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	_tmp5_ = commandline_options_entries;
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	_tmp5__length1 = commandline_options_entries_length1;
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	_tmp6_ = datadir;
#line 304 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add72 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp6_);
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.long_name = "no-runtime-monitoring";
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.short_name = (gchar) 0;
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.flags = 0;
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.arg = G_OPTION_ARG_NONE;
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.arg_data = &commandline_options_no_runtime_monitoring;
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.description = _ ("Do not monitor library directory at runtime for changes");
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	_tmp7_.arg_description = NULL;
#line 306 "/home/jens/Source/shotwell/src/main.vala"
	no_monitoring = _tmp7_;
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	_tmp8_ = commandline_options_entries;
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	_tmp8__length1 = commandline_options_entries_length1;
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	_tmp9_ = no_monitoring;
#line 308 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add73 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp9_);
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.long_name = "no-startup-progress";
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.short_name = (gchar) 0;
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.flags = 0;
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.arg = G_OPTION_ARG_NONE;
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.arg_data = &commandline_options_no_startup_progress;
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.description = _ ("Don’t display startup progress meter");
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	_tmp10_.arg_description = NULL;
#line 310 "/home/jens/Source/shotwell/src/main.vala"
	no_startup = _tmp10_;
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	_tmp11_ = commandline_options_entries;
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	_tmp11__length1 = commandline_options_entries_length1;
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	_tmp12_ = no_startup;
#line 312 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add74 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp12_);
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.long_name = "version";
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.short_name = 'V';
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.flags = 0;
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.arg = G_OPTION_ARG_NONE;
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.arg_data = &commandline_options_show_version;
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.description = _ ("Show the application’s version");
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	_tmp13_.arg_description = NULL;
#line 314 "/home/jens/Source/shotwell/src/main.vala"
	version = _tmp13_;
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	_tmp14_ = commandline_options_entries;
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	_tmp14__length1 = commandline_options_entries_length1;
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	_tmp15_ = version;
#line 316 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add75 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp15_);
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.long_name = "fullscreen";
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.short_name = 'f';
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.flags = 0;
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.arg = G_OPTION_ARG_NONE;
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.arg_data = &commandline_options_fullscreen;
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.description = _ ("Start the application in fullscreen mode");
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	_tmp16_.arg_description = NULL;
#line 318 "/home/jens/Source/shotwell/src/main.vala"
	fullscreen = _tmp16_;
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	_tmp17_ = commandline_options_entries;
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	_tmp17__length1 = commandline_options_entries_length1;
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	_tmp18_ = fullscreen;
#line 320 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add76 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp18_);
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.long_name = NULL;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.short_name = (gchar) 0;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.flags = 0;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.arg = 0;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.arg_data = NULL;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.description = NULL;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_.arg_description = NULL;
#line 322 "/home/jens/Source/shotwell/src/main.vala"
	terminator = _tmp19_;
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	_tmp20_ = commandline_options_entries;
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	_tmp20__length1 = commandline_options_entries_length1;
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	_tmp21_ = terminator;
#line 323 "/home/jens/Source/shotwell/src/main.vala"
	_vala_array_add77 (&commandline_options_entries, &commandline_options_entries_length1, &_commandline_options_entries_size_, &_tmp21_);
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp22_ = commandline_options_entries;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp22__length1 = commandline_options_entries_length1;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp23_ = (_tmp22_ != NULL) ? _vala_array_dup23 (_tmp22_, _tmp22__length1) : ((gpointer) _tmp22_);
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp23__length1 = _tmp22__length1;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp24_ = _tmp23_;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	_tmp24__length1 = _tmp23__length1;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	if (result_length1) {
#line 325 "/home/jens/Source/shotwell/src/main.vala"
		*result_length1 = _tmp24__length1;
#line 2520 "main.c"
	}
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	result = _tmp24_;
#line 325 "/home/jens/Source/shotwell/src/main.vala"
	return result;
#line 2526 "main.c"
}


static void
_vala_array_add78 (gchar** * array,
                   int* length,
                   int* size,
                   gchar* value)
{
#line 390 "/home/jens/Source/shotwell/src/main.vala"
	if ((*length) == (*size)) {
#line 390 "/home/jens/Source/shotwell/src/main.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 2542 "main.c"
	}
#line 390 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[(*length)++] = value;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
	(*array)[*length] = NULL;
#line 2548 "main.c"
}


static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gboolean result = FALSE;
	gchar* _tmp0_;
#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	result = _tmp0_ != NULL;
#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
	return result;
#line 2568 "main.c"
}


void
_vala_main (gchar** args,
            int args_length1)
{
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp18_;
	gchar** mounts = NULL;
	gchar** _tmp19_;
	gint mounts_length1;
	gint _mounts_size_;
	gchar* filename = NULL;
	const gchar* _tmp35_ = NULL;
	const gchar* _tmp36_;
	GDateTime* _tmp41_;
	GDateTime* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	GTimer* _tmp47_;
	GTimer* _tmp48_;
	const gchar* _tmp49_;
	gboolean _tmp53_ = FALSE;
	const gchar* _tmp54_;
	GError * _inner_error_ = NULL;
#line 333 "/home/jens/Source/shotwell/src/main.vala"
	_tmp0_ = args[0];
#line 333 "/home/jens/Source/shotwell/src/main.vala"
	app_dirs_init (_tmp0_);
#line 338 "/home/jens/Source/shotwell/src/main.vala"
	gexiv2_initialize ();
#line 339 "/home/jens/Source/shotwell/src/main.vala"
	gexiv2_log_use_glib_logging ();
#line 343 "/home/jens/Source/shotwell/src/main.vala"
	gexiv2_log_set_level (GEXIV2_LOG_LEVEL_DEBUG);
#line 349 "/home/jens/Source/shotwell/src/main.vala"
	_tmp1_ = app_dirs_get_install_dir ();
#line 349 "/home/jens/Source/shotwell/src/main.vala"
	_tmp2_ = _tmp1_;
#line 349 "/home/jens/Source/shotwell/src/main.vala"
	_tmp3_ = _tmp2_ == NULL;
#line 349 "/home/jens/Source/shotwell/src/main.vala"
	_g_object_unref0 (_tmp2_);
#line 349 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp3_) {
#line 2619 "main.c"
		GFile* _tmp4_;
		GFile* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp4_ = app_dirs_get_lib_dir ();
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp5_ = _tmp4_;
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp7_ = _tmp6_;
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp8_ = g_strconcat (_tmp7_, "/misc", NULL);
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_tmp9_ = _tmp8_;
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		g_setenv ("GSETTINGS_SCHEMA_DIR", _tmp9_, TRUE);
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (_tmp9_);
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (_tmp7_);
#line 350 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (_tmp5_);
#line 2646 "main.c"
	}
	{
		gint _tmp10_;
		GOptionEntry* _tmp11_;
		GOptionEntry* _tmp12_;
		gint _tmp12__length1;
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		_tmp11_ = commandline_options_get_options (&_tmp10_);
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		_tmp12_ = _tmp11_;
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		_tmp12__length1 = _tmp10_;
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		gtk_init_with_args (&args_length1, &args, _ ("[FILE]"), _tmp12_, RESOURCES_APP_GETTEXT_PACKAGE, &_inner_error_);
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		_tmp12_ = (g_free (_tmp12_), NULL);
#line 356 "/home/jens/Source/shotwell/src/main.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2665 "main.c"
			goto __catch236_g_error;
		}
	}
	goto __finally236;
	__catch236_g_error:
	{
		GError* e = NULL;
		GError* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		const gchar* _tmp17_;
#line 355 "/home/jens/Source/shotwell/src/main.vala"
		e = _inner_error_;
#line 355 "/home/jens/Source/shotwell/src/main.vala"
		_inner_error_ = NULL;
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		_tmp13_ = e;
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		_tmp14_ = _tmp13_->message;
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		_tmp15_ = g_strconcat (_tmp14_, "\n", NULL);
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		_tmp16_ = _tmp15_;
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		g_print ("%s", _tmp16_);
#line 359 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (_tmp16_);
#line 360 "/home/jens/Source/shotwell/src/main.vala"
		_tmp17_ = args[0];
#line 360 "/home/jens/Source/shotwell/src/main.vala"
		g_print (_ ("Run “%s --help” to see a full list of available command line options.\n"), _tmp17_);
#line 361 "/home/jens/Source/shotwell/src/main.vala"
		app_dirs_terminate ();
#line 362 "/home/jens/Source/shotwell/src/main.vala"
		_g_error_free0 (e);
#line 362 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 2704 "main.c"
	}
	__finally236:
#line 355 "/home/jens/Source/shotwell/src/main.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 355 "/home/jens/Source/shotwell/src/main.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 355 "/home/jens/Source/shotwell/src/main.vala"
		g_clear_error (&_inner_error_);
#line 355 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 2715 "main.c"
	}
#line 365 "/home/jens/Source/shotwell/src/main.vala"
	_tmp18_ = commandline_options_show_version;
#line 365 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp18_) {
#line 366 "/home/jens/Source/shotwell/src/main.vala"
		if (RESOURCES_GIT_VERSION != NULL) {
#line 367 "/home/jens/Source/shotwell/src/main.vala"
			g_print ("%s %s (%s)\n", RESOURCES_APP_TITLE, RESOURCES_APP_VERSION, RESOURCES_GIT_VERSION);
#line 2725 "main.c"
		} else {
#line 369 "/home/jens/Source/shotwell/src/main.vala"
			g_print ("%s %s\n", RESOURCES_APP_TITLE, RESOURCES_APP_VERSION);
#line 2729 "main.c"
		}
#line 371 "/home/jens/Source/shotwell/src/main.vala"
		app_dirs_terminate ();
#line 373 "/home/jens/Source/shotwell/src/main.vala"
		return;
#line 2735 "main.c"
	}
#line 383 "/home/jens/Source/shotwell/src/main.vala"
	_tmp19_ = g_new0 (gchar*, 0 + 1);
#line 383 "/home/jens/Source/shotwell/src/main.vala"
	mounts = _tmp19_;
#line 383 "/home/jens/Source/shotwell/src/main.vala"
	mounts_length1 = 0;
#line 383 "/home/jens/Source/shotwell/src/main.vala"
	_mounts_size_ = mounts_length1;
#line 384 "/home/jens/Source/shotwell/src/main.vala"
	filename = NULL;
#line 2747 "main.c"
	{
		gint ctr = 0;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
		ctr = 1;
#line 2752 "main.c"
		{
			gboolean _tmp20_ = FALSE;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
			_tmp20_ = TRUE;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
			while (TRUE) {
#line 2759 "main.c"
				gint _tmp22_;
				gchar* arg = NULL;
				gint _tmp23_;
				const gchar* _tmp24_;
				gchar* _tmp25_;
				const gchar* _tmp26_;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
				if (!_tmp20_) {
#line 2768 "main.c"
					gint _tmp21_;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
					_tmp21_ = ctr;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
					ctr = _tmp21_ + 1;
#line 2774 "main.c"
				}
#line 386 "/home/jens/Source/shotwell/src/main.vala"
				_tmp20_ = FALSE;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
				_tmp22_ = ctr;
#line 386 "/home/jens/Source/shotwell/src/main.vala"
				if (!(_tmp22_ < args_length1)) {
#line 386 "/home/jens/Source/shotwell/src/main.vala"
					break;
#line 2784 "main.c"
				}
#line 387 "/home/jens/Source/shotwell/src/main.vala"
				_tmp23_ = ctr;
#line 387 "/home/jens/Source/shotwell/src/main.vala"
				_tmp24_ = args[_tmp23_];
#line 387 "/home/jens/Source/shotwell/src/main.vala"
				_tmp25_ = g_strdup (_tmp24_);
#line 387 "/home/jens/Source/shotwell/src/main.vala"
				arg = _tmp25_;
#line 389 "/home/jens/Source/shotwell/src/main.vala"
				_tmp26_ = arg;
#line 389 "/home/jens/Source/shotwell/src/main.vala"
				if (library_window_is_mount_uri_supported (_tmp26_)) {
#line 2798 "main.c"
					gchar** _tmp27_;
					gint _tmp27__length1;
					const gchar* _tmp28_;
					gchar* _tmp29_;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
					_tmp27_ = mounts;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
					_tmp27__length1 = mounts_length1;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
					_tmp28_ = arg;
#line 390 "/home/jens/Source/shotwell/src/main.vala"
					_tmp29_ = g_strdup (_tmp28_);
#line 390 "/home/jens/Source/shotwell/src/main.vala"
					_vala_array_add78 (&mounts, &mounts_length1, &_mounts_size_, _tmp29_);
#line 2813 "main.c"
				} else {
					gboolean _tmp30_ = FALSE;
					const gchar* _tmp31_;
#line 391 "/home/jens/Source/shotwell/src/main.vala"
					_tmp31_ = filename;
#line 391 "/home/jens/Source/shotwell/src/main.vala"
					if (is_string_empty (_tmp31_)) {
#line 2821 "main.c"
						const gchar* _tmp32_;
#line 391 "/home/jens/Source/shotwell/src/main.vala"
						_tmp32_ = arg;
#line 391 "/home/jens/Source/shotwell/src/main.vala"
						_tmp30_ = !string_contains (_tmp32_, "://");
#line 2827 "main.c"
					} else {
#line 391 "/home/jens/Source/shotwell/src/main.vala"
						_tmp30_ = FALSE;
#line 2831 "main.c"
					}
#line 391 "/home/jens/Source/shotwell/src/main.vala"
					if (_tmp30_) {
#line 2835 "main.c"
						const gchar* _tmp33_;
						gchar* _tmp34_;
#line 392 "/home/jens/Source/shotwell/src/main.vala"
						_tmp33_ = arg;
#line 392 "/home/jens/Source/shotwell/src/main.vala"
						_tmp34_ = g_strdup (_tmp33_);
#line 392 "/home/jens/Source/shotwell/src/main.vala"
						_g_free0 (filename);
#line 392 "/home/jens/Source/shotwell/src/main.vala"
						filename = _tmp34_;
#line 2846 "main.c"
					}
				}
#line 386 "/home/jens/Source/shotwell/src/main.vala"
				_g_free0 (arg);
#line 2851 "main.c"
			}
		}
	}
#line 396 "/home/jens/Source/shotwell/src/main.vala"
	_tmp36_ = filename;
#line 396 "/home/jens/Source/shotwell/src/main.vala"
	if (is_string_empty (_tmp36_)) {
#line 396 "/home/jens/Source/shotwell/src/main.vala"
		_tmp35_ = DEBUG_LIBRARY_PREFIX;
#line 2861 "main.c"
	} else {
#line 396 "/home/jens/Source/shotwell/src/main.vala"
		_tmp35_ = DEBUG_VIEWER_PREFIX;
#line 2865 "main.c"
	}
#line 396 "/home/jens/Source/shotwell/src/main.vala"
	debug_init (_tmp35_);
#line 398 "/home/jens/Source/shotwell/src/main.vala"
	if (RESOURCES_GIT_VERSION != NULL) {
#line 2871 "main.c"
		const gchar* _tmp37_ = NULL;
		const gchar* _tmp38_;
#line 400 "/home/jens/Source/shotwell/src/main.vala"
		_tmp38_ = filename;
#line 400 "/home/jens/Source/shotwell/src/main.vala"
		if (is_string_empty (_tmp38_)) {
#line 400 "/home/jens/Source/shotwell/src/main.vala"
			_tmp37_ = RESOURCES_APP_LIBRARY_ROLE;
#line 2880 "main.c"
		} else {
#line 400 "/home/jens/Source/shotwell/src/main.vala"
			_tmp37_ = RESOURCES_APP_DIRECT_ROLE;
#line 2884 "main.c"
		}
#line 399 "/home/jens/Source/shotwell/src/main.vala"
		g_message ("main.vala:399: Shotwell %s %s (%s)", _tmp37_, RESOURCES_APP_VERSION, RESOURCES_GIT_VERSION);
#line 2888 "main.c"
	} else {
		const gchar* _tmp39_ = NULL;
		const gchar* _tmp40_;
#line 404 "/home/jens/Source/shotwell/src/main.vala"
		_tmp40_ = filename;
#line 404 "/home/jens/Source/shotwell/src/main.vala"
		if (is_string_empty (_tmp40_)) {
#line 404 "/home/jens/Source/shotwell/src/main.vala"
			_tmp39_ = RESOURCES_APP_LIBRARY_ROLE;
#line 2898 "main.c"
		} else {
#line 404 "/home/jens/Source/shotwell/src/main.vala"
			_tmp39_ = RESOURCES_APP_DIRECT_ROLE;
#line 2902 "main.c"
		}
#line 403 "/home/jens/Source/shotwell/src/main.vala"
		g_message ("main.vala:403: Shotwell %s %s", _tmp39_, RESOURCES_APP_VERSION);
#line 2906 "main.c"
	}
#line 407 "/home/jens/Source/shotwell/src/main.vala"
	_tmp41_ = g_date_time_new_now_local ();
#line 407 "/home/jens/Source/shotwell/src/main.vala"
	_tmp42_ = _tmp41_;
#line 407 "/home/jens/Source/shotwell/src/main.vala"
	_tmp43_ = g_date_time_get_timezone_abbreviation (_tmp42_);
#line 407 "/home/jens/Source/shotwell/src/main.vala"
	g_debug ("main.vala:407: Shotwell is running in timezone %s", _tmp43_);
#line 407 "/home/jens/Source/shotwell/src/main.vala"
	_g_date_time_unref0 (_tmp42_);
#line 412 "/home/jens/Source/shotwell/src/main.vala"
	_tmp44_ = filename;
#line 412 "/home/jens/Source/shotwell/src/main.vala"
	application_init (!is_string_empty (_tmp44_));
#line 415 "/home/jens/Source/shotwell/src/main.vala"
	_tmp45_ = commandline_options_data_dir;
#line 415 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp45_ != NULL) {
#line 2926 "main.c"
		const gchar* _tmp46_;
#line 416 "/home/jens/Source/shotwell/src/main.vala"
		_tmp46_ = commandline_options_data_dir;
#line 416 "/home/jens/Source/shotwell/src/main.vala"
		app_dirs_set_data_dir (_tmp46_);
#line 2932 "main.c"
	} else {
#line 418 "/home/jens/Source/shotwell/src/main.vala"
		app_dirs_try_migrate_data ();
#line 2936 "main.c"
	}
#line 421 "/home/jens/Source/shotwell/src/main.vala"
	app_dirs_verify_data_dir ();
#line 422 "/home/jens/Source/shotwell/src/main.vala"
	app_dirs_verify_cache_dir ();
#line 425 "/home/jens/Source/shotwell/src/main.vala"
	international_support_init (RESOURCES_APP_GETTEXT_PACKAGE, args, args_length1, INTERNATIONAL_SUPPORT_SYSTEM_LOCALE);
#line 427 "/home/jens/Source/shotwell/src/main.vala"
	_tmp47_ = g_timer_new ();
#line 427 "/home/jens/Source/shotwell/src/main.vala"
	_g_timer_destroy0 (startup_timer);
#line 427 "/home/jens/Source/shotwell/src/main.vala"
	startup_timer = _tmp47_;
#line 428 "/home/jens/Source/shotwell/src/main.vala"
	_tmp48_ = startup_timer;
#line 428 "/home/jens/Source/shotwell/src/main.vala"
	g_timer_start (_tmp48_);
#line 431 "/home/jens/Source/shotwell/src/main.vala"
	g_set_application_name (RESOURCES_APP_TITLE);
#line 435 "/home/jens/Source/shotwell/src/main.vala"
	resources_init ();
#line 440 "/home/jens/Source/shotwell/src/main.vala"
	_tmp49_ = filename;
#line 440 "/home/jens/Source/shotwell/src/main.vala"
	if (is_string_empty (_tmp49_)) {
#line 2962 "main.c"
		gchar** _tmp50_;
		gint _tmp50__length1;
#line 441 "/home/jens/Source/shotwell/src/main.vala"
		_tmp50_ = mounts;
#line 441 "/home/jens/Source/shotwell/src/main.vala"
		_tmp50__length1 = mounts_length1;
#line 441 "/home/jens/Source/shotwell/src/main.vala"
		library_exec (_tmp50_, _tmp50__length1);
#line 2971 "main.c"
	} else {
		const gchar* _tmp51_;
		gboolean _tmp52_;
#line 443 "/home/jens/Source/shotwell/src/main.vala"
		_tmp51_ = filename;
#line 443 "/home/jens/Source/shotwell/src/main.vala"
		_tmp52_ = commandline_options_fullscreen;
#line 443 "/home/jens/Source/shotwell/src/main.vala"
		editing_exec (_tmp51_, _tmp52_);
#line 2981 "main.c"
	}
#line 446 "/home/jens/Source/shotwell/src/main.vala"
	resources_terminate ();
#line 447 "/home/jens/Source/shotwell/src/main.vala"
	application_terminate ();
#line 448 "/home/jens/Source/shotwell/src/main.vala"
	debug_terminate ();
#line 449 "/home/jens/Source/shotwell/src/main.vala"
	app_dirs_terminate ();
#line 454 "/home/jens/Source/shotwell/src/main.vala"
	_tmp54_ = filename;
#line 454 "/home/jens/Source/shotwell/src/main.vala"
	if (is_string_empty (_tmp54_)) {
#line 2995 "main.c"
		gboolean _tmp55_;
#line 454 "/home/jens/Source/shotwell/src/main.vala"
		_tmp55_ = was_already_running;
#line 454 "/home/jens/Source/shotwell/src/main.vala"
		_tmp53_ = !_tmp55_;
#line 3001 "main.c"
	} else {
#line 454 "/home/jens/Source/shotwell/src/main.vala"
		_tmp53_ = FALSE;
#line 3005 "main.c"
	}
#line 454 "/home/jens/Source/shotwell/src/main.vala"
	if (_tmp53_) {
#line 3009 "main.c"
		gchar* orig_path = NULL;
		GFile* _tmp56_;
		GFile* _tmp57_;
		GFile* _tmp58_;
		GFile* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		gchar* backup_path = NULL;
		const gchar* _tmp62_;
		gchar* _tmp63_;
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp56_ = app_dirs_get_data_subdir ("data", NULL);
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp57_ = _tmp56_;
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp58_ = g_file_get_child (_tmp57_, "photo.db");
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp59_ = _tmp58_;
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp60_ = g_file_get_path (_tmp59_);
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_tmp61_ = _tmp60_;
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (_tmp59_);
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		_g_object_unref0 (_tmp57_);
#line 455 "/home/jens/Source/shotwell/src/main.vala"
		orig_path = _tmp61_;
#line 456 "/home/jens/Source/shotwell/src/main.vala"
		_tmp62_ = orig_path;
#line 456 "/home/jens/Source/shotwell/src/main.vala"
		_tmp63_ = g_strconcat (_tmp62_, ".bak", NULL);
#line 456 "/home/jens/Source/shotwell/src/main.vala"
		backup_path = _tmp63_;
#line 3044 "main.c"
		{
			GFile* src = NULL;
			const gchar* _tmp64_;
			GFile* _tmp65_;
			GFile* dest = NULL;
			const gchar* _tmp66_;
			GFile* _tmp67_;
			GFile* _tmp68_;
			GFile* _tmp69_;
#line 458 "/home/jens/Source/shotwell/src/main.vala"
			_tmp64_ = orig_path;
#line 458 "/home/jens/Source/shotwell/src/main.vala"
			_tmp65_ = g_file_new_for_commandline_arg (_tmp64_);
#line 458 "/home/jens/Source/shotwell/src/main.vala"
			src = _tmp65_;
#line 459 "/home/jens/Source/shotwell/src/main.vala"
			_tmp66_ = backup_path;
#line 459 "/home/jens/Source/shotwell/src/main.vala"
			_tmp67_ = g_file_new_for_commandline_arg (_tmp66_);
#line 459 "/home/jens/Source/shotwell/src/main.vala"
			dest = _tmp67_;
#line 460 "/home/jens/Source/shotwell/src/main.vala"
			_tmp68_ = src;
#line 460 "/home/jens/Source/shotwell/src/main.vala"
			_tmp69_ = dest;
#line 460 "/home/jens/Source/shotwell/src/main.vala"
			g_file_copy (_tmp68_, _tmp69_, G_FILE_COPY_OVERWRITE | G_FILE_COPY_ALL_METADATA, NULL, NULL, NULL, &_inner_error_);
#line 460 "/home/jens/Source/shotwell/src/main.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 460 "/home/jens/Source/shotwell/src/main.vala"
				_g_object_unref0 (dest);
#line 460 "/home/jens/Source/shotwell/src/main.vala"
				_g_object_unref0 (src);
#line 3078 "main.c"
				goto __catch237_g_error;
			}
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_object_unref0 (dest);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_object_unref0 (src);
#line 3085 "main.c"
		}
		goto __finally237;
		__catch237_g_error:
		{
			GError* _error_ = NULL;
			GError* _tmp70_;
			const gchar* _tmp71_;
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_error_ = _inner_error_;
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_inner_error_ = NULL;
#line 464 "/home/jens/Source/shotwell/src/main.vala"
			_tmp70_ = _error_;
#line 464 "/home/jens/Source/shotwell/src/main.vala"
			_tmp71_ = _tmp70_->message;
#line 464 "/home/jens/Source/shotwell/src/main.vala"
			g_warning ("main.vala:464: Failed to create backup file of database: %s", _tmp71_);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_error_free0 (_error_);
#line 3105 "main.c"
		}
		__finally237:
#line 457 "/home/jens/Source/shotwell/src/main.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (backup_path);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (orig_path);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			_g_free0 (filename);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			mounts = (_vala_array_free (mounts, mounts_length1, (GDestroyNotify) g_free), NULL);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			g_clear_error (&_inner_error_);
#line 457 "/home/jens/Source/shotwell/src/main.vala"
			return;
#line 3124 "main.c"
		}
#line 467 "/home/jens/Source/shotwell/src/main.vala"
		sync ();
#line 454 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (backup_path);
#line 454 "/home/jens/Source/shotwell/src/main.vala"
		_g_free0 (orig_path);
#line 3132 "main.c"
	}
#line 330 "/home/jens/Source/shotwell/src/main.vala"
	_g_free0 (filename);
#line 330 "/home/jens/Source/shotwell/src/main.vala"
	mounts = (_vala_array_free (mounts, mounts_length1, (GDestroyNotify) g_free), NULL);
#line 3138 "main.c"
}


int
main (int argc,
      char ** argv)
{
#line 330 "/home/jens/Source/shotwell/src/main.vala"
	_vala_main (argv, argc);
#line 330 "/home/jens/Source/shotwell/src/main.vala"
	return 0;
#line 3150 "main.c"
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}