summaryrefslogtreecommitdiff
path: root/src/gui/models/sortlistmodelinv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/models/sortlistmodelinv.h')
-rw-r--r--src/gui/models/sortlistmodelinv.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/models/sortlistmodelinv.h b/src/gui/models/sortlistmodelinv.h
index e3cd7e9ad..f89e21a8d 100644
--- a/src/gui/models/sortlistmodelinv.h
+++ b/src/gui/models/sortlistmodelinv.h
@@ -27,7 +27,9 @@
#include "utils/gettext.h"
-static const char *const SORT_NAME_INVENTORY[6] =
+#define NUM_ELEMENTS(a) sizeof(a) / sizeof(a[0])
+
+static const char *const SORT_NAME_INVENTORY[7] =
{
// TRANSLATORS: inventory sort mode
N_("default"),
@@ -38,6 +40,8 @@ static const char *const SORT_NAME_INVENTORY[6] =
// TRANSLATORS: inventory sort mode
N_("by weight"),
// TRANSLATORS: inventory sort mode
+ N_("by total weight"),
+ // TRANSLATORS: inventory sort mode
N_("by amount"),
// TRANSLATORS: inventory sort mode
N_("by type")
@@ -53,7 +57,7 @@ class SortListModelInv final : public ListModel
A_DELETE_COPY(SortListModelInv)
int getNumberOfElements() override final
- { return 6; }
+ { return NUM_ELEMENTS(SORT_NAME_INVENTORY); }
std::string getElementAt(int i) override final
{