diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 12 | ||||
-rw-r--r-- | src/commands.h | 2 | ||||
-rw-r--r-- | src/gui/chatwindow.cpp | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index c86497f15..0850ba909 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -59,10 +59,11 @@ #ifdef DEBUG_DUMP_LEAKS1 #include "resources/image.h" #include "resources/resource.h" -#include "resources/resourcemanager.h" #include "resources/subimage.h" #endif +#include "resources/resourcemanager.h" + #include "utils/gettext.h" #include "utils/process.h" @@ -344,6 +345,15 @@ impHandler0(clear) chatWindow->clearTab(); } +impHandler0(cleanGraphics) +{ + ResourceManager *const resman = ResourceManager::getInstance(); + while(resman->cleanOrphans(true)); + + if (debugChatTab) + debugChatTab->chatLog("cache cleaned"); +} + impHandler(join) { if (!tab) diff --git a/src/commands.h b/src/commands.h index 0b413561f..fbd2929ec 100644 --- a/src/commands.h +++ b/src/commands.h @@ -55,6 +55,7 @@ namespace Commands decHandler(join); decHandler(listChannels); decHandler(clear); + decHandler(cleanGraphics); decHandler(createParty); decHandler(createGuild); decHandler(party); @@ -140,6 +141,7 @@ static const CommandInfo commands[] = {"join", &Commands::join}, {"list", &Commands::listChannels}, {"clear", &Commands::clear}, + {"cleangraphics", &Commands::cleanGraphics}, {"createparty", &Commands::createParty}, {"createguild", &Commands::createGuild}, {"party", &Commands::party}, diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 12b4ee17b..c900da9e8 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -289,6 +289,7 @@ void ChatWindow::fillCommands() mCommands.push_back("/away "); mCommands.push_back("/closeall"); mCommands.push_back("/clear"); + mCommands.push_back("/cleangraphics"); mCommands.push_back("/create "); mCommands.push_back("/close"); mCommands.push_back("/cacheinfo"); |