diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-15 23:32:28 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-15 23:37:32 +0200 |
commit | fe25bc152de747eb64a1c1f6084f0399faf125e8 (patch) | |
tree | 83746ebff16b87ad36c71908667ed1a81489ebe6 /src/gui/setup_players.cpp | |
parent | ddd7f8acbbfbe7cf2787279babdb5c1279c7fd73 (diff) | |
download | mana-client-fe25bc152de747eb64a1c1f6084f0399faf125e8.tar.gz mana-client-fe25bc152de747eb64a1c1f6084f0399faf125e8.tar.bz2 mana-client-fe25bc152de747eb64a1c1f6084f0399faf125e8.tar.xz mana-client-fe25bc152de747eb64a1c1f6084f0399faf125e8.zip |
Have the DropDown create its ScrollArea and ListBox
And also clean them up again. Fixes some memory leaks and simplifies the
code. Also got rid of the basically unused "opaque" setting of DropDown.
Diffstat (limited to 'src/gui/setup_players.cpp')
-rw-r--r-- | src/gui/setup_players.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 9f084e60..e093a5b6 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -29,7 +29,6 @@ #include "gui/widgets/dropdown.h" #include "gui/widgets/label.h" #include "gui/widgets/layouthelper.h" -#include "gui/widgets/listbox.h" #include "gui/widgets/scrollarea.h" #include "configuration.h" @@ -141,10 +140,7 @@ public: mWidgets.push_back(widget); gcn::ListModel *playerRelation = new PlayerRelationListModel; - gcn::DropDown *choicebox = new DropDown(playerRelation, - new ScrollArea, - new ListBox(playerRelation), - false); + gcn::DropDown *choicebox = new DropDown(playerRelation); choicebox->setSelected(player_relations.getRelation(name)); mWidgets.push_back(choicebox); } @@ -245,8 +241,7 @@ Setup_Players::Setup_Players(): mPlayerTitleTable->setBackgroundColor(gcn::Color(0xbf, 0xbf, 0xbf)); gcn::ListModel *ignoreChoices = new IgnoreChoicesListModel; - mIgnoreActionChoicesBox = new DropDown(ignoreChoices, new ScrollArea, - new ListBox(ignoreChoices), false); + mIgnoreActionChoicesBox = new DropDown(ignoreChoices); for (int i = 0; i < COLUMNS_NR; i++) { |