aboutsummaryrefslogtreecommitdiff
path: root/gtk3-filechooser-icon-view.patch
blob: 52edecbf9eb64ccde06113719f59787f37781347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
Last-modified: 2023-03-24
Authors: dudemanguy, bgstack15
Applicable-to: [gtk3-classic](https://github.com/lah7/gtk3-classic)
Message: Adapted by bgstack15 from [dudemanguy/gtk3-filechooser-icon-view.patch](https://gist.github.com/Dudemanguy/c172394e30e1e7d0f477ad15c719bc71) for after the lah7/gtk3-classic patches
Version: 3.24.37
--- a/gtk/gtkfilechooserprivate.h
+++ b/gtk/gtkfilechooserprivate.h
@@ -32,10 +32,14 @@
 #include "gtktreestore.h"
 #include "gtktreeview.h"
 #include "gtkbox.h"
+#include "gtkiconview.h"
+#include "gtkscale.h"
 
 G_BEGIN_DECLS
 
 #define SETTINGS_KEY_LOCATION_MODE          "location-mode"
+#define SETTINGS_KEY_VIEW_MODE              "view-mode"
+#define SETTINGS_KEY_ICON_VIEW_SCALE        "icon-view-scale"
 #define SETTINGS_KEY_SHOW_HIDDEN            "show-hidden"
 #define SETTINGS_KEY_SHOW_SIZE_COLUMN       "show-size-column"
 #define SETTINGS_KEY_SHOW_TYPE_COLUMN       "show-type-column"
@@ -60,34 +64,34 @@ struct _GtkFileChooserIface
 
   /* Methods
    */
-  gboolean       (*set_current_folder) 	   (GtkFileChooser    *chooser,
-					    GFile             *file,
-					    GError           **error);
-  GFile *        (*get_current_folder) 	   (GtkFileChooser    *chooser);
-  void           (*set_current_name)   	   (GtkFileChooser    *chooser,
-					    const gchar       *name);
+  gboolean       (*set_current_folder)     (GtkFileChooser    *chooser,
+                                            GFile             *file,
+                                            GError           **error);
+  GFile *        (*get_current_folder)     (GtkFileChooser    *chooser);
+  void           (*set_current_name)       (GtkFileChooser    *chooser,
+                                            const gchar       *name);
   gchar *        (*get_current_name)       (GtkFileChooser    *chooser);
-  gboolean       (*select_file)        	   (GtkFileChooser    *chooser,
-					    GFile             *file,
-					    GError           **error);
-  void           (*unselect_file)      	   (GtkFileChooser    *chooser,
-					    GFile             *file);
-  void           (*select_all)         	   (GtkFileChooser    *chooser);
-  void           (*unselect_all)       	   (GtkFileChooser    *chooser);
-  GSList *       (*get_files)          	   (GtkFileChooser    *chooser);
-  GFile *        (*get_preview_file)   	   (GtkFileChooser    *chooser);
-  GtkFileSystem *(*get_file_system)    	   (GtkFileChooser    *chooser);
-  void           (*add_filter)         	   (GtkFileChooser    *chooser,
-					    GtkFileFilter     *filter);
-  void           (*remove_filter)      	   (GtkFileChooser    *chooser,
-					    GtkFileFilter     *filter);
-  GSList *       (*list_filters)       	   (GtkFileChooser    *chooser);
+  gboolean       (*select_file)            (GtkFileChooser    *chooser,
+                                            GFile             *file,
+                                            GError           **error);
+  void           (*unselect_file)          (GtkFileChooser    *chooser,
+                                            GFile             *file);
+  void           (*select_all)             (GtkFileChooser    *chooser);
+  void           (*unselect_all)           (GtkFileChooser    *chooser);
+  GSList *       (*get_files)              (GtkFileChooser    *chooser);
+  GFile *        (*get_preview_file)       (GtkFileChooser    *chooser);
+  GtkFileSystem *(*get_file_system)        (GtkFileChooser    *chooser);
+  void           (*add_filter)             (GtkFileChooser    *chooser,
+                                            GtkFileFilter     *filter);
+  void           (*remove_filter)          (GtkFileChooser    *chooser,
+                                            GtkFileFilter     *filter);
+  GSList *       (*list_filters)           (GtkFileChooser    *chooser);
   gboolean       (*add_shortcut_folder)    (GtkFileChooser    *chooser,
-					    GFile             *file,
-					    GError           **error);
+                                            GFile             *file,
+                                            GError           **error);
   gboolean       (*remove_shortcut_folder) (GtkFileChooser    *chooser,
-					    GFile             *file,
-					    GError           **error);
+                                            GFile             *file,
+                                            GError           **error);
   GSList *       (*list_shortcut_folders)  (GtkFileChooser    *chooser);
 
   /* Signals
@@ -115,11 +119,11 @@ struct _GtkFileChooserIface
 
 GtkFileSystem *_gtk_file_chooser_get_file_system         (GtkFileChooser    *chooser);
 gboolean       _gtk_file_chooser_add_shortcut_folder     (GtkFileChooser    *chooser,
-							  GFile             *folder,
-							  GError           **error);
+                                                          GFile             *folder,
+                                                          GError           **error);
 gboolean       _gtk_file_chooser_remove_shortcut_folder  (GtkFileChooser    *chooser,
-							  GFile             *folder,
-							  GError           **error);
+                                                          GFile             *folder,
+                                                          GError           **error);
 GSList *       _gtk_file_chooser_list_shortcut_folder_files (GtkFileChooser *chooser);
 
 
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -45,10 +45,12 @@
 #include "gtkfilesystemmodel.h"
 #include "gtkgrid.h"
 #include "gtkicontheme.h"
+#include "gtkiconview.h"
 #include "gtklabel.h"
 #include "gtkmarshalers.h"
 #include "gtkmessagedialog.h"
 #include "gtkmountoperation.h"
+#include "gtknotebook.h"
 #include "gtkpaned.h"
 #include "gtkpathbar.h"
 #include "gtkplacessidebar.h"
@@ -84,6 +86,7 @@
 #include "gtkcssprovider.h"
 
 #include <cairo-gobject.h>
+#include <math.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -202,6 +205,11 @@ typedef enum {
 } StartupMode;
 
 typedef enum {
+  VIEW_MODE_LIST,
+  VIEW_MODE_ICON,
+} ViewMode;
+
+typedef enum {
   CLOCK_FORMAT_24,
   CLOCK_FORMAT_12
 } ClockFormat;
@@ -231,8 +239,12 @@ struct _GtkFileChooserWidgetPrivate {
   GtkWidget *browse_header_revealer;
   GtkWidget *browse_header_stack;
   GtkWidget *browse_files_stack;
-  GtkWidget *browse_files_swin;
+  GtkNotebook *view_notebook;
+  GtkWidget *browse_files_list_swin;
+  GtkWidget *browse_files_icon_swin;
+  GtkWidget *browse_files_current_view;
   GtkWidget *browse_files_tree_view;
+  GtkWidget *browse_files_icon_view;
   GtkWidget *remote_warning_bar;
 
   GtkWidget *browse_files_popover;
@@ -248,6 +260,12 @@ struct _GtkFileChooserWidgetPrivate {
   GtkWidget *delete_file_item;
   GtkWidget *sort_directories_item;
   GtkWidget *show_time_item;
+  GtkWidget *arrange_item;
+  GtkWidget *sort_by_name_item;
+  GtkWidget *sort_by_size_item;
+  GtkWidget *sort_by_time_item;
+  GtkWidget *ascending_item;
+  GtkWidget *descending_item;
 
   GtkWidget *browse_new_folder_button;
   GtkSizeGroup *browse_path_bar_size_group;
@@ -264,6 +282,7 @@ struct _GtkFileChooserWidgetPrivate {
 
   GtkGesture *long_press_gesture;
 
+  GtkTreeModel *current_model;
   GtkFileSystemModel *browse_files_model;
   char *browse_files_last_selected_name;
 
@@ -351,10 +370,17 @@ struct _GtkFileChooserWidgetPrivate {
   guint location_changed_id;
 
   gulong settings_signal_id;
-  int icon_size;
+  gint list_view_icon_size;
+  gint icon_view_icon_size;
 
   GSource *focus_entry_idle;
 
+  GtkWidget *view_mode_combo_box;
+  GtkWidget *icon_view_scale;
+  ViewMode view_mode;
+
+  GtkCellRenderer *list_icon_renderer;
+
   gulong toplevel_set_focus_id;
   GtkWidget *toplevel_last_focus_widget;
 
@@ -422,7 +448,8 @@ enum {
   MODEL_COL_NAME_COLLATED,
   MODEL_COL_IS_FOLDER,
   MODEL_COL_IS_SENSITIVE,
-  MODEL_COL_SURFACE,
+  MODEL_COL_LIST_SURFACE,
+  MODEL_COL_ICON_PIXBUF,
   MODEL_COL_SIZE_TEXT,
   MODEL_COL_DATE_TEXT,
   MODEL_COL_TIME_TEXT,
@@ -442,7 +469,8 @@ enum {
         G_TYPE_STRING,            /* MODEL_COL_NAME_COLLATED */ \
         G_TYPE_BOOLEAN,           /* MODEL_COL_IS_FOLDER */     \
         G_TYPE_BOOLEAN,           /* MODEL_COL_IS_SENSITIVE */  \
-        CAIRO_GOBJECT_TYPE_SURFACE,  /* MODEL_COL_SURFACE */    \
+        CAIRO_GOBJECT_TYPE_SURFACE,  /* MODEL_COL_LIST_SURFACE */ \
+        GDK_TYPE_PIXBUF,          /* MODEL_COL_ICON_PIXBUF */   \
         G_TYPE_STRING,            /* MODEL_COL_SIZE_TEXT */     \
         G_TYPE_STRING,            /* MODEL_COL_DATE_TEXT */     \
         G_TYPE_STRING,            /* MODEL_COL_TIME_TEXT */     \
