summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chatwindow.cpp1
-rw-r--r--src/gui/popupmenu.cpp38
-rw-r--r--src/gui/setup_chat.cpp3
-rw-r--r--src/gui/setup_relations.cpp3
-rw-r--r--src/gui/skilldialog.cpp8
-rw-r--r--src/gui/skilldialog.h2
-rw-r--r--src/gui/socialwindow.cpp8
-rw-r--r--src/gui/socialwindow.h2
-rw-r--r--src/gui/statuspopup.cpp5
-rw-r--r--src/gui/statuswindow.cpp3
-rw-r--r--src/gui/viewport.cpp4
-rw-r--r--src/gui/whoisonline.cpp2
-rw-r--r--src/gui/widgets/chattab.cpp14
-rw-r--r--src/gui/widgets/tabbedarea.h3
14 files changed, 83 insertions, 13 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 82d6c2ff5..59bd173bd 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -293,6 +293,7 @@ void ChatWindow::fillCommands()
mCommands.push_back("/addpriorityattack ");
mCommands.push_back("/removeattack ");
mCommands.push_back("/addignoreattack ");
+ mCommands.push_back("/blacklist ");
}
void ChatWindow::resetToDefaultSize()
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 16e3d9ec7..d7c7e54df 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -144,12 +144,21 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -369,12 +378,21 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -606,12 +624,21 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -857,6 +884,17 @@ void PopupMenu::handleLink(const std::string &link,
{
player_relations.setRelation(mNick, PlayerRelation::IGNORED);
}
+
+ else if (link == "blacklist" && being &&
+ being->getType() == ActorSprite::PLAYER)
+ {
+ player_relations.setRelation(being->getName(),
+ PlayerRelation::BLACKLISTED);
+ }
+ else if (link == "blacklist" && !mNick.empty())
+ {
+ player_relations.setRelation(mNick, PlayerRelation::BLACKLISTED);
+ }
else if (link == "erase" && being &&
being->getType() == ActorSprite::PLAYER)
{
diff --git a/src/gui/setup_chat.cpp b/src/gui/setup_chat.cpp
index 9e75b9c0a..1b8209c8f 100644
--- a/src/gui/setup_chat.cpp
+++ b/src/gui/setup_chat.cpp
@@ -125,6 +125,9 @@ Setup_Chat::Setup_Chat()
new SetupItemTextField(_("Highlight words (separated by comma)"), "",
"highlightWords", this, "highlightWordsEvent");
+ new SetupItemCheckBox(_("Show MVP messages"), "",
+ "showMVP", this, "showMVPEvent");
+
setDimension(gcn::Rectangle(0, 0, 550, 350));
}
diff --git a/src/gui/setup_relations.cpp b/src/gui/setup_relations.cpp
index 57a51e435..6c57d981e 100644
--- a/src/gui/setup_relations.cpp
+++ b/src/gui/setup_relations.cpp
@@ -71,7 +71,8 @@ static const char *RELATION_NAMES[PlayerRelation::RELATIONS_NR] =
N_("Friend"),
N_("Disregarded"),
N_("Ignored"),
- N_("Erased")
+ N_("Erased"),
+ N_("Blacklisted")
};
class PlayerRelationListModel : public gcn::ListModel
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 28dbca939..8f45be5d1 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -598,3 +598,11 @@ SkillInfo* SkillDialog::getSkill(int id)
{
return mSkills[id];
}
+
+void SkillDialog::widgetResized(const gcn::Event &event)
+{
+ Window::widgetResized(event);
+
+ if (mTabs)
+ mTabs->fixSize();
+}
diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h
index 55dfafc38..21ee56f5e 100644
--- a/src/gui/skilldialog.h
+++ b/src/gui/skilldialog.h
@@ -86,6 +86,8 @@ class SkillDialog : public Window, public gcn::ActionListener
bool hasSkills()
{ return !mSkills.empty(); }
+ void widgetResized(const gcn::Event &event);
+
private:
typedef std::map<int, SkillInfo*> SkillMap;
SkillMap mSkills;
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index ab19e501b..a728d4051 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -1632,3 +1632,11 @@ void SocialWindow::updateAttackFilter()
if (mAttackFilter)
mAttackFilter->updateList();
}
+
+void SocialWindow::widgetResized(const gcn::Event &event)
+{
+ Window::widgetResized(event);
+
+ if (mTabs)
+ mTabs->fixSize();
+}
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 04692d843..7dc962316 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -123,6 +123,8 @@ public:
void updateAttackFilter();
+ void widgetResized(const gcn::Event &event);
+
protected:
friend class SocialTab;
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index fee6450df..a0c8e06d4 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -284,6 +284,11 @@ void StatusPopup::updateLabels()
_("(A) moves to target in attack range"),
keyboard.KEY_CHANGE_MOVE_TO_TARGET);
break;
+ case 7:
+ setLabelText(mMoveToTargetType,
+ _("(a) archer attack range"),
+ keyboard.KEY_CHANGE_MOVE_TO_TARGET);
+ break;
default:
setLabelText(mMoveToTargetType,
_("(?) move to target"), keyboard.KEY_CHANGE_MOVE_TO_TARGET);
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 170fd6ab4..c746eb82d 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -702,6 +702,9 @@ void StatusWindow::updateStatusBar(ProgressBar *bar, bool percent A_UNUSED)
case 6:
str += translateLetter(N_("(A)"));
break;
+ case 7:
+ str += translateLetter(N_("(a)"));
+ break;
default:
str += translateLetter(N_("(?)"));
break;
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 461dd581d..97a467add 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -195,8 +195,8 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
{
if (player_x <= 0 || player_y <= 0)
{
- if (debugChatTab)
- debugChatTab->chatLog("incorrect player position!");
+// if (debugChatTab)
+// debugChatTab->chatLog("incorrect player position!");
logger->log("incorrect player position: %d, %d, %d, %d",
player_x, player_y, (int)mPixelViewX, (int)mPixelViewY);
if (player_node)
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index a14e99afc..3fb63a105 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -278,6 +278,7 @@ void WhoIsOnline::loadList()
break;
case PlayerRelation::DISREGARDED:
+ case PlayerRelation::BLACKLISTED:
disregard.push_back(prepareNick(nick, level, "8"));
break;
@@ -492,6 +493,7 @@ void WhoIsOnline::logic()
setCaption(_("Who Is Online - error"));
mUpdateButton->setEnabled(true);
mUpdateTimer = cur_time + 240;
+ updateSize();
break;
case UPDATE_LIST:
if (mDownloadComplete == true)
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 485e96e74..9a29ae204 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -281,21 +281,15 @@ void ChatTab::chatLog(std::string line, Own own,
{
if (getFlash() == 0)
{
- if (player_node)
- {
- if (chatWindow && chatWindow->findHighlight(tmp.text))
- setFlash(2);
- else
- setFlash(1);
- }
+ if (chatWindow && chatWindow->findHighlight(tmp.text))
+ setFlash(2);
else
- {
setFlash(1);
- }
}
}
- if (getAllowHighlight() && (this != getTabbedArea()->getSelectedTab()
+ if ((getAllowHighlight() || own == BY_GM)
+ && (this != getTabbedArea()->getSelectedTab()
|| (Client::getIsMinimized() || (!Client::getMouseFocused()
&& !Client::getInputFocused()))))
{
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 3ad113b4c..af241d7c5 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -153,6 +153,9 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener
bool getFollowDownScroll()
{ return mFollowDownScroll; }
+ void fixSize()
+ { adjustSize(); }
+
private:
typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabContainer;