summaryrefslogtreecommitdiff
path: root/src/gui/popups
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
parentf085c8aed70d5efaaccfa7a4e2cac4a840935165 (diff)
downloadmv-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.gz
mv-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.bz2
mv-5e70bf11d9715dec5678f787cee838ddbaaaf063.tar.xz
mv-5e70bf11d9715dec5678f787cee838ddbaaaf063.zip
Show group name in being popup and status window.
Diffstat (limited to 'src/gui/popups')
-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];