diff options
Diffstat (limited to 'src/GlobalCache.cpp')
-rw-r--r-- | src/GlobalCache.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/GlobalCache.cpp b/src/GlobalCache.cpp index e627a33..b287738 100644 --- a/src/GlobalCache.cpp +++ b/src/GlobalCache.cpp @@ -1,5 +1,6 @@ #include "../include/GlobalCache.hpp" #include "../include/GtkGif.hpp" +#include "../include/GtkScaledImage.hpp" namespace dchat { @@ -8,10 +9,17 @@ namespace dchat { if(!cache) { - cache = new Cache([](StringView fileContent) + auto createGifFunc = [](StringView fileContent) { return new GtkGif(fileContent); - }); + }; + + auto createStaticImageFunc = [](const boost::filesystem::path &filepath) + { + return new GtkScaledImage(filepath); + }; + + cache = new Cache(createGifFunc, createStaticImageFunc); } return *cache; } |