diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-01 14:49:06 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-01 14:49:06 +0300 |
commit | 53221d7d7853d463f5703c8b1d95447f501c834d (patch) | |
tree | 74554b127c79143b8c361f3d77cc7707c054b08c /plugins/TabSRMM/src/msgdialog.cpp | |
parent | c5866000711953d0b970c6fe649dab811ba00e4b (diff) |
tabSRMM: time to get rid of the second CMsgDialog constructor
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index b76cb19c9d..f21c2431ce 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -330,35 +330,21 @@ CMsgDialog::CMsgDialog(int iDlgId, MCONTACT hContact) : {
m_hContact = hContact;
- m_btnAdd.OnClick = Callback(this, &CMsgDialog::onClick_Add);
m_btnQuote.OnClick = Callback(this, &CMsgDialog::onClick_Quote);
- m_btnCancelAdd.OnClick = Callback(this, &CMsgDialog::onClick_CancelAdd);
- Init();
-}
-
-CMsgDialog::CMsgDialog(SESSION_INFO *si) :
- CSuper(g_plugin, IDD_CHANNEL, si),
- m_pPanel(this),
- timerAwayMsg(this, 100),
- m_btnAdd(this, IDC_ADD),
- m_btnQuote(this, IDC_QUOTE),
- m_btnCancelAdd(this, IDC_CANCELADD),
- m_btnStrikeout(this, IDC_FONTSTRIKEOUT)
-{
- m_hContact = si->hContact;
-
- m_btnQuote.OnClick = Callback(this, &CMsgDialog::onClick_Quote);
- m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
- m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowNickList);
+ if (Contact::IsGroupChat(hContact)) {
+ m_si = Chat_Find(hContact);
- m_nickList.OnDblClick = Callback(this, &CMsgDialog::onDblClick_List);
+ m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
+ m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowNickList);
- Init();
-}
+ m_nickList.OnDblClick = Callback(this, &CMsgDialog::onDblClick_List);
+ }
+ else {
+ m_btnAdd.OnClick = Callback(this, &CMsgDialog::onClick_Add);
+ m_btnCancelAdd.OnClick = Callback(this, &CMsgDialog::onClick_CancelAdd);
+ }
-void CMsgDialog::Init()
-{
GetSendFormat();
m_szProto = Proto_GetBaseAccountName(m_hContact);
|