summaryrefslogtreecommitdiff
path: root/src/gui/popups/beingpopup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-12 22:11:56 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-13 00:47:48 +0300
commit5e70bf11d9715dec5678f787cee838ddbaaaf063 (patch)
tree75b18603dd649626aee29a1e2cfd51aef61bf582 /src/gui/popups/beingpopup.cpp
parentf085c8aed70d5efaaccfa7a4e2cac4a840935165 (diff)
downloadmanaplus-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.gz
manaplus-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.bz2
manaplus-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.xz
manaplus-5e70bf11d9715dec5678f787cee838ddbaaaf063.zip
Show group name in being popup and status window.
Diffstat (limited to 'src/gui/popups/beingpopup.cpp')
-rw-r--r--src/gui/popups/beingpopup.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 015134c9f..c9e9e8608 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -35,6 +35,8 @@
#include "resources/chatobject.h"
+#include "resources/db/groupdb.h"
+
#include "utils/gettext.h"
#include "utils/foreach.h"
#include "utils/stringutils.h"
@@ -168,6 +170,19 @@ void BeingPopup::show(const int x, const int y, Being *const b)
}
else
{
+ const int groupId = b->getGroupId();
+ const std::string groupName = GroupDb::getLongName(groupId);
+ if (!groupName.empty())
+ {
+ ptr = mLabels[num];
+ // TRANSLATORS: being popup label
+ ptr->setCaption(strprintf(_("Group: %s (%d)"),
+ groupName.c_str(),
+ groupId));
+ ptr->adjustSize();
+ num ++;
+ }
+
if (!(b->getPartyName().empty()))
{
ptr = mLabels[num];