diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-27 17:17:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-27 17:28:44 +0300 |
commit | 06300c8a3064a4f58ff7df3bdc8b91c68c25ee77 (patch) | |
tree | df1dea567a635f4a7722408ec10badcbe5528bcc /src/gui | |
parent | 6f475537cb5e12f7088a401c4fb5b583bbabc580 (diff) | |
download | mv-06300c8a3064a4f58ff7df3bdc8b91c68c25ee77.tar.gz mv-06300c8a3064a4f58ff7df3bdc8b91c68c25ee77.tar.bz2 mv-06300c8a3064a4f58ff7df3bdc8b91c68c25ee77.tar.xz mv-06300c8a3064a4f58ff7df3bdc8b91c68c25ee77.zip |
Remove unused commands.cpp and commandhandler.cpp.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chattab.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/tabs/whispertab.cpp | 2 | ||||
-rw-r--r-- | src/gui/windowmanager.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 2 |
5 files changed, 4 insertions, 17 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 41135f962..b3569488e 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -23,8 +23,6 @@ #include "gui/popups/popupmenu.h" #include "actormanager.h" -#include "commands.h" -#include "commandhandler.h" #include "configuration.h" #include "dropshortcut.h" #include "game.h" @@ -1333,8 +1331,8 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "chat close" && mTab) { - if (commandHandler) - commandHandler->invokeCommand("close", "", mTab); + inputManager.executeChatCommand(InputAction::CLOSE_CHAT_TAB, + std::string(), mTab); } else if (link == "leave party" && mTab) { diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp index 44ab6d89c..4b37e2ada 100644 --- a/src/gui/widgets/tabs/chattab.cpp +++ b/src/gui/widgets/tabs/chattab.cpp @@ -23,8 +23,6 @@ #include "gui/widgets/tabs/chattab.h" #include "chatlogger.h" -#include "commands.h" -#include "commandhandler.h" #include "configuration.h" #include "settings.h" #include "soundconsts.h" @@ -438,15 +436,13 @@ void ChatTab::handleInput(const std::string &msg) mChannelName); } -void ChatTab::handleCommand(const std::string &msg) +void ChatTab::handleCommand(const std::string &msg A_UNUSED) { - if (commandHandler) - commandHandler->handleCommands(msg, this); } void ChatTab::handleHelp(const std::string &msg) { - if (commandHandler) + if (helpWindow) helpWindow->search(msg); } diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp index ad5ea6564..a67b9450c 100644 --- a/src/gui/widgets/tabs/whispertab.cpp +++ b/src/gui/widgets/tabs/whispertab.cpp @@ -23,8 +23,6 @@ #include "gui/widgets/tabs/whispertab.h" #include "chatlogger.h" -#include "commandhandler.h" -#include "commands.h" #include "being/localplayer.h" diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index de8f57a62..06bfc8673 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -23,7 +23,6 @@ #include "gui/windowmanager.h" #include "client.h" -#include "commandhandler.h" #include "configuration.h" #include "game.h" #include "settings.h" @@ -98,7 +97,6 @@ void WindowManager::createWindows() helpWindow = new HelpWindow; didYouKnowWindow = new DidYouKnowWindow; didYouKnowWindow->postInit(); - commandHandler = new CommandHandler; popupMenu = new PopupMenu; popupMenu->postInit(); beingPopup = new BeingPopup; @@ -118,7 +116,6 @@ void WindowManager::deleteWindows() delete2(itemPopup); delete2(spellPopup); delete2(popupMenu); - delete2(commandHandler); delete2(didYouKnowWindow); delete2(helpWindow); delete2(setupWindow); diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 87e6c5b3c..d18f28a9e 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -23,7 +23,6 @@ #include "gui/windows/chatwindow.h" #include "actormanager.h" -#include "commandhandler.h" #include "configuration.h" #include "game.h" #include "guild.h" @@ -239,7 +238,6 @@ void ChatWindow::loadCommandsFile(const std::string &name) void ChatWindow::fillCommands() { loadCommandsFile("chatcommands.txt"); - CommandHandler::addChatCommands(mCommands); inputManager.addChatCommands(mCommands); } |