diff options
author | Dave Davenport <qball@gmpclient.org> | 2020-10-18 21:37:05 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2020-10-18 21:37:05 +0200 |
commit | 5994df7f048492b234c2827cf9a7e313b356c6b8 (patch) | |
tree | cf3c4d12c01685570b9b8393d51f331698885a01 /source/dialogs/filebrowser.c | |
parent | d8a420c95275117b0efd32b6e3b61847f58ad37c (diff) |
[IconLoader] add optional gif loader.
Diffstat (limited to 'source/dialogs/filebrowser.c')
-rw-r--r-- | source/dialogs/filebrowser.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/dialogs/filebrowser.c b/source/dialogs/filebrowser.c index 201d1ac7..426e3127 100644 --- a/source/dialogs/filebrowser.c +++ b/source/dialogs/filebrowser.c @@ -35,6 +35,9 @@ #include <sys/stat.h> #include <dirent.h> + +#include <config.h> + #include "mode.h" #include "helper.h" #include "mode-private.h" @@ -341,7 +344,11 @@ static int file_browser_token_match ( const Mode *sw, rofi_int_matcher **tokens, } -const char * const image_exts[] = {".png",".PNG",".jpg",".JPG",".jpeg",".JPEG",".svg",".SVG"}; +const char * const image_exts[] = {".png",".PNG",".jpg",".JPG",".jpeg",".JPEG",".svg",".SVG" +#ifdef HAVE_LIBGIF + ,".gif",".GIF" +#endif +}; static gboolean file_browser_is_image ( const char * const path ) { if ( path == NULL ) { @@ -351,7 +358,7 @@ static gboolean file_browser_is_image ( const char * const path ) if ( suf == NULL ) { return FALSE; } - for ( uint32_t i = 0; i < (sizeof (image_exts)/sizeof(char*)); i++ ) { + for ( uint32_t i = 0; i < G_N_ELEMENTS(image_exts); i++ ) { if ( g_strcmp0(suf,image_exts[i]) == 0 ) { return TRUE; } |