file-browser: Recognize PNGs by extension

This commit is contained in:
K. Lange 2020-04-21 18:13:40 +09:00
parent 8e74bee6d0
commit 4725c3f585
1 changed files with 4 additions and 0 deletions

View File

@ -614,6 +614,10 @@ static void load_directory(const char * path, int modifies_history) {
sprintf(f->icon, "image");
sprintf(f->launcher, "exec imgviewer");
sprintf(f->filetype, "JPEG Image");
} else if (has_extension(f, ".png")) {
sprintf(f->icon, "image");
sprintf(f->launcher, "exec imgviewer");
sprintf(f->filetype, "Portable Network Graphics Image");
} else if (has_extension(f, ".sdf")) {
sprintf(f->icon, "font");
sprintf(f->filetype, "SDF Font");