1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

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".
This commit is contained in:
Linus Groh 2020-11-14 15:26:23 +00:00 committed by Andreas Kling
parent 42bc518d70
commit 6b9ff8d6e2
2 changed files with 35 additions and 35 deletions

View file

@ -0,0 +1,18 @@
[Icons]
cplusplus=*.cpp,*.cxx,*.cc,*.c++
form=*.frm
hackstudio=*.hsp
header=*.h,*.hpp,*.hxx,*.hh,*.h++
html=*.html,*.htm
ini=*.ini
java=*.java
javascript=*.js,*.mjs
library=*.so,*.a
markdown=*.md
music=*.midi
object=*.o,*.obj
pdf=*.pdf
python=*.py
sound=*.wav
spreadsheet=*.sheets
text=*.txt