summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mir_app/res/resource.rc5
-rw-r--r--src/mir_app/src/filexferdlg.cpp35
-rw-r--r--src/mir_app/src/resource.h1
3 files changed, 8 insertions, 33 deletions
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index 1b761116bd..fd51407196 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -1066,9 +1066,8 @@ BEGIN
ICON "",IDC_FILEICON,25,15,16,14,SS_CENTERIMAGE | SS_REALSIZEIMAGE
CONTROL "Transfer completed, open file(s).",IDC_TRANSFERCOMPLETED,
"Hyperlink",NOT WS_VISIBLE | WS_TABSTOP,42,17,173,10
- LTEXT "No data transferred",IDC_ALLTRANSFERRED,25,29,230,14,SS_NOPREFIX | SS_CENTERIMAGE
- RTEXT "",IDC_ALLSPEED,252,29,3,14,SS_NOPREFIX | SS_CENTERIMAGE
- LTEXT "",IDC_ALLPRECENTS,218,14,33,14,SS_CENTERIMAGE
+ LTEXT "No data transferred",IDC_ALLTRANSFERRED,25,29,130,14,SS_NOPREFIX | SS_CENTERIMAGE
+ RTEXT "",IDC_ALLSPEED,152,29,103,14,SS_NOPREFIX | SS_CENTERIMAGE
CONTROL "",IDC_FRAME,"Static",SS_ETCHEDHORZ,1,43,254,1
END
diff --git a/src/mir_app/src/filexferdlg.cpp b/src/mir_app/src/filexferdlg.cpp
index 1abb90673d..e02aeaacde 100644
--- a/src/mir_app/src/filexferdlg.cpp
+++ b/src/mir_app/src/filexferdlg.cpp
@@ -135,54 +135,31 @@ static void SetFtStatus(HWND hwndDlg, wchar_t *text, int mode)
static void HideProgressControls(HWND hwndDlg)
{
- RECT rc;
char buf[64];
-
- GetWindowRect(GetDlgItem(hwndDlg, IDC_ALLPRECENTS), &rc);
- MapWindowPoints(nullptr, hwndDlg, (LPPOINT)&rc, 2);
- SetWindowPos(hwndDlg, nullptr, 0, 0, 100, rc.bottom + 3, SWP_NOMOVE | SWP_NOZORDER);
- ShowWindow(GetDlgItem(hwndDlg, IDC_ALLTRANSFERRED), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_ALLSPEED), SW_HIDE);
-
_strtime(buf);
- SetDlgItemTextA(hwndDlg, IDC_ALLPRECENTS, buf);
+ SetDlgItemTextA(hwndDlg, IDC_ALLSPEED, buf);
PostMessage(GetParent(hwndDlg), WM_FT_RESIZE, 0, (LPARAM)hwndDlg);
}
-static int FileTransferDlgResizer(HWND, LPARAM param, UTILRESIZECONTROL *urc)
+static int FileTransferDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc)
{
- auto *dat = (FileDlgData *)param;
-
switch (urc->wId) {
case IDC_CONTACTNAME:
case IDC_STATUS:
+ case IDC_ALLTRANSFERRED:
case IDC_ALLFILESPROGRESS:
case IDC_TRANSFERCOMPLETED:
return RD_ANCHORX_WIDTH | RD_ANCHORY_TOP;
case IDC_FRAME:
return RD_ANCHORX_WIDTH | RD_ANCHORY_BOTTOM;
- case IDC_ALLPRECENTS:
+
case IDCANCEL:
+ case IDC_ALLSPEED:
case IDC_OPENFILE:
case IDC_OPENFOLDER:
return RD_ANCHORX_RIGHT | RD_ANCHORY_TOP;
-
- case IDC_ALLTRANSFERRED:
- if (dat->waitingForAcceptance)
- return RD_ANCHORX_WIDTH | RD_ANCHORY_TOP;
-
- urc->rcItem.right = urc->rcItem.left + (urc->rcItem.right - urc->rcItem.left - urc->dlgOriginalSize.cx + urc->dlgNewSize.cx) / 3;
- return RD_ANCHORX_CUSTOM | RD_ANCHORY_TOP;
-
- case IDC_ALLSPEED:
- if (dat->waitingForAcceptance)
- return RD_ANCHORX_RIGHT | RD_ANCHORY_TOP;
-
- urc->rcItem.right = urc->rcItem.right - urc->dlgOriginalSize.cx + urc->dlgNewSize.cx;
- urc->rcItem.left = urc->rcItem.left + (urc->rcItem.right - urc->rcItem.left) / 3;
- return RD_ANCHORX_CUSTOM | RD_ANCHORY_TOP;
}
return RD_ANCHORX_LEFT | RD_ANCHORY_TOP;
}
@@ -550,7 +527,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (lastPos != nextPos || firstTime) {
SendDlgItemMessage(hwndDlg, IDC_ALLFILESPROGRESS, PBM_SETPOS, nextPos, 0);
mir_snwprintf(str, L"%u%%", nextPos);
- SetDlgItemText(hwndDlg, IDC_ALLPRECENTS, str);
+ SetDlgItemText(hwndDlg, IDC_ALLSPEED, str);
}
int units;
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index d5e1b418f0..6151d191c1 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -574,7 +574,6 @@
#define IDC_TXT_INFO 1722
#define IDC_CONTACTNAME 1724
#define IDC_FRAME 1725
-#define IDC_ALLPRECENTS 1727
#define IDC_ENABLE_KEYWORDFILTERING 1729
#define IDC_BKGCOLOUR_STATIC 1730
#define IDC_LST_ERRORS 1731