diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-16 23:08:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-16 23:08:07 +0300 |
commit | 0561612345f979a3c59ed4feeeddf6491974905a (patch) | |
tree | cc8697f8628f34671bb388a86fbfb11ae0015151 /src | |
parent | f6b355a4237ddcfa49ab07a1083777a9d171675d (diff) | |
download | manaverse-0561612345f979a3c59ed4feeeddf6491974905a.tar.gz manaverse-0561612345f979a3c59ed4feeeddf6491974905a.tar.bz2 manaverse-0561612345f979a3c59ed4feeeddf6491974905a.tar.xz manaverse-0561612345f979a3c59ed4feeeddf6491974905a.zip |
Build vendingslotslistener only if eathena support enabled.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 18 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.h | 10 | ||||
-rw-r--r-- | src/listeners/vendingslotslistener.h | 3 |
5 files changed, 23 insertions, 16 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 129945057..f439aedf2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1133,8 +1133,6 @@ SET(SRCS listeners/updatestatuslistener.h listeners/uploadlistener.cpp listeners/uploadlistener.h - listeners/vendingslotslistener.cpp - listeners/vendingslotslistener.h utils/sdlpixel.h gui/widgets/widget.h listeners/weightlistener.h @@ -1414,6 +1412,8 @@ SET(SRCS_EATHENA listeners/shoprenamelistener.h listeners/vendingmodelistener.cpp listeners/vendingmodelistener.h + listeners/vendingslotslistener.cpp + listeners/vendingslotslistener.h net/eathena/adminhandler.cpp net/eathena/adminhandler.h net/eathena/auctionhandler.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 1193acacc..18acf1956 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -221,8 +221,6 @@ manaplus_SOURCES += events/actionevent.h \ listeners/updatestatuslistener.h \ listeners/uploadlistener.cpp \ listeners/uploadlistener.h \ - listeners/vendingslotslistener.cpp \ - listeners/vendingslotslistener.h \ utils/sdlpixel.h \ gui/widgets/widget.h \ listeners/weightlistener.h \ @@ -1350,6 +1348,8 @@ manaplus_SOURCES += gui/windows/bankwindow.cpp \ listeners/shoprenamelistener.h \ listeners/vendingmodelistener.cpp \ listeners/vendingmodelistener.h \ + listeners/vendingslotslistener.cpp \ + listeners/vendingslotslistener.h \ net/eathena/adminhandler.cpp \ net/eathena/adminhandler.h \ net/eathena/auctionhandler.cpp \ 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<ShopWindow*> DialogList; static DialogList instances; diff --git a/src/listeners/vendingslotslistener.h b/src/listeners/vendingslotslistener.h index 98b4ae49a..f843a727a 100644 --- a/src/listeners/vendingslotslistener.h +++ b/src/listeners/vendingslotslistener.h @@ -21,6 +21,8 @@ #ifndef LISTENERS_VENDINGSLOTSLISTENER_H #define LISTENERS_VENDINGSLOTSLISTENER_H +#ifdef EATHENA_SUPPORT + #include "listeners/baselistener.hpp" #include "localconsts.h" @@ -35,4 +37,5 @@ class VendingSlotsListener notfinal defineListenerHeader(VendingSlotsListener) }; +#endif // EATHENA_SUPPORT #endif // LISTENERS_VENDINGSLOTSLISTENER_H |