From 0561612345f979a3c59ed4feeeddf6491974905a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Feb 2015 23:08:07 +0300 Subject: Build vendingslotslistener only if eathena support enabled. --- src/gui/windows/shopwindow.cpp | 18 ++++++++++-------- src/gui/windows/shopwindow.h | 10 ++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'src/gui') diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 512cb6d54..e10197537 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -84,9 +84,9 @@ ShopWindow::DialogList ShopWindow::instances; ShopWindow::ShopWindow() : // TRANSLATORS: shop window name Window(_("Personal Shop"), false, nullptr, "shop.xml"), - VendingSlotsListener(), #ifdef EATHENA_SUPPORT VendingModeListener(), + VendingSlotsListener(), BuyingStoreModeListener(), BuyingStoreSlotsListener(), #endif @@ -200,7 +200,9 @@ ShopWindow::ShopWindow() : center(); loadWindowState(); +#ifdef EATHENA_SUPPORT updateShopName(); +#endif instances.push_back(this); } @@ -1038,12 +1040,7 @@ void ShopWindow::updateSelection() updateButtonsAndLabels(); } -void ShopWindow::vendingSlotsChanged(const int slots) -{ - mSellShopSize = slots; - updateButtonsAndLabels(); -} - +#ifdef EATHENA_SUPPORT void ShopWindow::updateShopName() { if (mSellShopName.empty()) @@ -1065,7 +1062,12 @@ void ShopWindow::setShopName(const std::string &name) updateShopName(); } -#ifdef EATHENA_SUPPORT +void ShopWindow::vendingSlotsChanged(const int slots) +{ + mSellShopSize = slots; + updateButtonsAndLabels(); +} + void ShopWindow::vendingEnabled(const bool b) { mEnableVending = b; diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h index 3b418a6da..cff596f5c 100644 --- a/src/gui/windows/shopwindow.h +++ b/src/gui/windows/shopwindow.h @@ -47,9 +47,9 @@ class TabStrip; * \ingroup Interface */ class ShopWindow final : public Window, - public VendingSlotsListener, #ifdef EATHENA_SUPPORT public VendingModeListener, + public VendingSlotsListener, public BuyingStoreModeListener, public BuyingStoreSlotsListener, #endif @@ -147,24 +147,26 @@ class ShopWindow final : public Window, bool isShopEmpty() const A_WARN_UNUSED; - void vendingSlotsChanged(const int slots) override final; - #ifdef EATHENA_SUPPORT void vendingEnabled(const bool b) override final; + void vendingSlotsChanged(const int slots) override final; + void buyingStoreEnabled(const bool b) override final; void buyingStoreSlotsChanged(const int slots) override final; -#endif void setShopName(const std::string &name); +#endif private: void startTrade(); void updateSelection(); +#ifdef EATHENA_SUPPORT void updateShopName(); +#endif typedef std::list DialogList; static DialogList instances; -- cgit v1.2.3-70-g09d2