summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/serverdialog.cpp4
-rw-r--r--src/net/serverinfo.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 6dae9ea9..91e5fdeb 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -298,11 +298,13 @@ void ServerDialog::action(const gcn::ActionEvent &event)
const ServerInfo &serverInfo = mServersListModel->getServer(index);
mServerInfo->hostname = serverInfo.hostname;
+ mServerInfo->name = serverInfo.name;
mServerInfo->port = serverInfo.port;
mServerInfo->type = serverInfo.type;
// Save the selected server
mServerInfo->save = true;
+ saveCustomServers(*mServerInfo);
chatLogger->setServerName(mServerInfo->hostname);
@@ -587,7 +589,7 @@ void ServerDialog::saveCustomServers(const ServerInfo &currentServer, int index)
break;
}
}
- mServers.insert(mServers.begin(), currentServer);
+ mServers.push_front(currentServer);
}
}
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index d60c16e1..0748430f 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -25,7 +25,7 @@
#include "utils/stringutils.h"
#include <string>
-#include <vector>
+#include <deque>
class ServerInfo
{
@@ -111,6 +111,6 @@ public:
}
};
-typedef std::vector<ServerInfo> ServerInfos;
+typedef std::deque<ServerInfo> ServerInfos;
#endif // SERVERINFO_H