diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-17 02:32:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-17 18:19:12 +0300 |
commit | 72277b0c8a16a5a2aabd634b127bcadd698430d5 (patch) | |
tree | 5b12463d9463f718f999b77fca0a17e3dc663f7f /src/gui/whoisonline.cpp | |
parent | 2cefbbdce67c51e0728f46ef9086a565c0d187cc (diff) | |
download | manaverse-72277b0c8a16a5a2aabd634b127bcadd698430d5.tar.gz manaverse-72277b0c8a16a5a2aabd634b127bcadd698430d5.tar.bz2 manaverse-72277b0c8a16a5a2aabd634b127bcadd698430d5.tar.xz manaverse-72277b0c8a16a5a2aabd634b127bcadd698430d5.zip |
Add friends tab to social window.
Diffstat (limited to 'src/gui/whoisonline.cpp')
-rw-r--r-- | src/gui/whoisonline.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 65bd1fcb5..a80fb4c89 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -21,14 +21,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "whoisonline.h" +#include "gui/whoisonline.h" #include <SDL.h> #include <SDL_thread.h> #include <vector> #include <algorithm> +#include "gui/socialwindow.h" #include "gui/viewport.h" + #include "gui/widgets/button.h" #include "gui/widgets/browserbox.h" #include "gui/widgets/scrollarea.h" @@ -288,8 +290,13 @@ void WhoIsOnline::loadList(std::vector<std::string> &list) } updateWindow(friends, neutral, disregard, enemy, numOnline); - if (!mOnlinePlayers.empty() && chatWindow) - chatWindow->updateOnline(mOnlinePlayers); + if (!mOnlinePlayers.empty()) + { + if (chatWindow) + chatWindow->updateOnline(mOnlinePlayers); + if (socialWindow) + socialWindow->updateActiveList(); + } } void WhoIsOnline::loadWebList() @@ -589,8 +596,13 @@ void WhoIsOnline::logic() mUpdateButton->setEnabled(true); mUpdateTimer = 0; updateSize(); - if (!mOnlinePlayers.empty() && chatWindow) - chatWindow->updateOnline(mOnlinePlayers); + if (!mOnlinePlayers.empty()) + { + if (chatWindow) + chatWindow->updateOnline(mOnlinePlayers); + if (socialWindow) + socialWindow->updateActiveList(); + } } break; case UPDATE_COMPLETE: |