mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +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:
parent
42bc518d70
commit
6b9ff8d6e2
2 changed files with 35 additions and 35 deletions
18
Base/etc/FileIconProvider.ini
Normal file
18
Base/etc/FileIconProvider.ini
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue