diff options
Diffstat (limited to 'src/gui/shopwindow.cpp')
-rw-r--r-- | src/gui/shopwindow.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp index 9aaf88bf3..2215ce699 100644 --- a/src/gui/shopwindow.cpp +++ b/src/gui/shopwindow.cpp @@ -72,7 +72,7 @@ extern std::string tradePartnerName; ShopWindow::DialogList ShopWindow::instances; ShopWindow::ShopWindow(): - Window(_("Personal Shop")), + Window(_("Personal Shop"), false, 0, "shop.xml"), mSelectedItem(-1), mAnnonceTime(0), mLastRequestTimeList(0), @@ -127,28 +127,28 @@ ShopWindow::ShopWindow(): mAnnounceLinks = new CheckBox(_("Show links in announce"), false, this, "link announce"); - ContainerPlacer place; - place = getPlacer(0, 0); - - place(0, 0, mBuyLabel, 8).setPadding(3); - place(8, 0, mSellLabel, 8).setPadding(3); - place(0, 1, mBuyScrollArea, 8, 5).setPadding(3); - place(8, 1, mSellScrollArea, 8, 5).setPadding(3); - place(0, 6, mBuyAddButton); - place(1, 6, mBuyDeleteButton); - place(3, 6, mBuyAnnounceButton); - place(8, 6, mSellAddButton); - place(9, 6, mSellDeleteButton); - place(11, 6, mSellAnnounceButton); - place(0, 7, mAnnounceLinks, 8); - place(15, 7, mCloseButton); + ContainerPlacer placer; + placer = getPlacer(0, 0); + + placer(0, 0, mBuyLabel, 8).setPadding(3); + placer(8, 0, mSellLabel, 8).setPadding(3); + placer(0, 1, mBuyScrollArea, 8, 5).setPadding(3); + placer(8, 1, mSellScrollArea, 8, 5).setPadding(3); + placer(0, 6, mBuyAddButton); + placer(1, 6, mBuyDeleteButton); + placer(3, 6, mBuyAnnounceButton); + placer(8, 6, mSellAddButton); + placer(9, 6, mSellDeleteButton); + placer(11, 6, mSellAnnounceButton); + placer(0, 7, mAnnounceLinks, 8); + placer(15, 7, mCloseButton); if (auctionManager && auctionManager->getEnableAuctionBot()) { mBuyAuctionButton = new Button(_("Auction"), "auction buy", this); mSellAuctionButton = new Button(_("Auction"), "auction sell", this); - place(4, 6, mBuyAuctionButton); - place(12, 6, mSellAuctionButton); + placer(4, 6, mBuyAuctionButton); + placer(12, 6, mSellAuctionButton); } else { @@ -395,7 +395,7 @@ void ShopWindow::saveList() } std::vector<ShopItem*> items = mBuyShopItems->items(); - std::vector<ShopItem*>::iterator it; + std::vector<ShopItem*>::const_iterator it; for (it = items.begin(); it != items.end(); ++it) { ShopItem *item = *(it); @@ -428,7 +428,7 @@ void ShopWindow::saveList() } } - std::map<int, ShopItem*>::iterator mapIt; + std::map<int, ShopItem*>::const_iterator mapIt; for (mapIt = mapItems.begin(); mapIt != mapItems.end(); ++mapIt) { ShopItem *buyItem = (*mapIt).second; @@ -468,7 +468,7 @@ void ShopWindow::announce(ShopItems *list, int mode) mSellAnnounceButton->setEnabled(false); std::vector<ShopItem*> items = list->items(); - std::vector<ShopItem*>::iterator it; + std::vector<ShopItem*>::const_iterator it; for (it = items.begin(); it != items.end(); ++it) { @@ -534,7 +534,7 @@ void ShopWindow::giveList(const std::string &nick, int mode) return; std::vector<ShopItem*> items = list->items(); - std::vector<ShopItem*>::iterator it; + std::vector<ShopItem*>::const_iterator it; for (it = items.begin(); it != items.end(); ++it) { @@ -596,7 +596,7 @@ void ShopWindow::sendMessage(const std::string &nick, if (config.getBoolValue("hideShopMessages")) Net::getChatHandler()->privateMessage(nick, data); else if (chatWindow) - chatWindow->whisper(nick, data, BY_PLAYER); + chatWindow->addWhisper(nick, data, BY_PLAYER); //here was true } @@ -780,7 +780,7 @@ bool ShopWindow::findShopItem(ShopItem *shopItem, int mode) return false; std::vector<ShopItem*> items; - std::vector<ShopItem*>::iterator it; + std::vector<ShopItem*>::const_iterator it; if (mode == SELL) { if (!mSellShopItems) |