diff options
author | Andreas Habel <mail@exceptionfault.de> | 2009-10-07 20:13:32 +0200 |
---|---|---|
committer | Andreas Habel <mail@exceptionfault.de> | 2009-10-07 20:13:32 +0200 |
commit | 55e37d20e1c8b6fecef5d4b52b8fce3a884bd0be (patch) | |
tree | 56706557444a3f528f5384f12e0fae8a819423b6 /src/gui/serverdialog.h | |
parent | aec05fc42775374a82800980ef41c7acc7dbac1e (diff) | |
download | mana-55e37d20e1c8b6fecef5d4b52b8fce3a884bd0be.tar.gz mana-55e37d20e1c8b6fecef5d4b52b8fce3a884bd0be.tar.bz2 mana-55e37d20e1c8b6fecef5d4b52b8fce3a884bd0be.tar.xz mana-55e37d20e1c8b6fecef5d4b52b8fce3a884bd0be.zip |
Added sorting to online serverlist by last usage and merge of local and
remotely listed servers.
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r-- | src/gui/serverdialog.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index e6e366b7..62275e6a 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -65,10 +65,26 @@ class ServersListModel : public gcn::ListModel void addElement(ServerInfo server); /** + * Add an Element at the end of the server list if it + * doesn't exist yet. Otherwise overwrite its properties + * in the list. + * + * @param server ServerInfo to merge into the list. + */ + void mergeElement(ServerInfo server); + + /** * Add an Element at the beginning of the server list */ void addFirstElement(ServerInfo server); + /** + * Returns wheter the given server is already in the list. + * @param server Server to search in the list. + * @return True, if the server is in the list, false otherwise. + */ + bool contains(ServerInfo server); + private: std::vector<ServerInfo> servers; }; @@ -106,6 +122,9 @@ class ServerDialog : public Window, void valueChanged(const gcn::SelectionEvent &event); private: + /** + * Called to load a list of available server from an online xml file. + */ void loadServerlist(); gcn::TextField *mServerNameField; |