diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-04 18:58:01 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-04 18:58:01 +0300 |
commit | fb8111c474a8e393e885707eb9796195a2e5a1c6 (patch) | |
tree | 8eac26e1f9abc5b0e7ff1604398478120517e8c7 /src/core | |
parent | ac9b7f8cae2299f38187a5d239658cc9c2b8ef96 (diff) |
SRMM: total constructors' unification, also fixes #4715 (no nicklist in tabSRMM)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 30 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 2 |
4 files changed, 9 insertions, 27 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 4220c9647e..c81f38912f 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -148,7 +148,7 @@ static void ShowRoom(SESSION_INFO *si) if (g_Settings.bTabsEnable)
pContainer->AddPage(si);
else {
- CMsgDialog *pDlg = pContainer->m_pEmbed = new CMsgDialog(pContainer, si);
+ CMsgDialog *pDlg = pContainer->m_pEmbed = new CMsgDialog(pContainer, si->hContact);
pContainer->Create();
pDlg->SetParent(pContainer->GetHwnd());
pDlg->Create();
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index a9a7b46e66..3a41cf431d 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -36,37 +36,21 @@ LIST<CMsgDialog> g_arDialogs(10, PtrKeySortT); /////////////////////////////////////////////////////////////////////////////////////////
CMsgDialog::CMsgDialog(CTabbedWindow *pOwner, MCONTACT hContact) :
- CSuper(g_plugin, IDD_MSG),
+ CSuper(g_plugin, IDD_MSG, hContact),
m_avatar(this, IDC_AVATAR),
m_splitterX(this, IDC_SPLITTERX),
m_splitterY(this, IDC_SPLITTERY),
m_cmdList(20),
m_pOwner(pOwner)
{
- m_hContact = hContact;
- Init();
-}
-
-CMsgDialog::CMsgDialog(CTabbedWindow *pOwner, SESSION_INFO *si) :
- CSuper(g_plugin, IDD_MSG, si),
- m_avatar(this, IDC_AVATAR),
- m_splitterX(this, IDC_SPLITTERX),
- m_splitterY(this, IDC_SPLITTERY),
- m_cmdList(20),
- m_pOwner(pOwner)
-{
- m_iSplitterX = g_Settings.iSplitterX;
-
- m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
- m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_NickList);
-
- m_splitterX.OnChange = Callback(this, &CMsgDialog::onSplitterX);
+ if (isChat()) {
+ m_iSplitterX = g_Settings.iSplitterX;
+ m_splitterX.OnChange = Callback(this, &CMsgDialog::onSplitterX);
- Init();
-}
+ m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
+ m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_NickList);
+ }
-void CMsgDialog::Init()
-{
m_szTabSave[0] = 0;
m_autoClose = 0;
m_forceResizable = true;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 440d13f7b4..dba435e123 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -36,7 +36,6 @@ class CMsgDialog : public CSrmmBaseDialog friend class CTabbedWindow;
typedef CSrmmBaseDialog CSuper;
- void Init(void);
void NotifyTyping(int mode);
void SetButtonsPos(void);
void ShowTime(bool bForce);
@@ -84,7 +83,6 @@ class CMsgDialog : public CSrmmBaseDialog public:
CMsgDialog(CTabbedWindow *pOwner, MCONTACT hContact);
- CMsgDialog(CTabbedWindow *pOwner, SESSION_INFO *si);
bool OnInitDialog() override;
void OnDestroy() override;
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 57974adff4..7bff44a661 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -266,7 +266,7 @@ void CTabbedWindow::AddPage(SESSION_INFO *si, int insertAt) if (!IsWindowVisible(m_hwnd))
Show(SW_SHOW);
- CMsgDialog *pDlg = new CMsgDialog(this, si);
+ CMsgDialog *pDlg = new CMsgDialog(this, si->hContact);
pDlg->SetParent(m_hwnd);
m_tab.AddPage(szTemp, nullptr, pDlg);
m_tab.ActivatePage(m_tab.GetCount() - 1);
|