From ea28a76cfbace0ccc8d25e523b410f2dea339423 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 18 May 2013 16:17:08 +0300 Subject: add new chat commands. /enablehighlight - enable sound hightlight in chat tab /disablehighlight - disable sound hightlight in chat tab --- src/gui/popupmenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/popupmenu.cpp') diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 4aaa0cf01..53a8a11f7 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -23,6 +23,7 @@ #include "gui/popupmenu.h" #include "actorspritemanager.h" +#include "commandhandler.h" #include "dropshortcut.h" #include "game.h" #include "guild.h" @@ -1198,7 +1199,8 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "chat close" && mTab) { - mTab->handleCommand("close", ""); + if (commandHandler) + commandHandler->invokeCommand("close", "", mTab); } else if (link == "leave party" && mTab) { @@ -1316,15 +1318,13 @@ void PopupMenu::handleLink(const std::string &link, } else if (link == "enable highlight" && mTab) { - mTab->setAllowHighlight(true); - if (chatWindow) - chatWindow->saveState(); + if (commandHandler) + commandHandler->invokeCommand("enablehighlight", "", mTab); } else if (link == "disable highlight" && mTab) { - mTab->setAllowHighlight(false); - if (chatWindow) - chatWindow->saveState(); + if (commandHandler) + commandHandler->invokeCommand("disablehighlight", "", mTab); } else if (link == "dont remove name" && mTab) { -- cgit v1.2.3-60-g2f50