summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/gui/popupmenu.cpp6
-rw-r--r--src/gui/viewport.cpp9
-rw-r--r--src/gui/viewport.h1
-rw-r--r--tmw.cbp20
5 files changed, 28 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 833e02bc..92ee636d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2007-08-09 Philipp Sehmisch <tmw@crushnet.org>
+2007-08-14 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/gui/popupmenu.cpp, src/gui/viewport.cpp, src/gui/viewport.h,
+ tmw.cbp: Fixed popup menu requiring one more click after being used.
+
+2007-08-09 Philipp Sehmisch <tmw@crushnet.org>
* data/graphics/sprites/chest-lightplatemail-male.png,
data/graphics/sprites/chest-lightplatemail-female.png,
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index c2959e1d..8f93cb1e 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -210,12 +210,6 @@ void PopupMenu::handleLink(const std::string& link)
setVisible(false);
- /*
- * This is need cause of a bug in guichan that leave
- * the focus on the popup menu even if is not visible.
- */
- _getFocusHandler()->focusNone();
-
mBeing = NULL;
mFloorItem = NULL;
mItem = NULL;
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index c1a904f5..6c89d107 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -55,8 +55,7 @@ Viewport::Viewport():
mCameraX(0),
mCameraY(0),
mShowDebugPath(false),
- mPlayerFollowMouse(false),
- mPopupActive(false)
+ mPlayerFollowMouse(false)
{
setOpaque(false);
addMouseListener(this);
@@ -383,10 +382,9 @@ Viewport::mousePressed(gcn::MouseEvent &event)
}
// If a popup is active, just remove it
- if (mPopupActive)
+ if (mPopupMenu->isVisible())
{
mPopupMenu->setVisible(false);
- mPopupActive = false;
return;
}
@@ -473,21 +471,18 @@ void
Viewport::showPopup(int x, int y, Item *item)
{
mPopupMenu->showPopup(x, y, item);
- mPopupActive = true;
}
void
Viewport::showPopup(int x, int y, FloorItem *floorItem)
{
mPopupMenu->showPopup(x, y, floorItem);
- mPopupActive = true;
}
void
Viewport::showPopup(int x, int y, Being *being)
{
mPopupMenu->showPopup(x, y, being);
- mPopupActive = true;
}
void
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 22d0f249..16136cee 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -187,7 +187,6 @@ class Viewport : public WindowContainer, public gcn::MouseListener,
int mWalkTime;
PopupMenu *mPopupMenu; /**< Popup menu. */
- bool mPopupActive;
};
#endif
diff --git a/tmw.cbp b/tmw.cbp
index 43df5690..27169461 100644
--- a/tmw.cbp
+++ b/tmw.cbp
@@ -583,6 +583,16 @@
<Option link="0"/>
<Option target="default"/>
</Unit>
+ <Unit filename="src\gui\setup_keyboard.cpp">
+ <Option compilerVar="CPP"/>
+ <Option target="default"/>
+ </Unit>
+ <Unit filename="src\gui\setup_keyboard.h">
+ <Option compilerVar=""/>
+ <Option compile="0"/>
+ <Option link="0"/>
+ <Option target="default"/>
+ </Unit>
<Unit filename="src\gui\setup_video.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>
@@ -795,6 +805,16 @@
<Option link="0"/>
<Option target="default"/>
</Unit>
+ <Unit filename="src\keyboardconfig.cpp">
+ <Option compilerVar="CPP"/>
+ <Option target="default"/>
+ </Unit>
+ <Unit filename="src\keyboardconfig.h">
+ <Option compilerVar=""/>
+ <Option compile="0"/>
+ <Option link="0"/>
+ <Option target="default"/>
+ </Unit>
<Unit filename="src\localplayer.cpp">
<Option compilerVar="CPP"/>
<Option target="default"/>