summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/sendqueue.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-25 18:48:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-25 18:48:18 +0300
commit425b12911e11a8902d2f1963c2ac9c17a8904b30 (patch)
tree73f135ae8d471498517c3a6b8f305fa46aa5871e /plugins/Scriver/src/sendqueue.cpp
parentcd4e21415d7f87e9c749eeb7749b832cfb79b69d (diff)
Scriver: killing that old shit with error dialog
Diffstat (limited to 'plugins/Scriver/src/sendqueue.cpp')
-rw-r--r--plugins/Scriver/src/sendqueue.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp
index 576f7a9131..b4bbd3055f 100644
--- a/plugins/Scriver/src/sendqueue.cpp
+++ b/plugins/Scriver/src/sendqueue.cpp
@@ -26,11 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static MessageSendQueueItem *global_sendQueue = nullptr;
static mir_cs queueMutex;
-wchar_t* GetSendBufferMsg(MessageSendQueueItem *item)
-{
- return mir_utf8decodeW(item->sendBuffer);
-}
-
MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender)
{
MessageSendQueueItem *item = (MessageSendQueueItem*)mir_calloc(sizeof(MessageSendQueueItem));
@@ -103,13 +98,8 @@ void ReportSendQueueTimeouts(HWND hwndSender)
if (item->timeout >= timeout) {
if (item->hwndSender == hwndSender && item->hwndErrorDlg == nullptr) {
if (hwndSender != nullptr) {
- ErrorWindowData *ewd = (ErrorWindowData *)mir_alloc(sizeof(ErrorWindowData));
- ewd->szName = mir_wstrdup(pcli->pfnGetContactDisplayName(item->hContact, 0));
- ewd->szDescription = mir_wstrdup(TranslateT("The message send timed out."));
- ewd->szText = GetSendBufferMsg(item);
- ewd->hwndParent = hwndSender;
- ewd->queueItem = item;
- PostMessage(hwndSender, DM_SHOWERRORMESSAGE, 0, (LPARAM)ewd);
+ CErrorDlg *pDlg = new CErrorDlg(TranslateT("The message send timed out."), hwndSender, item);
+ PostMessage(hwndSender, DM_SHOWERRORMESSAGE, 0, (LPARAM)pDlg);
}
else {
/* TODO: Handle errors outside messaging window in a better way */