diff options
Diffstat (limited to 'src/gui/partywindow.cpp')
-rw-r--r-- | src/gui/partywindow.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index 5172f4bb..0479f0fe 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -30,7 +30,19 @@ #include "utils/gettext.h" #include "utils/stringutils.h" -PartyWindow::PartyWindow() : Window(_("Party")) +PartyMember::PartyMember(): + avatar(new Avatar) +{ +} + +PartyMember::~PartyMember() +{ + delete avatar; +} + + +PartyWindow::PartyWindow() : + Window(_("Party")) { setWindowName("Party"); setVisible(false); @@ -50,11 +62,6 @@ PartyWindow::~PartyWindow() delete_all(mMembers); } -void PartyWindow::draw(gcn::Graphics *graphics) -{ - Window::draw(graphics); -} - PartyMember *PartyWindow::findMember(int id) const { PartyList::const_iterator it = mMembers.find(id); @@ -71,7 +78,6 @@ PartyMember *PartyWindow::findOrCreateMember(int id) if (!member) { member = new PartyMember; - member->avatar = new Avatar(""); mMembers[id] = member; add(member->avatar, 0, (mMembers.size() - 1) * 14); } @@ -195,9 +201,10 @@ void PartyWindow::action(const gcn::ActionEvent &event) } } -void PartyWindow::clear() +void PartyWindow::clearMembers() { - Window::clear(); + clearLayout(); + delete_all(mMembers); mMembers.clear(); } |