summaryrefslogtreecommitdiff
path: root/src/gui/npclistdialog.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-10 08:11:48 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 08:11:48 -0600
commit443a10db52e909c4c2a33543795ec8837547e973 (patch)
treefc8fff5e1dbd5e171974919186f6356ffce7b6ff /src/gui/npclistdialog.cpp
parent03507766fa4ee07491b7ee702093669de6222c9c (diff)
downloadmana-443a10db52e909c4c2a33543795ec8837547e973.tar.gz
mana-443a10db52e909c4c2a33543795ec8837547e973.tar.bz2
mana-443a10db52e909c4c2a33543795ec8837547e973.tar.xz
mana-443a10db52e909c4c2a33543795ec8837547e973.zip
Made it so that when windows load previous states, they are never
smaller than the minimum width and height (a check that should have been enforced in the first place), as well as modified the NPC list and text dialogs to remember where they were when they were moved or resized last. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/npclistdialog.cpp')
-rw-r--r--src/gui/npclistdialog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index c639411d..f049cba7 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -37,8 +37,9 @@
#include "../utils/gettext.h"
NpcListDialog::NpcListDialog(Network *network):
- Window(_("NPC")), mNetwork(network)
+ Window("NPC"), mNetwork(network)
{
+ setWindowName(_("NPC"));
setResizable(true);
setMinWidth(200);
@@ -114,6 +115,7 @@ void NpcListDialog::action(const gcn::ActionEvent &event)
if (choice)
{
setVisible(false);
+ saveWindowState();
reset();
MessageOut outMsg(mNetwork);
@@ -129,4 +131,6 @@ void NpcListDialog::requestFocus()
{
mItemList->requestFocus();
mItemList->setSelected(0);
+ loadWindowState();
+ setVisible(true);
}