summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 95d2512a1c..62bdbccbf4 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -412,14 +412,21 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
break;
- case HM_RECVEVENT:
- {
- ACKDATA *ack = (ACKDATA*)lParam;
- if (ack->hProcess != dat->fs) break;
- if (ack->type != ACKTYPE_FILE) break;
- if (ack->hContact != dat->hContact) break;
-
- SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDCANCEL, 0), (LPARAM)GetDlgItem(hwndDlg, IDCANCEL));
+ case HM_RECVEVENT:
+ {
+ ACKDATA *ack = (ACKDATA*)lParam;
+ if (ack->hProcess != dat->fs) break;
+ if (ack->type != ACKTYPE_FILE) break;
+ if (ack->hContact != dat->hContact) break;
+
+ if (ack->result == ACKRESULT_DENIED || ack->result == ACKRESULT_FAILED) {
+ EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FILEDIR), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FILEDIRBROWSE), FALSE);
+ SetDlgItemText(hwndDlg, IDC_MSG, TranslateT("This file transfer has been canceled by the other side"));
+ SkinPlaySound("FileDenied");
+ FlashWindow(hwndDlg, TRUE);
+ }
}
break;