summaryrefslogtreecommitdiff
path: root/src/gui/npclistdialog.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 21:59:21 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 22:00:09 +0100
commit99e8a3fd77b63a029fe02dcf771b6af1aad252ed (patch)
tree03c296d1f89859aae35336dfe2f58df09d256fd3 /src/gui/npclistdialog.cpp
parentfa8a4bf49100c0a1d5b96e00803f43bbbb861100 (diff)
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadmana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.gz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.bz2
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.xz
mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.zip
Merge branch 'aethyra/master'
Conflicts: Many files.
Diffstat (limited to 'src/gui/npclistdialog.cpp')
-rw-r--r--src/gui/npclistdialog.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index d280a982..ef8b0627 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -38,7 +38,7 @@
#include "../utils/strprintf.h"
NpcListDialog::NpcListDialog(Network *network):
- Window(_("NPC")), mNetwork(network)
+ Window("NPC"), mNetwork(network)
{
setWindowName("NPCList");
setResizable(true);
@@ -46,7 +46,7 @@ NpcListDialog::NpcListDialog(Network *network):
setMinWidth(200);
setMinHeight(150);
- setDefaultSize(0, 0, 260, 200);
+ setDefaultSize(260, 200, ImageRect::CENTER);
mItemList = new ListBox(this);
mItemList->setWrappingEnabled(true);
@@ -60,8 +60,8 @@ NpcListDialog::NpcListDialog(Network *network):
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
place(0, 0, scrollArea, 5).setPadding(3);
- place(3, 1, okButton);
- place(4, 1, cancelButton);
+ place(3, 1, cancelButton);
+ place(4, 1, okButton);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
@@ -121,6 +121,7 @@ void NpcListDialog::action(const gcn::ActionEvent &event)
if (choice)
{
setVisible(false);
+ saveWindowState();
reset();
MessageOut outMsg(mNetwork);
@@ -144,4 +145,6 @@ void NpcListDialog::requestFocus()
{
mItemList->requestFocus();
mItemList->setSelected(0);
+ loadWindowState();
+ setVisible(true);
}