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
|
/* Branch.c generated by valac 0.34.2, the Vala compiler
* generated from Branch.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <gphoto2/gphoto2-camera.h>
#include <gphoto.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 CAMERA_TYPE_BRANCH (camera_branch_get_type ())
#define CAMERA_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_BRANCH, CameraBranch))
#define CAMERA_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_BRANCH, CameraBranchClass))
#define CAMERA_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_BRANCH))
#define CAMERA_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_BRANCH))
#define CAMERA_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_BRANCH, CameraBranchClass))
typedef struct _CameraBranch CameraBranch;
typedef struct _CameraBranchClass CameraBranchClass;
typedef struct _CameraBranchPrivate CameraBranchPrivate;
#define TYPE_DISCOVERED_CAMERA (discovered_camera_get_type ())
#define DISCOVERED_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DISCOVERED_CAMERA, DiscoveredCamera))
#define DISCOVERED_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DISCOVERED_CAMERA, DiscoveredCameraClass))
#define IS_DISCOVERED_CAMERA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DISCOVERED_CAMERA))
#define IS_DISCOVERED_CAMERA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DISCOVERED_CAMERA))
#define DISCOVERED_CAMERA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DISCOVERED_CAMERA, DiscoveredCameraClass))
typedef struct _DiscoveredCamera DiscoveredCamera;
typedef struct _DiscoveredCameraClass DiscoveredCameraClass;
#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 CAMERA_TYPE_SIDEBAR_ENTRY (camera_sidebar_entry_get_type ())
#define CAMERA_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry))
#define CAMERA_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryClass))
#define CAMERA_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_SIDEBAR_ENTRY))
#define CAMERA_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_SIDEBAR_ENTRY))
#define CAMERA_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryClass))
typedef struct _CameraSidebarEntry CameraSidebarEntry;
typedef struct _CameraSidebarEntryClass CameraSidebarEntryClass;
#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 CAMERA_TYPE_HEADER (camera_header_get_type ())
#define CAMERA_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMERA_TYPE_HEADER, CameraHeader))
#define CAMERA_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMERA_TYPE_HEADER, CameraHeaderClass))
#define CAMERA_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMERA_TYPE_HEADER))
#define CAMERA_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CAMERA_TYPE_HEADER))
#define CAMERA_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CAMERA_TYPE_HEADER, CameraHeaderClass))
typedef struct _CameraHeader CameraHeader;
typedef struct _CameraHeaderClass CameraHeaderClass;
#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 TYPE_CAMERA_TABLE (camera_table_get_type ())
#define CAMERA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CAMERA_TABLE, CameraTable))
#define CAMERA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CAMERA_TABLE, CameraTableClass))
#define IS_CAMERA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CAMERA_TABLE))
#define IS_CAMERA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CAMERA_TABLE))
#define CAMERA_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CAMERA_TABLE, CameraTableClass))
typedef struct _CameraTable CameraTable;
typedef struct _CameraTableClass CameraTableClass;
#define _camera_table_unref0(var) ((var == NULL) ? NULL : (var = (camera_table_unref (var), NULL)))
#define _discovered_camera_unref0(var) ((var == NULL) ? NULL : (var = (discovered_camera_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#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;
typedef struct _CameraHeaderPrivate CameraHeaderPrivate;
#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ())
#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry))
#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY))
#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface))
typedef struct _SidebarSelectableEntry SidebarSelectableEntry;
typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface;
#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ())
#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative))
#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE))
#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface))
typedef struct _SidebarPageRepresentative SidebarPageRepresentative;
typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface;
#define TYPE_PAGE (page_get_type ())
#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page))
#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass))
#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE))
#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE))
#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass))
typedef struct _Page Page;
typedef struct _PageClass PageClass;
#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ())
#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable))
#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE))
#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface))
typedef struct _SidebarContextable SidebarContextable;
typedef struct _SidebarContextableIface SidebarContextableIface;
typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate;
typedef struct _CameraSidebarEntryPrivate CameraSidebarEntryPrivate;
typedef struct _DiscoveredCameraPrivate DiscoveredCameraPrivate;
#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_IMPORT_PAGE (import_page_get_type ())
#define IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORT_PAGE, ImportPage))
#define IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORT_PAGE, ImportPageClass))
#define IS_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORT_PAGE))
#define IS_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORT_PAGE))
#define IMPORT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORT_PAGE, ImportPageClass))
typedef struct _ImportPage ImportPage;
typedef struct _ImportPageClass ImportPageClass;
#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 _CameraBranch {
SidebarBranch parent_instance;
CameraBranchPrivate * priv;
};
struct _CameraBranchClass {
SidebarBranchClass parent_class;
};
struct _CameraBranchPrivate {
GeeHashMap* camera_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 _CameraHeader {
SidebarHeader parent_instance;
CameraHeaderPrivate * priv;
};
struct _CameraHeaderClass {
SidebarHeaderClass parent_class;
};
struct _SidebarSelectableEntryIface {
GTypeInterface parent_iface;
};
struct _SidebarPageRepresentativeIface {
GTypeInterface parent_iface;
gboolean (*has_page) (SidebarPageRepresentative* self);
Page* (*get_page) (SidebarPageRepresentative* self);
};
struct _SidebarContextableIface {
GTypeInterface parent_iface;
GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event);
};
struct _SidebarSimplePageEntry {
GObject parent_instance;
SidebarSimplePageEntryPrivate * priv;
};
struct _SidebarSimplePageEntryClass {
GObjectClass parent_class;
gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self);
gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self);
gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self);
gchar* (*to_string) (SidebarSimplePageEntry* self);
Page* (*create_page) (SidebarSimplePageEntry* self);
};
struct _CameraSidebarEntry {
SidebarSimplePageEntry parent_instance;
CameraSidebarEntryPrivate * priv;
};
struct _CameraSidebarEntryClass {
SidebarSimplePageEntryClass parent_class;
};
struct _CameraSidebarEntryPrivate {
DiscoveredCamera* camera;
gchar* uri;
};
struct _DiscoveredCamera {
GTypeInstance parent_instance;
volatile int ref_count;
DiscoveredCameraPrivate * priv;
Camera* gcamera;
gchar* uri;
gchar* display_name;
gchar* icon;
};
struct _DiscoveredCameraClass {
GTypeClass parent_class;
void (*finalize) (DiscoveredCamera *self);
};
static gpointer camera_branch_parent_class = NULL;
extern gchar* camera_branch_cameras_icon;
gchar* camera_branch_cameras_icon = NULL;
static gpointer camera_header_parent_class = NULL;
static gpointer camera_sidebar_entry_parent_class = NULL;
GType sidebar_branch_get_type (void) G_GNUC_CONST;
GType camera_branch_get_type (void) G_GNUC_CONST;
gpointer discovered_camera_ref (gpointer instance);
void discovered_camera_unref (gpointer instance);
GParamSpec* param_spec_discovered_camera (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_discovered_camera (GValue* value, gpointer v_object);
void value_take_discovered_camera (GValue* value, gpointer v_object);
gpointer value_get_discovered_camera (const GValue* value);
GType discovered_camera_get_type (void) G_GNUC_CONST;
GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST;
GType camera_sidebar_entry_get_type (void) G_GNUC_CONST;
#define CAMERA_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAMERA_TYPE_BRANCH, CameraBranchPrivate))
enum {
CAMERA_BRANCH_DUMMY_PROPERTY
};
#define RESOURCES_ICON_CAMERAS "camera-photo"
CameraBranch* camera_branch_new (void);
CameraBranch* camera_branch_construct (GType object_type);
CameraHeader* camera_header_new (void);
CameraHeader* camera_header_construct (GType object_type);
GType sidebar_grouping_get_type (void) G_GNUC_CONST;
GType sidebar_header_get_type (void) G_GNUC_CONST;
GType camera_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 camera_branch_camera_comparator (SidebarEntry* a, SidebarEntry* b);
static gint _camera_branch_camera_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);
gpointer camera_table_ref (gpointer instance);
void camera_table_unref (gpointer instance);
GParamSpec* param_spec_camera_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_camera_table (GValue* value, gpointer v_object);
void value_take_camera_table (GValue* value, gpointer v_object);
gpointer value_get_camera_table (const GValue* value);
GType camera_table_get_type (void) G_GNUC_CONST;
CameraTable* camera_table_get_instance (void);
GeeIterable* camera_table_get_cameras (CameraTable* self);
static void camera_branch_add_camera (CameraBranch* self, DiscoveredCamera* camera);
static void camera_branch_on_camera_added (CameraBranch* self, DiscoveredCamera* camera);
static void _camera_branch_on_camera_added_camera_table_camera_added (CameraTable* _sender, DiscoveredCamera* camera, gpointer self);
static void camera_branch_on_camera_removed (CameraBranch* self, DiscoveredCamera* camera);
static void _camera_branch_on_camera_removed_camera_table_camera_removed (CameraTable* _sender, DiscoveredCamera* camera, gpointer self);
void camera_branch_init (void);
void camera_branch_terminate (void);
gchar* sidebar_entry_get_sidebar_name (SidebarEntry* self);
gchar* camera_sidebar_entry_get_uri (CameraSidebarEntry* self);
CameraSidebarEntry* camera_branch_get_entry_for_camera (CameraBranch* self, DiscoveredCamera* camera);
static void camera_branch_remove_camera (CameraBranch* self, DiscoveredCamera* camera);
CameraSidebarEntry* camera_sidebar_entry_new (DiscoveredCamera* camera);
CameraSidebarEntry* camera_sidebar_entry_construct (GType object_type, DiscoveredCamera* camera);
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 camera_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;
enum {
CAMERA_HEADER_DUMMY_PROPERTY
};
SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized);
SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized);
GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST;
GType page_get_type (void) G_GNUC_CONST;
GType sidebar_page_representative_get_type (void) G_GNUC_CONST;
GType sidebar_contextable_get_type (void) G_GNUC_CONST;
#define CAMERA_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntryPrivate))
enum {
CAMERA_SIDEBAR_ENTRY_DUMMY_PROPERTY
};
SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type);
static gchar* camera_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base);
static gchar* camera_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base);
static Page* camera_sidebar_entry_real_create_page (SidebarSimplePageEntry* base);
gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self);
gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self);
ImportPage* import_page_new (Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon);
ImportPage* import_page_construct (GType object_type, Camera* camera, const gchar* uri, const gchar* display_name, const gchar* icon);
GType checkerboard_page_get_type (void) G_GNUC_CONST;
GType import_page_get_type (void) G_GNUC_CONST;
static void camera_sidebar_entry_finalize (GObject* obj);
static gint _camera_branch_camera_comparator_gcompare_func (gconstpointer a, gconstpointer b) {
gint result;
result = camera_branch_camera_comparator ((SidebarEntry*) a, (SidebarEntry*) b);
#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 465 "Branch.c"
}
static void _camera_branch_on_camera_added_camera_table_camera_added (CameraTable* _sender, DiscoveredCamera* camera, gpointer self) {
#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_on_camera_added ((CameraBranch*) self, camera);
#line 472 "Branch.c"
}
static void _camera_branch_on_camera_removed_camera_table_camera_removed (CameraTable* _sender, DiscoveredCamera* camera, gpointer self) {
#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_on_camera_removed ((CameraBranch*) self, camera);
#line 479 "Branch.c"
}
CameraBranch* camera_branch_construct (GType object_type) {
CameraBranch * self = NULL;
CameraHeader* _tmp0_ = NULL;
CameraHeader* _tmp1_ = NULL;
CameraTable* _tmp13_ = NULL;
CameraTable* _tmp14_ = NULL;
CameraTable* _tmp15_ = NULL;
CameraTable* _tmp16_ = NULL;
#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = camera_header_new ();
#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = _tmp0_;
#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = (CameraBranch*) 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, _camera_branch_camera_comparator_gcompare_func, NULL);
#line 14 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (_tmp1_);
#line 499 "Branch.c"
{
GeeIterator* _camera_it = NULL;
CameraTable* _tmp2_ = NULL;
CameraTable* _tmp3_ = NULL;
GeeIterable* _tmp4_ = NULL;
GeeIterable* _tmp5_ = NULL;
GeeIterator* _tmp6_ = NULL;
GeeIterator* _tmp7_ = NULL;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = camera_table_get_instance ();
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = _tmp2_;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = camera_table_get_cameras (_tmp3_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp5_ = _tmp4_;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp6_ = gee_iterable_iterator (_tmp5_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp7_ = _tmp6_;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (_tmp5_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_camera_table_unref0 (_tmp3_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_camera_it = _tmp7_;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
while (TRUE) {
#line 528 "Branch.c"
GeeIterator* _tmp8_ = NULL;
gboolean _tmp9_ = FALSE;
DiscoveredCamera* camera = NULL;
GeeIterator* _tmp10_ = NULL;
gpointer _tmp11_ = NULL;
DiscoveredCamera* _tmp12_ = NULL;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp8_ = _camera_it;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp9_ = gee_iterator_next (_tmp8_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (!_tmp9_) {
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
break;
#line 543 "Branch.c"
}
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp10_ = _camera_it;
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp11_ = gee_iterator_get (_tmp10_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera = (DiscoveredCamera*) _tmp11_;
#line 19 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp12_ = camera;
#line 19 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_add_camera (self, _tmp12_);
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_discovered_camera_unref0 (camera);
#line 557 "Branch.c"
}
#line 18 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (_camera_it);
#line 561 "Branch.c"
}
#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp13_ = camera_table_get_instance ();
#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp14_ = _tmp13_;
#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_signal_connect_object (_tmp14_, "camera-added", (GCallback) _camera_branch_on_camera_added_camera_table_camera_added, self, 0);
#line 21 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_camera_table_unref0 (_tmp14_);
#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp15_ = camera_table_get_instance ();
#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp16_ = _tmp15_;
#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_signal_connect_object (_tmp16_, "camera-removed", (GCallback) _camera_branch_on_camera_removed_camera_table_camera_removed, self, 0);
#line 22 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_camera_table_unref0 (_tmp16_);
#line 13 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return self;
#line 581 "Branch.c"
}
CameraBranch* camera_branch_new (void) {
#line 13 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return camera_branch_construct (CAMERA_TYPE_BRANCH);
#line 588 "Branch.c"
}
void camera_branch_init (void) {
}
void camera_branch_terminate (void) {
}
static gpointer _g_object_ref0 (gpointer self) {
#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return self ? g_object_ref (self) : NULL;
#line 603 "Branch.c"
}
static gint camera_branch_camera_comparator (SidebarEntry* a, SidebarEntry* b) {
gint result = 0;
SidebarEntry* _tmp0_ = NULL;
SidebarEntry* _tmp1_ = NULL;
gint ret = 0;
SidebarEntry* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
SidebarEntry* _tmp5_ = NULL;
gchar* _tmp6_ = NULL;
gchar* _tmp7_ = NULL;
gint _tmp8_ = 0;
gint _tmp9_ = 0;
gint _tmp10_ = 0;
#line 31 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0);
#line 31 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0);
#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = a;
#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = b;
#line 32 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (_tmp0_ == _tmp1_) {
#line 33 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = 0;
#line 33 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 635 "Branch.c"
}
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = a;
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = sidebar_entry_get_sidebar_name (_tmp2_);
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = _tmp3_;
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp5_ = b;
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp6_ = sidebar_entry_get_sidebar_name (_tmp5_);
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp7_ = _tmp6_;
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp8_ = g_utf8_collate (_tmp4_, _tmp7_);
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp9_ = _tmp8_;
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp7_);
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp4_);
#line 36 "/home/jens/Source/shotwell/src/camera/Branch.vala"
ret = _tmp9_;
#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp10_ = ret;
#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (_tmp10_ == 0) {
#line 663 "Branch.c"
CameraSidebarEntry* cam_a = NULL;
SidebarEntry* _tmp11_ = NULL;
CameraSidebarEntry* _tmp12_ = NULL;
CameraSidebarEntry* cam_b = NULL;
SidebarEntry* _tmp13_ = NULL;
CameraSidebarEntry* _tmp14_ = NULL;
gboolean _tmp15_ = FALSE;
CameraSidebarEntry* _tmp16_ = NULL;
CameraSidebarEntry* _tmp18_ = NULL;
gchar* _tmp19_ = NULL;
gchar* _tmp20_ = NULL;
CameraSidebarEntry* _tmp21_ = NULL;
gchar* _tmp22_ = NULL;
gchar* _tmp23_ = NULL;
gint _tmp24_ = 0;
#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp11_ = a;
#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, CAMERA_TYPE_SIDEBAR_ENTRY) ? ((CameraSidebarEntry*) _tmp11_) : NULL);
#line 39 "/home/jens/Source/shotwell/src/camera/Branch.vala"
cam_a = _tmp12_;
#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp13_ = b;
#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, CAMERA_TYPE_SIDEBAR_ENTRY) ? ((CameraSidebarEntry*) _tmp13_) : NULL);
#line 40 "/home/jens/Source/shotwell/src/camera/Branch.vala"
cam_b = _tmp14_;
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp16_ = cam_a;
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (_tmp16_ != NULL) {
#line 695 "Branch.c"
CameraSidebarEntry* _tmp17_ = NULL;
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp17_ = cam_b;
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp15_ = _tmp17_ != NULL;
#line 701 "Branch.c"
} else {
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp15_ = FALSE;
#line 705 "Branch.c"
}
#line 41 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_vala_assert (_tmp15_, "cam_a != null && cam_b != null");
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp18_ = cam_a;
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp19_ = camera_sidebar_entry_get_uri (_tmp18_);
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp20_ = _tmp19_;
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp21_ = cam_b;
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp22_ = camera_sidebar_entry_get_uri (_tmp21_);
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp23_ = _tmp22_;
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp24_ = g_utf8_collate (_tmp20_, _tmp23_);
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
ret = _tmp24_;
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp23_);
#line 42 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp20_);
#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (cam_b);
#line 37 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (cam_a);
#line 733 "Branch.c"
}
#line 45 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = ret;
#line 45 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 739 "Branch.c"
}
CameraSidebarEntry* camera_branch_get_entry_for_camera (CameraBranch* self, DiscoveredCamera* camera) {
CameraSidebarEntry* result = NULL;
GeeHashMap* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
#line 48 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (CAMERA_IS_BRANCH (self), NULL);
#line 48 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (IS_DISCOVERED_CAMERA (camera), NULL);
#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = self->priv->camera_map;
#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = camera;
#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = (CameraSidebarEntry*) _tmp2_;
#line 49 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 762 "Branch.c"
}
static void camera_branch_on_camera_added (CameraBranch* self, DiscoveredCamera* camera) {
DiscoveredCamera* _tmp0_ = NULL;
#line 52 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (CAMERA_IS_BRANCH (self));
#line 52 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (IS_DISCOVERED_CAMERA (camera));
#line 53 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = camera;
#line 53 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_add_camera (self, _tmp0_);
#line 776 "Branch.c"
}
static void camera_branch_on_camera_removed (CameraBranch* self, DiscoveredCamera* camera) {
DiscoveredCamera* _tmp0_ = NULL;
#line 56 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (CAMERA_IS_BRANCH (self));
#line 56 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (IS_DISCOVERED_CAMERA (camera));
#line 57 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = camera;
#line 57 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_remove_camera (self, _tmp0_);
#line 790 "Branch.c"
}
static void camera_branch_add_camera (CameraBranch* self, DiscoveredCamera* camera) {
GeeHashMap* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
CameraSidebarEntry* entry = NULL;
DiscoveredCamera* _tmp3_ = NULL;
CameraSidebarEntry* _tmp4_ = NULL;
GeeHashMap* _tmp5_ = NULL;
DiscoveredCamera* _tmp6_ = NULL;
SidebarEntry* _tmp7_ = NULL;
SidebarEntry* _tmp8_ = NULL;
#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (CAMERA_IS_BRANCH (self));
#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (IS_DISCOVERED_CAMERA (camera));
#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = self->priv->camera_map;
#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = camera;
#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 61 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_vala_assert (!_tmp2_, "!camera_map.has_key(camera)");
#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = camera;
#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = camera_sidebar_entry_new (_tmp3_);
#line 63 "/home/jens/Source/shotwell/src/camera/Branch.vala"
entry = _tmp4_;
#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp5_ = self->priv->camera_map;
#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp6_ = camera;
#line 64 "/home/jens/Source/shotwell/src/camera/Branch.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp6_, entry);
#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp7_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch));
#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp8_ = _tmp7_;
#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala"
sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp8_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL);
#line 67 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (_tmp8_);
#line 60 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (entry);
#line 839 "Branch.c"
}
static void camera_branch_remove_camera (CameraBranch* self, DiscoveredCamera* camera) {
GeeHashMap* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
CameraSidebarEntry* entry = NULL;
GeeHashMap* _tmp3_ = NULL;
DiscoveredCamera* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
gboolean removed = FALSE;
GeeHashMap* _tmp6_ = NULL;
DiscoveredCamera* _tmp7_ = NULL;
gboolean _tmp8_ = FALSE;
#line 70 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (CAMERA_IS_BRANCH (self));
#line 70 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_if_fail (IS_DISCOVERED_CAMERA (camera));
#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = self->priv->camera_map;
#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = camera;
#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 71 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_vala_assert (_tmp2_, "camera_map.has_key(camera)");
#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = self->priv->camera_map;
#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = camera;
#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_);
#line 73 "/home/jens/Source/shotwell/src/camera/Branch.vala"
entry = (CameraSidebarEntry*) _tmp5_;
#line 74 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_vala_assert (entry != NULL, "entry != null");
#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp6_ = self->priv->camera_map;
#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp7_ = camera;
#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp8_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_, NULL);
#line 76 "/home/jens/Source/shotwell/src/camera/Branch.vala"
removed = _tmp8_;
#line 77 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_vala_assert (removed, "removed");
#line 79 "/home/jens/Source/shotwell/src/camera/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 70 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (entry);
#line 891 "Branch.c"
}
static void camera_branch_class_init (CameraBranchClass * klass) {
gchar* _tmp0_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_type_class_add_private (klass, sizeof (CameraBranchPrivate));
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
G_OBJECT_CLASS (klass)->finalize = camera_branch_finalize;
#line 8 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = g_strdup (RESOURCES_ICON_CAMERAS);
#line 8 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_branch_cameras_icon = _tmp0_;
#line 907 "Branch.c"
}
static void camera_branch_instance_init (CameraBranch * self) {
GeeHashMap* _tmp0_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self->priv = CAMERA_BRANCH_GET_PRIVATE (self);
#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = gee_hash_map_new (TYPE_DISCOVERED_CAMERA, (GBoxedCopyFunc) discovered_camera_ref, discovered_camera_unref, CAMERA_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self->priv->camera_map = _tmp0_;
#line 919 "Branch.c"
}
static void camera_branch_finalize (GObject* obj) {
CameraBranch * self;
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, CAMERA_TYPE_BRANCH, CameraBranch);
#line 10 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_object_unref0 (self->priv->camera_map);
#line 7 "/home/jens/Source/shotwell/src/camera/Branch.vala"
G_OBJECT_CLASS (camera_branch_parent_class)->finalize (obj);
#line 931 "Branch.c"
}
GType camera_branch_get_type (void) {
static volatile gsize camera_branch_type_id__volatile = 0;
if (g_once_init_enter (&camera_branch_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CameraBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraBranch), 0, (GInstanceInitFunc) camera_branch_instance_init, NULL };
GType camera_branch_type_id;
camera_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "CameraBranch", &g_define_type_info, 0);
g_once_init_leave (&camera_branch_type_id__volatile, camera_branch_type_id);
}
return camera_branch_type_id__volatile;
}
CameraHeader* camera_header_construct (GType object_type) {
CameraHeader * self = NULL;
const gchar* _tmp0_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = _ ("Cameras");
#line 85 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = (CameraHeader*) sidebar_header_construct (object_type, _tmp0_, TRUE);
#line 84 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return self;
#line 956 "Branch.c"
}
CameraHeader* camera_header_new (void) {
#line 84 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return camera_header_construct (CAMERA_TYPE_HEADER);
#line 963 "Branch.c"
}
static void camera_header_class_init (CameraHeaderClass * klass) {
#line 83 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_header_parent_class = g_type_class_peek_parent (klass);
#line 970 "Branch.c"
}
static void camera_header_instance_init (CameraHeader * self) {
}
GType camera_header_get_type (void) {
static volatile gsize camera_header_type_id__volatile = 0;
if (g_once_init_enter (&camera_header_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CameraHeaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_header_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraHeader), 0, (GInstanceInitFunc) camera_header_instance_init, NULL };
GType camera_header_type_id;
camera_header_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "CameraHeader", &g_define_type_info, 0);
g_once_init_leave (&camera_header_type_id__volatile, camera_header_type_id);
}
return camera_header_type_id__volatile;
}
static gpointer _discovered_camera_ref0 (gpointer self) {
#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return self ? discovered_camera_ref (self) : NULL;
#line 993 "Branch.c"
}
CameraSidebarEntry* camera_sidebar_entry_construct (GType object_type, DiscoveredCamera* camera) {
CameraSidebarEntry * self = NULL;
DiscoveredCamera* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
DiscoveredCamera* _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (IS_DISCOVERED_CAMERA (camera), NULL);
#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = (CameraSidebarEntry*) sidebar_simple_page_entry_construct (object_type);
#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = camera;
#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = _discovered_camera_ref0 (_tmp0_);
#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_discovered_camera_unref0 (self->priv->camera);
#line 94 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self->priv->camera = _tmp1_;
#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = camera;
#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = _tmp2_->uri;
#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = g_strdup (_tmp3_);
#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (self->priv->uri);
#line 95 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self->priv->uri = _tmp4_;
#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return self;
#line 1028 "Branch.c"
}
CameraSidebarEntry* camera_sidebar_entry_new (DiscoveredCamera* camera) {
#line 93 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return camera_sidebar_entry_construct (CAMERA_TYPE_SIDEBAR_ENTRY, camera);
#line 1035 "Branch.c"
}
static gchar* camera_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) {
CameraSidebarEntry * self;
gchar* result = NULL;
const gchar* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gchar* _tmp4_ = NULL;
#line 98 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry);
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = self->priv->camera;
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = _tmp1_->display_name;
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = _tmp2_;
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (_tmp0_ == NULL) {
#line 1056 "Branch.c"
const gchar* _tmp3_ = NULL;
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = _ ("Camera");
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = _tmp3_;
#line 1062 "Branch.c"
}
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = g_strdup (_tmp0_);
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = _tmp4_;
#line 99 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 1070 "Branch.c"
}
static gchar* camera_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) {
CameraSidebarEntry * self;
gchar* result = NULL;
const gchar* _tmp0_ = NULL;
DiscoveredCamera* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gchar* _tmp4_ = NULL;
#line 102 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry);
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = self->priv->camera;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = _tmp1_->icon;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = _tmp2_;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
if (_tmp0_ == NULL) {
#line 1091 "Branch.c"
const gchar* _tmp3_ = NULL;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = camera_branch_cameras_icon;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = _tmp3_;
#line 1097 "Branch.c"
}
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = g_strdup (_tmp0_);
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = _tmp4_;
#line 103 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 1105 "Branch.c"
}
static Page* camera_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) {
CameraSidebarEntry * self;
Page* result = NULL;
DiscoveredCamera* _tmp0_ = NULL;
Camera* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
gchar* _tmp6_ = NULL;
ImportPage* _tmp7_ = NULL;
Page* _tmp8_ = NULL;
#line 106 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = self->priv->camera;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = _tmp0_->gcamera;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp2_ = self->priv->uri;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp3_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry));
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp4_ = _tmp3_;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp5_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry));
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp6_ = _tmp5_;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp7_ = import_page_new (_tmp1_, _tmp2_, _tmp4_, _tmp6_);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_object_ref_sink (_tmp7_);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PAGE, Page);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp6_);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (_tmp4_);
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = _tmp8_;
#line 107 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 1151 "Branch.c"
}
gchar* camera_sidebar_entry_get_uri (CameraSidebarEntry* self) {
gchar* result = NULL;
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
#line 110 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_return_val_if_fail (CAMERA_IS_SIDEBAR_ENTRY (self), NULL);
#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp0_ = self->priv->uri;
#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_tmp1_ = g_strdup (_tmp0_);
#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala"
result = _tmp1_;
#line 111 "/home/jens/Source/shotwell/src/camera/Branch.vala"
return result;
#line 1169 "Branch.c"
}
static void camera_sidebar_entry_class_init (CameraSidebarEntryClass * klass) {
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
camera_sidebar_entry_parent_class = g_type_class_peek_parent (klass);
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
g_type_class_add_private (klass, sizeof (CameraSidebarEntryPrivate));
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = camera_sidebar_entry_real_get_sidebar_name;
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = camera_sidebar_entry_real_get_sidebar_icon;
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
((SidebarSimplePageEntryClass *) klass)->create_page = camera_sidebar_entry_real_create_page;
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
G_OBJECT_CLASS (klass)->finalize = camera_sidebar_entry_finalize;
#line 1186 "Branch.c"
}
static void camera_sidebar_entry_instance_init (CameraSidebarEntry * self) {
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self->priv = CAMERA_SIDEBAR_ENTRY_GET_PRIVATE (self);
#line 1193 "Branch.c"
}
static void camera_sidebar_entry_finalize (GObject* obj) {
CameraSidebarEntry * self;
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, CAMERA_TYPE_SIDEBAR_ENTRY, CameraSidebarEntry);
#line 90 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_discovered_camera_unref0 (self->priv->camera);
#line 91 "/home/jens/Source/shotwell/src/camera/Branch.vala"
_g_free0 (self->priv->uri);
#line 89 "/home/jens/Source/shotwell/src/camera/Branch.vala"
G_OBJECT_CLASS (camera_sidebar_entry_parent_class)->finalize (obj);
#line 1207 "Branch.c"
}
GType camera_sidebar_entry_get_type (void) {
static volatile gsize camera_sidebar_entry_type_id__volatile = 0;
if (g_once_init_enter (&camera_sidebar_entry_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (CameraSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) camera_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CameraSidebarEntry), 0, (GInstanceInitFunc) camera_sidebar_entry_instance_init, NULL };
GType camera_sidebar_entry_type_id;
camera_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "CameraSidebarEntry", &g_define_type_info, 0);
g_once_init_leave (&camera_sidebar_entry_type_id__volatile, camera_sidebar_entry_type_id);
}
return camera_sidebar_entry_type_id__volatile;
}
|