summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-28 15:24:46 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-28 15:55:39 -0700
commite933e3a1c5bd2af8acb62f8f85750638262a4eef (patch)
tree4680169d72279a22e9d0d16cabef5b155682c0e9 /src/gui/serverdialog.h
parent802bb1289f25be47d1897fe05871b561f82f9498 (diff)
downloadmana-e933e3a1c5bd2af8acb62f8f85750638262a4eef.tar.gz
mana-e933e3a1c5bd2af8acb62f8f85750638262a4eef.tar.bz2
mana-e933e3a1c5bd2af8acb62f8f85750638262a4eef.tar.xz
mana-e933e3a1c5bd2af8acb62f8f85750638262a4eef.zip
Add delete button to ServerDialog and only save saved servers
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index ad745187..6a7091c2 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -68,18 +68,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
@@ -151,6 +157,7 @@ class ServerDialog : public Window,
Button *mQuitButton;
Button *mConnectButton;
Button *mManualEntryButton;
+ Button *mDeleteButton;
ListBox *mServersList;
ServersListModel *mServersListModel;