summaryrefslogtreecommitdiff
path: root/src/searches/Branch.c
blob: 3abe9a9e7d9e71e2b1043f261c039ca533b4c49d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
/* Branch.c generated by valac 0.34.4, the Vala compiler
 * generated from Branch.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 <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>


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

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

#define SEARCHES_TYPE_BRANCH (searches_branch_get_type ())
#define SEARCHES_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEARCHES_TYPE_BRANCH, SearchesBranch))
#define SEARCHES_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEARCHES_TYPE_BRANCH, SearchesBranchClass))
#define SEARCHES_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEARCHES_TYPE_BRANCH))
#define SEARCHES_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEARCHES_TYPE_BRANCH))
#define SEARCHES_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEARCHES_TYPE_BRANCH, SearchesBranchClass))

typedef struct _SearchesBranch SearchesBranch;
typedef struct _SearchesBranchClass SearchesBranchClass;
typedef struct _SearchesBranchPrivate SearchesBranchPrivate;

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_SAVED_SEARCH (saved_search_get_type ())
#define SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH, SavedSearch))
#define SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH, SavedSearchClass))
#define IS_SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH))
#define IS_SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH))
#define SAVED_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH, SavedSearchClass))

typedef struct _SavedSearch SavedSearch;
typedef struct _SavedSearchClass SavedSearchClass;

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

typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry;
typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass;

#define SEARCHES_TYPE_SIDEBAR_ENTRY (searches_sidebar_entry_get_type ())
#define SEARCHES_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry))
#define SEARCHES_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntryClass))
#define SEARCHES_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEARCHES_TYPE_SIDEBAR_ENTRY))
#define SEARCHES_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEARCHES_TYPE_SIDEBAR_ENTRY))
#define SEARCHES_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntryClass))

typedef struct _SearchesSidebarEntry SearchesSidebarEntry;
typedef struct _SearchesSidebarEntryClass SearchesSidebarEntryClass;

#define TYPE_SAVED_SEARCH_TABLE (saved_search_table_get_type ())
#define SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTable))
#define SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))
#define IS_SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH_TABLE))
#define IS_SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH_TABLE))
#define SAVED_SEARCH_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))

typedef struct _SavedSearchTable SavedSearchTable;
typedef struct _SavedSearchTableClass SavedSearchTableClass;
#define _saved_search_table_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_table_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

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

typedef struct _SidebarGrouping SidebarGrouping;
typedef struct _SidebarGroupingClass SidebarGroupingClass;

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

typedef struct _SidebarHeader SidebarHeader;
typedef struct _SidebarHeaderClass SidebarHeaderClass;

#define SEARCHES_TYPE_HEADER (searches_header_get_type ())
#define SEARCHES_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEARCHES_TYPE_HEADER, SearchesHeader))
#define SEARCHES_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SEARCHES_TYPE_HEADER, SearchesHeaderClass))
#define SEARCHES_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEARCHES_TYPE_HEADER))
#define SEARCHES_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEARCHES_TYPE_HEADER))
#define SEARCHES_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SEARCHES_TYPE_HEADER, SearchesHeaderClass))

typedef struct _SearchesHeader SearchesHeader;
typedef struct _SearchesHeaderClass SearchesHeaderClass;

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

typedef struct _SidebarEntry SidebarEntry;
typedef struct _SidebarEntryIface SidebarEntryIface;

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

typedef struct _SidebarTree SidebarTree;
typedef struct _SidebarTreeClass SidebarTreeClass;

#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ())

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

typedef struct _SidebarExpandableEntry SidebarExpandableEntry;
typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface;

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

typedef struct _SidebarRenameableEntry SidebarRenameableEntry;
typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface;
typedef struct _SidebarGroupingPrivate SidebarGroupingPrivate;

#define SIDEBAR_TYPE_EMPHASIZABLE_ENTRY (sidebar_emphasizable_entry_get_type ())
#define SIDEBAR_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntry))
#define SIDEBAR_IS_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY))
#define SIDEBAR_EMPHASIZABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntryIface))

typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry;
typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface;
typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate;

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

typedef struct _SidebarContextable SidebarContextable;
typedef struct _SidebarContextableIface SidebarContextableIface;
typedef struct _SearchesHeaderPrivate SearchesHeaderPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

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

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

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

typedef struct _SidebarSelectableEntry SidebarSelectableEntry;
typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface;

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

typedef struct _SidebarPageRepresentative SidebarPageRepresentative;
typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface;

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

typedef struct _Page Page;
typedef struct _PageClass PageClass;
typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate;

#define SIDEBAR_TYPE_DESTROYABLE_ENTRY (sidebar_destroyable_entry_get_type ())
#define SIDEBAR_DESTROYABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY, SidebarDestroyableEntry))
#define SIDEBAR_IS_DESTROYABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY))
#define SIDEBAR_DESTROYABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_DESTROYABLE_ENTRY, SidebarDestroyableEntryIface))

typedef struct _SidebarDestroyableEntry SidebarDestroyableEntry;
typedef struct _SidebarDestroyableEntryIface SidebarDestroyableEntryIface;
typedef struct _SearchesSidebarEntryPrivate SearchesSidebarEntryPrivate;

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

typedef struct _CheckerboardPage CheckerboardPage;
typedef struct _CheckerboardPageClass CheckerboardPageClass;

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

typedef struct _MediaPage MediaPage;
typedef struct _MediaPageClass MediaPageClass;

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

typedef struct _CollectionPage CollectionPage;
typedef struct _CollectionPageClass CollectionPageClass;

#define TYPE_SAVED_SEARCH_PAGE (saved_search_page_get_type ())
#define SAVED_SEARCH_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH_PAGE, SavedSearchPage))
#define SAVED_SEARCH_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH_PAGE, SavedSearchPageClass))
#define IS_SAVED_SEARCH_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH_PAGE))
#define IS_SAVED_SEARCH_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH_PAGE))
#define SAVED_SEARCH_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH_PAGE, SavedSearchPageClass))

typedef struct _SavedSearchPage SavedSearchPage;
typedef struct _SavedSearchPageClass SavedSearchPageClass;

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

typedef struct _CommandManager CommandManager;
typedef struct _CommandManagerClass CommandManagerClass;

#define TYPE_COMMAND (command_get_type ())
#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command))
#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass))
#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND))
#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND))
#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass))

typedef struct _Command Command;
typedef struct _CommandClass CommandClass;

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

typedef struct _PageCommand PageCommand;
typedef struct _PageCommandClass PageCommandClass;

#define TYPE_SINGLE_DATA_SOURCE_COMMAND (single_data_source_command_get_type ())
#define SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand))
#define SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass))
#define IS_SINGLE_DATA_SOURCE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND))
#define IS_SINGLE_DATA_SOURCE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_DATA_SOURCE_COMMAND))
#define SINGLE_DATA_SOURCE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommandClass))

typedef struct _SingleDataSourceCommand SingleDataSourceCommand;
typedef struct _SingleDataSourceCommandClass SingleDataSourceCommandClass;

#define TYPE_RENAME_SAVED_SEARCH_COMMAND (rename_saved_search_command_get_type ())
#define RENAME_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommand))
#define RENAME_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommandClass))
#define IS_RENAME_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND))
#define IS_RENAME_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_SAVED_SEARCH_COMMAND))
#define RENAME_SAVED_SEARCH_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommandClass))

typedef struct _RenameSavedSearchCommand RenameSavedSearchCommand;
typedef struct _RenameSavedSearchCommandClass RenameSavedSearchCommandClass;
#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL)))

#define TYPE_DELETE_SAVED_SEARCH_COMMAND (delete_saved_search_command_get_type ())
#define DELETE_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand))
#define DELETE_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommandClass))
#define IS_DELETE_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND))
#define IS_DELETE_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_SAVED_SEARCH_COMMAND))
#define DELETE_SAVED_SEARCH_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommandClass))

typedef struct _DeleteSavedSearchCommand DeleteSavedSearchCommand;
typedef struct _DeleteSavedSearchCommandClass DeleteSavedSearchCommandClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

struct _SidebarBranchClass {
	GObjectClass parent_class;
};

struct _SearchesBranch {
	SidebarBranch parent_instance;
	SearchesBranchPrivate * priv;
};

struct _SearchesBranchClass {
	SidebarBranchClass parent_class;
};

struct _SearchesBranchPrivate {
	GeeHashMap* entry_map;
};

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

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

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

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

struct _SidebarGrouping {
	GObject parent_instance;
	SidebarGroupingPrivate * priv;
};

struct _SidebarGroupingClass {
	GObjectClass parent_class;
};

struct _SidebarEmphasizableEntryIface {
	GTypeInterface parent_iface;
	gboolean (*is_emphasized) (SidebarEmphasizableEntry* self);
};

struct _SidebarHeader {
	SidebarGrouping parent_instance;
	SidebarHeaderPrivate * priv;
};

struct _SidebarHeaderClass {
	SidebarGroupingClass parent_class;
};

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

struct _SearchesHeader {
	SidebarHeader parent_instance;
	SearchesHeaderPrivate * priv;
};

struct _SearchesHeaderClass {
	SidebarHeaderClass parent_class;
};

struct _SearchesHeaderPrivate {
	GtkBuilder* builder;
	GtkMenu* context_menu;
};

struct _SidebarSelectableEntryIface {
	GTypeInterface parent_iface;
};

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

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

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

struct _SidebarDestroyableEntryIface {
	GTypeInterface parent_iface;
	void (*destroy_source) (SidebarDestroyableEntry* self);
};

struct _SearchesSidebarEntry {
	SidebarSimplePageEntry parent_instance;
	SearchesSidebarEntryPrivate * priv;
};

struct _SearchesSidebarEntryClass {
	SidebarSimplePageEntryClass parent_class;
};

struct _SearchesSidebarEntryPrivate {
	SavedSearch* search;
};


static gpointer searches_branch_parent_class = NULL;
static gpointer searches_header_parent_class = NULL;
static SidebarContextableIface* searches_header_sidebar_contextable_parent_iface = NULL;
static gpointer searches_sidebar_entry_parent_class = NULL;
static gchar* searches_sidebar_entry_single_search_icon;
static gchar* searches_sidebar_entry_single_search_icon = NULL;
static SidebarRenameableEntryIface* searches_sidebar_entry_sidebar_renameable_entry_parent_iface = NULL;
static SidebarDestroyableEntryIface* searches_sidebar_entry_sidebar_destroyable_entry_parent_iface = NULL;

GType sidebar_branch_get_type (void) G_GNUC_CONST;
GType searches_branch_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType saved_search_get_type (void) G_GNUC_CONST;
GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST;
GType searches_sidebar_entry_get_type (void) G_GNUC_CONST;
#define SEARCHES_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SEARCHES_TYPE_BRANCH, SearchesBranchPrivate))
enum  {
	SEARCHES_BRANCH_DUMMY_PROPERTY
};
gpointer saved_search_table_ref (gpointer instance);
void saved_search_table_unref (gpointer instance);
GParamSpec* param_spec_saved_search_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_saved_search_table (GValue* value, gpointer v_object);
void value_take_saved_search_table (GValue* value, gpointer v_object);
gpointer value_get_saved_search_table (const GValue* value);
GType saved_search_table_get_type (void) G_GNUC_CONST;
SavedSearchTable* saved_search_table_get_instance (void);
static void searches_branch_on_saved_search_added (SearchesBranch* self, SavedSearch* search);
static void _searches_branch_on_saved_search_added_saved_search_table_search_added (SavedSearchTable* _sender, SavedSearch* search, gpointer self);
static void searches_branch_on_saved_search_removed (SearchesBranch* self, SavedSearch* search);
static void _searches_branch_on_saved_search_removed_saved_search_table_search_removed (SavedSearchTable* _sender, SavedSearch* search, gpointer self);
SearchesBranch* searches_branch_new (void);
SearchesBranch* searches_branch_construct (GType object_type);
SearchesHeader* searches_header_new (void);
SearchesHeader* searches_header_construct (GType object_type);
GType sidebar_grouping_get_type (void) G_GNUC_CONST;
GType sidebar_header_get_type (void) G_GNUC_CONST;
GType searches_header_get_type (void) G_GNUC_CONST;
GType sidebar_tree_get_type (void) G_GNUC_CONST;
GType sidebar_entry_get_type (void) G_GNUC_CONST;
GType sidebar_branch_options_get_type (void) G_GNUC_CONST;
static gint searches_branch_comparator (SidebarEntry* a, SidebarEntry* b);
static gint _searches_branch_comparator_gcompare_func (gconstpointer a, gconstpointer b);
SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator);
SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator);
GeeCollection* saved_search_table_get_all (SavedSearchTable* self);
SearchesSidebarEntry* searches_branch_get_entry_for_saved_search (SearchesBranch* self, SavedSearch* search);
gint saved_search_compare_names (void* a, void* b);
SavedSearch* searches_sidebar_entry_for_saved_search (SearchesSidebarEntry* self);
SearchesSidebarEntry* searches_sidebar_entry_new (SavedSearch* search);
SearchesSidebarEntry* searches_sidebar_entry_construct (GType object_type, SavedSearch* search);
void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator);
SidebarEntry* sidebar_branch_get_root (SidebarBranch* self);
void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry);
static void searches_branch_finalize (GObject* obj);
GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST;
GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST;
GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST;
GType sidebar_contextable_get_type (void) G_GNUC_CONST;
#define SEARCHES_HEADER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SEARCHES_TYPE_HEADER, SearchesHeaderPrivate))
enum  {
	SEARCHES_HEADER_DUMMY_PROPERTY
};
SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized);
SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized);
static void searches_header_setup_context_menu (SearchesHeader* self);
gchar* resources_get_ui (const gchar* filename);
void app_window_error_message (const gchar* message, GtkWindow* parent);
gpointer application_ref (gpointer instance);
void application_unref (gpointer instance);
GParamSpec* param_spec_application (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_application (GValue* value, gpointer v_object);
void value_take_application (GValue* value, gpointer v_object);
gpointer value_get_application (const GValue* value);
GType application_get_type (void) G_GNUC_CONST;
Application* application_get_instance (void);
void application_panic (Application* self);
static GtkMenu* searches_header_real_get_sidebar_context_menu (SidebarContextable* base, GdkEventButton* event);
static void searches_header_finalize (GObject* obj);
GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST;
GType page_get_type (void) G_GNUC_CONST;
GType sidebar_page_representative_get_type (void) G_GNUC_CONST;
GType sidebar_destroyable_entry_get_type (void) G_GNUC_CONST;
#define SEARCHES_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntryPrivate))
enum  {
	SEARCHES_SIDEBAR_ENTRY_DUMMY_PROPERTY
};
SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type);
void searches_sidebar_entry_init (void);
void searches_sidebar_entry_terminate (void);
static gchar* searches_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
gchar* data_object_get_name (DataObject* self);
static gchar* searches_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* searches_sidebar_entry_real_create_page (SidebarSimplePageEntry* base);
SavedSearchPage* saved_search_page_new (SavedSearch* search);
SavedSearchPage* saved_search_page_construct (GType object_type, SavedSearch* search);
GType checkerboard_page_get_type (void) G_GNUC_CONST;
GType media_page_get_type (void) G_GNUC_CONST;
GType collection_page_get_type (void) G_GNUC_CONST;
GType saved_search_page_get_type (void) G_GNUC_CONST;
static gboolean searches_sidebar_entry_real_is_user_renameable (SidebarRenameableEntry* base);
static void searches_sidebar_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name);
gboolean saved_search_table_exists (SavedSearchTable* self, const gchar* search_name);
gpointer command_manager_ref (gpointer instance);
void command_manager_unref (gpointer instance);
GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_command_manager (GValue* value, gpointer v_object);
void value_take_command_manager (GValue* value, gpointer v_object);
gpointer value_get_command_manager (const GValue* value);
GType command_manager_get_type (void) G_GNUC_CONST;
CommandManager* app_window_get_command_manager (void);
GType command_get_type (void) G_GNUC_CONST;
void command_manager_execute (CommandManager* self, Command* command);
RenameSavedSearchCommand* rename_saved_search_command_new (SavedSearch* search, const gchar* new_name);
RenameSavedSearchCommand* rename_saved_search_command_construct (GType object_type, SavedSearch* search, const gchar* new_name);
GType page_command_get_type (void) G_GNUC_CONST;
GType single_data_source_command_get_type (void) G_GNUC_CONST;
GType rename_saved_search_command_get_type (void) G_GNUC_CONST;
gchar* resources_rename_search_exists_message (const gchar* name);
static void searches_sidebar_entry_real_destroy_source (SidebarDestroyableEntry* base);
gboolean dialogs_confirm_delete_saved_search (SavedSearch* search);
DeleteSavedSearchCommand* delete_saved_search_command_new (SavedSearch* search);
DeleteSavedSearchCommand* delete_saved_search_command_construct (GType object_type, SavedSearch* search);
GType delete_saved_search_command_get_type (void) G_GNUC_CONST;
static void searches_sidebar_entry_finalize (GObject* obj);


static void _searches_branch_on_saved_search_added_saved_search_table_search_added (SavedSearchTable* _sender, SavedSearch* search, gpointer self) {
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_branch_on_saved_search_added ((SearchesBranch*) self, search);
#line 612 "Branch.c"
}


static void _searches_branch_on_saved_search_removed_saved_search_table_search_removed (SavedSearchTable* _sender, SavedSearch* search, gpointer self) {
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_branch_on_saved_search_removed ((SearchesBranch*) self, search);
#line 619 "Branch.c"
}


static gint _searches_branch_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = searches_branch_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 12 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 628 "Branch.c"
}


SearchesBranch* searches_branch_construct (GType object_type) {
	SearchesBranch * self = NULL;
	SearchesHeader* _tmp0_ = NULL;
	SearchesHeader* _tmp1_ = NULL;
	SavedSearchTable* _tmp13_ = NULL;
	SavedSearchTable* _tmp14_ = NULL;
	SavedSearchTable* _tmp15_ = NULL;
	SavedSearchTable* _tmp16_ = NULL;
#line 12 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = searches_header_new ();
#line 12 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _tmp0_;
#line 12 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = (SearchesBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), (SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY | SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD) | SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, _searches_branch_comparator_gcompare_func, NULL);
#line 12 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (_tmp1_);
#line 648 "Branch.c"
	{
		GeeIterator* _search_it = NULL;
		SavedSearchTable* _tmp2_ = NULL;
		SavedSearchTable* _tmp3_ = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeCollection* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
		GeeIterator* _tmp7_ = NULL;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp2_ = saved_search_table_get_instance ();
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp3_ = _tmp2_;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp4_ = saved_search_table_get_all (_tmp3_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp5_ = _tmp4_;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp7_ = _tmp6_;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (_tmp5_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_saved_search_table_unref0 (_tmp3_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_search_it = _tmp7_;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		while (TRUE) {
#line 677 "Branch.c"
			GeeIterator* _tmp8_ = NULL;
			gboolean _tmp9_ = FALSE;
			SavedSearch* search = NULL;
			GeeIterator* _tmp10_ = NULL;
			gpointer _tmp11_ = NULL;
			SavedSearch* _tmp12_ = NULL;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp8_ = _search_it;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			if (!_tmp9_) {
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
				break;
#line 692 "Branch.c"
			}
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp10_ = _search_it;
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			search = (SavedSearch*) _tmp11_;
#line 20 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp12_ = search;
#line 20 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			searches_branch_on_saved_search_added (self, _tmp12_);
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_g_object_unref0 (search);
#line 706 "Branch.c"
		}
#line 19 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (_search_it);
#line 710 "Branch.c"
	}
#line 23 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp13_ = saved_search_table_get_instance ();
#line 23 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp14_ = _tmp13_;
#line 23 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_connect_object (_tmp14_, "search-added", (GCallback) _searches_branch_on_saved_search_added_saved_search_table_search_added, self, 0);
#line 23 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_saved_search_table_unref0 (_tmp14_);
#line 24 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp15_ = saved_search_table_get_instance ();
#line 24 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp16_ = _tmp15_;
#line 24 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_connect_object (_tmp16_, "search-removed", (GCallback) _searches_branch_on_saved_search_removed_saved_search_table_search_removed, self, 0);
#line 24 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_saved_search_table_unref0 (_tmp16_);
#line 11 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return self;
#line 730 "Branch.c"
}


SearchesBranch* searches_branch_new (void) {
#line 11 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return searches_branch_construct (SEARCHES_TYPE_BRANCH);
#line 737 "Branch.c"
}


SearchesSidebarEntry* searches_branch_get_entry_for_saved_search (SearchesBranch* self, SavedSearch* search) {
	SearchesSidebarEntry* result = NULL;
	GeeHashMap* _tmp0_ = NULL;
	SavedSearch* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (SEARCHES_IS_BRANCH (self), NULL);
#line 32 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (IS_SAVED_SEARCH (search), NULL);
#line 33 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->entry_map;
#line 33 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = search;
#line 33 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 33 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = (SearchesSidebarEntry*) _tmp2_;
#line 33 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 760 "Branch.c"
}


static gint searches_branch_comparator (SidebarEntry* a, SidebarEntry* b) {
	gint result = 0;
	SidebarEntry* _tmp0_ = NULL;
	SidebarEntry* _tmp1_ = NULL;
	SidebarEntry* _tmp2_ = NULL;
	SavedSearch* _tmp3_ = NULL;
	SidebarEntry* _tmp4_ = NULL;
	SavedSearch* _tmp5_ = NULL;
	gint _tmp6_ = 0;
#line 36 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 36 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 37 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = a;
#line 37 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = b;
#line 37 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	if (_tmp0_ == _tmp1_) {
#line 38 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		result = 0;
#line 38 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		return result;
#line 787 "Branch.c"
	}
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp2_ = a;
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp3_ = searches_sidebar_entry_for_saved_search (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry));
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp4_ = b;
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp5_ = searches_sidebar_entry_for_saved_search (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry));
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp6_ = saved_search_compare_names (_tmp3_, _tmp5_);
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = _tmp6_;
#line 40 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 803 "Branch.c"
}


static void searches_branch_on_saved_search_added (SearchesBranch* self, SavedSearch* search) {
	SearchesSidebarEntry* entry = NULL;
	SavedSearch* _tmp0_ = NULL;
	SearchesSidebarEntry* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
	SavedSearch* _tmp3_ = NULL;
	SidebarEntry* _tmp4_ = NULL;
	SidebarEntry* _tmp5_ = NULL;
#line 44 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (SEARCHES_IS_BRANCH (self));
#line 44 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (IS_SAVED_SEARCH (search));
#line 45 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_debug ("Branch.vala:45: search added");
#line 46 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = search;
#line 46 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = searches_sidebar_entry_new (_tmp0_);
#line 46 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	entry = _tmp1_;
#line 47 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp2_ = self->priv->entry_map;
#line 47 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp3_ = search;
#line 47 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_, entry);
#line 48 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp4_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 48 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp5_ = _tmp4_;
#line 48 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
#line 48 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (_tmp5_);
#line 44 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (entry);
#line 843 "Branch.c"
}


static void searches_branch_on_saved_search_removed (SearchesBranch* self, SavedSearch* search) {
	SearchesSidebarEntry* entry = NULL;
	GeeHashMap* _tmp0_ = NULL;
	SavedSearch* _tmp1_ = NULL;
	gpointer _tmp2_ = NULL;
	gboolean is_removed = FALSE;
	GeeHashMap* _tmp3_ = NULL;
	SavedSearch* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 51 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (SEARCHES_IS_BRANCH (self));
#line 51 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (IS_SAVED_SEARCH (search));
#line 52 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_debug ("Branch.vala:52: search removed");
#line 53 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->entry_map;
#line 53 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = search;
#line 53 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 53 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	entry = (SearchesSidebarEntry*) _tmp2_;
#line 54 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_vala_assert (entry != NULL, "entry != null");
#line 56 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp3_ = self->priv->entry_map;
#line 56 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp4_ = search;
#line 56 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp5_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_, NULL);
#line 56 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	is_removed = _tmp5_;
#line 57 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_vala_assert (is_removed, "is_removed");
#line 59 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry));
#line 51 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (entry);
#line 886 "Branch.c"
}


static void searches_branch_class_init (SearchesBranchClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_branch_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_type_class_add_private (klass, sizeof (SearchesBranchPrivate));
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = searches_branch_finalize;
#line 897 "Branch.c"
}


static void searches_branch_instance_init (SearchesBranch * self) {
	GeeHashMap* _tmp0_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv = SEARCHES_BRANCH_GET_PRIVATE (self);
#line 8 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = gee_hash_map_new (TYPE_SAVED_SEARCH, (GBoxedCopyFunc) g_object_ref, g_object_unref, SEARCHES_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 8 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv->entry_map = _tmp0_;
#line 909 "Branch.c"
}


static void searches_branch_finalize (GObject* obj) {
	SearchesBranch * self;
	SavedSearchTable* _tmp0_ = NULL;
	SavedSearchTable* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	SavedSearchTable* _tmp3_ = NULL;
	SavedSearchTable* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEARCHES_TYPE_BRANCH, SearchesBranch);
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = saved_search_table_get_instance ();
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _tmp0_;
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_parse_name ("search-added", TYPE_SAVED_SEARCH_TABLE, &_tmp2_, NULL, FALSE);
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _searches_branch_on_saved_search_added_saved_search_table_search_added, self);
#line 28 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_saved_search_table_unref0 (_tmp1_);
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp3_ = saved_search_table_get_instance ();
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp4_ = _tmp3_;
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_parse_name ("search-removed", TYPE_SAVED_SEARCH_TABLE, &_tmp5_, NULL, FALSE);
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _searches_branch_on_saved_search_removed_saved_search_table_search_removed, self);
#line 29 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_saved_search_table_unref0 (_tmp4_);
#line 8 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->entry_map);
#line 7 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (searches_branch_parent_class)->finalize (obj);
#line 947 "Branch.c"
}


GType searches_branch_get_type (void) {
	static volatile gsize searches_branch_type_id__volatile = 0;
	if (g_once_init_enter (&searches_branch_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SearchesBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) searches_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SearchesBranch), 0, (GInstanceInitFunc) searches_branch_instance_init, NULL };
		GType searches_branch_type_id;
		searches_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "SearchesBranch", &g_define_type_info, 0);
		g_once_init_leave (&searches_branch_type_id__volatile, searches_branch_type_id);
	}
	return searches_branch_type_id__volatile;
}


SearchesHeader* searches_header_construct (GType object_type) {
	SearchesHeader * self = NULL;
	const gchar* _tmp0_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = _ ("Saved Searches");
#line 68 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = (SearchesHeader*) sidebar_header_construct (object_type, _tmp0_, TRUE);
#line 69 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_header_setup_context_menu (self);
#line 67 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return self;
#line 974 "Branch.c"
}


SearchesHeader* searches_header_new (void) {
#line 67 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return searches_header_construct (SEARCHES_TYPE_HEADER);
#line 981 "Branch.c"
}


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


static void searches_header_setup_context_menu (SearchesHeader* self) {
	GtkBuilder* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 72 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (SEARCHES_IS_HEADER (self));
#line 73 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = gtk_builder_new ();
#line 73 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->builder);
#line 73 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv->builder = _tmp0_;
#line 1003 "Branch.c"
	{
		GtkBuilder* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		GMenuModel* model = NULL;
		GtkBuilder* _tmp4_ = NULL;
		GObject* _tmp5_ = NULL;
		GMenuModel* _tmp6_ = NULL;
		GMenuModel* _tmp7_ = NULL;
		GtkMenu* _tmp8_ = NULL;
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp1_ = self->priv->builder;
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp2_ = resources_get_ui ("search_sidebar_context.ui");
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp3_ = _tmp2_;
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		gtk_builder_add_from_resource (_tmp1_, _tmp3_, &_inner_error_);
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_free0 (_tmp3_);
#line 75 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1026 "Branch.c"
			goto __catch76_g_error;
		}
#line 76 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp4_ = self->priv->builder;
#line 76 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp5_ = gtk_builder_get_object (_tmp4_, "popup-menu");
#line 76 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, g_menu_model_get_type ()) ? ((GMenuModel*) _tmp5_) : NULL);
#line 76 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		model = _tmp6_;
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp7_ = model;
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp8_ = (GtkMenu*) gtk_menu_new_from_model (_tmp7_);
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		g_object_ref_sink (_tmp8_);
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (self->priv->context_menu);
#line 77 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		self->priv->context_menu = _tmp8_;
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (model);
#line 1049 "Branch.c"
	}
	goto __finally76;
	__catch76_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		Application* _tmp13_ = NULL;
		Application* _tmp14_ = NULL;
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_error_ = _inner_error_;
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_inner_error_ = NULL;
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp9_ = _error_;
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp10_ = _tmp9_->message;
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp11_ = g_strdup_printf ("Error loading UI resource: %s", _tmp10_);
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp12_ = _tmp11_;
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		app_window_error_message (_tmp12_, NULL);
#line 79 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_free0 (_tmp12_);
#line 81 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp13_ = application_get_instance ();
#line 81 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp14_ = _tmp13_;
#line 81 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		application_panic (_tmp14_);
#line 81 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_application_unref0 (_tmp14_);
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_error_free0 (_error_);
#line 1087 "Branch.c"
	}
	__finally76:
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		g_clear_error (&_inner_error_);
#line 74 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		return;
#line 1098 "Branch.c"
	}
}


static GtkMenu* searches_header_real_get_sidebar_context_menu (SidebarContextable* base, GdkEventButton* event) {
	SearchesHeader * self;
	GtkMenu* result = NULL;
	GtkMenu* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_HEADER, SearchesHeader);
#line 86 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->context_menu;
#line 86 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 86 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = _tmp1_;
#line 86 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1118 "Branch.c"
}


static void searches_header_class_init (SearchesHeaderClass * klass) {
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_header_parent_class = g_type_class_peek_parent (klass);
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_type_class_add_private (klass, sizeof (SearchesHeaderPrivate));
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = searches_header_finalize;
#line 1129 "Branch.c"
}


static void searches_header_sidebar_contextable_interface_init (SidebarContextableIface * iface) {
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_header_sidebar_contextable_parent_iface = g_type_interface_peek_parent (iface);
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	iface->get_sidebar_context_menu = (GtkMenu* (*)(SidebarContextable*, GdkEventButton*)) searches_header_real_get_sidebar_context_menu;
#line 1138 "Branch.c"
}


static void searches_header_instance_init (SearchesHeader * self) {
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv = SEARCHES_HEADER_GET_PRIVATE (self);
#line 65 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv->context_menu = NULL;
#line 1147 "Branch.c"
}


static void searches_header_finalize (GObject* obj) {
	SearchesHeader * self;
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEARCHES_TYPE_HEADER, SearchesHeader);
#line 64 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->builder);
#line 65 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->context_menu);
#line 63 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (searches_header_parent_class)->finalize (obj);
#line 1161 "Branch.c"
}


GType searches_header_get_type (void) {
	static volatile gsize searches_header_type_id__volatile = 0;
	if (g_once_init_enter (&searches_header_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SearchesHeaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) searches_header_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SearchesHeader), 0, (GInstanceInitFunc) searches_header_instance_init, NULL };
		static const GInterfaceInfo sidebar_contextable_info = { (GInterfaceInitFunc) searches_header_sidebar_contextable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType searches_header_type_id;
		searches_header_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "SearchesHeader", &g_define_type_info, 0);
		g_type_add_interface_static (searches_header_type_id, SIDEBAR_TYPE_CONTEXTABLE, &sidebar_contextable_info);
		g_once_init_leave (&searches_header_type_id__volatile, searches_header_type_id);
	}
	return searches_header_type_id__volatile;
}


SearchesSidebarEntry* searches_sidebar_entry_construct (GType object_type, SavedSearch* search) {
	SearchesSidebarEntry * self = NULL;
	SavedSearch* _tmp0_ = NULL;
	SavedSearch* _tmp1_ = NULL;
#line 96 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (IS_SAVED_SEARCH (search), NULL);
#line 96 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = (SearchesSidebarEntry*) sidebar_simple_page_entry_construct (object_type);
#line 97 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = search;
#line 97 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 97 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->search);
#line 97 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv->search = _tmp1_;
#line 96 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return self;
#line 1197 "Branch.c"
}


SearchesSidebarEntry* searches_sidebar_entry_new (SavedSearch* search) {
#line 96 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return searches_sidebar_entry_construct (SEARCHES_TYPE_SIDEBAR_ENTRY, search);
#line 1204 "Branch.c"
}


void searches_sidebar_entry_init (void) {
}


void searches_sidebar_entry_terminate (void) {
}


SavedSearch* searches_sidebar_entry_for_saved_search (SearchesSidebarEntry* self) {
	SavedSearch* result = NULL;
	SavedSearch* _tmp0_ = NULL;
	SavedSearch* _tmp1_ = NULL;
#line 106 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_val_if_fail (SEARCHES_IS_SIDEBAR_ENTRY (self), NULL);
#line 107 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->search;
#line 107 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 107 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = _tmp1_;
#line 107 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1230 "Branch.c"
}


static gchar* searches_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
	SearchesSidebarEntry * self;
	gchar* result = NULL;
	SavedSearch* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 110 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 111 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->search;
#line 111 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 111 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = _tmp1_;
#line 111 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1249 "Branch.c"
}


static gchar* searches_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
	SearchesSidebarEntry * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 114 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 115 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = searches_sidebar_entry_single_search_icon;
#line 115 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 115 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = _tmp1_;
#line 115 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1268 "Branch.c"
}


static Page* searches_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) {
	SearchesSidebarEntry * self;
	Page* result = NULL;
	SavedSearch* _tmp0_ = NULL;
	SavedSearchPage* _tmp1_ = NULL;
#line 118 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 119 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->search;
#line 119 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = saved_search_page_new (_tmp0_);
#line 119 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_object_ref_sink (_tmp1_);
#line 119 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page);
#line 119 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1289 "Branch.c"
}


static gboolean searches_sidebar_entry_real_is_user_renameable (SidebarRenameableEntry* base) {
	SearchesSidebarEntry * self;
	gboolean result = FALSE;
#line 122 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 123 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	result = TRUE;
#line 123 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	return result;
#line 1302 "Branch.c"
}


static void searches_sidebar_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name) {
	SearchesSidebarEntry * self;
	SavedSearchTable* _tmp0_ = NULL;
	SavedSearchTable* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
#line 126 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 126 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_return_if_fail (new_name != NULL);
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = saved_search_table_get_instance ();
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = _tmp0_;
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp2_ = new_name;
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp3_ = saved_search_table_exists (_tmp1_, _tmp2_);
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp4_ = !_tmp3_;
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_saved_search_table_unref0 (_tmp1_);
#line 127 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	if (_tmp4_) {
#line 1331 "Branch.c"
		CommandManager* _tmp5_ = NULL;
		CommandManager* _tmp6_ = NULL;
		SavedSearch* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		RenameSavedSearchCommand* _tmp9_ = NULL;
		RenameSavedSearchCommand* _tmp10_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp5_ = app_window_get_command_manager ();
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp6_ = _tmp5_;
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp7_ = self->priv->search;
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp8_ = new_name;
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp9_ = rename_saved_search_command_new (_tmp7_, _tmp8_);
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp10_ = _tmp9_;
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		command_manager_execute (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_COMMAND, Command));
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (_tmp10_);
#line 128 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_command_manager_unref0 (_tmp6_);
#line 1356 "Branch.c"
	} else {
		const gchar* _tmp11_ = NULL;
		SavedSearch* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gboolean _tmp15_ = FALSE;
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp11_ = new_name;
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp12_ = self->priv->search;
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp13_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject));
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp14_ = _tmp13_;
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp15_ = g_strcmp0 (_tmp11_, _tmp14_) != 0;
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_free0 (_tmp14_);
#line 129 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		if (_tmp15_) {
#line 1377 "Branch.c"
			const gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			gchar* _tmp18_ = NULL;
#line 130 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp16_ = new_name;
#line 130 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp17_ = resources_rename_search_exists_message (_tmp16_);
#line 130 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_tmp18_ = _tmp17_;
#line 130 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			app_window_error_message (_tmp18_, NULL);
#line 130 "/home/jens/Source/shotwell/src/searches/Branch.vala"
			_g_free0 (_tmp18_);
#line 1391 "Branch.c"
		}
	}
}


static void searches_sidebar_entry_real_destroy_source (SidebarDestroyableEntry* base) {
	SearchesSidebarEntry * self;
	SavedSearch* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 133 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 134 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = self->priv->search;
#line 134 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp1_ = dialogs_confirm_delete_saved_search (_tmp0_);
#line 134 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	if (_tmp1_) {
#line 1409 "Branch.c"
		CommandManager* _tmp2_ = NULL;
		CommandManager* _tmp3_ = NULL;
		SavedSearch* _tmp4_ = NULL;
		DeleteSavedSearchCommand* _tmp5_ = NULL;
		DeleteSavedSearchCommand* _tmp6_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp2_ = app_window_get_command_manager ();
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp3_ = _tmp2_;
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp4_ = self->priv->search;
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp5_ = delete_saved_search_command_new (_tmp4_);
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_tmp6_ = _tmp5_;
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		command_manager_execute (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_COMMAND, Command));
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_g_object_unref0 (_tmp6_);
#line 135 "/home/jens/Source/shotwell/src/searches/Branch.vala"
		_command_manager_unref0 (_tmp3_);
#line 1431 "Branch.c"
	}
}


static void searches_sidebar_entry_class_init (SearchesSidebarEntryClass * klass) {
	gchar* _tmp0_ = NULL;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_sidebar_entry_parent_class = g_type_class_peek_parent (klass);
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	g_type_class_add_private (klass, sizeof (SearchesSidebarEntryPrivate));
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = searches_sidebar_entry_real_get_sidebar_name;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = searches_sidebar_entry_real_get_sidebar_icon;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	((SidebarSimplePageEntryClass *) klass)->create_page = searches_sidebar_entry_real_create_page;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (klass)->finalize = searches_sidebar_entry_finalize;
#line 92 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_tmp0_ = g_strdup ("find");
#line 92 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_sidebar_entry_single_search_icon = _tmp0_;
#line 1454 "Branch.c"
}


static void searches_sidebar_entry_sidebar_renameable_entry_interface_init (SidebarRenameableEntryIface * iface) {
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_sidebar_entry_sidebar_renameable_entry_parent_iface = g_type_interface_peek_parent (iface);
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	iface->is_user_renameable = (gboolean (*)(SidebarRenameableEntry*)) searches_sidebar_entry_real_is_user_renameable;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	iface->rename = (void (*)(SidebarRenameableEntry*, const gchar*)) searches_sidebar_entry_real_rename;
#line 1465 "Branch.c"
}


static void searches_sidebar_entry_sidebar_destroyable_entry_interface_init (SidebarDestroyableEntryIface * iface) {
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	searches_sidebar_entry_sidebar_destroyable_entry_parent_iface = g_type_interface_peek_parent (iface);
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	iface->destroy_source = (void (*)(SidebarDestroyableEntry*)) searches_sidebar_entry_real_destroy_source;
#line 1474 "Branch.c"
}


static void searches_sidebar_entry_instance_init (SearchesSidebarEntry * self) {
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self->priv = SEARCHES_SIDEBAR_ENTRY_GET_PRIVATE (self);
#line 1481 "Branch.c"
}


static void searches_sidebar_entry_finalize (GObject* obj) {
	SearchesSidebarEntry * self;
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEARCHES_TYPE_SIDEBAR_ENTRY, SearchesSidebarEntry);
#line 94 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	_g_object_unref0 (self->priv->search);
#line 90 "/home/jens/Source/shotwell/src/searches/Branch.vala"
	G_OBJECT_CLASS (searches_sidebar_entry_parent_class)->finalize (obj);
#line 1493 "Branch.c"
}


GType searches_sidebar_entry_get_type (void) {
	static volatile gsize searches_sidebar_entry_type_id__volatile = 0;
	if (g_once_init_enter (&searches_sidebar_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SearchesSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) searches_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SearchesSidebarEntry), 0, (GInstanceInitFunc) searches_sidebar_entry_instance_init, NULL };
		static const GInterfaceInfo sidebar_renameable_entry_info = { (GInterfaceInitFunc) searches_sidebar_entry_sidebar_renameable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo sidebar_destroyable_entry_info = { (GInterfaceInitFunc) searches_sidebar_entry_sidebar_destroyable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType searches_sidebar_entry_type_id;
		searches_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "SearchesSidebarEntry", &g_define_type_info, 0);
		g_type_add_interface_static (searches_sidebar_entry_type_id, SIDEBAR_TYPE_RENAMEABLE_ENTRY, &sidebar_renameable_entry_info);
		g_type_add_interface_static (searches_sidebar_entry_type_id, SIDEBAR_TYPE_DESTROYABLE_ENTRY, &sidebar_destroyable_entry_info);
		g_once_init_leave (&searches_sidebar_entry_type_id__volatile, searches_sidebar_entry_type_id);
	}
	return searches_sidebar_entry_type_id__volatile;
}