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
|
/* Thumbnail.c generated by valac 0.40.4, the Vala compiler
* generated from Thumbnail.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU LGPL (version 2.1 or later).
* See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gio/gio.h>
#include <gee.h>
#include <pango/pango.h>
#include <time.h>
#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))
typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;
typedef struct _DataObjectPrivate DataObjectPrivate;
#define TYPE_ALTERATION (alteration_get_type ())
#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))
typedef struct _Alteration Alteration;
typedef struct _AlterationClass AlterationClass;
#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))
typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;
#define TYPE_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))
typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;
typedef struct _DataViewPrivate DataViewPrivate;
#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))
typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;
#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ())
#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView))
#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW))
#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW))
#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass))
typedef struct _ThumbnailView ThumbnailView;
typedef struct _ThumbnailViewClass ThumbnailViewClass;
typedef struct _ThumbnailViewPrivate ThumbnailViewPrivate;
#define TYPE_CHECKERBOARD_ITEM (checkerboard_item_get_type ())
#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem))
#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))
#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM))
#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM))
#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))
typedef struct _CheckerboardItem CheckerboardItem;
typedef struct _CheckerboardItemClass CheckerboardItemClass;
typedef struct _CheckerboardItemPrivate CheckerboardItemPrivate;
#define TYPE_DIMENSIONS (dimensions_get_type ())
typedef struct _Dimensions Dimensions;
#define TYPE_MEDIA_SOURCE_ITEM (media_source_item_get_type ())
#define MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem))
#define MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))
#define IS_MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_ITEM))
#define IS_MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_ITEM))
#define MEDIA_SOURCE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))
typedef struct _MediaSourceItem MediaSourceItem;
typedef struct _MediaSourceItemClass MediaSourceItemClass;
typedef struct _MediaSourceItemPrivate MediaSourceItemPrivate;
#define TYPE_THUMBNAIL (thumbnail_get_type ())
#define THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL, Thumbnail))
#define THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL, ThumbnailClass))
#define IS_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL))
#define IS_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL))
#define THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL, ThumbnailClass))
typedef struct _Thumbnail Thumbnail;
typedef struct _ThumbnailClass ThumbnailClass;
typedef struct _ThumbnailPrivate ThumbnailPrivate;
#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;
#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))
typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;
enum {
THUMBNAIL_0_PROPERTY,
THUMBNAIL_NUM_PROPERTIES
};
static GParamSpec* thumbnail_properties[THUMBNAIL_NUM_PROPERTIES];
#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;
#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;
#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;
#define TYPE_TAG_SOURCE_COLLECTION (tag_source_collection_get_type ())
#define TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollection))
#define TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))
#define IS_TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_SOURCE_COLLECTION))
#define IS_TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_SOURCE_COLLECTION))
#define TAG_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))
typedef struct _TagSourceCollection TagSourceCollection;
typedef struct _TagSourceCollectionClass TagSourceCollectionClass;
#define TYPE_CONTAINER_SOURCE (container_source_get_type ())
#define CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE, ContainerSource))
#define IS_CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE))
#define CONTAINER_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CONTAINER_SOURCE, ContainerSourceIface))
typedef struct _ContainerSource ContainerSource;
typedef struct _ContainerSourceIface ContainerSourceIface;
#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ())
#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink))
#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))
#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK))
#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK))
#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))
typedef struct _SourceBacklink SourceBacklink;
typedef struct _SourceBacklinkClass SourceBacklinkClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))
typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;
#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))
typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;
#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;
#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))
typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;
#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))
typedef struct _Video Video;
typedef struct _VideoClass VideoClass;
#define TYPE_TAG (tag_get_type ())
#define TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG, Tag))
#define TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG, TagClass))
#define IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG))
#define IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG))
#define TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG, TagClass))
typedef struct _Tag Tag;
typedef struct _TagClass TagClass;
#define TYPE_RATING (rating_get_type ())
#define THUMBNAIL_CACHE_TYPE_SIZE (thumbnail_cache_size_get_type ())
#define TYPE_FLAGGABLE (flaggable_get_type ())
#define FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAGGABLE, Flaggable))
#define IS_FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAGGABLE))
#define FLAGGABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FLAGGABLE, FlaggableIface))
typedef struct _Flaggable Flaggable;
typedef struct _FlaggableIface FlaggableIface;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _DataObject {
GObject parent_instance;
DataObjectPrivate * priv;
};
struct _DataObjectClass {
GObjectClass parent_class;
void (*notify_altered) (DataObject* self, Alteration* alteration);
void (*notify_membership_changed) (DataObject* self, DataCollection* collection);
void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val);
void (*notify_collection_property_cleared) (DataObject* self, const gchar* name);
gchar* (*get_name) (DataObject* self);
gchar* (*to_string) (DataObject* self);
};
struct _DataView {
DataObject parent_instance;
DataViewPrivate * priv;
};
struct _DataViewClass {
DataObjectClass parent_class;
void (*notify_view_altered) (DataView* self);
void (*notify_geometry_altered) (DataView* self);
void (*notify_unsubscribed) (DataView* self, DataSource* source);
void (*state_changed) (DataView* self, gboolean selected);
void (*visibility_changed) (DataView* self, gboolean visible);
void (*view_altered) (DataView* self);
void (*geometry_altered) (DataView* self);
void (*unsubscribed) (DataView* self, DataSource* source);
};
struct _ThumbnailView {
DataView parent_instance;
ThumbnailViewPrivate * priv;
};
struct _ThumbnailViewClass {
DataViewClass parent_class;
void (*notify_thumbnail_altered) (ThumbnailView* self);
void (*thumbnail_altered) (ThumbnailView* self);
};
struct _Dimensions {
gint width;
gint height;
};
struct _CheckerboardItem {
ThumbnailView parent_instance;
CheckerboardItemPrivate * priv;
Dimensions requisition;
GdkRectangle allocation;
};
struct _CheckerboardItemClass {
ThumbnailViewClass parent_class;
void (*exposed) (CheckerboardItem* self);
void (*unexposed) (CheckerboardItem* self);
gboolean (*is_exposed) (CheckerboardItem* self);
void (*paint_shadow) (CheckerboardItem* self, cairo_t* ctx, Dimensions* dimensions, GdkPoint* origin, gint radius, gfloat initial_alpha);
void (*paint_border) (CheckerboardItem* self, cairo_t* ctx, Dimensions* object_dimensions, GdkPoint* object_origin, gint border_width);
void (*paint_image) (CheckerboardItem* self, cairo_t* ctx, GdkPixbuf* pixbuf, GdkPoint* origin);
GdkPixbuf* (*get_top_left_trinket) (CheckerboardItem* self, gint scale);
GdkPixbuf* (*get_top_right_trinket) (CheckerboardItem* self, gint scale);
GdkPixbuf* (*get_bottom_left_trinket) (CheckerboardItem* self, gint scale);
GdkPixbuf* (*get_bottom_right_trinket) (CheckerboardItem* self, gint scale);
};
struct _MediaSourceItem {
CheckerboardItem parent_instance;
MediaSourceItemPrivate * priv;
};
struct _MediaSourceItemClass {
CheckerboardItemClass parent_class;
};
struct _Thumbnail {
MediaSourceItem parent_instance;
ThumbnailPrivate * priv;
};
struct _ThumbnailClass {
MediaSourceItemClass parent_class;
};
struct _ThumbnailPrivate {
MediaSource* media;
gint scale;
Dimensions original_dim;
Dimensions dim;
GdkPixbuf* unscaled_pixbuf;
GCancellable* cancellable;
gboolean hq_scheduled;
gboolean hq_reschedule;
gboolean exposure;
};
struct _ContainerSourceIface {
GTypeInterface parent_iface;
gboolean (*has_links) (ContainerSource* self);
SourceBacklink* (*get_backlink) (ContainerSource* self);
void (*break_link) (ContainerSource* self, DataSource* source);
void (*break_link_many) (ContainerSource* self, GeeCollection* sources);
void (*establish_link) (ContainerSource* self, DataSource* source);
void (*establish_link_many) (ContainerSource* self, GeeCollection* sources);
};
typedef enum {
PHOTO_EXCEPTION_NONE = 0,
PHOTO_EXCEPTION_ORIENTATION = 1 << 0,
PHOTO_EXCEPTION_CROP = 1 << 1,
PHOTO_EXCEPTION_REDEYE = 1 << 2,
PHOTO_EXCEPTION_ADJUST = 1 << 3,
PHOTO_EXCEPTION_STRAIGHTEN = 1 << 4,
PHOTO_EXCEPTION_ALL = 0xFFFFFFFFLL
} PhotoException;
typedef enum {
RATING_REJECTED = -1,
RATING_UNRATED = 0,
RATING_ONE = 1,
RATING_TWO = 2,
RATING_THREE = 3,
RATING_FOUR = 4,
RATING_FIVE = 5
} Rating;
typedef void (*ThumbnailCacheAsyncFetchCallback) (GdkPixbuf* pixbuf, GdkPixbuf* unscaled, Dimensions* dim, GdkInterpType interp, GError* err, void* user_data);
typedef enum {
THUMBNAIL_CACHE_SIZE_LARGEST = 360,
THUMBNAIL_CACHE_SIZE_BIG = 360,
THUMBNAIL_CACHE_SIZE_MEDIUM = 128,
THUMBNAIL_CACHE_SIZE_SMALLEST = 128
} ThumbnailCacheSize;
struct _FlaggableIface {
GTypeInterface parent_iface;
gboolean (*is_flagged) (Flaggable* self);
void (*mark_flagged) (Flaggable* self);
void (*mark_unflagged) (Flaggable* self);
};
static gpointer thumbnail_parent_class = NULL;
extern TagSourceCollection* tag_global;
GType data_object_get_type (void) G_GNUC_CONST;
gpointer alteration_ref (gpointer instance);
void alteration_unref (gpointer instance);
GParamSpec* param_spec_alteration (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_alteration (GValue* value,
gpointer v_object);
void value_take_alteration (GValue* value,
gpointer v_object);
gpointer value_get_alteration (const GValue* value);
GType alteration_get_type (void) G_GNUC_CONST;
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_data_collection (GValue* value,
gpointer v_object);
void value_take_data_collection (GValue* value,
gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType data_view_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_view_get_type (void) G_GNUC_CONST;
GType checkerboard_item_get_type (void) G_GNUC_CONST;
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
GType media_source_item_get_type (void) G_GNUC_CONST;
GType thumbnail_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
#define THUMBNAIL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_THUMBNAIL, ThumbnailPrivate))
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType tag_source_collection_get_type (void) G_GNUC_CONST;
gpointer source_backlink_ref (gpointer instance);
void source_backlink_unref (gpointer instance);
GParamSpec* param_spec_source_backlink (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_source_backlink (GValue* value,
gpointer v_object);
void value_take_source_backlink (GValue* value,
gpointer v_object);
gpointer value_get_source_backlink (const GValue* value);
GType source_backlink_get_type (void) G_GNUC_CONST;
GType container_source_get_type (void) G_GNUC_CONST;
static void thumbnail_on_tag_contents_altered (Thumbnail* self,
ContainerSource* container,
GeeCollection* added,
gboolean relinking,
GeeCollection* removed,
gboolean unlinking);
static void _thumbnail_on_tag_contents_altered_container_source_collection_container_contents_altered (ContainerSourceCollection* _sender,
ContainerSource* container,
GeeCollection* added,
gboolean relinked,
GeeCollection* removed,
gboolean unlinked,
gpointer self);
static void thumbnail_on_tags_altered (Thumbnail* self,
GeeMap* altered);
static void _thumbnail_on_tags_altered_data_collection_items_altered (DataCollection* _sender,
GeeMap* items,
gpointer self);
#define CHECKERBOARD_ITEM_PROP_SHOW_SUBTITLES "show-subtitles"
#define THUMBNAIL_PROP_SHOW_TAGS CHECKERBOARD_ITEM_PROP_SHOW_SUBTITLES
#define THUMBNAIL_PROP_SIZE "thumbnail-size"
#define THUMBNAIL_PROP_SHOW_RATINGS "show-ratings"
#define THUMBNAIL_LOW_QUALITY_INTERP GDK_INTERP_NEAREST
#define THUMBNAIL_HIGH_QUALITY_INTERP GDK_INTERP_BILINEAR
#define THUMBNAIL_HQ_IMPROVEMENT_MSEC 100
Thumbnail* thumbnail_new (MediaSource* media,
gint scale);
Thumbnail* thumbnail_construct (GType object_type,
MediaSource* media,
gint scale);
GType photo_exception_get_type (void) G_GNUC_CONST;
void media_source_get_dimensions (MediaSource* self,
PhotoException disallowed_steps,
Dimensions* result);
void dimensions_get_scaled (Dimensions *self,
gint scale,
gboolean scale_up,
Dimensions* result);
gchar* data_object_get_name (DataObject* self);
gchar* media_source_get_comment (MediaSource* self);
MediaSourceItem* media_source_item_new (ThumbnailSource* source,
Dimensions* initial_pixbuf_dim,
const gchar* title,
const gchar* comment,
gboolean marked_up,
PangoAlignment alignment);
MediaSourceItem* media_source_item_construct (GType object_type,
ThumbnailSource* source,
Dimensions* initial_pixbuf_dim,
const gchar* title,
const gchar* comment,
gboolean marked_up,
PangoAlignment alignment);
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
GType video_source_get_type (void) G_GNUC_CONST;
GType video_get_type (void) G_GNUC_CONST;
void media_source_item_set_enable_sprockets (MediaSourceItem* self,
gboolean enable_sprockets);
static void thumbnail_update_title (Thumbnail* self,
gboolean init);
static void thumbnail_update_comment (Thumbnail* self,
gboolean init);
static void thumbnail_update_tags (Thumbnail* self,
gboolean init);
GType tag_get_type (void) G_GNUC_CONST;
GeeSortedSet* tag_source_collection_fetch_sorted_for_source (TagSourceCollection* self,
MediaSource* photo);
void checkerboard_item_clear_tags (CheckerboardItem* self);
void checkerboard_item_set_tags (CheckerboardItem* self,
GeeCollection* tags,
PangoAlignment alignment);
gboolean tag_contains (Tag* self,
MediaSource* source);
gboolean is_string_empty (const gchar* s);
void checkerboard_item_clear_title (CheckerboardItem* self);
void media_source_item_set_title (MediaSourceItem* self,
const gchar* text,
gboolean marked_up,
PangoAlignment alignment);
void checkerboard_item_clear_comment (CheckerboardItem* self);
void checkerboard_item_set_comment (CheckerboardItem* self,
const gchar* text,
gboolean marked_up,
PangoAlignment alignment);
static void thumbnail_real_notify_altered (DataObject* base,
Alteration* alteration);
gboolean alteration_has_detail (Alteration* self,
const gchar* subject,
const gchar* detail);
void data_object_notify_altered (DataObject* self,
Alteration* alteration);
MediaSource* thumbnail_get_media_source (Thumbnail* self);
gint64 thumbnail_photo_id_ascending_comparator (void* a,
void* b);
gint64 data_source_get_instance_id (DataSource* self);
gint64 thumbnail_photo_id_descending_comparator (void* a,
void* b);
gint64 thumbnail_title_ascending_comparator (void* a,
void* b);
gchar* media_source_item_get_natural_collation_key (MediaSourceItem* self);
gint64 thumbnail_title_descending_comparator (void* a,
void* b);
gboolean thumbnail_title_comparator_predicate (DataObject* object,
Alteration* alteration);
gint64 thumbnail_exposure_time_ascending_comparator (void* a,
void* b);
time_t media_source_get_exposure_time (MediaSource* self);
gint64 thumbnail_filename_ascending_comparator (void* a,
void* b);
gint64 thumbnail_exposure_time_desending_comparator (void* a,
void* b);
gint64 thumbnail_filename_descending_comparator (void* a,
void* b);
gboolean thumbnail_exposure_time_comparator_predicate (DataObject* object,
Alteration* alteration);
gboolean thumbnail_filename_comparator_predicate (DataObject* object,
Alteration* alteration);
GFile* media_source_get_file (MediaSource* self);
gint64 thumbnail_rating_ascending_comparator (void* a,
void* b);
GType rating_get_type (void) G_GNUC_CONST;
Rating media_source_get_rating (MediaSource* self);
gint64 thumbnail_rating_descending_comparator (void* a,
void* b);
gboolean thumbnail_rating_comparator_predicate (DataObject* object,
Alteration* alteration);
static void thumbnail_real_thumbnail_altered (ThumbnailView* base);
static void thumbnail_delayed_high_quality_fetch (Thumbnail* self);
static void thumbnail_paint_empty (Thumbnail* self);
static void thumbnail_real_notify_collection_property_set (DataObject* base,
const gchar* name,
GValue* old,
GValue* val);
static void thumbnail_resize (Thumbnail* self,
gint new_scale);
void data_view_notify_view_altered (DataView* self);
void data_object_notify_collection_property_set (DataObject* self,
const gchar* name,
GValue* old,
GValue* val);
gint thumbnail_get_MIN_SCALE (void);
gint thumbnail_get_MAX_SCALE (void);
static void thumbnail_cancel_async_fetch (Thumbnail* self);
gboolean checkerboard_item_has_image (CheckerboardItem* self);
GdkPixbuf* checkerboard_item_get_image (CheckerboardItem* self);
void checkerboard_item_set_image (CheckerboardItem* self,
GdkPixbuf* pixbuf);
GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf,
Dimensions* resized,
GdkInterpType interp);
void checkerboard_item_clear_image (CheckerboardItem* self,
Dimensions* dim);
static void thumbnail_schedule_low_quality_fetch (Thumbnail* self);
void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source,
gint scale,
Dimensions* dim,
GdkInterpType interp,
ThumbnailCacheAsyncFetchCallback callback,
void* callback_target,
GCancellable* cancellable);
GType thumbnail_cache_size_get_type (void) G_GNUC_CONST;
static void thumbnail_on_low_quality_fetched (Thumbnail* self,
GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err);
static void _thumbnail_on_low_quality_fetched_thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err,
gpointer self);
static gboolean thumbnail_on_schedule_high_quality (Thumbnail* self);
static gboolean _thumbnail_on_schedule_high_quality_gsource_func (gpointer self);
static void thumbnail_on_high_quality_fetched (Thumbnail* self,
GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err);
static void _thumbnail_on_high_quality_fetched_thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err,
gpointer self);
gchar* data_object_to_string (DataObject* self);
static void thumbnail_real_exposed (CheckerboardItem* base);
void checkerboard_item_exposed (CheckerboardItem* self);
static void thumbnail_real_unexposed (CheckerboardItem* base);
void checkerboard_item_unexposed (CheckerboardItem* self);
static GdkPixbuf* thumbnail_real_get_top_right_trinket (CheckerboardItem* base,
gint scale);
GType flaggable_get_type (void) G_GNUC_CONST;
gboolean flaggable_is_flagged (Flaggable* self);
GdkPixbuf* resources_get_icon (const gchar* name,
gint scale);
#define RESOURCES_ICON_FLAGGED_TRINKET "flag-trinket.png"
#define RESOURCES_DEFAULT_ICON_SCALE 24
static GdkPixbuf* thumbnail_real_get_bottom_left_trinket (CheckerboardItem* base,
gint scale);
void data_object_get_collection_property (DataObject* self,
const gchar* name,
GValue* def,
GValue* result);
static void _vala_GValue_free (GValue* self);
GdkPixbuf* resources_get_rating_trinket (Rating rating,
gint scale);
gint thumbnail_cache_size_get_scale (ThumbnailCacheSize self);
gint thumbnail_get_DEFAULT_SCALE (void);
static void thumbnail_finalize (GObject * obj);
static void _vala_thumbnail_get_property (GObject * object,
guint property_id,
GValue * value,
GParamSpec * pspec);
static void
_thumbnail_on_tag_contents_altered_container_source_collection_container_contents_altered (ContainerSourceCollection* _sender,
ContainerSource* container,
GeeCollection* added,
gboolean relinked,
GeeCollection* removed,
gboolean unlinked,
gpointer self)
{
#line 76 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_on_tag_contents_altered ((Thumbnail*) self, container, added, relinked, removed, unlinked);
#line 726 "Thumbnail.c"
}
static void
_thumbnail_on_tags_altered_data_collection_items_altered (DataCollection* _sender,
GeeMap* items,
gpointer self)
{
#line 77 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_on_tags_altered ((Thumbnail*) self, items);
#line 737 "Thumbnail.c"
}
static gpointer
_g_object_ref0 (gpointer self)
{
#line 53 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return self ? g_object_ref (self) : NULL;
#line 746 "Thumbnail.c"
}
Thumbnail*
thumbnail_construct (GType object_type,
MediaSource* media,
gint scale)
{
Thumbnail * self = NULL;
Dimensions _tmp0_ = {0};
Dimensions _tmp1_ = {0};
gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
MediaSource* _tmp6_;
TagSourceCollection* _tmp7_;
TagSourceCollection* _tmp8_;
gboolean _tmp9_ = FALSE;
Dimensions _tmp10_ = {0};
Dimensions _tmp11_ = {0};
#line 49 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_MEDIA_SOURCE (media), NULL);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
media_source_get_dimensions (media, PHOTO_EXCEPTION_NONE, &_tmp0_);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
dimensions_get_scaled (&_tmp0_, scale, TRUE, &_tmp1_);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (media, TYPE_DATA_OBJECT, DataObject));
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = _tmp2_;
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = media_source_get_comment (media);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = _tmp4_;
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = (Thumbnail*) media_source_item_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (media, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), &_tmp1_, _tmp3_, _tmp5_, FALSE, PANGO_ALIGN_LEFT);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp5_);
#line 50 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp3_);
#line 53 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = _g_object_ref0 (media);
#line 53 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->media);
#line 53 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->media = _tmp6_;
#line 54 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->scale = scale;
#line 56 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = tag_global;
#line 56 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), "container-contents-altered", (GCallback) _thumbnail_on_tag_contents_altered_container_source_collection_container_contents_altered, self, 0);
#line 57 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = tag_global;
#line 57 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _thumbnail_on_tags_altered_data_collection_items_altered, self, 0);
#line 59 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (G_TYPE_CHECK_INSTANCE_TYPE (media, TYPE_LIBRARY_PHOTO)) {
#line 59 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = TRUE;
#line 808 "Thumbnail.c"
} else {
#line 59 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = G_TYPE_CHECK_INSTANCE_TYPE (media, TYPE_VIDEO);
#line 812 "Thumbnail.c"
}
#line 59 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_vala_assert (_tmp9_, "(media is LibraryPhoto) || (media is Video)");
#line 60 "/home/jens/Source/shotwell/src/Thumbnail.vala"
media_source_item_set_enable_sprockets (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), G_TYPE_CHECK_INSTANCE_TYPE (media, TYPE_VIDEO));
#line 62 "/home/jens/Source/shotwell/src/Thumbnail.vala"
media_source_get_dimensions (media, PHOTO_EXCEPTION_NONE, &_tmp10_);
#line 62 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->original_dim = _tmp10_;
#line 63 "/home/jens/Source/shotwell/src/Thumbnail.vala"
dimensions_get_scaled (&self->priv->original_dim, scale, TRUE, &_tmp11_);
#line 63 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->dim = _tmp11_;
#line 67 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_title (self, TRUE);
#line 68 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_comment (self, TRUE);
#line 69 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_tags (self, TRUE);
#line 49 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return self;
#line 834 "Thumbnail.c"
}
Thumbnail*
thumbnail_new (MediaSource* media,
gint scale)
{
#line 49 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return thumbnail_construct (TYPE_THUMBNAIL, media, scale);
#line 844 "Thumbnail.c"
}
static void
thumbnail_update_tags (Thumbnail* self,
gboolean init)
{
GeeCollection* tags = NULL;
TagSourceCollection* _tmp0_;
MediaSource* _tmp1_;
GeeSortedSet* _tmp2_;
gboolean _tmp3_ = FALSE;
GeeCollection* _tmp4_;
#line 80 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 81 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = tag_global;
#line 81 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = self->priv->media;
#line 81 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = tag_source_collection_fetch_sorted_for_source (_tmp0_, _tmp1_);
#line 81 "/home/jens/Source/shotwell/src/Thumbnail.vala"
tags = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = tags;
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp4_ == NULL) {
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = TRUE;
#line 874 "Thumbnail.c"
} else {
GeeCollection* _tmp5_;
gint _tmp6_;
gint _tmp7_;
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = tags;
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = gee_collection_get_size (_tmp5_);
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = _tmp6_;
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = _tmp7_ == 0;
#line 887 "Thumbnail.c"
}
#line 82 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp3_) {
#line 83 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_clear_tags (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 893 "Thumbnail.c"
} else {
GeeCollection* _tmp8_;
#line 85 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = tags;
#line 85 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_set_tags (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp8_, PANGO_ALIGN_LEFT);
#line 900 "Thumbnail.c"
}
#line 80 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (tags);
#line 904 "Thumbnail.c"
}
static void
thumbnail_on_tag_contents_altered (Thumbnail* self,
ContainerSource* container,
GeeCollection* added,
gboolean relinking,
GeeCollection* removed,
gboolean unlinking)
{
gboolean _tmp0_;
gboolean _tmp1_ = FALSE;
gboolean tag_added = FALSE;
gboolean _tmp3_ = FALSE;
gboolean tag_removed = FALSE;
gboolean _tmp5_ = FALSE;
gboolean _tmp6_;
#line 88 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 88 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 88 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added));
#line 88 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed));
#line 90 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->exposure;
#line 90 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!_tmp0_) {
#line 91 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return;
#line 937 "Thumbnail.c"
}
#line 93 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (added != NULL) {
#line 941 "Thumbnail.c"
MediaSource* _tmp2_;
#line 93 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->media;
#line 93 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = gee_collection_contains (added, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource));
#line 947 "Thumbnail.c"
} else {
#line 93 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = FALSE;
#line 951 "Thumbnail.c"
}
#line 93 "/home/jens/Source/shotwell/src/Thumbnail.vala"
tag_added = _tmp1_;
#line 94 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (removed != NULL) {
#line 957 "Thumbnail.c"
MediaSource* _tmp4_;
#line 94 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = self->priv->media;
#line 94 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = gee_collection_contains (removed, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource));
#line 963 "Thumbnail.c"
} else {
#line 94 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = FALSE;
#line 967 "Thumbnail.c"
}
#line 94 "/home/jens/Source/shotwell/src/Thumbnail.vala"
tag_removed = _tmp3_;
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = tag_added;
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp6_) {
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = TRUE;
#line 977 "Thumbnail.c"
} else {
gboolean _tmp7_;
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = tag_removed;
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = _tmp7_;
#line 984 "Thumbnail.c"
}
#line 97 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp5_) {
#line 98 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_tags (self, FALSE);
#line 990 "Thumbnail.c"
}
}
static void
thumbnail_on_tags_altered (Thumbnail* self,
GeeMap* altered)
{
gboolean _tmp0_;
#line 101 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 101 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (GEE_IS_MAP (altered));
#line 102 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->exposure;
#line 102 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!_tmp0_) {
#line 103 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return;
#line 1010 "Thumbnail.c"
}
{
GeeIterator* _object_it = NULL;
GeeSet* _tmp1_;
GeeSet* _tmp2_;
GeeSet* _tmp3_;
GeeIterator* _tmp4_;
GeeIterator* _tmp5_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = gee_map_get_keys (altered);
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _tmp1_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = _tmp2_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = _tmp4_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp3_);
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_object_it = _tmp5_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
while (TRUE) {
#line 1035 "Thumbnail.c"
GeeIterator* _tmp6_;
DataObject* object = NULL;
GeeIterator* _tmp7_;
gpointer _tmp8_;
Tag* tag = NULL;
DataObject* _tmp9_;
Tag* _tmp10_;
Tag* _tmp11_;
MediaSource* _tmp12_;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = _object_it;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!gee_iterator_next (_tmp6_)) {
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
break;
#line 1051 "Thumbnail.c"
}
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = _object_it;
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = gee_iterator_get (_tmp7_);
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
object = (DataObject*) _tmp8_;
#line 106 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = object;
#line 106 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_TAG, Tag));
#line 106 "/home/jens/Source/shotwell/src/Thumbnail.vala"
tag = _tmp10_;
#line 108 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp11_ = tag;
#line 108 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp12_ = self->priv->media;
#line 108 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (tag_contains (_tmp11_, _tmp12_)) {
#line 109 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_tags (self, FALSE);
#line 111 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (tag);
#line 111 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (object);
#line 111 "/home/jens/Source/shotwell/src/Thumbnail.vala"
break;
#line 1079 "Thumbnail.c"
}
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (tag);
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (object);
#line 1085 "Thumbnail.c"
}
#line 105 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_object_it);
#line 1089 "Thumbnail.c"
}
}
static void
thumbnail_update_title (Thumbnail* self,
gboolean init)
{
gchar* title = NULL;
MediaSource* _tmp0_;
gchar* _tmp1_;
const gchar* _tmp2_;
#line 116 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 117 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 117 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 117 "/home/jens/Source/shotwell/src/Thumbnail.vala"
title = _tmp1_;
#line 118 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = title;
#line 118 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (is_string_empty (_tmp2_)) {
#line 119 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_clear_title (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 1116 "Thumbnail.c"
} else {
#line 120 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!init) {
#line 1120 "Thumbnail.c"
const gchar* _tmp3_;
#line 121 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = title;
#line 121 "/home/jens/Source/shotwell/src/Thumbnail.vala"
media_source_item_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), _tmp3_, FALSE, PANGO_ALIGN_LEFT);
#line 1126 "Thumbnail.c"
}
}
#line 116 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (title);
#line 1131 "Thumbnail.c"
}
static void
thumbnail_update_comment (Thumbnail* self,
gboolean init)
{
gchar* comment = NULL;
MediaSource* _tmp0_;
gchar* _tmp1_;
const gchar* _tmp2_;
#line 124 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 125 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 125 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = media_source_get_comment (_tmp0_);
#line 125 "/home/jens/Source/shotwell/src/Thumbnail.vala"
comment = _tmp1_;
#line 126 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = comment;
#line 126 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (is_string_empty (_tmp2_)) {
#line 127 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_clear_comment (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 1157 "Thumbnail.c"
} else {
#line 128 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!init) {
#line 1161 "Thumbnail.c"
const gchar* _tmp3_;
#line 129 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = comment;
#line 129 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_set_comment (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp3_, FALSE, PANGO_ALIGN_LEFT);
#line 1167 "Thumbnail.c"
}
}
#line 124 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (comment);
#line 1172 "Thumbnail.c"
}
static void
thumbnail_real_notify_altered (DataObject* base,
Alteration* alteration)
{
Thumbnail * self;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_;
gboolean _tmp2_ = FALSE;
gboolean _tmp3_;
#line 132 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 132 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_ALTERATION (alteration));
#line 133 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = self->priv->exposure;
#line 133 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp1_) {
#line 133 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = alteration_has_detail (alteration, "metadata", "name");
#line 1195 "Thumbnail.c"
} else {
#line 133 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = FALSE;
#line 1199 "Thumbnail.c"
}
#line 133 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp0_) {
#line 134 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_title (self, FALSE);
#line 1205 "Thumbnail.c"
}
#line 135 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = self->priv->exposure;
#line 135 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp3_) {
#line 135 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = alteration_has_detail (alteration, "metadata", "comment");
#line 1213 "Thumbnail.c"
} else {
#line 135 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = FALSE;
#line 1217 "Thumbnail.c"
}
#line 135 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp2_) {
#line 136 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_comment (self, FALSE);
#line 1223 "Thumbnail.c"
}
#line 138 "/home/jens/Source/shotwell/src/Thumbnail.vala"
DATA_OBJECT_CLASS (thumbnail_parent_class)->notify_altered (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TYPE_DATA_OBJECT, DataObject), alteration);
#line 1227 "Thumbnail.c"
}
MediaSource*
thumbnail_get_media_source (Thumbnail* self)
{
MediaSource* result = NULL;
MediaSource* _tmp0_;
MediaSource* _tmp1_;
#line 141 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_THUMBNAIL (self), NULL);
#line 142 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 142 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 142 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp1_;
#line 142 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1247 "Thumbnail.c"
}
gint64
thumbnail_photo_id_ascending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
MediaSource* _tmp0_;
MediaSource* _tmp1_;
#line 150 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) a, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 150 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) b, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 150 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource)) - data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource));
#line 150 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1266 "Thumbnail.c"
}
gint64
thumbnail_photo_id_descending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
#line 154 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = thumbnail_photo_id_ascending_comparator (b, a);
#line 154 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1279 "Thumbnail.c"
}
gint64
thumbnail_title_ascending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
GCompareFunc _tmp0_;
gchar* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gint64 _tmp5_;
gint64 _tmp6_ = 0LL;
gint64 _tmp7_;
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = g_strcmp0;
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = media_source_item_get_natural_collation_key (G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) a, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem));
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _tmp1_;
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = media_source_item_get_natural_collation_key (G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) b, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem));
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _tmp3_;
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = (gint64) _tmp0_ (_tmp2_, _tmp4_);
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp4_);
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp2_);
#line 158 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = _tmp5_;
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = _result_;
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp7_ != ((gint64) 0)) {
#line 1319 "Thumbnail.c"
gint64 _tmp8_;
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = _result_;
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = _tmp8_;
#line 1325 "Thumbnail.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = thumbnail_photo_id_ascending_comparator (a, b);
#line 1329 "Thumbnail.c"
}
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp6_;
#line 159 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1335 "Thumbnail.c"
}
gint64
thumbnail_title_descending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
gint64 _tmp0_ = 0LL;
gint64 _tmp1_;
#line 163 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = thumbnail_title_ascending_comparator (b, a);
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _result_;
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp1_ != ((gint64) 0)) {
#line 1353 "Thumbnail.c"
gint64 _tmp2_;
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _result_;
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = _tmp2_;
#line 1359 "Thumbnail.c"
} else {
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = thumbnail_photo_id_descending_comparator (a, b);
#line 1363 "Thumbnail.c"
}
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp0_;
#line 165 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1369 "Thumbnail.c"
}
gboolean
thumbnail_title_comparator_predicate (DataObject* object,
Alteration* alteration)
{
gboolean result = FALSE;
#line 168 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE);
#line 168 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_ALTERATION (alteration), FALSE);
#line 169 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = alteration_has_detail (alteration, "metadata", "title");
#line 169 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1386 "Thumbnail.c"
}
gint64
thumbnail_exposure_time_ascending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 time_a = 0LL;
MediaSource* _tmp0_;
gint64 time_b = 0LL;
MediaSource* _tmp1_;
gint64 _result_ = 0LL;
gint64 _tmp2_;
gint64 _tmp3_;
gint64 _tmp4_ = 0LL;
gint64 _tmp5_;
#line 173 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) a, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 173 "/home/jens/Source/shotwell/src/Thumbnail.vala"
time_a = (gint64) media_source_get_exposure_time (_tmp0_);
#line 174 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) b, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 174 "/home/jens/Source/shotwell/src/Thumbnail.vala"
time_b = (gint64) media_source_get_exposure_time (_tmp1_);
#line 175 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = time_a;
#line 175 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = time_b;
#line 175 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = _tmp2_ - _tmp3_;
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = _result_;
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp5_ != ((gint64) 0)) {
#line 1422 "Thumbnail.c"
gint64 _tmp6_;
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = _result_;
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _tmp6_;
#line 1428 "Thumbnail.c"
} else {
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = thumbnail_filename_ascending_comparator (a, b);
#line 1432 "Thumbnail.c"
}
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp4_;
#line 177 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1438 "Thumbnail.c"
}
gint64
thumbnail_exposure_time_desending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
gint64 _tmp0_ = 0LL;
gint64 _tmp1_;
#line 181 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = thumbnail_exposure_time_ascending_comparator (b, a);
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _result_;
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp1_ != ((gint64) 0)) {
#line 1456 "Thumbnail.c"
gint64 _tmp2_;
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _result_;
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = _tmp2_;
#line 1462 "Thumbnail.c"
} else {
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = thumbnail_filename_descending_comparator (a, b);
#line 1466 "Thumbnail.c"
}
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp0_;
#line 183 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1472 "Thumbnail.c"
}
gboolean
thumbnail_exposure_time_comparator_predicate (DataObject* object,
Alteration* alteration)
{
gboolean result = FALSE;
#line 186 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE);
#line 186 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_ALTERATION (alteration), FALSE);
#line 187 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = alteration_has_detail (alteration, "metadata", "exposure-time");
#line 187 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1489 "Thumbnail.c"
}
gboolean
thumbnail_filename_comparator_predicate (DataObject* object,
Alteration* alteration)
{
gboolean result = FALSE;
#line 190 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE);
#line 190 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_ALTERATION (alteration), FALSE);
#line 191 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = alteration_has_detail (alteration, "metadata", "filename");
#line 191 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1506 "Thumbnail.c"
}
gint64
thumbnail_filename_ascending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gchar* path_a = NULL;
MediaSource* _tmp0_;
GFile* _tmp1_;
GFile* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
gchar* _tmp6_;
gchar* path_b = NULL;
MediaSource* _tmp7_;
GFile* _tmp8_;
GFile* _tmp9_;
gchar* _tmp10_;
gchar* _tmp11_;
gchar* _tmp12_;
gchar* _tmp13_;
gint64 _result_ = 0LL;
GCompareFunc _tmp14_;
const gchar* _tmp15_;
gchar* _tmp16_;
gchar* _tmp17_;
const gchar* _tmp18_;
gchar* _tmp19_;
gchar* _tmp20_;
gint64 _tmp21_;
gint64 _tmp22_ = 0LL;
gint64 _tmp23_;
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) a, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = media_source_get_file (_tmp0_);
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _tmp1_;
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = g_file_get_basename (_tmp2_);
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _tmp3_;
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = g_utf8_strdown (_tmp4_, (gssize) -1);
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = _tmp5_;
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp4_);
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp2_);
#line 195 "/home/jens/Source/shotwell/src/Thumbnail.vala"
path_a = _tmp6_;
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) b, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = media_source_get_file (_tmp7_);
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = _tmp8_;
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp10_ = g_file_get_basename (_tmp9_);
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp11_ = _tmp10_;
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp12_ = g_utf8_strdown (_tmp11_, (gssize) -1);
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp13_ = _tmp12_;
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp11_);
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp9_);
#line 196 "/home/jens/Source/shotwell/src/Thumbnail.vala"
path_b = _tmp13_;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp14_ = g_strcmp0;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp15_ = path_a;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp16_ = g_utf8_collate_key_for_filename (_tmp15_, (gssize) -1);
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp17_ = _tmp16_;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp18_ = path_b;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp19_ = g_utf8_collate_key_for_filename (_tmp18_, (gssize) -1);
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp20_ = _tmp19_;
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp21_ = (gint64) _tmp14_ (_tmp17_, _tmp20_);
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp20_);
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp17_);
#line 198 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = _tmp21_;
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp23_ = _result_;
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp23_ != ((gint64) 0)) {
#line 1608 "Thumbnail.c"
gint64 _tmp24_;
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp24_ = _result_;
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp22_ = _tmp24_;
#line 1614 "Thumbnail.c"
} else {
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp22_ = thumbnail_photo_id_ascending_comparator (a, b);
#line 1618 "Thumbnail.c"
}
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp22_;
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (path_b);
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (path_a);
#line 199 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1628 "Thumbnail.c"
}
gint64
thumbnail_filename_descending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
gint64 _tmp0_ = 0LL;
gint64 _tmp1_;
#line 203 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = thumbnail_filename_ascending_comparator (b, a);
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _result_;
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp1_ != ((gint64) 0)) {
#line 1646 "Thumbnail.c"
gint64 _tmp2_;
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _result_;
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = _tmp2_;
#line 1652 "Thumbnail.c"
} else {
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = thumbnail_photo_id_descending_comparator (a, b);
#line 1656 "Thumbnail.c"
}
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp0_;
#line 205 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1662 "Thumbnail.c"
}
gint64
thumbnail_rating_ascending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
MediaSource* _tmp0_;
MediaSource* _tmp1_;
gint64 _tmp2_ = 0LL;
gint64 _tmp3_;
#line 209 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) a, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 209 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST ((Thumbnail*) b, TYPE_THUMBNAIL, Thumbnail)->priv->media;
#line 209 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = (gint64) (media_source_get_rating (_tmp0_) - media_source_get_rating (_tmp1_));
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = _result_;
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp3_ != ((gint64) 0)) {
#line 1686 "Thumbnail.c"
gint64 _tmp4_;
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _result_;
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _tmp4_;
#line 1692 "Thumbnail.c"
} else {
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = thumbnail_photo_id_ascending_comparator (a, b);
#line 1696 "Thumbnail.c"
}
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp2_;
#line 211 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1702 "Thumbnail.c"
}
gint64
thumbnail_rating_descending_comparator (void* a,
void* b)
{
gint64 result = 0LL;
gint64 _result_ = 0LL;
gint64 _tmp0_ = 0LL;
gint64 _tmp1_;
#line 215 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_result_ = thumbnail_rating_ascending_comparator (b, a);
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _result_;
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp1_ != ((gint64) 0)) {
#line 1720 "Thumbnail.c"
gint64 _tmp2_;
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _result_;
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = _tmp2_;
#line 1726 "Thumbnail.c"
} else {
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = thumbnail_photo_id_descending_comparator (a, b);
#line 1730 "Thumbnail.c"
}
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp0_;
#line 217 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1736 "Thumbnail.c"
}
gboolean
thumbnail_rating_comparator_predicate (DataObject* object,
Alteration* alteration)
{
gboolean result = FALSE;
#line 220 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE);
#line 220 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_ALTERATION (alteration), FALSE);
#line 221 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = alteration_has_detail (alteration, "metadata", "rating");
#line 221 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 1753 "Thumbnail.c"
}
static void
thumbnail_real_thumbnail_altered (ThumbnailView* base)
{
Thumbnail * self;
MediaSource* _tmp0_;
Dimensions _tmp1_ = {0};
gint _tmp2_;
Dimensions _tmp3_ = {0};
gboolean _tmp4_;
#line 224 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 225 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 225 "/home/jens/Source/shotwell/src/Thumbnail.vala"
media_source_get_dimensions (_tmp0_, PHOTO_EXCEPTION_NONE, &_tmp1_);
#line 225 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->original_dim = _tmp1_;
#line 226 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->scale;
#line 226 "/home/jens/Source/shotwell/src/Thumbnail.vala"
dimensions_get_scaled (&self->priv->original_dim, _tmp2_, TRUE, &_tmp3_);
#line 226 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->dim = _tmp3_;
#line 228 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = self->priv->exposure;
#line 228 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp4_) {
#line 229 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_delayed_high_quality_fetch (self);
#line 1786 "Thumbnail.c"
} else {
#line 231 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_paint_empty (self);
#line 1790 "Thumbnail.c"
}
#line 233 "/home/jens/Source/shotwell/src/Thumbnail.vala"
THUMBNAIL_VIEW_CLASS (thumbnail_parent_class)->thumbnail_altered (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TYPE_THUMBNAIL_VIEW, ThumbnailView));
#line 1794 "Thumbnail.c"
}
static void
thumbnail_real_notify_collection_property_set (DataObject* base,
const gchar* name,
GValue* old,
GValue* val)
{
Thumbnail * self;
const gchar* _tmp0_;
GQuark _tmp2_ = 0U;
GValue _tmp4_;
#line 236 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 236 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (name != NULL);
#line 236 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (val != NULL);
#line 237 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = name;
#line 237 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
#line 237 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp2_ == g_quark_from_string (THUMBNAIL_PROP_SIZE)) {
#line 237 "/home/jens/Source/shotwell/src/Thumbnail.vala"
switch (0) {
#line 1822 "Thumbnail.c"
default:
{
GValue _tmp3_;
#line 239 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = *val;
#line 239 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_resize (self, g_value_get_int (&_tmp3_));
#line 240 "/home/jens/Source/shotwell/src/Thumbnail.vala"
break;
#line 1832 "Thumbnail.c"
}
}
} else if (_tmp2_ == g_quark_from_string (THUMBNAIL_PROP_SHOW_RATINGS)) {
#line 237 "/home/jens/Source/shotwell/src/Thumbnail.vala"
switch (0) {
#line 1838 "Thumbnail.c"
default:
{
#line 243 "/home/jens/Source/shotwell/src/Thumbnail.vala"
data_view_notify_view_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_VIEW, DataView));
#line 244 "/home/jens/Source/shotwell/src/Thumbnail.vala"
break;
#line 1845 "Thumbnail.c"
}
}
}
#line 247 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = *val;
#line 247 "/home/jens/Source/shotwell/src/Thumbnail.vala"
DATA_OBJECT_CLASS (thumbnail_parent_class)->notify_collection_property_set (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TYPE_DATA_OBJECT, DataObject), name, old, &_tmp4_);
#line 1853 "Thumbnail.c"
}
static void
thumbnail_resize (Thumbnail* self,
gint new_scale)
{
gint _tmp0_;
gint _tmp1_;
gint _tmp2_;
gint _tmp3_;
gint _tmp4_;
gint _tmp5_;
Dimensions _tmp6_ = {0};
gboolean _tmp7_;
#line 250 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 251 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = thumbnail_get_MIN_SCALE ();
#line 251 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _tmp0_;
#line 251 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_vala_assert (new_scale >= _tmp1_, "new_scale >= MIN_SCALE");
#line 252 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = thumbnail_get_MAX_SCALE ();
#line 252 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = _tmp2_;
#line 252 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_vala_assert (new_scale <= _tmp3_, "new_scale <= MAX_SCALE");
#line 254 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = self->priv->scale;
#line 254 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp4_ == new_scale) {
#line 255 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return;
#line 1889 "Thumbnail.c"
}
#line 257 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->scale = new_scale;
#line 258 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = self->priv->scale;
#line 258 "/home/jens/Source/shotwell/src/Thumbnail.vala"
dimensions_get_scaled (&self->priv->original_dim, _tmp5_, TRUE, &_tmp6_);
#line 258 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->dim = _tmp6_;
#line 260 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cancel_async_fetch (self);
#line 262 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = self->priv->exposure;
#line 262 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp7_) {
#line 1905 "Thumbnail.c"
GdkPixbuf* resizable = NULL;
GdkPixbuf* _tmp8_;
GdkPixbuf* _tmp12_;
#line 267 "/home/jens/Source/shotwell/src/Thumbnail.vala"
resizable = NULL;
#line 268 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = self->priv->unscaled_pixbuf;
#line 268 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp8_ != NULL) {
#line 1915 "Thumbnail.c"
GdkPixbuf* _tmp9_;
GdkPixbuf* _tmp10_;
#line 269 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = self->priv->unscaled_pixbuf;
#line 269 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp10_ = _g_object_ref0 (_tmp9_);
#line 269 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (resizable);
#line 269 "/home/jens/Source/shotwell/src/Thumbnail.vala"
resizable = _tmp10_;
#line 1926 "Thumbnail.c"
} else {
#line 270 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (checkerboard_item_has_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem))) {
#line 1930 "Thumbnail.c"
GdkPixbuf* _tmp11_;
#line 271 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp11_ = checkerboard_item_get_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 271 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (resizable);
#line 271 "/home/jens/Source/shotwell/src/Thumbnail.vala"
resizable = _tmp11_;
#line 1938 "Thumbnail.c"
}
}
#line 273 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp12_ = resizable;
#line 273 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp12_ != NULL) {
#line 1945 "Thumbnail.c"
GdkPixbuf* _tmp13_;
Dimensions _tmp14_;
GdkPixbuf* _tmp15_;
GdkPixbuf* _tmp16_;
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp13_ = resizable;
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp14_ = self->priv->dim;
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp15_ = resize_pixbuf (_tmp13_, &_tmp14_, THUMBNAIL_LOW_QUALITY_INTERP);
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp16_ = _tmp15_;
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp16_);
#line 274 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp16_);
#line 1962 "Thumbnail.c"
}
#line 276 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_delayed_high_quality_fetch (self);
#line 262 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (resizable);
#line 1968 "Thumbnail.c"
} else {
Dimensions _tmp17_;
#line 278 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp17_ = self->priv->dim;
#line 278 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_clear_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), &_tmp17_);
#line 1975 "Thumbnail.c"
}
}
static void
thumbnail_paint_empty (Thumbnail* self)
{
Dimensions _tmp0_;
#line 282 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 283 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cancel_async_fetch (self);
#line 284 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->dim;
#line 284 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_clear_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), &_tmp0_);
#line 285 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->unscaled_pixbuf);
#line 285 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->unscaled_pixbuf = NULL;
#line 1996 "Thumbnail.c"
}
static void
_thumbnail_on_low_quality_fetched_thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err,
gpointer self)
{
#line 292 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_on_low_quality_fetched ((Thumbnail*) self, pixbuf, unscaled, dim, interp, err);
#line 2010 "Thumbnail.c"
}
static void
thumbnail_schedule_low_quality_fetch (Thumbnail* self)
{
GCancellable* _tmp0_;
MediaSource* _tmp1_;
Dimensions _tmp2_;
GCancellable* _tmp3_;
#line 288 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 289 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cancel_async_fetch (self);
#line 290 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = g_cancellable_new ();
#line 290 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->cancellable);
#line 290 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->cancellable = _tmp0_;
#line 292 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = self->priv->media;
#line 292 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->dim;
#line 292 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = self->priv->cancellable;
#line 292 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cache_fetch_async_scaled (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), (gint) THUMBNAIL_CACHE_SIZE_SMALLEST, &_tmp2_, THUMBNAIL_LOW_QUALITY_INTERP, _thumbnail_on_low_quality_fetched_thumbnail_cache_async_fetch_callback, self, _tmp3_);
#line 2039 "Thumbnail.c"
}
static gboolean
_thumbnail_on_schedule_high_quality_gsource_func (gpointer self)
{
gboolean result;
result = thumbnail_on_schedule_high_quality ((Thumbnail*) self);
#line 303 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2050 "Thumbnail.c"
}
static void
thumbnail_delayed_high_quality_fetch (Thumbnail* self)
{
gboolean _tmp0_;
#line 296 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 297 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->hq_scheduled;
#line 297 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp0_) {
#line 298 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_reschedule = TRUE;
#line 300 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return;
#line 2068 "Thumbnail.c"
}
#line 303 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) THUMBNAIL_HQ_IMPROVEMENT_MSEC, _thumbnail_on_schedule_high_quality_gsource_func, g_object_ref (self), g_object_unref);
#line 304 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_scheduled = TRUE;
#line 2074 "Thumbnail.c"
}
static void
_thumbnail_on_high_quality_fetched_thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err,
gpointer self)
{
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_on_high_quality_fetched ((Thumbnail*) self, pixbuf, unscaled, dim, interp, err);
#line 2088 "Thumbnail.c"
}
static gboolean
thumbnail_on_schedule_high_quality (Thumbnail* self)
{
gboolean result = FALSE;
gboolean _tmp0_;
GCancellable* _tmp1_;
gboolean _tmp2_;
#line 307 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_val_if_fail (IS_THUMBNAIL (self), FALSE);
#line 308 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->hq_reschedule;
#line 308 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp0_) {
#line 309 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_reschedule = FALSE;
#line 311 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = TRUE;
#line 311 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2111 "Thumbnail.c"
}
#line 314 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cancel_async_fetch (self);
#line 315 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = g_cancellable_new ();
#line 315 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->cancellable);
#line 315 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->cancellable = _tmp1_;
#line 317 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->exposure;
#line 317 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp2_) {
#line 2125 "Thumbnail.c"
MediaSource* _tmp3_;
gint _tmp4_;
Dimensions _tmp5_;
GCancellable* _tmp6_;
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = self->priv->media;
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = self->priv->scale;
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = self->priv->dim;
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = self->priv->cancellable;
#line 318 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_cache_fetch_async_scaled (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp4_, &_tmp5_, THUMBNAIL_HIGH_QUALITY_INTERP, _thumbnail_on_high_quality_fetched_thumbnail_cache_async_fetch_callback, self, _tmp6_);
#line 2140 "Thumbnail.c"
}
#line 322 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_scheduled = FALSE;
#line 324 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = FALSE;
#line 324 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2148 "Thumbnail.c"
}
static void
thumbnail_cancel_async_fetch (Thumbnail* self)
{
GCancellable* _tmp0_;
#line 327 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 329 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->cancellable;
#line 329 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp0_ != NULL) {
#line 2162 "Thumbnail.c"
GCancellable* _tmp1_;
#line 330 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = self->priv->cancellable;
#line 330 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_cancellable_cancel (_tmp1_);
#line 2168 "Thumbnail.c"
}
}
static void
thumbnail_on_low_quality_fetched (Thumbnail* self,
GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err)
{
#line 333 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 333 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((pixbuf == NULL) || GDK_IS_PIXBUF (pixbuf));
#line 333 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((unscaled == NULL) || GDK_IS_PIXBUF (unscaled));
#line 333 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (dim != NULL);
#line 335 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (err != NULL) {
#line 2191 "Thumbnail.c"
gchar* _tmp0_;
gchar* _tmp1_;
gint _tmp2_;
const gchar* _tmp3_;
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _tmp0_;
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->scale;
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = err->message;
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_critical ("Thumbnail.vala:336: Unable to fetch low-quality thumbnail for %s (scal" \
"e: %d): %s", _tmp1_, _tmp2_, _tmp3_);
#line 336 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp1_);
#line 2208 "Thumbnail.c"
}
#line 339 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (pixbuf != NULL) {
#line 340 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), pixbuf);
#line 2214 "Thumbnail.c"
}
#line 342 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (unscaled != NULL) {
#line 2218 "Thumbnail.c"
GdkPixbuf* _tmp4_;
#line 343 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _g_object_ref0 (unscaled);
#line 343 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->unscaled_pixbuf);
#line 343 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->unscaled_pixbuf = _tmp4_;
#line 2226 "Thumbnail.c"
}
#line 345 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_delayed_high_quality_fetch (self);
#line 2230 "Thumbnail.c"
}
static void
thumbnail_on_high_quality_fetched (Thumbnail* self,
GdkPixbuf* pixbuf,
GdkPixbuf* unscaled,
Dimensions* dim,
GdkInterpType interp,
GError* err)
{
#line 348 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (IS_THUMBNAIL (self));
#line 348 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((pixbuf == NULL) || GDK_IS_PIXBUF (pixbuf));
#line 348 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail ((unscaled == NULL) || GDK_IS_PIXBUF (unscaled));
#line 348 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_return_if_fail (dim != NULL);
#line 350 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (err != NULL) {
#line 2252 "Thumbnail.c"
gchar* _tmp0_;
gchar* _tmp1_;
gint _tmp2_;
const gchar* _tmp3_;
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _tmp0_;
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = self->priv->scale;
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = err->message;
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_critical ("Thumbnail.vala:351: Unable to fetch high-quality thumbnail for %s (sca" \
"le: %d): %s", _tmp1_, _tmp2_, _tmp3_);
#line 351 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_free0 (_tmp1_);
#line 2269 "Thumbnail.c"
}
#line 354 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (pixbuf != NULL) {
#line 355 "/home/jens/Source/shotwell/src/Thumbnail.vala"
checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), pixbuf);
#line 2275 "Thumbnail.c"
}
#line 357 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (unscaled != NULL) {
#line 2279 "Thumbnail.c"
GdkPixbuf* _tmp4_;
#line 358 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _g_object_ref0 (unscaled);
#line 358 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->unscaled_pixbuf);
#line 358 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->unscaled_pixbuf = _tmp4_;
#line 2287 "Thumbnail.c"
}
}
static void
thumbnail_real_exposed (CheckerboardItem* base)
{
Thumbnail * self;
#line 361 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 362 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->exposure = TRUE;
#line 364 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (!checkerboard_item_has_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem))) {
#line 365 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_schedule_low_quality_fetch (self);
#line 2304 "Thumbnail.c"
}
#line 367 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_title (self, FALSE);
#line 368 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_comment (self, FALSE);
#line 369 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_update_tags (self, FALSE);
#line 371 "/home/jens/Source/shotwell/src/Thumbnail.vala"
CHECKERBOARD_ITEM_CLASS (thumbnail_parent_class)->exposed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 2314 "Thumbnail.c"
}
static void
thumbnail_real_unexposed (CheckerboardItem* base)
{
Thumbnail * self;
#line 374 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 375 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->exposure = FALSE;
#line 377 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_paint_empty (self);
#line 379 "/home/jens/Source/shotwell/src/Thumbnail.vala"
CHECKERBOARD_ITEM_CLASS (thumbnail_parent_class)->unexposed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem), TYPE_CHECKERBOARD_ITEM, CheckerboardItem));
#line 2330 "Thumbnail.c"
}
static GdkPixbuf*
thumbnail_real_get_top_right_trinket (CheckerboardItem* base,
gint scale)
{
Thumbnail * self;
GdkPixbuf* result = NULL;
Flaggable* flaggable = NULL;
MediaSource* _tmp0_;
Flaggable* _tmp1_;
GdkPixbuf* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
Flaggable* _tmp4_;
#line 382 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 383 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 383 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FLAGGABLE) ? ((Flaggable*) _tmp0_) : NULL);
#line 383 "/home/jens/Source/shotwell/src/Thumbnail.vala"
flaggable = _tmp1_;
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = flaggable;
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp4_ != NULL) {
#line 2358 "Thumbnail.c"
Flaggable* _tmp5_;
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = flaggable;
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = flaggable_is_flagged (_tmp5_);
#line 2364 "Thumbnail.c"
} else {
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = FALSE;
#line 2368 "Thumbnail.c"
}
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp3_) {
#line 2372 "Thumbnail.c"
GdkPixbuf* _tmp6_;
#line 386 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = resources_get_icon (RESOURCES_ICON_FLAGGED_TRINKET, RESOURCES_DEFAULT_ICON_SCALE);
#line 386 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp2_);
#line 386 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = _tmp6_;
#line 2380 "Thumbnail.c"
} else {
#line 386 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp2_);
#line 386 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = NULL;
#line 2386 "Thumbnail.c"
}
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp2_;
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (flaggable);
#line 385 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2394 "Thumbnail.c"
}
static void
_vala_GValue_free (GValue* self)
{
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_value_unset (self);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_free (self);
#line 2405 "Thumbnail.c"
}
static GdkPixbuf*
thumbnail_real_get_bottom_left_trinket (CheckerboardItem* base,
gint scale)
{
Thumbnail * self;
GdkPixbuf* result = NULL;
Rating rating = 0;
MediaSource* _tmp0_;
gboolean show_ratings = FALSE;
GValue* _tmp1_ = NULL;
GValue _tmp2_ = {0};
gboolean _tmp3_;
GdkPixbuf* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
Rating _tmp6_;
#line 389 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_THUMBNAIL, Thumbnail);
#line 390 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->media;
#line 390 "/home/jens/Source/shotwell/src/Thumbnail.vala"
rating = media_source_get_rating (_tmp0_);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = g_new0 (GValue, 1);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_value_init (_tmp1_, G_TYPE_BOOLEAN);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_value_set_boolean (_tmp1_, FALSE);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
data_object_get_collection_property (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), THUMBNAIL_PROP_SHOW_RATINGS, _tmp1_, &_tmp2_);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp3_ = g_value_get_boolean (&_tmp2_);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
__vala_GValue_free0 (_tmp1_);
#line 391 "/home/jens/Source/shotwell/src/Thumbnail.vala"
show_ratings = _tmp3_;
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp6_ = rating;
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp6_ != RATING_UNRATED) {
#line 2448 "Thumbnail.c"
gboolean _tmp7_;
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp7_ = show_ratings;
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = _tmp7_;
#line 2454 "Thumbnail.c"
} else {
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp5_ = FALSE;
#line 2458 "Thumbnail.c"
}
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp5_) {
#line 2462 "Thumbnail.c"
Rating _tmp8_;
GdkPixbuf* _tmp9_;
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp8_ = rating;
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp9_ = resources_get_rating_trinket (_tmp8_, scale);
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp4_);
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = _tmp9_;
#line 2473 "Thumbnail.c"
} else {
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (_tmp4_);
#line 394 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = NULL;
#line 2479 "Thumbnail.c"
}
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = _tmp4_;
#line 393 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2485 "Thumbnail.c"
}
gint
thumbnail_get_MIN_SCALE (void)
{
gint result;
#line 18 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = 72;
#line 18 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2497 "Thumbnail.c"
}
gint
thumbnail_get_MAX_SCALE (void)
{
gint result;
#line 23 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = thumbnail_cache_size_get_scale (THUMBNAIL_CACHE_SIZE_LARGEST);
#line 23 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2509 "Thumbnail.c"
}
gint
thumbnail_get_DEFAULT_SCALE (void)
{
gint result;
#line 28 "/home/jens/Source/shotwell/src/Thumbnail.vala"
result = thumbnail_cache_size_get_scale (THUMBNAIL_CACHE_SIZE_MEDIUM);
#line 28 "/home/jens/Source/shotwell/src/Thumbnail.vala"
return result;
#line 2521 "Thumbnail.c"
}
static void
thumbnail_class_init (ThumbnailClass * klass)
{
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
thumbnail_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_type_class_add_private (klass, sizeof (ThumbnailPrivate));
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((DataObjectClass *) klass)->notify_altered = (void (*) (DataObject *, Alteration*)) thumbnail_real_notify_altered;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((ThumbnailViewClass *) klass)->thumbnail_altered = (void (*) (ThumbnailView *)) thumbnail_real_thumbnail_altered;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((DataObjectClass *) klass)->notify_collection_property_set = (void (*) (DataObject *, const gchar*, GValue*, GValue*)) thumbnail_real_notify_collection_property_set;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((CheckerboardItemClass *) klass)->exposed = (void (*) (CheckerboardItem *)) thumbnail_real_exposed;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((CheckerboardItemClass *) klass)->unexposed = (void (*) (CheckerboardItem *)) thumbnail_real_unexposed;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((CheckerboardItemClass *) klass)->get_top_right_trinket = (GdkPixbuf* (*) (CheckerboardItem *, gint)) thumbnail_real_get_top_right_trinket;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
((CheckerboardItemClass *) klass)->get_bottom_left_trinket = (GdkPixbuf* (*) (CheckerboardItem *, gint)) thumbnail_real_get_bottom_left_trinket;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
G_OBJECT_CLASS (klass)->get_property = _vala_thumbnail_get_property;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
G_OBJECT_CLASS (klass)->finalize = thumbnail_finalize;
#line 2550 "Thumbnail.c"
}
static void
thumbnail_instance_init (Thumbnail * self)
{
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv = THUMBNAIL_GET_PRIVATE (self);
#line 41 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->unscaled_pixbuf = NULL;
#line 42 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->cancellable = NULL;
#line 43 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_scheduled = FALSE;
#line 44 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->hq_reschedule = FALSE;
#line 47 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self->priv->exposure = FALSE;
#line 2569 "Thumbnail.c"
}
static void
thumbnail_finalize (GObject * obj)
{
Thumbnail * self;
GCancellable* _tmp0_;
TagSourceCollection* _tmp2_;
guint _tmp3_;
TagSourceCollection* _tmp4_;
guint _tmp5_;
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THUMBNAIL, Thumbnail);
#line 73 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp0_ = self->priv->cancellable;
#line 73 "/home/jens/Source/shotwell/src/Thumbnail.vala"
if (_tmp0_ != NULL) {
#line 2588 "Thumbnail.c"
GCancellable* _tmp1_;
#line 74 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp1_ = self->priv->cancellable;
#line 74 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_cancellable_cancel (_tmp1_);
#line 2594 "Thumbnail.c"
}
#line 76 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp2_ = tag_global;
#line 76 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_parse_name ("container-contents-altered", TYPE_CONTAINER_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE);
#line 76 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _thumbnail_on_tag_contents_altered_container_source_collection_container_contents_altered, self);
#line 77 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_tmp4_ = tag_global;
#line 77 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp5_, NULL, FALSE);
#line 77 "/home/jens/Source/shotwell/src/Thumbnail.vala"
g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _thumbnail_on_tags_altered_data_collection_items_altered, self);
#line 37 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->media);
#line 41 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->unscaled_pixbuf);
#line 42 "/home/jens/Source/shotwell/src/Thumbnail.vala"
_g_object_unref0 (self->priv->cancellable);
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
G_OBJECT_CLASS (thumbnail_parent_class)->finalize (obj);
#line 2616 "Thumbnail.c"
}
GType
thumbnail_get_type (void)
{
static volatile gsize thumbnail_type_id__volatile = 0;
if (g_once_init_enter (&thumbnail_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ThumbnailClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Thumbnail), 0, (GInstanceInitFunc) thumbnail_instance_init, NULL };
GType thumbnail_type_id;
thumbnail_type_id = g_type_register_static (TYPE_MEDIA_SOURCE_ITEM, "Thumbnail", &g_define_type_info, 0);
g_once_init_leave (&thumbnail_type_id__volatile, thumbnail_type_id);
}
return thumbnail_type_id__volatile;
}
static void
_vala_thumbnail_get_property (GObject * object,
guint property_id,
GValue * value,
GParamSpec * pspec)
{
Thumbnail * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_THUMBNAIL, Thumbnail);
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
switch (property_id) {
#line 2644 "Thumbnail.c"
default:
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 7 "/home/jens/Source/shotwell/src/Thumbnail.vala"
break;
#line 2650 "Thumbnail.c"
}
}
|