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
|
/* Branch.c generated by valac 0.32.1, 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 <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <gobject/gvaluecollector.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 SIDEBAR_BRANCH_TYPE_NODE (sidebar_branch_node_get_type ())
#define SIDEBAR_BRANCH_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_BRANCH_TYPE_NODE, SidebarBranchNode))
#define SIDEBAR_BRANCH_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_BRANCH_TYPE_NODE, SidebarBranchNodeClass))
#define SIDEBAR_BRANCH_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_BRANCH_TYPE_NODE))
#define SIDEBAR_BRANCH_IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_BRANCH_TYPE_NODE))
#define SIDEBAR_BRANCH_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_BRANCH_TYPE_NODE, SidebarBranchNodeClass))
typedef struct _SidebarBranchNode SidebarBranchNode;
typedef struct _SidebarBranchNodeClass SidebarBranchNodeClass;
#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ())
#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_node_unref0(var) ((var == NULL) ? NULL : (var = (sidebar_branch_node_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _SidebarBranchNodePrivate SidebarBranchNodePrivate;
typedef struct _SidebarBranchParamSpecNode SidebarBranchParamSpecNode;
#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);
typedef gboolean (*Locator) (gconstpointer item, void* user_data);
struct _SidebarBranch {
GObject parent_instance;
SidebarBranchPrivate * priv;
};
struct _SidebarBranchClass {
GObjectClass parent_class;
};
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 _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);
};
struct _SidebarBranchPrivate {
SidebarBranchNode* root;
SidebarBranchOptions options;
gboolean shown;
GCompareFunc default_comparator;
GeeHashMap* map;
};
struct _SidebarBranchNode {
GTypeInstance parent_instance;
volatile int ref_count;
SidebarBranchNodePrivate * priv;
SidebarEntry* entry;
SidebarBranchNode* parent;
GCompareFunc comparator;
GeeSortedSet* children;
};
struct _SidebarBranchNodeClass {
GTypeClass parent_class;
void (*finalize) (SidebarBranchNode *self);
};
typedef void (*SidebarBranchNodePruneCallback) (SidebarBranchNode* node, void* user_data);
typedef void (*SidebarBranchNodeChildrenReorderedCallback) (SidebarBranchNode* node, void* user_data);
struct _SidebarBranchParamSpecNode {
GParamSpec parent_instance;
};
static gpointer sidebar_branch_parent_class = NULL;
static gpointer sidebar_branch_node_parent_class = NULL;
GType sidebar_branch_get_type (void) G_GNUC_CONST;
static gpointer sidebar_branch_node_ref (gpointer instance);
static void sidebar_branch_node_unref (gpointer instance);
static GParamSpec* sidebar_branch_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void sidebar_branch_value_set_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void sidebar_branch_value_take_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer sidebar_branch_value_get_node (const GValue* value) G_GNUC_UNUSED;
static GType sidebar_branch_node_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType sidebar_branch_options_get_type (void) G_GNUC_CONST;
GType sidebar_tree_get_type (void) G_GNUC_CONST;
GType sidebar_entry_get_type (void) G_GNUC_CONST;
#define SIDEBAR_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SIDEBAR_TYPE_BRANCH, SidebarBranchPrivate))
enum {
SIDEBAR_BRANCH_DUMMY_PROPERTY
};
gboolean sidebar_branch_options_is_hide_if_empty (SidebarBranchOptions self);
gboolean sidebar_branch_options_is_auto_open_on_new_child (SidebarBranchOptions self);
gboolean sidebar_branch_options_is_startup_expand_to_first_child (SidebarBranchOptions self);
gboolean sidebar_branch_options_is_startup_open_grouping (SidebarBranchOptions self);
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);
static SidebarBranchNode* sidebar_branch_node_new (SidebarEntry* entry, SidebarBranchNode* parent, GCompareFunc comparator);
static SidebarBranchNode* sidebar_branch_node_construct (GType object_type, SidebarEntry* entry, SidebarBranchNode* parent, GCompareFunc comparator);
void sidebar_branch_set_show_branch (SidebarBranch* self, gboolean shown);
SidebarEntry* sidebar_branch_get_root (SidebarBranch* self);
gboolean sidebar_branch_get_show_branch (SidebarBranch* self);
gboolean sidebar_branch_is_auto_open_on_new_child (SidebarBranch* self);
gboolean sidebar_branch_is_startup_expand_to_first_child (SidebarBranch* self);
gboolean sidebar_branch_is_startup_open_grouping (SidebarBranch* self);
void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator);
static void sidebar_branch_node_add_child (SidebarBranchNode* self, SidebarBranchNode* child);
void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry);
static void sidebar_branch_node_prune_children (SidebarBranchNode* self, SidebarBranchNodePruneCallback cb, void* cb_target);
static void sidebar_branch_prune_callback (SidebarBranch* self, SidebarBranchNode* node);
static void _sidebar_branch_prune_callback_sidebar_branch_node_prune_callback (SidebarBranchNode* node, gpointer self);
static void sidebar_branch_node_remove_child (SidebarBranchNode* self, SidebarBranchNode* child);
static gboolean sidebar_branch_node_has_children (SidebarBranchNode* self);
void sidebar_branch_reparent (SidebarBranch* self, SidebarEntry* new_parent, SidebarEntry* entry);
gboolean sidebar_branch_has_entry (SidebarBranch* self, SidebarEntry* entry);
void sidebar_branch_reorder (SidebarBranch* self, SidebarEntry* entry);
static gboolean sidebar_branch_node_reorder_child (SidebarBranchNode* self, SidebarBranchNode* child);
void sidebar_branch_reorder_all (SidebarBranch* self);
static void sidebar_branch_node_reorder_children (SidebarBranchNode* self, gboolean recursive, SidebarBranchNodeChildrenReorderedCallback cb, void* cb_target);
static void sidebar_branch_children_reordered_callback (SidebarBranch* self, SidebarBranchNode* node);
static void _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback (SidebarBranchNode* node, gpointer self);
void sidebar_branch_reorder_children (SidebarBranch* self, SidebarEntry* entry, gboolean recursive);
void sidebar_branch_change_all_comparators (SidebarBranch* self, GCompareFunc comparator);
static void sidebar_branch_node_change_comparator (SidebarBranchNode* self, GCompareFunc comparator, gboolean recursive, SidebarBranchNodeChildrenReorderedCallback cb, void* cb_target);
void sidebar_branch_change_comparator (SidebarBranch* self, SidebarEntry* entry, gboolean recursive, GCompareFunc comparator);
gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent);
GeeList* sidebar_branch_get_children (SidebarBranch* self, SidebarEntry* parent);
SidebarEntry* sidebar_branch_find_first_child (SidebarBranch* self, SidebarEntry* parent, Locator locator, void* locator_target);
SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry);
SidebarEntry* sidebar_branch_get_previous_sibling (SidebarBranch* self, SidebarEntry* entry);
SidebarEntry* sidebar_branch_get_next_sibling (SidebarBranch* self, SidebarEntry* entry);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
enum {
SIDEBAR_BRANCH_NODE_DUMMY_PROPERTY
};
static gint sidebar_branch_node_comparator_wrapper (SidebarBranchNode* anode, SidebarBranchNode* bnode);
static gint _sidebar_branch_node_comparator_wrapper_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
static gint sidebar_branch_node_index_of_by_reference (SidebarBranchNode* self, SidebarBranchNode* child);
static void sidebar_branch_node_finalize (SidebarBranchNode* obj);
static void sidebar_branch_finalize (GObject* obj);
gboolean sidebar_branch_options_is_hide_if_empty (SidebarBranchOptions self) {
gboolean result = FALSE;
#line 19 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = (self & SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY) != 0;
#line 19 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 202 "Branch.c"
}
gboolean sidebar_branch_options_is_auto_open_on_new_child (SidebarBranchOptions self) {
gboolean result = FALSE;
#line 23 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = (self & SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD) != 0;
#line 23 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 212 "Branch.c"
}
gboolean sidebar_branch_options_is_startup_expand_to_first_child (SidebarBranchOptions self) {
gboolean result = FALSE;
#line 27 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = (self & SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD) != 0;
#line 27 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 222 "Branch.c"
}
gboolean sidebar_branch_options_is_startup_open_grouping (SidebarBranchOptions self) {
gboolean result = FALSE;
#line 31 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = (self & SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING) != 0;
#line 31 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 232 "Branch.c"
}
GType sidebar_branch_options_get_type (void) {
static volatile gsize sidebar_branch_options_type_id__volatile = 0;
if (g_once_init_enter (&sidebar_branch_options_type_id__volatile)) {
static const GFlagsValue values[] = {{SIDEBAR_BRANCH_OPTIONS_NONE, "SIDEBAR_BRANCH_OPTIONS_NONE", "none"}, {SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY, "SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY", "hide-if-empty"}, {SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD, "SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD", "auto-open-on-new-child"}, {SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, "SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD", "startup-expand-to-first-child"}, {SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING, "SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING", "startup-open-grouping"}, {0, NULL, NULL}};
GType sidebar_branch_options_type_id;
sidebar_branch_options_type_id = g_flags_register_static ("SidebarBranchOptions", values);
g_once_init_leave (&sidebar_branch_options_type_id__volatile, sidebar_branch_options_type_id);
}
return sidebar_branch_options_type_id__volatile;
}
SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator) {
SidebarBranch * self = NULL;
GCompareFunc _tmp0_ = NULL;
GCompareFunc _tmp1_ = NULL;
GCompareFunc _tmp2_ = NULL;
SidebarEntry* _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchOptions _tmp7_ = 0;
GeeHashMap* _tmp8_ = NULL;
SidebarEntry* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
SidebarBranchOptions _tmp11_ = 0;
gboolean _tmp12_ = FALSE;
#line 206 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (root), NULL);
#line 206 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self = (SidebarBranch*) g_object_new (object_type, NULL);
#line 208 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = default_comparator;
#line 208 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->default_comparator = _tmp0_;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = root_comparator;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp2_ != NULL) {
#line 273 "Branch.c"
GCompareFunc _tmp3_ = NULL;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = root_comparator;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _tmp3_;
#line 279 "Branch.c"
} else {
GCompareFunc _tmp4_ = NULL;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = default_comparator;
#line 210 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _tmp4_;
#line 286 "Branch.c"
}
#line 209 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = root;
#line 209 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = sidebar_branch_node_new (_tmp5_, NULL, _tmp1_);
#line 209 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (self->priv->root);
#line 209 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->root = _tmp6_;
#line 211 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = options;
#line 211 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->options = _tmp7_;
#line 213 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = self->priv->map;
#line 213 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = root;
#line 213 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = self->priv->root;
#line 213 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_, _tmp10_);
#line 215 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = options;
#line 215 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = sidebar_branch_options_is_hide_if_empty (_tmp11_);
#line 215 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp12_) {
#line 216 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_set_show_branch (self, FALSE);
#line 316 "Branch.c"
}
#line 206 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return self;
#line 320 "Branch.c"
}
SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator) {
#line 206 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return sidebar_branch_construct (SIDEBAR_TYPE_BRANCH, root, options, default_comparator, root_comparator);
#line 327 "Branch.c"
}
static gpointer _g_object_ref0 (gpointer self) {
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return self ? g_object_ref (self) : NULL;
#line 334 "Branch.c"
}
SidebarEntry* sidebar_branch_get_root (SidebarBranch* self) {
SidebarEntry* result = NULL;
SidebarBranchNode* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
#line 219 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->root;
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _tmp0_->entry;
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _g_object_ref0 (_tmp1_);
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp2_;
#line 220 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 355 "Branch.c"
}
void sidebar_branch_set_show_branch (SidebarBranch* self, gboolean shown) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
#line 223 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 224 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->shown;
#line 224 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = shown;
#line 224 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == _tmp1_) {
#line 225 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return;
#line 374 "Branch.c"
}
#line 227 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = shown;
#line 227 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->shown = _tmp2_;
#line 228 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = shown;
#line 228 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "show-branch", _tmp3_);
#line 384 "Branch.c"
}
gboolean sidebar_branch_get_show_branch (SidebarBranch* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
#line 231 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), FALSE);
#line 232 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->shown;
#line 232 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp0_;
#line 232 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 399 "Branch.c"
}
gboolean sidebar_branch_is_auto_open_on_new_child (SidebarBranch* self) {
gboolean result = FALSE;
SidebarBranchOptions _tmp0_ = 0;
gboolean _tmp1_ = FALSE;
#line 235 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), FALSE);
#line 236 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->options;
#line 236 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = sidebar_branch_options_is_auto_open_on_new_child (_tmp0_);
#line 236 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp1_;
#line 236 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 417 "Branch.c"
}
gboolean sidebar_branch_is_startup_expand_to_first_child (SidebarBranch* self) {
gboolean result = FALSE;
SidebarBranchOptions _tmp0_ = 0;
gboolean _tmp1_ = FALSE;
#line 239 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), FALSE);
#line 240 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->options;
#line 240 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = sidebar_branch_options_is_startup_expand_to_first_child (_tmp0_);
#line 240 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp1_;
#line 240 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 435 "Branch.c"
}
gboolean sidebar_branch_is_startup_open_grouping (SidebarBranch* self) {
gboolean result = FALSE;
SidebarBranchOptions _tmp0_ = 0;
gboolean _tmp1_ = FALSE;
#line 243 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), FALSE);
#line 244 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->options;
#line 244 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = sidebar_branch_options_is_startup_open_grouping (_tmp0_);
#line 244 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp1_;
#line 244 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 453 "Branch.c"
}
void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator) {
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
SidebarBranchOptions _tmp6_ = 0;
gboolean _tmp7_ = FALSE;
SidebarBranchNode* parent_node = NULL;
GeeHashMap* _tmp8_ = NULL;
SidebarEntry* _tmp9_ = NULL;
gpointer _tmp10_ = NULL;
GCompareFunc _tmp11_ = NULL;
GCompareFunc _tmp12_ = NULL;
SidebarBranchNode* entry_node = NULL;
SidebarEntry* _tmp15_ = NULL;
SidebarBranchNode* _tmp16_ = NULL;
SidebarBranchNode* _tmp17_ = NULL;
SidebarBranchNode* _tmp18_ = NULL;
GeeHashMap* _tmp19_ = NULL;
SidebarEntry* _tmp20_ = NULL;
SidebarEntry* _tmp21_ = NULL;
#line 247 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 247 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (parent));
#line 247 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 249 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 249 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = parent;
#line 249 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 249 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp2_, "map.has_key(parent)");
#line 250 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 250 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 250 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 250 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (!_tmp5_, "!map.has_key(entry)");
#line 252 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = self->priv->options;
#line 252 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = sidebar_branch_options_is_hide_if_empty (_tmp6_);
#line 252 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp7_) {
#line 253 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_set_show_branch (self, TRUE);
#line 510 "Branch.c"
}
#line 255 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = self->priv->map;
#line 255 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = parent;
#line 255 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_);
#line 255 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
parent_node = (SidebarBranchNode*) _tmp10_;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = comparator;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp12_ != NULL) {
#line 524 "Branch.c"
GCompareFunc _tmp13_ = NULL;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = comparator;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp13_;
#line 530 "Branch.c"
} else {
GCompareFunc _tmp14_ = NULL;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = self->priv->default_comparator;
#line 257 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp14_;
#line 537 "Branch.c"
}
#line 256 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = entry;
#line 256 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = parent_node;
#line 256 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = sidebar_branch_node_new (_tmp15_, _tmp16_, _tmp11_);
#line 256 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = _tmp17_;
#line 259 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = parent_node;
#line 259 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_add_child (_tmp18_, entry_node);
#line 260 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = self->priv->map;
#line 260 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = entry;
#line 260 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp20_, entry_node);
#line 262 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp21_ = entry;
#line 262 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "entry-added", _tmp21_);
#line 247 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 247 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 565 "Branch.c"
}
static void _sidebar_branch_prune_callback_sidebar_branch_node_prune_callback (SidebarBranchNode* node, gpointer self) {
#line 272 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_prune_callback ((SidebarBranch*) self, node);
#line 572 "Branch.c"
}
void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry) {
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp6_ = NULL;
SidebarEntry* _tmp7_ = NULL;
gpointer _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
SidebarBranchNode* _tmp11_ = NULL;
SidebarBranchNode* _tmp12_ = NULL;
SidebarBranchNode* _tmp13_ = NULL;
SidebarBranchNode* _tmp14_ = NULL;
gboolean removed = FALSE;
GeeHashMap* _tmp15_ = NULL;
SidebarEntry* _tmp16_ = NULL;
gboolean _tmp17_ = FALSE;
gboolean _tmp18_ = FALSE;
SidebarEntry* _tmp19_ = NULL;
gboolean _tmp20_ = FALSE;
SidebarBranchOptions _tmp21_ = 0;
gboolean _tmp22_ = FALSE;
#line 266 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 266 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 267 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 267 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 267 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 267 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp0_ != _tmp2_, "entry != root.entry");
#line 268 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 268 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 268 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 268 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp5_, "map.has_key(entry)");
#line 270 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = self->priv->map;
#line 270 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = entry;
#line 270 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_);
#line 270 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp8_;
#line 272 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = entry_node;
#line 272 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_prune_children (_tmp9_, _sidebar_branch_prune_callback_sidebar_branch_node_prune_callback, self);
#line 274 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = entry_node;
#line 274 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp10_->parent;
#line 274 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp11_ != NULL, "entry_node.parent != null");
#line 275 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = entry_node;
#line 275 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = _tmp12_->parent;
#line 275 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = entry_node;
#line 275 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_remove_child (_tmp13_, _tmp14_);
#line 277 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = self->priv->map;
#line 277 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = entry;
#line 277 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp16_, NULL);
#line 277 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
removed = _tmp17_;
#line 278 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = removed;
#line 278 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp18_, "removed");
#line 280 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = entry;
#line 280 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "entry-removed", _tmp19_);
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp21_ = self->priv->options;
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp22_ = sidebar_branch_options_is_hide_if_empty (_tmp21_);
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp22_) {
#line 670 "Branch.c"
SidebarBranchNode* _tmp23_ = NULL;
gboolean _tmp24_ = FALSE;
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp23_ = self->priv->root;
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp24_ = sidebar_branch_node_has_children (_tmp23_);
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = !_tmp24_;
#line 679 "Branch.c"
} else {
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = FALSE;
#line 683 "Branch.c"
}
#line 282 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp20_) {
#line 283 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_set_show_branch (self, FALSE);
#line 689 "Branch.c"
}
#line 266 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 693 "Branch.c"
}
void sidebar_branch_reparent (SidebarBranch* self, SidebarEntry* new_parent, SidebarEntry* entry) {
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
GeeHashMap* _tmp6_ = NULL;
SidebarEntry* _tmp7_ = NULL;
gboolean _tmp8_ = FALSE;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp9_ = NULL;
SidebarEntry* _tmp10_ = NULL;
gpointer _tmp11_ = NULL;
SidebarBranchNode* new_parent_node = NULL;
GeeHashMap* _tmp12_ = NULL;
SidebarEntry* _tmp13_ = NULL;
gpointer _tmp14_ = NULL;
SidebarBranchNode* _tmp15_ = NULL;
SidebarEntry* old_parent = NULL;
SidebarBranchNode* _tmp16_ = NULL;
SidebarEntry* _tmp17_ = NULL;
SidebarEntry* _tmp18_ = NULL;
SidebarBranchNode* _tmp19_ = NULL;
SidebarEntry* _tmp20_ = NULL;
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (new_parent));
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 288 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 288 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 288 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 288 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp0_ != _tmp2_, "entry != root.entry");
#line 289 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 289 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 289 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 289 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp5_, "map.has_key(entry)");
#line 290 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = self->priv->map;
#line 290 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = new_parent;
#line 290 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_);
#line 290 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp8_, "map.has_key(new_parent)");
#line 292 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = self->priv->map;
#line 292 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = entry;
#line 292 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp10_);
#line 292 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp11_;
#line 293 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = self->priv->map;
#line 293 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = new_parent;
#line 293 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp13_);
#line 293 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
new_parent_node = (SidebarBranchNode*) _tmp14_;
#line 295 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = entry_node->parent;
#line 295 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp15_ != NULL, "entry_node.parent != null");
#line 296 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = entry_node->parent;
#line 296 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = _tmp16_->entry;
#line 296 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = _g_object_ref0 (_tmp17_);
#line 296 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
old_parent = _tmp18_;
#line 298 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = entry_node->parent;
#line 298 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_remove_child (_tmp19_, entry_node);
#line 299 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_add_child (new_parent_node, entry_node);
#line 301 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = entry;
#line 301 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "entry-reparented", _tmp20_, old_parent);
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (old_parent);
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (new_parent_node);
#line 287 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 796 "Branch.c"
}
gboolean sidebar_branch_has_entry (SidebarBranch* self, SidebarEntry* entry) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
SidebarEntry* _tmp3_ = NULL;
#line 304 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), FALSE);
#line 304 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE);
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = entry;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp2_ == _tmp3_) {
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = TRUE;
#line 820 "Branch.c"
} else {
GeeHashMap* _tmp4_ = NULL;
SidebarEntry* _tmp5_ = NULL;
gboolean _tmp6_ = FALSE;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = self->priv->map;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = entry;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp5_);
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = _tmp6_;
#line 833 "Branch.c"
}
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp0_;
#line 305 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 839 "Branch.c"
}
void sidebar_branch_reorder (SidebarBranch* self, SidebarEntry* entry) {
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
SidebarBranchNode* _tmp11_ = NULL;
gboolean _tmp12_ = FALSE;
#line 310 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 310 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 311 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 311 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 311 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 311 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp0_ != _tmp2_, "entry != root.entry");
#line 313 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 313 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 313 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 313 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp5_;
#line 314 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = entry_node;
#line 314 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp6_ != NULL, "entry_node != null");
#line 316 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = entry_node;
#line 316 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->parent;
#line 316 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp8_ != NULL, "entry_node.parent != null");
#line 317 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = entry_node;
#line 317 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->parent;
#line 317 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = entry_node;
#line 317 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = sidebar_branch_node_reorder_child (_tmp10_, _tmp11_);
#line 317 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp12_) {
#line 898 "Branch.c"
SidebarEntry* _tmp13_ = NULL;
#line 318 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = entry;
#line 318 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "entry-moved", _tmp13_);
#line 904 "Branch.c"
}
#line 310 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 908 "Branch.c"
}
static void _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback (SidebarBranchNode* node, gpointer self) {
#line 323 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_children_reordered_callback ((SidebarBranch*) self, node);
#line 915 "Branch.c"
}
void sidebar_branch_reorder_all (SidebarBranch* self) {
SidebarBranchNode* _tmp0_ = NULL;
#line 322 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 323 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->root;
#line 323 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_reorder_children (_tmp0_, TRUE, _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback, self);
#line 927 "Branch.c"
}
void sidebar_branch_reorder_children (SidebarBranch* self, SidebarEntry* entry, gboolean recursive) {
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
#line 327 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 327 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 328 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 328 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = entry;
#line 328 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 328 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp2_;
#line 329 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (entry_node != NULL, "entry_node != null");
#line 331 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = recursive;
#line 331 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_reorder_children (entry_node, _tmp3_, _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback, self);
#line 327 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 957 "Branch.c"
}
void sidebar_branch_change_all_comparators (SidebarBranch* self, GCompareFunc comparator) {
SidebarBranchNode* _tmp0_ = NULL;
GCompareFunc _tmp1_ = NULL;
#line 334 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 335 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->root;
#line 335 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = comparator;
#line 335 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_change_comparator (_tmp0_, _tmp1_, TRUE, _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback, self);
#line 972 "Branch.c"
}
void sidebar_branch_change_comparator (SidebarBranch* self, SidebarEntry* entry, gboolean recursive, GCompareFunc comparator) {
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
GCompareFunc _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
#line 338 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 338 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_ENTRY (entry));
#line 340 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 340 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = entry;
#line 340 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 340 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp2_;
#line 341 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (entry_node != NULL, "entry_node != null");
#line 343 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = comparator;
#line 343 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = recursive;
#line 343 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_change_comparator (entry_node, _tmp3_, _tmp4_, _sidebar_branch_children_reordered_callback_sidebar_branch_node_children_reordered_callback, self);
#line 338 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 1005 "Branch.c"
}
gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent) {
gint result = 0;
SidebarBranchNode* parent_node = NULL;
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
SidebarBranchNode* _tmp3_ = NULL;
gint _tmp4_ = 0;
SidebarBranchNode* _tmp5_ = NULL;
GeeSortedSet* _tmp6_ = NULL;
#line 346 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), 0);
#line 346 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (parent), 0);
#line 347 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 347 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = parent;
#line 347 "/home/jens/Source/shotwell/src/sidebar/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/sidebar/Branch.vala"
parent_node = (SidebarBranchNode*) _tmp2_;
#line 348 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = parent_node;
#line 348 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp3_ != NULL, "parent_node != null");
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = parent_node;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = _tmp5_->children;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp6_ != NULL) {
#line 1041 "Branch.c"
SidebarBranchNode* _tmp7_ = NULL;
GeeSortedSet* _tmp8_ = NULL;
gint _tmp9_ = 0;
gint _tmp10_ = 0;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = parent_node;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->children;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection));
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = _tmp10_;
#line 1056 "Branch.c"
} else {
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = 0;
#line 1060 "Branch.c"
}
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp4_;
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 350 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1068 "Branch.c"
}
GeeList* sidebar_branch_get_children (SidebarBranch* self, SidebarEntry* parent) {
GeeList* result = NULL;
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
SidebarBranchNode* parent_node = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
GeeSortedSet* _tmp7_ = NULL;
GeeList* child_entries = NULL;
GeeArrayList* _tmp8_ = NULL;
#line 355 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 355 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (parent), NULL);
#line 356 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 356 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = parent;
#line 356 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 356 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp2_, "map.has_key(parent)");
#line 358 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 358 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = parent;
#line 358 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 358 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
parent_node = (SidebarBranchNode*) _tmp5_;
#line 359 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = parent_node;
#line 359 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = _tmp6_->children;
#line 359 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp7_ == NULL) {
#line 360 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 360 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 360 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1117 "Branch.c"
}
#line 362 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_array_list_new (SIDEBAR_TYPE_ENTRY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 362 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child_entries = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_LIST, GeeList);
#line 1123 "Branch.c"
{
GeeIterator* _child_it = NULL;
SidebarBranchNode* _tmp9_ = NULL;
GeeSortedSet* _tmp10_ = NULL;
GeeIterator* _tmp11_ = NULL;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = parent_node;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->children;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable));
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp11_;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 1139 "Branch.c"
GeeIterator* _tmp12_ = NULL;
gboolean _tmp13_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp14_ = NULL;
gpointer _tmp15_ = NULL;
GeeList* _tmp16_ = NULL;
SidebarBranchNode* _tmp17_ = NULL;
SidebarEntry* _tmp18_ = NULL;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = _child_it;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = gee_iterator_next (_tmp12_);
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp13_) {
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 1156 "Branch.c"
}
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = _child_it;
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = gee_iterator_get (_tmp14_);
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp15_;
#line 364 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = child_entries;
#line 364 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = child;
#line 364 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = _tmp17_->entry;
#line 364 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), _tmp18_);
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 1174 "Branch.c"
}
#line 363 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 1178 "Branch.c"
}
#line 366 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = child_entries;
#line 366 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 366 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1186 "Branch.c"
}
SidebarEntry* sidebar_branch_find_first_child (SidebarBranch* self, SidebarEntry* parent, Locator locator, void* locator_target) {
SidebarEntry* result = NULL;
SidebarBranchNode* parent_node = NULL;
GeeHashMap* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
SidebarBranchNode* _tmp3_ = NULL;
SidebarBranchNode* _tmp4_ = NULL;
GeeSortedSet* _tmp5_ = NULL;
#line 369 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 369 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (parent), NULL);
#line 370 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->priv->map;
#line 370 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = parent;
#line 370 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 370 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
parent_node = (SidebarBranchNode*) _tmp2_;
#line 371 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = parent_node;
#line 371 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp3_ != NULL, "parent_node != null");
#line 373 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = parent_node;
#line 373 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _tmp4_->children;
#line 373 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp5_ == NULL) {
#line 374 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 374 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 374 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1227 "Branch.c"
}
{
GeeIterator* _child_it = NULL;
SidebarBranchNode* _tmp6_ = NULL;
GeeSortedSet* _tmp7_ = NULL;
GeeIterator* _tmp8_ = NULL;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = parent_node;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = _tmp6_->children;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable));
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp8_;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 1244 "Branch.c"
GeeIterator* _tmp9_ = NULL;
gboolean _tmp10_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp11_ = NULL;
gpointer _tmp12_ = NULL;
Locator _tmp13_ = NULL;
void* _tmp13__target = NULL;
SidebarBranchNode* _tmp14_ = NULL;
SidebarEntry* _tmp15_ = NULL;
gboolean _tmp16_ = FALSE;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = _child_it;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = gee_iterator_next (_tmp9_);
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp10_) {
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 1263 "Branch.c"
}
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _child_it;
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = gee_iterator_get (_tmp11_);
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp12_;
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = locator;
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13__target = locator_target;
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = child;
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = _tmp14_->entry;
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = _tmp13_ (_tmp15_, _tmp13__target);
#line 377 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp16_) {
#line 1283 "Branch.c"
SidebarBranchNode* _tmp17_ = NULL;
SidebarEntry* _tmp18_ = NULL;
SidebarEntry* _tmp19_ = NULL;
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = child;
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = _tmp17_->entry;
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = _g_object_ref0 (_tmp18_);
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp19_;
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 378 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1303 "Branch.c"
}
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 1307 "Branch.c"
}
#line 376 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 1311 "Branch.c"
}
#line 381 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 381 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (parent_node);
#line 381 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1319 "Branch.c"
}
SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry) {
SidebarEntry* result = NULL;
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
SidebarEntry* _tmp11_ = NULL;
SidebarEntry* _tmp12_ = NULL;
#line 385 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 385 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), NULL);
#line 386 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 386 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 386 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 386 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == _tmp2_) {
#line 387 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 387 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1355 "Branch.c"
}
#line 389 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 389 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 389 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 389 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp5_;
#line 390 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = entry_node;
#line 390 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp6_ != NULL, "entry_node != null");
#line 391 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = entry_node;
#line 391 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->parent;
#line 391 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp8_ != NULL, "entry_node.parent != null");
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = entry_node;
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->parent;
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp10_->entry;
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = _g_object_ref0 (_tmp11_);
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp12_;
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 393 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1389 "Branch.c"
}
SidebarEntry* sidebar_branch_get_previous_sibling (SidebarBranch* self, SidebarEntry* entry) {
SidebarEntry* result = NULL;
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
GeeSortedSet* _tmp11_ = NULL;
SidebarBranchNode* sibling = NULL;
SidebarBranchNode* _tmp12_ = NULL;
SidebarBranchNode* _tmp13_ = NULL;
GeeSortedSet* _tmp14_ = NULL;
SidebarBranchNode* _tmp15_ = NULL;
gpointer _tmp16_ = NULL;
SidebarEntry* _tmp17_ = NULL;
SidebarBranchNode* _tmp18_ = NULL;
SidebarEntry* _tmp21_ = NULL;
#line 397 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 397 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), NULL);
#line 398 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 398 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 398 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 398 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == _tmp2_) {
#line 399 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 399 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1433 "Branch.c"
}
#line 401 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 401 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 401 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 401 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp5_;
#line 402 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = entry_node;
#line 402 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp6_ != NULL, "entry_node != null");
#line 403 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = entry_node;
#line 403 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->parent;
#line 403 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp8_ != NULL, "entry_node.parent != null");
#line 404 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = entry_node;
#line 404 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->parent;
#line 404 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp10_->children;
#line 404 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp11_ != NULL, "entry_node.parent.children != null");
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = entry_node;
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = _tmp12_->parent;
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = _tmp13_->children;
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = entry_node;
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = gee_sorted_set_lower (_tmp14_, _tmp15_);
#line 406 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sibling = (SidebarBranchNode*) _tmp16_;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = sibling;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp18_ != NULL) {
#line 1477 "Branch.c"
SidebarBranchNode* _tmp19_ = NULL;
SidebarEntry* _tmp20_ = NULL;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = sibling;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = _tmp19_->entry;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = _tmp20_;
#line 1486 "Branch.c"
} else {
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = NULL;
#line 1490 "Branch.c"
}
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp21_ = _g_object_ref0 (_tmp17_);
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp21_;
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (sibling);
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 408 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1502 "Branch.c"
}
SidebarEntry* sidebar_branch_get_next_sibling (SidebarBranch* self, SidebarEntry* entry) {
SidebarEntry* result = NULL;
SidebarEntry* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarEntry* _tmp2_ = NULL;
SidebarBranchNode* entry_node = NULL;
GeeHashMap* _tmp3_ = NULL;
SidebarEntry* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarBranchNode* _tmp10_ = NULL;
GeeSortedSet* _tmp11_ = NULL;
SidebarBranchNode* sibling = NULL;
SidebarBranchNode* _tmp12_ = NULL;
SidebarBranchNode* _tmp13_ = NULL;
GeeSortedSet* _tmp14_ = NULL;
SidebarBranchNode* _tmp15_ = NULL;
gpointer _tmp16_ = NULL;
SidebarEntry* _tmp17_ = NULL;
SidebarBranchNode* _tmp18_ = NULL;
SidebarEntry* _tmp21_ = NULL;
#line 412 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_BRANCH (self), NULL);
#line 412 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), NULL);
#line 413 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 413 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->priv->root;
#line 413 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = _tmp1_->entry;
#line 413 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == _tmp2_) {
#line 414 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = NULL;
#line 414 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1546 "Branch.c"
}
#line 416 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->priv->map;
#line 416 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = entry;
#line 416 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 416 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
entry_node = (SidebarBranchNode*) _tmp5_;
#line 417 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = entry_node;
#line 417 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp6_ != NULL, "entry_node != null");
#line 418 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = entry_node;
#line 418 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->parent;
#line 418 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp8_ != NULL, "entry_node.parent != null");
#line 419 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = entry_node;
#line 419 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->parent;
#line 419 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _tmp10_->children;
#line 419 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp11_ != NULL, "entry_node.parent.children != null");
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = entry_node;
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = _tmp12_->parent;
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = _tmp13_->children;
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = entry_node;
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = gee_sorted_set_higher (_tmp14_, _tmp15_);
#line 421 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sibling = (SidebarBranchNode*) _tmp16_;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = sibling;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp18_ != NULL) {
#line 1590 "Branch.c"
SidebarBranchNode* _tmp19_ = NULL;
SidebarEntry* _tmp20_ = NULL;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp19_ = sibling;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp20_ = _tmp19_->entry;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = _tmp20_;
#line 1599 "Branch.c"
} else {
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = NULL;
#line 1603 "Branch.c"
}
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp21_ = _g_object_ref0 (_tmp17_);
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp21_;
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (sibling);
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (entry_node);
#line 423 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1615 "Branch.c"
}
static void sidebar_branch_prune_callback (SidebarBranch* self, SidebarBranchNode* node) {
SidebarBranchNode* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
#line 426 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 426 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (node));
#line 427 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = node;
#line 427 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _tmp0_->entry;
#line 427 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "entry-removed", _tmp1_);
#line 1632 "Branch.c"
}
static void sidebar_branch_children_reordered_callback (SidebarBranch* self, SidebarBranchNode* node) {
SidebarBranchNode* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
#line 430 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_IS_BRANCH (self));
#line 430 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (node));
#line 431 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = node;
#line 431 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _tmp0_->entry;
#line 431 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_emit_by_name (self, "children-reordered", _tmp1_);
#line 1649 "Branch.c"
}
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
register GMarshalFunc_VOID__OBJECT_OBJECT callback;
register GCClosure * cc;
register gpointer data1;
register gpointer data2;
cc = (GCClosure *) closure;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (n_param_values == 3);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
data1 = closure->data;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
data2 = param_values->data[0].v_pointer;
#line 1668 "Branch.c"
} else {
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
data1 = param_values->data[0].v_pointer;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
data2 = closure->data;
#line 1674 "Branch.c"
}
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
#line 1680 "Branch.c"
}
static SidebarBranchNode* sidebar_branch_node_construct (GType object_type, SidebarEntry* entry, SidebarBranchNode* parent, GCompareFunc comparator) {
SidebarBranchNode* self = NULL;
SidebarEntry* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
SidebarBranchNode* _tmp2_ = NULL;
GCompareFunc _tmp3_ = NULL;
#line 45 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), NULL);
#line 45 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail ((parent == NULL) || SIDEBAR_BRANCH_IS_NODE (parent), NULL);
#line 45 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self = (SidebarBranchNode*) g_type_create_instance (object_type);
#line 46 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = entry;
#line 46 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 46 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->entry);
#line 46 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->entry = _tmp1_;
#line 47 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = parent;
#line 47 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->parent = _tmp2_;
#line 48 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = comparator;
#line 48 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->comparator = _tmp3_;
#line 45 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return self;
#line 1714 "Branch.c"
}
static SidebarBranchNode* sidebar_branch_node_new (SidebarEntry* entry, SidebarBranchNode* parent, GCompareFunc comparator) {
#line 45 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return sidebar_branch_node_construct (SIDEBAR_BRANCH_TYPE_NODE, entry, parent, comparator);
#line 1721 "Branch.c"
}
static gint sidebar_branch_node_comparator_wrapper (SidebarBranchNode* anode, SidebarBranchNode* bnode) {
gint result = 0;
SidebarBranchNode* _tmp0_ = NULL;
SidebarBranchNode* _tmp1_ = NULL;
SidebarBranchNode* _tmp2_ = NULL;
SidebarBranchNode* _tmp3_ = NULL;
SidebarBranchNode* _tmp4_ = NULL;
SidebarBranchNode* _tmp5_ = NULL;
SidebarBranchNode* _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
GCompareFunc _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
SidebarEntry* _tmp10_ = NULL;
SidebarBranchNode* _tmp11_ = NULL;
SidebarEntry* _tmp12_ = NULL;
gint _tmp13_ = 0;
#line 51 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (anode), 0);
#line 51 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (bnode), 0);
#line 52 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = anode;
#line 52 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = bnode;
#line 52 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == _tmp1_) {
#line 53 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = 0;
#line 53 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1755 "Branch.c"
}
#line 55 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = anode;
#line 55 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = _tmp2_->parent;
#line 55 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = bnode;
#line 55 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _tmp4_->parent;
#line 55 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp3_ == _tmp5_, "anode.parent == bnode.parent");
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = anode;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = _tmp6_->parent;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = _tmp7_->comparator;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = anode;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _tmp9_->entry;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = bnode;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = _tmp11_->entry;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = _tmp8_ (_tmp10_, _tmp12_);
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp13_;
#line 57 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1787 "Branch.c"
}
static gboolean sidebar_branch_node_has_children (SidebarBranchNode* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
GeeSortedSet* _tmp1_ = NULL;
#line 60 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (self), FALSE);
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->children;
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp1_ != NULL) {
#line 1801 "Branch.c"
GeeSortedSet* _tmp2_ = NULL;
gint _tmp3_ = 0;
gint _tmp4_ = 0;
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = self->children;
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = _tmp3_;
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = _tmp4_ > 0;
#line 1813 "Branch.c"
} else {
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = FALSE;
#line 1817 "Branch.c"
}
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = _tmp0_;
#line 61 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1823 "Branch.c"
}
static gint _sidebar_branch_node_comparator_wrapper_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
gint result;
result = sidebar_branch_node_comparator_wrapper ((SidebarBranchNode*) a, (SidebarBranchNode*) b);
#line 68 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 1832 "Branch.c"
}
static void sidebar_branch_node_add_child (SidebarBranchNode* self, SidebarBranchNode* child) {
SidebarBranchNode* _tmp0_ = NULL;
GeeSortedSet* _tmp1_ = NULL;
gboolean added = FALSE;
GeeSortedSet* _tmp3_ = NULL;
SidebarBranchNode* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
#line 64 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (self));
#line 64 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (child));
#line 65 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = child;
#line 65 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_->parent = self;
#line 67 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->children;
#line 67 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp1_ == NULL) {
#line 1855 "Branch.c"
GeeTreeSet* _tmp2_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_tree_set_new (SIDEBAR_BRANCH_TYPE_NODE, (GBoxedCopyFunc) sidebar_branch_node_ref, sidebar_branch_node_unref, _sidebar_branch_node_comparator_wrapper_gcompare_data_func, NULL, NULL);
#line 68 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 68 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 1863 "Branch.c"
}
#line 70 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->children;
#line 70 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = child;
#line 70 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), _tmp4_);
#line 70 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
added = _tmp5_;
#line 71 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (added, "added");
#line 1875 "Branch.c"
}
static void sidebar_branch_node_remove_child (SidebarBranchNode* self, SidebarBranchNode* child) {
GeeSortedSet* _tmp0_ = NULL;
GeeSortedSet* new_children = NULL;
GeeTreeSet* _tmp1_ = NULL;
gboolean found = FALSE;
gboolean _tmp12_ = FALSE;
GeeSortedSet* _tmp13_ = NULL;
gint _tmp14_ = 0;
gint _tmp15_ = 0;
SidebarBranchNode* _tmp18_ = NULL;
#line 74 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (self));
#line 74 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (child));
#line 75 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->children;
#line 75 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp0_ != NULL, "children != null");
#line 77 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = gee_tree_set_new (SIDEBAR_BRANCH_TYPE_NODE, (GBoxedCopyFunc) sidebar_branch_node_ref, sidebar_branch_node_unref, _sidebar_branch_node_comparator_wrapper_gcompare_data_func, NULL, NULL);
#line 77 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
new_children = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 81 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
found = FALSE;
#line 1903 "Branch.c"
{
GeeIterator* _c_it = NULL;
GeeSortedSet* _tmp2_ = NULL;
GeeIterator* _tmp3_ = NULL;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = self->children;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_c_it = _tmp3_;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 1916 "Branch.c"
GeeIterator* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
SidebarBranchNode* c = NULL;
GeeIterator* _tmp6_ = NULL;
gpointer _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = _c_it;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_iterator_next (_tmp4_);
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp5_) {
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 1932 "Branch.c"
}
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = _c_it;
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = gee_iterator_get (_tmp6_);
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
c = (SidebarBranchNode*) _tmp7_;
#line 83 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = c;
#line 83 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = child;
#line 83 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp8_ != _tmp9_) {
#line 1946 "Branch.c"
GeeSortedSet* _tmp10_ = NULL;
SidebarBranchNode* _tmp11_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = new_children;
#line 84 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = c;
#line 84 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), _tmp11_);
#line 1955 "Branch.c"
} else {
#line 86 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
found = TRUE;
#line 1959 "Branch.c"
}
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (c);
#line 1963 "Branch.c"
}
#line 82 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_c_it);
#line 1967 "Branch.c"
}
#line 89 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = found;
#line 89 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp12_, "found");
#line 91 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = new_children;
#line 91 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection));
#line 91 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = _tmp14_;
#line 91 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp15_ != 0) {
#line 1981 "Branch.c"
GeeSortedSet* _tmp16_ = NULL;
GeeSortedSet* _tmp17_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = new_children;
#line 92 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = _g_object_ref0 (_tmp16_);
#line 92 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 92 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = _tmp17_;
#line 1992 "Branch.c"
} else {
#line 94 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 94 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = NULL;
#line 1998 "Branch.c"
}
#line 96 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = child;
#line 96 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_->parent = NULL;
#line 74 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (new_children);
#line 2006 "Branch.c"
}
static void sidebar_branch_node_prune_children (SidebarBranchNode* self, SidebarBranchNodePruneCallback cb, void* cb_target) {
GeeSortedSet* _tmp0_ = NULL;
GeeSortedSet* old_children = NULL;
GeeSortedSet* _tmp9_ = NULL;
GeeSortedSet* _tmp10_ = NULL;
#line 99 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (self));
#line 100 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->children;
#line 100 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == NULL) {
#line 101 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return;
#line 2023 "Branch.c"
}
{
GeeIterator* _child_it = NULL;
GeeSortedSet* _tmp1_ = NULL;
GeeIterator* _tmp2_ = NULL;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->children;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp2_;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 2037 "Branch.c"
GeeIterator* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp5_ = NULL;
gpointer _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNodePruneCallback _tmp8_ = NULL;
void* _tmp8__target = NULL;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = _child_it;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = gee_iterator_next (_tmp3_);
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp4_) {
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 2054 "Branch.c"
}
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _child_it;
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = gee_iterator_get (_tmp5_);
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp6_;
#line 104 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = child;
#line 104 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = cb;
#line 104 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8__target = cb_target;
#line 104 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_prune_children (_tmp7_, _tmp8_, _tmp8__target);
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 2072 "Branch.c"
}
#line 103 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 2076 "Branch.c"
}
#line 106 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = self->children;
#line 106 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = _g_object_ref0 (_tmp9_);
#line 106 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
old_children = _tmp10_;
#line 107 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 107 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = NULL;
#line 2088 "Branch.c"
{
GeeIterator* _child_it = NULL;
GeeSortedSet* _tmp11_ = NULL;
GeeIterator* _tmp12_ = NULL;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = old_children;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ITERABLE, GeeIterable));
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp12_;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 2101 "Branch.c"
GeeIterator* _tmp13_ = NULL;
gboolean _tmp14_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp15_ = NULL;
gpointer _tmp16_ = NULL;
SidebarBranchNodePruneCallback _tmp17_ = NULL;
void* _tmp17__target = NULL;
SidebarBranchNode* _tmp18_ = NULL;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = _child_it;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = gee_iterator_next (_tmp13_);
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp14_) {
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 2118 "Branch.c"
}
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = _child_it;
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp16_ = gee_iterator_get (_tmp15_);
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp16_;
#line 113 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ = cb;
#line 113 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17__target = cb_target;
#line 113 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp18_ = child;
#line 113 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp17_ (_tmp18_, _tmp17__target);
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 2136 "Branch.c"
}
#line 112 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 2140 "Branch.c"
}
#line 99 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (old_children);
#line 2144 "Branch.c"
}
static gint sidebar_branch_node_index_of_by_reference (SidebarBranchNode* self, SidebarBranchNode* child) {
gint result = 0;
GeeSortedSet* _tmp0_ = NULL;
gint index = 0;
#line 118 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (self), 0);
#line 118 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (child), 0);
#line 119 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->children;
#line 119 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == NULL) {
#line 120 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = -1;
#line 120 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 2164 "Branch.c"
}
#line 122 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
index = 0;
#line 2168 "Branch.c"
{
GeeIterator* _c_it = NULL;
GeeSortedSet* _tmp1_ = NULL;
GeeIterator* _tmp2_ = NULL;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = self->children;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_c_it = _tmp2_;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 2181 "Branch.c"
GeeIterator* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
SidebarBranchNode* c = NULL;
GeeIterator* _tmp5_ = NULL;
gpointer _tmp6_ = NULL;
SidebarBranchNode* _tmp7_ = NULL;
SidebarBranchNode* _tmp8_ = NULL;
gint _tmp9_ = 0;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = _c_it;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = gee_iterator_next (_tmp3_);
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp4_) {
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 2198 "Branch.c"
}
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _c_it;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = gee_iterator_get (_tmp5_);
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
c = (SidebarBranchNode*) _tmp6_;
#line 124 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = child;
#line 124 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = c;
#line 124 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp7_ == _tmp8_) {
#line 125 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = index;
#line 125 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (c);
#line 125 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_c_it);
#line 125 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 2220 "Branch.c"
}
#line 127 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = index;
#line 127 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
index = _tmp9_ + 1;
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (c);
#line 2228 "Branch.c"
}
#line 123 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_c_it);
#line 2232 "Branch.c"
}
#line 130 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = -1;
#line 130 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 2238 "Branch.c"
}
static gboolean sidebar_branch_node_reorder_child (SidebarBranchNode* self, SidebarBranchNode* child) {
gboolean result = FALSE;
GeeSortedSet* _tmp0_ = NULL;
gint old_index = 0;
SidebarBranchNode* _tmp1_ = NULL;
gint _tmp2_ = 0;
GeeSortedSet* new_children = NULL;
GeeTreeSet* _tmp3_ = NULL;
gboolean added = FALSE;
GeeSortedSet* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
GeeSortedSet* _tmp6_ = NULL;
gint new_index = 0;
SidebarBranchNode* _tmp7_ = NULL;
gint _tmp8_ = 0;
#line 134 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (self), FALSE);
#line 134 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (SIDEBAR_BRANCH_IS_NODE (child), FALSE);
#line 135 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->children;
#line 135 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (_tmp0_ != NULL, "children != null");
#line 137 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = child;
#line 137 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = sidebar_branch_node_index_of_by_reference (self, _tmp1_);
#line 137 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
old_index = _tmp2_;
#line 138 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (old_index >= 0, "old_index >= 0");
#line 146 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = gee_tree_set_new (SIDEBAR_BRANCH_TYPE_NODE, (GBoxedCopyFunc) sidebar_branch_node_ref, sidebar_branch_node_unref, _sidebar_branch_node_comparator_wrapper_gcompare_data_func, NULL, NULL);
#line 146 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
new_children = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 147 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = self->children;
#line 147 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (new_children, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 147 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
added = _tmp5_;
#line 148 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (added, "added");
#line 150 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = _g_object_ref0 (new_children);
#line 150 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 150 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = _tmp6_;
#line 152 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = child;
#line 152 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = sidebar_branch_node_index_of_by_reference (self, _tmp7_);
#line 152 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
new_index = _tmp8_;
#line 153 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_vala_assert (new_index >= 0, "new_index >= 0");
#line 155 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
result = old_index != new_index;
#line 155 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (new_children);
#line 155 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return result;
#line 2305 "Branch.c"
}
static void sidebar_branch_node_reorder_children (SidebarBranchNode* self, gboolean recursive, SidebarBranchNodeChildrenReorderedCallback cb, void* cb_target) {
GeeSortedSet* _tmp0_ = NULL;
GeeSortedSet* reordered = NULL;
GeeTreeSet* _tmp1_ = NULL;
GeeSortedSet* _tmp2_ = NULL;
GeeSortedSet* _tmp3_ = NULL;
GeeSortedSet* _tmp4_ = NULL;
GeeSortedSet* _tmp5_ = NULL;
gboolean _tmp6_ = FALSE;
SidebarBranchNodeChildrenReorderedCallback _tmp15_ = NULL;
void* _tmp15__target = NULL;
#line 158 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (self));
#line 159 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = self->children;
#line 159 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp0_ == NULL) {
#line 160 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return;
#line 2328 "Branch.c"
}
#line 162 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = gee_tree_set_new (SIDEBAR_BRANCH_TYPE_NODE, (GBoxedCopyFunc) sidebar_branch_node_ref, sidebar_branch_node_unref, _sidebar_branch_node_comparator_wrapper_gcompare_data_func, NULL, NULL);
#line 162 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
reordered = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 163 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = reordered;
#line 163 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->children;
#line 163 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 164 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = reordered;
#line 164 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _g_object_ref0 (_tmp4_);
#line 164 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 164 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = _tmp5_;
#line 166 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = recursive;
#line 166 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp6_) {
#line 2352 "Branch.c"
{
GeeIterator* _child_it = NULL;
GeeSortedSet* _tmp7_ = NULL;
GeeIterator* _tmp8_ = NULL;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = self->children;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable));
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp8_;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 2365 "Branch.c"
GeeIterator* _tmp9_ = NULL;
gboolean _tmp10_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp11_ = NULL;
gpointer _tmp12_ = NULL;
SidebarBranchNode* _tmp13_ = NULL;
SidebarBranchNodeChildrenReorderedCallback _tmp14_ = NULL;
void* _tmp14__target = NULL;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = _child_it;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = gee_iterator_next (_tmp9_);
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp10_) {
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 2382 "Branch.c"
}
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = _child_it;
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp12_ = gee_iterator_get (_tmp11_);
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp12_;
#line 168 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp13_ = child;
#line 168 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14_ = cb;
#line 168 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp14__target = cb_target;
#line 168 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_reorder_children (_tmp13_, TRUE, _tmp14_, _tmp14__target);
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 2400 "Branch.c"
}
#line 167 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 2404 "Branch.c"
}
}
#line 171 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ = cb;
#line 171 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15__target = cb_target;
#line 171 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp15_ (self, _tmp15__target);
#line 158 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (reordered);
#line 2415 "Branch.c"
}
static void sidebar_branch_node_change_comparator (SidebarBranchNode* self, GCompareFunc comparator, gboolean recursive, SidebarBranchNodeChildrenReorderedCallback cb, void* cb_target) {
GCompareFunc _tmp0_ = NULL;
SidebarBranchNodeChildrenReorderedCallback _tmp1_ = NULL;
void* _tmp1__target = NULL;
gboolean _tmp2_ = FALSE;
#line 174 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (SIDEBAR_BRANCH_IS_NODE (self));
#line 176 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = comparator;
#line 176 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->comparator = _tmp0_;
#line 179 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1_ = cb;
#line 179 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp1__target = cb_target;
#line 179 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_reorder_children (self, FALSE, _tmp1_, _tmp1__target);
#line 181 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp2_ = recursive;
#line 181 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (_tmp2_) {
#line 2440 "Branch.c"
{
GeeIterator* _child_it = NULL;
GeeSortedSet* _tmp3_ = NULL;
GeeIterator* _tmp4_ = NULL;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp3_ = self->children;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_child_it = _tmp4_;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
while (TRUE) {
#line 2453 "Branch.c"
GeeIterator* _tmp5_ = NULL;
gboolean _tmp6_ = FALSE;
SidebarBranchNode* child = NULL;
GeeIterator* _tmp7_ = NULL;
gpointer _tmp8_ = NULL;
SidebarBranchNode* _tmp9_ = NULL;
GCompareFunc _tmp10_ = NULL;
SidebarBranchNodeChildrenReorderedCallback _tmp11_ = NULL;
void* _tmp11__target = NULL;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp5_ = _child_it;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp6_ = gee_iterator_next (_tmp5_);
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!_tmp6_) {
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
break;
#line 2471 "Branch.c"
}
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp7_ = _child_it;
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp8_ = gee_iterator_get (_tmp7_);
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
child = (SidebarBranchNode*) _tmp8_;
#line 183 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp9_ = child;
#line 183 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp10_ = comparator;
#line 183 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11_ = cb;
#line 183 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp11__target = cb_target;
#line 183 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_change_comparator (_tmp9_, _tmp10_, TRUE, _tmp11_, _tmp11__target);
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (child);
#line 2491 "Branch.c"
}
#line 182 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (_child_it);
#line 2495 "Branch.c"
}
}
}
static void sidebar_branch_value_node_init (GValue* value) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = NULL;
#line 2504 "Branch.c"
}
static void sidebar_branch_value_node_free_value (GValue* value) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (value->data[0].v_pointer) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_unref (value->data[0].v_pointer);
#line 2513 "Branch.c"
}
}
static void sidebar_branch_value_node_copy_value (const GValue* src_value, GValue* dest_value) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (src_value->data[0].v_pointer) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
dest_value->data[0].v_pointer = sidebar_branch_node_ref (src_value->data[0].v_pointer);
#line 2523 "Branch.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
dest_value->data[0].v_pointer = NULL;
#line 2527 "Branch.c"
}
}
static gpointer sidebar_branch_value_node_peek_pointer (const GValue* value) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return value->data[0].v_pointer;
#line 2535 "Branch.c"
}
static gchar* sidebar_branch_value_node_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (collect_values[0].v_pointer) {
#line 2542 "Branch.c"
SidebarBranchNode* object;
object = collect_values[0].v_pointer;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (object->parent_instance.g_class == NULL) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2549 "Branch.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2553 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = sidebar_branch_node_ref (object);
#line 2557 "Branch.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = NULL;
#line 2561 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return NULL;
#line 2565 "Branch.c"
}
static gchar* sidebar_branch_value_node_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
SidebarBranchNode** object_p;
object_p = collect_values[0].v_pointer;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!object_p) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 2576 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (!value->data[0].v_pointer) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
*object_p = NULL;
#line 2582 "Branch.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
*object_p = value->data[0].v_pointer;
#line 2586 "Branch.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
*object_p = sidebar_branch_node_ref (value->data[0].v_pointer);
#line 2590 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return NULL;
#line 2594 "Branch.c"
}
static GParamSpec* sidebar_branch_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
SidebarBranchParamSpecNode* spec;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (g_type_is_a (object_type, SIDEBAR_BRANCH_TYPE_NODE), NULL);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return G_PARAM_SPEC (spec);
#line 2608 "Branch.c"
}
static gpointer sidebar_branch_value_get_node (const GValue* value) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SIDEBAR_BRANCH_TYPE_NODE), NULL);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return value->data[0].v_pointer;
#line 2617 "Branch.c"
}
static void sidebar_branch_value_set_node (GValue* value, gpointer v_object) {
SidebarBranchNode* old;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SIDEBAR_BRANCH_TYPE_NODE));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
old = value->data[0].v_pointer;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (v_object) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SIDEBAR_BRANCH_TYPE_NODE));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = v_object;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_ref (value->data[0].v_pointer);
#line 2637 "Branch.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = NULL;
#line 2641 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (old) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_unref (old);
#line 2647 "Branch.c"
}
}
static void sidebar_branch_value_take_node (GValue* value, gpointer v_object) {
SidebarBranchNode* old;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SIDEBAR_BRANCH_TYPE_NODE));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
old = value->data[0].v_pointer;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (v_object) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SIDEBAR_BRANCH_TYPE_NODE));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = v_object;
#line 2666 "Branch.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
value->data[0].v_pointer = NULL;
#line 2670 "Branch.c"
}
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (old) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_unref (old);
#line 2676 "Branch.c"
}
}
static void sidebar_branch_node_class_init (SidebarBranchNodeClass * klass) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_node_parent_class = g_type_class_peek_parent (klass);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
((SidebarBranchNodeClass *) klass)->finalize = sidebar_branch_node_finalize;
#line 2686 "Branch.c"
}
static void sidebar_branch_node_instance_init (SidebarBranchNode * self) {
#line 43 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->children = NULL;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->ref_count = 1;
#line 2695 "Branch.c"
}
static void sidebar_branch_node_finalize (SidebarBranchNode* obj) {
SidebarBranchNode * self;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, SIDEBAR_BRANCH_TYPE_NODE, SidebarBranchNode);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_handlers_destroy (self);
#line 40 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->entry);
#line 43 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->children);
#line 2709 "Branch.c"
}
static GType sidebar_branch_node_get_type (void) {
static volatile gsize sidebar_branch_node_type_id__volatile = 0;
if (g_once_init_enter (&sidebar_branch_node_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { sidebar_branch_value_node_init, sidebar_branch_value_node_free_value, sidebar_branch_value_node_copy_value, sidebar_branch_value_node_peek_pointer, "p", sidebar_branch_value_node_collect_value, "p", sidebar_branch_value_node_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (SidebarBranchNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sidebar_branch_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SidebarBranchNode), 0, (GInstanceInitFunc) sidebar_branch_node_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType sidebar_branch_node_type_id;
sidebar_branch_node_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SidebarBranchNode", &g_define_type_info, &g_define_type_fundamental_info, 0);
g_once_init_leave (&sidebar_branch_node_type_id__volatile, sidebar_branch_node_type_id);
}
return sidebar_branch_node_type_id__volatile;
}
static gpointer sidebar_branch_node_ref (gpointer instance) {
SidebarBranchNode* self;
self = instance;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_atomic_int_inc (&self->ref_count);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
return instance;
#line 2734 "Branch.c"
}
static void sidebar_branch_node_unref (gpointer instance) {
SidebarBranchNode* self;
self = instance;
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
SIDEBAR_BRANCH_NODE_GET_CLASS (self)->finalize (self);
#line 35 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_type_free_instance ((GTypeInstance *) self);
#line 2747 "Branch.c"
}
}
static void sidebar_branch_class_init (SidebarBranchClass * klass) {
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
sidebar_branch_parent_class = g_type_class_peek_parent (klass);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_type_class_add_private (klass, sizeof (SidebarBranchPrivate));
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
G_OBJECT_CLASS (klass)->finalize = sidebar_branch_finalize;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("entry_added", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SIDEBAR_TYPE_ENTRY);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("entry_removed", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SIDEBAR_TYPE_ENTRY);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("entry_moved", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SIDEBAR_TYPE_ENTRY);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("entry_reparented", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, SIDEBAR_TYPE_ENTRY, SIDEBAR_TYPE_ENTRY);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("children_reordered", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, SIDEBAR_TYPE_ENTRY);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
g_signal_new ("show_branch", SIDEBAR_TYPE_BRANCH, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
#line 2771 "Branch.c"
}
static void sidebar_branch_instance_init (SidebarBranch * self) {
GeeHashMap* _tmp0_ = NULL;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv = SIDEBAR_BRANCH_GET_PRIVATE (self);
#line 190 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->shown = TRUE;
#line 192 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_tmp0_ = gee_hash_map_new (SIDEBAR_TYPE_ENTRY, (GBoxedCopyFunc) g_object_ref, g_object_unref, SIDEBAR_BRANCH_TYPE_NODE, (GBoxedCopyFunc) sidebar_branch_node_ref, sidebar_branch_node_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 192 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self->priv->map = _tmp0_;
#line 2785 "Branch.c"
}
static void sidebar_branch_finalize (GObject* obj) {
SidebarBranch * self;
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, SIDEBAR_TYPE_BRANCH, SidebarBranch);
#line 188 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_sidebar_branch_node_unref0 (self->priv->root);
#line 192 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
_g_object_unref0 (self->priv->map);
#line 9 "/home/jens/Source/shotwell/src/sidebar/Branch.vala"
G_OBJECT_CLASS (sidebar_branch_parent_class)->finalize (obj);
#line 2799 "Branch.c"
}
GType sidebar_branch_get_type (void) {
static volatile gsize sidebar_branch_type_id__volatile = 0;
if (g_once_init_enter (&sidebar_branch_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SidebarBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sidebar_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SidebarBranch), 0, (GInstanceInitFunc) sidebar_branch_instance_init, NULL };
GType sidebar_branch_type_id;
sidebar_branch_type_id = g_type_register_static (G_TYPE_OBJECT, "SidebarBranch", &g_define_type_info, 0);
g_once_init_leave (&sidebar_branch_type_id__volatile, sidebar_branch_type_id);
}
return sidebar_branch_type_id__volatile;
}
|