diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-29 21:00:41 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-29 21:00:41 +0200 |
commit | 3900eebf15683d160047cb7ef7755fa6c1313ef2 (patch) | |
tree | 2cbd7527ac76bb510b8d373081704c56f43c1955 /Applications | |
parent | e38b454e110d85c893e6cdc71fd71467562ec9c1 (diff) | |
download | serenity-3900eebf15683d160047cb7ef7755fa6c1313ef2.zip |
FileManager+LibGUI+html: Add an icon to represent HTML files
This also becomes the app icon for the little "html" program. :^)
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/FileManager/DirectoryView.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Applications/FileManager/DirectoryView.cpp b/Applications/FileManager/DirectoryView.cpp index 326fae02ab..1243d3bee7 100644 --- a/Applications/FileManager/DirectoryView.cpp +++ b/Applications/FileManager/DirectoryView.cpp @@ -53,6 +53,16 @@ void DirectoryView::handle_activation(const GModelIndex& index) return; } + if (path.to_lowercase().ends_with(".html")) { + if (fork() == 0) { + int rc = execl("/bin/html", "/bin/html", path.characters(), nullptr); + if (rc < 0) + perror("exec"); + ASSERT_NOT_REACHED(); + } + return; + } + if (path.to_lowercase().ends_with(".wav")) { if (fork() == 0) { int rc = execl("/bin/SoundPlayer", "/bin/SoundPlayer", path.characters(), nullptr); |