diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-02 14:12:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-02 14:12:59 +0300 |
commit | ae93aa98b214f98a0e28df1bdaa8df18b3f6da02 (patch) | |
tree | 6856f13b902b45e8ea9971df1c380fc18793dfec /plugins/TabSRMM/src/msgdlgutils.cpp | |
parent | 2fccd1a7a6f642c30fc4cbd2281c6feba5f8d82d (diff) |
further SRMM window unification
- CSrmmBaseDialog received m_hContact as its common member;
- less usage of CTabBaseDlg::m_bType in tabSRMM
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index df8a2536e2..40224c9339 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -325,12 +325,10 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) db_unset(m_hContact, SRMSGMOD_T, "tabindex");
break;
case ID_TABMENU_LEAVECHATROOM:
- if (m_bType == SESSIONTYPE_CHAT) {
- if (si != NULL && m_hContact != NULL) {
- char *szProto = GetContactProto(m_hContact);
- if (szProto)
- CallProtoService(szProto, PS_LEAVECHAT, m_hContact, 0);
- }
+ if (m_bType == SESSIONTYPE_CHAT && m_hContact != NULL) {
+ char *szProto = GetContactProto(m_hContact);
+ if (szProto)
+ CallProtoService(szProto, PS_LEAVECHAT, m_hContact, 0);
}
return 1;
@@ -1705,47 +1703,6 @@ void CTabBaseDlg::KbdState(bool &isShift, bool &isControl, bool &isAlt) }
/////////////////////////////////////////////////////////////////////////////////////////
-// clear the message log
-// code needs to distuingish between IM and MUC sessions.
-
-void CTabBaseDlg::ClearLog()
-{
- if (m_bType == SESSIONTYPE_IM) {
- if (m_hwndIEView || m_hwndHPP) {
- IEVIEWEVENT event;
- event.cbSize = sizeof(IEVIEWEVENT);
- event.iType = IEE_CLEAR_LOG;
- event.dwFlags = (m_dwFlags & MWF_LOG_RTL) ? IEEF_RTL : 0;
- event.hContact = m_hContact;
- if (m_hwndIEView) {
- event.hwnd = m_hwndIEView;
- CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&event);
- }
- else {
- event.hwnd = m_hwndHPP;
- CallService(MS_HPP_EG_EVENT, 0, (LPARAM)&event);
- }
- }
- m_log.SetText(L"");
- m_hDbEventFirst = 0;
- }
- else if (m_bType == SESSIONTYPE_CHAT && si) {
- SESSION_INFO *s = pci->SM_FindSession(si->ptszID, si->pszModule);
- if (s) {
- m_log.SetText(L"");
- pci->LM_RemoveAll(&s->pLog, &s->pLogEnd);
- s->iEventCount = 0;
- s->LastTime = 0;
- si->iEventCount = 0;
- si->LastTime = 0;
- si->pLog = s->pLog;
- si->pLogEnd = s->pLogEnd;
- PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
- }
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
// calculate the minimum required client height for the given message
// window layout
//
|