@@ -452,7 +480,10 @@ enum {
 #define DEFAULT_RECENT_FILES_LIMIT 50
 
 /* Icon size for if we can't get it from the theme */
-#define FALLBACK_ICON_SIZE 16
+#define FALLBACK_LIST_VIEW_ICON_SIZE 16
+#define FALLBACK_ICON_VIEW_ICON_SIZE 48
+
+#define ICON_VIEW_ITEM_WIDTH 128
 
 #define PREVIEW_HBOX_SPACING 12
 #define NUM_LINES 45
@@ -573,7 +604,7 @@ static gboolean list_select_func   (GtkT
                                     gboolean               path_currently_selected,
                                     gpointer               data);
 
-static void list_selection_changed     (GtkTreeSelection      *tree_selection,
+static void list_selection_changed     (void                  *selection,
                                         GtkFileChooserWidget  *impl);
 static void list_row_activated         (GtkTreeView           *tree_view,
                                         GtkTreePath           *path,
@@ -581,6 +612,13 @@ static void list_row_activated         (
                                         GtkFileChooserWidget  *impl);
 static void list_cursor_changed        (GtkTreeView           *treeview,
                                         GtkFileChooserWidget  *impl);
+static void icon_item_activated        (GtkIconView           *icon_view,
+                                        GtkTreePath           *path,
+                                        GtkFileChooserWidget  *impl);
+static void item_activated             (GtkTreeModel          *model,
+                                        GtkTreePath           *path,
+                                        GtkFileChooserWidget  *impl);
+
 
 static void path_bar_clicked (GtkPathBar            *path_bar,
                               GFile                 *file,
@@ -593,6 +631,13 @@ static void update_cell_renderer_attribu
 static void load_remove_timer (GtkFileChooserWidget *impl, LoadState new_load_state);
 static void browse_files_center_selected_row (GtkFileChooserWidget *impl);
 
+static void icon_view_scale_value_changed_cb (GtkRange             *range,
+                                              GtkFileChooserWidget *impl);
+
+static void view_mode_set (GtkFileChooserWidget *impl, ViewMode view_mode);
+static void view_mode_combo_box_changed_cb (GtkComboBox          *combo,
+                                            GtkFileChooserWidget *impl);
+
 static void location_switch_to_path_bar (GtkFileChooserWidget *impl);
 
 static void stop_loading_and_clear_list_model (GtkFileChooserWidget *impl,
@@ -622,6 +667,26 @@ static gboolean recent_should_respond
 static void     set_file_system_backend      (GtkFileChooserWidget *impl);
 static void     unset_file_system_backend    (GtkFileChooserWidget *impl);
 
+static gboolean get_selected_tree_iter_from_icon_view (GtkFileChooserWidget  *impl,
+                                                       GtkTreeIter           *iter_out);
+static void     current_selection_selected_foreach    (GtkFileChooserWidget       *impl,
+                                                       GtkTreeSelectionForeachFunc func,
+                                                       gpointer                    data);
+static guint    current_selection_count_selected_rows (GtkFileChooserWidget  *impl);
+static void     current_selection_select_iter         (GtkFileChooserWidget  *impl,
+                                                       GtkTreeIter           *iter);
+static void     copy_old_selection_to_current_view    (GtkFileChooserWidget  *impl,
+                                                       ViewMode               old_view_mode);
+static void     current_selection_unselect_iter       (GtkFileChooserWidget  *impl,
+                                                       GtkTreeIter           *iter);
+static void     current_selection_unselect_all        (GtkFileChooserWidget  *impl);
+static void     current_view_set_file_model           (GtkFileChooserWidget  *impl,
+                                                       GtkTreeModel          *model);
+static void     current_view_set_cursor               (GtkFileChooserWidget  *impl,
+                                                       GtkTreePath           *path);
+static void     current_view_set_select_multiple      (GtkFileChooserWidget  *impl,
+                                                       gboolean select_multiple);
+
 static void     clear_model_cache            (GtkFileChooserWidget *impl,
                                               gint                  column);
 static void     set_model_filter             (GtkFileChooserWidget *impl,
@@ -959,7 +1024,7 @@ update_preview_widget_visibility (GtkFil
         }
     }
 
-  if (priv->preview_widget_active && priv->preview_widget)
+  if (priv->preview_widget_active && priv->preview_widget && priv->view_mode == VIEW_MODE_LIST)
     gtk_widget_show (priv->preview_box);
   else
     gtk_widget_hide (priv->preview_box);
@@ -1227,19 +1292,16 @@ selection_check (GtkFileChooserWidget *i
                  gboolean              *all_files,
                  gboolean              *all_folders)
 {
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
   struct selection_check_closure closure;
-  GtkTreeSelection *selection;
 
   closure.impl = impl;
   closure.num_selected = 0;
   closure.all_files = TRUE;
   closure.all_folders = TRUE;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_selected_foreach (selection,
-                                       selection_check_foreach_cb,
-                                       &closure);
+  current_selection_selected_foreach (impl,
+                                      selection_check_foreach_cb,
+                                      &closure);
 
   g_assert (closure.num_selected == 0 || !(closure.all_files && closure.all_folders));
 
@@ -1367,7 +1429,7 @@ browse_files_key_press_event_cb (GtkWidg
       return TRUE;
     }
 
-  if (key_is_left_or_right (event))
+  if (priv->view_mode == VIEW_MODE_LIST && key_is_left_or_right (event))
     {
       if (gtk_widget_child_focus (priv->places_sidebar, GTK_DIR_LEFT))
         return TRUE;
@@ -1470,12 +1532,8 @@ add_to_shortcuts_cb (GSimpleAction *acti
                      gpointer       data)
 {
   GtkFileChooserWidget *impl = data;
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
-
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
 
-  gtk_tree_selection_selected_foreach (selection,
+  current_selection_selected_foreach (impl,
                                        add_bookmark_foreach_cb,
                                        impl);
 }
@@ -1848,6 +1906,86 @@ open_folder_cb (GSimpleAction *action,
 }
 G_GNUC_END_IGNORE_DEPRECATIONS
 
+/* callback used when "Sort by Name" menu item is activated */
+static void
+sort_by_name_cb (GSimpleAction *action,
+                 GVariant      *parameter,
+                 gpointer      data)
+{
+  GtkFileChooserWidget *impl = data;
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSortable *sortable;
+
+  sortable = GTK_TREE_SORTABLE (priv->browse_files_model);
+  gtk_tree_sortable_set_sort_column_id (sortable,
+                                        priv->sort_column=MODEL_COL_NAME,
+                                        priv->sort_order);
+}
+
+/* callback used when "Sort by Size" menu item is activated */
+static void
+sort_by_size_cb (GSimpleAction *action,
+                 GVariant      *parameter,
+                 gpointer      data)
+{
+  GtkFileChooserWidget *impl = data;
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSortable *sortable;
+
+  sortable = GTK_TREE_SORTABLE (priv->browse_files_model);
+  gtk_tree_sortable_set_sort_column_id (sortable,
+                                        priv->sort_column=MODEL_COL_SIZE,
+                                        priv->sort_order);
+}
+
+/* callback used when "Sort by Time" menu item is activated */
+static void
+sort_by_time_cb (GSimpleAction *action,
+                 GVariant      *parameter,
+                 gpointer      data)
+{
+  GtkFileChooserWidget *impl = data;
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSortable *sortable;
+
+  sortable = GTK_TREE_SORTABLE (priv->browse_files_model);
+  gtk_tree_sortable_set_sort_column_id (sortable,
+                                        priv->sort_column=MODEL_COL_TIME,
+                                        priv->sort_order);
+}
+
+/* callback used when "Ascending" menu item is activated */
+static void
+ascending_cb (GSimpleAction *action,
+              GVariant      *parameter,
+              gpointer      data)
+{
+  GtkFileChooserWidget *impl = data;
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSortable *sortable;
+
+  sortable = GTK_TREE_SORTABLE (priv->browse_files_model);
+  gtk_tree_sortable_set_sort_column_id (sortable,
+                                        priv->sort_column,
+                                        priv->sort_order=GTK_SORT_ASCENDING);
+}
+
+/* callback used when "Descending" menu item is activated */
+static void
+descending_cb (GSimpleAction *action,
+               GVariant      *parameter,
+               gpointer      data)
+{
+  GtkFileChooserWidget *impl = data;
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSortable *sortable;
+
+  sortable = GTK_TREE_SORTABLE (priv->browse_files_model);
+  gtk_tree_sortable_set_sort_column_id (sortable,
+                                        priv->sort_column,
+                                        priv->sort_order=GTK_SORT_DESCENDING);
+}
+
 /* callback used when the "Show Hidden Files" menu item is toggled */
 static void
 change_show_hidden_state (GSimpleAction *action,
@@ -2175,6 +2313,7 @@ check_file_list_popover_sensitivity (Gtk
   gboolean all_files;
   gboolean all_folders;
   gboolean active;
+  gboolean always_active;
   GActionGroup *actions;
   GAction *action, *action2;
 
@@ -2183,6 +2322,7 @@ check_file_list_popover_sensitivity (Gtk
   selection_check (impl, &num_selected, &all_files, &all_folders);
 
   active = (num_selected != 0);
+  always_active = (num_selected >= 0);
 
   action = g_action_map_lookup_action (G_ACTION_MAP (actions), "copy-location");
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), active);
@@ -2196,6 +2336,21 @@ check_file_list_popover_sensitivity (Gtk
   action = g_action_map_lookup_action (G_ACTION_MAP (actions), "open");
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), (num_selected == 1) && all_folders);
 
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-name");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active);
+
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-size");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active);
+
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-time");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active);
+
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "ascending");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active);
+
+  action = g_action_map_lookup_action (G_ACTION_MAP (actions), "descending");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active);
+
   action = g_action_map_lookup_action (G_ACTION_MAP (actions), "rename");
   if (num_selected == 1)
     {
@@ -2261,6 +2416,11 @@ static GActionEntry entries[] = {
   { "rename", rename_file_cb, NULL, NULL, NULL },
   { "delete", delete_file_cb, NULL, NULL, NULL },
   { "trash", trash_file_cb, NULL, NULL, NULL },
+  { "sort-by-name", sort_by_name_cb, NULL, NULL, NULL },
+  { "sort-by-size", sort_by_size_cb, NULL, NULL, NULL },
+  { "sort-by-time", sort_by_time_cb, NULL, NULL, NULL },
+  { "ascending", ascending_cb, NULL, NULL, NULL },
+  { "descending", descending_cb, NULL, NULL, NULL },
   { "toggle-show-hidden", NULL, NULL, "false", change_show_hidden_state },
   { "toggle-show-size", NULL, NULL, "false", change_show_size_state },
   { "toggle-show-type", NULL, NULL, "false", change_show_type_state },
@@ -2290,17 +2450,6 @@ append_separator (GtkWidget *box)
   gtk_widget_set_visible (GTK_WIDGET (separator), TRUE);
   gtk_menu_shell_append (GTK_MENU_SHELL (box), separator);
   return separator;
-  separator = g_object_new (GTK_TYPE_SEPARATOR,
-                            "orientation", GTK_ORIENTATION_HORIZONTAL,
-                            "visible", TRUE,
-                            "margin-start", 12,
-                            "margin-end", 12,
-                            "margin-top", 6,
-                            "margin-bottom", 6,
-                            NULL);
-  gtk_container_add (GTK_CONTAINER (box), separator);
-
-  return separator;
 }
 
 /* Constructs the popup menu for the file list if needed */
@@ -2319,14 +2468,6 @@ add_button (GtkWidget   *box,
   gtk_widget_set_visible (GTK_WIDGET (item), TRUE);
   gtk_menu_shell_append (GTK_MENU_SHELL (box), item);
   return item;
- item = g_object_new (GTK_TYPE_MODEL_BUTTON,
-                       "visible", TRUE,
-                       "action-name", action,
-                       "text", label,
-                       NULL);
-  gtk_container_add (GTK_CONTAINER (box), item);
-
-  return item;
 }
 
 static void
@@ -2338,11 +2479,6 @@ file_list_build_popover (GtkFileChooserW
   if (priv->browse_files_popover)
     return;
 
-  priv->browse_files_popover = gtk_popover_new (priv->browse_files_tree_view);
-  box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-  g_object_set (box, "margin", 10, NULL);
-  gtk_widget_show (box);
-  gtk_container_add (GTK_CONTAINER (priv->browse_files_popover), box);
   priv->browse_files_popover = gtk_menu_new ();
   gtk_menu_attach_to_widget (GTK_MENU (priv->browse_files_popover), GTK_WIDGET (priv->browse_files_tree_view), NULL);
   box = priv->browse_files_popover;
@@ -2357,11 +2493,29 @@ file_list_build_popover (GtkFileChooserW
 
   append_separator (box);
 
-  priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden");
-  priv->size_column_item = add_button (box, _("Show _Size Column"), "item.toggle-show-size");
-  priv->type_column_item = add_button (box, _("Show T_ype Column"), "item.toggle-show-type");
-  priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time");
-  priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first");
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden");
+      priv->size_column_item = add_button (box, _("Show _Size Column"), "item.toggle-show-size");
+      priv->type_column_item = add_button (box, _("Show T_ype Column"), "item.toggle-show-type");
+      priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time");
+      priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first");
+    }
+  if (priv->view_mode == VIEW_MODE_ICON)
+    {
+      GtkWidget *menu;
+      priv->arrange_item = add_button (box, _("Arrange Items"), NULL);
+      menu = gtk_menu_new ();
+      gtk_menu_item_set_submenu (GTK_MENU_ITEM (priv->arrange_item), menu);
+      priv->sort_by_name_item = add_button (menu, _("Sort _by Name"), "item.sort-by-name");
+      priv->sort_by_size_item = add_button (menu, _("Sort _by Size"), "item.sort-by-size");
+      priv->sort_by_time_item = add_button (menu, _("Sort _by Time"), "item.sort-by-time");
+      append_separator (menu);
+      priv->ascending_item = add_button (menu, _("Ascending"), "item.ascending");
+      priv->descending_item = add_button (menu, _("Descending"), "item.descending");
+      priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden");
+      priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first");
+    }
   g_object_set (priv->visit_file_item,         "image", gtk_image_new_from_icon_name ("gtk-jump-to",    GTK_ICON_SIZE_MENU), NULL);
   g_object_set (priv->open_folder_item,        "image", gtk_image_new_from_icon_name ("gtk-open",       GTK_ICON_SIZE_MENU), NULL);
   g_object_set (priv->copy_file_location_item, "image", gtk_image_new_from_icon_name ("gtk-copy",       GTK_ICON_SIZE_MENU), NULL);
@@ -2419,41 +2573,10 @@ file_list_show_popover (GtkFileChooserWi
                         gdouble               y)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GdkRectangle rect;
-  GtkTreeSelection *selection;
-  GtkTreeModel *model;
-  GList *list;
-  GtkTreePath *path;
-
 
   file_list_update_popover (impl);
   gtk_menu_popup_at_pointer (GTK_MENU (priv->browse_files_popover), NULL);
   return;
-
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  list = gtk_tree_selection_get_selected_rows (selection, &model);
-  if (list)
-    {
-      path = list->data;
-      gtk_tree_view_get_cell_area (GTK_TREE_VIEW (priv->browse_files_tree_view), path, NULL, &rect);
-      gtk_tree_view_convert_bin_window_to_widget_coords (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                                                     rect.x, rect.y, &rect.x, &rect.y);
-
-      rect.x = CLAMP (x - 20, 0, gtk_widget_get_allocated_width (priv->browse_files_tree_view) - 40);
-      rect.width = 40;
-
-      g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
-    }
-  else
-    {
-      rect.x = x;
-      rect.y = y;
-      rect.width = 1;
-      rect.height = 1;
-    }
-
-  gtk_popover_set_pointing_to (GTK_POPOVER (priv->browse_files_popover), &rect);
-  gtk_popover_popup (GTK_POPOVER (priv->browse_files_popover));
 }
 
 /* Callback used for the GtkWidget::popup-menu signal of the file list */
@@ -2490,7 +2613,7 @@ list_button_press_event_cb (GtkWidget
     return FALSE;
 
   in_press = TRUE;
-  gtk_widget_event (priv->browse_files_tree_view, (GdkEvent *) event);
+  gtk_widget_event (widget, (GdkEvent *) event);
   in_press = FALSE;
 
   file_list_show_popover (impl, event->x, event->y);
@@ -2521,13 +2644,16 @@ file_list_set_sort_column_ids (GtkFileCh
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
-  gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), 0);
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), 0);
 
-  gtk_tree_view_column_set_sort_column_id (priv->list_name_column, MODEL_COL_NAME);
-  gtk_tree_view_column_set_sort_column_id (priv->list_time_column, MODEL_COL_TIME);
-  gtk_tree_view_column_set_sort_column_id (priv->list_size_column, MODEL_COL_SIZE);
-  gtk_tree_view_column_set_sort_column_id (priv->list_type_column, MODEL_COL_TYPE);
-  gtk_tree_view_column_set_sort_column_id (priv->list_location_column, MODEL_COL_LOCATION_TEXT);
+      gtk_tree_view_column_set_sort_column_id (priv->list_name_column, MODEL_COL_NAME);
+      gtk_tree_view_column_set_sort_column_id (priv->list_time_column, MODEL_COL_TIME);
+      gtk_tree_view_column_set_sort_column_id (priv->list_size_column, MODEL_COL_SIZE);
+      gtk_tree_view_column_set_sort_column_id (priv->list_type_column, MODEL_COL_TYPE);
+      gtk_tree_view_column_set_sort_column_id (priv->list_location_column, MODEL_COL_LOCATION_TEXT);
+    }
 }
 
 static gboolean
@@ -2550,11 +2676,22 @@ file_list_query_tooltip_cb (GtkWidget  *
     return FALSE;
 
 
-  if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                                          &x, &y,
-                                          keyboard_tip,
-                                          &model, &path, &iter))
-    return FALSE;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (priv->browse_files_tree_view),
+                                              &x, &y,
+                                              keyboard_tip,
+                                              &model, &path, &iter))
+        return FALSE;
+    }
+  else if(priv->view_mode == VIEW_MODE_ICON)
+    {
+      if (!gtk_icon_view_get_tooltip_context (GTK_ICON_VIEW (priv->browse_files_icon_view),
+                                              &x, &y,
+                                              keyboard_tip,
+                                              &model, &path, &iter))
+        return FALSE;
+    }
 
   gtk_tree_model_get (model, &iter,
                       MODEL_COL_FILE, &file,
@@ -2568,10 +2705,18 @@ file_list_query_tooltip_cb (GtkWidget  *
 
   filename = g_file_get_path (file);
   gtk_tooltip_set_text (tooltip, filename);
-  gtk_tree_view_set_tooltip_row (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                                 tooltip,
-                                 path);
-
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      gtk_tree_view_set_tooltip_row (GTK_TREE_VIEW (priv->browse_files_tree_view),
+                                     tooltip,
+                                     path);
+    }
+  else if(priv->view_mode == VIEW_MODE_ICON)
+    {
+      gtk_icon_view_set_tooltip_item (GTK_ICON_VIEW (priv->browse_files_icon_view),
+                                      tooltip,
+                                      path);
+    }
   g_free (filename);
   g_object_unref (file);
   gtk_tree_path_free (path);
@@ -2587,8 +2732,8 @@ set_icon_cell_renderer_fixed_size (GtkFi
 
   gtk_cell_renderer_get_padding (priv->list_pixbuf_renderer, &xpad, &ypad);
   gtk_cell_renderer_set_fixed_size (priv->list_pixbuf_renderer,
-                                    xpad * 2 + priv->icon_size,
-                                    ypad * 2 + priv->icon_size);
+                                    xpad * 2 + priv->list_view_icon_size,
+                                    ypad * 2 + priv->list_view_icon_size);
 }
 
 static gboolean
