diff options
Diffstat (limited to 'src')
-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 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 3 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 3 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 10 |
7 files changed, 18 insertions, 34 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);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 1a41fffe6a..505eb60693 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -294,7 +294,7 @@ Netlib_NtlmCreateResponse @383 ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@AUTH_BLOB@DB@@QAEXI@Z @402 NONAME
-??0CSrmmBaseDialog@@IAE@AAVCMPluginBase@@HPAUSESSION_INFO@@@Z @403 NONAME
+??0CSrmmBaseDialog@@IAE@AAVCMPluginBase@@HI@Z @403 NONAME
Miranda_GetSystemWindow @404 NONAME
??1CSrmmBaseDialog@@UAE@XZ @405 NONAME
Srmm_FindDialog @406 NONAME
@@ -988,3 +988,4 @@ _Proto_CanDeleteHistory@8 @1124 NONAME ?DoRtfToTags@CSrmmBaseDialog@@IBE_NAAV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@@Z @1126 NONAME
?bUseGroup@Chat@@3V?$CMOption@_N@@A @1127 NONAME
?isCustom@EventInfo@DB@@QBE_NH@Z @1128 NONAME
+?InsertBbcodeString@CSrmmBaseDialog@@IAEXPB_W@Z @1129 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index b884360513..990714d090 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -294,7 +294,7 @@ Netlib_NtlmCreateResponse @383 ProtoGetAvatarFormatByMimeType @400
ProtoGetAvatarMimeType @401
?set_uin@AUTH_BLOB@DB@@QEAAXI@Z @402 NONAME
-??0CSrmmBaseDialog@@IEAA@AEAVCMPluginBase@@HPEAUSESSION_INFO@@@Z @403 NONAME
+??0CSrmmBaseDialog@@IEAA@AEAVCMPluginBase@@HI@Z @403 NONAME
Miranda_GetSystemWindow @404 NONAME
??1CSrmmBaseDialog@@UEAA@XZ @405 NONAME
Srmm_FindDialog @406 NONAME
@@ -988,3 +988,4 @@ Proto_CanDeleteHistory @1118 NONAME ?DoRtfToTags@CSrmmBaseDialog@@IEBA_NAEAV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@@Z @1120 NONAME
?bUseGroup@Chat@@3V?$CMOption@_N@@A @1121 NONAME
?isCustom@EventInfo@DB@@QEBA_NH@Z @1122 NONAME
+?InsertBbcodeString@CSrmmBaseDialog@@IEAAXPEB_W@Z @1123 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 86236254aa..9495a98690 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "chat.h"
#include "skin.h"
-CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_INFO *si) :
+CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, MCONTACT hContact) :
CDlgBase(pPlugin, idDialog),
timerFlash(this, 1),
timerType(this, 2),
@@ -52,8 +52,8 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN m_Quote(this, IDC_SRMM_QUOTE),
m_btnCloseQuote(this, IDC_SRMM_CLOSEQUOTE, SKINICON_OTHER_DELETE, LPGEN("Remove quoting")),
- m_si(si),
- m_hContact(0),
+ m_si(0),
+ m_hContact(hContact),
m_clrInputBG(GetSysColor(COLOR_WINDOW))
{
m_btnColor.OnClick = Callback(this, &CSrmmBaseDialog::onClick_Color);
@@ -70,8 +70,8 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN timerRedraw.OnEvent = Callback(this, &CSrmmBaseDialog::OnRedrawTimer);
- if (si) {
- m_hContact = si->hContact;
+ if (Contact::IsGroupChat(hContact)) {
+ m_si = Chat_Find(hContact);
m_iFG = 4;
m_iBG = 2;
|