summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-03 13:07:57 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-03 13:07:57 +0300
commitca4582756ce9ad0c4f4222da0760bd6ccffc829a (patch)
tree3d65b06b31aadf18f59bce4e0802945158a52950 /src/gui/inventorywindow.cpp
parentab4a00c231e84267c7d06b2b1bb167593f22d91f (diff)
downloadmv-ca4582756ce9ad0c4f4222da0760bd6ccffc829a.tar.gz
mv-ca4582756ce9ad0c4f4222da0760bd6ccffc829a.tar.bz2
mv-ca4582756ce9ad0c4f4222da0760bd6ccffc829a.tar.xz
mv-ca4582756ce9ad0c4f4222da0760bd6ccffc829a.zip
Fix inventory sorting.
Was broken because conflict with buy dialog sorting.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 19043510a..5223e033a 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -58,7 +58,7 @@
#include "debug.h"
-static const char *SORT_NAME[6] =
+static const char *SORT_NAME_INVENTORY[6] =
{
N_("default"),
N_("by name"),
@@ -68,10 +68,10 @@ static const char *SORT_NAME[6] =
N_("by type")
};
-class SortListModel final : public gcn::ListModel
+class SortListModelInv final : public gcn::ListModel
{
public:
- virtual ~SortListModel()
+ virtual ~SortListModelInv()
{ }
virtual int getNumberOfElements()
@@ -82,7 +82,7 @@ public:
if (i >= getNumberOfElements() || i < 0)
return _("???");
- return gettext(SORT_NAME[i]);
+ return gettext(SORT_NAME_INVENTORY[i]);
}
};
@@ -107,7 +107,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mWeightBar(nullptr),
mSlotsBar(new ProgressBar(this, 0.0f, 100, 0, Theme::PROG_INVY_SLOTS)),
mFilter(nullptr),
- mSortModel(new SortListModel),
+ mSortModel(new SortListModelInv),
mSortDropDown(new DropDown(this, mSortModel, false, false, this, "sort")),
mNameFilter(new TextField(this, "", true, this, "namefilter", true)),
mSortDropDownCell(nullptr),