@@ -2872,7 +3017,7 @@ location_mode_set (GtkFileChooserWidget
           location_switch_to_path_bar (impl);
 
           if (switch_to_file_list)
-            gtk_widget_grab_focus (priv->browse_files_tree_view);
+            gtk_widget_grab_focus (priv->browse_files_current_view);
 
           break;
 
@@ -2943,6 +3088,119 @@ location_toggle_popup_handler (GtkFileCh
     }
 }
 
+/* Creates icon view (alternative for the list view) */
+static GtkWidget *
+create_browse_files_icon_view (GtkFileChooserWidget *impl)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+
+  gtk_icon_view_set_text_column (GTK_ICON_VIEW (priv->browse_files_icon_view),
+                                 MODEL_COL_NAME);
+  gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (priv->browse_files_icon_view),
+                                   MODEL_COL_ICON_PIXBUF);
+  gtk_icon_view_set_item_width (GTK_ICON_VIEW (priv->browse_files_icon_view),
+                                ICON_VIEW_ITEM_WIDTH);
+
+  return priv->browse_files_icon_view;
+}
+
+static void
+view_mode_set (GtkFileChooserWidget *impl, ViewMode view_mode)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkWidget *old_view = NULL;
+  ViewMode old_view_mode = priv->view_mode;
+  priv->browse_files_popover = NULL;
+
+  if (old_view_mode == view_mode)
+    return;
+
+  g_debug("GtkFileChooserWidget::view_mode_set %d", view_mode);
+
+  priv->view_mode = view_mode;
+  gtk_combo_box_set_active (GTK_COMBO_BOX (priv->view_mode_combo_box),
+                            view_mode);
+
+  /* Creating the target view */
+  if (view_mode == VIEW_MODE_ICON)
+    {
+      priv->browse_files_current_view = priv->browse_files_icon_view;
+      old_view = priv->browse_files_tree_view;
+      gtk_widget_show (priv->icon_view_scale);
+    }
+  else if (view_mode == VIEW_MODE_LIST)
+    {
+      priv->browse_files_current_view = priv->browse_files_tree_view;
+      old_view = priv->browse_files_icon_view;
+      gtk_widget_hide (priv->icon_view_scale);
+    }
+  else
+    g_assert_not_reached ();
+
+  /* Set model and selection */
+  current_view_set_file_model (impl, priv->current_model);
+  current_view_set_select_multiple (impl, priv->select_multiple);
+  copy_old_selection_to_current_view (impl, old_view_mode);
+
+  /* Hide the old view */
+  g_object_set (old_view, "model", NULL, NULL);
+  gtk_widget_hide (old_view);
+
+  /* Show the new view */
+  gtk_widget_show (priv->browse_files_current_view);
+  gtk_notebook_set_current_page(priv->view_notebook, view_mode);
+}
+
+/* Callback used when view mode combo box active item is changed */
+static void
+view_mode_combo_box_changed_cb (GtkComboBox          *combo,
+                                GtkFileChooserWidget *impl)
+{
+  ViewMode target = gtk_combo_box_get_active (combo);
+
+  view_mode_set (impl, target);
+}
+
+/* Callback used when view mode is changed */
+gboolean
+view_notebook_switch_page_cb (GtkNotebook *notebook,
+               GtkWidget   *page,
+               guint        page_num,
+               gpointer     user_data)
+{
+  GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (user_data);
+  view_mode_set (impl, page_num);
+  return TRUE;
+}
+
+static void
+icon_view_scale_value_changed_cb (GtkRange             *range,
+                                  GtkFileChooserWidget *impl)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  gdouble value = gtk_range_get_value (range);
+  value = round (value / 16) * 16;
+
+  if (priv->icon_view_icon_size == (gint)value)
+    return;
+
+  priv->icon_view_icon_size = (gint)value;
+
+  if (priv->view_mode != VIEW_MODE_ICON)
+    return;
+
+  set_icon_cell_renderer_fixed_size (impl);
+
+  if (priv->browse_files_model)
+    _gtk_file_system_model_clear_cache (priv->browse_files_model, MODEL_COL_ICON_PIXBUF);
+  if (priv->search_model)
+    _gtk_file_system_model_clear_cache (priv->search_model, MODEL_COL_ICON_PIXBUF);
+  if (priv->recent_model)
+    _gtk_file_system_model_clear_cache (priv->recent_model, MODEL_COL_ICON_PIXBUF);
+
+  gtk_widget_queue_resize (priv->browse_files_current_view);
+}
+
 static void
 gtk_file_chooser_widget_constructed (GObject *object)
 {
@@ -3051,18 +3309,11 @@ set_select_multiple (GtkFileChooserWidge
                      gboolean               property_notify)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
-  GtkSelectionMode mode;
 
   if (select_multiple == priv->select_multiple)
     return;
 
-  mode = select_multiple ? GTK_SELECTION_MULTIPLE : GTK_SELECTION_SINGLE;
-
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_set_mode (selection, mode);
-
-  gtk_tree_view_set_rubber_banding (GTK_TREE_VIEW (priv->browse_files_tree_view), select_multiple);
+  current_view_set_select_multiple (impl, select_multiple);
 
   priv->select_multiple = select_multiple;
   g_object_notify (G_OBJECT (impl), "select-multiple");
@@ -3189,6 +3440,7 @@ operation_mode_set_enter_location (GtkFi
   gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "location");
   gtk_revealer_set_reveal_child (GTK_REVEALER (priv->browse_header_revealer), TRUE);
   location_bar_update (impl);
+  gtk_tree_view_column_set_visible (priv->list_location_column, FALSE);
   gtk_widget_set_sensitive (priv->filter_combo, TRUE);
   location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY);
 }
