From 0e189bbe81c88283438aabb4fec3ba30920d3a36 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sun, 1 Aug 2010 18:00:41 -0400 Subject: Reduce localChatTab presence replacing it with the event system Reviewed-By: Jared Adams --- src/gui/trade.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/gui/trade.cpp') diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index 4a86c235..6d3c7b21 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -21,6 +21,7 @@ #include "gui/trade.h" +#include "eventmanager.h" #include "inventory.h" #include "item.h" #include "localplayer.h" @@ -32,7 +33,6 @@ #include "gui/setup.h" #include "gui/widgets/button.h" -#include "gui/widgets/chattab.h" #include "gui/widgets/itemcontainer.h" #include "gui/widgets/label.h" #include "gui/widgets/scrollarea.h" @@ -271,9 +271,8 @@ void TradeWindow::action(const gcn::ActionEvent &event) if (mMyInventory->contains(item)) { - localChatTab->chatLog(_("Failed adding item. You can not " - "overlap one kind of item on the window."), - BY_SERVER); + SERVER_NOTICE(_("Failed adding item. You can not " + "overlap one kind of item on the window.")) return; } @@ -314,8 +313,7 @@ void TradeWindow::action(const gcn::ActionEvent &event) int curMoney = PlayerInfo::getAttribute(MONEY); if (v > curMoney) { - localChatTab->chatLog(_("You don't have enough money."), - BY_SERVER); + SERVER_NOTICE(_("You don't have enough money.")) v = curMoney; } Net::getTradeHandler()->setMoney(v); -- cgit v1.2.3-60-g2f50