From 13deabf8b93a2a6307978d9f49ad8fde5dbefdfd Mon Sep 17 00:00:00 2001 From: Mateusz Kaduk Date: Sun, 15 May 2005 09:17:40 +0000 Subject: Using guichan ListModel --- src/gui/buddywindow.cpp | 11 ++++++----- src/gui/buddywindow.h | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/buddywindow.cpp b/src/gui/buddywindow.cpp index e5b0d82f..54652a30 100644 --- a/src/gui/buddywindow.cpp +++ b/src/gui/buddywindow.cpp @@ -23,17 +23,17 @@ #include "buddywindow.h" BuddyWindow::BuddyWindow(): - Window("") + Window("Buddys") { setContentSize(80,200); - textlist = new TextBox(); - textlist->setEditable(false); - scrollArea = new ScrollArea(textlist); + listbox = new gcn::ListBox(); + listbox->setListModel(dynamic_cast(this)); + scrollArea = new ScrollArea(listbox); } BuddyWindow::~BuddyWindow() { - delete textlist; + delete listbox; delete scrollArea; } @@ -41,6 +41,7 @@ void BuddyWindow::draw(gcn::Graphics *graphics) { // Draw the children Window::draw(graphics); + } void BuddyWindow::action(const std::string& eventId) diff --git a/src/gui/buddywindow.h b/src/gui/buddywindow.h index 8fa515d5..00fb07fb 100644 --- a/src/gui/buddywindow.h +++ b/src/gui/buddywindow.h @@ -26,7 +26,6 @@ #include #include "window.h" #include "scrollarea.h" -#include "textbox.h" #include "../resources/buddylist.h" /** @@ -59,7 +58,7 @@ class BuddyWindow : public Window, public BuddyList, void action(const std::string &actionId); private: - TextBox *textlist; + gcn::ListBox *listbox; ScrollArea *scrollArea; }; -- cgit v1.2.3-70-g09d2