@@ -3218,7 +3470,7 @@ operation_mode_set_search (GtkFileChoose
   visible_widget = gtk_stack_get_visible_child (GTK_STACK (priv->browse_files_stack));
 
   if (visible_widget != priv->places_view &&
-      visible_widget != priv->browse_files_swin)
+      visible_widget != priv->browse_files_list_swin)
     {
       gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "list");
     }
@@ -3343,6 +3595,12 @@ update_appearance (GtkFileChooserWidget
       location_mode_set (impl, priv->location_mode);
     }
 
+  if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+      priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+    gtk_widget_show (priv->view_mode_combo_box);
+  else
+    gtk_widget_hide (priv->view_mode_combo_box);
+
   if (priv->location_entry)
     _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->action);
 
@@ -3351,7 +3609,7 @@ update_appearance (GtkFileChooserWidget
   /* This *is* needed; we need to redraw the file list because the "sensitivity"
    * of files may change depending whether we are in a file or folder-only mode.
    */
-  gtk_widget_queue_draw (priv->browse_files_tree_view);
+  gtk_widget_queue_draw (priv->browse_files_current_view);
 
   emit_default_size_changed (impl);
 }
@@ -3781,14 +4039,27 @@ change_icon_theme (GtkFileChooserWidget
   profile_start ("start", NULL);
 
   if (gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height))
-    priv->icon_size = MAX (width, height);
+    priv->list_view_icon_size = MAX (width, height);
   else
-    priv->icon_size = FALLBACK_ICON_SIZE;
+    priv->list_view_icon_size = FALLBACK_LIST_VIEW_ICON_SIZE;
 
-  /* the first cell in the first column is the icon column, and we have a fixed size there */
-  set_icon_cell_renderer_fixed_size (impl);
+  if (gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, &height))
+    {
+      priv->icon_view_icon_size = MAX (width, height);
+    }
+  else
+    priv->list_view_icon_size = FALLBACK_LIST_VIEW_ICON_SIZE;
 
-  clear_model_cache (impl, MODEL_COL_SURFACE);
+  /* the first cell in the first column is the icon column, and we have a fixed size there */
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      set_icon_cell_renderer_fixed_size (impl);
+    }
+  if (priv->browse_files_model)
+  {
+    clear_model_cache (impl, MODEL_COL_LIST_SURFACE);
+    clear_model_cache (impl, MODEL_COL_ICON_PIXBUF);
+  }
   gtk_widget_queue_resize (priv->browse_files_tree_view);
 
   profile_end ("end", NULL);
@@ -3889,7 +4160,7 @@ set_sort_column (GtkFileChooserWidget *i
   GtkFileChooserWidgetPrivate *priv = impl->priv;
   GtkTreeSortable *sortable;
 
-  sortable = GTK_TREE_SORTABLE (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)));
+  sortable = GTK_TREE_SORTABLE (priv->current_model);
 
   /* can happen when we're still populating the model */
   if (sortable == NULL)
@@ -3904,6 +4175,7 @@ static void
 settings_load (GtkFileChooserWidget *impl)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
+  ViewMode view_mode;
   gboolean show_hidden;
   gboolean show_size_column;
   gboolean show_type_column;
@@ -3911,6 +4183,7 @@ settings_load (GtkFileChooserWidget *imp
   DateFormat date_format;
   TypeFormat type_format;
   gint sort_column;
+  gint icon_view_scale;
   GtkSortType sort_order;
   StartupMode startup_mode;
   gint sidebar_width;
@@ -3918,6 +4191,8 @@ settings_load (GtkFileChooserWidget *imp
 
   settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl));
 
+  view_mode = g_settings_get_enum (settings, SETTINGS_KEY_VIEW_MODE);
+  icon_view_scale = g_settings_get_int (settings, SETTINGS_KEY_ICON_VIEW_SCALE);
   show_hidden = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN);
   show_size_column = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN);
   show_type_column = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_TYPE_COLUMN);
@@ -3929,12 +4204,20 @@ settings_load (GtkFileChooserWidget *imp
   date_format = g_settings_get_enum (settings, SETTINGS_KEY_DATE_FORMAT);
   type_format = g_settings_get_enum (settings, SETTINGS_KEY_TYPE_FORMAT);
 
+  gtk_range_set_value (GTK_RANGE (priv->icon_view_scale), icon_view_scale);
+  priv->icon_view_icon_size = icon_view_scale;
+
+  view_mode_set (impl, view_mode);
+
   if (!priv->show_hidden_set)
     set_show_hidden (impl, show_hidden);
   priv->show_size_column = show_size_column;
-  gtk_tree_view_column_set_visible (priv->list_size_column, show_size_column);
-  priv->show_type_column = show_type_column;
-  gtk_tree_view_column_set_visible (priv->list_type_column, show_type_column);
+
+  if (priv->list_size_column) {
+    gtk_tree_view_column_set_visible (priv->list_size_column, show_size_column);
+    priv->show_type_column = show_type_column;
+    gtk_tree_view_column_set_visible (priv->list_type_column, show_type_column);
+  }
 
   priv->sort_column = sort_column;
   priv->sort_order = sort_order;
@@ -3963,6 +4246,8 @@ settings_save (GtkFileChooserWidget *imp
   /* All the other state */
 
   g_settings_set_enum (settings, SETTINGS_KEY_LOCATION_MODE, priv->location_mode);
+  g_settings_set_enum (settings, SETTINGS_KEY_VIEW_MODE, priv->view_mode);
+  g_settings_set_int (settings, SETTINGS_KEY_ICON_VIEW_SCALE, priv->icon_view_icon_size);
   g_settings_set_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN,
                           gtk_file_chooser_get_show_hidden (GTK_FILE_CHOOSER (impl)));
   g_settings_set_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN, priv->show_size_column);
@@ -4474,10 +4759,14 @@ load_set_model (GtkFileChooserWidget *im
   g_assert (priv->browse_files_model != NULL);
 
   profile_msg ("    gtk_tree_view_set_model start", NULL);
-  gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                           GTK_TREE_MODEL (priv->browse_files_model));
-  update_columns (impl, FALSE, _("Modified"));
-  file_list_set_sort_column_ids (impl);
+  current_view_set_file_model (impl, GTK_TREE_MODEL (priv->browse_files_model));
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view),
+                               GTK_TREE_MODEL (priv->browse_files_model));
+      update_columns (impl, FALSE, _("Modified"));
+      file_list_set_sort_column_ids (impl);
+    }
   set_sort_column (impl);
   profile_msg ("    gtk_tree_view_set_model end", NULL);
   priv->list_sort_ascending = TRUE;
@@ -4557,7 +4846,7 @@ browse_files_select_first_row (GtkFileCh
   GtkTreeIter dummy_iter;
   GtkTreeModel *tree_model;
 
-  tree_model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view));
+  tree_model = priv->current_model;
 
   if (!tree_model)
     return;
@@ -4576,8 +4865,7 @@ browse_files_select_first_row (GtkFileCh
        */
       priv->auto_selecting_first_row = TRUE;
 
-      gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->browse_files_tree_view), path, NULL, FALSE);
-
+      current_view_set_cursor (impl, path);
       priv->auto_selecting_first_row = FALSE;
     }
   gtk_tree_path_free (path);
@@ -4603,7 +4891,13 @@ center_selected_row_foreach_cb (GtkTreeM
   if (closure->already_centered)
     return;
 
-  gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (closure->impl->priv->browse_files_tree_view), path, NULL, TRUE, 0.5, 0.0);
+  if (closure->impl->priv->view_mode == VIEW_MODE_LIST)
+    gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (closure->impl->priv->browse_files_tree_view), path, NULL, TRUE, 0.5, 0.0);
+  else if (closure->impl->priv->view_mode == VIEW_MODE_ICON)
+    gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (closure->impl->priv->browse_files_icon_view), path, TRUE, 0.5, 0.0);
+  else
+    g_assert_not_reached ();
+
   closure->already_centered = TRUE;
 }
 
@@ -4611,15 +4905,11 @@ center_selected_row_foreach_cb (GtkTreeM
 static void
 browse_files_center_selected_row (GtkFileChooserWidget *impl)
 {
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
   struct center_selected_row_closure closure;
-  GtkTreeSelection *selection;
-
   closure.impl = impl;
   closure.already_centered = FALSE;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_selected_foreach (selection, center_selected_row_foreach_cb, &closure);
+  current_selection_selected_foreach(impl, center_selected_row_foreach_cb, &closure);
 }
 
 static gboolean
@@ -4627,7 +4917,6 @@ show_and_select_files (GtkFileChooserWid
                        GSList               *files)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
   GtkFileSystemModel *fsmodel;
   gboolean enabled_hidden, removed_filters;
   gboolean selected_a_file;
@@ -4636,8 +4925,7 @@ show_and_select_files (GtkFileChooserWid
   g_assert (priv->load_state == LOAD_FINISHED);
   g_assert (priv->browse_files_model != NULL);
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  fsmodel = GTK_FILE_SYSTEM_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)));
+  fsmodel = GTK_FILE_SYSTEM_MODEL (priv->current_model);
 
   g_assert (fsmodel == priv->browse_files_model);
 
@@ -4692,11 +4980,10 @@ show_and_select_files (GtkFileChooserWid
         {
           GtkTreePath *path;
 
-          gtk_tree_selection_select_iter (selection, &iter);
+          current_selection_select_iter (impl, &iter);
 
           path = gtk_tree_model_get_path (GTK_TREE_MODEL (fsmodel), &iter);
-          gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                                    path, NULL, FALSE);
+          current_view_set_cursor (impl, path);
           gtk_tree_path_free (path);
 
           selected_a_file = TRUE;
@@ -4847,12 +5134,15 @@ stop_loading_and_clear_list_model (GtkFi
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
+  if (priv->current_model == GTK_TREE_MODEL (priv->browse_files_model))
+    priv->current_model = NULL;
+
   load_remove_timer (impl, LOAD_EMPTY);
 
   g_set_object (&priv->browse_files_model, NULL);
 
   if (remove)
-    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view), NULL);
+    current_view_set_file_model (impl, NULL);
 }
 
 /* Replace 'target' with 'replacement' in the input string. */
