add menu item to clear image cache

This commit is contained in:
ouwou
2021-01-20 02:26:04 -05:00
parent dda203376d
commit bafd2fa25a
6 changed files with 18 additions and 0 deletions

View File

@@ -9,6 +9,10 @@ Cache &ImageManager::GetCache() {
return m_cache;
}
void ImageManager::ClearCache() {
m_cache.ClearCache();
}
Glib::RefPtr<Gdk::Pixbuf> ImageManager::ReadFileToPixbuf(std::string path) {
const auto &data = ReadWholeFile(path);
if (data.size() == 0) return Glib::RefPtr<Gdk::Pixbuf>(nullptr);