1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
|
/* ExportDialog.c generated by valac 0.40.4, the Vala compiler
* generated from ExportDialog.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
* Copyright 2017 Jens Georg <mail@jensge.org>
*
* 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 <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#define TYPE_EXPORT_DIALOG (export_dialog_get_type ())
#define EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORT_DIALOG, ExportDialog))
#define EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORT_DIALOG, ExportDialogClass))
#define IS_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORT_DIALOG))
#define IS_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORT_DIALOG))
#define EXPORT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORT_DIALOG, ExportDialogClass))
typedef struct _ExportDialog ExportDialog;
typedef struct _ExportDialogClass ExportDialogClass;
typedef struct _ExportDialogPrivate ExportDialogPrivate;
enum {
EXPORT_DIALOG_0_PROPERTY,
EXPORT_DIALOG_NUM_PROPERTIES
};
static GParamSpec* export_dialog_properties[EXPORT_DIALOG_NUM_PROPERTIES];
#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ())
#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ())
#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
typedef struct _ExportFormatParameters ExportFormatParameters;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
typedef struct _ConfigurationFacade ConfigurationFacade;
typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;
#define CONFIG_TYPE_FACADE (config_facade_get_type ())
#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))
typedef struct _ConfigFacade ConfigFacade;
typedef struct _ConfigFacadeClass ConfigFacadeClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define TYPE_PHOTO_FILE_FORMAT_PROPERTIES (photo_file_format_properties_get_type ())
#define PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties))
#define PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define IS_PHOTO_FILE_FORMAT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_FILE_FORMAT_PROPERTIES))
#define PHOTO_FILE_FORMAT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatPropertiesClass))
typedef struct _PhotoFileFormatProperties PhotoFileFormatProperties;
typedef struct _PhotoFileFormatPropertiesClass PhotoFileFormatPropertiesClass;
#define _photo_file_format_properties_unref0(var) ((var == NULL) ? NULL : (var = (photo_file_format_properties_unref (var), NULL)))
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _ExportDialog {
GtkDialog parent_instance;
ExportDialogPrivate * priv;
};
struct _ExportDialogClass {
GtkDialogClass parent_class;
};
struct _ExportDialogPrivate {
GtkGrid* table;
GtkComboBoxText* quality_combo;
GtkComboBoxText* constraint_combo;
GtkComboBoxText* format_combo;
GtkSwitch* export_metadata;
GeeArrayList* format_options;
GtkEntry* pixels_entry;
GtkWidget* ok_button;
gboolean in_insert;
};
typedef enum {
SCALE_CONSTRAINT_ORIGINAL,
SCALE_CONSTRAINT_DIMENSIONS,
SCALE_CONSTRAINT_WIDTH,
SCALE_CONSTRAINT_HEIGHT,
SCALE_CONSTRAINT_FILL_VIEWPORT
} ScaleConstraint;
typedef enum {
EXPORT_FORMAT_MODE_UNMODIFIED,
EXPORT_FORMAT_MODE_CURRENT,
EXPORT_FORMAT_MODE_SPECIFIED,
EXPORT_FORMAT_MODE_LAST
} ExportFormatMode;
typedef enum {
PHOTO_FILE_FORMAT_JFIF,
PHOTO_FILE_FORMAT_RAW,
PHOTO_FILE_FORMAT_PNG,
PHOTO_FILE_FORMAT_TIFF,
PHOTO_FILE_FORMAT_BMP,
PHOTO_FILE_FORMAT_UNKNOWN
} PhotoFileFormat;
typedef enum {
JPEG_QUALITY_LOW = 50,
JPEG_QUALITY_MEDIUM = 75,
JPEG_QUALITY_HIGH = 90,
JPEG_QUALITY_MAXIMUM = 100
} JpegQuality;
struct _ExportFormatParameters {
ExportFormatMode mode;
PhotoFileFormat specified_format;
JpegQuality quality;
gboolean export_metadata;
};
static gpointer export_dialog_parent_class = NULL;
static ScaleConstraint export_dialog_current_constraint;
static ScaleConstraint export_dialog_current_constraint = SCALE_CONSTRAINT_ORIGINAL;
static ExportFormatParameters export_dialog_current_parameters;
static ExportFormatParameters export_dialog_current_parameters = {0};
static gint export_dialog_current_scale;
static gint export_dialog_current_scale = 0;
GType export_dialog_get_type (void) G_GNUC_CONST;
#define EXPORT_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EXPORT_DIALOG, ExportDialogPrivate))
GType scale_constraint_get_type (void) G_GNUC_CONST;
GType export_format_parameters_get_type (void) G_GNUC_CONST;
GType export_format_mode_get_type (void) G_GNUC_CONST;
GType photo_file_format_get_type (void) G_GNUC_CONST;
GType jpeg_quality_get_type (void) G_GNUC_CONST;
ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self);
void export_format_parameters_free (ExportFormatParameters* self);
void export_format_parameters_current (ExportFormatParameters* result);
#define EXPORT_DIALOG_DEFAULT_SCALE 1200
#define EXPORT_DIALOG_NUM_SPECIAL_FORMATS 2
#define EXPORT_DIALOG_UNMODIFIED_FORMAT_LABEL _ ("Unmodified")
#define EXPORT_DIALOG_CURRENT_FORMAT_LABEL _ ("Current")
ExportDialog* export_dialog_new (const gchar* title);
ExportDialog* export_dialog_construct (GType object_type,
const gchar* title);
gint resources_use_header_bar (void);
GType configuration_facade_get_type (void) G_GNUC_CONST;
GType config_facade_get_type (void) G_GNUC_CONST;
ConfigFacade* config_facade_get_instance (void);
ExportFormatMode configuration_facade_get_export_export_format_mode (ConfigurationFacade* self);
PhotoFileFormat configuration_facade_get_export_photo_file_format (ConfigurationFacade* self);
JpegQuality configuration_facade_get_export_quality (ConfigurationFacade* self);
gboolean configuration_facade_get_export_export_metadata (ConfigurationFacade* self);
ScaleConstraint configuration_facade_get_export_constraint (ConfigurationFacade* self);
gint configuration_facade_get_export_scale (ConfigurationFacade* self);
gchar* jpeg_quality_to_string (JpegQuality self);
gchar* scale_constraint_to_string (ScaleConstraint self);
static void export_dialog_format_add_option (ExportDialog* self,
const gchar* format_name);
PhotoFileFormat* photo_file_format_get_writeable (int* result_length1);
gpointer photo_file_format_properties_ref (gpointer instance);
void photo_file_format_properties_unref (gpointer instance);
GParamSpec* param_spec_photo_file_format_properties (const gchar* name,
const gchar* nick,
const gchar* blurb,
GType object_type,
GParamFlags flags);
void value_set_photo_file_format_properties (GValue* value,
gpointer v_object);
void value_take_photo_file_format_properties (GValue* value,
gpointer v_object);
gpointer value_get_photo_file_format_properties (const GValue* value);
GType photo_file_format_properties_get_type (void) G_GNUC_CONST;
PhotoFileFormatProperties* photo_file_format_get_properties (PhotoFileFormat self);
gchar* photo_file_format_properties_get_user_visible_name (PhotoFileFormatProperties* self);
static void export_dialog_on_constraint_changed (ExportDialog* self);
static void _export_dialog_on_constraint_changed_gtk_combo_box_changed (GtkComboBox* _sender,
gpointer self);
static void export_dialog_on_format_changed (ExportDialog* self);
static void _export_dialog_on_format_changed_gtk_combo_box_changed (GtkComboBox* _sender,
gpointer self);
static void export_dialog_on_pixels_changed (ExportDialog* self);
static void _export_dialog_on_pixels_changed_gtk_editable_changed (GtkEditable* _sender,
gpointer self);
static void export_dialog_on_pixels_insert_text (ExportDialog* self,
const gchar* text,
gint length,
gint* position);
static void _export_dialog_on_pixels_insert_text_gtk_editable_insert_text (GtkEditable* _sender,
const gchar* new_text,
gint new_text_length,
gint* position,
gpointer self);
static void export_dialog_on_activate (ExportDialog* self);
static void _export_dialog_on_activate_gtk_entry_activate (GtkEntry* _sender,
gpointer self);
static void export_dialog_add_label (ExportDialog* self,
const gchar* text,
gint x,
gint y,
GtkWidget* widget);
static void export_dialog_add_control (ExportDialog* self,
GtkWidget* widget,
gint x,
gint y);
#define RESOURCES_CANCEL_LABEL _ ("_Cancel")
#define RESOURCES_OK_LABEL _ ("_OK")
static void export_dialog_format_set_active_text (ExportDialog* self,
const gchar* text);
static PhotoFileFormat export_dialog_get_specified_format (ExportDialog* self);
static gchar* export_dialog_get_label_for_parameters (ExportDialog* self,
ExportFormatParameters* params);
gboolean export_dialog_execute (ExportDialog* self,
gint* scale,
ScaleConstraint* constraint,
ExportFormatParameters* parameters);
gboolean photo_file_format_can_write (PhotoFileFormat self);
PhotoFileFormat photo_file_format_get_system_default_format (void);
void configuration_facade_set_export_export_format_mode (ConfigurationFacade* self,
ExportFormatMode export_format_mode);
void configuration_facade_set_export_photo_file_format (ConfigurationFacade* self,
PhotoFileFormat photo_file_format);
void configuration_facade_set_export_quality (ConfigurationFacade* self,
JpegQuality quality);
void configuration_facade_set_export_export_metadata (ConfigurationFacade* self,
gboolean export_metadata);
void configuration_facade_set_export_constraint (ConfigurationFacade* self,
ScaleConstraint constraint);
void configuration_facade_set_export_scale (ConfigurationFacade* self,
gint scale);
static void export_dialog_finalize (GObject * obj);
const ScaleConstraint EXPORT_DIALOG_CONSTRAINT_ARRAY[4] = {SCALE_CONSTRAINT_ORIGINAL, SCALE_CONSTRAINT_DIMENSIONS, SCALE_CONSTRAINT_WIDTH, SCALE_CONSTRAINT_HEIGHT};
const JpegQuality EXPORT_DIALOG_QUALITY_ARRAY[4] = {JPEG_QUALITY_LOW, JPEG_QUALITY_MEDIUM, JPEG_QUALITY_HIGH, JPEG_QUALITY_MAXIMUM};
static void
_export_dialog_on_constraint_changed_gtk_combo_box_changed (GtkComboBox* _sender,
gpointer self)
{
#line 83 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_constraint_changed ((ExportDialog*) self);
#line 267 "ExportDialog.c"
}
static void
_export_dialog_on_format_changed_gtk_combo_box_changed (GtkComboBox* _sender,
gpointer self)
{
#line 84 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_format_changed ((ExportDialog*) self);
#line 277 "ExportDialog.c"
}
static void
_export_dialog_on_pixels_changed_gtk_editable_changed (GtkEditable* _sender,
gpointer self)
{
#line 85 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_pixels_changed ((ExportDialog*) self);
#line 287 "ExportDialog.c"
}
static void
_export_dialog_on_pixels_insert_text_gtk_editable_insert_text (GtkEditable* _sender,
const gchar* new_text,
gint new_text_length,
gint* position,
gpointer self)
{
#line 86 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_pixels_insert_text ((ExportDialog*) self, new_text, new_text_length, position);
#line 300 "ExportDialog.c"
}
static void
_export_dialog_on_activate_gtk_entry_activate (GtkEntry* _sender,
gpointer self)
{
#line 87 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_activate ((ExportDialog*) self);
#line 310 "ExportDialog.c"
}
static gpointer
_g_object_ref0 (gpointer self)
{
#line 116 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return self ? g_object_ref (self) : NULL;
#line 319 "ExportDialog.c"
}
ExportDialog*
export_dialog_construct (GType object_type,
const gchar* title)
{
ExportDialog * self = NULL;
ConfigFacade* config = NULL;
ConfigFacade* _tmp0_;
ConfigFacade* _tmp1_;
ConfigFacade* _tmp2_;
ConfigFacade* _tmp3_;
ConfigFacade* _tmp4_;
ConfigFacade* _tmp5_;
ConfigFacade* _tmp6_;
GtkComboBoxText* _tmp7_;
gint ctr = 0;
GtkComboBoxText* _tmp18_;
GtkComboBoxText* _tmp28_;
gint _tmp29_;
PhotoFileFormat* _tmp30_;
GtkEntry* _tmp36_;
GtkEntry* _tmp37_;
GtkEntry* _tmp38_;
gint _tmp39_;
gchar* _tmp40_;
gchar* _tmp41_;
GtkComboBoxText* _tmp42_;
GtkComboBoxText* _tmp43_;
GtkEntry* _tmp44_;
GtkEntry* _tmp45_;
GtkEntry* _tmp46_;
GtkComboBoxText* _tmp47_;
GtkComboBoxText* _tmp48_;
GtkComboBoxText* _tmp49_;
GtkComboBoxText* _tmp50_;
GtkComboBoxText* _tmp51_;
GtkComboBoxText* _tmp52_;
GtkEntry* _tmp53_;
GtkEntry* _tmp54_;
GtkSwitch* _tmp55_;
GtkSwitch* _tmp56_;
GtkSwitch* _tmp57_;
GtkSwitch* _tmp58_;
GtkSwitch* _tmp59_;
GtkGrid* _tmp60_;
GtkGrid* _tmp61_;
GtkGrid* _tmp62_;
GtkBox* _tmp63_;
GtkGrid* _tmp64_;
GtkWidget* _tmp65_;
GtkWidget* _tmp66_;
GtkWidget* _tmp67_;
GtkWidget* _tmp68_;
GtkWidget* _tmp69_;
ScaleConstraint _tmp70_;
GtkWidget* _tmp73_;
#line 38 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (title != NULL, NULL);
#line 39 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self = (ExportDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL);
#line 41 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), title);
#line 42 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE);
#line 45 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = config_facade_get_instance ();
#line 45 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
config = _tmp0_;
#line 46 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = config;
#line 46 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.mode = configuration_facade_get_export_export_format_mode (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 47 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = config;
#line 47 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.specified_format = configuration_facade_get_export_photo_file_format (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 48 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = config;
#line 48 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.quality = configuration_facade_get_export_quality (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 49 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = config;
#line 49 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.export_metadata = configuration_facade_get_export_export_metadata (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 50 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = config;
#line 50 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_constraint = configuration_facade_get_export_constraint (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 51 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = config;
#line 51 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_scale = configuration_facade_get_export_scale (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
#line 53 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
#line 53 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp7_);
#line 53 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->quality_combo);
#line 53 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->quality_combo = _tmp7_;
#line 54 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = 0;
#line 424 "ExportDialog.c"
{
JpegQuality* quality_collection = NULL;
gint quality_collection_length1 = 0;
gint _quality_collection_size_ = 0;
gint quality_it = 0;
#line 55 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
quality_collection = EXPORT_DIALOG_QUALITY_ARRAY;
#line 55 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
quality_collection_length1 = G_N_ELEMENTS (EXPORT_DIALOG_QUALITY_ARRAY);
#line 55 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
for (quality_it = 0; quality_it < G_N_ELEMENTS (EXPORT_DIALOG_QUALITY_ARRAY); quality_it = quality_it + 1) {
#line 436 "ExportDialog.c"
JpegQuality quality = 0;
#line 55 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
quality = quality_collection[quality_it];
#line 440 "ExportDialog.c"
{
GtkComboBoxText* _tmp8_;
JpegQuality _tmp9_;
gchar* _tmp10_;
gchar* _tmp11_;
JpegQuality _tmp12_;
ExportFormatParameters _tmp13_;
JpegQuality _tmp14_;
gint _tmp17_;
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = self->priv->quality_combo;
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = quality;
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = jpeg_quality_to_string (_tmp9_);
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = _tmp10_;
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_text_append_text (_tmp8_, _tmp11_);
#line 56 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp11_);
#line 57 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = quality;
#line 57 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = export_dialog_current_parameters;
#line 57 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = _tmp13_.quality;
#line 57 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp12_ == _tmp14_) {
#line 470 "ExportDialog.c"
GtkComboBoxText* _tmp15_;
gint _tmp16_;
#line 58 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp15_ = self->priv->quality_combo;
#line 58 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp16_ = ctr;
#line 58 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_combo_box_get_type (), GtkComboBox), _tmp16_);
#line 479 "ExportDialog.c"
}
#line 59 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp17_ = ctr;
#line 59 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = _tmp17_ + 1;
#line 485 "ExportDialog.c"
}
}
}
#line 62 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp18_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
#line 62 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp18_);
#line 62 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->constraint_combo);
#line 62 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->constraint_combo = _tmp18_;
#line 63 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = 0;
#line 499 "ExportDialog.c"
{
ScaleConstraint* constraint_collection = NULL;
gint constraint_collection_length1 = 0;
gint _constraint_collection_size_ = 0;
gint constraint_it = 0;
#line 64 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
constraint_collection = EXPORT_DIALOG_CONSTRAINT_ARRAY;
#line 64 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
constraint_collection_length1 = G_N_ELEMENTS (EXPORT_DIALOG_CONSTRAINT_ARRAY);
#line 64 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
for (constraint_it = 0; constraint_it < G_N_ELEMENTS (EXPORT_DIALOG_CONSTRAINT_ARRAY); constraint_it = constraint_it + 1) {
#line 511 "ExportDialog.c"
ScaleConstraint constraint = 0;
#line 64 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
constraint = constraint_collection[constraint_it];
#line 515 "ExportDialog.c"
{
GtkComboBoxText* _tmp19_;
ScaleConstraint _tmp20_;
gchar* _tmp21_;
gchar* _tmp22_;
ScaleConstraint _tmp23_;
ScaleConstraint _tmp24_;
gint _tmp27_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp19_ = self->priv->constraint_combo;
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp20_ = constraint;
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp21_ = scale_constraint_to_string (_tmp20_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp22_ = _tmp21_;
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_text_append_text (_tmp19_, _tmp22_);
#line 65 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp22_);
#line 66 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp23_ = constraint;
#line 66 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp24_ = export_dialog_current_constraint;
#line 66 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp23_ == _tmp24_) {
#line 542 "ExportDialog.c"
GtkComboBoxText* _tmp25_;
gint _tmp26_;
#line 67 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp25_ = self->priv->constraint_combo;
#line 67 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp26_ = ctr;
#line 67 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_combo_box_get_type (), GtkComboBox), _tmp26_);
#line 551 "ExportDialog.c"
}
#line 68 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp27_ = ctr;
#line 68 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = _tmp27_ + 1;
#line 557 "ExportDialog.c"
}
}
}
#line 71 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp28_ = (GtkComboBoxText*) gtk_combo_box_text_new ();
#line 71 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp28_);
#line 71 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->format_combo);
#line 71 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->format_combo = _tmp28_;
#line 72 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_format_add_option (self, EXPORT_DIALOG_UNMODIFIED_FORMAT_LABEL);
#line 73 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_format_add_option (self, EXPORT_DIALOG_CURRENT_FORMAT_LABEL);
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp30_ = photo_file_format_get_writeable (&_tmp29_);
#line 575 "ExportDialog.c"
{
PhotoFileFormat* format_collection = NULL;
gint format_collection_length1 = 0;
gint _format_collection_size_ = 0;
gint format_it = 0;
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
format_collection = _tmp30_;
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
format_collection_length1 = _tmp29_;
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
for (format_it = 0; format_it < _tmp29_; format_it = format_it + 1) {
#line 587 "ExportDialog.c"
PhotoFileFormat format = 0;
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
format = format_collection[format_it];
#line 591 "ExportDialog.c"
{
PhotoFileFormat _tmp31_;
PhotoFileFormatProperties* _tmp32_;
PhotoFileFormatProperties* _tmp33_;
gchar* _tmp34_;
gchar* _tmp35_;
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp31_ = format;
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp32_ = photo_file_format_get_properties (_tmp31_);
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp33_ = _tmp32_;
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp34_ = photo_file_format_properties_get_user_visible_name (_tmp33_);
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp35_ = _tmp34_;
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_format_add_option (self, _tmp35_);
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp35_);
#line 75 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_photo_file_format_properties_unref0 (_tmp33_);
#line 614 "ExportDialog.c"
}
}
#line 74 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
format_collection = (g_free (format_collection), NULL);
#line 619 "ExportDialog.c"
}
#line 78 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp36_ = (GtkEntry*) gtk_entry_new ();
#line 78 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp36_);
#line 78 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->pixels_entry);
#line 78 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->pixels_entry = _tmp36_;
#line 79 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp37_ = self->priv->pixels_entry;
#line 79 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_entry_set_max_length (_tmp37_, 6);
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp38_ = self->priv->pixels_entry;
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp39_ = export_dialog_current_scale;
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp40_ = g_strdup_printf ("%d", _tmp39_);
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp41_ = _tmp40_;
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_entry_set_text (_tmp38_, _tmp41_);
#line 80 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp41_);
#line 83 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp42_ = self->priv->constraint_combo;
#line 83 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _export_dialog_on_constraint_changed_gtk_combo_box_changed, self, 0);
#line 84 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp43_ = self->priv->format_combo;
#line 84 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _export_dialog_on_format_changed_gtk_combo_box_changed, self, 0);
#line 85 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp44_ = self->priv->pixels_entry;
#line 85 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, gtk_editable_get_type (), GtkEditable), "changed", (GCallback) _export_dialog_on_pixels_changed_gtk_editable_changed, self, 0);
#line 86 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp45_ = self->priv->pixels_entry;
#line 86 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_editable_get_type (), GtkEditable), "insert-text", (GCallback) _export_dialog_on_pixels_insert_text_gtk_editable_insert_text, self, 0);
#line 87 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp46_ = self->priv->pixels_entry;
#line 87 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_connect_object (_tmp46_, "activate", (GCallback) _export_dialog_on_activate_gtk_entry_activate, self, 0);
#line 90 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp47_ = self->priv->format_combo;
#line 90 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_label (self, _ ("_Format:"), 0, 0, G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_widget_get_type (), GtkWidget));
#line 91 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp48_ = self->priv->format_combo;
#line 91 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, gtk_widget_get_type (), GtkWidget), 1, 0);
#line 93 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp49_ = self->priv->quality_combo;
#line 93 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_label (self, _ ("_Quality:"), 0, 1, G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_widget_get_type (), GtkWidget));
#line 94 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp50_ = self->priv->quality_combo;
#line 94 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, gtk_widget_get_type (), GtkWidget), 1, 1);
#line 96 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp51_ = self->priv->constraint_combo;
#line 96 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_label (self, _ ("_Scaling constraint:"), 0, 2, G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, gtk_widget_get_type (), GtkWidget));
#line 97 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp52_ = self->priv->constraint_combo;
#line 97 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, gtk_widget_get_type (), GtkWidget), 1, 2);
#line 99 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp53_ = self->priv->pixels_entry;
#line 99 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_label (self, _ ("_Pixels:"), 0, 3, G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_widget_get_type (), GtkWidget));
#line 100 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp54_ = self->priv->pixels_entry;
#line 100 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, gtk_widget_get_type (), GtkWidget), 1, 3);
#line 102 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp55_ = (GtkSwitch*) gtk_switch_new ();
#line 102 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp55_);
#line 102 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->export_metadata);
#line 102 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->export_metadata = _tmp55_;
#line 103 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp56_ = self->priv->export_metadata;
#line 103 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_label (self, _ ("Export _metadata:"), 0, 4, G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, gtk_widget_get_type (), GtkWidget));
#line 104 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp57_ = self->priv->export_metadata;
#line 104 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_add_control (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, gtk_widget_get_type (), GtkWidget), 1, 4);
#line 105 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp58_ = self->priv->export_metadata;
#line 105 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_switch_set_active (_tmp58_, TRUE);
#line 106 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp59_ = self->priv->export_metadata;
#line 106 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
#line 108 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp60_ = self->priv->table;
#line 108 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_grid_set_row_spacing (_tmp60_, (guint) 6);
#line 109 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp61_ = self->priv->table;
#line 109 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_grid_set_column_spacing (_tmp61_, (guint) 12);
#line 110 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp62_ = self->priv->table;
#line 110 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, gtk_container_get_type (), GtkContainer), (guint) 18);
#line 112 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp63_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog));
#line 112 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp64_ = self->priv->table;
#line 112 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, gtk_box_get_type (), GtkBox), gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, gtk_widget_get_type (), GtkWidget));
#line 115 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), RESOURCES_CANCEL_LABEL, (gint) GTK_RESPONSE_CANCEL);
#line 116 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp65_ = gtk_dialog_add_button (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), RESOURCES_OK_LABEL, (gint) GTK_RESPONSE_OK);
#line 116 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp66_ = _g_object_ref0 (_tmp65_);
#line 116 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->ok_button);
#line 116 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->ok_button = _tmp66_;
#line 117 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_dialog_set_default_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_OK);
#line 119 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp67_ = self->priv->ok_button;
#line 119 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_can_default (_tmp67_, TRUE);
#line 120 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp68_ = self->priv->ok_button;
#line 120 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_set (_tmp68_, "has-default", TRUE, NULL);
#line 121 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp69_ = self->priv->ok_button;
#line 121 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_window_set_default (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), _tmp69_);
#line 123 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp70_ = export_dialog_current_constraint;
#line 123 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp70_ == SCALE_CONSTRAINT_ORIGINAL) {
#line 767 "ExportDialog.c"
GtkEntry* _tmp71_;
GtkComboBoxText* _tmp72_;
#line 124 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp71_ = self->priv->pixels_entry;
#line 124 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp71_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 125 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp72_ = self->priv->quality_combo;
#line 125 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 778 "ExportDialog.c"
}
#line 128 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp73_ = self->priv->ok_button;
#line 128 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_grab_focus (_tmp73_);
#line 38 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (config);
#line 38 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return self;
#line 788 "ExportDialog.c"
}
ExportDialog*
export_dialog_new (const gchar* title)
{
#line 38 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return export_dialog_construct (TYPE_EXPORT_DIALOG, title);
#line 797 "ExportDialog.c"
}
static void
export_dialog_format_add_option (ExportDialog* self,
const gchar* format_name)
{
GeeArrayList* _tmp0_;
GtkComboBoxText* _tmp1_;
#line 131 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 131 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (format_name != NULL);
#line 132 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->format_options;
#line 132 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), format_name);
#line 133 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = self->priv->format_combo;
#line 133 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_text_append_text (_tmp1_, format_name);
#line 819 "ExportDialog.c"
}
static void
export_dialog_format_set_active_text (ExportDialog* self,
const gchar* text)
{
gint selection_ticker = 0;
#line 136 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 136 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (text != NULL);
#line 137 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
selection_ticker = 0;
#line 834 "ExportDialog.c"
{
GeeArrayList* _current_text_list = NULL;
GeeArrayList* _tmp0_;
GeeArrayList* _tmp1_;
gint _current_text_size = 0;
GeeArrayList* _tmp2_;
gint _tmp3_;
gint _tmp4_;
gint _current_text_index = 0;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->format_options;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_current_text_list = _tmp1_;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = _current_text_list;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = _tmp3_;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_current_text_size = _tmp4_;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_current_text_index = -1;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
while (TRUE) {
#line 862 "ExportDialog.c"
gint _tmp5_;
gint _tmp6_;
gint _tmp7_;
gchar* current_text = NULL;
GeeArrayList* _tmp8_;
gint _tmp9_;
gpointer _tmp10_;
const gchar* _tmp11_;
gint _tmp14_;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = _current_text_index;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_current_text_index = _tmp5_ + 1;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = _current_text_index;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = _current_text_size;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (!(_tmp6_ < _tmp7_)) {
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
break;
#line 884 "ExportDialog.c"
}
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = _current_text_list;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = _current_text_index;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp9_);
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
current_text = (gchar*) _tmp10_;
#line 140 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = current_text;
#line 140 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (g_strcmp0 (_tmp11_, text) == 0) {
#line 898 "ExportDialog.c"
GtkComboBoxText* _tmp12_;
gint _tmp13_;
#line 141 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = self->priv->format_combo;
#line 141 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = selection_ticker;
#line 141 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_combo_box_get_type (), GtkComboBox), _tmp13_);
#line 142 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (current_text);
#line 142 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (_current_text_list);
#line 142 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return;
#line 913 "ExportDialog.c"
}
#line 144 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = selection_ticker;
#line 144 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
selection_ticker = _tmp14_ + 1;
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (current_text);
#line 921 "ExportDialog.c"
}
#line 139 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (_current_text_list);
#line 925 "ExportDialog.c"
}
#line 147 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_error ("ExportDialog.vala:147: format_set_active_text: text '%s' isn't in comb" \
"o box", text);
#line 929 "ExportDialog.c"
}
static PhotoFileFormat
export_dialog_get_specified_format (ExportDialog* self)
{
PhotoFileFormat result = 0;
gint index = 0;
GtkComboBoxText* _tmp0_;
gint _tmp1_;
gint _tmp2_;
PhotoFileFormat* writeable_formats = NULL;
gint _tmp3_;
PhotoFileFormat* _tmp4_;
gint writeable_formats_length1;
gint _writeable_formats_size_;
gint _tmp5_;
PhotoFileFormat _tmp6_;
#line 150 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (IS_EXPORT_DIALOG (self), 0);
#line 151 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->format_combo;
#line 151 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
index = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox));
#line 152 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = index;
#line 152 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp1_ < EXPORT_DIALOG_NUM_SPECIAL_FORMATS) {
#line 153 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
index = EXPORT_DIALOG_NUM_SPECIAL_FORMATS;
#line 960 "ExportDialog.c"
}
#line 155 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = index;
#line 155 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
index = _tmp2_ - EXPORT_DIALOG_NUM_SPECIAL_FORMATS;
#line 156 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = photo_file_format_get_writeable (&_tmp3_);
#line 156 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
writeable_formats = _tmp4_;
#line 156 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
writeable_formats_length1 = _tmp3_;
#line 156 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_writeable_formats_size_ = writeable_formats_length1;
#line 157 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = index;
#line 157 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = writeable_formats[_tmp5_];
#line 157 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
result = _tmp6_;
#line 157 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
writeable_formats = (g_free (writeable_formats), NULL);
#line 157 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return result;
#line 984 "ExportDialog.c"
}
static gchar*
export_dialog_get_label_for_parameters (ExportDialog* self,
ExportFormatParameters* params)
{
gchar* result = NULL;
ExportFormatParameters _tmp0_;
ExportFormatMode _tmp1_;
#line 160 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (IS_EXPORT_DIALOG (self), NULL);
#line 160 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (params != NULL, NULL);
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = *params;
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = _tmp0_.mode;
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
switch (_tmp1_) {
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
case EXPORT_FORMAT_MODE_UNMODIFIED:
#line 1007 "ExportDialog.c"
{
gchar* _tmp2_;
#line 163 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = g_strdup (EXPORT_DIALOG_UNMODIFIED_FORMAT_LABEL);
#line 163 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
result = _tmp2_;
#line 163 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return result;
#line 1016 "ExportDialog.c"
}
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
case EXPORT_FORMAT_MODE_CURRENT:
#line 1020 "ExportDialog.c"
{
gchar* _tmp3_;
#line 166 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = g_strdup (EXPORT_DIALOG_CURRENT_FORMAT_LABEL);
#line 166 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
result = _tmp3_;
#line 166 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return result;
#line 1029 "ExportDialog.c"
}
#line 161 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
case EXPORT_FORMAT_MODE_SPECIFIED:
#line 1033 "ExportDialog.c"
{
ExportFormatParameters _tmp4_;
PhotoFileFormat _tmp5_;
PhotoFileFormatProperties* _tmp6_;
PhotoFileFormatProperties* _tmp7_;
gchar* _tmp8_;
gchar* _tmp9_;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = *params;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = _tmp4_.specified_format;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = photo_file_format_get_properties (_tmp5_);
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = _tmp6_;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = photo_file_format_properties_get_user_visible_name (_tmp7_);
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = _tmp8_;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_photo_file_format_properties_unref0 (_tmp7_);
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
result = _tmp9_;
#line 169 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return result;
#line 1059 "ExportDialog.c"
}
default:
{
#line 172 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_error ("ExportDialog.vala:172: get_label_for_parameters: unrecognized export f" \
"ormat mode");
#line 1065 "ExportDialog.c"
}
}
}
gboolean
export_dialog_execute (ExportDialog* self,
gint* scale,
ScaleConstraint* constraint,
ExportFormatParameters* parameters)
{
gint _vala_scale = 0;
ScaleConstraint _vala_constraint = 0;
gboolean result = FALSE;
ExportFormatParameters _tmp0_;
ExportFormatMode _tmp1_;
ExportFormatParameters _tmp4_;
ExportFormatMode _tmp5_;
ExportFormatParameters _tmp12_;
gchar* _tmp13_;
gchar* _tmp14_;
gboolean ok = FALSE;
gboolean _tmp15_;
#line 179 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (IS_EXPORT_DIALOG (self), FALSE);
#line 179 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_val_if_fail (parameters != NULL, FALSE);
#line 181 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 185 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = *parameters;
#line 185 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = _tmp0_.mode;
#line 185 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp1_ != EXPORT_FORMAT_MODE_LAST) {
#line 1101 "ExportDialog.c"
ScaleConstraint _tmp2_;
GtkComboBoxText* _tmp3_;
#line 186 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_constraint = SCALE_CONSTRAINT_ORIGINAL;
#line 186 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = _vala_constraint;
#line 186 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_constraint = _tmp2_;
#line 187 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = self->priv->constraint_combo;
#line 187 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_combo_box_get_type (), GtkComboBox), 0);
#line 1114 "ExportDialog.c"
}
#line 190 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = *parameters;
#line 190 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = _tmp4_.mode;
#line 190 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp5_ == EXPORT_FORMAT_MODE_LAST) {
#line 1122 "ExportDialog.c"
ExportFormatParameters _tmp6_;
#line 191 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = export_dialog_current_parameters;
#line 191 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
*parameters = _tmp6_;
#line 1128 "ExportDialog.c"
} else {
gboolean _tmp7_ = FALSE;
ExportFormatParameters _tmp8_;
ExportFormatMode _tmp9_;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = *parameters;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = _tmp8_.mode;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp9_ == EXPORT_FORMAT_MODE_SPECIFIED) {
#line 1139 "ExportDialog.c"
ExportFormatParameters _tmp10_;
PhotoFileFormat _tmp11_;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = *parameters;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = _tmp10_.specified_format;
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = !photo_file_format_can_write (_tmp11_);
#line 1148 "ExportDialog.c"
} else {
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = FALSE;
#line 1152 "ExportDialog.c"
}
#line 192 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp7_) {
#line 193 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).specified_format = photo_file_format_get_system_default_format ();
#line 1158 "ExportDialog.c"
}
}
#line 195 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = *parameters;
#line 195 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = export_dialog_get_label_for_parameters (self, &_tmp12_);
#line 195 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = _tmp13_;
#line 195 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_format_set_active_text (self, _tmp14_);
#line 195 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp14_);
#line 196 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_format_changed (self);
#line 198 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ok = gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog)) == ((gint) GTK_RESPONSE_OK);
#line 199 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp15_ = ok;
#line 199 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp15_) {
#line 1179 "ExportDialog.c"
gint index = 0;
GtkComboBoxText* _tmp16_;
gint _tmp17_;
gint _tmp18_;
ScaleConstraint _tmp19_;
ScaleConstraint _tmp20_;
GtkEntry* _tmp21_;
const gchar* _tmp22_;
ScaleConstraint _tmp23_;
gint _tmp25_;
gboolean _tmp26_ = FALSE;
GtkSwitch* _tmp27_;
gboolean _tmp28_;
gboolean _tmp29_;
GtkComboBoxText* _tmp33_;
gchar* _tmp34_;
gchar* _tmp35_;
gboolean _tmp36_;
ConfigFacade* config = NULL;
ConfigFacade* _tmp50_;
ConfigFacade* _tmp51_;
ExportFormatParameters _tmp52_;
ExportFormatMode _tmp53_;
ConfigFacade* _tmp54_;
ExportFormatParameters _tmp55_;
PhotoFileFormat _tmp56_;
ConfigFacade* _tmp57_;
ExportFormatParameters _tmp58_;
JpegQuality _tmp59_;
ConfigFacade* _tmp60_;
ExportFormatParameters _tmp61_;
gboolean _tmp62_;
ConfigFacade* _tmp63_;
ScaleConstraint _tmp64_;
ConfigFacade* _tmp65_;
gint _tmp66_;
#line 200 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp16_ = self->priv->constraint_combo;
#line 200 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
index = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_combo_box_get_type (), GtkComboBox));
#line 201 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp17_ = index;
#line 201 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_assert (_tmp17_ >= 0, "index >= 0");
#line 202 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp18_ = index;
#line 202 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp19_ = EXPORT_DIALOG_CONSTRAINT_ARRAY[_tmp18_];
#line 202 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_constraint = _tmp19_;
#line 203 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp20_ = _vala_constraint;
#line 203 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_constraint = _tmp20_;
#line 205 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp21_ = self->priv->pixels_entry;
#line 205 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp22_ = gtk_entry_get_text (_tmp21_);
#line 205 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_scale = atoi (_tmp22_);
#line 206 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp23_ = _vala_constraint;
#line 206 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp23_ != SCALE_CONSTRAINT_ORIGINAL) {
#line 1244 "ExportDialog.c"
gint _tmp24_;
#line 207 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp24_ = _vala_scale;
#line 207 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_assert (_tmp24_ > 0, "scale > 0");
#line 1250 "ExportDialog.c"
}
#line 208 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp25_ = _vala_scale;
#line 208 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_scale = _tmp25_;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp27_ = self->priv->export_metadata;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp28_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, gtk_widget_get_type (), GtkWidget));
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp29_ = _tmp28_;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp29_) {
#line 1264 "ExportDialog.c"
GtkSwitch* _tmp30_;
gboolean _tmp31_;
gboolean _tmp32_;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp30_ = self->priv->export_metadata;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp31_ = gtk_switch_get_active (_tmp30_);
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp32_ = _tmp31_;
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp26_ = _tmp32_;
#line 1276 "ExportDialog.c"
} else {
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp26_ = FALSE;
#line 1280 "ExportDialog.c"
}
#line 210 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).export_metadata = _tmp26_;
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp33_ = self->priv->format_combo;
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp34_ = gtk_combo_box_text_get_active_text (_tmp33_);
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp35_ = _tmp34_;
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp36_ = g_strcmp0 (_tmp35_, EXPORT_DIALOG_UNMODIFIED_FORMAT_LABEL) == 0;
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp35_);
#line 212 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp36_) {
#line 1296 "ExportDialog.c"
ExportFormatMode _tmp37_;
#line 213 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.mode = EXPORT_FORMAT_MODE_UNMODIFIED;
#line 213 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp37_ = export_dialog_current_parameters.mode;
#line 213 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).mode = _tmp37_;
#line 1304 "ExportDialog.c"
} else {
GtkComboBoxText* _tmp38_;
gchar* _tmp39_;
gchar* _tmp40_;
gboolean _tmp41_;
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp38_ = self->priv->format_combo;
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp39_ = gtk_combo_box_text_get_active_text (_tmp38_);
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp40_ = _tmp39_;
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp41_ = g_strcmp0 (_tmp40_, EXPORT_DIALOG_CURRENT_FORMAT_LABEL) == 0;
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp40_);
#line 214 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp41_) {
#line 1322 "ExportDialog.c"
ExportFormatMode _tmp42_;
#line 215 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.mode = EXPORT_FORMAT_MODE_CURRENT;
#line 215 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp42_ = export_dialog_current_parameters.mode;
#line 215 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).mode = _tmp42_;
#line 1330 "ExportDialog.c"
} else {
ExportFormatMode _tmp43_;
PhotoFileFormat _tmp44_;
ExportFormatParameters _tmp45_;
PhotoFileFormat _tmp46_;
#line 217 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.mode = EXPORT_FORMAT_MODE_SPECIFIED;
#line 217 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp43_ = export_dialog_current_parameters.mode;
#line 217 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).mode = _tmp43_;
#line 218 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.specified_format = export_dialog_get_specified_format (self);
#line 218 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp44_ = export_dialog_current_parameters.specified_format;
#line 218 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).specified_format = _tmp44_;
#line 219 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp45_ = export_dialog_current_parameters;
#line 219 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp46_ = _tmp45_.specified_format;
#line 219 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp46_ == PHOTO_FILE_FORMAT_JFIF) {
#line 1354 "ExportDialog.c"
GtkComboBoxText* _tmp47_;
JpegQuality _tmp48_;
JpegQuality _tmp49_;
#line 220 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp47_ = self->priv->quality_combo;
#line 220 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp48_ = EXPORT_DIALOG_QUALITY_ARRAY[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_combo_box_get_type (), GtkComboBox))];
#line 220 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters.quality = _tmp48_;
#line 220 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp49_ = export_dialog_current_parameters.quality;
#line 220 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
(*parameters).quality = _tmp49_;
#line 1368 "ExportDialog.c"
}
}
}
#line 224 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp50_ = config_facade_get_instance ();
#line 224 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
config = _tmp50_;
#line 225 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp51_ = config;
#line 225 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp52_ = export_dialog_current_parameters;
#line 225 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp53_ = _tmp52_.mode;
#line 225 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_export_format_mode (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp53_);
#line 226 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp54_ = config;
#line 226 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp55_ = export_dialog_current_parameters;
#line 226 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp56_ = _tmp55_.specified_format;
#line 226 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_photo_file_format (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp56_);
#line 227 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp57_ = config;
#line 227 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp58_ = export_dialog_current_parameters;
#line 227 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp59_ = _tmp58_.quality;
#line 227 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_quality (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp59_);
#line 228 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp60_ = config;
#line 228 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp61_ = export_dialog_current_parameters;
#line 228 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp62_ = _tmp61_.export_metadata;
#line 228 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_export_metadata (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp62_);
#line 229 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp63_ = config;
#line 229 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp64_ = export_dialog_current_constraint;
#line 229 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_constraint (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp64_);
#line 230 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp65_ = config;
#line 230 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp66_ = export_dialog_current_scale;
#line 230 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
configuration_facade_set_export_scale (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp66_);
#line 199 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (config);
#line 1422 "ExportDialog.c"
} else {
#line 232 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_scale = 0;
#line 233 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_vala_constraint = SCALE_CONSTRAINT_ORIGINAL;
#line 1428 "ExportDialog.c"
}
#line 236 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
result = ok;
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (scale) {
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
*scale = _vala_scale;
#line 1438 "ExportDialog.c"
}
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (constraint) {
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
*constraint = _vala_constraint;
#line 1444 "ExportDialog.c"
}
#line 238 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return result;
#line 1448 "ExportDialog.c"
}
static void
export_dialog_add_label (ExportDialog* self,
const gchar* text,
gint x,
gint y,
GtkWidget* widget)
{
GtkLabel* new_label = NULL;
GtkLabel* _tmp0_;
GtkLabel* _tmp1_;
GtkLabel* _tmp2_;
GtkLabel* _tmp3_;
GtkGrid* _tmp5_;
GtkLabel* _tmp6_;
#line 241 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 241 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (text != NULL);
#line 241 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail ((widget == NULL) || GTK_IS_WIDGET (widget));
#line 242 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = (GtkLabel*) gtk_label_new_with_mnemonic (text);
#line 242 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp0_);
#line 242 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
new_label = _tmp0_;
#line 243 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = new_label;
#line 243 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_END);
#line 244 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = new_label;
#line 244 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
#line 245 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = new_label;
#line 245 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_label_set_use_underline (_tmp3_, TRUE);
#line 247 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (widget != NULL) {
#line 1492 "ExportDialog.c"
GtkLabel* _tmp4_;
#line 248 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = new_label;
#line 248 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_label_set_mnemonic_widget (_tmp4_, widget);
#line 1498 "ExportDialog.c"
}
#line 250 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = self->priv->table;
#line 250 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = new_label;
#line 250 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_grid_attach (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), x, y, 1, 1);
#line 241 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (new_label);
#line 1508 "ExportDialog.c"
}
static void
export_dialog_add_control (ExportDialog* self,
GtkWidget* widget,
gint x,
gint y)
{
GtkGrid* _tmp0_;
#line 253 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 253 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (GTK_IS_WIDGET (widget));
#line 254 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
#line 255 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
#line 256 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_hexpand (widget, TRUE);
#line 257 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_vexpand (widget, TRUE);
#line 259 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->table;
#line 259 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_grid_attach (_tmp0_, widget, x, y, 1, 1);
#line 1535 "ExportDialog.c"
}
static void
export_dialog_on_constraint_changed (ExportDialog* self)
{
gboolean original = FALSE;
GtkComboBoxText* _tmp0_;
ScaleConstraint _tmp1_;
gboolean jpeg = FALSE;
GtkComboBoxText* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
PhotoFileFormatProperties* _tmp5_;
PhotoFileFormatProperties* _tmp6_;
gchar* _tmp7_;
gchar* _tmp8_;
gboolean _tmp9_;
GtkEntry* _tmp10_;
gboolean _tmp11_;
gboolean _tmp12_ = FALSE;
gboolean _tmp13_;
GtkComboBoxText* _tmp15_;
gboolean _tmp16_;
#line 262 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 263 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->constraint_combo;
#line 263 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = EXPORT_DIALOG_CONSTRAINT_ARRAY[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox))];
#line 263 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
original = _tmp1_ == SCALE_CONSTRAINT_ORIGINAL;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = self->priv->format_combo;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = gtk_combo_box_text_get_active_text (_tmp2_);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = _tmp3_;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = photo_file_format_get_properties (PHOTO_FILE_FORMAT_JFIF);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = _tmp5_;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = photo_file_format_properties_get_user_visible_name (_tmp6_);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = _tmp7_;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = g_strcmp0 (_tmp4_, _tmp8_) == 0;
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp8_);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_photo_file_format_properties_unref0 (_tmp6_);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp4_);
#line 264 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
jpeg = _tmp9_;
#line 266 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = self->priv->pixels_entry;
#line 266 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = original;
#line 266 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget), !_tmp11_);
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = original;
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (!_tmp13_) {
#line 1602 "ExportDialog.c"
gboolean _tmp14_;
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = jpeg;
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = _tmp14_;
#line 1608 "ExportDialog.c"
} else {
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = FALSE;
#line 1612 "ExportDialog.c"
}
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp15_ = self->priv->quality_combo;
#line 267 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget), _tmp12_);
#line 268 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp16_ = original;
#line 268 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp16_) {
#line 1622 "ExportDialog.c"
GtkWidget* _tmp17_;
#line 269 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp17_ = self->priv->ok_button;
#line 269 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (_tmp17_, TRUE);
#line 1628 "ExportDialog.c"
} else {
#line 271 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_on_pixels_changed (self);
#line 1632 "ExportDialog.c"
}
}
static void
export_dialog_on_format_changed (ExportDialog* self)
{
gboolean original = FALSE;
GtkComboBoxText* _tmp0_;
ScaleConstraint _tmp1_;
GtkComboBoxText* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
gboolean _tmp5_;
#line 274 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 275 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->constraint_combo;
#line 275 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = EXPORT_DIALOG_CONSTRAINT_ARRAY[gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_combo_box_get_type (), GtkComboBox))];
#line 275 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
original = _tmp1_ == SCALE_CONSTRAINT_ORIGINAL;
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = self->priv->format_combo;
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = gtk_combo_box_text_get_active_text (_tmp2_);
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = _tmp3_;
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = g_strcmp0 (_tmp4_, EXPORT_DIALOG_UNMODIFIED_FORMAT_LABEL) == 0;
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp4_);
#line 277 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp5_) {
#line 1667 "ExportDialog.c"
GtkComboBoxText* _tmp6_;
GtkComboBoxText* _tmp7_;
GtkComboBoxText* _tmp8_;
GtkEntry* _tmp9_;
GtkSwitch* _tmp10_;
GtkSwitch* _tmp11_;
#line 282 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = self->priv->constraint_combo;
#line 282 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox), 0);
#line 283 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = self->priv->constraint_combo;
#line 283 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 284 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = self->priv->quality_combo;
#line 284 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 285 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = self->priv->pixels_entry;
#line 285 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 286 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = self->priv->export_metadata;
#line 286 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_switch_set_active (_tmp10_, FALSE);
#line 287 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = self->priv->export_metadata;
#line 287 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 1698 "ExportDialog.c"
} else {
GtkComboBoxText* _tmp12_;
gchar* _tmp13_;
gchar* _tmp14_;
gboolean _tmp15_;
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = self->priv->format_combo;
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = gtk_combo_box_text_get_active_text (_tmp12_);
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = _tmp13_;
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp15_ = g_strcmp0 (_tmp14_, EXPORT_DIALOG_CURRENT_FORMAT_LABEL) == 0;
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp14_);
#line 288 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp15_) {
#line 1716 "ExportDialog.c"
GtkComboBoxText* _tmp16_;
GtkComboBoxText* _tmp17_;
GtkEntry* _tmp18_;
gboolean _tmp19_;
GtkSwitch* _tmp20_;
#line 295 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp16_ = self->priv->constraint_combo;
#line 295 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 296 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp17_ = self->priv->quality_combo;
#line 296 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget), FALSE);
#line 297 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp18_ = self->priv->pixels_entry;
#line 297 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp19_ = original;
#line 297 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), !_tmp19_);
#line 298 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp20_ = self->priv->export_metadata;
#line 298 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 1740 "ExportDialog.c"
} else {
GtkComboBoxText* _tmp21_;
gboolean jpeg = FALSE;
gboolean _tmp22_ = FALSE;
gboolean _tmp23_;
GtkComboBoxText* _tmp25_;
GtkSwitch* _tmp26_;
#line 303 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp21_ = self->priv->constraint_combo;
#line 303 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 304 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
jpeg = export_dialog_get_specified_format (self) == PHOTO_FILE_FORMAT_JFIF;
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp23_ = original;
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (!_tmp23_) {
#line 1758 "ExportDialog.c"
gboolean _tmp24_;
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp24_ = jpeg;
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp22_ = _tmp24_;
#line 1764 "ExportDialog.c"
} else {
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp22_ = FALSE;
#line 1768 "ExportDialog.c"
}
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp25_ = self->priv->quality_combo;
#line 305 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, gtk_widget_get_type (), GtkWidget), _tmp22_);
#line 306 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp26_ = self->priv->export_metadata;
#line 306 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_widget_get_type (), GtkWidget), TRUE);
#line 1778 "ExportDialog.c"
}
}
}
static void
export_dialog_on_activate (ExportDialog* self)
{
#line 310 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 311 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_dialog_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_OK);
#line 1791 "ExportDialog.c"
}
static void
export_dialog_on_pixels_changed (ExportDialog* self)
{
gboolean _tmp0_ = FALSE;
GtkEntry* _tmp1_;
GtkWidget* _tmp4_;
#line 314 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = self->priv->pixels_entry;
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (((gint) gtk_entry_get_text_length (_tmp1_)) > 0) {
#line 1807 "ExportDialog.c"
GtkEntry* _tmp2_;
const gchar* _tmp3_;
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = self->priv->pixels_entry;
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = gtk_entry_get_text (_tmp2_);
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = atoi (_tmp3_) > 0;
#line 1816 "ExportDialog.c"
} else {
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = FALSE;
#line 1820 "ExportDialog.c"
}
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = self->priv->ok_button;
#line 315 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
gtk_widget_set_sensitive (_tmp4_, _tmp0_);
#line 1826 "ExportDialog.c"
}
static gchar
string_get (const gchar* self,
glong index)
{
gchar result = '\0';
gchar _tmp0_;
#line 1124 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, '\0');
#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = ((gchar*) self)[index];
#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _tmp0_;
#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
#line 1844 "ExportDialog.c"
}
static void
export_dialog_on_pixels_insert_text (ExportDialog* self,
const gchar* text,
gint length,
gint* position)
{
gboolean _tmp0_;
gchar* new_text = NULL;
gchar* _tmp3_;
const gchar* _tmp13_;
gint _tmp14_;
gint _tmp15_;
GtkEntry* _tmp21_;
#line 318 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (IS_EXPORT_DIALOG (self));
#line 318 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_return_if_fail (text != NULL);
#line 320 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = self->priv->in_insert;
#line 320 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp0_) {
#line 321 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
return;
#line 1871 "ExportDialog.c"
}
#line 323 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->in_insert = TRUE;
#line 325 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (length == -1) {
#line 1877 "ExportDialog.c"
gint _tmp1_;
gint _tmp2_;
#line 326 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = strlen (text);
#line 326 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp2_ = _tmp1_;
#line 326 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
length = (gint) _tmp2_;
#line 1886 "ExportDialog.c"
}
#line 329 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp3_ = g_strdup ("");
#line 329 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
new_text = _tmp3_;
#line 1892 "ExportDialog.c"
{
gint ctr = 0;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = 0;
#line 1897 "ExportDialog.c"
{
gboolean _tmp4_ = FALSE;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = TRUE;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
while (TRUE) {
#line 1904 "ExportDialog.c"
gint _tmp6_;
gint _tmp7_;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (!_tmp4_) {
#line 1909 "ExportDialog.c"
gint _tmp5_;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp5_ = ctr;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
ctr = _tmp5_ + 1;
#line 1915 "ExportDialog.c"
}
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp4_ = FALSE;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp6_ = ctr;
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (!(_tmp6_ < length)) {
#line 330 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
break;
#line 1925 "ExportDialog.c"
}
#line 331 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp7_ = ctr;
#line 331 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (g_ascii_isdigit (string_get (text, (glong) _tmp7_))) {
#line 1931 "ExportDialog.c"
const gchar* _tmp8_;
gint _tmp9_;
gchar* _tmp10_;
gchar* _tmp11_;
gchar* _tmp12_;
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp8_ = new_text;
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp9_ = ctr;
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp10_ = g_strdup_printf ("%c", (gchar) string_get (text, (glong) _tmp9_));
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp11_ = _tmp10_;
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp12_ = g_strconcat (_tmp8_, _tmp11_, NULL);
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (new_text);
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
new_text = _tmp12_;
#line 332 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (_tmp11_);
#line 1953 "ExportDialog.c"
}
}
}
}
#line 336 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp13_ = new_text;
#line 336 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp14_ = strlen (_tmp13_);
#line 336 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp15_ = _tmp14_;
#line 336 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
if (_tmp15_ > 0) {
#line 1966 "ExportDialog.c"
GtkEntry* _tmp16_;
const gchar* _tmp17_;
const gchar* _tmp18_;
gint _tmp19_;
gint _tmp20_;
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp16_ = self->priv->pixels_entry;
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp17_ = new_text;
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp18_ = new_text;
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp19_ = strlen (_tmp18_);
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp20_ = _tmp19_;
#line 337 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_editable_get_type (), GtkEditable), "insert-text", _tmp17_, (gint) _tmp20_, position);
#line 1984 "ExportDialog.c"
}
#line 339 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp21_ = self->priv->pixels_entry;
#line 339 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_signal_stop_emission_by_name (_tmp21_, "insert-text");
#line 341 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->in_insert = FALSE;
#line 318 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_free0 (new_text);
#line 1994 "ExportDialog.c"
}
static void
export_dialog_class_init (ExportDialogClass * klass)
{
ExportFormatParameters _tmp0_ = {0};
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_parent_class = g_type_class_peek_parent (klass);
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_type_class_add_private (klass, sizeof (ExportDialogPrivate));
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
G_OBJECT_CLASS (klass)->finalize = export_dialog_finalize;
#line 25 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_format_parameters_current (&_tmp0_);
#line 25 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_parameters = _tmp0_;
#line 26 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
export_dialog_current_scale = EXPORT_DIALOG_DEFAULT_SCALE;
#line 2014 "ExportDialog.c"
}
static void
export_dialog_instance_init (ExportDialog * self)
{
GtkGrid* _tmp0_;
GeeArrayList* _tmp1_;
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv = EXPORT_DIALOG_GET_PRIVATE (self);
#line 28 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp0_ = (GtkGrid*) gtk_grid_new ();
#line 28 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
g_object_ref_sink (_tmp0_);
#line 28 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->table = _tmp0_;
#line 33 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 33 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->format_options = _tmp1_;
#line 36 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self->priv->in_insert = FALSE;
#line 2037 "ExportDialog.c"
}
static void
export_dialog_finalize (GObject * obj)
{
ExportDialog * self;
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EXPORT_DIALOG, ExportDialog);
#line 28 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->table);
#line 29 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->quality_combo);
#line 30 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->constraint_combo);
#line 31 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->format_combo);
#line 32 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->export_metadata);
#line 33 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->format_options);
#line 34 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->pixels_entry);
#line 35 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
_g_object_unref0 (self->priv->ok_button);
#line 8 "/home/jens/Source/shotwell/src/dialogs/ExportDialog.vala"
G_OBJECT_CLASS (export_dialog_parent_class)->finalize (obj);
#line 2065 "ExportDialog.c"
}
GType
export_dialog_get_type (void)
{
static volatile gsize export_dialog_type_id__volatile = 0;
if (g_once_init_enter (&export_dialog_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ExportDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) export_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ExportDialog), 0, (GInstanceInitFunc) export_dialog_instance_init, NULL };
GType export_dialog_type_id;
export_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "ExportDialog", &g_define_type_info, 0);
g_once_init_leave (&export_dialog_type_id__volatile, export_dialog_type_id);
}
return export_dialog_type_id__volatile;
}
|