summaryrefslogtreecommitdiff
path: root/src/gui/windows/socialwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/socialwindow.cpp')
-rw-r--r--src/gui/windows/socialwindow.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 74b01ef27..49cba826f 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -547,7 +547,7 @@ public:
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
- updateList();
+ getPlayersAvatars();
setCaption(name);
}
@@ -881,7 +881,7 @@ public:
const Map *const map = socialWindow->getMap();
if (!map)
- return 01;
+ return -1;
std::vector<Avatar*>::const_iterator i = avatars->begin();
const std::vector<Avatar*>::const_iterator i_end = avatars->end();
@@ -1021,7 +1021,7 @@ private:
++ ia;\
}\
avatars->clear();\
- Avatar *ava;\
+ Avatar *ava = nullptr;\
std::list<std::string> mobs;\
std::list<std::string>::const_iterator i;\
std::list<std::string>::const_iterator i_end;
@@ -1135,7 +1135,7 @@ public:
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
- updateList();
+ getPlayersAvatars();
setCaption(name);
}
@@ -1227,9 +1227,11 @@ public:
mBrowserBox->addRow("##3---");
// TRANSLATORS: party popup item
mBrowserBox->addRow(strprintf("@@cancel|%s@@", _("Cancel")));
+ }
+ void postInit()
+ {
add(mBrowserBox);
-
setContentSize(mBrowserBox->getWidth() + 8,
mBrowserBox->getHeight() + 8);
}
@@ -1304,6 +1306,11 @@ SocialWindow::SocialWindow() :
mNeedUpdate(false),
mProcessedPortals(false)
{
+ mCreatePopup->postInit();
+}
+
+void SocialWindow::postInit()
+{
setWindowName("Social");
setVisible(false);
setSaveVisible(true);