summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-29 15:41:25 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-29 15:41:25 +0300
commite18e3bdf005824b5875bda74053c116b6c4c059f (patch)
tree876cba874c231b79e5eb5cef7233e98b78ec627d /src/gui
parent5e988995513762efc328dc0c592e191b49622d30 (diff)
downloadmv-e18e3bdf005824b5875bda74053c116b6c4c059f.tar.gz
mv-e18e3bdf005824b5875bda74053c116b6c4c059f.tar.bz2
mv-e18e3bdf005824b5875bda74053c116b6c4c059f.tar.xz
mv-e18e3bdf005824b5875bda74053c116b6c4c059f.zip
Fix possible hiding methods issues.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/inventorywindow.cpp6
-rw-r--r--src/gui/itemamountwindow.cpp10
-rw-r--r--src/gui/popupmenu.cpp12
-rw-r--r--src/gui/statuswindow.cpp4
-rw-r--r--src/gui/widgets/setupitem.cpp10
-rw-r--r--src/gui/widgets/vertcontainer.cpp6
-rw-r--r--src/gui/widgets/vertcontainer.h4
7 files changed, 25 insertions, 27 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 01e2bdd17..4a54f5fb2 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -340,7 +340,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
{
if (isStorageActive())
{
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
item->getInvIndex(), item->getQuantity(),
Inventory::STORAGE);
}
@@ -431,7 +431,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
}
else
{
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
item->getInvIndex(), item->getQuantity(),
Inventory::STORAGE);
}
@@ -445,7 +445,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
}
else
{
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
+ Net::getInventoryHandler()->moveItem2(Inventory::STORAGE,
item->getInvIndex(), item->getQuantity(),
Inventory::INVENTORY);
}
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index 9e2a97681..3b01b559f 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -113,14 +113,12 @@ void ItemAmountWindow::finish(Item *item, int amount, int price, Usage usage)
Net::getInventoryHandler()->splitItem(item, amount);
break;
case StoreAdd:
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
- item->getInvIndex(), amount,
- Inventory::STORAGE);
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(), amount, Inventory::STORAGE);
break;
case StoreRemove:
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
- item->getInvIndex(), amount,
- Inventory::INVENTORY);
+ Net::getInventoryHandler()->moveItem2(Inventory::STORAGE,
+ item->getInvIndex(), amount, Inventory::INVENTORY);
break;
case ShopBuyAdd:
if (shopWindow)
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index cd3a4c5ad..142acc69c 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1184,19 +1184,19 @@ void PopupMenu::handleLink(const std::string &link,
int cnt = 10;
if (cnt > mItem->getQuantity())
cnt = mItem->getQuantity();
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
mItem->getInvIndex(), cnt,
Inventory::STORAGE);
}
else if (link == "store half" && mItem)
{
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
mItem->getInvIndex(), mItem->getQuantity() / 2,
Inventory::STORAGE);
}
else if (link == "store all" && mItem)
{
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
+ Net::getInventoryHandler()->moveItem2(Inventory::INVENTORY,
mItem->getInvIndex(), mItem->getQuantity(),
Inventory::STORAGE);
}
@@ -1235,19 +1235,19 @@ void PopupMenu::handleLink(const std::string &link,
int cnt = 10;
if (cnt > mItem->getQuantity())
cnt = mItem->getQuantity();
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
+ Net::getInventoryHandler()->moveItem2(Inventory::STORAGE,
mItem->getInvIndex(), cnt,
Inventory::INVENTORY);
}
else if (link == "retrieve half" && mItem)
{
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
+ Net::getInventoryHandler()->moveItem2(Inventory::STORAGE,
mItem->getInvIndex(), mItem->getQuantity() / 2,
Inventory::INVENTORY);
}
else if (link == "retrieve all" && mItem)
{
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
+ Net::getInventoryHandler()->moveItem2(Inventory::STORAGE,
mItem->getInvIndex(), mItem->getQuantity(),
Inventory::INVENTORY);
}
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index a5fd12d40..57c81bc04 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -424,12 +424,12 @@ void StatusWindow::addAttribute(int id, const std::string &name,
if (modifiable)
{
disp = new ChangeDisplay(id, name);
- mAttrCont->add(disp);
+ mAttrCont->add1(disp);
}
else
{
disp = new DerDisplay(id, name);
- mDAttrCont->add(disp);
+ mDAttrCont->add1(disp);
}
mAttrs[id] = disp;
}
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 92ff625c2..059b05ba2 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -192,7 +192,7 @@ void SetupItemCheckBox::createControls()
load();
mCheckBox = new CheckBox(mText, mValue != "0", mParent, mEventName);
mWidget = mCheckBox;
- mParent->getContainer()->add(mWidget);
+ mParent->getContainer()->add1(mWidget);
mParent->addControl(this);
mParent->addActionListener(this);
mWidget->addActionListener(this);
@@ -275,7 +275,7 @@ void SetupItemTextField::createControls()
mHorizont->add(mTextField);
mHorizont->add(mButton);
- mParent->getContainer()->add(mHorizont, true, 4);
+ mParent->getContainer()->add2(mHorizont, true, 4);
mParent->addControl(this);
mParent->addControl(this, mEventName + "_EDIT");
mParent->addControl(this, mEventName + "_EDIT_OK");
@@ -398,7 +398,7 @@ void SetupItemIntTextField::createControls()
mHorizont->add(mTextField);
mHorizont->add(mButton);
- mParent->getContainer()->add(mHorizont, true, 4);
+ mParent->getContainer()->add2(mHorizont, true, 4);
mParent->addControl(this);
mParent->addControl(this, mEventName + "_EDIT");
mParent->addControl(this, mEventName + "_EDIT_OK");
@@ -486,7 +486,7 @@ void SetupItemLabel::createControls()
}
mWidget = mLabel;
- mParent->getContainer()->add(mWidget);
+ mParent->getContainer()->add1(mWidget);
mParent->addControl(this);
mParent->addActionListener(this);
mWidget->addActionListener(this);
@@ -568,7 +568,7 @@ void SetupItemDropDown::createControls()
mHorizont->add(mLabel);
mHorizont->add(mDropDown);
- mParent->getContainer()->add(mHorizont, true, 4);
+ mParent->getContainer()->add2(mHorizont, true, 4);
mParent->addControl(this);
mParent->addActionListener(this);
mWidget->addActionListener(this);
diff --git a/src/gui/widgets/vertcontainer.cpp b/src/gui/widgets/vertcontainer.cpp
index 42ae97802..0eb59c8f9 100644
--- a/src/gui/widgets/vertcontainer.cpp
+++ b/src/gui/widgets/vertcontainer.cpp
@@ -35,12 +35,12 @@ VertContainer::VertContainer(int verticalItemSize, bool resizable,
addWidgetListener(this);
}
-void VertContainer::add(gcn::Widget *widget, int spacing)
+void VertContainer::add1(gcn::Widget *widget, int spacing)
{
- add(widget, mResizable, spacing);
+ add2(widget, mResizable, spacing);
}
-void VertContainer::add(gcn::Widget *widget, bool resizable, int spacing)
+void VertContainer::add2(gcn::Widget *widget, bool resizable, int spacing)
{
if (!widget)
return;
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index 6e1305a06..9460c837e 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -39,10 +39,10 @@ class VertContainer : public Container, public gcn::WidgetListener
VertContainer(int verticalItemSize, bool resizable = true,
int leftSpacing = 0);
- virtual void add(gcn::Widget *widget, bool resizable,
+ virtual void add2(gcn::Widget *widget, bool resizable,
int spacing = -1);
- virtual void add(gcn::Widget *widget, int spacing = -1);
+ virtual void add1(gcn::Widget *widget, int spacing = -1);
virtual void clear();