summaryrefslogtreecommitdiff
path: root/src/gui/serverdialog.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-05 15:00:58 +0300
commit9a3a196dbf633a699c26d0227802a42f025c8bfd (patch)
treedfbdb2ff1e2c54d75a2bf6411d3f70df22518c28 /src/gui/serverdialog.h
parentfc17ff22d9df50df9c5d1cf3dc0de358001271ed (diff)
parentece36a40d4e9a838cde01075d7681b8fc517b19f (diff)
downloadmv-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.gz
mv-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.bz2
mv-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.xz
mv-9a3a196dbf633a699c26d0227802a42f025c8bfd.zip
Merge branch 'master' into stripped
Conflicts: src/guichan/gui.cpp src/guichan/include/guichan/sdl/sdlpixel.hpp
Diffstat (limited to 'src/gui/serverdialog.h')
-rw-r--r--src/gui/serverdialog.h42
1 files changed, 9 insertions, 33 deletions
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index d2fe0d25b..c23fb8776 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -83,30 +83,6 @@ class ServersListModel : public gcn::ListModel
ServerDialog *mParent;
};
-/**
- * Server Type List Model
- */
-class TypeListModel : public gcn::ListModel
-{
- public:
- TypeListModel() {}
-
- /**
- * Used to get number of line in the list
- */
- int getNumberOfElements()
-#ifdef MANASERV_SUPPORT
- { return 3; }
-#else
- { return 2; }
-#endif
-
- /**
- * Used to get an element from the list
- */
- std::string getElementAt(int elementIndex);
-};
-
/**
* The server choice dialog.
@@ -147,12 +123,17 @@ class ServerDialog : public Window,
void logic();
+ void updateServer(ServerInfo server, int index);
+
protected:
friend class ServersListModel;
+
MutexLocker lock()
{ return MutexLocker(&mMutex); }
private:
+ friend class EditServerDialog;
+
/**
* Called to load a list of available server from an online xml file.
*/
@@ -160,28 +141,23 @@ class ServerDialog : public Window,
void loadServers(bool addNew = true);
void loadCustomServers();
- void saveCustomServers(const ServerInfo &currentServer = ServerInfo());
+ void saveCustomServers(const ServerInfo &currentServer = ServerInfo(),
+ int index = -1);
static int downloadUpdate(void *ptr, DownloadStatus status,
size_t total, size_t remaining);
- void setFieldsReadOnly(bool readOnly);
-
- TextField *mServerNameField;
- TextField *mPortField;
Label *mDescription;
Button *mQuitButton;
Button *mConnectButton;
- Button *mManualEntryButton;
+ Button *mAddEntryButton;
+ Button *mEditEntryButton;
Button *mDeleteButton;
Button *mLoadButton;
ListBox *mServersList;
ServersListModel *mServersListModel;
- DropDown *mTypeField;
- TypeListModel *mTypeListModel;
-
const std::string &mDir;
enum ServerDialogDownloadStatus