summaryrefslogtreecommitdiff
path: root/src/events/Branch.c
blob: c73d1662d98c0e7b7dc1e1188ffda3900f2478b6 (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
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
/* Branch.c generated by valac 0.34.7, the Vala compiler
 * generated from Branch.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 <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
#include <time.h>
#include <gdk/gdk.h>


#define SIDEBAR_TYPE_BRANCH (sidebar_branch_get_type ())
#define SIDEBAR_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranch))
#define SIDEBAR_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_BRANCH, SidebarBranchClass))
#define SIDEBAR_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_BRANCH))
#define SIDEBAR_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_BRANCH))
#define SIDEBAR_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranchClass))

typedef struct _SidebarBranch SidebarBranch;
typedef struct _SidebarBranchClass SidebarBranchClass;
typedef struct _SidebarBranchPrivate SidebarBranchPrivate;

#define EVENTS_TYPE_BRANCH (events_branch_get_type ())
#define EVENTS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_BRANCH, EventsBranch))
#define EVENTS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_BRANCH, EventsBranchClass))
#define EVENTS_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_BRANCH))
#define EVENTS_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_BRANCH))
#define EVENTS_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_BRANCH, EventsBranchClass))

typedef struct _EventsBranch EventsBranch;
typedef struct _EventsBranchClass EventsBranchClass;
typedef struct _EventsBranchPrivate EventsBranchPrivate;

#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_EVENT_SOURCE (event_source_get_type ())
#define EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE, EventSource))
#define EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE, EventSourceClass))
#define IS_EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE))
#define IS_EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE))
#define EVENT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE, EventSourceClass))

typedef struct _EventSource EventSource;
typedef struct _EventSourceClass EventSourceClass;

#define TYPE_EVENT (event_get_type ())
#define EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT, Event))
#define EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT, EventClass))
#define IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT))
#define IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT))
#define EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT, EventClass))

typedef struct _Event Event;
typedef struct _EventClass EventClass;

#define SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ())
#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY))
#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass))

typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry;
typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass;

#define EVENTS_TYPE_EVENT_ENTRY (events_event_entry_get_type ())
#define EVENTS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry))
#define EVENTS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass))
#define EVENTS_IS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_EVENT_ENTRY))
#define EVENTS_IS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_EVENT_ENTRY))
#define EVENTS_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass))

typedef struct _EventsEventEntry EventsEventEntry;
typedef struct _EventsEventEntryClass EventsEventEntryClass;

#define EVENTS_TYPE_DIRECTORY_ENTRY (events_directory_entry_get_type ())
#define EVENTS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry))
#define EVENTS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass))
#define EVENTS_IS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_DIRECTORY_ENTRY))
#define EVENTS_IS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_DIRECTORY_ENTRY))
#define EVENTS_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass))

typedef struct _EventsDirectoryEntry EventsDirectoryEntry;
typedef struct _EventsDirectoryEntryClass EventsDirectoryEntryClass;

#define EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY (events_undated_directory_entry_get_type ())
#define EVENTS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry))
#define EVENTS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass))
#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY))
#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY))
#define EVENTS_UNDATED_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass))

typedef struct _EventsUndatedDirectoryEntry EventsUndatedDirectoryEntry;
typedef struct _EventsUndatedDirectoryEntryClass EventsUndatedDirectoryEntryClass;

#define EVENTS_TYPE_NO_EVENT_ENTRY (events_no_event_entry_get_type ())
#define EVENTS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry))
#define EVENTS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass))
#define EVENTS_IS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_NO_EVENT_ENTRY))
#define EVENTS_IS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_NO_EVENT_ENTRY))
#define EVENTS_NO_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass))

typedef struct _EventsNoEventEntry EventsNoEventEntry;
typedef struct _EventsNoEventEntryClass EventsNoEventEntryClass;

#define EVENTS_TYPE_MASTER_DIRECTORY_ENTRY (events_master_directory_entry_get_type ())
#define EVENTS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry))
#define EVENTS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass))
#define EVENTS_IS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY))
#define EVENTS_IS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY))
#define EVENTS_MASTER_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass))

typedef struct _EventsMasterDirectoryEntry EventsMasterDirectoryEntry;
typedef struct _EventsMasterDirectoryEntryClass EventsMasterDirectoryEntryClass;

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

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

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

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

#define TYPE_EVENT_SOURCE_COLLECTION (event_source_collection_get_type ())
#define EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection))
#define EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))
#define IS_EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE_COLLECTION))
#define IS_EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE_COLLECTION))
#define EVENT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))

typedef struct _EventSourceCollection EventSourceCollection;
typedef struct _EventSourceCollectionClass EventSourceCollectionClass;

#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 TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))

typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;

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

typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SIDEBAR_TYPE_GROUPING (sidebar_grouping_get_type ())
#define SIDEBAR_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_GROUPING, SidebarGrouping))
#define SIDEBAR_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass))
#define SIDEBAR_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_GROUPING))
#define SIDEBAR_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_GROUPING))
#define SIDEBAR_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass))

typedef struct _SidebarGrouping SidebarGrouping;
typedef struct _SidebarGroupingClass SidebarGroupingClass;

#define SIDEBAR_TYPE_HEADER (sidebar_header_get_type ())
#define SIDEBAR_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_HEADER, SidebarHeader))
#define SIDEBAR_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_HEADER, SidebarHeaderClass))
#define SIDEBAR_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_HEADER))
#define SIDEBAR_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_HEADER))
#define SIDEBAR_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_HEADER, SidebarHeaderClass))

typedef struct _SidebarHeader SidebarHeader;
typedef struct _SidebarHeaderClass SidebarHeaderClass;

#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ())
#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry))
#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY))
#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface))

typedef struct _SidebarEntry SidebarEntry;
typedef struct _SidebarEntryIface SidebarEntryIface;

#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ())
#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree))
#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass))
#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE))
#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE))
#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass))

typedef struct _SidebarTree SidebarTree;
typedef struct _SidebarTreeClass SidebarTreeClass;

#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ())

#define EVENTS_TYPE_YEAR_DIRECTORY_ENTRY (events_year_directory_entry_get_type ())
#define EVENTS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry))
#define EVENTS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass))
#define EVENTS_IS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY))
#define EVENTS_IS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY))
#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass))

typedef struct _EventsYearDirectoryEntry EventsYearDirectoryEntry;
typedef struct _EventsYearDirectoryEntryClass EventsYearDirectoryEntryClass;

#define EVENTS_TYPE_MONTH_DIRECTORY_ENTRY (events_month_directory_entry_get_type ())
#define EVENTS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry))
#define EVENTS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass))
#define EVENTS_IS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY))
#define EVENTS_IS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY))
#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass))

typedef struct _EventsMonthDirectoryEntry EventsMonthDirectoryEntry;
typedef struct _EventsMonthDirectoryEntryClass EventsMonthDirectoryEntryClass;

#define TYPE_EVENT_ID (event_id_get_type ())
typedef struct _EventID EventID;
#define _g_free0(var) (var = (g_free (var), NULL))

#define SIDEBAR_TYPE_RENAMEABLE_ENTRY (sidebar_renameable_entry_get_type ())
#define SIDEBAR_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry))
#define SIDEBAR_IS_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY))
#define SIDEBAR_RENAMEABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntryIface))

typedef struct _SidebarRenameableEntry SidebarRenameableEntry;
typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface;
#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL)))
typedef struct _Block8Data Block8Data;
typedef struct _Block9Data Block9Data;

#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ())
#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry))
#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY))
#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface))

typedef struct _SidebarSelectableEntry SidebarSelectableEntry;
typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface;

#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ())
#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative))
#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE))
#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface))

typedef struct _SidebarPageRepresentative SidebarPageRepresentative;
typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface;

#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;

#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ())
#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable))
#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE))
#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface))

typedef struct _SidebarContextable SidebarContextable;
typedef struct _SidebarContextableIface SidebarContextableIface;
typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate;

#define SIDEBAR_TYPE_EXPANDABLE_ENTRY (sidebar_expandable_entry_get_type ())
#define SIDEBAR_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntry))
#define SIDEBAR_IS_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY))
#define SIDEBAR_EXPANDABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntryIface))

typedef struct _SidebarExpandableEntry SidebarExpandableEntry;
typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface;
typedef struct _EventsDirectoryEntryPrivate EventsDirectoryEntryPrivate;
typedef struct _EventsMasterDirectoryEntryPrivate EventsMasterDirectoryEntryPrivate;

#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ())
#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage))
#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))
#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE))
#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE))
#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass))

typedef struct _CheckerboardPage CheckerboardPage;
typedef struct _CheckerboardPageClass CheckerboardPageClass;

#define TYPE_EVENTS_DIRECTORY_PAGE (events_directory_page_get_type ())
#define EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage))
#define EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass))
#define IS_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENTS_DIRECTORY_PAGE))
#define IS_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENTS_DIRECTORY_PAGE))
#define EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass))

typedef struct _EventsDirectoryPage EventsDirectoryPage;
typedef struct _EventsDirectoryPageClass EventsDirectoryPageClass;

#define TYPE_MASTER_EVENTS_DIRECTORY_PAGE (master_events_directory_page_get_type ())
#define MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPage))
#define MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass))
#define IS_MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE))
#define IS_MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE))
#define MASTER_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass))

typedef struct _MasterEventsDirectoryPage MasterEventsDirectoryPage;
typedef struct _MasterEventsDirectoryPageClass MasterEventsDirectoryPageClass;
typedef struct _EventsYearDirectoryEntryPrivate EventsYearDirectoryEntryPrivate;

#define SUB_EVENTS_DIRECTORY_PAGE_TYPE_DIRECTORY_TYPE (sub_events_directory_page_directory_type_get_type ())

#define TYPE_SUB_EVENTS_DIRECTORY_PAGE (sub_events_directory_page_get_type ())
#define SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPage))
#define SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass))
#define IS_SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE))
#define IS_SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE))
#define SUB_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass))

typedef struct _SubEventsDirectoryPage SubEventsDirectoryPage;
typedef struct _SubEventsDirectoryPageClass SubEventsDirectoryPageClass;
typedef struct _EventsMonthDirectoryEntryPrivate EventsMonthDirectoryEntryPrivate;
typedef struct _EventsUndatedDirectoryEntryPrivate EventsUndatedDirectoryEntryPrivate;

#define SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY (sidebar_internal_drop_target_entry_get_type ())
#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntry))
#define SIDEBAR_IS_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY))
#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntryIface))

typedef struct _SidebarInternalDropTargetEntry SidebarInternalDropTargetEntry;
typedef struct _SidebarInternalDropTargetEntryIface SidebarInternalDropTargetEntryIface;

#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;
typedef struct _EventsEventEntryPrivate EventsEventEntryPrivate;

#define TYPE_MEDIA_PAGE (media_page_get_type ())
#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage))
#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass))
#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE))
#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE))
#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass))

typedef struct _MediaPage MediaPage;
typedef struct _MediaPageClass MediaPageClass;

#define TYPE_COLLECTION_PAGE (collection_page_get_type ())
#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage))
#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass))
#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE))
#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE))
#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass))

typedef struct _CollectionPage CollectionPage;
typedef struct _CollectionPageClass CollectionPageClass;

#define TYPE_EVENT_PAGE (event_page_get_type ())
#define EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_PAGE, EventPage))
#define EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass))
#define IS_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_PAGE))
#define IS_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_PAGE))
#define EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_PAGE, EventPageClass))

typedef struct _EventPage EventPage;
typedef struct _EventPageClass EventPageClass;

#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 TYPE_COMMAND (command_get_type ())
#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command))
#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass))
#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND))
#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND))
#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass))

typedef struct _Command Command;
typedef struct _CommandClass CommandClass;

#define TYPE_PAGE_COMMAND (page_command_get_type ())
#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand))
#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass))
#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND))
#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND))
#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass))

typedef struct _PageCommand PageCommand;
typedef struct _PageCommandClass PageCommandClass;

#define TYPE_SIMPLE_PROXYABLE_COMMAND (simple_proxyable_command_get_type ())
#define SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand))
#define SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))
#define IS_SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define IS_SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define SIMPLE_PROXYABLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))

typedef struct _SimpleProxyableCommand SimpleProxyableCommand;
typedef struct _SimpleProxyableCommandClass SimpleProxyableCommandClass;

#define TYPE_RENAME_EVENT_COMMAND (rename_event_command_get_type ())
#define RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommand))
#define RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass))
#define IS_RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_EVENT_COMMAND))
#define IS_RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_EVENT_COMMAND))
#define RENAME_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass))

typedef struct _RenameEventCommand RenameEventCommand;
typedef struct _RenameEventCommandClass RenameEventCommandClass;
#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))

#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_MOVE_PHOTOS_COMMAND (move_photos_command_get_type ())
#define MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand))
#define MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass))
#define IS_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOVE_PHOTOS_COMMAND))
#define IS_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOVE_PHOTOS_COMMAND))
#define MOVE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass))

typedef struct _MovePhotosCommand MovePhotosCommand;
typedef struct _MovePhotosCommandClass MovePhotosCommandClass;

#define TYPE_SET_EVENT_COMMAND (set_event_command_get_type ())
#define SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommand))
#define SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_EVENT_COMMAND, SetEventCommandClass))
#define IS_SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_EVENT_COMMAND))
#define IS_SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_EVENT_COMMAND))
#define SET_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommandClass))

typedef struct _SetEventCommand SetEventCommand;
typedef struct _SetEventCommandClass SetEventCommandClass;
typedef struct _EventsNoEventEntryPrivate EventsNoEventEntryPrivate;

#define TYPE_NO_EVENT_PAGE (no_event_page_get_type ())
#define NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NO_EVENT_PAGE, NoEventPage))
#define NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NO_EVENT_PAGE, NoEventPageClass))
#define IS_NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NO_EVENT_PAGE))
#define IS_NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NO_EVENT_PAGE))
#define NO_EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NO_EVENT_PAGE, NoEventPageClass))

typedef struct _NoEventPage NoEventPage;
typedef struct _NoEventPageClass NoEventPageClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _SidebarBranch {
	GObject parent_instance;
	SidebarBranchPrivate * priv;
};

struct _SidebarBranchClass {
	GObjectClass parent_class;
};

struct _EventsBranch {
	SidebarBranch parent_instance;
	EventsBranchPrivate * priv;
};

struct _EventsBranchClass {
	SidebarBranchClass parent_class;
};

struct _EventsBranchPrivate {
	GeeHashMap* entry_map;
	EventsUndatedDirectoryEntry* undated_entry;
	EventsNoEventEntry* no_event_entry;
	EventsMasterDirectoryEntry* all_events_entry;
};

struct _SidebarEntryIface {
	GTypeInterface parent_iface;
	gchar* (*get_sidebar_name) (SidebarEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarEntry* self);
	gchar* (*get_sidebar_icon) (SidebarEntry* self);
	gchar* (*to_string) (SidebarEntry* self);
	void (*grafted) (SidebarEntry* self, SidebarTree* tree);
	void (*pruned) (SidebarEntry* self, SidebarTree* tree);
};

typedef enum  {
	SIDEBAR_BRANCH_OPTIONS_NONE = 0,
	SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY = 1 << 0,
	SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD = 1 << 1,
	SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD = 1 << 2,
	SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING = 1 << 3
} SidebarBranchOptions;

struct _EventID {
	gint64 id;
};

struct _SidebarRenameableEntryIface {
	GTypeInterface parent_iface;
	void (*rename) (SidebarRenameableEntry* self, const gchar* new_name);
	gboolean (*is_user_renameable) (SidebarRenameableEntry* self);
};

struct _Block8Data {
	int _ref_count_;
	EventsBranch* self;
	gint event_month;
};

typedef gboolean (*Locator) (gconstpointer item, void* user_data);
struct _Block9Data {
	int _ref_count_;
	EventsBranch* self;
	gint event_year;
};

struct _SidebarSelectableEntryIface {
	GTypeInterface parent_iface;
};

struct _SidebarPageRepresentativeIface {
	GTypeInterface parent_iface;
	gboolean (*has_page) (SidebarPageRepresentative* self);
	Page* (*get_page) (SidebarPageRepresentative* self);
};

struct _SidebarContextableIface {
	GTypeInterface parent_iface;
	GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event);
};

struct _SidebarSimplePageEntry {
	GObject parent_instance;
	SidebarSimplePageEntryPrivate * priv;
};

struct _SidebarSimplePageEntryClass {
	GObjectClass parent_class;
	gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self);
	gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self);
	gchar* (*to_string) (SidebarSimplePageEntry* self);
	Page* (*create_page) (SidebarSimplePageEntry* self);
};

struct _SidebarExpandableEntryIface {
	GTypeInterface parent_iface;
	gboolean (*expand_on_select) (SidebarExpandableEntry* self);
};

struct _EventsDirectoryEntry {
	SidebarSimplePageEntry parent_instance;
	EventsDirectoryEntryPrivate * priv;
};

struct _EventsDirectoryEntryClass {
	SidebarSimplePageEntryClass parent_class;
};

struct _EventsMasterDirectoryEntry {
	EventsDirectoryEntry parent_instance;
	EventsMasterDirectoryEntryPrivate * priv;
};

struct _EventsMasterDirectoryEntryClass {
	EventsDirectoryEntryClass parent_class;
};

struct _EventsYearDirectoryEntry {
	EventsDirectoryEntry parent_instance;
	EventsYearDirectoryEntryPrivate * priv;
};

struct _EventsYearDirectoryEntryClass {
	EventsDirectoryEntryClass parent_class;
};

struct _EventsYearDirectoryEntryPrivate {
	gchar* name;
	struct tm tm;
};

typedef enum  {
	SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR,
	SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH,
	SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED
} SubEventsDirectoryPageDirectoryType;

struct _EventsMonthDirectoryEntry {
	EventsDirectoryEntry parent_instance;
	EventsMonthDirectoryEntryPrivate * priv;
};

struct _EventsMonthDirectoryEntryClass {
	EventsDirectoryEntryClass parent_class;
};

struct _EventsMonthDirectoryEntryPrivate {
	gchar* name;
	struct tm tm;
};

struct _EventsUndatedDirectoryEntry {
	EventsDirectoryEntry parent_instance;
	EventsUndatedDirectoryEntryPrivate * priv;
};

struct _EventsUndatedDirectoryEntryClass {
	EventsDirectoryEntryClass parent_class;
};

struct _SidebarInternalDropTargetEntryIface {
	GTypeInterface parent_iface;
	gboolean (*internal_drop_received) (SidebarInternalDropTargetEntry* self, GeeList* sources);
	gboolean (*internal_drop_received_arbitrary) (SidebarInternalDropTargetEntry* self, GtkSelectionData* data);
};

struct _EventsEventEntry {
	SidebarSimplePageEntry parent_instance;
	EventsEventEntryPrivate * priv;
};

struct _EventsEventEntryClass {
	SidebarSimplePageEntryClass parent_class;
};

struct _EventsEventEntryPrivate {
	Event* event;
};

struct _EventsNoEventEntry {
	SidebarSimplePageEntry parent_instance;
	EventsNoEventEntryPrivate * priv;
};

struct _EventsNoEventEntryClass {
	SidebarSimplePageEntryClass parent_class;
};


static gpointer events_branch_parent_class = NULL;
extern EventSourceCollection* event_global;
extern gchar* events_branch_icon;
gchar* events_branch_icon = NULL;
extern gchar* events_branch_events_icon;
gchar* events_branch_events_icon = NULL;
extern gchar* events_branch_single_event_icon;
gchar* events_branch_single_event_icon = NULL;
extern gchar* events_branch_no_event_icon;
gchar* events_branch_no_event_icon = NULL;
static gboolean events_branch_sort_ascending;
static gboolean events_branch_sort_ascending = FALSE;
static gpointer events_directory_entry_parent_class = NULL;
static SidebarExpandableEntryIface* events_directory_entry_sidebar_expandable_entry_parent_iface = NULL;
static gpointer events_master_directory_entry_parent_class = NULL;
static gpointer events_year_directory_entry_parent_class = NULL;
static gpointer events_month_directory_entry_parent_class = NULL;
static gpointer events_undated_directory_entry_parent_class = NULL;
static gpointer events_event_entry_parent_class = NULL;
static SidebarRenameableEntryIface* events_event_entry_sidebar_renameable_entry_parent_iface = NULL;
static SidebarInternalDropTargetEntryIface* events_event_entry_sidebar_internal_drop_target_entry_parent_iface = NULL;
static gpointer events_no_event_entry_parent_class = NULL;

GType sidebar_branch_get_type (void) G_GNUC_CONST;
GType events_branch_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 event_source_get_type (void) G_GNUC_CONST;
GType event_get_type (void) G_GNUC_CONST;
GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST;
GType events_event_entry_get_type (void) G_GNUC_CONST;
GType events_directory_entry_get_type (void) G_GNUC_CONST;
GType events_undated_directory_entry_get_type (void) G_GNUC_CONST;
GType events_no_event_entry_get_type (void) G_GNUC_CONST;
GType events_master_directory_entry_get_type (void) G_GNUC_CONST;
#define EVENTS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_BRANCH, EventsBranchPrivate))
enum  {
	EVENTS_BRANCH_DUMMY_PROPERTY
};
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType event_source_collection_get_type (void) G_GNUC_CONST;
static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed);
static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self);
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 events_branch_on_events_altered (EventsBranch* self, GeeMap* altered);
static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self);
static void events_branch_on_no_event_collection_altered (EventsBranch* self);
static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self);
GType configuration_facade_get_type (void) G_GNUC_CONST;
GType config_facade_get_type (void) G_GNUC_CONST;
ConfigFacade* config_facade_get_instance (void);
static void events_branch_on_config_changed (EventsBranch* self);
static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self);
#define RESOURCES_ICON_FOLDER "folder"
#define RESOURCES_ICON_EVENTS "multiple-events"
#define RESOURCES_ICON_ONE_EVENT "one-event"
#define RESOURCES_ICON_NO_EVENT "no-event"
EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void);
EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type);
EventsNoEventEntry* events_no_event_entry_new (void);
EventsNoEventEntry* events_no_event_entry_construct (GType object_type);
EventsMasterDirectoryEntry* events_master_directory_entry_new (void);
EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type);
EventsBranch* events_branch_new (void);
EventsBranch* events_branch_construct (GType object_type);
SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized);
SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized);
GType sidebar_grouping_get_type (void) G_GNUC_CONST;
GType sidebar_header_get_type (void) G_GNUC_CONST;
GType sidebar_tree_get_type (void) G_GNUC_CONST;
GType sidebar_entry_get_type (void) G_GNUC_CONST;
GType sidebar_branch_options_get_type (void) G_GNUC_CONST;
static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b);
static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b);
SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator);
SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator);
void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator);
SidebarEntry* sidebar_branch_get_root (SidebarBranch* self);
GeeCollection* data_collection_get_all (DataCollection* self);
static void events_branch_add_event (EventsBranch* self, Event* event);
static void events_branch_show_no_events (EventsBranch* self, gboolean show);
GeeCollection* event_source_collection_get_no_event_objects (EventSourceCollection* self);
void events_branch_init (void);
gboolean configuration_facade_get_events_sort_ascending (ConfigurationFacade* self);
void events_branch_terminate (void);
gboolean events_branch_is_user_renameable (EventsBranch* self);
EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self);
GType events_year_directory_entry_get_type (void) G_GNUC_CONST;
gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self);
static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b);
GType events_month_directory_entry_get_type (void) G_GNUC_CONST;
gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self);
static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b);
Event* events_event_entry_get_event (EventsEventEntry* self);
time_t event_source_get_start_time (EventSource* self);
GType event_id_get_type (void) G_GNUC_CONST;
EventID* event_id_dup (const EventID* self);
void event_id_free (EventID* self);
void event_get_event_id (Event* self, EventID* result);
static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b);
gchar* data_object_get_name (DataObject* self);
gint64 data_source_get_instance_id (DataSource* self);
EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event);
void sidebar_branch_reorder_all (SidebarBranch* self);
static void events_branch_remove_event (EventsBranch* self, Event* event);
gboolean alteration_has_detail (Alteration* self, const gchar* subject, const gchar* detail);
static void events_branch_move_event (EventsBranch* self, Event* event);
GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST;
static void events_branch_add_undated_event (EventsBranch* self, Event* event);
static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry** found_year);
static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator);
static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b);
#define SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT _ ("%Y")
EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm);
EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm);
static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b);
#define SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT _ ("%B")
EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm);
EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm);
static void events_branch_move_to_undated_event (EventsBranch* self, Event* event);
static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent);
SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry);
void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry);
gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm);
SidebarEntry* sidebar_branch_find_first_child (SidebarBranch* self, SidebarEntry* parent, Locator locator, void* locator_target);
static gboolean __lambda18_ (Block8Data* _data8_, SidebarEntry* entry);
static gboolean ___lambda18__locator (gconstpointer item, gpointer self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static gboolean __lambda17_ (Block9Data* _data9_, SidebarEntry* entry);
static gboolean ___lambda17__locator (gconstpointer item, gpointer self);
gboolean sidebar_branch_has_entry (SidebarBranch* self, SidebarEntry* entry);
static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b);
EventsEventEntry* events_event_entry_new (Event* event);
EventsEventEntry* events_event_entry_construct (GType object_type, Event* event);
void sidebar_branch_reparent (SidebarBranch* self, SidebarEntry* new_parent, SidebarEntry* entry);
static void events_branch_finalize (GObject* obj);
GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST;
GType page_get_type (void) G_GNUC_CONST;
GType sidebar_page_representative_get_type (void) G_GNUC_CONST;
GType sidebar_contextable_get_type (void) G_GNUC_CONST;
GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST;
enum  {
	EVENTS_DIRECTORY_ENTRY_DUMMY_PROPERTY
};
EventsDirectoryEntry* events_directory_entry_construct (GType object_type);
SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type);
static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base);
enum  {
	EVENTS_MASTER_DIRECTORY_ENTRY_DUMMY_PROPERTY
};
static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
#define MASTER_EVENTS_DIRECTORY_PAGE_NAME _ ("All Events")
static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base);
MasterEventsDirectoryPage* master_events_directory_page_new (void);
MasterEventsDirectoryPage* master_events_directory_page_construct (GType object_type);
GType checkerboard_page_get_type (void) G_GNUC_CONST;
GType events_directory_page_get_type (void) G_GNUC_CONST;
GType master_events_directory_page_get_type (void) G_GNUC_CONST;
#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryPrivate))
enum  {
	EVENTS_YEAR_DIRECTORY_ENTRY_DUMMY_PROPERTY
};
static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base);
GType sub_events_directory_page_directory_type_get_type (void) G_GNUC_CONST;
SubEventsDirectoryPage* sub_events_directory_page_new (SubEventsDirectoryPageDirectoryType type, struct tm* time);
SubEventsDirectoryPage* sub_events_directory_page_construct (GType object_type, SubEventsDirectoryPageDirectoryType type, struct tm* time);
GType sub_events_directory_page_get_type (void) G_GNUC_CONST;
static void events_year_directory_entry_finalize (GObject* obj);
#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryPrivate))
enum  {
	EVENTS_MONTH_DIRECTORY_ENTRY_DUMMY_PROPERTY
};
static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self);
static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base);
static void events_month_directory_entry_finalize (GObject* obj);
enum  {
	EVENTS_UNDATED_DIRECTORY_ENTRY_DUMMY_PROPERTY
};
static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
#define SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME _ ("Undated")
static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base);
GType media_source_get_type (void) G_GNUC_CONST;
GType sidebar_internal_drop_target_entry_get_type (void) G_GNUC_CONST;
#define EVENTS_EVENT_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryPrivate))
enum  {
	EVENTS_EVENT_ENTRY_DUMMY_PROPERTY
};
static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base);
EventPage* event_page_new (Event* page_event);
EventPage* event_page_construct (GType object_type, Event* page_event);
GType media_page_get_type (void) G_GNUC_CONST;
GType collection_page_get_type (void) G_GNUC_CONST;
GType event_page_get_type (void) G_GNUC_CONST;
static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base);
static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name);
gchar* event_prep_event_name (const gchar* name);
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* app_window_get_command_manager (void);
GType command_get_type (void) G_GNUC_CONST;
void command_manager_execute (CommandManager* self, Command* command);
RenameEventCommand* rename_event_command_new (Event* event, const gchar* new_name);
RenameEventCommand* rename_event_command_construct (GType object_type, Event* event, const gchar* new_name);
GType page_command_get_type (void) G_GNUC_CONST;
GType simple_proxyable_command_get_type (void) G_GNUC_CONST;
GType rename_event_command_get_type (void) G_GNUC_CONST;
static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media);
GType data_view_get_type (void) G_GNUC_CONST;
DataView* data_view_new (DataSource* source);
DataView* data_view_construct (GType object_type, DataSource* source);
SetEventCommand* set_event_command_new (GeeIterable* iter, Event* new_event);
SetEventCommand* set_event_command_construct (GType object_type, GeeIterable* iter, Event* new_event);
GType move_photos_command_get_type (void) G_GNUC_CONST;
GType set_event_command_get_type (void) G_GNUC_CONST;
static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data);
static void events_event_entry_finalize (GObject* obj);
enum  {
	EVENTS_NO_EVENT_ENTRY_DUMMY_PROPERTY
};
static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
#define NO_EVENT_PAGE_NAME _ ("No Event")
static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base);
NoEventPage* no_event_page_new (void);
NoEventPage* no_event_page_construct (GType object_type);
GType no_event_page_get_type (void) G_GNUC_CONST;


static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) {
#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_on_events_added_removed ((EventsBranch*) self, added, removed);
#line 997 "Branch.c"
}


static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) {
#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_on_events_altered ((EventsBranch*) self, items);
#line 1004 "Branch.c"
}


static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self) {
#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_on_no_event_collection_altered ((EventsBranch*) self);
#line 1011 "Branch.c"
}


static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self) {
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_on_config_changed ((EventsBranch*) self);
#line 1018 "Branch.c"
}


static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = events_branch_event_year_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1027 "Branch.c"
}


EventsBranch* events_branch_construct (GType object_type) {
	EventsBranch * self = NULL;
	const gchar* _tmp0_ = NULL;
	SidebarHeader* _tmp1_ = NULL;
	SidebarHeader* _tmp2_ = NULL;
	SidebarEntry* _tmp3_ = NULL;
	SidebarEntry* _tmp4_ = NULL;
	EventsMasterDirectoryEntry* _tmp5_ = NULL;
	EventSourceCollection* _tmp16_ = NULL;
	GeeCollection* _tmp17_ = NULL;
	GeeCollection* _tmp18_ = NULL;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	EventSourceCollection* _tmp21_ = NULL;
	EventSourceCollection* _tmp22_ = NULL;
	EventSourceCollection* _tmp23_ = NULL;
	ConfigFacade* _tmp24_ = NULL;
	ConfigFacade* _tmp25_ = NULL;
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = _ ("Events");
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sidebar_header_new (_tmp0_, TRUE);
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = _tmp1_;
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, _events_branch_event_year_comparator_gcompare_func, NULL);
#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp2_);
#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = _tmp3_;
#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = self->priv->all_events_entry;
#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp4_);
#line 1069 "Branch.c"
	{
		GeeIterator* _object_it = NULL;
		EventSourceCollection* _tmp6_ = NULL;
		GeeCollection* _tmp7_ = NULL;
		GeeCollection* _tmp8_ = NULL;
		GeeIterator* _tmp9_ = NULL;
		GeeIterator* _tmp10_ = NULL;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = event_global;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp7_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection));
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp8_ = _tmp7_;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable));
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp10_ = _tmp9_;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp8_);
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_object_it = _tmp10_;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		while (TRUE) {
#line 1093 "Branch.c"
			GeeIterator* _tmp11_ = NULL;
			gboolean _tmp12_ = FALSE;
			DataObject* object = NULL;
			GeeIterator* _tmp13_ = NULL;
			gpointer _tmp14_ = NULL;
			DataObject* _tmp15_ = NULL;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp11_ = _object_it;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp12_ = gee_iterator_next (_tmp11_);
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			if (!_tmp12_) {
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
				break;
#line 1108 "Branch.c"
			}
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp13_ = _object_it;
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp14_ = gee_iterator_get (_tmp13_);
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			object = (DataObject*) _tmp14_;
#line 32 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp15_ = object;
#line 32 "/home/jens/Source/shotwell/src/events/Branch.vala"
			events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_EVENT, Event));
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (object);
#line 1122 "Branch.c"
		}
#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_object_it);
#line 1126 "Branch.c"
	}
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp16_ = event_global;
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp17_ = event_source_collection_get_no_event_objects (_tmp16_);
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp18_ = _tmp17_;
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp19_ = gee_collection_get_size (_tmp18_);
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp20_ = _tmp19_;
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_show_no_events (self, _tmp20_ > 0);
#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp18_);
#line 37 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp21_ = event_global;
#line 37 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _events_branch_on_events_added_removed_data_collection_contents_altered, self, 0);
#line 38 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp22_ = event_global;
#line 38 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self, 0);
#line 39 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp23_ = event_global;
#line 39 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_connect_object (_tmp23_, "no-event-collection-altered", (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self, 0);
#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp24_ = config_facade_get_instance ();
#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp25_ = _tmp24_;
#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "events-sort-ascending-changed", (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self, 0);
#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp25_);
#line 24 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 1164 "Branch.c"
}


EventsBranch* events_branch_new (void) {
#line 24 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_branch_construct (EVENTS_TYPE_BRANCH);
#line 1171 "Branch.c"
}


void events_branch_init (void) {
	ConfigFacade* _tmp0_ = NULL;
	ConfigFacade* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = config_facade_get_instance ();
#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_;
#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_sort_ascending = _tmp2_;
#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp1_);
#line 1189 "Branch.c"
}


void events_branch_terminate (void) {
}


gboolean events_branch_is_user_renameable (EventsBranch* self) {
	gboolean result = FALSE;
#line 60 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_BRANCH (self), FALSE);
#line 61 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = TRUE;
#line 61 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1205 "Branch.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self ? g_object_ref (self) : NULL;
#line 1212 "Branch.c"
}


EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self) {
	EventsMasterDirectoryEntry* result = NULL;
	EventsMasterDirectoryEntry* _tmp0_ = NULL;
	EventsMasterDirectoryEntry* _tmp1_ = NULL;
#line 64 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL);
#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->all_events_entry;
#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1230 "Branch.c"
}


static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b) {
	gint result = 0;
	SidebarEntry* _tmp0_ = NULL;
	SidebarEntry* _tmp1_ = NULL;
	SidebarEntry* _tmp2_ = NULL;
	SidebarEntry* _tmp6_ = NULL;
	SidebarEntry* _tmp8_ = NULL;
	gboolean _tmp10_ = FALSE;
	gint _result_ = 0;
	SidebarEntry* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	SidebarEntry* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
#line 68 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 68 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = a;
#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = b;
#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_ == _tmp1_) {
#line 70 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 0;
#line 70 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1262 "Branch.c"
	}
#line 74 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = a;
#line 74 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) {
#line 1268 "Branch.c"
		SidebarEntry* _tmp3_ = NULL;
#line 75 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = b;
#line 75 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY)) {
#line 76 "/home/jens/Source/shotwell/src/events/Branch.vala"
			result = -1;
#line 76 "/home/jens/Source/shotwell/src/events/Branch.vala"
			return result;
#line 1278 "Branch.c"
		}
#line 77 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 1;
#line 77 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1284 "Branch.c"
	} else {
		SidebarEntry* _tmp4_ = NULL;
#line 78 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = b;
#line 78 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) {
#line 1291 "Branch.c"
			SidebarEntry* _tmp5_ = NULL;
#line 79 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp5_ = a;
#line 79 "/home/jens/Source/shotwell/src/events/Branch.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, EVENTS_TYPE_NO_EVENT_ENTRY)) {
#line 80 "/home/jens/Source/shotwell/src/events/Branch.vala"
				result = 1;
#line 80 "/home/jens/Source/shotwell/src/events/Branch.vala"
				return result;
#line 1301 "Branch.c"
			}
#line 81 "/home/jens/Source/shotwell/src/events/Branch.vala"
			result = -1;
#line 81 "/home/jens/Source/shotwell/src/events/Branch.vala"
			return result;
#line 1307 "Branch.c"
		}
	}
#line 84 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = a;
#line 84 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, EVENTS_TYPE_NO_EVENT_ENTRY)) {
#line 85 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 1;
#line 85 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1318 "Branch.c"
	} else {
		SidebarEntry* _tmp7_ = NULL;
#line 86 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp7_ = b;
#line 86 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, EVENTS_TYPE_NO_EVENT_ENTRY)) {
#line 87 "/home/jens/Source/shotwell/src/events/Branch.vala"
			result = -1;
#line 87 "/home/jens/Source/shotwell/src/events/Branch.vala"
			return result;
#line 1329 "Branch.c"
		}
	}
#line 90 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = a;
#line 90 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) {
#line 91 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = -1;
#line 91 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1340 "Branch.c"
	} else {
		SidebarEntry* _tmp9_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp9_ = b;
#line 92 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) {
#line 93 "/home/jens/Source/shotwell/src/events/Branch.vala"
			result = 1;
#line 93 "/home/jens/Source/shotwell/src/events/Branch.vala"
			return result;
#line 1351 "Branch.c"
		}
	}
#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = events_branch_sort_ascending;
#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp10_) {
#line 1358 "Branch.c"
		SidebarEntry* swap = NULL;
		SidebarEntry* _tmp11_ = NULL;
		SidebarEntry* _tmp12_ = NULL;
		SidebarEntry* _tmp13_ = NULL;
		SidebarEntry* _tmp14_ = NULL;
#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp11_ = a;
#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp12_ = _g_object_ref0 (_tmp11_);
#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala"
		swap = _tmp12_;
#line 97 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp13_ = b;
#line 97 "/home/jens/Source/shotwell/src/events/Branch.vala"
		a = _tmp13_;
#line 98 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp14_ = swap;
#line 98 "/home/jens/Source/shotwell/src/events/Branch.vala"
		b = _tmp14_;
#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (swap);
#line 1380 "Branch.c"
	}
#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp15_ = a;
#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp16_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry));
#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp17_ = b;
#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp18_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry));
#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_result_ = _tmp16_ - _tmp18_;
#line 103 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp19_ = _result_;
#line 103 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp19_ != 0, "result != 0");
#line 105 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _result_;
#line 105 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1400 "Branch.c"
}


static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b) {
	gint result = 0;
	SidebarEntry* _tmp0_ = NULL;
	SidebarEntry* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gint _result_ = 0;
	SidebarEntry* _tmp7_ = NULL;
	gint _tmp8_ = 0;
	SidebarEntry* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
#line 108 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 108 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = a;
#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = b;
#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_ == _tmp1_) {
#line 110 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 0;
#line 110 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1429 "Branch.c"
	}
#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = events_branch_sort_ascending;
#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp2_) {
#line 1435 "Branch.c"
		SidebarEntry* swap = NULL;
		SidebarEntry* _tmp3_ = NULL;
		SidebarEntry* _tmp4_ = NULL;
		SidebarEntry* _tmp5_ = NULL;
		SidebarEntry* _tmp6_ = NULL;
#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = a;
#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala"
		swap = _tmp4_;
#line 114 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = b;
#line 114 "/home/jens/Source/shotwell/src/events/Branch.vala"
		a = _tmp5_;
#line 115 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = swap;
#line 115 "/home/jens/Source/shotwell/src/events/Branch.vala"
		b = _tmp6_;
#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (swap);
#line 1457 "Branch.c"
	}
#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = a;
#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry));
#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp9_ = b;
#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry));
#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_result_ = _tmp8_ - _tmp10_;
#line 120 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp11_ = _result_;
#line 120 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp11_ != 0, "result != 0");
#line 122 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _result_;
#line 122 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1477 "Branch.c"
}


static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b) {
	gint result = 0;
	SidebarEntry* _tmp0_ = NULL;
	SidebarEntry* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gint64 _result_ = 0LL;
	SidebarEntry* _tmp7_ = NULL;
	Event* _tmp8_ = NULL;
	Event* _tmp9_ = NULL;
	time_t _tmp10_ = 0;
	SidebarEntry* _tmp11_ = NULL;
	Event* _tmp12_ = NULL;
	Event* _tmp13_ = NULL;
	time_t _tmp14_ = 0;
	gint64 _tmp15_ = 0LL;
	gint64 _tmp16_ = 0LL;
	gint64 _tmp27_ = 0LL;
	gint _tmp28_ = 0;
	gint64 _tmp29_ = 0LL;
#line 125 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 125 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = a;
#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = b;
#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_ == _tmp1_) {
#line 127 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 0;
#line 127 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1514 "Branch.c"
	}
#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = events_branch_sort_ascending;
#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp2_) {
#line 1520 "Branch.c"
		SidebarEntry* swap = NULL;
		SidebarEntry* _tmp3_ = NULL;
		SidebarEntry* _tmp4_ = NULL;
		SidebarEntry* _tmp5_ = NULL;
		SidebarEntry* _tmp6_ = NULL;
#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = a;
#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala"
		swap = _tmp4_;
#line 131 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = b;
#line 131 "/home/jens/Source/shotwell/src/events/Branch.vala"
		a = _tmp5_;
#line 132 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = swap;
#line 132 "/home/jens/Source/shotwell/src/events/Branch.vala"
		b = _tmp6_;
#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (swap);
#line 1542 "Branch.c"
	}
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = a;
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp9_ = _tmp8_;
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_EVENT_SOURCE, EventSource));
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp11_ = b;
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp12_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp13_ = _tmp12_;
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp14_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_EVENT_SOURCE, EventSource));
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp15_ = (gint64) (_tmp10_ - _tmp14_);
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp13_);
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp9_);
#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_result_ = _tmp15_;
#line 139 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp16_ = _result_;
#line 139 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp16_ == ((gint64) 0)) {
#line 1572 "Branch.c"
		SidebarEntry* _tmp17_ = NULL;
		Event* _tmp18_ = NULL;
		Event* _tmp19_ = NULL;
		EventID _tmp20_ = {0};
		gint64 _tmp21_ = 0LL;
		SidebarEntry* _tmp22_ = NULL;
		Event* _tmp23_ = NULL;
		Event* _tmp24_ = NULL;
		EventID _tmp25_ = {0};
		gint64 _tmp26_ = 0LL;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp17_ = a;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp18_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp19_ = _tmp18_;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		event_get_event_id (_tmp19_, &_tmp20_);
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp21_ = _tmp20_.id;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp22_ = b;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp23_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp24_ = _tmp23_;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		event_get_event_id (_tmp24_, &_tmp25_);
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp26_ = _tmp25_.id;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_result_ = _tmp21_ - _tmp26_;
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp24_);
#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp19_);
#line 1609 "Branch.c"
	}
#line 144 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp27_ = _result_;
#line 144 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp27_ != ((gint64) 0), "result != 0");
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp29_ = _result_;
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp29_ < ((gint64) 0)) {
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp28_ = -1;
#line 1621 "Branch.c"
	} else {
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp28_ = 1;
#line 1625 "Branch.c"
	}
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp28_;
#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1631 "Branch.c"
}


static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b) {
	gint result = 0;
	SidebarEntry* _tmp0_ = NULL;
	SidebarEntry* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gint ret = 0;
	SidebarEntry* _tmp7_ = NULL;
	Event* _tmp8_ = NULL;
	Event* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	SidebarEntry* _tmp12_ = NULL;
	Event* _tmp13_ = NULL;
	Event* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
#line 149 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 149 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = a;
#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = b;
#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_ == _tmp1_) {
#line 151 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = 0;
#line 151 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 1668 "Branch.c"
	}
#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = events_branch_sort_ascending;
#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp2_) {
#line 1674 "Branch.c"
		SidebarEntry* swap = NULL;
		SidebarEntry* _tmp3_ = NULL;
		SidebarEntry* _tmp4_ = NULL;
		SidebarEntry* _tmp5_ = NULL;
		SidebarEntry* _tmp6_ = NULL;
#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = a;
#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = _g_object_ref0 (_tmp3_);
#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala"
		swap = _tmp4_;
#line 155 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = b;
#line 155 "/home/jens/Source/shotwell/src/events/Branch.vala"
		a = _tmp5_;
#line 156 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = swap;
#line 156 "/home/jens/Source/shotwell/src/events/Branch.vala"
		b = _tmp6_;
#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (swap);
#line 1696 "Branch.c"
	}
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = a;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp9_ = _tmp8_;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject));
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp11_ = _tmp10_;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp12_ = b;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp13_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp14_ = _tmp13_;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp15_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject));
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp16_ = _tmp15_;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp17_ = g_utf8_collate (_tmp11_, _tmp16_);
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp18_ = _tmp17_;
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (_tmp16_);
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp14_);
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (_tmp11_);
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp9_);
#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala"
	ret = _tmp18_;
#line 162 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp19_ = ret;
#line 162 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp19_ == 0) {
#line 1736 "Branch.c"
		SidebarEntry* _tmp20_ = NULL;
		Event* _tmp21_ = NULL;
		Event* _tmp22_ = NULL;
		gint64 _tmp23_ = 0LL;
		SidebarEntry* _tmp24_ = NULL;
		Event* _tmp25_ = NULL;
		Event* _tmp26_ = NULL;
		gint64 _tmp27_ = 0LL;
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp20_ = b;
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp21_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp22_ = _tmp21_;
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp23_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATA_SOURCE, DataSource));
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp24_ = a;
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp25_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry));
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp26_ = _tmp25_;
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp27_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_SOURCE, DataSource));
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		ret = (gint) (_tmp23_ - _tmp27_);
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp26_);
#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp22_);
#line 1767 "Branch.c"
	}
#line 166 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = ret;
#line 166 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1773 "Branch.c"
}


EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event) {
	EventsEventEntry* result = NULL;
	GeeHashMap* _tmp0_ = NULL;
	Event* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
#line 169 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL);
#line 169 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->entry_map;
#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event;
#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = (EventsEventEntry*) _tmp2_;
#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 1796 "Branch.c"
}


static void events_branch_on_config_changed (EventsBranch* self) {
	gboolean value = FALSE;
	ConfigFacade* _tmp0_ = NULL;
	ConfigFacade* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 173 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = config_facade_get_instance ();
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_;
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = _tmp2_;
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp1_);
#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala"
	value = _tmp3_;
#line 176 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_sort_ascending = value;
#line 177 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_reorder_all (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 1824 "Branch.c"
}


static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed) {
	GeeIterable* _tmp0_ = NULL;
	GeeIterable* _tmp8_ = NULL;
#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added));
#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed));
#line 182 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = added;
#line 182 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_ != NULL) {
#line 1841 "Branch.c"
		{
			GeeIterator* _object_it = NULL;
			GeeIterable* _tmp1_ = NULL;
			GeeIterator* _tmp2_ = NULL;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp1_ = added;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp2_ = gee_iterable_iterator (_tmp1_);
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_object_it = _tmp2_;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
			while (TRUE) {
#line 1854 "Branch.c"
				GeeIterator* _tmp3_ = NULL;
				gboolean _tmp4_ = FALSE;
				DataObject* object = NULL;
				GeeIterator* _tmp5_ = NULL;
				gpointer _tmp6_ = NULL;
				DataObject* _tmp7_ = NULL;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp3_ = _object_it;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp4_ = gee_iterator_next (_tmp3_);
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				if (!_tmp4_) {
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
					break;
#line 1869 "Branch.c"
				}
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp5_ = _object_it;
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp6_ = gee_iterator_get (_tmp5_);
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				object = (DataObject*) _tmp6_;
#line 184 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp7_ = object;
#line 184 "/home/jens/Source/shotwell/src/events/Branch.vala"
				events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT, Event));
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_g_object_unref0 (object);
#line 1883 "Branch.c"
			}
#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_object_it);
#line 1887 "Branch.c"
		}
	}
#line 187 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = removed;
#line 187 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp8_ != NULL) {
#line 1894 "Branch.c"
		{
			GeeIterator* _object_it = NULL;
			GeeIterable* _tmp9_ = NULL;
			GeeIterator* _tmp10_ = NULL;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = removed;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp10_ = gee_iterable_iterator (_tmp9_);
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_object_it = _tmp10_;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
			while (TRUE) {
#line 1907 "Branch.c"
				GeeIterator* _tmp11_ = NULL;
				gboolean _tmp12_ = FALSE;
				DataObject* object = NULL;
				GeeIterator* _tmp13_ = NULL;
				gpointer _tmp14_ = NULL;
				DataObject* _tmp15_ = NULL;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp11_ = _object_it;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp12_ = gee_iterator_next (_tmp11_);
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				if (!_tmp12_) {
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
					break;
#line 1922 "Branch.c"
				}
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp13_ = _object_it;
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp14_ = gee_iterator_get (_tmp13_);
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				object = (DataObject*) _tmp14_;
#line 189 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp15_ = object;
#line 189 "/home/jens/Source/shotwell/src/events/Branch.vala"
				events_branch_remove_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_EVENT, Event));
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_g_object_unref0 (object);
#line 1936 "Branch.c"
			}
#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_object_it);
#line 1940 "Branch.c"
		}
	}
}


static void events_branch_on_events_altered (EventsBranch* self, GeeMap* altered) {
#line 193 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 193 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (GEE_IS_MAP (altered));
#line 1951 "Branch.c"
	{
		GeeIterator* _object_it = NULL;
		GeeMap* _tmp0_ = NULL;
		GeeSet* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp0_ = altered;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp1_ = gee_map_get_keys (_tmp0_);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp2_ = _tmp1_;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = _tmp2_;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = _tmp4_;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp3_);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_object_it = _tmp5_;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		while (TRUE) {
#line 1978 "Branch.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			DataObject* object = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			Event* event = NULL;
			DataObject* _tmp10_ = NULL;
			Event* _tmp11_ = NULL;
			Alteration* alteration = NULL;
			GeeMap* _tmp12_ = NULL;
			DataObject* _tmp13_ = NULL;
			gpointer _tmp14_ = NULL;
			Alteration* _tmp15_ = NULL;
			gboolean _tmp16_ = FALSE;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp6_ = _object_it;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			if (!_tmp7_) {
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
				break;
#line 2001 "Branch.c"
			}
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp8_ = _object_it;
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			object = (DataObject*) _tmp9_;
#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp10_ = object;
#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_EVENT, Event));
#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala"
			event = _tmp11_;
#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp12_ = altered;
#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp13_ = object;
#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp14_ = gee_map_get (_tmp12_, _tmp13_);
#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala"
			alteration = (Alteration*) _tmp14_;
#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp15_ = alteration;
#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp16_ = alteration_has_detail (_tmp15_, "metadata", "time");
#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala"
			if (_tmp16_) {
#line 2029 "Branch.c"
				Event* _tmp17_ = NULL;
#line 201 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp17_ = event;
#line 201 "/home/jens/Source/shotwell/src/events/Branch.vala"
				events_branch_move_event (self, _tmp17_);
#line 2035 "Branch.c"
			} else {
				Alteration* _tmp18_ = NULL;
				gboolean _tmp19_ = FALSE;
#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp18_ = alteration;
#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala"
				_tmp19_ = alteration_has_detail (_tmp18_, "metadata", "name");
#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala"
				if (_tmp19_) {
#line 2045 "Branch.c"
					EventsEventEntry* entry = NULL;
					GeeHashMap* _tmp20_ = NULL;
					Event* _tmp21_ = NULL;
					gpointer _tmp22_ = NULL;
					EventsEventEntry* _tmp23_ = NULL;
					EventsEventEntry* _tmp24_ = NULL;
					Event* _tmp25_ = NULL;
					gchar* _tmp26_ = NULL;
					gchar* _tmp27_ = NULL;
					EventsEventEntry* _tmp28_ = NULL;
					Event* _tmp29_ = NULL;
					gchar* _tmp30_ = NULL;
					gchar* _tmp31_ = NULL;
#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp20_ = self->priv->entry_map;
#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp21_ = event;
#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp22_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp21_);
#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala"
					entry = (EventsEventEntry*) _tmp22_;
#line 204 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp23_ = entry;
#line 204 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_vala_assert (_tmp23_ != NULL, "entry != null");
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp24_ = entry;
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp25_ = event;
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp26_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject));
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp27_ = _tmp26_;
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry), "sidebar-name-changed", _tmp27_);
#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_g_free0 (_tmp27_);
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp28_ = entry;
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp29_ = event;
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp30_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject));
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_tmp31_ = _tmp30_;
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-tooltip-changed", _tmp31_);
#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_g_free0 (_tmp31_);
#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala"
					_g_object_unref0 (entry);
#line 2097 "Branch.c"
				}
			}
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_alteration_unref0 (alteration);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (event);
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (object);
#line 2106 "Branch.c"
		}
#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_object_it);
#line 2110 "Branch.c"
	}
}


static void events_branch_on_no_event_collection_altered (EventsBranch* self) {
	EventSourceCollection* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
#line 212 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event_global;
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event_source_collection_get_no_event_objects (_tmp0_);
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = _tmp1_;
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = gee_collection_get_size (_tmp2_);
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = _tmp3_;
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_show_no_events (self, _tmp4_ > 0);
#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp2_);
#line 2137 "Branch.c"
}


static void g_time_local (time_t time, struct tm* result) {
	struct tm _result_ = {0};
	struct tm _tmp0_ = {0};
#line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	localtime_r (&time, &_tmp0_);
#line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	*result = _result_;
#line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return;
#line 2152 "Branch.c"
}


static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = events_branch_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2161 "Branch.c"
}


static gchar* g_time_format (struct tm *self, const gchar* format) {
	gchar* result = NULL;
	gchar* buffer = NULL;
	gchar* _tmp0_ = NULL;
	gint buffer_length1 = 0;
	gint _buffer_size_ = 0;
	gchar* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar* _tmp4_ = NULL;
#line 2758 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (format != NULL, NULL);
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = g_new0 (gchar, 64);
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer = _tmp0_;
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer_length1 = 64;
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_buffer_size_ = buffer_length1;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = buffer;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1__length1 = buffer_length1;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = format;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	strftime (_tmp1_, _tmp1__length1, _tmp2_, &(*self));
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = buffer;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3__length1 = buffer_length1;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp4_ = g_strdup ((const gchar*) _tmp3_);
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer = (g_free (buffer), NULL);
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 2207 "Branch.c"
}


static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = events_branch_event_month_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2216 "Branch.c"
}


static void events_branch_add_event (EventsBranch* self, Event* event) {
	time_t event_time = 0;
	Event* _tmp0_ = NULL;
	time_t _tmp1_ = 0;
	time_t _tmp2_ = 0;
	struct tm event_tm = {0};
	time_t _tmp4_ = 0;
	struct tm _tmp5_ = {0};
	SidebarEntry* year = NULL;
	SidebarEntry* month = NULL;
	Event* _tmp6_ = NULL;
	struct tm _tmp7_ = {0};
	SidebarEntry* _tmp8_ = NULL;
	SidebarEntry* _tmp9_ = NULL;
	SidebarEntry* _tmp10_ = NULL;
	SidebarEntry* _tmp13_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	struct tm _tmp23_ = {0};
	EventsMonthDirectoryEntry* _tmp24_ = NULL;
	SidebarEntry* _tmp25_ = NULL;
	SidebarEntry* _tmp26_ = NULL;
	SidebarEntry* _tmp27_ = NULL;
	Event* _tmp28_ = NULL;
#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event;
#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource));
#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala"
	event_time = _tmp1_;
#line 218 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = event_time;
#line 218 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp2_ == ((time_t) 0)) {
#line 2258 "Branch.c"
		Event* _tmp3_ = NULL;
#line 219 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = event;
#line 219 "/home/jens/Source/shotwell/src/events/Branch.vala"
		events_branch_add_undated_event (self, _tmp3_);
#line 221 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return;
#line 2266 "Branch.c"
	}
#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = event_time;
#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_time_local (_tmp4_, &_tmp5_);
#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala"
	event_tm = _tmp5_;
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = event;
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = event_tm;
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_);
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (year);
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	year = _tmp8_;
#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala"
	month = _tmp9_;
#line 228 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = month;
#line 228 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp10_ != NULL) {
#line 2290 "Branch.c"
		SidebarEntry* _tmp11_ = NULL;
		Event* _tmp12_ = NULL;
#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp11_ = month;
#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp12_ = event;
#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala"
		events_branch_graft_event (self, _tmp11_, _tmp12_, _events_branch_event_comparator_gcompare_func);
#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (month);
#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (year);
#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return;
#line 2305 "Branch.c"
	}
#line 234 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp13_ = year;
#line 234 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp13_ == NULL) {
#line 2311 "Branch.c"
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		struct tm _tmp16_ = {0};
		EventsYearDirectoryEntry* _tmp17_ = NULL;
		SidebarEntry* _tmp18_ = NULL;
		SidebarEntry* _tmp19_ = NULL;
		SidebarEntry* _tmp20_ = NULL;
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp14_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT);
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp15_ = _tmp14_;
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp16_ = event_tm;
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp17_ = events_year_directory_entry_new (_tmp15_, &_tmp16_);
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (year);
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		year = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SIDEBAR_TYPE_ENTRY, SidebarEntry);
#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_free0 (_tmp15_);
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp18_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp19_ = _tmp18_;
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp20_ = year;
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp19_, _tmp20_, _events_branch_event_month_comparator_gcompare_func);
#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp19_);
#line 2343 "Branch.c"
	}
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp21_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT);
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp22_ = _tmp21_;
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp23_ = event_tm;
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp24_ = events_month_directory_entry_new (_tmp22_, &_tmp23_);
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (month);
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	month = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_ENTRY, SidebarEntry);
#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (_tmp22_);
#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp25_ = year;
#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp26_ = month;
#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp25_, _tmp26_, _events_branch_event_comparator_gcompare_func);
#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp27_ = month;
#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp28_ = event;
#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_graft_event (self, _tmp27_, _tmp28_, _events_branch_event_comparator_gcompare_func);
#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (month);
#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (year);
#line 2375 "Branch.c"
}


static void events_branch_move_event (EventsBranch* self, Event* event) {
	time_t event_time = 0;
	Event* _tmp0_ = NULL;
	time_t _tmp1_ = 0;
	time_t _tmp2_ = 0;
	struct tm event_tm = {0};
	time_t _tmp4_ = 0;
	struct tm _tmp5_ = {0};
	SidebarEntry* year = NULL;
	SidebarEntry* month = NULL;
	Event* _tmp6_ = NULL;
	struct tm _tmp7_ = {0};
	SidebarEntry* _tmp8_ = NULL;
	SidebarEntry* _tmp9_ = NULL;
	SidebarEntry* _tmp10_ = NULL;
	SidebarEntry* _tmp18_ = NULL;
	Event* _tmp25_ = NULL;
	SidebarEntry* _tmp26_ = NULL;
#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event;
#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource));
#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala"
	event_time = _tmp1_;
#line 249 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = event_time;
#line 249 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp2_ == ((time_t) 0)) {
#line 2411 "Branch.c"
		Event* _tmp3_ = NULL;
#line 250 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = event;
#line 250 "/home/jens/Source/shotwell/src/events/Branch.vala"
		events_branch_move_to_undated_event (self, _tmp3_);
#line 252 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return;
#line 2419 "Branch.c"
	}
#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = event_time;
#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_time_local (_tmp4_, &_tmp5_);
#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala"
	event_tm = _tmp5_;
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = event;
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = event_tm;
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_);
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (year);
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	year = _tmp8_;
#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala"
	month = _tmp9_;
#line 260 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp10_ = year;
#line 260 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp10_ == NULL) {
#line 2443 "Branch.c"
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		struct tm _tmp13_ = {0};
		EventsYearDirectoryEntry* _tmp14_ = NULL;
		SidebarEntry* _tmp15_ = NULL;
		SidebarEntry* _tmp16_ = NULL;
		SidebarEntry* _tmp17_ = NULL;
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp11_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT);
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp12_ = _tmp11_;
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp13_ = event_tm;
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp14_ = events_year_directory_entry_new (_tmp12_, &_tmp13_);
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (year);
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		year = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SIDEBAR_TYPE_ENTRY, SidebarEntry);
#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_free0 (_tmp12_);
#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp15_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp16_ = _tmp15_;
#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp17_ = year;
#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp16_, _tmp17_, _events_branch_event_month_comparator_gcompare_func);
#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp16_);
#line 2475 "Branch.c"
	}
#line 266 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp18_ = month;
#line 266 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp18_ == NULL) {
#line 2481 "Branch.c"
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
		struct tm _tmp21_ = {0};
		EventsMonthDirectoryEntry* _tmp22_ = NULL;
		SidebarEntry* _tmp23_ = NULL;
		SidebarEntry* _tmp24_ = NULL;
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp19_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT);
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp20_ = _tmp19_;
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp21_ = event_tm;
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp22_ = events_month_directory_entry_new (_tmp20_, &_tmp21_);
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (month);
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		month = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, SIDEBAR_TYPE_ENTRY, SidebarEntry);
#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_free0 (_tmp20_);
#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp23_ = year;
#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp24_ = month;
#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp23_, _tmp24_, _events_branch_event_comparator_gcompare_func);
#line 2508 "Branch.c"
	}
#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp25_ = event;
#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp26_ = month;
#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_reparent_event (self, _tmp25_, _tmp26_);
#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (month);
#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (year);
#line 2520 "Branch.c"
}


static void events_branch_remove_event (EventsBranch* self, Event* event) {
	SidebarEntry* entry = NULL;
	gboolean removed = FALSE;
	GeeHashMap* _tmp0_ = NULL;
	Event* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	SidebarEntry* parent = NULL;
	SidebarEntry* _tmp5_ = NULL;
	SidebarEntry* _tmp6_ = NULL;
	SidebarEntry* _tmp7_ = NULL;
	SidebarEntry* _tmp8_ = NULL;
#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->entry_map;
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event;
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, &_tmp2_);
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (entry);
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	entry = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry);
#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala"
	removed = _tmp3_;
#line 280 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = removed;
#line 280 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp4_, "removed");
#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = entry;
#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_);
#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala"
	parent = _tmp6_;
#line 283 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = parent;
#line 283 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp7_ != NULL, "parent != null");
#line 285 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = entry;
#line 285 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp8_);
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
	while (TRUE) {
#line 2573 "Branch.c"
		gboolean _tmp9_ = FALSE;
		SidebarEntry* _tmp10_ = NULL;
		gint _tmp11_ = 0;
		SidebarEntry* grandparent = NULL;
		SidebarEntry* _tmp15_ = NULL;
		SidebarEntry* _tmp16_ = NULL;
		SidebarEntry* _tmp17_ = NULL;
		SidebarEntry* _tmp18_ = NULL;
		SidebarEntry* _tmp19_ = NULL;
		SidebarEntry* _tmp20_ = NULL;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp10_ = parent;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_);
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (_tmp11_ == 0) {
#line 2590 "Branch.c"
			SidebarEntry* _tmp12_ = NULL;
			SidebarEntry* _tmp13_ = NULL;
			SidebarEntry* _tmp14_ = NULL;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp12_ = parent;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp14_ = _tmp13_;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = _tmp12_ != _tmp14_;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_tmp14_);
#line 2604 "Branch.c"
		} else {
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = FALSE;
#line 2608 "Branch.c"
		}
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (!_tmp9_) {
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
			break;
#line 2614 "Branch.c"
		}
#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp15_ = parent;
#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_);
#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala"
		grandparent = _tmp16_;
#line 290 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp17_ = grandparent;
#line 290 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_vala_assert (_tmp17_ != NULL, "grandparent != null");
#line 292 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp18_ = parent;
#line 292 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_);
#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp19_ = grandparent;
#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp20_ = _g_object_ref0 (_tmp19_);
#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (parent);
#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala"
		parent = _tmp20_;
#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (grandparent);
#line 2640 "Branch.c"
	}
#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (parent);
#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (entry);
#line 2646 "Branch.c"
}


static Block8Data* block8_data_ref (Block8Data* _data8_) {
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_atomic_int_inc (&_data8_->_ref_count_);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return _data8_;
#line 2655 "Branch.c"
}


static void block8_data_unref (void * _userdata_) {
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
#line 2664 "Branch.c"
		EventsBranch* self;
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
		self = _data8_->self;
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (self);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
		g_slice_free (Block8Data, _data8_);
#line 2672 "Branch.c"
	}
}


static gboolean __lambda18_ (Block8Data* _data8_, SidebarEntry* entry) {
	EventsBranch* self;
	gboolean result = FALSE;
	SidebarEntry* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = _data8_->self;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE);
#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = entry;
#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry));
#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = _data8_->event_month;
#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_ == _tmp2_;
#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2697 "Branch.c"
}


static gboolean ___lambda18__locator (gconstpointer item, gpointer self) {
	gboolean result;
	result = __lambda18_ (self, (SidebarEntry*) item);
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2706 "Branch.c"
}


static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry** found_year) {
	SidebarEntry* _vala_found_year = NULL;
	SidebarEntry* result = NULL;
	Block8Data* _data8_;
	Event* _tmp0_ = NULL;
	struct tm _tmp1_ = {0};
	SidebarEntry* _tmp2_ = NULL;
	SidebarEntry* _tmp3_ = NULL;
	struct tm _tmp4_ = {0};
	gint _tmp5_ = 0;
	SidebarEntry* _tmp6_ = NULL;
	SidebarEntry* _tmp7_ = NULL;
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (event_tm != NULL, NULL);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data8_ = g_slice_new0 (Block8Data);
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data8_->_ref_count_ = 1;
#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data8_->self = g_object_ref (self);
#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event;
#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = *event_tm;
#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = events_branch_find_event_year (self, _tmp0_, &_tmp1_);
#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_vala_found_year);
#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_found_year = _tmp2_;
#line 301 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = _vala_found_year;
#line 301 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp3_ == NULL) {
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = NULL;
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
		block8_data_unref (_data8_);
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_data8_ = NULL;
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (found_year) {
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
			*found_year = _vala_found_year;
#line 2758 "Branch.c"
		} else {
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_vala_found_year);
#line 2762 "Branch.c"
		}
#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 2766 "Branch.c"
	}
#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = *event_tm;
#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = _tmp4_.tm_mon;
#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data8_->event_month = _tmp5_ + 1;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = _vala_found_year;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp6_, ___lambda18__locator, _data8_);
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp7_;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	block8_data_unref (_data8_);
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data8_ = NULL;
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (found_year) {
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
		*found_year = _vala_found_year;
#line 2788 "Branch.c"
	} else {
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_vala_found_year);
#line 2792 "Branch.c"
	}
#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2796 "Branch.c"
}


static Block9Data* block9_data_ref (Block9Data* _data9_) {
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_atomic_int_inc (&_data9_->_ref_count_);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return _data9_;
#line 2805 "Branch.c"
}


static void block9_data_unref (void * _userdata_) {
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
#line 2814 "Branch.c"
		EventsBranch* self;
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
		self = _data9_->self;
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (self);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
		g_slice_free (Block9Data, _data9_);
#line 2822 "Branch.c"
	}
}


static gboolean __lambda17_ (Block9Data* _data9_, SidebarEntry* entry) {
	EventsBranch* self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	SidebarEntry* _tmp2_ = NULL;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = _data9_->self;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE);
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = entry;
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) {
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp1_ = TRUE;
#line 2843 "Branch.c"
	} else {
		SidebarEntry* _tmp3_ = NULL;
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = entry;
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY);
#line 2850 "Branch.c"
	}
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp1_) {
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp0_ = TRUE;
#line 2856 "Branch.c"
	} else {
		SidebarEntry* _tmp4_ = NULL;
#line 317 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = entry;
#line 317 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY);
#line 2863 "Branch.c"
	}
#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_) {
#line 318 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = FALSE;
#line 318 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 2871 "Branch.c"
	} else {
		SidebarEntry* _tmp5_ = NULL;
		gint _tmp6_ = 0;
#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = entry;
#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry));
#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala"
		result = _tmp6_ == _data9_->event_year;
#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala"
		return result;
#line 2883 "Branch.c"
	}
}


static gboolean ___lambda17__locator (gconstpointer item, gpointer self) {
	gboolean result;
	result = __lambda17_ (self, (SidebarEntry*) item);
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2893 "Branch.c"
}


static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm) {
	SidebarEntry* result = NULL;
	Block9Data* _data9_;
	struct tm _tmp0_ = {0};
	gint _tmp1_ = 0;
	SidebarEntry* _tmp2_ = NULL;
	SidebarEntry* _tmp3_ = NULL;
	SidebarEntry* _tmp4_ = NULL;
	SidebarEntry* _tmp5_ = NULL;
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (event_tm != NULL, NULL);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data9_ = g_slice_new0 (Block9Data);
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data9_->_ref_count_ = 1;
#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data9_->self = g_object_ref (self);
#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = *event_tm;
#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_.tm_year;
#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data9_->event_year = _tmp1_ + 1900;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = _tmp2_;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, ___lambda17__locator, _data9_);
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = _tmp4_;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp3_);
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp5_;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	block9_data_unref (_data9_);
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_data9_ = NULL;
#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2942 "Branch.c"
}


static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = events_branch_undated_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 2951 "Branch.c"
}


static void events_branch_add_undated_event (EventsBranch* self, Event* event) {
	EventsUndatedDirectoryEntry* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	EventsUndatedDirectoryEntry* _tmp5_ = NULL;
	Event* _tmp6_ = NULL;
#line 324 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 324 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->undated_entry;
#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp1_) {
#line 2970 "Branch.c"
		SidebarEntry* _tmp2_ = NULL;
		SidebarEntry* _tmp3_ = NULL;
		EventsUndatedDirectoryEntry* _tmp4_ = NULL;
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = _tmp2_;
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = self->priv->undated_entry;
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _events_branch_undated_event_comparator_gcompare_func);
#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp3_);
#line 2984 "Branch.c"
	}
#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = self->priv->undated_entry;
#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = event;
#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_graft_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp6_, NULL);
#line 2992 "Branch.c"
}


static void events_branch_move_to_undated_event (EventsBranch* self, Event* event) {
	EventsUndatedDirectoryEntry* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	Event* _tmp5_ = NULL;
	EventsUndatedDirectoryEntry* _tmp6_ = NULL;
#line 331 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 331 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->undated_entry;
#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (!_tmp1_) {
#line 3011 "Branch.c"
		SidebarEntry* _tmp2_ = NULL;
		SidebarEntry* _tmp3_ = NULL;
		EventsUndatedDirectoryEntry* _tmp4_ = NULL;
#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = _tmp2_;
#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = self->priv->undated_entry;
#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp3_);
#line 3025 "Branch.c"
	}
#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = event;
#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = self->priv->undated_entry;
#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_reparent_event (self, _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 3033 "Branch.c"
}


static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator) {
	EventsEventEntry* entry = NULL;
	Event* _tmp0_ = NULL;
	EventsEventEntry* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
	Event* _tmp3_ = NULL;
	SidebarEntry* _tmp4_ = NULL;
	GCompareFunc _tmp5_ = NULL;
#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (SIDEBAR_IS_ENTRY (parent));
#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event;
#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = events_event_entry_new (_tmp0_);
#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala"
	entry = _tmp1_;
#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = self->priv->entry_map;
#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = event;
#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala"
	gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_, entry);
#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = parent;
#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = comparator;
#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp5_);
#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (entry);
#line 3071 "Branch.c"
}


static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent) {
	EventsEventEntry* entry = NULL;
	GeeHashMap* _tmp0_ = NULL;
	Event* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
	EventsEventEntry* _tmp3_ = NULL;
	SidebarEntry* old_parent = NULL;
	EventsEventEntry* _tmp4_ = NULL;
	SidebarEntry* _tmp5_ = NULL;
	SidebarEntry* _tmp6_ = NULL;
	SidebarEntry* _tmp7_ = NULL;
	EventsEventEntry* _tmp8_ = NULL;
#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (IS_EVENT (event));
#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (SIDEBAR_IS_ENTRY (new_parent));
#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->entry_map;
#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event;
#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala"
	entry = (EventsEventEntry*) _tmp2_;
#line 348 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = entry;
#line 348 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp3_ != NULL, "entry != null");
#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = entry;
#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp5_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala"
	old_parent = _tmp5_;
#line 351 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = old_parent;
#line 351 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_vala_assert (_tmp6_ != NULL, "old_parent != null");
#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = new_parent;
#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp8_ = entry;
#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala"
	sidebar_branch_reparent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
	while (TRUE) {
#line 3123 "Branch.c"
		gboolean _tmp9_ = FALSE;
		SidebarEntry* _tmp10_ = NULL;
		gint _tmp11_ = 0;
		SidebarEntry* grandparent = NULL;
		SidebarEntry* _tmp15_ = NULL;
		SidebarEntry* _tmp16_ = NULL;
		SidebarEntry* _tmp17_ = NULL;
		SidebarEntry* _tmp18_ = NULL;
		SidebarEntry* _tmp19_ = NULL;
		SidebarEntry* _tmp20_ = NULL;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp10_ = old_parent;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_);
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (_tmp11_ == 0) {
#line 3140 "Branch.c"
			SidebarEntry* _tmp12_ = NULL;
			SidebarEntry* _tmp13_ = NULL;
			SidebarEntry* _tmp14_ = NULL;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp12_ = old_parent;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp14_ = _tmp13_;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = _tmp12_ != _tmp14_;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_tmp14_);
#line 3154 "Branch.c"
		} else {
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = FALSE;
#line 3158 "Branch.c"
		}
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (!_tmp9_) {
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
			break;
#line 3164 "Branch.c"
		}
#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp15_ = old_parent;
#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_);
#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala"
		grandparent = _tmp16_;
#line 357 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp17_ = grandparent;
#line 357 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_vala_assert (_tmp17_ != NULL, "grandparent != null");
#line 359 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp18_ = old_parent;
#line 359 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_);
#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp19_ = grandparent;
#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp20_ = _g_object_ref0 (_tmp19_);
#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (old_parent);
#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala"
		old_parent = _tmp20_;
#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (grandparent);
#line 3190 "Branch.c"
	}
#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (old_parent);
#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (entry);
#line 3196 "Branch.c"
}


static void events_branch_show_no_events (EventsBranch* self, gboolean show) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 365 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (EVENTS_IS_BRANCH (self));
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = show;
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp1_) {
#line 3209 "Branch.c"
		EventsNoEventEntry* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp2_ = self->priv->no_event_entry;
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp0_ = !_tmp3_;
#line 3218 "Branch.c"
	} else {
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp0_ = FALSE;
#line 3222 "Branch.c"
	}
#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp0_) {
#line 3226 "Branch.c"
		SidebarEntry* _tmp4_ = NULL;
		SidebarEntry* _tmp5_ = NULL;
		EventsNoEventEntry* _tmp6_ = NULL;
#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = _tmp4_;
#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = self->priv->no_event_entry;
#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala"
		sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp5_);
#line 3240 "Branch.c"
	} else {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp8_ = show;
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (!_tmp8_) {
#line 3248 "Branch.c"
			EventsNoEventEntry* _tmp9_ = NULL;
			gboolean _tmp10_ = FALSE;
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = self->priv->no_event_entry;
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp10_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp7_ = _tmp10_;
#line 3257 "Branch.c"
		} else {
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp7_ = FALSE;
#line 3261 "Branch.c"
		}
#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala"
		if (_tmp7_) {
#line 3265 "Branch.c"
			EventsNoEventEntry* _tmp11_ = NULL;
#line 369 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp11_ = self->priv->no_event_entry;
#line 369 "/home/jens/Source/shotwell/src/events/Branch.vala"
			sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 3271 "Branch.c"
		}
	}
}


static void events_branch_class_init (EventsBranchClass * klass) {
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_type_class_add_private (klass, sizeof (EventsBranchPrivate));
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = events_branch_finalize;
#line 8 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = g_strdup (RESOURCES_ICON_FOLDER);
#line 8 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_icon = _tmp0_;
#line 9 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (RESOURCES_ICON_EVENTS);
#line 9 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_events_icon = _tmp1_;
#line 10 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = g_strdup (RESOURCES_ICON_ONE_EVENT);
#line 10 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_single_event_icon = _tmp2_;
#line 11 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = g_strdup (RESOURCES_ICON_NO_EVENT);
#line 11 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_branch_no_event_icon = _tmp3_;
#line 3304 "Branch.c"
}


static void events_branch_instance_init (EventsBranch * self) {
	GeeHashMap* _tmp0_ = NULL;
	EventsUndatedDirectoryEntry* _tmp1_ = NULL;
	EventsNoEventEntry* _tmp2_ = NULL;
	EventsMasterDirectoryEntry* _tmp3_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv = EVENTS_BRANCH_GET_PRIVATE (self);
#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = gee_hash_map_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, EVENTS_TYPE_EVENT_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->entry_map = _tmp0_;
#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = events_undated_directory_entry_new ();
#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->undated_entry = _tmp1_;
#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = events_no_event_entry_new ();
#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->no_event_entry = _tmp2_;
#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp3_ = events_master_directory_entry_new ();
#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->all_events_entry = _tmp3_;
#line 3331 "Branch.c"
}


static void events_branch_finalize (GObject* obj) {
	EventsBranch * self;
	EventSourceCollection* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	EventSourceCollection* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	EventSourceCollection* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	ConfigFacade* _tmp6_ = NULL;
	ConfigFacade* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_BRANCH, EventsBranch);
#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event_global;
#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE);
#line 46 "/home/jens/Source/shotwell/src/events/Branch.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) _events_branch_on_events_added_removed_data_collection_contents_altered, self);
#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = event_global;
#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE);
#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self);
#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp4_ = event_global;
#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_parse_name ("no-event-collection-altered", TYPE_EVENT_SOURCE_COLLECTION, &_tmp5_, NULL, FALSE);
#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self);
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp6_ = config_facade_get_instance ();
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp7_ = _tmp6_;
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_parse_name ("events-sort-ascending-changed", TYPE_CONFIGURATION_FACADE, &_tmp8_, NULL, FALSE);
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self);
#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp7_);
#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->entry_map);
#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->undated_entry);
#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->no_event_entry);
#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->all_events_entry);
#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (events_branch_parent_class)->finalize (obj);
#line 3386 "Branch.c"
}


GType events_branch_get_type (void) {
	static volatile gsize events_branch_type_id__volatile = 0;
	if (g_once_init_enter (&events_branch_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsBranch), 0, (GInstanceInitFunc) events_branch_instance_init, NULL };
		GType events_branch_type_id;
		events_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "EventsBranch", &g_define_type_info, 0);
		g_once_init_leave (&events_branch_type_id__volatile, events_branch_type_id);
	}
	return events_branch_type_id__volatile;
}


EventsDirectoryEntry* events_directory_entry_construct (GType object_type) {
	EventsDirectoryEntry * self = NULL;
#line 374 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsDirectoryEntry*) sidebar_simple_page_entry_construct (object_type);
#line 374 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3408 "Branch.c"
}


static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
	EventsDirectoryEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 377 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry);
#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = events_branch_icon;
#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3427 "Branch.c"
}


static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base) {
	EventsDirectoryEntry * self;
	gboolean result = FALSE;
#line 381 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry);
#line 382 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = TRUE;
#line 382 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3440 "Branch.c"
}


static void events_directory_entry_class_init (EventsDirectoryEntryClass * klass) {
#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_directory_entry_parent_class = g_type_class_peek_parent (klass);
#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*)(SidebarSimplePageEntry*)) events_directory_entry_real_get_sidebar_icon;
#line 3449 "Branch.c"
}


static void events_directory_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) {
#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_directory_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface);
#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala"
	iface->expand_on_select = (gboolean (*)(SidebarExpandableEntry*)) events_directory_entry_real_expand_on_select;
#line 3458 "Branch.c"
}


static void events_directory_entry_instance_init (EventsDirectoryEntry * self) {
}


GType events_directory_entry_get_type (void) {
	static volatile gsize events_directory_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_directory_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsDirectoryEntry), 0, (GInstanceInitFunc) events_directory_entry_instance_init, NULL };
		static const GInterfaceInfo sidebar_expandable_entry_info = { (GInterfaceInitFunc) events_directory_entry_sidebar_expandable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType events_directory_entry_type_id;
		events_directory_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsDirectoryEntry", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (events_directory_entry_type_id, SIDEBAR_TYPE_EXPANDABLE_ENTRY, &sidebar_expandable_entry_info);
		g_once_init_leave (&events_directory_entry_type_id__volatile, events_directory_entry_type_id);
	}
	return events_directory_entry_type_id__volatile;
}


EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type) {
	EventsMasterDirectoryEntry * self = NULL;
#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsMasterDirectoryEntry*) events_directory_entry_construct (object_type);
#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3486 "Branch.c"
}


EventsMasterDirectoryEntry* events_master_directory_entry_new (void) {
#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_master_directory_entry_construct (EVENTS_TYPE_MASTER_DIRECTORY_ENTRY);
#line 3493 "Branch.c"
}


static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsMasterDirectoryEntry * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 390 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry);
#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = g_strdup (MASTER_EVENTS_DIRECTORY_PAGE_NAME);
#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp0_;
#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3509 "Branch.c"
}


static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
	EventsMasterDirectoryEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 394 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry);
#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = events_branch_events_icon;
#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3528 "Branch.c"
}


static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsMasterDirectoryEntry * self;
	Page* result = NULL;
	MasterEventsDirectoryPage* _tmp0_ = NULL;
#line 398 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry);
#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = master_events_directory_page_new ();
#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp0_);
#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page);
#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3546 "Branch.c"
}


static void events_master_directory_entry_class_init (EventsMasterDirectoryEntryClass * klass) {
#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_master_directory_entry_parent_class = g_type_class_peek_parent (klass);
#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_master_directory_entry_real_get_sidebar_name;
#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*)(SidebarSimplePageEntry*)) events_master_directory_entry_real_get_sidebar_icon;
#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_master_directory_entry_real_create_page;
#line 3559 "Branch.c"
}


static void events_master_directory_entry_instance_init (EventsMasterDirectoryEntry * self) {
}


GType events_master_directory_entry_get_type (void) {
	static volatile gsize events_master_directory_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_master_directory_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsMasterDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_master_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMasterDirectoryEntry), 0, (GInstanceInitFunc) events_master_directory_entry_instance_init, NULL };
		GType events_master_directory_entry_type_id;
		events_master_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMasterDirectoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&events_master_directory_entry_type_id__volatile, events_master_directory_entry_type_id);
	}
	return events_master_directory_entry_type_id__volatile;
}


EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) {
	EventsYearDirectoryEntry * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	struct tm _tmp2_ = {0};
#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (tm != NULL, NULL);
#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsYearDirectoryEntry*) events_directory_entry_construct (object_type);
#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = name;
#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (self->priv->name);
#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->name = _tmp1_;
#line 409 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = *tm;
#line 409 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->tm = _tmp2_;
#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3604 "Branch.c"
}


EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm) {
#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_year_directory_entry_construct (EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, name, tm);
#line 3611 "Branch.c"
}


static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsYearDirectoryEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry);
#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->name;
#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3630 "Branch.c"
}


gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self) {
	gint result = 0;
	struct tm _tmp0_ = {0};
	gint _tmp1_ = 0;
#line 416 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_YEAR_DIRECTORY_ENTRY (self), 0);
#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->tm;
#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_.tm_year;
#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_ + 1900;
#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3648 "Branch.c"
}


static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsYearDirectoryEntry * self;
	Page* result = NULL;
	struct tm _tmp0_ = {0};
	SubEventsDirectoryPage* _tmp1_ = NULL;
#line 420 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry);
#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->tm;
#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR, &_tmp0_);
#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp1_);
#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3669 "Branch.c"
}


static void events_year_directory_entry_class_init (EventsYearDirectoryEntryClass * klass) {
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_year_directory_entry_parent_class = g_type_class_peek_parent (klass);
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_type_class_add_private (klass, sizeof (EventsYearDirectoryEntryPrivate));
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_year_directory_entry_real_get_sidebar_name;
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_year_directory_entry_real_create_page;
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = events_year_directory_entry_finalize;
#line 3684 "Branch.c"
}


static void events_year_directory_entry_instance_init (EventsYearDirectoryEntry * self) {
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv = EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE (self);
#line 3691 "Branch.c"
}


static void events_year_directory_entry_finalize (GObject* obj) {
	EventsYearDirectoryEntry * self;
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry);
#line 404 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (self->priv->name);
#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (events_year_directory_entry_parent_class)->finalize (obj);
#line 3703 "Branch.c"
}


GType events_year_directory_entry_get_type (void) {
	static volatile gsize events_year_directory_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_year_directory_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsYearDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_year_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsYearDirectoryEntry), 0, (GInstanceInitFunc) events_year_directory_entry_instance_init, NULL };
		GType events_year_directory_entry_type_id;
		events_year_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsYearDirectoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&events_year_directory_entry_type_id__volatile, events_year_directory_entry_type_id);
	}
	return events_year_directory_entry_type_id__volatile;
}


EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) {
	EventsMonthDirectoryEntry * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	struct tm _tmp2_ = {0};
#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (tm != NULL, NULL);
#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsMonthDirectoryEntry*) events_directory_entry_construct (object_type);
#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = name;
#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (self->priv->name);
#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->name = _tmp1_;
#line 431 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = *tm;
#line 431 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->tm = _tmp2_;
#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3744 "Branch.c"
}


EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm) {
#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_month_directory_entry_construct (EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, name, tm);
#line 3751 "Branch.c"
}


static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsMonthDirectoryEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 434 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry);
#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->name;
#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3770 "Branch.c"
}


gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self) {
	gint result = 0;
	struct tm _tmp0_ = {0};
	gint _tmp1_ = 0;
#line 438 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0);
#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->tm;
#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_.tm_year;
#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_ + 1900;
#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3788 "Branch.c"
}


gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self) {
	gint result = 0;
	struct tm _tmp0_ = {0};
	gint _tmp1_ = 0;
#line 442 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0);
#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->tm;
#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _tmp0_.tm_mon;
#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_ + 1;
#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3806 "Branch.c"
}


static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsMonthDirectoryEntry * self;
	Page* result = NULL;
	struct tm _tmp0_ = {0};
	SubEventsDirectoryPage* _tmp1_ = NULL;
#line 446 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry);
#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->tm;
#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH, &_tmp0_);
#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp1_);
#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3827 "Branch.c"
}


static void events_month_directory_entry_class_init (EventsMonthDirectoryEntryClass * klass) {
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_month_directory_entry_parent_class = g_type_class_peek_parent (klass);
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_type_class_add_private (klass, sizeof (EventsMonthDirectoryEntryPrivate));
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_month_directory_entry_real_get_sidebar_name;
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_month_directory_entry_real_create_page;
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = events_month_directory_entry_finalize;
#line 3842 "Branch.c"
}


static void events_month_directory_entry_instance_init (EventsMonthDirectoryEntry * self) {
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv = EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE (self);
#line 3849 "Branch.c"
}


static void events_month_directory_entry_finalize (GObject* obj) {
	EventsMonthDirectoryEntry * self;
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry);
#line 426 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (self->priv->name);
#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (events_month_directory_entry_parent_class)->finalize (obj);
#line 3861 "Branch.c"
}


GType events_month_directory_entry_get_type (void) {
	static volatile gsize events_month_directory_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_month_directory_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsMonthDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_month_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMonthDirectoryEntry), 0, (GInstanceInitFunc) events_month_directory_entry_instance_init, NULL };
		GType events_month_directory_entry_type_id;
		events_month_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMonthDirectoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&events_month_directory_entry_type_id__volatile, events_month_directory_entry_type_id);
	}
	return events_month_directory_entry_type_id__volatile;
}


EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type) {
	EventsUndatedDirectoryEntry * self = NULL;
#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsUndatedDirectoryEntry*) events_directory_entry_construct (object_type);
#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3883 "Branch.c"
}


EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void) {
#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_undated_directory_entry_construct (EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY);
#line 3890 "Branch.c"
}


static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsUndatedDirectoryEntry * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 455 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry);
#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = g_strdup (SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME);
#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp0_;
#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3906 "Branch.c"
}


static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsUndatedDirectoryEntry * self;
	Page* result = NULL;
	struct tm _tmp0_ = {0};
	SubEventsDirectoryPage* _tmp1_ = NULL;
#line 459 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry);
#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_time_local ((time_t) 0, &_tmp0_);
#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED, &_tmp0_);
#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp1_);
#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 3927 "Branch.c"
}


static void events_undated_directory_entry_class_init (EventsUndatedDirectoryEntryClass * klass) {
#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_undated_directory_entry_parent_class = g_type_class_peek_parent (klass);
#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_undated_directory_entry_real_get_sidebar_name;
#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_undated_directory_entry_real_create_page;
#line 3938 "Branch.c"
}


static void events_undated_directory_entry_instance_init (EventsUndatedDirectoryEntry * self) {
}


GType events_undated_directory_entry_get_type (void) {
	static volatile gsize events_undated_directory_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_undated_directory_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsUndatedDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_undated_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsUndatedDirectoryEntry), 0, (GInstanceInitFunc) events_undated_directory_entry_instance_init, NULL };
		GType events_undated_directory_entry_type_id;
		events_undated_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsUndatedDirectoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&events_undated_directory_entry_type_id__volatile, events_undated_directory_entry_type_id);
	}
	return events_undated_directory_entry_type_id__volatile;
}


EventsEventEntry* events_event_entry_construct (GType object_type, Event* event) {
	EventsEventEntry * self = NULL;
	Event* _tmp0_ = NULL;
	Event* _tmp1_ = NULL;
#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsEventEntry*) sidebar_simple_page_entry_construct (object_type);
#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = event;
#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->event);
#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv->event = _tmp1_;
#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 3976 "Branch.c"
}


EventsEventEntry* events_event_entry_new (Event* event) {
#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_event_entry_construct (EVENTS_TYPE_EVENT_ENTRY, event);
#line 3983 "Branch.c"
}


Event* events_event_entry_get_event (EventsEventEntry* self) {
	Event* result = NULL;
	Event* _tmp0_ = NULL;
	Event* _tmp1_ = NULL;
#line 473 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (EVENTS_IS_EVENT_ENTRY (self), NULL);
#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->event;
#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4001 "Branch.c"
}


static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsEventEntry * self;
	gchar* result = NULL;
	Event* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 477 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->event;
#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4020 "Branch.c"
}


static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
	EventsEventEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 481 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = events_branch_single_event_icon;
#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4039 "Branch.c"
}


static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsEventEntry * self;
	Page* result = NULL;
	Event* _tmp0_ = NULL;
	EventPage* _tmp1_ = NULL;
#line 485 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = self->priv->event;
#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event_page_new (_tmp0_);
#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp1_);
#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4060 "Branch.c"
}


static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base) {
	EventsEventEntry * self;
	gboolean result = FALSE;
#line 489 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 490 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = TRUE;
#line 490 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4073 "Branch.c"
}


static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name) {
	EventsEventEntry * self;
	gchar* prepped = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_if_fail (new_name != NULL);
#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = new_name;
#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = event_prep_event_name (_tmp0_);
#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala"
	prepped = _tmp1_;
#line 495 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp2_ = prepped;
#line 495 "/home/jens/Source/shotwell/src/events/Branch.vala"
	if (_tmp2_ != NULL) {
#line 4097 "Branch.c"
		CommandManager* _tmp3_ = NULL;
		CommandManager* _tmp4_ = NULL;
		Event* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		RenameEventCommand* _tmp7_ = NULL;
		RenameEventCommand* _tmp8_ = NULL;
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = app_window_get_command_manager ();
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = _tmp3_;
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = self->priv->event;
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp6_ = prepped;
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp7_ = rename_event_command_new (_tmp5_, _tmp6_);
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp8_ = _tmp7_;
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		command_manager_execute (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_COMMAND, Command));
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_tmp8_);
#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_command_manager_unref0 (_tmp4_);
#line 4122 "Branch.c"
	}
#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_free0 (prepped);
#line 4126 "Branch.c"
}


static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media) {
	EventsEventEntry * self;
	gboolean result = FALSE;
	GeeArrayList* views = NULL;
	GeeArrayList* _tmp0_ = NULL;
	CommandManager* _tmp16_ = NULL;
	CommandManager* _tmp17_ = NULL;
	GeeArrayList* _tmp18_ = NULL;
	Event* _tmp19_ = NULL;
	SetEventCommand* _tmp20_ = NULL;
	SetEventCommand* _tmp21_ = NULL;
#line 499 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 499 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (GEE_IS_LIST (media), FALSE);
#line 502 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 502 "/home/jens/Source/shotwell/src/events/Branch.vala"
	views = _tmp0_;
#line 4149 "Branch.c"
	{
		GeeList* _media_source_list = NULL;
		GeeList* _tmp1_ = NULL;
		GeeList* _tmp2_ = NULL;
		gint _media_source_size = 0;
		GeeList* _tmp3_ = NULL;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _media_source_index = 0;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp1_ = media;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_media_source_list = _tmp2_;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp3_ = _media_source_list;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_tmp5_ = _tmp4_;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_media_source_size = _tmp5_;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_media_source_index = -1;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		while (TRUE) {
#line 4177 "Branch.c"
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			MediaSource* media_source = NULL;
			GeeList* _tmp9_ = NULL;
			gint _tmp10_ = 0;
			gpointer _tmp11_ = NULL;
			GeeArrayList* _tmp12_ = NULL;
			MediaSource* _tmp13_ = NULL;
			DataView* _tmp14_ = NULL;
			DataView* _tmp15_ = NULL;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp6_ = _media_source_index;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_media_source_index = _tmp6_ + 1;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp7_ = _media_source_index;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp8_ = _media_source_size;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			if (!(_tmp7_ < _tmp8_)) {
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
				break;
#line 4201 "Branch.c"
			}
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp9_ = _media_source_list;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp10_ = _media_source_index;
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp11_ = gee_list_get (_tmp9_, _tmp10_);
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			media_source = (MediaSource*) _tmp11_;
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp12_ = views;
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp13_ = media_source;
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp14_ = data_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_SOURCE, DataSource));
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_tmp15_ = _tmp14_;
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_);
#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (_tmp15_);
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
			_g_object_unref0 (media_source);
#line 4225 "Branch.c"
		}
#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala"
		_g_object_unref0 (_media_source_list);
#line 4229 "Branch.c"
	}
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp16_ = app_window_get_command_manager ();
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp17_ = _tmp16_;
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp18_ = views;
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp19_ = self->priv->event;
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp20_ = set_event_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable), _tmp19_);
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp21_ = _tmp20_;
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	command_manager_execute (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_COMMAND, Command));
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (_tmp21_);
#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_command_manager_unref0 (_tmp17_);
#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = TRUE;
#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (views);
#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4255 "Branch.c"
}


static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data) {
	EventsEventEntry * self;
	gboolean result = FALSE;
#line 511 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 511 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_return_val_if_fail (data != NULL, FALSE);
#line 512 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = FALSE;
#line 512 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4270 "Branch.c"
}


static void events_event_entry_class_init (EventsEventEntryClass * klass) {
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_event_entry_parent_class = g_type_class_peek_parent (klass);
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_type_class_add_private (klass, sizeof (EventsEventEntryPrivate));
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_event_entry_real_get_sidebar_name;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*)(SidebarSimplePageEntry*)) events_event_entry_real_get_sidebar_icon;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_event_entry_real_create_page;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = events_event_entry_finalize;
#line 4287 "Branch.c"
}


static void events_event_entry_sidebar_renameable_entry_interface_init (SidebarRenameableEntryIface * iface) {
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_event_entry_sidebar_renameable_entry_parent_iface = g_type_interface_peek_parent (iface);
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	iface->is_user_renameable = (gboolean (*)(SidebarRenameableEntry*)) events_event_entry_real_is_user_renameable;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	iface->rename = (void (*)(SidebarRenameableEntry*, const gchar*)) events_event_entry_real_rename;
#line 4298 "Branch.c"
}


static void events_event_entry_sidebar_internal_drop_target_entry_interface_init (SidebarInternalDropTargetEntryIface * iface) {
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_event_entry_sidebar_internal_drop_target_entry_parent_iface = g_type_interface_peek_parent (iface);
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	iface->internal_drop_received = (gboolean (*)(SidebarInternalDropTargetEntry*, GeeList*)) events_event_entry_real_internal_drop_received;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	iface->internal_drop_received_arbitrary = (gboolean (*)(SidebarInternalDropTargetEntry*, GtkSelectionData*)) events_event_entry_real_internal_drop_received_arbitrary;
#line 4309 "Branch.c"
}


static void events_event_entry_instance_init (EventsEventEntry * self) {
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self->priv = EVENTS_EVENT_ENTRY_GET_PRIVATE (self);
#line 4316 "Branch.c"
}


static void events_event_entry_finalize (GObject* obj) {
	EventsEventEntry * self;
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry);
#line 467 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_g_object_unref0 (self->priv->event);
#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala"
	G_OBJECT_CLASS (events_event_entry_parent_class)->finalize (obj);
#line 4328 "Branch.c"
}


GType events_event_entry_get_type (void) {
	static volatile gsize events_event_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_event_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsEventEntry), 0, (GInstanceInitFunc) events_event_entry_instance_init, NULL };
		static const GInterfaceInfo sidebar_renameable_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_renameable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo sidebar_internal_drop_target_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_internal_drop_target_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType events_event_entry_type_id;
		events_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsEventEntry", &g_define_type_info, 0);
		g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_RENAMEABLE_ENTRY, &sidebar_renameable_entry_info);
		g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, &sidebar_internal_drop_target_entry_info);
		g_once_init_leave (&events_event_entry_type_id__volatile, events_event_entry_type_id);
	}
	return events_event_entry_type_id__volatile;
}


EventsNoEventEntry* events_no_event_entry_construct (GType object_type) {
	EventsNoEventEntry * self = NULL;
#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = (EventsNoEventEntry*) sidebar_simple_page_entry_construct (object_type);
#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return self;
#line 4354 "Branch.c"
}


EventsNoEventEntry* events_no_event_entry_new (void) {
#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return events_no_event_entry_construct (EVENTS_TYPE_NO_EVENT_ENTRY);
#line 4361 "Branch.c"
}


static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	EventsNoEventEntry * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 521 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry);
#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = g_strdup (NO_EVENT_PAGE_NAME);
#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp0_;
#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4377 "Branch.c"
}


static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
	EventsNoEventEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 525 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry);
#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = events_branch_no_event_icon;
#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = _tmp1_;
#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4396 "Branch.c"
}


static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base) {
	EventsNoEventEntry * self;
	Page* result = NULL;
	NoEventPage* _tmp0_ = NULL;
#line 529 "/home/jens/Source/shotwell/src/events/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry);
#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala"
	_tmp0_ = no_event_page_new ();
#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala"
	g_object_ref_sink (_tmp0_);
#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page);
#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala"
	return result;
#line 4414 "Branch.c"
}


static void events_no_event_entry_class_init (EventsNoEventEntryClass * klass) {
#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala"
	events_no_event_entry_parent_class = g_type_class_peek_parent (klass);
#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*)(SidebarSimplePageEntry*)) events_no_event_entry_real_get_sidebar_name;
#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*)(SidebarSimplePageEntry*)) events_no_event_entry_real_get_sidebar_icon;
#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*)(SidebarSimplePageEntry*)) events_no_event_entry_real_create_page;
#line 4427 "Branch.c"
}


static void events_no_event_entry_instance_init (EventsNoEventEntry * self) {
}


GType events_no_event_entry_get_type (void) {
	static volatile gsize events_no_event_entry_type_id__volatile = 0;
	if (g_once_init_enter (&events_no_event_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EventsNoEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_no_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsNoEventEntry), 0, (GInstanceInitFunc) events_no_event_entry_instance_init, NULL };
		GType events_no_event_entry_type_id;
		events_no_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsNoEventEntry", &g_define_type_info, 0);
		g_once_init_leave (&events_no_event_entry_type_id__volatile, events_no_event_entry_type_id);
	}
	return events_no_event_entry_type_id__volatile;
}