summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--INSTALL2
-rw-r--r--src/gui/chatinput.cpp4
-rw-r--r--src/gui/chatinput.h6
-rw-r--r--src/gui/gui.cpp4
5 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index f1130a9b..073ce04a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2007-06-29 Philipp Sehmisch <tmw@crushnet.org>
+2007-07-07 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/gui/gui.cpp, src/gui/chatinput.h, src/gui/chatinput.cpp,
+ INSTALL: Ported to Guichan 0.7.0. Unfortunately, since Guichan 0.6.x
+ didn't have a FocusListener, compatibility with older versions is
+ broken.
+
+2007-06-29 Philipp Sehmisch <tmw@crushnet.org>
* src/particle.cpp, src/particleemitter.cpp: Corrected some perspective
issues of the particle engine and fixed a crash caused by particles
diff --git a/INSTALL b/INSTALL
index 5cdb1ec1..eaef5e57 100644
--- a/INSTALL
+++ b/INSTALL
@@ -20,7 +20,7 @@ and some libraries. The required libraries are:
* SDL_mixer http://www.libsdl.org/projects/SDL_mixer/
* SDL_image http://www.libsdl.org/projects/SDL_image/
* SDL_net http://www.libsdl.org/projects/SDL_net/
-* Guichan 0.6.x http://guichan.sourceforge.net/
+* Guichan 0.7.0 http://guichan.sourceforge.net/
* libxml2 http://www.xmlsoft.org/
* physfs 1.0.x http://icculus.org/physfs/
* zlib 1.2.x http://www.gzip.org/zlib/
diff --git a/src/gui/chatinput.cpp b/src/gui/chatinput.cpp
index 2aa5a159..fc5d6aab 100644
--- a/src/gui/chatinput.cpp
+++ b/src/gui/chatinput.cpp
@@ -26,9 +26,11 @@
ChatInput::ChatInput()
{
setVisible(false);
+
+ addFocusListener(this);
}
-void ChatInput::focusLost()
+void ChatInput::focusLost(const gcn::Event &event)
{
setVisible(false);
}
diff --git a/src/gui/chatinput.h b/src/gui/chatinput.h
index 59d0daf3..da2342ae 100644
--- a/src/gui/chatinput.h
+++ b/src/gui/chatinput.h
@@ -26,10 +26,12 @@
#include "textfield.h"
+#include <guichan/focuslistener.hpp>
+
/**
* The chat input hides when it loses focus. It is also invisible by default.
*/
-class ChatInput : public TextField
+class ChatInput : public TextField, public gcn::FocusListener
{
public:
/**
@@ -41,7 +43,7 @@ class ChatInput : public TextField
* Called if the chat input loses focus. It will set itself to
* invisible as result.
*/
- void focusLost();
+ void focusLost(const gcn::Event &event);
};
#endif
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index cc338fa8..60d5ae8a 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -196,10 +196,6 @@ void
Gui::logic()
{
gcn::Gui::logic();
-
- // Work around Guichan bug of only applying focus on mouse or keyboard
- // events.
- mFocusHandler->applyChanges();
}
void