summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-09-13 19:15:59 +0000
committerfrosch <frosch@openttd.org>2009-09-13 19:15:59 +0000
commitebd916be3def20902cf19ffd16555074728eb9c3 (patch)
treec7748d7612a61b9558ffd10ffb176e34584f2376 /src/network
parent5de9cc46b50b8e677395543c10b26b59c860212b (diff)
downloadopenttd-ebd916be3def20902cf19ffd16555074728eb9c3.tar.xz
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.cpp4
-rw-r--r--src/network/network_client.cpp26
-rw-r--r--src/network/network_content_gui.cpp6
-rw-r--r--src/network/network_gui.cpp2
-rw-r--r--src/network/network_server.cpp2
5 files changed, 20 insertions, 20 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index e4e21f1d9..70bfb1678 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -441,7 +441,7 @@ static NetworkClientSocket *NetworkAllocClient(SOCKET s)
ci->client_playas = COMPANY_INACTIVE_CLIENT;
ci->join_date = _date;
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
}
return cs;
@@ -489,7 +489,7 @@ void NetworkCloseClient(NetworkClientSocket *cs, bool error)
if (cs->status >= STATUS_AUTH) _network_game_info.clients_on--;
_network_clients_connected--;
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
}
delete cs->GetInfo();
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 850619ec1..f1c7e7d1a 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -124,7 +124,7 @@ DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO)
*/
Packet *p;
_network_join_status = NETWORK_JOIN_STATUS_GETTING_COMPANY_INFO;
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
p = NetworkSend_Init(PACKET_CLIENT_COMPANY_INFO);
MY_CLIENT->Send_Packet(p);
@@ -145,7 +145,7 @@ DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_JOIN)
Packet *p;
_network_join_status = NETWORK_JOIN_STATUS_AUTHORIZING;
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
p = NetworkSend_Init(PACKET_CLIENT_JOIN);
p->Send_string(_openttd_revision);
@@ -399,7 +399,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_COMPANY_INFO)
p->Recv_string(company_info->clients, sizeof(company_info->clients));
- InvalidateWindow(WC_NETWORK_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_WINDOW, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -434,7 +434,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
ci->client_playas = playas;
strecpy(ci->client_name, name, lastof(ci->client_name));
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -446,7 +446,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
strecpy(ci->client_name, name, lastof(ci->client_name));
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -560,7 +560,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_WAIT)
{
_network_join_status = NETWORK_JOIN_STATUS_WAITING;
_network_join_waiting = p->Recv_uint8();
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
/* We are put on hold for receiving the map.. we need GUI for this ;) */
DEBUG(net, 1, "The server is currently busy sending the map to someone else, please wait..." );
@@ -601,7 +601,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
if (_network_join_bytes_total == 0) return NETWORK_RECV_STATUS_MALFORMED_PACKET;
_network_join_status = NETWORK_JOIN_STATUS_DOWNLOADING;
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
/* The first packet does not contain any more data */
return NETWORK_RECV_STATUS_OKAY;
@@ -615,7 +615,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
}
_network_join_bytes = ftell(file_pointer);
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
}
/* Check if this was the last packet */
@@ -623,7 +623,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
fclose(file_pointer);
_network_join_status = NETWORK_JOIN_STATUS_PROCESSING;
- InvalidateWindow(WC_NETWORK_STATUS_WINDOW, 0);
+ SetWindowDirty(WC_NETWORK_STATUS_WINDOW, 0);
/* The map is done downloading, load it */
if (!SafeSaveOrLoad("network_client.tmp", SL_LOAD, GM_NORMAL, AUTOSAVE_DIR)) {
@@ -775,7 +775,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_ERROR_QUIT)
delete ci;
}
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -794,7 +794,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_QUIT)
DEBUG(net, 0, "Unknown client (%d) is leaving the game", client_id);
}
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
/* If we come here it means we could not locate the client.. strange :s */
return NETWORK_RECV_STATUS_OKAY;
@@ -808,7 +808,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_JOIN)
if (ci != NULL)
NetworkTextMessage(NETWORK_ACTION_JOIN, CC_DEFAULT, false, ci->client_name);
- InvalidateWindow(WC_CLIENT_LIST, 0);
+ SetWindowDirty(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -881,7 +881,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CONFIG_UPDATE)
DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_COMPANY_UPDATE)
{
_network_company_passworded = p->Recv_uint16();
- InvalidateWindowClasses(WC_COMPANY);
+ SetWindowClassesDirty(WC_COMPANY);
return NETWORK_RECV_STATUS_OKAY;
}
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 562fdcea7..3838b186d 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -95,17 +95,17 @@ public:
case CONTENT_TYPE_AI:
case CONTENT_TYPE_AI_LIBRARY:
AI::Rescan();
- InvalidateWindowClasses(WC_AI_DEBUG);
+ SetWindowClassesDirty(WC_AI_DEBUG);
break;
case CONTENT_TYPE_BASE_GRAPHICS:
BaseGraphics::FindSets();
- InvalidateWindow(WC_GAME_OPTIONS, 0);
+ SetWindowDirty(WC_GAME_OPTIONS, 0);
break;
case CONTENT_TYPE_BASE_SOUNDS:
BaseSounds::FindSets();
- InvalidateWindow(WC_GAME_OPTIONS, 0);
+ SetWindowDirty(WC_GAME_OPTIONS, 0);
break;
case CONTENT_TYPE_NEWGRF:
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index eae555130..01679d829 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1203,7 +1203,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
strecpy(_settings_client.network.server_password, str, lastof(_settings_client.network.server_password));
} else {
int32 value = atoi(str);
- this->InvalidateWidget(this->widget_id);
+ this->SetWidgetDirty(this->widget_id);
switch (this->widget_id) {
default: NOT_REACHED();
case NSSW_CLIENTS_TXT: _settings_client.network.max_clients = Clamp(value, 2, MAX_CLIENTS); break;
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 33f7f4df9..4f867a401 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1733,7 +1733,7 @@ void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded)
if (NetworkCompanyIsPassworded(company_id) == passworded) return;
SB(_network_company_passworded, company_id, 1, !!passworded);
- InvalidateWindowClasses(WC_COMPANY);
+ SetWindowClassesDirty(WC_COMPANY);
NetworkClientSocket *cs;
FOR_ALL_CLIENT_SOCKETS(cs) {