summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-28 01:00:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-28 01:00:03 +0300
commitefb1d3d1959547c9692328e6cb1bb3268475a915 (patch)
treea12664ace33fedd9d99f2d4e84c6be1cdce3b8e7
parent01a0e4b658241cc3dbd8a5d11d34a6de48dab159 (diff)
downloadplus-efb1d3d1959547c9692328e6cb1bb3268475a915.tar.gz
plus-efb1d3d1959547c9692328e6cb1bb3268475a915.tar.bz2
plus-efb1d3d1959547c9692328e6cb1bb3268475a915.tar.xz
plus-efb1d3d1959547c9692328e6cb1bb3268475a915.zip
Remove support for split button from inventory.
In all supported servers this button is useless.
-rw-r--r--src/gui/windows/inventorywindow.cpp18
-rw-r--r--src/gui/windows/inventorywindow.h6
-rw-r--r--src/net/eathena/generalhandler.cpp2
-rw-r--r--src/net/tmwa/generalhandler.cpp2
4 files changed, 0 insertions, 28 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 6094ffc91..ce954e7f3 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -84,7 +84,6 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mItems(new ItemContainer(this, mInventory)),
mUseButton(nullptr),
mDropButton(nullptr),
- mSplitButton(nullptr),
mOutfitButton(nullptr),
mShopButton(nullptr),
mCartButton(nullptr),
@@ -207,8 +206,6 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mUseButton = new Button(this, longestUseString, "use", this);
// TRANSLATORS: inventory button
mDropButton = new Button(this, _("Drop..."), "drop", this);
- // TRANSLATORS: inventory button
- mSplitButton = new Button(this, _("Split"), "split", this);
// TRANSLATORS: inventory outfits button
mOutfitButton = new Button(this, _("O"), "outfit", this);
// TRANSLATORS: inventory cart button
@@ -242,7 +239,6 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
place(0, 2, invenScroll, 11).setPadding(3);
place(0, 3, mUseButton);
place(1, 3, mDropButton);
- place(8, 2, mSplitButton);
ContainerPlacer placer = getPlacer(10, 3);
placer(0, 0, mShopButton);
placer(1, 0, mOutfitButton);
@@ -778,20 +774,6 @@ void InventoryWindow::updateButtons(const Item *item)
}
updateDropButton();
-
- if (mSplitButton)
- {
- if (inventoryHandler->canSplit(item))
- mSplitButton->setEnabled(true);
- else
- mSplitButton->setEnabled(false);
- }
-}
-
-void InventoryWindow::setSplitAllowed(const Visible allowed)
-{
- if (mSplitButton)
- mSplitButton->setVisible(allowed);
}
void InventoryWindow::close()
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index eb82b0fb5..cb08a8fa2 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -122,11 +122,6 @@ class InventoryWindow final : public Window,
void valueChanged(const SelectionEvent &event) override final;
/**
- * Sets whether the split button should be shown.
- */
- void setSplitAllowed(const Visible allowed);
-
- /**
* Closes the Storage Window, as well as telling the server that the
* window has been closed.
*/
@@ -185,7 +180,6 @@ class InventoryWindow final : public Window,
Button *mUseButton;
Button *mDropButton;
- Button *mSplitButton;
Button *mOutfitButton;
Button *mShopButton;
Button *mCartButton;
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 704f7787d..072605e78 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -379,8 +379,6 @@ void GeneralHandler::clearHandlers()
void GeneralHandler::gameStarted() const
{
- if (inventoryWindow)
- inventoryWindow->setSplitAllowed(Visible_false);
if (skillDialog)
skillDialog->loadSkills();
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 78052a5f8..e7da97a1d 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -330,8 +330,6 @@ void GeneralHandler::clearHandlers()
void GeneralHandler::gameStarted() const
{
- if (inventoryWindow)
- inventoryWindow->setSplitAllowed(Visible_false);
if (skillDialog)
skillDialog->loadSkills();