summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp34
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);