summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-03-03 23:38:18 +0100
committerBertram <bertram@cegetel.net>2010-03-03 23:38:18 +0100
commit1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9 (patch)
tree596305e9bfd4ad8448efd477a43f86490b1974c5 /src/gui/serverdialog.h
parent8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (diff)
parentf5f7a7d5990d1133f714b6cd431aecf6a332fbd5 (diff)
downloadmana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.gz
mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.bz2
mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.tar.xz
mana-1e52781e7d425cffcc6a5319b4cb5bf5eebe2ea9.zip
Merge branch 'master' of gitorious.org:mana/mana
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index c4af6ab2..3d7dca9d 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -32,6 +32,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
#include <guichan/listmodel.hpp>
+#include <guichan/mouselistener.hpp>
#include <guichan/selectionlistener.hpp>
#include <string>
@@ -68,18 +69,24 @@ class ServersListModel : public gcn::ListModel
ServerInfo getServer(int elementIndex) const
{ return mServers->at(elementIndex); }
+ /**
+ * Removes the entry.
+ */
+ void remove(int elementIndex)
+ { mServers->erase(mServers->begin() + elementIndex); }
+
private:
ServerInfos *mServers;
ServerDialog *mParent;
};
/**
- * Server and Port List Model
+ * Server Type List Model
*/
class TypeListModel : public gcn::ListModel
{
public:
- TypeListModel() { };
+ TypeListModel() {}
/**
* Used to get number of line in the list
@@ -128,6 +135,8 @@ class ServerDialog : public Window,
*/
void valueChanged(const gcn::SelectionEvent &event);
+ void mouseClicked(gcn::MouseEvent &mouseEvent);
+
void logic();
protected:
@@ -143,7 +152,7 @@ class ServerDialog : public Window,
static int downloadUpdate(void *ptr, DownloadStatus status,
size_t total, size_t remaining);
- void setFieldsReadOnly(const bool readOnly);
+ void setFieldsReadOnly(bool readOnly);
TextField *mServerNameField;
TextField *mPortField;
@@ -151,6 +160,7 @@ class ServerDialog : public Window,
Button *mQuitButton;
Button *mConnectButton;
Button *mManualEntryButton;
+ Button *mDeleteButton;
ListBox *mServersList;
ServersListModel *mServersListModel;