diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-11 21:39:29 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-11 21:39:29 -0400 |
commit | 260e22a429311e597e91e2d9a149c8fdbf5df5b3 (patch) | |
tree | dc35a88b84f9858a167e34769a8e8111f47ebc7d /src | |
parent | 6f501e2f687df1550dfc024f7ac5d36a5b88d548 (diff) | |
parent | eac0ebd493f6be170c8caa8df21ae147b1486d50 (diff) | |
download | mana-client-260e22a429311e597e91e2d9a149c8fdbf5df5b3.tar.gz mana-client-260e22a429311e597e91e2d9a149c8fdbf5df5b3.tar.bz2 mana-client-260e22a429311e597e91e2d9a149c8fdbf5df5b3.tar.xz mana-client-260e22a429311e597e91e2d9a149c8fdbf5df5b3.zip |
Merge branch 'master' of git://gitorious.org/tmw/mainline
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/partywindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/tab.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/tab.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/gui/partytab.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 6 |
6 files changed, 15 insertions, 11 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 982898fb..cb514844 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -50,9 +50,9 @@ PartyWindow::PartyWindow() : setResizable(true); setSaveVisible(true); setCloseButton(true); - setMinWidth(200); + setMinWidth(212); setMinHeight(200); - setDefaultSize(590, 200, 200, 200); + setDefaultSize(590, 200, 212, 200); loadWindowState(); } diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index c98ecee4..f2231fca 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -63,7 +63,7 @@ static TabData const data[TAB_COUNT] = { ImageRect Tab::tabImg[TAB_COUNT]; Tab::Tab() : gcn::Tab(), - mTabColor(guiPalette->getColor(Palette::TEXT)) + mTabColor(&guiPalette->getColor(Palette::TEXT)) { init(); } @@ -127,7 +127,7 @@ void Tab::draw(gcn::Graphics *graphics) { mode = TAB_SELECTED; // if tab is selected, it doesnt need to highlight activity - mLabel->setForegroundColor(mTabColor); + mLabel->setForegroundColor(*mTabColor); mHighlighted = false; } else if (mHighlighted) @@ -137,7 +137,7 @@ void Tab::draw(gcn::Graphics *graphics) } else { - mLabel->setForegroundColor(mTabColor); + mLabel->setForegroundColor(*mTabColor); } } @@ -163,7 +163,7 @@ void Tab::draw(gcn::Graphics *graphics) drawChildren(graphics); } -void Tab::setTabColor(const gcn::Color &color) +void Tab::setTabColor(const gcn::Color *color) { mTabColor = color; } diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index 134d5591..eea2586c 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -45,7 +45,7 @@ class Tab : public gcn::Tab /** * Set the normal color fo the tab's text. */ - void setTabColor(const gcn::Color &color); + void setTabColor(const gcn::Color *color); /** * Set tab highlighted @@ -64,7 +64,7 @@ class Tab : public gcn::Tab static int mInstances; /**< Number of tab instances */ static float mAlpha; - gcn::Color mTabColor; + const gcn::Color *mTabColor; bool mHighlighted; }; diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 17ee3fc4..23325108 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -35,7 +35,7 @@ WhisperTab::WhisperTab(const std::string &nick) : ChatTab(nick), mNick(nick) { - setTabColor(guiPalette->getColor(Palette::WHISPER)); + setTabColor(&guiPalette->getColor(Palette::WHISPER)); } WhisperTab::~WhisperTab() diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 12ca0d8d..9b0fc8c5 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -38,7 +38,7 @@ PartyTab::PartyTab() : ChatTab(_("Party")) { - setTabColor(guiPalette->getColor(Palette::PARTY)); + setTabColor(&guiPalette->getColor(Palette::PARTY)); } PartyTab::~PartyTab() diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 7216719d..0eda7792 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -79,6 +79,7 @@ void PartyHandler::handleMessage(MessageIn &msg) { partyTab->chatLog(_("Party successfully created."), BY_SERVER); player_node->setInParty(true); + partyWindow->setVisible(true); } break; case SMSG_PARTY_INFO: @@ -230,12 +231,15 @@ void PartyHandler::handleMessage(MessageIn &msg) { player_node->setInParty(false); partyWindow->clearMembers(); + partyWindow->setVisible(false); partyTab->chatLog(_("You have left the party."), BY_SERVER); } else + { partyTab->chatLog(strprintf(_("%s has left your party."), nick.c_str()), BY_SERVER); - partyWindow->removeMember(id); + partyWindow->removeMember(id); + } break; } case SMSG_PARTY_UPDATE_HP: |