summaryrefslogtreecommitdiff
path: root/src/gui/connection.h
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-22 15:23:58 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-10-22 15:23:58 +0000
commit836e7158bd9819c893e426ea5f88c959c606ce12 (patch)
tree0f58565fbe342b48619a3798b9a021fdecc3ef75 /src/gui/connection.h
parent69ae4ca599df6a5de249b2214c839bcac2e2feba (diff)
downloadmana-client-836e7158bd9819c893e426ea5f88c959c606ce12.tar.gz
mana-client-836e7158bd9819c893e426ea5f88c959c606ce12.tar.bz2
mana-client-836e7158bd9819c893e426ea5f88c959c606ce12.tar.xz
mana-client-836e7158bd9819c893e426ea5f88c959c606ce12.zip
Plugged memory leak in connection dialog box.
Diffstat (limited to 'src/gui/connection.h')
-rw-r--r--src/gui/connection.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/connection.h b/src/gui/connection.h
index 4b3187f6..51ad5467 100644
--- a/src/gui/connection.h
+++ b/src/gui/connection.h
@@ -24,6 +24,8 @@
#ifndef _TMW_CONNECTION_H
#define _TMW_CONNECTION_H
+#include <guichan/actionlistener.hpp>
+
#include "window.h"
class ProgressBar;
@@ -33,7 +35,7 @@ class ProgressBar;
*
* \ingroup Interface
*/
-class ConnectionDialog : public Window
+class ConnectionDialog : public Window, gcn::ActionListener
{
public:
/**
@@ -41,13 +43,20 @@ class ConnectionDialog : public Window
*
* @see Window::Window
*/
- ConnectionDialog(unsigned char previousState);
+ ConnectionDialog(int previousState);
+
+ /**
+ * Called when the user presses Cancel. Restores the global state to
+ * the previous one.
+ */
+ void action(gcn::ActionEvent const &);
void logic();
private:
ProgressBar *mProgressBar;
float mProgress;
+ int mPreviousState;
};
#endif