summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 071b080a4..c8718127f 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -43,6 +43,7 @@
#include "gui/windows/buydialog.h"
#include "gui/windows/chatwindow.h"
#include "gui/windows/helpwindow.h"
+#include "gui/windows/okdialog.h"
#include "gui/windows/outfitwindow.h"
#include "gui/windows/shopwindow.h"
#include "gui/windows/socialwindow.h"
@@ -1324,20 +1325,26 @@ static int uploadUpdate(void *ptr,
UploadChatInfo *const info = reinterpret_cast<UploadChatInfo*>(ptr);
if (status == DownloadStatus::Complete)
{
- ChatTab *const tab = info->tab;
- if (chatWindow && (!tab || chatWindow->isTabPresent(tab)))
+ std::string str = Net::Download::getUploadResponse();
+ const size_t sz = str.size();
+ if (sz > 0)
{
- std::string str = Net::Download::getUploadResponse();
- const size_t sz = str.size();
- if (sz > 0)
+ if (str[sz - 1] == '\n')
+ str = str.substr(0, sz - 1);
+ str.append(info->addStr);
+ ChatTab *const tab = info->tab;
+ if (chatWindow && (!tab || chatWindow->isTabPresent(tab)))
{
- if (str[sz - 1] == '\n')
- str = str.substr(0, sz - 1);
- str.append(info->addStr);
str = strprintf("%s [@@%s |%s@@]",
info->text.c_str(), str.c_str(), str.c_str());
outStringNormal(tab, str, str);
}
+ else
+ {
+ // TRANSLATORS: file uploaded message
+ new OkDialog(_("File uploaded"), str,
+ DialogType::OK, true, false);
+ }
}
}
delete2(info->upload);