From 175027e204d936b2c775fe587e7d3f14e71e1233 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Jan 2011 01:39:58 +0200 Subject: Add unification for inventory/storage/cart name. --- src/gui/inventorywindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/gui/inventorywindow.cpp') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 978bfcecf..f63e01d6a 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -61,15 +61,23 @@ InventoryWindow::WindowList InventoryWindow::instances; InventoryWindow::InventoryWindow(Inventory *inventory): - Window(inventory ? (inventory->isMainInventory() - ? _("Inventory") : _("Storage")) : _("Inventory")), + Window(), mInventory(inventory), mDropButton(0), mSplit(false) { - listen(CHANNEL_ATTRIBUTES); + if (inventory) + { + setCaption(gettext(inventory->getName().c_str())); + setWindowName(inventory->getName()); + } + else + { + setCaption(_("Inventory")); + setWindowName("Inventory"); + } - setWindowName(isMainInventory() ? "Inventory" : "Storage"); + listen(CHANNEL_ATTRIBUTES); if (setupWindow) setupWindow->registerWindowForReset(this); -- cgit v1.2.3-70-g09d2