summaryrefslogtreecommitdiff
path: root/src/direct/DirectPhotoPage.c
blob: aeefa9881087a261fc2615cb0bfb900de63c1b01 (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
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
/* DirectPhotoPage.c generated by valac 0.34.4, the Vala compiler
 * generated from DirectPhotoPage.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <cairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <float.h>
#include <math.h>


#define TYPE_PAGE (page_get_type ())
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))

typedef struct _Page Page;
typedef struct _PageClass PageClass;
typedef struct _PagePrivate PagePrivate;

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_FULLSCREEN_WINDOW (fullscreen_window_get_type ())
#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow))
#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))
#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW))
#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW))
#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass))

typedef struct _FullscreenWindow FullscreenWindow;
typedef struct _FullscreenWindowClass FullscreenWindowClass;

#define TYPE_INJECTION_GROUP (injection_group_get_type ())
#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup))
#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass))
#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP))
#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP))
#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass))

typedef struct _InjectionGroup InjectionGroup;
typedef struct _InjectionGroupClass InjectionGroupClass;

#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ())
#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage))
#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))
#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE))
#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE))
#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))

typedef struct _SinglePhotoPage SinglePhotoPage;
typedef struct _SinglePhotoPageClass SinglePhotoPageClass;
typedef struct _SinglePhotoPagePrivate SinglePhotoPagePrivate;

#define TYPE_ZOOM_BUFFER (zoom_buffer_get_type ())
#define ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZOOM_BUFFER, ZoomBuffer))
#define ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZOOM_BUFFER, ZoomBufferClass))
#define IS_ZOOM_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZOOM_BUFFER))
#define IS_ZOOM_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZOOM_BUFFER))
#define ZOOM_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZOOM_BUFFER, ZoomBufferClass))

typedef struct _ZoomBuffer ZoomBuffer;
typedef struct _ZoomBufferClass ZoomBufferClass;

#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;

#define SINGLE_PHOTO_PAGE_TYPE_UPDATE_REASON (single_photo_page_update_reason_get_type ())

#define TYPE_EDITING_HOST_PAGE (editing_host_page_get_type ())
#define EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPage))
#define EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDITING_HOST_PAGE, EditingHostPageClass))
#define IS_EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDITING_HOST_PAGE))
#define IS_EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDITING_HOST_PAGE))
#define EDITING_HOST_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPageClass))

typedef struct _EditingHostPage EditingHostPage;
typedef struct _EditingHostPageClass EditingHostPageClass;
typedef struct _EditingHostPagePrivate EditingHostPagePrivate;

#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_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))

typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;

#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))

typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;

#define TYPE_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))

typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;

#define TYPE_DIRECT_PHOTO_PAGE (direct_photo_page_get_type ())
#define DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage))
#define DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass))
#define IS_DIRECT_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_PAGE))
#define IS_DIRECT_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_PAGE))
#define DIRECT_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPageClass))

typedef struct _DirectPhotoPage DirectPhotoPage;
typedef struct _DirectPhotoPageClass DirectPhotoPageClass;
typedef struct _DirectPhotoPagePrivate DirectPhotoPagePrivate;

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))

typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;

#define TYPE_DIRECT_VIEW_COLLECTION (direct_view_collection_get_type ())
#define DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollection))
#define DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass))
#define IS_DIRECT_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW_COLLECTION))
#define IS_DIRECT_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW_COLLECTION))
#define DIRECT_VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW_COLLECTION, DirectViewCollectionClass))

typedef struct _DirectViewCollection DirectViewCollection;
typedef struct _DirectViewCollectionClass DirectViewCollectionClass;

#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_DIRECT_PHOTO_SOURCE_COLLECTION (direct_photo_source_collection_get_type ())
#define DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollection))
#define DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass))
#define IS_DIRECT_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION))
#define IS_DIRECT_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION))
#define DIRECT_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO_SOURCE_COLLECTION, DirectPhotoSourceCollectionClass))

typedef struct _DirectPhotoSourceCollection DirectPhotoSourceCollection;
typedef struct _DirectPhotoSourceCollectionClass DirectPhotoSourceCollectionClass;

#define TYPE_ALTERATION (alteration_get_type ())
#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))

typedef struct _Alteration Alteration;
typedef struct _AlterationClass AlterationClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

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

#define TYPE_DIRECT_PHOTO (direct_photo_get_type ())
#define DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_PHOTO, DirectPhoto))
#define DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_PHOTO, DirectPhotoClass))
#define IS_DIRECT_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_PHOTO))
#define IS_DIRECT_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_PHOTO))
#define DIRECT_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_PHOTO, DirectPhotoClass))

typedef struct _DirectPhoto DirectPhoto;
typedef struct _DirectPhotoClass DirectPhotoClass;

#define TYPE_IMPORT_RESULT (import_result_get_type ())

#define TYPE_ZOOM_STATE (zoom_state_get_type ())
typedef struct _ZoomState ZoomState;

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())

#define TYPE_COMMAND_MANAGER (command_manager_get_type ())
#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager))
#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass))
#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER))
#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER))
#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass))

typedef struct _CommandManager CommandManager;
typedef struct _CommandManagerClass CommandManagerClass;
#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))

#define TYPE_SCALING (scaling_get_type ())

#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
typedef struct _Scaling Scaling;

#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_DIRECT_VIEW (direct_view_get_type ())
#define DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_VIEW, DirectView))
#define DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_VIEW, DirectViewClass))
#define IS_DIRECT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_VIEW))
#define IS_DIRECT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_VIEW))
#define DIRECT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_VIEW, DirectViewClass))

typedef struct _DirectView DirectView;
typedef struct _DirectViewClass DirectViewClass;

#define TYPE_EXPORT_DIALOG (export_dialog_get_type ())
#define EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORT_DIALOG, ExportDialog))
#define EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORT_DIALOG, ExportDialogClass))
#define IS_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORT_DIALOG))
#define IS_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORT_DIALOG))
#define EXPORT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORT_DIALOG, ExportDialogClass))

typedef struct _ExportDialog ExportDialog;
typedef struct _ExportDialogClass ExportDialogClass;

#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ())

#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ())
typedef struct _ExportFormatParameters ExportFormatParameters;

#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))

typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))

#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_PRINT_MANAGER (print_manager_get_type ())
#define PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PRINT_MANAGER, PrintManager))
#define PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PRINT_MANAGER, PrintManagerClass))
#define IS_PRINT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PRINT_MANAGER))
#define IS_PRINT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PRINT_MANAGER))
#define PRINT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PRINT_MANAGER, PrintManagerClass))

typedef struct _PrintManager PrintManager;
typedef struct _PrintManagerClass PrintManagerClass;
#define _print_manager_unref0(var) ((var == NULL) ? NULL : (var = (print_manager_unref (var), NULL)))
typedef struct _Block6Data Block6Data;

#define TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE (direct_fullscreen_photo_page_get_type ())
#define DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage))
#define DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass))
#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE))
#define IS_DIRECT_FULLSCREEN_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE))
#define DIRECT_FULLSCREEN_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPageClass))

typedef struct _DirectFullscreenPhotoPage DirectFullscreenPhotoPage;
typedef struct _DirectFullscreenPhotoPageClass DirectFullscreenPhotoPageClass;
typedef struct _DirectFullscreenPhotoPagePrivate DirectFullscreenPhotoPagePrivate;

struct _Page {
	GtkScrolledWindow parent_instance;
	PagePrivate * priv;
	GtkBuilder* builder;
	GtkToolbar* toolbar;
	gboolean in_view;
};

struct _PageClass {
	GtkScrolledWindowClass parent_class;
	void (*set_page_name) (Page* self, const gchar* page_name);
	void (*set_container) (Page* self, GtkWindow* container);
	void (*clear_container) (Page* self);
	GtkToolbar* (*get_toolbar) (Page* self);
	GtkMenu* (*get_page_context_menu) (Page* self);
	void (*switching_from) (Page* self);
	void (*switched_to) (Page* self);
	void (*ready) (Page* self);
	void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw);
	void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw);
	void (*add_actions) (Page* self, GActionMap* map);
	void (*remove_actions) (Page* self, GActionMap* map);
	void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames);
	InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1);
	void (*init_actions) (Page* self, gint selected_count, gint count);
	void (*update_actions) (Page* self, gint selected_count, gint count);
	gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result);
	gboolean (*on_left_click) (Page* self, GdkEventButton* event);
	gboolean (*on_middle_click) (Page* self, GdkEventButton* event);
	gboolean (*on_right_click) (Page* self, GdkEventButton* event);
	gboolean (*on_left_released) (Page* self, GdkEventButton* event);
	gboolean (*on_middle_released) (Page* self, GdkEventButton* event);
	gboolean (*on_right_released) (Page* self, GdkEventButton* event);
	gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event);
	gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_alt_released) (Page* self, GdkEventKey* event);
	gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_shift_released) (Page* self, GdkEventKey* event);
	gboolean (*on_super_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_super_released) (Page* self, GdkEventKey* event);
	gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event);
	gboolean (*on_app_key_released) (Page* self, GdkEventKey* event);
	void (*on_move) (Page* self, GdkRectangle* rect);
	void (*on_move_start) (Page* self, GdkRectangle* rect);
	void (*on_move_finished) (Page* self, GdkRectangle* rect);
	void (*on_resize) (Page* self, GdkRectangle* rect);
	void (*on_resize_start) (Page* self, GdkRectangle* rect);
	void (*on_resize_finished) (Page* self, GdkRectangle* rect);
	gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect);
	gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask);
	gboolean (*on_leave_notify_event) (Page* self);
	gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event);
	gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event);
	gboolean (*on_context_keypress) (Page* self);
	gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event);
	gboolean (*on_context_invoked) (Page* self);
	void (*set_page_cursor) (Page* self, GdkCursorType cursor_type);
};

struct _Dimensions {
	gint width;
	gint height;
};

typedef enum  {
	SINGLE_PHOTO_PAGE_UPDATE_REASON_NEW_PIXBUF,
	SINGLE_PHOTO_PAGE_UPDATE_REASON_QUALITY_IMPROVEMENT,
	SINGLE_PHOTO_PAGE_UPDATE_REASON_RESIZED_CANVAS
} SinglePhotoPageUpdateReason;

struct _SinglePhotoPage {
	Page parent_instance;
	SinglePhotoPagePrivate * priv;
	GtkDrawingArea* canvas;
	GtkViewport* viewport;
};

struct _SinglePhotoPageClass {
	PageClass parent_class;
	gboolean (*is_zoom_supported) (SinglePhotoPage* self);
	void (*cancel_zoom) (SinglePhotoPage* self);
	void (*save_zoom_state) (SinglePhotoPage* self);
	void (*restore_zoom_state) (SinglePhotoPage* self);
	ZoomBuffer* (*get_zoom_buffer) (SinglePhotoPage* self);
	void (*new_surface) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim);
	void (*updated_pixbuf) (SinglePhotoPage* self, GdkPixbuf* pixbuf, SinglePhotoPageUpdateReason reason, Dimensions* old_dim);
	void (*paint) (SinglePhotoPage* self, cairo_t* ctx, Dimensions* ctx_dim);
	void (*on_previous_photo) (SinglePhotoPage* self);
	void (*on_next_photo) (SinglePhotoPage* self);
};

struct _EditingHostPage {
	SinglePhotoPage parent_instance;
	EditingHostPagePrivate * priv;
};

struct _EditingHostPageClass {
	SinglePhotoPageClass parent_class;
	gboolean (*on_zoom_slider_key_press) (EditingHostPage* self, GdkEventKey* event);
	void (*on_increase_size) (EditingHostPage* self);
	void (*on_decrease_size) (EditingHostPage* self);
	void (*photo_changing) (EditingHostPage* self, Photo* new_photo);
	DataView* (*create_photo_view) (EditingHostPage* self, DataSource* source);
	void (*update_ui) (EditingHostPage* self, gboolean missing);
	void (*notify_photo_backing_missing) (EditingHostPage* self, Photo* photo, gboolean missing);
	gboolean (*confirm_replace_photo) (EditingHostPage* self, Photo* old_photo, Photo* new_photo);
	gboolean (*on_double_click) (EditingHostPage* self, GdkEventButton* event);
	GdkPixbuf* (*get_bottom_left_trinket) (EditingHostPage* self, gint scale);
	GdkPixbuf* (*get_top_left_trinket) (EditingHostPage* self, gint scale);
	GdkPixbuf* (*get_top_right_trinket) (EditingHostPage* self, gint scale);
	GdkPixbuf* (*get_bottom_right_trinket) (EditingHostPage* self, gint scale);
};

struct _DirectPhotoPage {
	EditingHostPage parent_instance;
	DirectPhotoPagePrivate * priv;
};

struct _DirectPhotoPageClass {
	EditingHostPageClass parent_class;
};

struct _DirectPhotoPagePrivate {
	GFile* initial_file;
	DirectViewCollection* view_controller;
	GFile* current_save_dir;
	gboolean drop_if_dirty;
};

typedef enum  {
	IMPORT_RESULT_SUCCESS,
	IMPORT_RESULT_FILE_ERROR,
	IMPORT_RESULT_DECODE_ERROR,
	IMPORT_RESULT_DATABASE_ERROR,
	IMPORT_RESULT_USER_ABORT,
	IMPORT_RESULT_NOT_A_FILE,
	IMPORT_RESULT_PHOTO_EXISTS,
	IMPORT_RESULT_UNSUPPORTED_FORMAT,
	IMPORT_RESULT_NOT_AN_IMAGE,
	IMPORT_RESULT_DISK_FAILURE,
	IMPORT_RESULT_DISK_FULL,
	IMPORT_RESULT_CAMERA_ERROR,
	IMPORT_RESULT_FILE_WRITE_ERROR,
	IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE
} ImportResult;

struct _ZoomState {
	Dimensions content_dimensions;
	Dimensions viewport_dimensions;
	gdouble zoom_factor;
	gdouble interpolation_factor;
	gdouble min_factor;
	gdouble max_factor;
	GdkPoint viewport_center;
};

typedef enum  {
	PHOTO_FILE_FORMAT_JFIF,
	PHOTO_FILE_FORMAT_RAW,
	PHOTO_FILE_FORMAT_PNG,
	PHOTO_FILE_FORMAT_TIFF,
	PHOTO_FILE_FORMAT_BMP,
	PHOTO_FILE_FORMAT_UNKNOWN
} PhotoFileFormat;

typedef enum  {
	SCALE_CONSTRAINT_ORIGINAL,
	SCALE_CONSTRAINT_DIMENSIONS,
	SCALE_CONSTRAINT_WIDTH,
	SCALE_CONSTRAINT_HEIGHT,
	SCALE_CONSTRAINT_FILL_VIEWPORT
} ScaleConstraint;

struct _Scaling {
	ScaleConstraint constraint;
	gint scale;
	Dimensions viewport;
	gboolean scale_up;
};

typedef enum  {
	JPEG_QUALITY_LOW = 50,
	JPEG_QUALITY_MEDIUM = 75,
	JPEG_QUALITY_HIGH = 90,
	JPEG_QUALITY_MAXIMUM = 100
} JpegQuality;

typedef enum  {
	EXPORT_FORMAT_MODE_UNMODIFIED,
	EXPORT_FORMAT_MODE_CURRENT,
	EXPORT_FORMAT_MODE_SPECIFIED,
	EXPORT_FORMAT_MODE_LAST
} ExportFormatMode;

struct _ExportFormatParameters {
	ExportFormatMode mode;
	PhotoFileFormat specified_format;
	JpegQuality quality;
	gboolean export_metadata;
};

struct _Block6Data {
	int _ref_count_;
	DirectPhotoPage* self;
	gboolean should_allow_rotation;
};

struct _DirectFullscreenPhotoPage {
	DirectPhotoPage parent_instance;
	DirectFullscreenPhotoPagePrivate * priv;
};

struct _DirectFullscreenPhotoPageClass {
	DirectPhotoPageClass parent_class;
};


static gpointer direct_photo_page_parent_class = NULL;
extern DirectPhotoSourceCollection* direct_photo_global;
static gpointer direct_fullscreen_photo_page_parent_class = NULL;

GType page_get_type (void) G_GNUC_CONST;
GType page_window_get_type (void) G_GNUC_CONST;
GType fullscreen_window_get_type (void) G_GNUC_CONST;
gpointer injection_group_ref (gpointer instance);
void injection_group_unref (gpointer instance);
GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_injection_group (GValue* value, gpointer v_object);
void value_take_injection_group (GValue* value, gpointer v_object);
gpointer value_get_injection_group (const GValue* value);
GType injection_group_get_type (void) G_GNUC_CONST;
GType single_photo_page_get_type (void) G_GNUC_CONST;
GType zoom_buffer_get_type (void) G_GNUC_CONST;
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
GType single_photo_page_update_reason_get_type (void) G_GNUC_CONST;
GType editing_host_page_get_type (void) G_GNUC_CONST;
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;
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType data_view_get_type (void) G_GNUC_CONST;
GType direct_photo_page_get_type (void) G_GNUC_CONST;
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType view_collection_get_type (void) G_GNUC_CONST;
GType direct_view_collection_get_type (void) G_GNUC_CONST;
#define DIRECT_PHOTO_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPagePrivate))
enum  {
	DIRECT_PHOTO_PAGE_DUMMY_PROPERTY
};
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType direct_photo_source_collection_get_type (void) G_GNUC_CONST;
gpointer alteration_ref (gpointer instance);
void alteration_unref (gpointer instance);
GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_alteration (GValue* value, gpointer v_object);
void value_take_alteration (GValue* value, gpointer v_object);
gpointer value_get_alteration (const GValue* value);
GType alteration_get_type (void) G_GNUC_CONST;
static void direct_photo_page_on_photos_altered (DirectPhotoPage* self, GeeMap* map);
static void _direct_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self);
static void direct_photo_page_on_save (DirectPhotoPage* self);
static void _direct_photo_page_on_save_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void direct_photo_page_on_save_as (DirectPhotoPage* self);
static void _direct_photo_page_on_save_as_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void direct_photo_page_on_send_to (DirectPhotoPage* self);
static void _direct_photo_page_on_send_to_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void direct_photo_page_on_print (DirectPhotoPage* self);
static void _direct_photo_page_on_print_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void single_photo_page_on_previous_photo (SinglePhotoPage* self);
static void _single_photo_page_on_previous_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void single_photo_page_on_next_photo (SinglePhotoPage* self);
static void _single_photo_page_on_next_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_rotate_clockwise (EditingHostPage* self);
static void _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_rotate_counterclockwise (EditingHostPage* self);
static void _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_flip_horizontally (EditingHostPage* self);
static void _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_flip_vertically (EditingHostPage* self);
static void _editing_host_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_enhance (EditingHostPage* self);
static void _editing_host_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_toggle_crop (EditingHostPage* self);
static void _editing_host_page_toggle_crop_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_toggle_straighten (EditingHostPage* self);
static void _editing_host_page_toggle_straighten_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_toggle_redeye (EditingHostPage* self);
static void _editing_host_page_toggle_redeye_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_toggle_adjust (EditingHostPage* self);
static void _editing_host_page_toggle_adjust_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_revert (EditingHostPage* self);
static void _editing_host_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_adjust_date_time (EditingHostPage* self);
static void _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_set_background (EditingHostPage* self);
static void _editing_host_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_increase_size (EditingHostPage* self);
static void _editing_host_page_on_increase_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_on_decrease_size (EditingHostPage* self);
static void _editing_host_page_on_decrease_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_snap_zoom_to_min (EditingHostPage* self);
static void _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_snap_zoom_to_isomorphic (EditingHostPage* self);
static void _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
void editing_host_page_snap_zoom_to_max (EditingHostPage* self);
static void _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
DirectPhotoPage* direct_photo_page_new (GFile* file);
DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file);
EditingHostPage* editing_host_page_construct (GType object_type, SourceCollection* sources, const gchar* name);
static gboolean direct_photo_page_check_editable_file (GFile* file);
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);
void application_panic (Application* self);
DirectViewCollection* direct_view_collection_new (void);
DirectViewCollection* direct_view_collection_construct (GType object_type);
ViewCollection* page_get_view (Page* self);
static void direct_photo_page_on_selection_group_altered (DirectPhotoPage* self);
static void _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered (ViewCollection* _sender, gpointer self);
static void direct_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames);
void page_init_collect_ui_filenames (Page* self, GeeList* ui_filenames);
static void direct_photo_page_real_add_actions (Page* base, GActionMap* map);
void page_add_actions (Page* self, GActionMap* map);
static void direct_photo_page_real_remove_actions (Page* base, GActionMap* map);
void page_remove_actions (Page* self, GActionMap* map);
static InjectionGroup** direct_photo_page_real_init_collect_injection_groups (Page* base, int* result_length1);
InjectionGroup** page_init_collect_injection_groups (Page* self, int* result_length1);
InjectionGroup* injection_group_new (const gchar* path);
InjectionGroup* injection_group_construct (GType object_type, const gchar* path);
void injection_group_add_menu_item (InjectionGroup* self, const gchar* name, const gchar* action, const gchar* accellerator);
static void _vala_array_add61 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value);
static void _vala_array_add62 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value);
void app_window_error_message (const gchar* message, GtkWindow* parent);
gboolean photo_file_format_is_file_supported (GFile* file);
#define RESOURCES_APP_TITLE "Shotwell"
static void direct_photo_page_real_realize (GtkWidget* base);
GType direct_photo_get_type (void) G_GNUC_CONST;
DirectPhoto* direct_photo_source_collection_get_file_source (DirectPhotoSourceCollection* self, GFile* file);
void editing_host_page_display_mirror_of (EditingHostPage* self, ViewCollection* controller, Photo* starting_photo);
void app_window_panic (const gchar* msg);
static void direct_photo_page_real_photo_changing (EditingHostPage* base, Photo* new_photo);
Photo* editing_host_page_get_photo (EditingHostPage* self);
static void direct_photo_page_on_dphoto_can_rotate_changed (DirectPhotoPage* self, gboolean should_allow_rotation);
static void _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed (DirectPhoto* _sender, gboolean b, gpointer self);
GType import_result_get_type (void) G_GNUC_CONST;
ImportResult direct_photo_demand_load (DirectPhoto* self);
GFile* direct_photo_page_get_current_file (DirectPhotoPage* self);
GFile* media_source_get_file (MediaSource* self);
static gboolean direct_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event);
static void direct_photo_page_update_zoom_menu_item_sensitivity (DirectPhotoPage* self);
GType zoom_state_get_type (void) G_GNUC_CONST;
ZoomState* zoom_state_dup (const ZoomState* self);
void zoom_state_free (ZoomState* self);
void single_photo_page_get_zoom_state (SinglePhotoPage* self, ZoomState* result);
gboolean zoom_state_is_max (ZoomState *self);
gboolean editing_host_page_get_photo_missing (EditingHostPage* self);
void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive);
gboolean zoom_state_is_default (ZoomState *self);
static void direct_photo_page_real_on_increase_size (EditingHostPage* base);
static void direct_photo_page_real_on_decrease_size (EditingHostPage* base);
gboolean editing_host_page_has_photo (EditingHostPage* self);
GType photo_file_format_get_type (void) G_GNUC_CONST;
PhotoFileFormat photo_get_file_format (Photo* self);
gboolean photo_file_format_can_write (PhotoFileFormat self);
gpointer command_manager_ref (gpointer instance);
void command_manager_unref (gpointer instance);
GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_command_manager (GValue* value, gpointer v_object);
void value_take_command_manager (GValue* value, gpointer v_object);
gpointer value_get_command_manager (const GValue* value);
GType command_manager_get_type (void) G_GNUC_CONST;
CommandManager* page_get_command_manager (Page* self);
void command_manager_reset (CommandManager* self);
static gboolean direct_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event);
GtkWindow* page_get_container (Page* self);
void fullscreen_window_close (FullscreenWindow* self);
gboolean editing_host_page_on_double_click (EditingHostPage* self, GdkEventButton* event);
static void direct_photo_page_real_update_ui (EditingHostPage* base, gboolean missing);
void editing_host_page_update_ui (EditingHostPage* self, gboolean missing);
static void direct_photo_page_real_update_actions (Page* base, gint selected_count, gint count);
gint data_collection_get_count (DataCollection* self);
gboolean photo_has_transformations (Photo* self);
gboolean editing_host_page_is_rotate_available (EditingHostPage* self, Photo* photo);
gboolean editing_host_page_is_enhance_available (EditingHostPage* self, Photo* photo);
GType scaling_get_type (void) G_GNUC_CONST;
GType scale_constraint_get_type (void) G_GNUC_CONST;
Scaling* scaling_dup (const Scaling* self);
void scaling_free (Scaling* self);
gboolean editing_tools_crop_tool_is_available (Photo* photo, Scaling* scaling);
void scaling_for_original (Scaling* result);
gboolean editing_tools_redeye_tool_is_available (Photo* photo, Scaling* scaling);
void page_update_actions (Page* self, gint selected_count, gint count);
static gboolean direct_photo_page_check_ok_to_close_photo (DirectPhotoPage* self, Photo* photo);
gboolean photo_has_alterations (Photo* self);
void photo_remove_all_transformations (Photo* self);
GtkResponseType app_window_negate_affirm_cancel_question (const gchar* message, const gchar* negative, const gchar* affirmative, const gchar* title, GtkWindow* parent);
gchar* media_source_get_basename (MediaSource* self);
GType jpeg_quality_get_type (void) G_GNUC_CONST;
static void direct_photo_page_save (DirectPhotoPage* self, GFile* dest, gint scale, ScaleConstraint constraint, JpegQuality quality, PhotoFileFormat format, gboolean copy_unmodified, gboolean save_metadata);
gboolean direct_photo_page_check_quit (DirectPhotoPage* self);
static gboolean direct_photo_page_real_confirm_replace_photo (EditingHostPage* base, Photo* old_photo, Photo* new_photo);
void scaling_for_constraint (ScaleConstraint constraint, gint scale, gboolean scale_up, Scaling* result);
void photo_export (Photo* self, GFile* dest_file, Scaling* scaling, JpegQuality quality, PhotoFileFormat export_format, gboolean direct_copy_unmodified, gboolean export_metadata, GError** error);
gchar* direct_photo_source_collection_fetch (DirectPhotoSourceCollection* self, GFile* file, DirectPhoto** photo, gboolean reimport);
GType direct_view_get_type (void) G_GNUC_CONST;
DirectView* direct_view_new (DirectPhoto* source);
DirectView* direct_view_construct (GType object_type, DirectPhoto* source);
gboolean data_collection_add (DataCollection* self, DataObject* object);
void direct_photo_source_collection_reimport_photo (DirectPhotoSourceCollection* self, DirectPhoto* photo);
GType export_dialog_get_type (void) G_GNUC_CONST;
ExportDialog* export_dialog_new (const gchar* title);
ExportDialog* export_dialog_construct (GType object_type, const gchar* title);
GType export_format_parameters_get_type (void) G_GNUC_CONST;
GType export_format_mode_get_type (void) G_GNUC_CONST;
ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self);
void export_format_parameters_free (ExportFormatParameters* self);
void export_format_parameters_last (ExportFormatParameters* result);
gboolean export_dialog_execute (ExportDialog* self, gint* scale, ScaleConstraint* constraint, ExportFormatParameters* parameters);
gchar* photo_get_export_basename_for_parameters (Photo* self, ExportFormatParameters* params);
PhotoFileFormat photo_get_export_format_for_parameters (Photo* self, ExportFormatParameters* params);
gpointer photo_file_format_properties_ref (gpointer instance);
void photo_file_format_properties_unref (gpointer instance);
GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_file_format_properties (GValue* value, gpointer v_object);
void value_take_photo_file_format_properties (GValue* value, gpointer v_object);
gpointer value_get_photo_file_format_properties (const GValue* value);
GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
PhotoFileFormatProperties* photo_file_format_get_properties (PhotoFileFormat self);
gchar** photo_file_format_properties_get_known_extensions (PhotoFileFormatProperties* self, int* result_length1);
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
#define RESOURCES_CANCEL_LABEL _ ("_Cancel")
#define RESOURCES_OK_LABEL _ ("_OK")
void desktop_integration_send_to (GeeCollection* media);
GeeList* view_collection_get_selected_sources (ViewCollection* self);
static gboolean direct_photo_page_real_on_app_key_pressed (Page* base, GdkEventKey* event);
void page_activate_action (Page* self, const gchar* name);
gboolean page_on_app_key_pressed (Page* self, GdkEventKey* event);
gint view_collection_get_selected_count (ViewCollection* self);
gpointer print_manager_ref (gpointer instance);
void print_manager_unref (gpointer instance);
GParamSpec* param_spec_print_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_print_manager (GValue* value, gpointer v_object);
void value_take_print_manager (GValue* value, gpointer v_object);
gpointer value_get_print_manager (const GValue* value);
GType print_manager_get_type (void) G_GNUC_CONST;
PrintManager* print_manager_get_instance (void);
void print_manager_spool_photo (PrintManager* self, GeeCollection* to_print);
GeeList* view_collection_get_selected_sources_of_type (ViewCollection* self, GType t);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
static gboolean __lambda15_ (Block6Data* _data6_);
void editing_host_page_enable_rotate (EditingHostPage* self, gboolean should_enable);
static gboolean ___lambda15__gsource_func (gpointer self);
static DataView* direct_photo_page_real_create_photo_view (EditingHostPage* base, DataSource* source);
static void direct_photo_page_finalize (GObject* obj);
GType direct_fullscreen_photo_page_get_type (void) G_GNUC_CONST;
enum  {
	DIRECT_FULLSCREEN_PHOTO_PAGE_DUMMY_PROPERTY
};
DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file);
DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file);
static void direct_fullscreen_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames);
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);

static const GActionEntry DIRECT_PHOTO_PAGE_entries[23] = {{"Save", _direct_photo_page_on_save_gsimple_action_activate_callback}, {"SaveAs", _direct_photo_page_on_save_as_gsimple_action_activate_callback}, {"SendTo", _direct_photo_page_on_send_to_gsimple_action_activate_callback}, {"Print", _direct_photo_page_on_print_gsimple_action_activate_callback}, {"PrevPhoto", _single_photo_page_on_previous_photo_gsimple_action_activate_callback}, {"NextPhoto", _single_photo_page_on_next_photo_gsimple_action_activate_callback}, {"RotateClockwise", _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback}, {"RotateCounterclockwise", _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback}, {"FlipHorizontally", _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback}, {"FlipVertically", _editing_host_page_on_flip_vertically_gsimple_action_activate_callback}, {"Enhance", _editing_host_page_on_enhance_gsimple_action_activate_callback}, {"Crop", _editing_host_page_toggle_crop_gsimple_action_activate_callback}, {"Straighten", _editing_host_page_toggle_straighten_gsimple_action_activate_callback}, {"RedEye", _editing_host_page_toggle_redeye_gsimple_action_activate_callback}, {"Adjust", _editing_host_page_toggle_adjust_gsimple_action_activate_callback}, {"Revert", _editing_host_page_on_revert_gsimple_action_activate_callback}, {"AdjustDateTime", _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback}, {"SetBackground", _editing_host_page_on_set_background_gsimple_action_activate_callback}, {"IncreaseSize", _editing_host_page_on_increase_size_gsimple_action_activate_callback}, {"DecreaseSize", _editing_host_page_on_decrease_size_gsimple_action_activate_callback}, {"ZoomFit", _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback}, {"Zoom100", _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback}, {"Zoom200", _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback}};

static void _direct_photo_page_on_photos_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) {
#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_photos_altered ((DirectPhotoPage*) self, items);
#line 866 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_save_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_save ((DirectPhotoPage*) self);
#line 873 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_save_as_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_save_as ((DirectPhotoPage*) self);
#line 880 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_send_to_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_send_to ((DirectPhotoPage*) self);
#line 887 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_print_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_print ((DirectPhotoPage*) self);
#line 894 "DirectPhotoPage.c"
}


static void _single_photo_page_on_previous_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	single_photo_page_on_previous_photo ((SinglePhotoPage*) self);
#line 901 "DirectPhotoPage.c"
}


static void _single_photo_page_on_next_photo_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	single_photo_page_on_next_photo ((SinglePhotoPage*) self);
#line 908 "DirectPhotoPage.c"
}


static void _editing_host_page_on_rotate_clockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_rotate_clockwise ((EditingHostPage*) self);
#line 915 "DirectPhotoPage.c"
}


static void _editing_host_page_on_rotate_counterclockwise_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_rotate_counterclockwise ((EditingHostPage*) self);
#line 922 "DirectPhotoPage.c"
}


static void _editing_host_page_on_flip_horizontally_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_flip_horizontally ((EditingHostPage*) self);
#line 929 "DirectPhotoPage.c"
}


static void _editing_host_page_on_flip_vertically_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_flip_vertically ((EditingHostPage*) self);
#line 936 "DirectPhotoPage.c"
}


static void _editing_host_page_on_enhance_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_enhance ((EditingHostPage*) self);
#line 943 "DirectPhotoPage.c"
}


static void _editing_host_page_toggle_crop_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_toggle_crop ((EditingHostPage*) self);
#line 950 "DirectPhotoPage.c"
}


static void _editing_host_page_toggle_straighten_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_toggle_straighten ((EditingHostPage*) self);
#line 957 "DirectPhotoPage.c"
}


static void _editing_host_page_toggle_redeye_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_toggle_redeye ((EditingHostPage*) self);
#line 964 "DirectPhotoPage.c"
}


static void _editing_host_page_toggle_adjust_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_toggle_adjust ((EditingHostPage*) self);
#line 971 "DirectPhotoPage.c"
}


static void _editing_host_page_on_revert_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_revert ((EditingHostPage*) self);
#line 978 "DirectPhotoPage.c"
}


static void _editing_host_page_on_adjust_date_time_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_adjust_date_time ((EditingHostPage*) self);
#line 985 "DirectPhotoPage.c"
}


static void _editing_host_page_on_set_background_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_set_background ((EditingHostPage*) self);
#line 992 "DirectPhotoPage.c"
}


static void _editing_host_page_on_increase_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_increase_size ((EditingHostPage*) self);
#line 999 "DirectPhotoPage.c"
}


static void _editing_host_page_on_decrease_size_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_on_decrease_size ((EditingHostPage*) self);
#line 1006 "DirectPhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_min_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_snap_zoom_to_min ((EditingHostPage*) self);
#line 1013 "DirectPhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_isomorphic_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_snap_zoom_to_isomorphic ((EditingHostPage*) self);
#line 1020 "DirectPhotoPage.c"
}


static void _editing_host_page_snap_zoom_to_max_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 42 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_snap_zoom_to_max ((EditingHostPage*) self);
#line 1027 "DirectPhotoPage.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return self ? g_object_ref (self) : NULL;
#line 1034 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered (ViewCollection* _sender, gpointer self) {
#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_selection_group_altered ((DirectPhotoPage*) self);
#line 1041 "DirectPhotoPage.c"
}


DirectPhotoPage* direct_photo_page_construct (GType object_type, GFile* file) {
	DirectPhotoPage * self = NULL;
	DirectPhotoSourceCollection* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	GFile* _tmp8_ = NULL;
	GFile* _tmp9_ = NULL;
	DirectViewCollection* _tmp10_ = NULL;
	GFile* _tmp11_ = NULL;
	GFile* _tmp12_ = NULL;
	DirectPhotoSourceCollection* _tmp13_ = NULL;
	ViewCollection* _tmp14_ = NULL;
	ViewCollection* _tmp15_ = NULL;
#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = direct_photo_global;
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = file;
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = g_file_get_basename (_tmp1_);
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = (DirectPhotoPage*) editing_host_page_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp3_);
#line 14 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp3_);
#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = file;
#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = direct_photo_page_check_editable_file (_tmp4_);
#line 16 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (!_tmp5_) {
#line 1081 "DirectPhotoPage.c"
		Application* _tmp6_ = NULL;
		Application* _tmp7_ = NULL;
#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = application_get_instance ();
#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		application_panic (_tmp7_);
#line 17 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_application_unref0 (_tmp7_);
#line 19 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return self;
#line 1094 "DirectPhotoPage.c"
	}
#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = file;
#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (self->priv->initial_file);
#line 22 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->initial_file = _tmp9_;
#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10_ = direct_view_collection_new ();
#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data_collection_unref0 (self->priv->view_controller);
#line 23 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->view_controller = _tmp10_;
#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = file;
#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp12_ = g_file_get_parent (_tmp11_);
#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (self->priv->current_save_dir);
#line 24 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->current_save_dir = _tmp12_;
#line 26 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp13_ = direct_photo_global;
#line 26 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _direct_photo_page_on_photos_altered_data_collection_items_altered, self, 0);
#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp14_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = _tmp14_;
#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_signal_connect_object (_tmp15_, "selection-group-altered", (GCallback) _direct_photo_page_on_selection_group_altered_view_collection_selection_group_altered, self, 0);
#line 28 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data_collection_unref0 (_tmp15_);
#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return self;
#line 1132 "DirectPhotoPage.c"
}


DirectPhotoPage* direct_photo_page_new (GFile* file) {
#line 13 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return direct_photo_page_construct (TYPE_DIRECT_PHOTO_PAGE, file);
#line 1139 "DirectPhotoPage.c"
}


static void direct_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) {
	DirectPhotoPage * self;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp1_ = NULL;
	GeeList* _tmp2_ = NULL;
#line 35 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 35 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (GEE_IS_LIST (ui_filenames));
#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = ui_filenames;
#line 36 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	PAGE_CLASS (direct_photo_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_);
#line 38 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = ui_filenames;
#line 38 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "direct_context.ui");
#line 39 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = ui_filenames;
#line 39 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), "direct.ui");
#line 1164 "DirectPhotoPage.c"
}


static void direct_photo_page_real_add_actions (Page* base, GActionMap* map) {
	DirectPhotoPage * self;
	GActionMap* _tmp0_ = NULL;
	GActionMap* _tmp1_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 68 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (G_IS_ACTION_MAP (map));
#line 69 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = map;
#line 69 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	PAGE_CLASS (direct_photo_page_parent_class)->add_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_);
#line 71 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = map;
#line 71 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_action_map_add_action_entries (_tmp1_, DIRECT_PHOTO_PAGE_entries, G_N_ELEMENTS (DIRECT_PHOTO_PAGE_entries), self);
#line 1184 "DirectPhotoPage.c"
}


static void direct_photo_page_real_remove_actions (Page* base, GActionMap* map) {
	DirectPhotoPage * self;
	GActionMap* _tmp0_ = NULL;
#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 74 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (G_IS_ACTION_MAP (map));
#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = map;
#line 75 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	PAGE_CLASS (direct_photo_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp0_);
#line 1199 "DirectPhotoPage.c"
	{
		GActionEntry* entry_collection = NULL;
		gint entry_collection_length1 = 0;
		gint _entry_collection_size_ = 0;
		gint entry_it = 0;
#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		entry_collection = DIRECT_PHOTO_PAGE_entries;
#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		entry_collection_length1 = G_N_ELEMENTS (DIRECT_PHOTO_PAGE_entries);
#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		for (entry_it = 0; entry_it < G_N_ELEMENTS (DIRECT_PHOTO_PAGE_entries); entry_it = entry_it + 1) {
#line 1211 "DirectPhotoPage.c"
			GActionEntry entry = {0};
#line 76 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			entry = entry_collection[entry_it];
#line 1215 "DirectPhotoPage.c"
			{
				GActionMap* _tmp1_ = NULL;
				GActionEntry _tmp2_ = {0};
				const gchar* _tmp3_ = NULL;
#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp1_ = map;
#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp2_ = entry;
#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp3_ = _tmp2_.name;
#line 77 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				g_action_map_remove_action (_tmp1_, _tmp3_);
#line 1228 "DirectPhotoPage.c"
			}
		}
	}
}


static gpointer _injection_group_ref0 (gpointer self) {
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return self ? injection_group_ref (self) : NULL;
#line 1238 "DirectPhotoPage.c"
}


static void _vala_array_add61 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) {
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if ((*length) == (*size)) {
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
#line 1249 "DirectPhotoPage.c"
	}
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	(*array)[(*length)++] = value;
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	(*array)[*length] = NULL;
#line 1255 "DirectPhotoPage.c"
}


static void _vala_array_add62 (InjectionGroup*** array, int* length, int* size, InjectionGroup* value) {
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if ((*length) == (*size)) {
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		*array = g_renew (InjectionGroup*, *array, (*size) + 1);
#line 1266 "DirectPhotoPage.c"
	}
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	(*array)[(*length)++] = value;
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	(*array)[*length] = NULL;
#line 1272 "DirectPhotoPage.c"
}


static InjectionGroup** direct_photo_page_real_init_collect_injection_groups (Page* base, int* result_length1) {
	DirectPhotoPage * self;
	InjectionGroup** result = NULL;
	InjectionGroup** groups = NULL;
	gint _tmp0_ = 0;
	InjectionGroup** _tmp1_ = NULL;
	gint groups_length1 = 0;
	gint _groups_size_ = 0;
	InjectionGroup* print_group = NULL;
	InjectionGroup* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	InjectionGroup** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	InjectionGroup* _tmp5_ = NULL;
	InjectionGroup* bg_group = NULL;
	InjectionGroup* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	InjectionGroup** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	InjectionGroup* _tmp9_ = NULL;
	InjectionGroup** _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
#line 81 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = PAGE_CLASS (direct_photo_page_parent_class)->init_collect_injection_groups (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), &_tmp0_);
#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	groups = _tmp1_;
#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	groups_length1 = _tmp0_;
#line 82 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_groups_size_ = groups_length1;
#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = injection_group_new ("PrintPlaceholder");
#line 84 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	print_group = _tmp2_;
#line 85 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _ ("_Print");
#line 85 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	injection_group_add_menu_item (print_group, _tmp3_, "Print", "<Primary>p");
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = groups;
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4__length1 = groups_length1;
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = _injection_group_ref0 (print_group);
#line 87 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_vala_array_add61 (&groups, &groups_length1, &_groups_size_, _tmp5_);
#line 89 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp6_ = injection_group_new ("SetBackgroundPlaceholder");
#line 89 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	bg_group = _tmp6_;
#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp7_ = _ ("Set as _Desktop Background");
#line 90 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	injection_group_add_menu_item (bg_group, _tmp7_, "SetBackground", "<Primary>b");
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = groups;
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8__length1 = groups_length1;
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = _injection_group_ref0 (bg_group);
#line 92 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_vala_array_add62 (&groups, &groups_length1, &_groups_size_, _tmp9_);
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10_ = groups;
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10__length1 = groups_length1;
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (result_length1) {
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		*result_length1 = _tmp10__length1;
#line 1348 "DirectPhotoPage.c"
	}
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp10_;
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_injection_group_unref0 (bg_group);
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_injection_group_unref0 (print_group);
#line 94 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 1358 "DirectPhotoPage.c"
}


static gboolean direct_photo_page_check_editable_file (GFile* file) {
	gboolean result = FALSE;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
#line 97 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = file;
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = g_file_get_path (_tmp0_);
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = _tmp1_;
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_EXISTS);
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = !_tmp3_;
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp2_);
#line 98 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp4_) {
#line 1385 "DirectPhotoPage.c"
		const gchar* _tmp5_ = NULL;
		GFile* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp5_ = _ ("%s does not exist.");
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = file;
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = g_file_get_path (_tmp6_);
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = g_strdup_printf (_tmp5_, _tmp8_);
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = _tmp9_;
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		app_window_error_message (_tmp10_, NULL);
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp10_);
#line 99 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp8_);
#line 1410 "DirectPhotoPage.c"
	} else {
		GFile* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_ = FALSE;
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp11_ = file;
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = g_file_get_path (_tmp11_);
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp13_ = _tmp12_;
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp14_ = g_file_test (_tmp13_, G_FILE_TEST_IS_REGULAR);
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp15_ = !_tmp14_;
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp13_);
#line 100 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (_tmp15_) {
#line 1431 "DirectPhotoPage.c"
			const gchar* _tmp16_ = NULL;
			GFile* _tmp17_ = NULL;
			gchar* _tmp18_ = NULL;
			gchar* _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp16_ = _ ("%s is not a file.");
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp17_ = file;
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp18_ = g_file_get_path (_tmp17_);
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp19_ = _tmp18_;
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp20_ = g_strdup_printf (_tmp16_, _tmp19_);
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp21_ = _tmp20_;
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			app_window_error_message (_tmp21_, NULL);
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_g_free0 (_tmp21_);
#line 101 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_g_free0 (_tmp19_);
#line 1456 "DirectPhotoPage.c"
		} else {
			GFile* _tmp22_ = NULL;
			gboolean _tmp23_ = FALSE;
#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp22_ = file;
#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp23_ = photo_file_format_is_file_supported (_tmp22_);
#line 102 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			if (!_tmp23_) {
#line 1466 "DirectPhotoPage.c"
				const gchar* _tmp24_ = NULL;
				GFile* _tmp25_ = NULL;
				gchar* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				gchar* _tmp28_ = NULL;
				gchar* _tmp29_ = NULL;
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp24_ = _ ("%s does not support the file format of\n%s.");
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp25_ = file;
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp26_ = g_file_get_path (_tmp25_);
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp27_ = _tmp26_;
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp28_ = g_strdup_printf (_tmp24_, RESOURCES_APP_TITLE, _tmp27_);
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp29_ = _tmp28_;
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				app_window_error_message (_tmp29_, NULL);
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (_tmp29_);
#line 103 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (_tmp27_);
#line 1491 "DirectPhotoPage.c"
			} else {
#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				result = TRUE;
#line 106 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				return result;
#line 1497 "DirectPhotoPage.c"
			}
		}
	}
#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = FALSE;
#line 108 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 1505 "DirectPhotoPage.c"
}


static void direct_photo_page_real_realize (GtkWidget* base) {
	DirectPhotoPage * self;
	DirectPhoto* photo = NULL;
	DirectPhotoSourceCollection* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	DirectPhoto* _tmp2_ = NULL;
	DirectPhoto* _tmp3_ = NULL;
#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 112 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (GTK_WIDGET_CLASS (direct_photo_page_parent_class)->realize != NULL) {
#line 113 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		GTK_WIDGET_CLASS (direct_photo_page_parent_class)->realize (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), gtk_widget_get_type (), GtkWidget));
#line 1522 "DirectPhotoPage.c"
	}
#line 115 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = direct_photo_global;
#line 115 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = self->priv->initial_file;
#line 115 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = direct_photo_source_collection_get_file_source (_tmp0_, _tmp1_);
#line 115 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	photo = _tmp2_;
#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = photo;
#line 117 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp3_ != NULL) {
#line 1536 "DirectPhotoPage.c"
		DirectViewCollection* _tmp4_ = NULL;
		DirectPhoto* _tmp5_ = NULL;
#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = self->priv->view_controller;
#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp5_ = photo;
#line 118 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		editing_host_page_display_mirror_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PHOTO, Photo));
#line 1545 "DirectPhotoPage.c"
	} else {
		const gchar* _tmp6_ = NULL;
		GFile* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = _ ("Unable open photo %s. Sorry.");
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = self->priv->initial_file;
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = g_file_get_path (_tmp7_);
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = _tmp8_;
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = g_strdup_printf (_tmp6_, _tmp9_);
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp11_ = _tmp10_;
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		app_window_panic (_tmp11_);
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp11_);
#line 120 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp9_);
#line 1571 "DirectPhotoPage.c"
	}
#line 123 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (self->priv->initial_file);
#line 123 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->initial_file = NULL;
#line 111 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (photo);
#line 1579 "DirectPhotoPage.c"
}


static void _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed (DirectPhoto* _sender, gboolean b, gpointer self) {
#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_on_dphoto_can_rotate_changed ((DirectPhotoPage*) self, b);
#line 1586 "DirectPhotoPage.c"
}


static void direct_photo_page_real_photo_changing (EditingHostPage* base, Photo* new_photo) {
	DirectPhotoPage * self;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	Photo* _tmp8_ = NULL;
	DirectPhoto* tmp = NULL;
	Photo* _tmp9_ = NULL;
	DirectPhoto* _tmp10_ = NULL;
	DirectPhoto* _tmp11_ = NULL;
#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_PHOTO (new_photo));
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = _tmp1_ != NULL;
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp2_) {
#line 1614 "DirectPhotoPage.c"
		DirectPhoto* tmp = NULL;
		Photo* _tmp3_ = NULL;
		DirectPhoto* _tmp4_ = NULL;
		DirectPhoto* _tmp5_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_DIRECT_PHOTO) ? ((DirectPhoto*) _tmp3_) : NULL;
#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (_tmp4_ == NULL) {
#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_g_object_unref0 (_tmp3_);
#line 1627 "DirectPhotoPage.c"
		}
#line 128 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		tmp = _tmp4_;
#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp5_ = tmp;
#line 130 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (_tmp5_ != NULL) {
#line 1635 "DirectPhotoPage.c"
			DirectPhoto* _tmp6_ = NULL;
			guint _tmp7_ = 0U;
#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp6_ = tmp;
#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			g_signal_parse_name ("can-rotate-changed", TYPE_DIRECT_PHOTO, &_tmp7_, NULL, FALSE);
#line 131 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed, self);
#line 1644 "DirectPhotoPage.c"
		}
#line 127 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (tmp);
#line 1648 "DirectPhotoPage.c"
	}
#line 135 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = new_photo;
#line 135 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_demand_load (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DIRECT_PHOTO, DirectPhoto));
#line 137 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = new_photo;
#line 137 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_DIRECT_PHOTO) ? ((DirectPhoto*) _tmp9_) : NULL);
#line 137 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	tmp = _tmp10_;
#line 139 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = tmp;
#line 139 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp11_ != NULL) {
#line 1664 "DirectPhotoPage.c"
		DirectPhoto* _tmp12_ = NULL;
#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = tmp;
#line 140 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		g_signal_connect_object (_tmp12_, "can-rotate-changed", (GCallback) _direct_photo_page_on_dphoto_can_rotate_changed_direct_photo_can_rotate_changed, self, 0);
#line 1670 "DirectPhotoPage.c"
	}
#line 126 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (tmp);
#line 1674 "DirectPhotoPage.c"
}


GFile* direct_photo_page_get_current_file (DirectPhotoPage* self) {
	GFile* result = NULL;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
#line 144 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), NULL);
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource));
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp3_;
#line 145 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 1700 "DirectPhotoPage.c"
}


static gboolean direct_photo_page_real_on_context_buttonpress (Page* base, GdkEventButton* event) {
	DirectPhotoPage * self;
	gboolean result = FALSE;
#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 148 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 152 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = TRUE;
#line 152 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 1715 "DirectPhotoPage.c"
}


static void direct_photo_page_update_zoom_menu_item_sensitivity (DirectPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	ZoomState _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
	gboolean _tmp4_ = FALSE;
	ZoomState _tmp5_ = {0};
	gboolean _tmp6_ = FALSE;
#line 155 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp1_);
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = zoom_state_is_max (&_tmp1_);
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (!_tmp2_) {
#line 1734 "DirectPhotoPage.c"
		gboolean _tmp3_ = FALSE;
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = !_tmp3_;
#line 1740 "DirectPhotoPage.c"
	} else {
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = FALSE;
#line 1744 "DirectPhotoPage.c"
	}
#line 156 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", _tmp0_);
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	single_photo_page_get_zoom_state (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage), &_tmp5_);
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp6_ = zoom_state_is_default (&_tmp5_);
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (!_tmp6_) {
#line 1754 "DirectPhotoPage.c"
		gboolean _tmp7_ = FALSE;
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = !_tmp7_;
#line 1760 "DirectPhotoPage.c"
	} else {
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = FALSE;
#line 1764 "DirectPhotoPage.c"
	}
#line 157 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", _tmp4_);
#line 1768 "DirectPhotoPage.c"
}


static void direct_photo_page_real_on_increase_size (EditingHostPage* base) {
	DirectPhotoPage * self;
#line 160 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 161 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_increase_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 163 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_update_zoom_menu_item_sensitivity (self);
#line 1780 "DirectPhotoPage.c"
}


static void direct_photo_page_real_on_decrease_size (EditingHostPage* base) {
	DirectPhotoPage * self;
#line 166 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 167 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_decrease_size (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 169 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_update_zoom_menu_item_sensitivity (self);
#line 1792 "DirectPhotoPage.c"
}


static void direct_photo_page_on_photos_altered (DirectPhotoPage* self, GeeMap* map) {
	gboolean contains = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean sensitive = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp25_ = FALSE;
#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 172 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (GEE_IS_MAP (map));
#line 173 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	contains = FALSE;
#line 174 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 174 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp0_) {
#line 1816 "DirectPhotoPage.c"
		Photo* photo = NULL;
		Photo* _tmp1_ = NULL;
#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp1_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 175 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		photo = _tmp1_;
#line 1823 "DirectPhotoPage.c"
		{
			GeeIterator* _object_it = NULL;
			GeeMap* _tmp2_ = NULL;
			GeeSet* _tmp3_ = NULL;
			GeeSet* _tmp4_ = NULL;
			GeeSet* _tmp5_ = NULL;
			GeeIterator* _tmp6_ = NULL;
			GeeIterator* _tmp7_ = NULL;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp2_ = map;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp3_ = gee_map_get_keys (_tmp2_);
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp4_ = _tmp3_;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp5_ = _tmp4_;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp7_ = _tmp6_;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_g_object_unref0 (_tmp5_);
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_object_it = _tmp7_;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			while (TRUE) {
#line 1850 "DirectPhotoPage.c"
				GeeIterator* _tmp8_ = NULL;
				gboolean _tmp9_ = FALSE;
				DataObject* object = NULL;
				GeeIterator* _tmp10_ = NULL;
				gpointer _tmp11_ = NULL;
				DataObject* _tmp12_ = NULL;
				Photo* _tmp13_ = NULL;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp8_ = _object_it;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp9_ = gee_iterator_next (_tmp8_);
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				if (!_tmp9_) {
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
					break;
#line 1866 "DirectPhotoPage.c"
				}
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp10_ = _object_it;
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp11_ = gee_iterator_get (_tmp10_);
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				object = (DataObject*) _tmp11_;
#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp12_ = object;
#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp13_ = photo;
#line 177 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				if (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PHOTO, Photo) == _tmp13_) {
#line 178 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
					contains = TRUE;
#line 180 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
					_g_object_unref0 (object);
#line 180 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
					break;
#line 1886 "DirectPhotoPage.c"
				}
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_object_unref0 (object);
#line 1890 "DirectPhotoPage.c"
			}
#line 176 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_g_object_unref0 (_object_it);
#line 1894 "DirectPhotoPage.c"
		}
#line 174 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (photo);
#line 1898 "DirectPhotoPage.c"
	}
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp15_) {
#line 1904 "DirectPhotoPage.c"
		gboolean _tmp16_ = FALSE;
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp16_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp14_ = !_tmp16_;
#line 1910 "DirectPhotoPage.c"
	} else {
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp14_ = FALSE;
#line 1914 "DirectPhotoPage.c"
	}
#line 185 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	sensitive = _tmp14_;
#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp17_ = sensitive;
#line 186 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp17_) {
#line 1922 "DirectPhotoPage.c"
		gboolean _tmp18_ = FALSE;
#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp18_ = contains;
#line 187 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		sensitive = _tmp18_;
#line 1928 "DirectPhotoPage.c"
	}
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp20_ = sensitive;
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp20_) {
#line 1934 "DirectPhotoPage.c"
		Photo* _tmp21_ = NULL;
		Photo* _tmp22_ = NULL;
		PhotoFileFormat _tmp23_ = 0;
		gboolean _tmp24_ = FALSE;
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp21_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp22_ = _tmp21_;
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp23_ = photo_get_file_format (_tmp22_);
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp24_ = photo_file_format_can_write (_tmp23_);
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp19_ = _tmp24_;
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp22_);
#line 1951 "DirectPhotoPage.c"
	} else {
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp19_ = FALSE;
#line 1955 "DirectPhotoPage.c"
	}
#line 189 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Save", _tmp19_);
#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp25_ = sensitive;
#line 190 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp25_);
#line 1963 "DirectPhotoPage.c"
}


static void direct_photo_page_on_selection_group_altered (DirectPhotoPage* self) {
	CommandManager* _tmp0_ = NULL;
	CommandManager* _tmp1_ = NULL;
#line 193 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 200 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 200 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 200 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	command_manager_reset (_tmp1_);
#line 200 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_command_manager_unref0 (_tmp1_);
#line 1980 "DirectPhotoPage.c"
}


static gboolean direct_photo_page_real_on_double_click (EditingHostPage* base, GdkEventButton* event) {
	DirectPhotoPage * self;
	gboolean result = FALSE;
	FullscreenWindow* fs = NULL;
	GtkWindow* _tmp0_ = NULL;
	FullscreenWindow* _tmp1_ = NULL;
	FullscreenWindow* _tmp2_ = NULL;
	GdkEventButton* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 203 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 203 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = page_get_container (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FULLSCREEN_WINDOW) ? ((FullscreenWindow*) _tmp0_) : NULL;
#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp1_ == NULL) {
#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp0_);
#line 2005 "DirectPhotoPage.c"
	}
#line 204 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	fs = _tmp1_;
#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = fs;
#line 205 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp2_ != NULL) {
#line 2013 "DirectPhotoPage.c"
		FullscreenWindow* _tmp3_ = NULL;
#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = fs;
#line 206 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		fullscreen_window_close (_tmp3_);
#line 208 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		result = TRUE;
#line 208 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (fs);
#line 208 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return result;
#line 2025 "DirectPhotoPage.c"
	}
#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = event;
#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->on_double_click (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp4_);
#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp5_;
#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (fs);
#line 211 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 2037 "DirectPhotoPage.c"
}


static void direct_photo_page_real_update_ui (EditingHostPage* base, gboolean missing) {
	DirectPhotoPage * self;
	gboolean sensitivity = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp26_ = FALSE;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp29_ = FALSE;
#line 214 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = missing;
#line 215 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	sensitivity = !_tmp0_;
#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = sensitivity;
#line 217 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Save", _tmp1_);
#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = sensitivity;
#line 218 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SaveAs", _tmp2_);
#line 219 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = sensitivity;
#line 219 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SendTo", _tmp3_);
#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = sensitivity;
#line 220 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Publish", _tmp4_);
#line 221 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = sensitivity;
#line 221 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Print", _tmp5_);
#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp6_ = sensitivity;
#line 222 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonJumpToFile", _tmp6_);
#line 224 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp7_ = sensitivity;
#line 224 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonUndo", _tmp7_);
#line 225 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = sensitivity;
#line 225 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonRedo", _tmp8_);
#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = sensitivity;
#line 227 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "IncreaseSize", _tmp9_);
#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10_ = sensitivity;
#line 228 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "DecreaseSize", _tmp10_);
#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = sensitivity;
#line 229 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "ZoomFit", _tmp11_);
#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp12_ = sensitivity;
#line 230 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom100", _tmp12_);
#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp13_ = sensitivity;
#line 231 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Zoom200", _tmp13_);
#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp14_ = sensitivity;
#line 233 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp14_);
#line 234 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = sensitivity;
#line 234 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp15_);
#line 235 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp16_ = sensitivity;
#line 235 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp16_);
#line 236 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp17_ = sensitivity;
#line 236 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp17_);
#line 237 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp18_ = sensitivity;
#line 237 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", _tmp18_);
#line 238 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp19_ = sensitivity;
#line 238 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", _tmp19_);
#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp20_ = sensitivity;
#line 239 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Straighten", _tmp20_);
#line 240 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp21_ = sensitivity;
#line 240 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", _tmp21_);
#line 241 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22_ = sensitivity;
#line 241 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Adjust", _tmp22_);
#line 242 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp23_ = sensitivity;
#line 242 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp23_);
#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24_ = sensitivity;
#line 243 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", _tmp24_);
#line 244 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp25_ = sensitivity;
#line 244 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Fullscreen", _tmp25_);
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp27_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp27_) {
#line 2183 "DirectPhotoPage.c"
		gboolean _tmp28_ = FALSE;
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp28_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp26_ = !_tmp28_;
#line 2189 "DirectPhotoPage.c"
	} else {
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp26_ = FALSE;
#line 2193 "DirectPhotoPage.c"
	}
#line 246 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp26_);
#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp29_ = missing;
#line 248 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	EDITING_HOST_PAGE_CLASS (direct_photo_page_parent_class)->update_ui (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp29_);
#line 2201 "DirectPhotoPage.c"
}


static void direct_photo_page_real_update_actions (Page* base, gint selected_count, gint count) {
	DirectPhotoPage * self;
	gboolean multiple = FALSE;
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean revert_possible = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean rotate_possible = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean enhance_possible = FALSE;
	gboolean _tmp22_ = FALSE;
	gboolean _tmp23_ = FALSE;
	gboolean _tmp24_ = FALSE;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp26_ = FALSE;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_ = FALSE;
	gboolean _tmp29_ = FALSE;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp31_ = FALSE;
	Photo* _tmp40_ = NULL;
	Photo* _tmp41_ = NULL;
	gboolean _tmp42_ = FALSE;
	gint _tmp46_ = 0;
	gint _tmp47_ = 0;
#line 251 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection));
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_ > 1;
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 252 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	multiple = _tmp3_;
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp5_) {
#line 2254 "DirectPhotoPage.c"
		gboolean _tmp6_ = FALSE;
		Photo* _tmp7_ = NULL;
		Photo* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = _tmp7_;
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = photo_has_transformations (_tmp8_);
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = _tmp9_;
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp8_);
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (_tmp10_) {
#line 2272 "DirectPhotoPage.c"
			gboolean _tmp11_ = FALSE;
#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp11_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp6_ = !_tmp11_;
#line 2278 "DirectPhotoPage.c"
		} else {
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp6_ = FALSE;
#line 2282 "DirectPhotoPage.c"
		}
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = _tmp6_;
#line 2286 "DirectPhotoPage.c"
	} else {
#line 254 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = FALSE;
#line 2290 "DirectPhotoPage.c"
	}
#line 253 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	revert_possible = _tmp4_;
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp13_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp13_) {
#line 2298 "DirectPhotoPage.c"
		Photo* _tmp14_ = NULL;
		Photo* _tmp15_ = NULL;
		gboolean _tmp16_ = FALSE;
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp14_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp15_ = _tmp14_;
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp16_ = editing_host_page_is_rotate_available (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp15_);
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = _tmp16_;
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp15_);
#line 2312 "DirectPhotoPage.c"
	} else {
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = FALSE;
#line 2316 "DirectPhotoPage.c"
	}
#line 255 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	rotate_possible = _tmp12_;
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp18_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp18_) {
#line 2324 "DirectPhotoPage.c"
		Photo* _tmp19_ = NULL;
		Photo* _tmp20_ = NULL;
		gboolean _tmp21_ = FALSE;
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp19_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp20_ = _tmp19_;
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp21_ = editing_host_page_is_enhance_available (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp20_);
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp17_ = _tmp21_;
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp20_);
#line 2338 "DirectPhotoPage.c"
	} else {
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp17_ = FALSE;
#line 2342 "DirectPhotoPage.c"
	}
#line 256 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	enhance_possible = _tmp17_;
#line 258 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22_ = multiple;
#line 258 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "PrevPhoto", _tmp22_);
#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp23_ = multiple;
#line 259 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "NextPhoto", _tmp23_);
#line 260 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24_ = rotate_possible;
#line 260 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise", _tmp24_);
#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp25_ = rotate_possible;
#line 261 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateCounterclockwise", _tmp25_);
#line 262 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp26_ = rotate_possible;
#line 262 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipHorizontally", _tmp26_);
#line 263 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp27_ = rotate_possible;
#line 263 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "FlipVertically", _tmp27_);
#line 264 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp28_ = revert_possible;
#line 264 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Revert", _tmp28_);
#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp29_ = enhance_possible;
#line 265 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Enhance", _tmp29_);
#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp30_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 267 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "SetBackground", _tmp30_);
#line 269 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp31_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 269 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp31_) {
#line 2386 "DirectPhotoPage.c"
		Photo* _tmp32_ = NULL;
		Photo* _tmp33_ = NULL;
		Scaling _tmp34_ = {0};
		gboolean _tmp35_ = FALSE;
		Photo* _tmp36_ = NULL;
		Photo* _tmp37_ = NULL;
		Scaling _tmp38_ = {0};
		gboolean _tmp39_ = FALSE;
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp32_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp33_ = _tmp32_;
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		scaling_for_original (&_tmp34_);
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp35_ = editing_tools_crop_tool_is_available (_tmp33_, &_tmp34_);
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Crop", _tmp35_);
#line 270 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp33_);
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp36_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp37_ = _tmp36_;
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		scaling_for_original (&_tmp38_);
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp39_ = editing_tools_redeye_tool_is_available (_tmp37_, &_tmp38_);
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RedEye", _tmp39_);
#line 271 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp37_);
#line 2419 "DirectPhotoPage.c"
	}
#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp40_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp41_ = _tmp40_;
#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp42_ = _tmp41_ != NULL;
#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp41_);
#line 277 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp42_) {
#line 2431 "DirectPhotoPage.c"
		Photo* _tmp43_ = NULL;
		Photo* _tmp44_ = NULL;
		PhotoFileFormat _tmp45_ = 0;
#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp43_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp44_ = _tmp43_;
#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp45_ = photo_get_file_format (_tmp44_);
#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", _tmp45_ != PHOTO_FILE_FORMAT_RAW);
#line 278 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp44_);
#line 2445 "DirectPhotoPage.c"
	} else {
#line 280 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "AdjustDateTime", FALSE);
#line 2449 "DirectPhotoPage.c"
	}
#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp46_ = selected_count;
#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp47_ = count;
#line 283 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	PAGE_CLASS (direct_photo_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp46_, _tmp47_);
#line 2457 "DirectPhotoPage.c"
}


static gboolean direct_photo_page_check_ok_to_close_photo (DirectPhotoPage* self, Photo* photo) {
	gboolean result = FALSE;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean is_writeable = FALSE;
	Photo* _tmp5_ = NULL;
	Photo* _tmp6_ = NULL;
	PhotoFileFormat _tmp7_ = 0;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	gchar* save_option = NULL;
	gchar* _tmp14_ = NULL;
	GtkResponseType response = 0;
	const gchar* _tmp15_ = NULL;
	Photo* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
	const gchar* _tmp22_ = NULL;
	GtkResponseType _tmp23_ = 0;
	GtkResponseType _tmp24_ = 0;
	GtkResponseType _tmp25_ = 0;
#line 286 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), FALSE);
#line 286 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail ((photo == NULL) || IS_PHOTO (photo), FALSE);
#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = photo;
#line 289 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp0_ == NULL) {
#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		result = TRUE;
#line 290 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return result;
#line 2501 "DirectPhotoPage.c"
	}
#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = photo;
#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = photo_has_alterations (_tmp1_);
#line 292 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (!_tmp2_) {
#line 293 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		result = TRUE;
#line 293 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return result;
#line 2513 "DirectPhotoPage.c"
	}
#line 295 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = self->priv->drop_if_dirty;
#line 295 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp3_) {
#line 2519 "DirectPhotoPage.c"
		Photo* _tmp4_ = NULL;
#line 298 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = photo;
#line 298 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		photo_remove_all_transformations (_tmp4_);
#line 300 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		result = TRUE;
#line 300 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return result;
#line 2529 "DirectPhotoPage.c"
	}
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp6_ = _tmp5_;
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp7_ = photo_get_file_format (_tmp6_);
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = photo_file_format_can_write (_tmp7_);
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = _tmp8_;
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp6_);
#line 303 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	is_writeable = _tmp9_;
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = is_writeable;
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp11_) {
#line 2549 "DirectPhotoPage.c"
		const gchar* _tmp12_ = NULL;
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = _ ("_Save");
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = _tmp12_;
#line 2555 "DirectPhotoPage.c"
	} else {
		const gchar* _tmp13_ = NULL;
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp13_ = _ ("_Save a Copy");
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = _tmp13_;
#line 2562 "DirectPhotoPage.c"
	}
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp14_ = g_strdup (_tmp10_);
#line 304 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	save_option = _tmp14_;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = _ ("Lose changes to %s?");
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp16_ = photo;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp17_ = media_source_get_basename (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource));
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp18_ = _tmp17_;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp19_ = g_strdup_printf (_tmp15_, _tmp18_);
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp20_ = _tmp19_;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp21_ = save_option;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22_ = _ ("Close _without Saving");
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp23_ = app_window_negate_affirm_cancel_question (_tmp20_, _tmp21_, _tmp22_, NULL, NULL);
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24_ = _tmp23_;
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp20_);
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp18_);
#line 306 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	response = _tmp24_;
#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp25_ = response;
#line 310 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp25_ == GTK_RESPONSE_YES) {
#line 2598 "DirectPhotoPage.c"
		Photo* _tmp26_ = NULL;
#line 311 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp26_ = photo;
#line 311 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		photo_remove_all_transformations (_tmp26_);
#line 2604 "DirectPhotoPage.c"
	} else {
		GtkResponseType _tmp27_ = 0;
#line 312 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp27_ = response;
#line 312 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (_tmp27_ == GTK_RESPONSE_NO) {
#line 2611 "DirectPhotoPage.c"
			gboolean _tmp28_ = FALSE;
#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp28_ = is_writeable;
#line 313 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			if (_tmp28_) {
#line 2617 "DirectPhotoPage.c"
				Photo* _tmp29_ = NULL;
				GFile* _tmp30_ = NULL;
				GFile* _tmp31_ = NULL;
				Photo* _tmp32_ = NULL;
				Photo* _tmp33_ = NULL;
				PhotoFileFormat _tmp34_ = 0;
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp29_ = photo;
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp30_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_MEDIA_SOURCE, MediaSource));
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp31_ = _tmp30_;
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp32_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp33_ = _tmp32_;
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp34_ = photo_get_file_format (_tmp33_);
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				direct_photo_page_save (self, _tmp31_, 0, SCALE_CONSTRAINT_ORIGINAL, JPEG_QUALITY_HIGH, _tmp34_, FALSE, TRUE);
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_object_unref0 (_tmp33_);
#line 314 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_object_unref0 (_tmp31_);
#line 2642 "DirectPhotoPage.c"
			} else {
#line 317 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				direct_photo_page_on_save_as (self);
#line 2646 "DirectPhotoPage.c"
			}
		} else {
			gboolean _tmp35_ = FALSE;
			gboolean _tmp36_ = FALSE;
			GtkResponseType _tmp37_ = 0;
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp37_ = response;
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			if (_tmp37_ == GTK_RESPONSE_CANCEL) {
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp36_ = TRUE;
#line 2658 "DirectPhotoPage.c"
			} else {
				GtkResponseType _tmp38_ = 0;
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp38_ = response;
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp36_ = _tmp38_ == GTK_RESPONSE_DELETE_EVENT;
#line 2665 "DirectPhotoPage.c"
			}
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			if (_tmp36_) {
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp35_ = TRUE;
#line 2671 "DirectPhotoPage.c"
			} else {
				GtkResponseType _tmp39_ = 0;
#line 319 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp39_ = response;
#line 319 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp35_ = _tmp39_ == GTK_RESPONSE_CLOSE;
#line 2678 "DirectPhotoPage.c"
			}
#line 318 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			if (_tmp35_) {
#line 320 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				result = FALSE;
#line 320 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (save_option);
#line 320 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				return result;
#line 2688 "DirectPhotoPage.c"
			}
		}
	}
#line 323 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = TRUE;
#line 323 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (save_option);
#line 323 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 2698 "DirectPhotoPage.c"
}


gboolean direct_photo_page_check_quit (DirectPhotoPage* self) {
	gboolean result = FALSE;
	Photo* _tmp0_ = NULL;
	Photo* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 326 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (IS_DIRECT_PHOTO_PAGE (self), FALSE);
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = direct_photo_page_check_ok_to_close_photo (self, _tmp1_);
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp1_);
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp3_;
#line 327 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 2724 "DirectPhotoPage.c"
}


static gboolean direct_photo_page_real_confirm_replace_photo (EditingHostPage* base, Photo* old_photo, Photo* new_photo) {
	DirectPhotoPage * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_ = NULL;
#line 330 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 330 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail ((old_photo == NULL) || IS_PHOTO (old_photo), FALSE);
#line 330 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (IS_PHOTO (new_photo), FALSE);
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = old_photo;
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp1_ != NULL) {
#line 2743 "DirectPhotoPage.c"
		Photo* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp2_ = old_photo;
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = direct_photo_page_check_ok_to_close_photo (self, _tmp2_);
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = _tmp3_;
#line 2752 "DirectPhotoPage.c"
	} else {
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = TRUE;
#line 2756 "DirectPhotoPage.c"
	}
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp0_;
#line 331 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 2762 "DirectPhotoPage.c"
}


static void direct_photo_page_save (DirectPhotoPage* self, GFile* dest, gint scale, ScaleConstraint constraint, JpegQuality quality, PhotoFileFormat format, gboolean copy_unmodified, gboolean save_metadata) {
	Scaling scaling = {0};
	ScaleConstraint _tmp0_ = 0;
	gint _tmp1_ = 0;
	Scaling _tmp2_ = {0};
	DirectPhoto* photo = NULL;
	DirectPhotoSourceCollection* _tmp19_ = NULL;
	GFile* _tmp20_ = NULL;
	DirectPhoto* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	DirectView* tmp_view = NULL;
	DirectPhoto* _tmp24_ = NULL;
	DirectView* _tmp25_ = NULL;
	DirectViewCollection* _tmp26_ = NULL;
	DirectView* _tmp27_ = NULL;
	DirectPhotoSourceCollection* _tmp28_ = NULL;
	DirectPhoto* _tmp29_ = NULL;
	DirectViewCollection* _tmp30_ = NULL;
	DirectPhoto* _tmp31_ = NULL;
	GError * _inner_error_ = NULL;
#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (G_IS_FILE (dest));
#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = constraint;
#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = scale;
#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	scaling_for_constraint (_tmp0_, _tmp1_, FALSE, &_tmp2_);
#line 336 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	scaling = _tmp2_;
#line 2799 "DirectPhotoPage.c"
	{
		Photo* _tmp3_ = NULL;
		Photo* _tmp4_ = NULL;
		GFile* _tmp5_ = NULL;
		Scaling _tmp6_ = {0};
		JpegQuality _tmp7_ = 0;
		PhotoFileFormat _tmp8_ = 0;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = _tmp3_;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp5_ = dest;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = scaling;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = quality;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = format;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = copy_unmodified;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = save_metadata;
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		photo_export (_tmp4_, _tmp5_, &_tmp6_, _tmp7_, _tmp8_, _tmp9_, _tmp10_, &_inner_error_);
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 339 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2831 "DirectPhotoPage.c"
			goto __catch47_g_error;
		}
	}
	goto __finally47;
	__catch47_g_error:
	{
		GError* err = NULL;
		const gchar* _tmp11_ = NULL;
		GFile* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		GError* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
#line 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		err = _inner_error_;
#line 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_inner_error_ = NULL;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp11_ = _ ("Error while saving to %s: %s");
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp12_ = dest;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp13_ = g_file_get_path (_tmp12_);
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp14_ = _tmp13_;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp15_ = err;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp16_ = _tmp15_->message;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp17_ = g_strdup_printf (_tmp11_, _tmp14_, _tmp16_);
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp18_ = _tmp17_;
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		app_window_error_message (_tmp18_, NULL);
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp18_);
#line 341 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp14_);
#line 344 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_error_free0 (err);
#line 344 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return;
#line 2877 "DirectPhotoPage.c"
	}
	__finally47:
#line 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.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 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		g_clear_error (&_inner_error_);
#line 338 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return;
#line 2888 "DirectPhotoPage.c"
	}
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp19_ = direct_photo_global;
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp20_ = dest;
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22_ = direct_photo_source_collection_fetch (_tmp19_, _tmp20_, &_tmp21_, TRUE);
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (photo);
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	photo = _tmp21_;
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp23_ = _tmp22_;
#line 349 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp23_);
#line 351 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24_ = photo;
#line 351 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp25_ = direct_view_new (_tmp24_);
#line 351 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	tmp_view = _tmp25_;
#line 352 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp26_ = self->priv->view_controller;
#line 352 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp27_ = tmp_view;
#line 352 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_DATA_OBJECT, DataObject));
#line 354 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp28_ = direct_photo_global;
#line 354 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp29_ = photo;
#line 354 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_source_collection_reimport_photo (_tmp28_, _tmp29_);
#line 355 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp30_ = self->priv->view_controller;
#line 355 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp31_ = photo;
#line 355 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_display_mirror_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_VIEW_COLLECTION, ViewCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_PHOTO, Photo));
#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (tmp_view);
#line 334 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (photo);
#line 2932 "DirectPhotoPage.c"
}


static void direct_photo_page_on_save (DirectPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Photo* _tmp2_ = NULL;
	Photo* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	Photo* _tmp11_ = NULL;
	Photo* _tmp12_ = NULL;
	GFile* _tmp13_ = NULL;
	GFile* _tmp14_ = NULL;
	Photo* _tmp15_ = NULL;
	Photo* _tmp16_ = NULL;
	PhotoFileFormat _tmp17_ = 0;
#line 358 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp4_ = photo_has_alterations (_tmp3_);
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = !_tmp4_;
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp3_);
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp5_) {
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp1_ = TRUE;
#line 2966 "DirectPhotoPage.c"
	} else {
		Photo* _tmp6_ = NULL;
		Photo* _tmp7_ = NULL;
		PhotoFileFormat _tmp8_ = 0;
		gboolean _tmp9_ = FALSE;
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = photo_get_file_format (_tmp7_);
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = photo_file_format_can_write (_tmp8_);
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp1_ = !_tmp9_;
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp7_);
#line 2984 "DirectPhotoPage.c"
	}
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp1_) {
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = TRUE;
#line 2990 "DirectPhotoPage.c"
	} else {
		gboolean _tmp10_ = FALSE;
#line 360 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp10_ = editing_host_page_get_photo_missing (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 360 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp0_ = _tmp10_;
#line 2997 "DirectPhotoPage.c"
	}
#line 359 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp0_) {
#line 361 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return;
#line 3003 "DirectPhotoPage.c"
	}
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp12_ = _tmp11_;
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp13_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_MEDIA_SOURCE, MediaSource));
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp14_ = _tmp13_;
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp17_ = photo_get_file_format (_tmp16_);
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_save (self, _tmp14_, 0, SCALE_CONSTRAINT_ORIGINAL, JPEG_QUALITY_HIGH, _tmp17_, FALSE, TRUE);
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp16_);
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp14_);
#line 364 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp12_);
#line 3027 "DirectPhotoPage.c"
}


static void direct_photo_page_on_save_as (DirectPhotoPage* self) {
	ExportDialog* export_dialog = NULL;
	const gchar* _tmp0_ = NULL;
	ExportDialog* _tmp1_ = NULL;
	gint scale = 0;
	ScaleConstraint constraint = 0;
	ExportFormatParameters export_params = {0};
	ExportFormatParameters _tmp2_ = {0};
	ExportDialog* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	ScaleConstraint _tmp5_ = 0;
	gboolean _tmp6_ = FALSE;
	gchar* filename = NULL;
	Photo* _tmp7_ = NULL;
	Photo* _tmp8_ = NULL;
	ExportFormatParameters _tmp9_ = {0};
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	PhotoFileFormat effective_export_format = 0;
	Photo* _tmp12_ = NULL;
	Photo* _tmp13_ = NULL;
	ExportFormatParameters _tmp14_ = {0};
	PhotoFileFormat _tmp15_ = 0;
	PhotoFileFormat _tmp16_ = 0;
	gchar** output_format_extensions = NULL;
	PhotoFileFormat _tmp17_ = 0;
	PhotoFileFormatProperties* _tmp18_ = NULL;
	PhotoFileFormatProperties* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gchar** _tmp21_ = NULL;
	gchar** _tmp22_ = NULL;
	gint _tmp22__length1 = 0;
	gint output_format_extensions_length1 = 0;
	gint _output_format_extensions_size_ = 0;
	GtkFileFilter* output_format_filter = NULL;
	GtkFileFilter* _tmp23_ = NULL;
	gchar** _tmp24_ = NULL;
	gint _tmp24__length1 = 0;
	GtkFileChooserDialog* save_as_dialog = NULL;
	const gchar* _tmp36_ = NULL;
	AppWindow* _tmp37_ = NULL;
	AppWindow* _tmp38_ = NULL;
	GtkFileChooserDialog* _tmp39_ = NULL;
	GtkFileChooserDialog* _tmp40_ = NULL;
	GtkFileChooserDialog* _tmp41_ = NULL;
	GtkFileChooserDialog* _tmp42_ = NULL;
	const gchar* _tmp43_ = NULL;
	GtkFileChooserDialog* _tmp44_ = NULL;
	GFile* _tmp45_ = NULL;
	gchar* _tmp46_ = NULL;
	gchar* _tmp47_ = NULL;
	GtkFileChooserDialog* _tmp48_ = NULL;
	GtkFileFilter* _tmp49_ = NULL;
	GtkFileFilter* _tmp50_ = NULL;
	GtkFileChooserDialog* _tmp51_ = NULL;
	GtkFileChooserDialog* _tmp52_ = NULL;
	gint response = 0;
	GtkFileChooserDialog* _tmp53_ = NULL;
	gint _tmp54_ = 0;
	gint _tmp55_ = 0;
	GtkFileChooserDialog* _tmp74_ = NULL;
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = _ ("Save As");
#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = export_dialog_new (_tmp0_);
#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_object_ref_sink (_tmp1_);
#line 369 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	export_dialog = _tmp1_;
#line 373 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	export_format_parameters_last (&_tmp2_);
#line 373 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	export_params = _tmp2_;
#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = export_dialog;
#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp6_ = export_dialog_execute (_tmp3_, &_tmp4_, &_tmp5_, &export_params);
#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	scale = _tmp4_;
#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	constraint = _tmp5_;
#line 374 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (!_tmp6_) {
#line 375 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (export_dialog);
#line 375 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		return;
#line 3120 "DirectPhotoPage.c"
	}
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp7_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp8_ = _tmp7_;
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp9_ = export_params;
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp10_ = photo_get_export_basename_for_parameters (_tmp8_, &_tmp9_);
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp11_ = _tmp10_;
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp8_);
#line 377 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	filename = _tmp11_;
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp12_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp13_ = _tmp12_;
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp14_ = export_params;
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp15_ = photo_get_export_format_for_parameters (_tmp13_, &_tmp14_);
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp16_ = _tmp15_;
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp13_);
#line 378 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	effective_export_format = _tmp16_;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp17_ = effective_export_format;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp18_ = photo_file_format_get_properties (_tmp17_);
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp19_ = _tmp18_;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp21_ = photo_file_format_properties_get_known_extensions (_tmp19_, &_tmp20_);
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22_ = _tmp21_;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp22__length1 = _tmp20_;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_photo_file_format_properties_unref0 (_tmp19_);
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	output_format_extensions = _tmp22_;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	output_format_extensions_length1 = _tmp22__length1;
#line 381 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_output_format_extensions_size_ = output_format_extensions_length1;
#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp23_ = gtk_file_filter_new ();
#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_object_ref_sink (_tmp23_);
#line 383 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	output_format_filter = _tmp23_;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24_ = output_format_extensions;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp24__length1 = output_format_extensions_length1;
#line 3180 "DirectPhotoPage.c"
	{
		gchar** extension_collection = NULL;
		gint extension_collection_length1 = 0;
		gint _extension_collection_size_ = 0;
		gint extension_it = 0;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		extension_collection = _tmp24_;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		extension_collection_length1 = _tmp24__length1;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		for (extension_it = 0; extension_it < _tmp24__length1; extension_it = extension_it + 1) {
#line 3192 "DirectPhotoPage.c"
			gchar* _tmp25_ = NULL;
			gchar* extension = NULL;
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			_tmp25_ = g_strdup (extension_collection[extension_it]);
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
			extension = _tmp25_;
#line 3199 "DirectPhotoPage.c"
			{
				gchar* uppercase_extension = NULL;
				const gchar* _tmp26_ = NULL;
				gchar* _tmp27_ = NULL;
				GtkFileFilter* _tmp28_ = NULL;
				const gchar* _tmp29_ = NULL;
				gchar* _tmp30_ = NULL;
				gchar* _tmp31_ = NULL;
				GtkFileFilter* _tmp32_ = NULL;
				const gchar* _tmp33_ = NULL;
				gchar* _tmp34_ = NULL;
				gchar* _tmp35_ = NULL;
#line 385 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp26_ = extension;
#line 385 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp27_ = g_utf8_strup (_tmp26_, (gssize) -1);
#line 385 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				uppercase_extension = _tmp27_;
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp28_ = output_format_filter;
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp29_ = extension;
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp30_ = g_strconcat ("*.", _tmp29_, NULL);
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp31_ = _tmp30_;
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				gtk_file_filter_add_pattern (_tmp28_, _tmp31_);
#line 386 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (_tmp31_);
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp32_ = output_format_filter;
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp33_ = uppercase_extension;
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp34_ = g_strconcat ("*.", _tmp33_, NULL);
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_tmp35_ = _tmp34_;
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				gtk_file_filter_add_pattern (_tmp32_, _tmp35_);
#line 387 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (_tmp35_);
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (uppercase_extension);
#line 384 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				_g_free0 (extension);
#line 3246 "DirectPhotoPage.c"
			}
		}
	}
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp36_ = _ ("Save As");
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp37_ = app_window_get_instance ();
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp38_ = _tmp37_;
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp39_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, gtk_window_get_type (), GtkWindow), GTK_FILE_CHOOSER_ACTION_SAVE, RESOURCES_CANCEL_LABEL, GTK_RESPONSE_CANCEL, RESOURCES_OK_LABEL, GTK_RESPONSE_OK, NULL);
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_object_ref_sink (_tmp39_);
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp40_ = _tmp39_;
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (_tmp38_);
#line 390 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	save_as_dialog = _tmp40_;
#line 393 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp41_ = save_as_dialog;
#line 393 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_set_select_multiple (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), FALSE);
#line 394 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp42_ = save_as_dialog;
#line 394 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp43_ = filename;
#line 394 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_set_current_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp43_);
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp44_ = save_as_dialog;
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp45_ = self->priv->current_save_dir;
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp46_ = g_file_get_path (_tmp45_);
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp47_ = _tmp46_;
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_set_current_folder (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp47_);
#line 395 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (_tmp47_);
#line 396 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp48_ = save_as_dialog;
#line 396 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp49_ = output_format_filter;
#line 396 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp50_ = _g_object_ref0 (_tmp49_);
#line 396 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_add_filter (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), _tmp50_);
#line 397 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp51_ = save_as_dialog;
#line 397 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_set_do_overwrite_confirmation (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), TRUE);
#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp52_ = save_as_dialog;
#line 398 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_file_chooser_set_local_only (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser), FALSE);
#line 400 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp53_ = save_as_dialog;
#line 400 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp54_ = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_dialog_get_type (), GtkDialog));
#line 400 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	response = _tmp54_;
#line 401 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp55_ = response;
#line 401 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp55_ == ((gint) GTK_RESPONSE_OK)) {
#line 3314 "DirectPhotoPage.c"
		GtkFileChooserDialog* _tmp56_ = NULL;
		gchar* _tmp57_ = NULL;
		gchar* _tmp58_ = NULL;
		GFile* _tmp59_ = NULL;
		GFile* _tmp60_ = NULL;
		gint _tmp61_ = 0;
		ScaleConstraint _tmp62_ = 0;
		ExportFormatParameters _tmp63_ = {0};
		JpegQuality _tmp64_ = 0;
		PhotoFileFormat _tmp65_ = 0;
		ExportFormatParameters _tmp66_ = {0};
		ExportFormatMode _tmp67_ = 0;
		ExportFormatParameters _tmp68_ = {0};
		gboolean _tmp69_ = FALSE;
		GtkFileChooserDialog* _tmp70_ = NULL;
		gchar* _tmp71_ = NULL;
		gchar* _tmp72_ = NULL;
		GFile* _tmp73_ = NULL;
#line 404 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		self->priv->drop_if_dirty = TRUE;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp56_ = save_as_dialog;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp57_ = gtk_file_chooser_get_uri (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser));
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp58_ = _tmp57_;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp59_ = g_file_new_for_uri (_tmp58_);
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp60_ = _tmp59_;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp61_ = scale;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp62_ = constraint;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp63_ = export_params;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp64_ = _tmp63_.quality;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp65_ = effective_export_format;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp66_ = export_params;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp67_ = _tmp66_.mode;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp68_ = export_params;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp69_ = _tmp68_.export_metadata;
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		direct_photo_page_save (self, _tmp60_, _tmp61_, _tmp62_, _tmp64_, _tmp65_, _tmp67_ == EXPORT_FORMAT_MODE_UNMODIFIED, _tmp69_);
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp60_);
#line 405 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp58_);
#line 408 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		self->priv->drop_if_dirty = FALSE;
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp70_ = save_as_dialog;
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp71_ = gtk_file_chooser_get_current_folder (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, GTK_TYPE_FILE_CHOOSER, GtkFileChooser));
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp72_ = _tmp71_;
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp73_ = g_file_new_for_path (_tmp72_);
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (self->priv->current_save_dir);
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		self->priv->current_save_dir = _tmp73_;
#line 410 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_free0 (_tmp72_);
#line 3385 "DirectPhotoPage.c"
	}
#line 413 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp74_ = save_as_dialog;
#line 413 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, gtk_widget_get_type (), GtkWidget));
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (save_as_dialog);
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (output_format_filter);
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	output_format_extensions = (_vala_array_free (output_format_extensions, output_format_extensions_length1, (GDestroyNotify) g_free), NULL);
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_free0 (filename);
#line 368 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (export_dialog);
#line 3401 "DirectPhotoPage.c"
}


static void direct_photo_page_on_send_to (DirectPhotoPage* self) {
	gboolean _tmp0_ = FALSE;
#line 416 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 417 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = editing_host_page_has_photo (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 417 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp0_) {
#line 3413 "DirectPhotoPage.c"
		ViewCollection* _tmp1_ = NULL;
		ViewCollection* _tmp2_ = NULL;
		GeeList* _tmp3_ = NULL;
		GeeCollection* _tmp4_ = NULL;
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp1_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp2_ = _tmp1_;
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp3_ = view_collection_get_selected_sources (_tmp2_);
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		desktop_integration_send_to (_tmp4_);
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp4_);
#line 418 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_data_collection_unref0 (_tmp2_);
#line 3432 "DirectPhotoPage.c"
	}
}


static gboolean direct_photo_page_real_on_app_key_pressed (Page* base, GdkEventKey* event) {
	DirectPhotoPage * self;
	gboolean result = FALSE;
	gboolean handled = FALSE;
	GdkEventKey* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GQuark _tmp5_ = 0U;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	static GQuark _tmp4_label0 = 0;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	static GQuark _tmp4_label1 = 0;
#line 3450 "DirectPhotoPage.c"
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
#line 421 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 421 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 422 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	handled = TRUE;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = event;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_->keyval;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = gdk_keyval_name (_tmp1_);
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_;
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("bracketright")))) {
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		switch (0) {
#line 3473 "DirectPhotoPage.c"
			default:
			{
#line 426 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise");
#line 427 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				break;
#line 3480 "DirectPhotoPage.c"
			}
		}
	} else if (_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("bracketleft")))) {
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		switch (0) {
#line 3486 "DirectPhotoPage.c"
			default:
			{
#line 430 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				page_activate_action (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "RotateClockwise");
#line 431 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				break;
#line 3493 "DirectPhotoPage.c"
			}
		}
	} else {
#line 424 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		switch (0) {
#line 3499 "DirectPhotoPage.c"
			default:
			{
#line 434 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				handled = FALSE;
#line 435 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
				break;
#line 3506 "DirectPhotoPage.c"
			}
		}
	}
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp7_ = handled;
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp7_) {
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = TRUE;
#line 3516 "DirectPhotoPage.c"
	} else {
		GdkEventKey* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = event;
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = PAGE_CLASS (direct_photo_page_parent_class)->on_app_key_pressed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), TYPE_PAGE, Page), _tmp8_);
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = _tmp9_;
#line 3526 "DirectPhotoPage.c"
	}
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = _tmp6_;
#line 438 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 3532 "DirectPhotoPage.c"
}


static void direct_photo_page_on_print (DirectPhotoPage* self) {
	ViewCollection* _tmp0_ = NULL;
	ViewCollection* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
#line 441 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = _tmp0_;
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp2_ = view_collection_get_selected_count (_tmp1_);
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp3_ = _tmp2_ > 0;
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data_collection_unref0 (_tmp1_);
#line 442 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (_tmp3_) {
#line 3555 "DirectPhotoPage.c"
		PrintManager* _tmp4_ = NULL;
		PrintManager* _tmp5_ = NULL;
		ViewCollection* _tmp6_ = NULL;
		ViewCollection* _tmp7_ = NULL;
		GeeList* _tmp8_ = NULL;
		GeeCollection* _tmp9_ = NULL;
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp4_ = print_manager_get_instance ();
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp5_ = _tmp4_;
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp6_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page));
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp7_ = _tmp6_;
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp8_ = view_collection_get_selected_sources_of_type (_tmp7_, TYPE_PHOTO);
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection);
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		print_manager_spool_photo (_tmp5_, _tmp9_);
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (_tmp9_);
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_data_collection_unref0 (_tmp7_);
#line 443 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_print_manager_unref0 (_tmp5_);
#line 3582 "DirectPhotoPage.c"
	}
}


static Block6Data* block6_data_ref (Block6Data* _data6_) {
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_atomic_int_inc (&_data6_->_ref_count_);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return _data6_;
#line 3592 "DirectPhotoPage.c"
}


static void block6_data_unref (void * _userdata_) {
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
#line 3601 "DirectPhotoPage.c"
		DirectPhotoPage* self;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		self = _data6_->self;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		_g_object_unref0 (self);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
		g_slice_free (Block6Data, _data6_);
#line 3609 "DirectPhotoPage.c"
	}
}


static gboolean __lambda15_ (Block6Data* _data6_) {
	DirectPhotoPage* self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 452 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = _data6_->self;
#line 453 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = _data6_->should_allow_rotation;
#line 453 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	editing_host_page_enable_rotate (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EDITING_HOST_PAGE, EditingHostPage), _tmp0_);
#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = FALSE;
#line 455 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 3628 "DirectPhotoPage.c"
}


static gboolean ___lambda15__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda15_ (self);
#line 452 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 3637 "DirectPhotoPage.c"
}


static void direct_photo_page_on_dphoto_can_rotate_changed (DirectPhotoPage* self, gboolean should_allow_rotation) {
	Block6Data* _data6_;
	gboolean _tmp0_ = FALSE;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (IS_DIRECT_PHOTO_PAGE (self));
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data6_ = g_slice_new0 (Block6Data);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data6_->_ref_count_ = 1;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data6_->self = g_object_ref (self);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = should_allow_rotation;
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data6_->should_allow_rotation = _tmp0_;
#line 452 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda15__gsource_func, block6_data_ref (_data6_), block6_data_unref);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	block6_data_unref (_data6_);
#line 448 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data6_ = NULL;
#line 3662 "DirectPhotoPage.c"
}


static DataView* direct_photo_page_real_create_photo_view (EditingHostPage* base, DataSource* source) {
	DirectPhotoPage * self;
	DataView* result = NULL;
	DataSource* _tmp0_ = NULL;
	DirectView* _tmp1_ = NULL;
#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 459 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 460 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = source;
#line 460 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp1_ = direct_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DIRECT_PHOTO, DirectPhoto));
#line 460 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView);
#line 460 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return result;
#line 3683 "DirectPhotoPage.c"
}


static void direct_photo_page_class_init (DirectPhotoPageClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_photo_page_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_type_class_add_private (klass, sizeof (DirectPhotoPagePrivate));
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->init_collect_ui_filenames = direct_photo_page_real_init_collect_ui_filenames;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->add_actions = direct_photo_page_real_add_actions;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->remove_actions = direct_photo_page_real_remove_actions;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->init_collect_injection_groups = direct_photo_page_real_init_collect_injection_groups;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((GtkWidgetClass *) klass)->realize = direct_photo_page_real_realize;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->photo_changing = direct_photo_page_real_photo_changing;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->on_context_buttonpress = direct_photo_page_real_on_context_buttonpress;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->on_increase_size = direct_photo_page_real_on_increase_size;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->on_decrease_size = direct_photo_page_real_on_decrease_size;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->on_double_click = direct_photo_page_real_on_double_click;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->update_ui = direct_photo_page_real_update_ui;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->update_actions = direct_photo_page_real_update_actions;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->confirm_replace_photo = direct_photo_page_real_confirm_replace_photo;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->on_app_key_pressed = direct_photo_page_real_on_app_key_pressed;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((EditingHostPageClass *) klass)->create_photo_view = direct_photo_page_real_create_photo_view;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	G_OBJECT_CLASS (klass)->finalize = direct_photo_page_finalize;
#line 3724 "DirectPhotoPage.c"
}


static void direct_photo_page_instance_init (DirectPhotoPage * self) {
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv = DIRECT_PHOTO_PAGE_GET_PRIVATE (self);
#line 9 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->view_controller = NULL;
#line 11 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self->priv->drop_if_dirty = FALSE;
#line 3735 "DirectPhotoPage.c"
}


static void direct_photo_page_finalize (GObject* obj) {
	DirectPhotoPage * self;
	DirectPhotoSourceCollection* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DIRECT_PHOTO_PAGE, DirectPhotoPage);
#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = direct_photo_global;
#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE);
#line 32 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _direct_photo_page_on_photos_altered_data_collection_items_altered, self);
#line 8 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (self->priv->initial_file);
#line 9 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_data_collection_unref0 (self->priv->view_controller);
#line 10 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_g_object_unref0 (self->priv->current_save_dir);
#line 7 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	G_OBJECT_CLASS (direct_photo_page_parent_class)->finalize (obj);
#line 3759 "DirectPhotoPage.c"
}


GType direct_photo_page_get_type (void) {
	static volatile gsize direct_photo_page_type_id__volatile = 0;
	if (g_once_init_enter (&direct_photo_page_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DirectPhotoPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_photo_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectPhotoPage), 0, (GInstanceInitFunc) direct_photo_page_instance_init, NULL };
		GType direct_photo_page_type_id;
		direct_photo_page_type_id = g_type_register_static (TYPE_EDITING_HOST_PAGE, "DirectPhotoPage", &g_define_type_info, 0);
		g_once_init_leave (&direct_photo_page_type_id__volatile, direct_photo_page_type_id);
	}
	return direct_photo_page_type_id__volatile;
}


DirectFullscreenPhotoPage* direct_fullscreen_photo_page_construct (GType object_type, GFile* file) {
	DirectFullscreenPhotoPage * self = NULL;
	GFile* _tmp0_ = NULL;
#line 465 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = file;
#line 466 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = (DirectFullscreenPhotoPage*) direct_photo_page_construct (object_type, _tmp0_);
#line 465 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return self;
#line 3786 "DirectPhotoPage.c"
}


DirectFullscreenPhotoPage* direct_fullscreen_photo_page_new (GFile* file) {
#line 465 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	return direct_fullscreen_photo_page_construct (TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, file);
#line 3793 "DirectPhotoPage.c"
}


static void direct_fullscreen_photo_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_filenames) {
	DirectFullscreenPhotoPage * self;
	GeeList* _tmp0_ = NULL;
#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DIRECT_FULLSCREEN_PHOTO_PAGE, DirectFullscreenPhotoPage);
#line 469 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	g_return_if_fail (GEE_IS_LIST (ui_filenames));
#line 472 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	_tmp0_ = ui_filenames;
#line 472 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), "direct_context.ui");
#line 3808 "DirectPhotoPage.c"
}


static void direct_fullscreen_photo_page_class_init (DirectFullscreenPhotoPageClass * klass) {
#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	direct_fullscreen_photo_page_parent_class = g_type_class_peek_parent (klass);
#line 464 "/home/jens/Source/shotwell/src/direct/DirectPhotoPage.vala"
	((PageClass *) klass)->init_collect_ui_filenames = direct_fullscreen_photo_page_real_init_collect_ui_filenames;
#line 3817 "DirectPhotoPage.c"
}


static void direct_fullscreen_photo_page_instance_init (DirectFullscreenPhotoPage * self) {
}


GType direct_fullscreen_photo_page_get_type (void) {
	static volatile gsize direct_fullscreen_photo_page_type_id__volatile = 0;
	if (g_once_init_enter (&direct_fullscreen_photo_page_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DirectFullscreenPhotoPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) direct_fullscreen_photo_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DirectFullscreenPhotoPage), 0, (GInstanceInitFunc) direct_fullscreen_photo_page_instance_init, NULL };
		GType direct_fullscreen_photo_page_type_id;
		direct_fullscreen_photo_page_type_id = g_type_register_static (TYPE_DIRECT_PHOTO_PAGE, "DirectFullscreenPhotoPage", &g_define_type_info, 0);
		g_once_init_leave (&direct_fullscreen_photo_page_type_id__volatile, direct_fullscreen_photo_page_type_id);
	}
	return direct_fullscreen_photo_page_type_id__volatile;
}


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);
}