Commit graph

11 commits

Author SHA1 Message Date
Linus Groh
d66087ac2f LibGUI/FileIconProvider: Initialize s_filetype_image_icon
This was accidentally removed in 1c90321.
Fixes #4125.
2020-11-28 17:16:33 +01:00
Linus Groh
6b9ff8d6e2 LibGUI/FileIconProvider: Add config file and use patterns
This moves file extension to icon mappings from compile time macros to an
INI config file (/etc/FileIconProvider.ini), so file icons can easily be
customized and extended :^)

I also switched the format from a static file extension (".foo") to
glob-like patterns ("*.foo", using StringUtils::matches()), which allows
us to assign icons to specific exactly matching file names, like many
IDEs do - e.g. "CMakeLists.txt" or ".prettierrc".
2020-11-15 16:49:40 +01:00
Linus Groh
826096bac3 LibGUI: Make FileIconProvider aware of all supported image formats
By using Gfx::Bitmap::is_path_a_supported_image_format() we can
automatically provide the image icon for all supported image formats,
without keeping a second list of image file extensions.
2020-11-14 10:11:26 +01:00
Linus Groh
f0c2ee3c56 LibGUI: Add more extensions to FileIconProvider
This adds the following:

- cplusplus: .cxx, .cc, .c++
- header: .hpp, .hxx, .hh, .h++
- javascript: .mjs
2020-11-14 10:11:26 +01:00
Andreas Kling
e4c23b0151 iLibGUI+Base: Show inaccessible directories with special icon in views 2020-09-18 21:29:01 +02:00
Andreas Kling
d89cad7c57 LibGUI: Use FileIconProvider in the FilePicker dialog 2020-09-16 21:08:55 +02:00
Andreas Kling
31b65145b6 LibGUI+Base: Add a hard-disk icon and use it for the path "/" 2020-09-16 21:08:55 +02:00
thankyouverycool
2f9a071072 Base+LibGUI: Refresh filetype icons for consistency
Improves ini icon depth and adds complementary 16x16/32x32 icons
for music and sound filetypes.
2020-08-29 16:19:02 +02:00
AnotherTest
7465c51ef2 Base+LibGUI+Spreadsheet: Add icons for Spreadsheet
Also adds a Spreadsheet.af.
2020-08-27 10:27:20 +02:00
thankyouverycool
45901d4141 LibGUI+HackStudio: Associate new icons with their extensions 2020-08-26 16:59:34 +02:00
Andreas Kling
3dd15da7b1 LibGUI: Move file icon lookup into a separate FileIconProvider
Let's get it out of FileSystemModel so you can look up a nice icon for
a path without needing a model.
2020-08-12 20:41:13 +02:00