summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-11 15:07:40 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-11 15:07:40 -0600
commit75cd80b9eaee9526bfe1625ad63eccdb7c212161 (patch)
tree9547981f72a13ab96e7dab70b96775f8ffcdd739 /src
parent47b127b648939c0c0d7f1efaceca8d675dccf513 (diff)
downloadmana-client-75cd80b9eaee9526bfe1625ad63eccdb7c212161.tar.gz
mana-client-75cd80b9eaee9526bfe1625ad63eccdb7c212161.tar.bz2
mana-client-75cd80b9eaee9526bfe1625ad63eccdb7c212161.tar.xz
mana-client-75cd80b9eaee9526bfe1625ad63eccdb7c212161.zip
Adjust party window visibility logic
It now behaves like most windows: defaults to not visible and will save it's visibility. Only the user should be altering it now.
Diffstat (limited to 'src')
-rw-r--r--src/gui/partywindow.cpp14
-rw-r--r--src/net/ea/partyhandler.cpp3
2 files changed, 1 insertions, 16 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index dbd8f3ef..982898fb 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -46,6 +46,7 @@ PartyWindow::PartyWindow() :
{
setWindowName("Party");
setVisible(false);
+ setSaveVisible(true);
setResizable(true);
setSaveVisible(true);
setCloseButton(true);
@@ -54,7 +55,6 @@ PartyWindow::PartyWindow() :
setDefaultSize(590, 200, 200, 200);
loadWindowState();
- setVisible(false); // Do not start out visible
}
PartyWindow::~PartyWindow()
@@ -111,12 +111,6 @@ void PartyWindow::updateMember(int id, const std::string &memberName,
player->online = online;
player->avatar->setName(memberName);
player->avatar->setOnline(online);
-
- // show the window
- if (mMembers.size() > 0)
- {
- setVisible(true);
- }
}
void PartyWindow::updateMemberHP(int id, int hp, int maxhp)
@@ -129,12 +123,6 @@ void PartyWindow::updateMemberHP(int id, int hp, int maxhp)
void PartyWindow::removeMember(int id)
{
mMembers.erase(id);
-
- // if no-one left, remove the party window
- if (mMembers.size() < 1)
- {
- setVisible(false);
- }
}
void PartyWindow::removeMember(const std::string &name)
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index e5b20a38..7216719d 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -106,8 +106,6 @@ void PartyHandler::handleMessage(MessageIn &msg)
if (being)
being->setName(nick);
}
-
- partyWindow->setVisible(true);
}
break;
case SMSG_PARTY_INVITE_RESPONSE:
@@ -232,7 +230,6 @@ void PartyHandler::handleMessage(MessageIn &msg)
{
player_node->setInParty(false);
partyWindow->clearMembers();
- partyWindow->setVisible(false);
partyTab->chatLog(_("You have left the party."), BY_SERVER);
}
else