@@ -5123,6 +5413,18 @@ end:
 }
 
 static gboolean
+get_visible_range (GtkTreePath **start, GtkTreePath **end,
+                   GtkFileChooserWidget *impl)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    return gtk_tree_view_get_visible_range (GTK_TREE_VIEW (priv->browse_files_tree_view), start, end);
+  if (priv->view_mode == VIEW_MODE_ICON)
+    return gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->browse_files_icon_view), start, end);
+  g_assert_not_reached ();
+}
+
+static gboolean
 file_system_model_set (GtkFileSystemModel *model,
                        GFile              *file,
                        GFileInfo          *info,
@@ -5181,12 +5483,15 @@ file_system_model_set (GtkFileSystemMode
       else
         g_value_set_boolean (value, TRUE);
       break;
-    case MODEL_COL_SURFACE:
+    case MODEL_COL_LIST_SURFACE:
+      /* don't load list view icons in other view modes */
+      if(priv->view_mode != VIEW_MODE_LIST)
+        return FALSE;
       if (info)
         {
           if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
             {
-              g_value_take_boxed (value, _gtk_file_info_render_icon (info, GTK_WIDGET (impl), priv->icon_size));
+              g_value_take_boxed (value, _gtk_file_info_render_icon (info, GTK_WIDGET (impl), priv->list_view_icon_size));
             }
           else
             {
@@ -5240,6 +5545,76 @@ file_system_model_set (GtkFileSystemMode
       else
         g_value_set_boxed (value, NULL);
       break;
+    case MODEL_COL_ICON_PIXBUF:
+      if (info)
+        {
+          GtkTreeModel *tree_model;
+          GtkTreePath *path, *start, *end;
+          GtkTreeIter iter;
+          int icon_size;
+          gboolean file_visible;
+
+          tree_model = priv->current_model;
+          if (tree_model != GTK_TREE_MODEL (model))
+            return FALSE;
+
+          /* #1 use standard icon if it is loaded */
+          if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_ICON))
+            {
+              icon_size = priv->icon_view_icon_size;
+
+              cairo_surface_t *icon_surface = _gtk_file_info_render_icon (info, GTK_WIDGET (impl), icon_size);
+              GdkPixbuf *icon_pixbuf = gdk_pixbuf_get_from_surface(icon_surface,
+                                                                   0, 0,
+                                                                   cairo_image_surface_get_width(icon_surface),
+                                                                   cairo_image_surface_get_height(icon_surface));
+              cairo_surface_destroy(icon_surface);
+
+              g_value_take_object (value,  icon_pixbuf);
+              return TRUE;
+            }
+
+          if (!get_visible_range (&start, &end, impl))
+            return FALSE;
+
+          if (!_gtk_file_system_model_get_iter_for_file (model,
+                                                         &iter,
+                                                         file))
+            g_assert_not_reached ();
+
+          path = gtk_tree_model_get_path (tree_model, &iter);
+          file_visible = (gtk_tree_path_compare (start, path) != 1 &&
+                          gtk_tree_path_compare (path, end) != 1);
+
+          gtk_tree_path_free (path);
+          gtk_tree_path_free (start);
+          gtk_tree_path_free (end);
+
+          if (file_visible)
+            {
+              /* #2 start loading standard icon (callback will be handled by #1) */
+              if (!g_file_info_has_attribute (info, "filechooser::icon_queried"))
+                {
+                  g_file_info_set_attribute_boolean (info, "filechooser::icon_queried", TRUE);
+                  g_file_query_info_async (file,
+                                           G_FILE_ATTRIBUTE_THUMBNAIL_PATH ","
+                                           G_FILE_ATTRIBUTE_THUMBNAILING_FAILED ","
+                                           G_FILE_ATTRIBUTE_STANDARD_ICON,
+                                           G_FILE_QUERY_INFO_NONE,
+                                           G_PRIORITY_DEFAULT,
+                                           _gtk_file_system_model_get_cancellable (model),
+                                           file_system_model_got_thumbnail,
+                                           model);
+                }
+
+            }
+          return FALSE;
+        }
+      else
+        {
+          g_value_set_object (value, NULL);
+        }
+      break;
     case MODEL_COL_SIZE:
       g_value_set_int64 (value, info ? g_file_info_get_size (info) : 0);
       break;
@@ -5432,7 +5807,6 @@ static void
 update_chooser_entry (GtkFileChooserWidget *impl)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
   struct update_chooser_entry_selected_foreach_closure closure;
 
   /* no need to update the file chooser's entry if there's no entry */
@@ -5449,9 +5823,8 @@ update_chooser_entry (GtkFileChooserWidg
 
   g_assert (priv->location_entry != NULL);
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
   closure.num_selected = 0;
-  gtk_tree_selection_selected_foreach (selection, update_chooser_entry_selected_foreach, &closure);
+  current_selection_selected_foreach (impl, update_chooser_entry_selected_foreach, &closure);
 
   if (closure.num_selected == 0)
     {
@@ -5948,19 +6321,15 @@ gtk_file_chooser_widget_unselect_file (G
 {
   GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser);
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeView *tree_view;
-  GtkTreeModel *model;
   GtkTreeIter iter;
 
-  tree_view = GTK_TREE_VIEW (priv->browse_files_tree_view);
-  model = gtk_tree_view_get_model (tree_view);
-  if (!model)
+  if (!priv->current_model)
     return;
 
-  if (!_gtk_file_system_model_get_iter_for_file (GTK_FILE_SYSTEM_MODEL (model), &iter, file))
+  if (!_gtk_file_system_model_get_iter_for_file (GTK_FILE_SYSTEM_MODEL (priv->current_model), &iter, file))
     return;
 
-  gtk_tree_selection_unselect_iter (gtk_tree_view_get_selection (tree_view), &iter);
+  current_selection_unselect_iter (impl, &iter);
 }
 
 static gboolean
@@ -5971,12 +6340,9 @@ maybe_select (GtkTreeModel *model,
 {
   GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (data);
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
   gboolean is_sensitive;
   gboolean is_folder;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-
   gtk_tree_model_get (model, iter,
                       MODEL_COL_IS_FOLDER, &is_folder,
                       MODEL_COL_IS_SENSITIVE, &is_sensitive,
@@ -5985,9 +6351,9 @@ maybe_select (GtkTreeModel *model,
   if (is_sensitive &&
       ((is_folder && priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) ||
        (!is_folder && priv->action == GTK_FILE_CHOOSER_ACTION_OPEN)))
-    gtk_tree_selection_select_iter (selection, iter);
+    current_selection_select_iter (impl, iter);
   else
-    gtk_tree_selection_unselect_iter (selection, iter);
+    current_selection_unselect_iter (impl, iter);
 
   return FALSE;
 }
@@ -6003,8 +6369,15 @@ gtk_file_chooser_widget_select_all (GtkF
     {
       GtkTreeSelection *selection;
 
-      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-      gtk_tree_selection_select_all (selection);
+      if (priv->view_mode == VIEW_MODE_LIST)
+        {
+          selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+          gtk_tree_selection_select_all (selection);
+        }
+      else if (priv->view_mode == VIEW_MODE_ICON)
+        gtk_icon_view_select_all (GTK_ICON_VIEW (priv->browse_files_icon_view));
+      else
+        g_assert_not_reached();
       return;
     }
 
@@ -6017,10 +6390,7 @@ static void
 gtk_file_chooser_widget_unselect_all (GtkFileChooser *chooser)
 {
   GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser);
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-
-  gtk_tree_selection_unselect_all (selection);
+  current_selection_unselect_all (impl);
   pending_select_files_free (impl);
 }
 
@@ -6176,15 +6546,13 @@ gtk_file_chooser_widget_get_files (GtkFi
     current_focus = NULL;
 
   file_list_seen = FALSE;
-  if (current_focus == priv->browse_files_tree_view)
+  if (current_focus == priv->browse_files_current_view)
     {
-      GtkTreeSelection *selection;
-
     file_list:
 
       file_list_seen = TRUE;
-      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-      gtk_tree_selection_selected_foreach (selection, get_files_foreach, &info);
+
+      current_selection_selected_foreach (impl, get_files_foreach, &info);
 
       /* If there is no selection in the file list, we probably have this situation:
        *
@@ -6218,7 +6586,7 @@ gtk_file_chooser_widget_get_files (GtkFi
       else
         return NULL;
     }
-  else if (priv->toplevel_last_focus_widget == priv->browse_files_tree_view)
+  else if (priv->toplevel_last_focus_widget == priv->browse_files_current_view)
     goto file_list;
   else if (priv->location_entry && priv->toplevel_last_focus_widget == priv->location_entry)
     goto file_entry;
@@ -6496,8 +6864,6 @@ switch_folder_foreach_cb (GtkTreeModel *
 static void
 switch_to_selected_folder (GtkFileChooserWidget *impl)
 {
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
   struct switch_folder_closure closure;
 
   /* We do this with foreach() rather than get_selected() as we may be in
@@ -6508,8 +6874,7 @@ switch_to_selected_folder (GtkFileChoose
   closure.file = NULL;
   closure.num_selected = 0;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_selected_foreach (selection, switch_folder_foreach_cb, &closure);
+  current_selection_selected_foreach (impl, switch_folder_foreach_cb, &closure);
 
   g_assert (closure.file && closure.num_selected == 1);
 
@@ -6527,19 +6892,33 @@ get_selected_file_info_from_file_list (G
   GtkTreeSelection *selection;
   GtkTreeIter iter;
   GFileInfo *info;
-  GtkTreeModel *model;
 
   g_assert (!priv->select_multiple);
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+
+  if (priv->view_mode == VIEW_MODE_LIST)
     {
-      *had_selection = FALSE;
-      return NULL;
-    }
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
+        {
+          *had_selection = FALSE;
+          return NULL;
+        }
 
-  *had_selection = TRUE;
+      *had_selection = TRUE;
+    }
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    {
+      if (!get_selected_tree_iter_from_icon_view (impl, &iter))
+        {
+          *had_selection = FALSE;
+          return NULL;
+        }
+      *had_selection = TRUE;
+    }
+  else
+    g_assert_not_reached();
 
-  info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (model), &iter);
+  info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (priv->current_model), &iter);
   return info;
 }
 
@@ -7036,7 +7415,7 @@ gtk_file_chooser_widget_should_respond (
 
   current_focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
 
-  if (current_focus == priv->browse_files_tree_view)
+  if (current_focus == priv->browse_files_current_view)
     {
       /* The following array encodes what we do based on the priv->action and the
        * number of files selected.
@@ -7283,9 +7662,9 @@ gtk_file_chooser_widget_initial_focus (G
     {
       if (priv->location_mode == LOCATION_MODE_PATH_BAR
           || priv->operation_mode == OPERATION_MODE_RECENT)
-        widget = priv->browse_files_tree_view;
+                widget = priv->browse_files_current_view;
       else
-        widget = priv->location_entry;
+                widget = priv->location_entry;
     }
   else if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
            priv->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
@@ -7298,6 +7677,7 @@ gtk_file_chooser_widget_initial_focus (G
 
   g_assert (widget != NULL);
   gtk_widget_grab_focus (widget);
+  create_browse_files_icon_view (impl);
 }
 
 static void
@@ -7321,45 +7701,23 @@ selected_foreach_get_file_cb (GtkTreeMod
 static GSList *
 get_selected_files (GtkFileChooserWidget *impl)
 {
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
   GSList *result;
-  GtkTreeSelection *selection;
-
   result = NULL;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_selected_foreach (selection, selected_foreach_get_file_cb, &result);
+  current_selection_selected_foreach (impl, selected_foreach_get_file_cb, &result);
   result = g_slist_reverse (result);
 
   return result;
 }
 
-static void
-selected_foreach_get_info_cb (GtkTreeModel *model,
-                              GtkTreePath  *path,
-                              GtkTreeIter  *iter,
-                              gpointer      data)
-{
-  GSList **list;
-  GFileInfo *info;
-
-  list = data;
-
-  info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (model), iter);
-  *list = g_slist_prepend (*list, g_object_ref (info));
-}
-
 static GSList *
 get_selected_infos (GtkFileChooserWidget *impl)
 {
-  GtkFileChooserWidgetPrivate *priv = impl->priv;
   GSList *result;
-  GtkTreeSelection *selection;
 
   result = NULL;
 
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  gtk_tree_selection_selected_foreach (selection, selected_foreach_get_info_cb, &result);
+  current_selection_selected_foreach (impl, selected_foreach_get_file_cb, &result);
   result = g_slist_reverse (result);
 
   return result;
@@ -7429,6 +7787,7 @@ search_engine_finished_cb (GtkSearchEngi
       gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "empty");
       gtk_entry_grab_focus_without_selecting (GTK_ENTRY (priv->search_entry));
     }
+  current_view_set_file_model (impl, GTK_TREE_MODEL (priv->search_model));
 }
 
 static void
@@ -7454,7 +7813,7 @@ search_clear_model (GtkFileChooserWidget
 
   if (remove &&
       gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == GTK_TREE_MODEL (priv->search_model))
-    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view), NULL);
+    current_view_set_file_model (impl, NULL);
 
   g_clear_object (&priv->search_model);
 }
@@ -7664,7 +8023,7 @@ recent_clear_model (GtkFileChooserWidget
     return;
 
   if (remove)
-    gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view), NULL);
+    current_view_set_file_model (impl, NULL);
 
   g_set_object (&priv->recent_model, NULL);
 }
@@ -7717,8 +8076,7 @@ recent_idle_cleanup (gpointer data)
   GtkFileChooserWidget *impl = load_data->impl;
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
-  gtk_tree_view_set_model (GTK_TREE_VIEW (priv->browse_files_tree_view),
-                           GTK_TREE_MODEL (priv->recent_model));
+  current_view_set_file_model (impl, GTK_TREE_MODEL (priv->recent_model));
   gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), 0);
 
   gtk_tree_view_column_set_sort_column_id (priv->list_name_column, -1);
@@ -7866,12 +8224,8 @@ static gboolean
 recent_should_respond (GtkFileChooserWidget *impl)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
-  GtkTreeSelection *selection;
-
   g_assert (priv->operation_mode == OPERATION_MODE_RECENT);
-
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  return (gtk_tree_selection_count_selected_rows (selection) != 0);
+  return (current_selection_count_selected_rows (impl) != 0);
 }
 
 static void
@@ -7931,29 +8285,40 @@ check_preview_change (GtkFileChooserWidg
   GtkTreeModel *model;
   GtkTreeSelection *selection;
 
-  model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
-  if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_SINGLE ||
-      gtk_tree_selection_get_mode (selection) == GTK_SELECTION_BROWSE)
+  model = priv->current_model;
+
+  if (priv->view_mode == VIEW_MODE_LIST)
     {
-      GtkTreeIter iter;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_SINGLE ||
+          gtk_tree_selection_get_mode (selection) == GTK_SELECTION_BROWSE)
+        {
+           GtkTreeIter iter;
+
+           if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+             path = gtk_tree_model_get_path (model, &iter);
+           else
+             path = NULL;
+        }
 
-      if (gtk_tree_selection_get_selected (selection, NULL, &iter))
-        path = gtk_tree_model_get_path (model, &iter);
       else
-        path = NULL;
-    }
-  else
-    {
-      gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->browse_files_tree_view), &path, NULL);
-      if (path && !gtk_tree_selection_path_is_selected (selection, path))
         {
-          gtk_tree_path_free (path);
-          path = NULL;
+          gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->browse_files_tree_view), &path, NULL);
+          if (path && !gtk_tree_selection_path_is_selected (selection, path))
+            {
+              gtk_tree_path_free (path);
+              path = NULL;
+            }
         }
     }
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    {
+      gtk_icon_view_get_cursor (GTK_ICON_VIEW (priv->browse_files_icon_view), &path, NULL);
+    }
+  else
+    g_assert_not_reached ();
 
-  if (path)
+  if (path && model)
     {
       GtkTreeIter iter;
 
@@ -8037,15 +8402,13 @@ list_select_func (GtkTreeSelection *sele
   return TRUE;
 }
 
+/* GtkTreeSelection or GtkIconView selection changed. */
 static void
-list_selection_changed (GtkTreeSelection     *selection,
-                        GtkFileChooserWidget *impl)
+list_selection_changed (void                  *selection,
+                        GtkFileChooserWidget  *impl)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
 
-  if (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == NULL)
-    return;
-
   if (priv->location_entry)
     update_chooser_entry (impl);
 
@@ -8070,15 +8433,34 @@ list_row_activated (GtkTreeView
                     GtkTreeViewColumn    *column,
                     GtkFileChooserWidget *impl)
 {
+  GtkTreeModel *model;
+  model = gtk_tree_view_get_model (tree_view);
+  item_activated (model, path, impl);
+}
+
+/* Callback used when a item in the icon file list is activated. */
+static void
+icon_item_activated (GtkIconView           *icon_view,
+                     GtkTreePath           *path,
+                     GtkFileChooserWidget  *impl)
+{
+  GtkTreeModel *model;
+  model = gtk_icon_view_get_model (icon_view);
+  item_activated (model, path, impl);
+}
+
+/* Common implementation for list_row_activated and icon_item_activated */
+static void
+item_activated (GtkTreeModel          *model,
+                GtkTreePath           *path,
+                GtkFileChooserWidget  *impl)
+{
   GtkFileChooserWidgetPrivate *priv = impl->priv;
   GFile *file;
   GtkTreeIter iter;
-  GtkTreeModel *model;
   gboolean is_folder;
   gboolean is_sensitive;
 
-  model = gtk_tree_view_get_model (tree_view);
-
   if (!gtk_tree_model_get_iter (model, &iter, path))
     return;
 
@@ -8098,7 +8480,7 @@ list_row_activated (GtkTreeView
       priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
     g_signal_emit_by_name (impl, "file-activated");
 
- out:
+  out:
 
   if (file)
     g_object_unref (file);
@@ -8129,10 +8511,13 @@ static void
 update_cell_renderer_attributes (GtkFileChooserWidget *impl)
 {
   GtkFileChooserWidgetPrivate *priv = impl->priv;
+  /* only applicable in the tree view (i.e. list view) */
+  if (!priv->browse_files_tree_view)
+    return;
 
   gtk_tree_view_column_set_attributes (priv->list_name_column,
                                        priv->list_pixbuf_renderer,
-                                       "surface", MODEL_COL_SURFACE,
+                                       "surface", MODEL_COL_LIST_SURFACE,
                                        "sensitive", MODEL_COL_IS_SENSITIVE,
                                        NULL);
   gtk_tree_view_column_set_attributes (priv->list_name_column,
@@ -8711,15 +9096,19 @@ gtk_file_chooser_widget_class_init (GtkF
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_stack);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, places_sidebar);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, places_view);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, view_notebook);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_list_swin);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_tree_view);
-  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_swin);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_header_revealer);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_header_stack);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_icon_swin);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_icon_view);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_new_folder_button);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_size_group);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, filter_combo_hbox);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, filter_combo);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, icon_view_scale);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, preview_box);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_align);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_and_filters);
@@ -8738,6 +9127,7 @@ gtk_file_chooser_widget_class_init (GtkF
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_type_renderer);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_location_column);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_location_renderer);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_icon_renderer);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_name_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_create_button);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_error_label);
@@ -8747,6 +9137,7 @@ gtk_file_chooser_widget_class_init (GtkF
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, rename_file_error_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, rename_file_popover);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, remote_warning_bar);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, view_mode_combo_box);
 
   /* And a *lot* of callbacks to bind ... */
   gtk_widget_class_bind_template_callback (widget_class, browse_files_key_press_event_cb);
