summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-27 06:30:42 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-27 06:31:58 -0600
commit8519fc5cb5d95e1ed753912aaa70a8f041c31abc (patch)
tree04bf754b940f8ee4083042b8de2789ddd830de9e /src/gui
parentdd05447445dc1766e532130318af2cb6bb72a994 (diff)
downloadmana-8519fc5cb5d95e1ed753912aaa70a8f041c31abc.tar.gz
mana-8519fc5cb5d95e1ed753912aaa70a8f041c31abc.tar.bz2
mana-8519fc5cb5d95e1ed753912aaa70a8f041c31abc.tar.xz
mana-8519fc5cb5d95e1ed753912aaa70a8f041c31abc.zip
Fix some problems with NPC dialogs
NPCListDialog couldn't be opened because of infinite recursion, and it and NPCTextDialog both had resize bugs.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/npc_text.cpp6
-rw-r--r--src/gui/npc_text.h7
-rw-r--r--src/gui/npclistdialog.cpp3
3 files changed, 0 insertions, 16 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index 5158e966..9fa57be8 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -157,9 +157,3 @@ void NpcTextDialog::widgetResized(const gcn::Event &event)
setText(mText);
}
-
-void NpcTextDialog::requestFocus()
-{
- loadWindowState();
- setVisible(true);
-}
diff --git a/src/gui/npc_text.h b/src/gui/npc_text.h
index 4c0c31e3..16c1d5fd 100644
--- a/src/gui/npc_text.h
+++ b/src/gui/npc_text.h
@@ -94,13 +94,6 @@ class NpcTextDialog : public Window, public gcn::ActionListener
void closeDialog(int npcID = current_npc);
/**
- * Initializes window width to the last known setting. Since the dialog
- * doesn't need any extra focus outside of what it's given in the Game
- * class, this is all it does for now.
- */
- void requestFocus();
-
- /**
* Called when resizing the window.
*
* @param event The calling event
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index 968e2514..ff91c9fc 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -155,7 +155,6 @@ void NpcListDialog::setVisible(bool visible)
{
if (visible) {
npcTextDialog->setVisible(true);
- requestFocus();
}
Window::setVisible(visible);
@@ -165,6 +164,4 @@ void NpcListDialog::requestFocus()
{
mItemList->requestFocus();
mItemList->setSelected(0);
- loadWindowState();
- setVisible(true);
}