summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-14 22:50:26 +0000
committerfrosch <frosch@openttd.org>2012-11-14 22:50:26 +0000
commit6e6d94a2d14a50ad93577a4b030f25f8b64986b1 (patch)
tree17083b427a8977d182654b30e59c59a368a7856f /src/network
parent6653ac6b362cf88a6b77a4e8dd3c6926885c6b5f (diff)
downloadopenttd-6e6d94a2d14a50ad93577a4b030f25f8b64986b1.tar.xz
(svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_chat_gui.cpp2
-rw-r--r--src/network/network_content_gui.cpp2
-rw-r--r--src/network/network_gui.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index d3caed015..36eb9a68d 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -383,7 +383,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
void ChatTabCompletion()
{
static char _chat_tab_completion_buf[NETWORK_CHAT_LENGTH];
- assert(this->edit_str_size == lengthof(_chat_tab_completion_buf));
+ assert(this->text.max_bytes == lengthof(_chat_tab_completion_buf));
Textbuf *tb = &this->text;
size_t len, tb_len;
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 5aa4818f5..2e68c540c 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -780,7 +780,7 @@ public:
virtual void OnEditboxChanged(int wid)
{
if (wid == WID_NCL_FILTER) {
- this->string_filter.SetFilterTerm(this->edit_str_buf);
+ this->string_filter.SetFilterTerm(this->text.buf);
this->content.SetFilterState(!this->string_filter.IsEmpty());
this->content.ForceRebuild();
this->InvalidateData();
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index b5e48c4b0..8daf7c93e 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -850,8 +850,8 @@ public:
{
if (wid == WID_NG_CLIENT) {
/* The name is only allowed when it starts with a letter! */
- if (!StrEmpty(this->edit_str_buf) && this->edit_str_buf[0] != ' ') {
- strecpy(_settings_client.network.client_name, this->edit_str_buf, lastof(_settings_client.network.client_name));
+ if (!StrEmpty(this->text.buf) && this->text.buf[0] != ' ') {
+ strecpy(_settings_client.network.client_name, this->text.buf, lastof(_settings_client.network.client_name));
} else {
strecpy(_settings_client.network.client_name, "Player", lastof(_settings_client.network.client_name));
}
@@ -2116,10 +2116,10 @@ struct NetworkCompanyPasswordWindow : public QueryStringBaseWindow {
void OnOk()
{
if (this->IsWidgetLowered(WID_NCP_SAVE_AS_DEFAULT_PASSWORD)) {
- snprintf(_settings_client.network.default_company_pass, lengthof(_settings_client.network.default_company_pass), "%s", this->edit_str_buf);
+ strecpy(_settings_client.network.default_company_pass, this->text.buf, lastof(_settings_client.network.default_company_pass));
}
- NetworkChangeCompanyPassword(_local_company, this->edit_str_buf);
+ NetworkChangeCompanyPassword(_local_company, this->text.buf);
}
virtual void OnClick(Point pt, int widget, int click_count)