@@ -8761,6 +9152,10 @@ gtk_file_chooser_widget_class_init (GtkF
   gtk_widget_class_bind_template_callback (widget_class, file_list_drag_end_cb);
   gtk_widget_class_bind_template_callback (widget_class, list_selection_changed);
   gtk_widget_class_bind_template_callback (widget_class, list_cursor_changed);
+  gtk_widget_class_bind_template_callback (widget_class, icon_item_activated);
+  gtk_widget_class_bind_template_callback (widget_class, icon_view_scale_value_changed_cb);
+  gtk_widget_class_bind_template_callback (widget_class, view_mode_combo_box_changed_cb);
+  gtk_widget_class_bind_template_callback (widget_class, view_notebook_switch_page_cb);
   gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
   gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
   gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb);
@@ -8810,6 +9205,18 @@ post_process_ui (GtkFileChooserWidget *i
                      GDK_ACTION_COPY | GDK_ACTION_MOVE);
   gtk_drag_dest_add_uri_targets (impl->priv->browse_files_tree_view);
 
+  /* Setup file list iconview */
+  gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (impl->priv->browse_files_icon_view),
+                                          GDK_BUTTON1_MASK,
+                                          NULL, 0,
+                                          GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  gtk_drag_source_add_uri_targets (impl->priv->browse_files_icon_view);
+  gtk_drag_dest_set (impl->priv->browse_files_icon_view,
+                     GTK_DEST_DEFAULT_ALL,
+                     NULL, 0,
+                     GDK_ACTION_COPY | GDK_ACTION_MOVE);
+  gtk_drag_dest_add_uri_targets (impl->priv->browse_files_icon_view);
+
   /* File browser treemodel columns are shared between GtkFileChooser implementations,
    * so we don't set cell renderer attributes in GtkBuilder, but rather keep that
    * in code.
@@ -8841,6 +9248,7 @@ post_process_ui (GtkFileChooserWidget *i
    * that priv->icon_size be already setup.
    */
   set_icon_cell_renderer_fixed_size (impl);
+  impl->priv->browse_files_current_view = impl->priv->browse_files_tree_view;
 
   atk_obj = gtk_widget_get_accessible (impl->priv->browse_new_folder_button);
   if (GTK_IS_ACCESSIBLE (atk_obj))
