summaryrefslogtreecommitdiff
path: root/src/network/network_content.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-05-17 15:46:38 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-05-29 21:08:25 +0200
commit5799402f7a4872d03809838dd7fa01db42bbd282 (patch)
tree6b54e235c14621035b4ec7923edb93980be5f056 /src/network/network_content.cpp
parent994bf19aef3dde6c9482434bdc51688f76a937ea (diff)
downloadopenttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/network/network_content.cpp')
-rw-r--r--src/network/network_content.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index e09b05ec7..f78a839b8 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -495,7 +495,7 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_CONTENT(Packet *p)
/* We have a file opened, thus are downloading internal content */
size_t toRead = p->RemainingBytesToTransfer();
if (toRead != 0 && (size_t)p->TransferOut(TransferOutFWrite, this->curFile) != toRead) {
- DeleteWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD);
+ CloseWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD);
ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, WL_ERROR);
this->CloseConnection();
fclose(this->curFile);
@@ -529,7 +529,7 @@ bool ClientNetworkContentSocketHandler::BeforeDownload()
std::string filename = GetFullFilename(this->curInfo, true);
if (filename.empty() || (this->curFile = fopen(filename.c_str(), "wb")) == nullptr) {
/* Unless that fails of course... */
- DeleteWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD);
+ CloseWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD);
ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, WL_ERROR);
return false;
}