summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-18 17:15:52 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-18 17:15:52 +0300
commitc7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed (patch)
tree14df91219b35d83feab98360d978de73f3a946af /src/gui/popupmenu.cpp
parentdd828df46a661fbd0a24fbe540a4a585360be005 (diff)
downloadmv-c7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed.tar.gz
mv-c7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed.tar.bz2
mv-c7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed.tar.xz
mv-c7a122c9d12d4ba6c08aed06291ebebf6bcdd1ed.zip
move some other code from popupmenu to commands.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index f9e2d232d..371798eb7 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1328,27 +1328,23 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "dont remove name" && mTab)
{
- mTab->setRemoveNames(false);
- if (chatWindow)
- chatWindow->saveState();
+ if (commandHandler)
+ commandHandler->invokeCommand(COMMAND_DONTREMOVENAME, mTab);
}
else if (link == "remove name" && mTab)
{
- mTab->setRemoveNames(true);
- if (chatWindow)
- chatWindow->saveState();
+ if (commandHandler)
+ commandHandler->invokeCommand(COMMAND_REMOVENAME, mTab);
}
else if (link == "disable away" && mTab)
{
- mTab->setNoAway(true);
- if (chatWindow)
- chatWindow->saveState();
+ if (commandHandler)
+ commandHandler->invokeCommand(COMMAND_DISABLEAWAY, mTab);
}
else if (link == "enable away" && mTab)
{
- mTab->setNoAway(false);
- if (chatWindow)
- chatWindow->saveState();
+ if (commandHandler)
+ commandHandler->invokeCommand(COMMAND_ENABLEAWAY, mTab);
}
else if (link == "chat clipboard" && mTab)
{