diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-30 16:16:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-30 16:16:22 +0300 |
commit | f1c1e760bed3593799a48e0b2ca12b5cbed3ba47 (patch) | |
tree | 0b48326d9b1eb08569d8ab3c440df2888104aa3e | |
parent | e743df09941ad6cf44c81b2bcfbc3396f0fc349c (diff) |
void CMsgDialog::SetButtonsPos(): useless parameter bIsChat removed
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 10 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 3 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 5cfc8af0e2..8578ea4b2b 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -588,7 +588,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break;
case WM_CBD_UPDATED:
- SetButtonsPos(m_hwnd, false);
+ SetButtonsPos();
break;
case WM_CTLCOLORLISTBOX:
@@ -622,7 +622,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) }
CSuper::DlgProc(uMsg, wParam, lParam); // call built-in resizer
- SetButtonsPos(m_hwnd, isChat());
+ SetButtonsPos();
m_pLog->Resize();
InvalidateRect(m_pOwner->m_hwndStatus, nullptr, true);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index fbe29a10b3..a0fb9d874f 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -397,23 +397,23 @@ int RegisterToolbarIcons(WPARAM, LPARAM) return 0;
}
-void SetButtonsPos(HWND hwndDlg, bool bIsChat)
+void CMsgDialog::SetButtonsPos()
{
HDWP hdwp = BeginDeferWindowPos(Srmm_GetButtonCount());
int yPos;
RECT rc;
- GetWindowRect(GetDlgItem(hwndDlg, IDC_SPLITTERY), &rc);
+ GetWindowRect(GetDlgItem(m_hwnd, IDC_SPLITTERY), &rc);
POINT pt = { 0, rc.top };
- ScreenToClient(hwndDlg, &pt);
+ ScreenToClient(m_hwnd, &pt);
yPos = pt.y;
- GetClientRect(hwndDlg, &rc);
+ GetClientRect(m_hwnd, &rc);
int iLeftX = 2, iRightX = rc.right - 2, iGap = Srmm_GetButtonGap();
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
- HWND hwndButton = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
+ HWND hwndButton = GetDlgItem(m_hwnd, cbd->m_dwButtonCID);
if (hwndButton == nullptr || cbd->m_bHidden)
continue;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index cabd2ac248..d9bc5f78dc 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -57,6 +57,7 @@ class CMsgDialog : public CSrmmBaseDialog void Init(void);
void NotifyTyping(int mode);
+ void SetButtonsPos(void);
void ShowAvatar(void);
void ShowTime(bool bForce);
void SetupStatusBar(void);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 00fe48a237..a42feafac9 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -221,7 +221,4 @@ SESSION_INFO* SM_GetNextWindow(SESSION_INFO *si); // options.cpp
void AddIcons(void);
-// tools.cpp
-void SetButtonsPos(HWND hwndDlg, bool bIsChat);
-
#pragma comment(lib,"comctl32.lib")
|