summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-05 20:25:31 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-05 20:25:31 +0300
commitd8ed0b7e0c9015ee5f8212e6325b3b99b96c6e54 (patch)
treea0e2cf622bea241a64ec36b8bd2ba1c15e24cdfe /src
parentbdbad5330716fde9952924190b60341d05a089d1 (diff)
downloadmanaplus-d8ed0b7e0c9015ee5f8212e6325b3b99b96c6e54.tar.gz
manaplus-d8ed0b7e0c9015ee5f8212e6325b3b99b96c6e54.tar.bz2
manaplus-d8ed0b7e0c9015ee5f8212e6325b3b99b96c6e54.tar.xz
manaplus-d8ed0b7e0c9015ee5f8212e6325b3b99b96c6e54.zip
Add space before gender sign.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp9
-rw-r--r--src/being.h2
-rw-r--r--src/gui/beingpopup.cpp2
-rw-r--r--src/gui/popupmenu.cpp4
4 files changed, 14 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 35fe6052c..d45bbcf74 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -1455,6 +1455,15 @@ void Being::flashName(int time)
mDispName->flash(time);
}
+std::string Being::getGenderSignWithSpace() const
+{
+ const std::string &str = getGenderSign();
+ if (str.empty())
+ return str;
+ else
+ return " " + str;
+}
+
std::string Being::getGenderSign() const
{
if (config.getBoolValue("showgender"))
diff --git a/src/being.h b/src/being.h
index b2a92d3df..652b8a889 100644
--- a/src/being.h
+++ b/src/being.h
@@ -723,6 +723,8 @@ class Being : public ActorSprite, public ConfigListener
std::string getGenderSign() const;
+ std::string getGenderSignWithSpace() const;
+
static void clearCache();
protected:
diff --git a/src/gui/beingpopup.cpp b/src/gui/beingpopup.cpp
index 37c969f05..1b32d2b7b 100644
--- a/src/gui/beingpopup.cpp
+++ b/src/gui/beingpopup.cpp
@@ -81,7 +81,7 @@ void BeingPopup::show(int x, int y, Being *b)
Label *label2 = mBeingGuild;
Label *label3 = mBeingRank;
- mBeingName->setCaption(b->getName() + b->getGenderSign());
+ mBeingName->setCaption(b->getName() + b->getGenderSignWithSpace());
if (gui)
{
if (player_relations.isGoodName(b))
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index a9905d4ca..8497b2924 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -118,7 +118,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
const std::string &name = mNick;
- mBrowserBox->addRow(name + being->getGenderSign());
+ mBrowserBox->addRow(name + being->getGenderSignWithSpace());
switch (being->getType())
{
@@ -325,7 +325,7 @@ void PopupMenu::showPopup(int x, int y, std::list<Being*> &beings)
{
mBrowserBox->addRow(strprintf("@@player_%u|%s >@@",
being->getId(), (being->getName()
- + being->getGenderSign()).c_str()));
+ + being->getGenderSignWithSpace()).c_str()));
}
}
mBrowserBox->addRow("##3---");