diff --git a/src/icewmbg.cc b/src/icewmbg.cc index c8a82da66..beb73f58c 100644 --- a/src/icewmbg.cc +++ b/src/icewmbg.cc @@ -23,11 +23,12 @@ typedef ref Image; class Cache { public: - Cache() { } + Cache(bool verb) : verbose(verb) { } ~Cache() { clear(); } void clear() { iname = null; image = null; } - Image get(const mstring& name) { + Image get(mstring name) { if (iname != name) { + if (verbose) tlog("load %s", name.c_str()); iname = name; image = YImage::load(iname); if (image == null && testOnce(iname, __LINE__)) { @@ -39,6 +40,7 @@ class Cache { private: mstring iname; Image image; + bool verbose; }; class Background: public YXApplication, private YTimerListener { @@ -163,6 +165,7 @@ Background::Background(int *argc, char ***argv, bool verb): randInited(false), themeInited(false), imageInited(false), + cache(verb), mypid(getpid()), activeWorkspace(0), cycleOffset(0),