summaryrefslogtreecommitdiff
path: root/src/gui/buddywindow.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-22 13:31:13 +0000
commitbd56bf8afdab16383ed8ad08412a8c807f84af85 (patch)
tree0e963ada63bcbe3c50dd77986aaa15b9ba49816a /src/gui/buddywindow.cpp
parent5359640b6f271af31f6423df9d661433eff89a3e (diff)
downloadmana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.gz
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.bz2
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.xz
mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.zip
Merged NETWORK branch (includes BEING_OVERHAUL).
Diffstat (limited to 'src/gui/buddywindow.cpp')
-rw-r--r--src/gui/buddywindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/buddywindow.cpp b/src/gui/buddywindow.cpp
index c37f2a6d..cfa21b63 100644
--- a/src/gui/buddywindow.cpp
+++ b/src/gui/buddywindow.cpp
@@ -29,6 +29,8 @@
#include "chat.h"
#include "scrollarea.h"
+#include "../resources/buddylist.h"
+
extern ChatWindow *chatWindow;
BuddyWindow::BuddyWindow():
@@ -36,8 +38,10 @@ BuddyWindow::BuddyWindow():
{
setContentSize(124, 202);
+ mBuddyList = new BuddyList();
+
mListbox = new gcn::ListBox();
- mListbox->setListModel(this);
+ mListbox->setListModel(mBuddyList);
ScrollArea *scrollArea = new ScrollArea(mListbox);
scrollArea->setDimension(gcn::Rectangle(
@@ -68,7 +72,7 @@ void BuddyWindow::action(const std::string& eventId)
int selected = mListbox->getSelected();
if ( selected > -1 )
{
- std::string who = getElementAt(selected);
+ std::string who = mBuddyList->getElementAt(selected);
chatWindow->setInputText(who +": ");
}
}
@@ -76,8 +80,8 @@ void BuddyWindow::action(const std::string& eventId)
int selected = mListbox->getSelected();
if ( selected > -1 )
{
- std::string who = getElementAt(selected);
- removeBuddy(who);
+ std::string who = mBuddyList->getElementAt(selected);
+ mBuddyList->removeBuddy(who);
}
}
else if (eventId == "Cancel") {