@@ -8902,7 +9310,8 @@ gtk_file_chooser_widget_init (GtkFileCho
   priv->show_size_column = TRUE;
   priv->show_type_column = TRUE;
   priv->type_format = TYPE_FORMAT_MIME;
-  priv->icon_size = FALLBACK_ICON_SIZE;
+  priv->list_view_icon_size = FALLBACK_LIST_VIEW_ICON_SIZE;
+  priv->icon_view_icon_size = FALLBACK_ICON_VIEW_ICON_SIZE;
   priv->load_state = LOAD_EMPTY;
   priv->reload_state = RELOAD_EMPTY;
   priv->pending_select_files = NULL;
@@ -8914,6 +9323,7 @@ gtk_file_chooser_widget_init (GtkFileCho
   priv->create_folders = TRUE;
   priv->auto_selecting_first_row = FALSE;
   priv->renamed_file = NULL;
+  priv->view_mode = VIEW_MODE_LIST;
 
   /* Ensure GTK+ private types used by the template
    * definition before calling gtk_widget_init_template()
@@ -8961,6 +9371,258 @@ gtk_file_chooser_widget_new (GtkFileChoo
                        NULL);
 }
 
+static gboolean
+get_selected_tree_iter_from_icon_view (GtkFileChooserWidget *impl,
+                                       GtkTreeIter           *iter_out)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GList *icon_selection;
+  GtkTreePath *icon_selection_path;
+
+  icon_selection = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (priv->browse_files_icon_view));
+  if (!icon_selection)
+    return FALSE;
+
+  icon_selection_path = g_list_nth_data (icon_selection, 0);
+  gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->current_model),
+                           iter_out,
+                           icon_selection_path);
+
+  g_list_foreach (icon_selection, (GFunc) gtk_tree_path_free, NULL);
+  g_list_free (icon_selection);
+  return TRUE;
+}
+
+static void
+icon_view_selection_selected_foreach (GtkFileChooserWidget       *impl,
+                                      GtkTreeSelectionForeachFunc func,
+                                      gpointer                    data)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeIter iter;
+  GList *icon_selection;
+  GList *elem;
+  GtkTreePath *icon_selection_path;
+
+  icon_selection = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (priv->browse_files_icon_view));
+  for (elem = icon_selection; elem; elem = elem->next)
+    {
+      icon_selection_path = elem->data;
+      gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->current_model),
+                               &iter,
+                               icon_selection_path);
+      (* func) (GTK_TREE_MODEL (priv->current_model),
+                icon_selection_path,
+                &iter,
+                data);
+    }
+
+  g_list_foreach (icon_selection, (GFunc) gtk_tree_path_free, NULL);
+  g_list_free (icon_selection);
+}
+
+static void
+selection_selected_foreach (GtkFileChooserWidget       *impl,
+                            ViewMode                    view,
+                            GtkTreeSelectionForeachFunc func,
+                            gpointer                    data)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->current_model == NULL)
+    return;
+
+  if (view == VIEW_MODE_LIST)
+    {
+      GtkTreeSelection *selection;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      gtk_tree_selection_selected_foreach (selection, func, data);
+    }
+  else if (view == VIEW_MODE_ICON)
+    icon_view_selection_selected_foreach (impl, func, data);
+  else
+    g_assert_not_reached ();
+}
+
+static void
+current_selection_selected_foreach (GtkFileChooserWidget       *impl,
+                                    GtkTreeSelectionForeachFunc func,
+                                    gpointer                    data)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  selection_selected_foreach (impl, priv->view_mode, func, data);
+}
+
+static guint
+current_selection_count_selected_rows (GtkFileChooserWidget *impl)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      GtkTreeSelection *selection;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      return gtk_tree_selection_count_selected_rows (selection);
+    }
+  if (priv->view_mode == VIEW_MODE_ICON)
+    {
+      GList *icon_selection;
+      icon_selection = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (priv->browse_files_icon_view));
+      guint count = g_list_length (icon_selection);
+      g_list_foreach (icon_selection, (GFunc) gtk_tree_path_free, NULL);
+      g_list_free (icon_selection);
+      return count;
+    }
+  g_assert_not_reached ();
+  return 0;
+}
+
+static void
+selection_select_iter (GtkFileChooserWidget *impl,
+                       GtkTreeIter           *iter,
+                       ViewMode               target)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (target == VIEW_MODE_LIST)
+    {
+      GtkTreeSelection *selection;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      gtk_tree_selection_select_iter (selection, iter);
+    }
+  else if (target == VIEW_MODE_ICON)
+    {
+      GtkTreePath *path;
+      path = gtk_tree_model_get_path (priv->current_model, iter);
+      gtk_icon_view_select_path (GTK_ICON_VIEW (priv->browse_files_icon_view), path);
+      gtk_tree_path_free (path);
+    }
+  else
+    g_assert_not_reached ();
+}
+
+static void
+current_selection_select_iter (GtkFileChooserWidget *impl,
+                               GtkTreeIter           *iter)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  selection_select_iter (impl, iter, priv->view_mode);
+}
+
+struct copy_old_selection_to_current_view_closure {
+  GtkFileChooserWidget *impl;
+};
+
+static void
+copy_old_selection_to_current_view_foreach_cp (GtkTreeModel *model,
+                                               GtkTreePath  *path,
+                                               GtkTreeIter  *iter,
+                                               gpointer      data)
+{
+  struct copy_old_selection_to_current_view_closure *closure;
+  closure = data;
+  selection_select_iter (closure->impl, iter, closure->impl->priv->view_mode);
+}
+
+static void
+copy_old_selection_to_current_view (GtkFileChooserWidget *impl,
+                                    ViewMode               old_view_mode)
+{
+  struct copy_old_selection_to_current_view_closure closure;
+  closure.impl = impl;
+
+  selection_selected_foreach(impl,
+                             old_view_mode,
+                             copy_old_selection_to_current_view_foreach_cp,
+                             &closure);
+}
+
+static void
+current_selection_unselect_iter (GtkFileChooserWidget *impl,
+                                 GtkTreeIter           *iter)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      GtkTreeSelection *selection;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      gtk_tree_selection_unselect_iter (selection, iter);
+    }
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    {
+      GtkTreePath *path;
+      path = gtk_tree_model_get_path (priv->current_model, iter);
+      gtk_icon_view_unselect_path (GTK_ICON_VIEW (priv->browse_files_icon_view), path);
+      gtk_tree_path_free (path);
+    }
+  else
+    g_assert_not_reached ();
+}
+
+static void
+current_selection_unselect_all (GtkFileChooserWidget *impl)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      GtkTreeSelection *selection;
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      gtk_tree_selection_unselect_all (selection);
+    }
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    gtk_icon_view_unselect_all (GTK_ICON_VIEW (priv->browse_files_icon_view));
+  else
+    g_assert_not_reached ();
+}
+
+static void
+current_view_set_file_model (GtkFileChooserWidget *impl, GtkTreeModel *model)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkWidget *view;
+
+  priv->current_model = model;
+
+  if (priv->view_mode == VIEW_MODE_LIST)
+    view = priv->browse_files_tree_view;
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    view = priv->browse_files_icon_view;
+  else
+    g_assert_not_reached ();
+
+  g_object_set (view, "model", priv->current_model, NULL);
+}
+
+static void
+current_view_set_cursor (GtkFileChooserWidget *impl, GtkTreePath *path)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  if (priv->view_mode == VIEW_MODE_LIST)
+    gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->browse_files_tree_view), path, NULL, FALSE);
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    gtk_icon_view_set_cursor (GTK_ICON_VIEW (priv->browse_files_icon_view), path, NULL, FALSE);
+  else
+    g_assert_not_reached ();
+}
+
+static void
+current_view_set_select_multiple (GtkFileChooserWidget *impl, gboolean select_multiple)
+{
+  GtkFileChooserWidgetPrivate *priv = impl->priv;
+  GtkTreeSelection *selection;
+  GtkSelectionMode mode;
+
+  mode = select_multiple ? GTK_SELECTION_MULTIPLE : GTK_SELECTION_BROWSE;
+
+  if (priv->view_mode == VIEW_MODE_LIST)
+    {
+      selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
+      gtk_tree_selection_set_mode (selection, mode);
+      gtk_tree_view_set_rubber_banding (GTK_TREE_VIEW (priv->browse_files_tree_view), select_multiple);
+    }
+  else if (priv->view_mode == VIEW_MODE_ICON)
+    gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (priv->browse_files_icon_view), mode);
+  else
+    g_assert_not_reached ();
+}
+
 static void
 gtk_file_chooser_widget_add_choice (GtkFileChooser  *chooser,
                                     const char      *id,
@@ -9080,4 +9742,3 @@ gtk_file_chooser_widget_get_choice (GtkF
 
   return NULL;
 }
-
--- a/gtk/org.gtk.Settings.FileChooser.gschema.xml
+++ b/gtk/org.gtk.Settings.FileChooser.gschema.xml
@@ -55,6 +55,11 @@
     <value nick='category' value='2'/>
   </enum>
 
+  <enum id='org.gtk.Settings.FileChooser.ViewMode'>
+    <value nick='list-view' value='0'/>
+    <value nick='icon-view' value='1'/>
+  </enum>
+
   <schema id='org.gtk.Settings.FileChooser' path='/org/gtk/settings/file-chooser/'>
     <key name='last-folder-uri' type='s'>
       <default>""</default>
@@ -63,16 +68,30 @@
       <default>'path-bar'</default>
       <summary>Location mode</summary>
       <description>
-	Controls whether the file chooser shows just a path bar, or a visible entry
+        Controls whether the file chooser shows just a path bar, or a visible entry
         for the filename as well, for the benefit of typing-oriented users. The
         possible values for these modes are "path-bar" and "filename-entry".
       </description>
     </key>
+    <key name='view-mode' enum='org.gtk.Settings.FileChooser.ViewMode'>
+      <default>'list-view'</default>
+      <summary>Change view mode</summary>
+      <description>
+        Controls the view mode used.
+      </description>
+    </key>
+    <key name='icon-view-scale' type='i'>
+      <default>48</default>
+      <summary>Change icon size</summary>
+      <description>
+        Controls the size of the icons in icon view mode.
+      </description>
+    </key>
     <key name='show-hidden' type='b'>
       <default>false</default>
       <summary>Show hidden files</summary>
       <description>
-	Controls whether the file chooser shows hidden files or not.
+        Controls whether the file chooser shows hidden files or not.
       </description>
     </key>
     <key type="b" name="sort-directories-first">
@@ -91,37 +110,37 @@
       <default>true</default>
       <summary>Show file sizes</summary>
       <description>
-	Controls whether the file chooser shows a column with file sizes.
+        Controls whether the file chooser shows a column with file sizes.
       </description>
     </key>
     <key name='show-type-column' type='b'>
       <default>true</default>
       <summary>Show file types</summary>
       <description>
-	Controls whether the file chooser shows a column with file types.
+        Controls whether the file chooser shows a column with file types.
       </description>
     </key>
     <key name='sort-column' enum='org.gtk.Settings.FileChooser.SortColumn'>
       <default>'name'</default>
       <summary>Sort column</summary>
       <description>
-	Can be one of "name", "modified", or "size".  It controls
-	which of the columns in the file chooser is used for sorting
-	the list of files.
+        Can be one of "name", "modified", or "size".  It controls
+        which of the columns in the file chooser is used for sorting
+        the list of files.
       </description>
     </key>
     <key name='sort-order' enum='org.gtk.Settings.FileChooser.SortOrder'>
       <default>'ascending'</default>
       <summary>Sort order</summary>
       <description>
-	Can be one of the strings "ascending" or "descending".
+        Can be one of the strings "ascending" or "descending".
       </description>
     </key>
     <key name='window-position' type='(ii)'>
       <default>(-1, -1)</default>
       <summary>Window position</summary>
       <description>
-	The (x, y) coordinates of the upper-left corner of the GtkFileChooserDialog's
+        The (x, y) coordinates of the upper-left corner of the GtkFileChooserDialog's
         window.
       </description>
     </key>
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -9,6 +9,56 @@
         <property name="visible">1</property>
         <property name="orientation">vertical</property>
         <child>
+	  <object class="GtkBox" id="combo_box_and_scale">
+            <property name="visible">1</property>
+	    <child>
+              <object class="GtkComboBoxText" id="view_mode_combo_box">
+                <items>
+                  <item translatable="yes" id="browse_files_tree_view">List View</item>
+                  <item translatable="yes" id="browse_files_icon_view">Icon View</item>
+                </items>
+		<property name="active">0</property>
+                <property name="visible">1</property>
+                <property name="tooltip-text" translatable="yes">Select filechooser view</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+		<!-- <property name="has-entry">True</property> -->
+                <signal name="changed" handler="view_mode_combo_box_changed_cb" swapped="no"/>
+              </object>
+              <packing>
+                <property name="position">0</property>
+                <property name="pack-type">start</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAdjustment" id="icon_view_icon_size">
+                <property name="upper">256</property>
+                <property name="lower">32</property>
+                <property name="value">32</property>
+                <property name="step_increment">16</property>
+              </object>
+            </child>
+	    <child>
+              <object class="GtkScale" id="icon_view_scale">
+                <property name="visible">0</property>
+                <property name="orientation">horizontal</property>
+                <property name="adjustment">icon_view_icon_size</property>
+                <property name="can_focus">1</property>
+                <property name="halign">end</property>
+                <property name="valign">fill</property>
+                <property name="margin_right">10</property>
+                <property name="width-request">100</property>
+                <property name="draw_value">False</property>
+                <signal name="value-changed" handler="icon_view_scale_value_changed_cb" swapped="no"/>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="pack-type">end</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+        <child>
           <object class="GtkPaned" id="browse_widgets_hpaned">
             <property name="visible">1</property>
             <child>
@@ -187,110 +237,172 @@
                             <property name="visible">1</property>
                             <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkScrolledWindow" id="browse_files_swin">
+                              <object class="GtkNotebook" id="view_notebook">
                                 <property name="visible">1</property>
-                                <property name="hscrollbar-policy">never</property>
+                                <property name="show-tabs">False</property>
+                                <signal name="switch-page" handler="view_notebook_switch_page_cb" swapped="no"/>
                                 <child>
-                                  <object class="GtkTreeView" id="browse_files_tree_view">
+                                  <object class="GtkScrolledWindow" id="browse_files_list_swin">
                                     <property name="visible">1</property>
-                                    <property name="has-tooltip">1</property>
-                                    <property name="enable-search">0</property>
-                                    <child internal-child="accessible">
-                                      <object class="AtkObject" id="browse_files_tree_view-atkobject">
-                                        <property name="AtkObject::accessible-name" translatable="yes">Files</property>
-                                      </object>
-                                    </child>
-                                    <signal name="button-press-event" handler="list_button_press_event_cb" swapped="no"/>
-                                    <signal name="drag-data-received" handler="file_list_drag_data_received_cb" swapped="no"/>
-                                    <signal name="drag-drop" handler="file_list_drag_drop_cb" swapped="no"/>
-                                    <signal name="drag-begin" handler="file_list_drag_begin_cb" swapped="no"/>
-                                    <signal name="drag-motion" handler="file_list_drag_motion_cb" swapped="no"/>
-                                    <signal name="drag-end" handler="file_list_drag_end_cb" swapped="no"/>
-                                    <signal name="key-press-event" handler="browse_files_key_press_event_cb" swapped="no"/>
-                                    <signal name="popup-menu" handler="list_popup_menu_cb" swapped="no"/>
-                                    <signal name="query-tooltip" handler="file_list_query_tooltip_cb" swapped="no"/>
-                                    <signal name="row-activated" handler="list_row_activated" swapped="no"/>
-                                    <signal name="cursor-changed" handler="list_cursor_changed" swapped="no"/>
-                                    <child internal-child="selection">
-                                      <object class="GtkTreeSelection" id="treeview-selection2">
-                                        <signal name="changed" handler="list_selection_changed" swapped="no"/>
-                                      </object>
-                                    </child>
+                                    <property name="hscrollbar_policy">never</property>
                                     <child>
-                                      <object class="GtkTreeViewColumn" id="list_name_column">
-                                        <property name="title" translatable="yes">Name</property>
-                                        <property name="resizable">1</property>
-                                        <property name="expand">1</property>
+                                      <object class="GtkTreeView" id="browse_files_tree_view">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="has_tooltip">True</property>
+                                        <property name="enable_search">False</property>
+                                        <signal name="button-press-event" handler="list_button_press_event_cb" swapped="no"/>
+                                        <signal name="cursor-changed" handler="list_cursor_changed" swapped="no"/>
+                                        <signal name="drag-data-received" handler="file_list_drag_data_received_cb" swapped="no"/>
+                                        <signal name="drag-drop" handler="file_list_drag_drop_cb" swapped="no"/>
+                                        <signal name="drag-motion" handler="file_list_drag_motion_cb" swapped="no"/>
+                                        <signal name="key-press-event" handler="browse_files_key_press_event_cb" swapped="no"/>
+                                        <signal name="popup-menu" handler="list_popup_menu_cb" swapped="no"/>
+                                        <signal name="query-tooltip" handler="file_list_query_tooltip_cb" swapped="no"/>
+                                        <signal name="row-activated" handler="list_row_activated" swapped="no"/>
+                                        <child internal-child="selection">
+                                          <object class="GtkTreeSelection" id="treeview-selection2">
+                                            <signal name="changed" handler="list_selection_changed" swapped="no"/>
+                                          </object>
+                                        </child>
                                         <child>
-                                          <object class="GtkCellRendererPixbuf" id="list_pixbuf_renderer">
-                                            <property name="xpad">6</property>
+                                          <object class="GtkTreeViewColumn" id="list_name_column">
+                                            <property name="resizable">True</property>
+                                            <property name="title" translatable="yes">Name</property>
+                                            <property name="expand">True</property>
+                                            <child>
+                                              <object class="GtkCellRendererPixbuf" id="list_pixbuf_renderer">
+                                                <property name="xpad">6</property>
+                                             </object>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_name_renderer">
+                                                <property name="width-chars">10</property>
+                                                <property name="ellipsize">end</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_name_renderer">
-                                            <property name="width-chars">10</property>
-                                            <property name="ellipsize">end</property>
+                                          <object class="GtkTreeViewColumn" id="list_location_column">
+                                            <property name="title" translatable="yes">Location</property>
+                                            <property name="resizable">1</property>
+                                            <property name="visible">0</property>
+                                            <property name="expand">1</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_location_renderer">
+                                                <property name="xalign">0</property>
+                                                <property name="width-chars">10</property>
+                                                <property name="ellipsize">start</property>
+                                                <property name="xpad">6</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkTreeViewColumn" id="list_location_column">
-                                        <property name="title" translatable="yes">Location</property>
-                                        <property name="resizable">1</property>
-                                        <property name="visible">0</property>
-                                        <property name="expand">1</property>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_location_renderer">
-                                            <property name="xalign">0</property>
-                                            <property name="width-chars">10</property>
-                                            <property name="ellipsize">start</property>
-                                            <property name="xpad">6</property>
+                                          <object class="GtkTreeViewColumn" id="list_size_column">
+                                            <property name="title" translatable="yes">Size</property>
+                                            <property name="sizing">fixed</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_size_renderer">
+                                                <property name="xalign">0</property>
+                                                <property name="xpad">6</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkTreeViewColumn" id="list_size_column">
-                                        <property name="title" translatable="yes">Size</property>
-                                        <property name="sizing">fixed</property>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_size_renderer">
-                                            <property name="xalign">0</property>
-                                            <property name="xpad">6</property>
+                                          <object class="GtkTreeViewColumn" id="list_type_column">
+                                            <property name="title" translatable="yes">Type</property>
+                                            <property name="resizable">1</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_type_renderer">
+                                                <property name="xalign">0</property>
+                                                <property name="xpad">6</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
-                                      </object>
-                                    </child>
-                                    <child>
-                                      <object class="GtkTreeViewColumn" id="list_type_column">
-                                        <property name="title" translatable="yes">Type</property>
-                                        <property name="resizable">1</property>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_type_renderer">
-                                            <property name="xalign">0</property>
-                                            <property name="xpad">6</property>
+                                          <object class="GtkTreeViewColumn" id="list_time_column">
+                                            <property name="title" translatable="yes">Modified</property>
+                                            <property name="sizing">fixed</property>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_date_renderer">
+                                                <property name="xpad">6</property>
+                                              </object>
+                                            </child>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="list_time_renderer">
+                                                <property name="xpad">6</property>
+                                              </object>
+                                            </child>
                                           </object>
                                         </child>
                                       </object>
                                     </child>
+                                  </object>
+                                </child>
+                                <child type="tab">
+                                  <object class="GtkLabel" id="label_list_view">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">List View</property>
+                                  </object>
+                                  <packing>
+                                    <property name="tab_fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScrolledWindow" id="browse_files_icon_swin">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="shadow_type">in</property>
+                                    <property name="hscrollbar-policy">GTK_POLICY_AUTOMATIC</property>
                                     <child>
-                                      <object class="GtkTreeViewColumn" id="list_time_column">
-                                        <property name="title" translatable="yes">Modified</property>
-                                        <property name="sizing">fixed</property>
+                                      <object class="GtkIconView" id="browse_files_icon_view">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="has_tooltip">True</property>
+                                        <property name="column-spacing">2</property>
+                                        <signal name="button-press-event" handler="list_button_press_event_cb" swapped="no"/>
+                                        <signal name="drag-data-received" handler="file_list_drag_data_received_cb" swapped="no"/>
+                                        <signal name="drag-drop" handler="file_list_drag_drop_cb" swapped="no"/>
+                                        <signal name="item-activated" handler="icon_item_activated" swapped="no"/>
+                                        <signal name="key-press-event" handler="browse_files_key_press_event_cb" swapped="no"/>
+                                        <signal name="popup-menu" handler="list_popup_menu_cb" swapped="no"/>
+                                        <signal name="query-tooltip" handler="file_list_query_tooltip_cb" swapped="no"/>
+                                        <signal name="selection-changed" handler="list_selection_changed" swapped="no"/>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_date_renderer">
-                                            <property name="xpad">6</property>
+                                          <object class="GtkCellRendererText" id="list_icon_renderer">
                                           </object>
                                         </child>
                                         <child>
-                                          <object class="GtkCellRendererText" id="list_time_renderer">
-                                            <property name="xpad">6</property>
-                                          </object>
+                                          <object class="GtkCellRendererPixbuf" id="icon_view_pixbuf_renderer"/>
                                         </child>
                                       </object>
                                     </child>
                                   </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child type="tab">
+                                  <object class="GtkLabel" id="label_icon_view">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Icon View</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                    <property name="tab_fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child type="tab">
+                                  <placeholder/>
                                 </child>
                               </object>
                               <packing>
@@ -409,7 +521,7 @@
           </object>
           <packing>
             <property name="expand">1</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
bgstack15