summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-14 17:27:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-14 17:27:52 +0300
commit0381a0de69cc21c8886fb0a68cda450d3135d55a (patch)
tree7c9883d4043b925b9148715664b621876c680d20 /src/gui
parentecac984465f2a9f51940515abdf7552e5c6341a1 (diff)
downloadmv-0381a0de69cc21c8886fb0a68cda450d3135d55a.tar.gz
mv-0381a0de69cc21c8886fb0a68cda450d3135d55a.tar.bz2
mv-0381a0de69cc21c8886fb0a68cda450d3135d55a.tar.xz
mv-0381a0de69cc21c8886fb0a68cda450d3135d55a.zip
For trade tab use channel to send messages.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chatconsts.h2
-rw-r--r--src/gui/widgets/tabs/chat/tradetab.cpp7
-rw-r--r--src/gui/windows/shopwindow.cpp4
3 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/chatconsts.h b/src/gui/chatconsts.h
index b5e9d748c..daa7a3be8 100644
--- a/src/gui/chatconsts.h
+++ b/src/gui/chatconsts.h
@@ -26,6 +26,6 @@
#include <string>
const std::string GENERAL_CHANNEL = "";
-const std::string TRADE_CHANNEL = "";
+const std::string TRADE_CHANNEL = "#trade";
#endif // GUI_CHATCONSTS_H
diff --git a/src/gui/widgets/tabs/chat/tradetab.cpp b/src/gui/widgets/tabs/chat/tradetab.cpp
index 8512d3f6a..414c97d9d 100644
--- a/src/gui/widgets/tabs/chat/tradetab.cpp
+++ b/src/gui/widgets/tabs/chat/tradetab.cpp
@@ -24,6 +24,10 @@
#include "gui/chatconsts.h"
+#include "gui/windows/chatwindow.h"
+
+#include "net/chathandler.h"
+
#include "utils/gettext.h"
#include "debug.h"
@@ -42,6 +46,5 @@ TradeTab::~TradeTab()
void TradeTab::handleInput(const std::string &msg)
{
- std::string str("\302\202" + msg);
- ChatTab::handleInput(str);
+ chatHandler->channelMessage(mChannelName, ChatWindow::doReplace(msg));
}
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 4d8e4f000..2ba34e861 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -481,7 +481,7 @@ void ShopWindow::announce(ShopItems *const list, const int mode)
if (!list)
return;
- std::string data("\302\202");
+ std::string data;
if (mode == BUY)
data.append("Buy ");
else
@@ -534,7 +534,7 @@ void ShopWindow::announce(ShopItems *const list, const int mode)
}
}
- chatHandler->talk(data, GENERAL_CHANNEL);
+ chatHandler->channelMessage(TRADE_CHANNEL, data);
}
void ShopWindow::giveList(const std::string &nick, const int mode)