summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-03 22:59:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-03 22:59:13 +0300
commit5d160367492834e0397808a12b8755ceb8cbed12 (patch)
treeaa858c8d270bc10cd0365fec2813d9b8bc637ae8
parent6fbc81e2ceefe04b2ac05b2ecadd74ec7575090b (diff)
CChatRoomDlg globally renamed to CMsgDialog to be conpatible with StdMsg
-rw-r--r--include/m_chat_int.h4
-rw-r--r--plugins/Scriver/src/chat_log.cpp2
-rw-r--r--plugins/Scriver/src/chat_window.cpp68
-rw-r--r--plugins/Scriver/src/msgs.h4
-rw-r--r--plugins/TabSRMM/src/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat_log.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp68
-rw-r--r--plugins/TabSRMM/src/msgs.h4
-rw-r--r--protocols/Discord/src/guilds.cpp4
-rw-r--r--src/mir_app/src/chat.h4
-rw-r--r--src/mir_app/src/srmm_base.cpp8
12 files changed, 87 insertions, 85 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index 586972536e..924d42d3e2 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -81,7 +81,7 @@ struct SESSION_INFO;
struct MODULEINFO;
struct LOGSTREAMDATA;
-class CChatRoomDlg;
+class CMsgDialog;
struct USERINFO : public MZeroedObject, public MNonCopyable
{
@@ -172,7 +172,7 @@ struct MIR_APP_EXPORT GCSessionInfoBase : public MZeroedObject, public MNonCopya
int currentHovered;
- CChatRoomDlg *pDlg;
+ CMsgDialog *pDlg;
COMMANDINFO *lpCommands, *lpCurrentCommand;
LOGINFO *pLog, *pLogEnd;
USERINFO *pMe;
diff --git a/plugins/Scriver/src/chat_log.cpp b/plugins/Scriver/src/chat_log.cpp
index 34ca7d665f..5ad2e75b1a 100644
--- a/plugins/Scriver/src/chat_log.cpp
+++ b/plugins/Scriver/src/chat_log.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EM_GETSCROLLPOS (WM_USER+221)
#endif
-void CChatRoomDlg::StreamInEvents(LOGINFO* lin, bool bRedraw)
+void CMsgDialog::StreamInEvents(LOGINFO* lin, bool bRedraw)
{
if (m_hwnd == nullptr || lin == nullptr || m_si == nullptr)
return;
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp
index a777c11625..1e61766683 100644
--- a/plugins/Scriver/src/chat_window.cpp
+++ b/plugins/Scriver/src/chat_window.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-void CChatRoomDlg::TabAutoComplete()
+void CMsgDialog::TabAutoComplete()
{
LRESULT lResult = (LRESULT)m_message.SendMsg(EM_GETSEL, 0, 0);
int start = LOWORD(lResult), end = HIWORD(lResult);
@@ -111,7 +111,7 @@ LBL_SkipEnd:
}
}
-void CChatRoomDlg::FixTabIcons()
+void CMsgDialog::FixTabIcons()
{
HICON hIcon;
if (!(m_si->wState & GC_EVENT_HIGHLIGHT)) {
@@ -130,7 +130,7 @@ void CChatRoomDlg::FixTabIcons()
/////////////////////////////////////////////////////////////////////////////////////////
-void CChatRoomDlg::MessageDialogResize(int w, int h)
+void CMsgDialog::MessageDialogResize(int w, int h)
{
bool bNick = m_si->iType != GCW_SERVER && m_bNicklistEnabled;
bool bToolbar = SendMessage(m_hwndParent, CM_GETTOOLBARSTATUS, 0, 0) != 0;
@@ -191,23 +191,23 @@ void CChatRoomDlg::MessageDialogResize(int w, int h)
RedrawWindow(m_message.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
}
-CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si)
+CMsgDialog::CMsgDialog(SESSION_INFO *si)
: CScriverWindow(IDD_CHANNEL, si),
m_splitterX(this, IDC_SPLITTERX),
m_splitterY(this, IDC_SPLITTERY),
m_btnOk(this, IDOK)
{
- m_btnOk.OnClick = Callback(this, &CChatRoomDlg::onClick_Ok);
- m_btnFilter.OnClick = Callback(this, &CChatRoomDlg::onClick_Filter);
- m_btnNickList.OnClick = Callback(this, &CChatRoomDlg::onClick_ShowList);
+ m_btnOk.OnClick = Callback(this, &CMsgDialog::onClick_Ok);
+ m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
+ m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowList);
- m_message.OnChange = Callback(this, &CChatRoomDlg::onChange_Message);
+ m_message.OnChange = Callback(this, &CMsgDialog::onChange_Message);
- m_splitterX.OnChange = Callback(this, &CChatRoomDlg::OnSplitterX);
- m_splitterY.OnChange = Callback(this, &CChatRoomDlg::OnSplitterY);
+ m_splitterX.OnChange = Callback(this, &CMsgDialog::OnSplitterX);
+ m_splitterY.OnChange = Callback(this, &CMsgDialog::OnSplitterY);
}
-bool CChatRoomDlg::OnInitDialog()
+bool CMsgDialog::OnInitDialog()
{
CSuper::OnInitDialog();
m_si->pDlg = this;
@@ -268,7 +268,7 @@ bool CChatRoomDlg::OnInitDialog()
return true;
}
-void CChatRoomDlg::OnDestroy()
+void CMsgDialog::OnDestroy()
{
NotifyEvent(MSG_WINDOW_EVT_CLOSING);
@@ -288,7 +288,7 @@ void CChatRoomDlg::OnDestroy()
CSuper::OnDestroy();
}
-void CChatRoomDlg::OnSplitterX(CSplitter *pSplitter)
+void CMsgDialog::OnSplitterX(CSplitter *pSplitter)
{
RECT rc;
GetClientRect(m_hwnd, &rc);
@@ -300,14 +300,14 @@ void CChatRoomDlg::OnSplitterX(CSplitter *pSplitter)
m_pParent->iSplitterX = rc.right - rc.left - 35;
}
-void CChatRoomDlg::OnSplitterY(CSplitter *pSplitter)
+void CMsgDialog::OnSplitterY(CSplitter *pSplitter)
{
RECT rc;
GetClientRect(m_hwnd, &rc);
m_pParent->iSplitterY = rc.bottom - pSplitter->GetPos();
}
-void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton)
+void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
{
if (!pButton->Enabled())
return;
@@ -342,7 +342,7 @@ void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton)
SetFocus(m_message.GetHwnd());
}
-void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton)
+void CMsgDialog::onClick_ShowList(CCtrlButton *pButton)
{
if (!pButton->Enabled() || m_si->iType == GCW_SERVER)
return;
@@ -353,7 +353,7 @@ void CChatRoomDlg::onClick_ShowList(CCtrlButton *pButton)
Resize();
}
-void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
+void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
{
if (!pButton->Enabled())
return;
@@ -366,7 +366,7 @@ void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
RedrawLog();
}
-void CChatRoomDlg::onChange_Message(CCtrlEdit*)
+void CMsgDialog::onChange_Message(CCtrlEdit*)
{
cmdListCurrent = nullptr;
m_btnOk.Enable(m_message.GetRichTextLength() != 0);
@@ -383,7 +383,7 @@ static void __cdecl phase2(SESSION_INFO *si)
si->pDlg->RedrawLog2();
}
-void CChatRoomDlg::RedrawLog()
+void CMsgDialog::RedrawLog()
{
m_si->LastTime = 0;
if (m_si->pLog) {
@@ -406,7 +406,7 @@ void CChatRoomDlg::RedrawLog()
else ClearLog();
}
-void CChatRoomDlg::ScrollToBottom()
+void CMsgDialog::ScrollToBottom()
{
if (GetWindowLongPtr(m_log.GetHwnd(), GWL_STYLE) & WS_VSCROLL) {
SCROLLINFO si = { sizeof(si) };
@@ -421,7 +421,7 @@ void CChatRoomDlg::ScrollToBottom()
}
}
-void CChatRoomDlg::ShowFilterMenu()
+void CMsgDialog::ShowFilterMenu()
{
HWND hwnd = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_FILTER), m_hwnd, FilterWndProc, (LPARAM)this);
TranslateDialogDefault(hwnd);
@@ -431,7 +431,7 @@ void CChatRoomDlg::ShowFilterMenu()
SetWindowPos(hwnd, HWND_TOP, rc.left - 85, (IsWindowVisible(m_btnFilter.GetHwnd()) || IsWindowVisible(m_btnBold.GetHwnd())) ? rc.top - 206 : rc.top - 186, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
}
-void CChatRoomDlg::UpdateNickList()
+void CMsgDialog::UpdateNickList()
{
m_nickList.SendMsg(WM_SETREDRAW, FALSE, 0);
m_nickList.SendMsg(LB_RESETCONTENT, 0, 0);
@@ -450,7 +450,7 @@ void CChatRoomDlg::UpdateNickList()
UpdateTitle();
}
-void CChatRoomDlg::UpdateOptions()
+void CMsgDialog::UpdateOptions()
{
m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2));
m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER : IDI_FILTER2));
@@ -500,7 +500,7 @@ void CChatRoomDlg::UpdateOptions()
RedrawLog2();
}
-void CChatRoomDlg::UpdateStatusBar()
+void CMsgDialog::UpdateStatusBar()
{
wchar_t szTemp[512];
mir_snwprintf(szTemp, L"%s : %s", m_si->pMI->ptszModDispName, m_si->ptszStatusbarText ? m_si->ptszStatusbarText : L"");
@@ -520,7 +520,7 @@ void CChatRoomDlg::UpdateStatusBar()
Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 0, 0);
}
-void CChatRoomDlg::UpdateTitle()
+void CMsgDialog::UpdateTitle()
{
TitleBarData tbd = {};
tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? m_si->pMI->hOnlineIcon : m_si->pMI->hOfflineIcon;
@@ -553,12 +553,12 @@ void CChatRoomDlg::UpdateTitle()
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR CALLBACK CChatRoomDlg::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- static CChatRoomDlg *pDlg = nullptr;
+ static CMsgDialog *pDlg = nullptr;
switch (uMsg) {
case WM_INITDIALOG:
- pDlg = (CChatRoomDlg*)lParam;
+ pDlg = (CMsgDialog*)lParam;
CheckDlgButton(hwndDlg, IDC_CHAT_1, pDlg->m_iLogFilterFlags & GC_EVENT_ACTION ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHAT_2, pDlg->m_iLogFilterFlags & GC_EVENT_MESSAGE ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHAT_3, pDlg->m_iLogFilterFlags & GC_EVENT_NICK ? BST_CHECKED : BST_UNCHECKED);
@@ -625,7 +625,7 @@ INT_PTR CALLBACK CChatRoomDlg::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPa
/////////////////////////////////////////////////////////////////////////////////////////
-LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
{
bool isShift = (GetKeyState(VK_SHIFT) & 0x8000) != 0;
bool isCtrl = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
@@ -736,7 +736,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
{
int result = InputAreaShortcuts(m_log.GetHwnd(), msg, wParam, lParam);
if (result != -1)
@@ -768,7 +768,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-LRESULT CChatRoomDlg::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
{
int result = InputAreaShortcuts(m_nickList.GetHwnd(), msg, wParam, lParam);
if (result != -1)
@@ -854,7 +854,7 @@ LRESULT CChatRoomDlg::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
RECT rc;
POINT pt;
@@ -1066,11 +1066,11 @@ void ShowRoom(SESSION_INFO *si)
return;
// Do we need to create a window?
- CChatRoomDlg *pDlg;
+ CMsgDialog *pDlg;
if (si->pDlg == nullptr) {
HWND hParent = GetParentWindow(si->hContact, true);
- pDlg = new CChatRoomDlg(si);
+ pDlg = new CMsgDialog(si);
pDlg->SetParent(hParent);
pDlg->Show();
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 6ae26e8c65..18f8957ecd 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -184,7 +184,7 @@ public:
void onChanged_Splitter(CSplitter*);
};
-class CChatRoomDlg : public CScriverWindow
+class CMsgDialog : public CScriverWindow
{
typedef CScriverWindow CSuper;
@@ -205,7 +205,7 @@ class CChatRoomDlg : public CScriverWindow
SESSION_INFO *m_pLastSession;
public:
- CChatRoomDlg(SESSION_INFO *si);
+ CMsgDialog(SESSION_INFO *si);
bool OnInitDialog() override;
void OnDestroy() override;
diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h
index 6ff0094398..8d9910dfed 100644
--- a/plugins/TabSRMM/src/chat.h
+++ b/plugins/TabSRMM/src/chat.h
@@ -55,7 +55,7 @@ struct SESSION_INFO : public GCSessionInfoBase
struct LOGSTREAMDATA : public GCLogStreamDataBase
{
int crCount;
- CChatRoomDlg *dat;
+ CMsgDialog *dat;
};
struct TMUCSettings : public GlobalLogSettingsBase
diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp
index 9b6339f15b..7cb29594fc 100644
--- a/plugins/TabSRMM/src/chat_log.cpp
+++ b/plugins/TabSRMM/src/chat_log.cpp
@@ -829,7 +829,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData)
return str.Detach();
}
-void CChatRoomDlg::StreamInEvents(LOGINFO *lin, bool bRedraw)
+void CMsgDialog::StreamInEvents(LOGINFO *lin, bool bRedraw)
{
if (m_hwnd == nullptr || lin == nullptr || m_si == nullptr)
return;
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index c693595013..61b2438e16 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -491,7 +491,7 @@ void Chat_SetFilters(SESSION_INFO *si)
DWORD dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
DWORD dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
- CChatRoomDlg *pDlg = si->pDlg;
+ CMsgDialog *pDlg = si->pDlg;
if (pDlg) {
pDlg->m_iLogFilterFlags = dwFlags_default;
for (int i = 0; i < 32; i++) {
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index 4f6234c0f9..1eac103c3e 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -136,7 +136,7 @@ bool IsStringValidLink(wchar_t *pszText)
// called whenever a group chat tab becomes active(either by switching tabs or activating a
// container window
-void CChatRoomDlg::UpdateWindowState(UINT msg)
+void CMsgDialog::UpdateWindowState(UINT msg)
{
if (m_si == nullptr)
return;
@@ -233,7 +233,7 @@ void CChatRoomDlg::UpdateWindowState(UINT msg)
// resizer callback for the group chat session window.Called from Mirandas dialog
// resizing service
-int CChatRoomDlg::Resizer(UTILRESIZECONTROL *urc)
+int CMsgDialog::Resizer(UTILRESIZECONTROL *urc)
{
bool bToolbar = !(m_pContainer->m_dwFlags & CNT_HIDETOOLBAR);
bool bBottomToolbar = (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) != 0;
@@ -358,7 +358,7 @@ int CChatRoomDlg::Resizer(UTILRESIZECONTROL *urc)
return RD_ANCHORX_LEFT | RD_ANCHORY_TOP;
}
-bool CChatRoomDlg::TabAutoComplete()
+bool CMsgDialog::TabAutoComplete()
{
LRESULT lResult = m_message.SendMsg(EM_GETSEL, 0, 0);
int start = LOWORD(lResult), end = HIWORD(lResult);
@@ -459,28 +459,28 @@ static void __cdecl phase2(SESSION_INFO *si)
// the actual group chat session window procedure.Handles the entire chat session window
// which is usually a (tabbed) child of a container class window.
-CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si)
+CMsgDialog::CMsgDialog(SESSION_INFO *si)
: CTabBaseDlg(IDD_CHANNEL, si),
m_btnOk(this, IDOK)
{
m_szProto = GetContactProto(m_hContact);
m_bFilterEnabled = db_get_b(m_hContact, CHAT_MODULE, "FilterEnabled", m_bFilterEnabled) != 0;
- m_btnOk.OnClick = Callback(this, &CChatRoomDlg::onClick_OK);
- m_btnFilter.OnClick = Callback(this, &CChatRoomDlg::onClick_Filter);
- m_btnNickList.OnClick = Callback(this, &CChatRoomDlg::onClick_ShowNickList);
+ m_btnOk.OnClick = Callback(this, &CMsgDialog::onClick_OK);
+ m_btnFilter.OnClick = Callback(this, &CMsgDialog::onClick_Filter);
+ m_btnNickList.OnClick = Callback(this, &CMsgDialog::onClick_ShowNickList);
- m_nickList.OnDblClick = Callback(this, &CChatRoomDlg::onDblClick_List);
+ m_nickList.OnDblClick = Callback(this, &CMsgDialog::onDblClick_List);
- m_message.OnChange = Callback(this, &CChatRoomDlg::onChange_Message);
+ m_message.OnChange = Callback(this, &CMsgDialog::onChange_Message);
}
-CThumbBase* CChatRoomDlg::tabCreateThumb(CProxyWindow *pProxy) const
+CThumbBase* CMsgDialog::tabCreateThumb(CProxyWindow *pProxy) const
{
return new CThumbMUC(pProxy, m_si);
}
-void CChatRoomDlg::tabClearLog()
+void CMsgDialog::tabClearLog()
{
SESSION_INFO *s = g_chatApi.SM_FindSession(m_si->ptszID, m_si->pszModule);
if (s) {
@@ -496,7 +496,7 @@ void CChatRoomDlg::tabClearLog()
}
}
-bool CChatRoomDlg::OnInitDialog()
+bool CMsgDialog::OnInitDialog()
{
CTabBaseDlg::OnInitDialog();
@@ -568,7 +568,7 @@ bool CChatRoomDlg::OnInitDialog()
return true;
}
-void CChatRoomDlg::OnDestroy()
+void CMsgDialog::OnDestroy()
{
// Typing support for GCW_PRIVMESS sessions
if (m_si->iType == GCW_PRIVMESS)
@@ -617,7 +617,7 @@ void CChatRoomDlg::OnDestroy()
CSuper::OnDestroy();
}
-void CChatRoomDlg::onClick_OK(CCtrlButton*)
+void CMsgDialog::onClick_OK(CCtrlButton*)
{
if (GetSendButtonState(m_hwnd) == PBS_DISABLED)
return;
@@ -658,7 +658,7 @@ void CChatRoomDlg::onClick_OK(CCtrlButton*)
SetFocus(m_message.GetHwnd());
}
-void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
+void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
{
if (!pButton->Enabled())
return;
@@ -680,7 +680,7 @@ void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton)
db_set_b(m_si->hContact, CHAT_MODULE, "FilterEnabled", m_bFilterEnabled);
}
-void CChatRoomDlg::onClick_ShowNickList(CCtrlButton *pButton)
+void CMsgDialog::onClick_ShowNickList(CCtrlButton *pButton)
{
if (!pButton->Enabled() || m_si->iType == GCW_SERVER)
return;
@@ -693,7 +693,7 @@ void CChatRoomDlg::onClick_ShowNickList(CCtrlButton *pButton)
ScrollToBottom();
}
-void CChatRoomDlg::onChange_Message(CCtrlEdit*)
+void CMsgDialog::onChange_Message(CCtrlEdit*)
{
if (m_pContainer->m_hwndActive == m_hwnd)
UpdateReadChars();
@@ -718,7 +718,7 @@ void CChatRoomDlg::onChange_Message(CCtrlEdit*)
}
}
-void CChatRoomDlg::onDblClick_List(CCtrlListBox *pList)
+void CMsgDialog::onDblClick_List(CCtrlListBox *pList)
{
TVHITTESTINFO hti;
hti.pt.x = (short)LOWORD(GetMessagePos());
@@ -747,7 +747,7 @@ void CChatRoomDlg::onDblClick_List(CCtrlListBox *pList)
/////////////////////////////////////////////////////////////////////////////////////////
-void CChatRoomDlg::AddLog()
+void CMsgDialog::AddLog()
{
if (PluginConfig.m_bUseDividers) {
if (PluginConfig.m_bDividersUsePopupConfig) {
@@ -766,7 +766,7 @@ void CChatRoomDlg::AddLog()
CSrmmBaseDialog::AddLog();
}
-void CChatRoomDlg::RedrawLog()
+void CMsgDialog::RedrawLog()
{
m_si->LastTime = 0;
if (m_si->pLog) {
@@ -788,12 +788,12 @@ void CChatRoomDlg::RedrawLog()
else ClearLog();
}
-void CChatRoomDlg::ScrollToBottom()
+void CMsgDialog::ScrollToBottom()
{
DM_ScrollToBottom(0, 0);
}
-void CChatRoomDlg::ShowFilterMenu()
+void CMsgDialog::ShowFilterMenu()
{
m_hwndFilter = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_FILTER), m_pContainer->m_hwnd, FilterWndProc, (LPARAM)this);
TranslateDialogDefault(m_hwndFilter);
@@ -809,7 +809,7 @@ void CChatRoomDlg::ShowFilterMenu()
SetWindowPos(m_hwndFilter, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
}
-void CChatRoomDlg::UpdateNickList()
+void CMsgDialog::UpdateNickList()
{
int i = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
m_nickList.SendMsg(LB_SETCOUNT, m_si->getUserList().getCount(), 0);
@@ -818,7 +818,7 @@ void CChatRoomDlg::UpdateNickList()
m_hTabIcon = m_hTabStatusIcon;
}
-void CChatRoomDlg::UpdateOptions()
+void CMsgDialog::UpdateOptions()
{
MODULEINFO *pInfo = m_si ? m_si->pMI : nullptr;
if (pInfo) {
@@ -843,7 +843,7 @@ void CChatRoomDlg::UpdateOptions()
RedrawLog2();
}
-void CChatRoomDlg::UpdateStatusBar()
+void CMsgDialog::UpdateStatusBar()
{
if (m_pContainer->m_hwndActive != m_hwnd || m_pContainer->m_hwndStatus == nullptr || CMimAPI::m_shutDown || m_wszStatusBar[0])
return;
@@ -891,7 +891,7 @@ void CChatRoomDlg::UpdateStatusBar()
m_pWnd->Invalidate();
}
-void CChatRoomDlg::UpdateTitle()
+void CMsgDialog::UpdateTitle()
{
m_wStatus = m_si->wStatus;
@@ -955,7 +955,7 @@ void CChatRoomDlg::UpdateTitle()
/////////////////////////////////////////////////////////////////////////////////////////
// subclassing for the message history display(rich edit control in which the chat history appears)
-LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_NCCALCSIZE:
@@ -1049,7 +1049,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// subclassing for the message input control(a richedit text control)
-LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
{
if (m_bkeyProcessed && (msg == WM_KEYUP)) {
GetKeyboardState(kstate);
@@ -1387,7 +1387,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// subclassing for the nickname list control.It is an ownerdrawn listbox
-LRESULT CChatRoomDlg::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_NCCALCSIZE:
@@ -1524,12 +1524,12 @@ static UINT _eventorder[] =
GC_EVENT_NOTICE
};
-INT_PTR CALLBACK CChatRoomDlg::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK CMsgDialog::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- CChatRoomDlg *pDlg = (CChatRoomDlg*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ CMsgDialog *pDlg = (CMsgDialog*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (uMsg) {
case WM_INITDIALOG:
- pDlg = (CChatRoomDlg*)lParam;
+ pDlg = (CMsgDialog*)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
{
DWORD dwMask = db_get_dw(pDlg->m_hContact, CHAT_MODULE, "FilterMask", 0);
@@ -1643,7 +1643,7 @@ INT_PTR CALLBACK CChatRoomDlg::FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wPa
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
+INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
POINT pt, tmp, cur;
RECT rc;
@@ -2444,7 +2444,7 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si)
TabCtrl_SetCurSel(hwndTab, iTabId);
pContainer->m_iChilds++;
- CChatRoomDlg *pDlg = new CChatRoomDlg(si);
+ CMsgDialog *pDlg = new CMsgDialog(si);
pDlg->m_iTabID = iTabId;
pDlg->m_pContainer = pContainer;
pDlg->SetParent(hwndTab);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index bf248ba86d..d370ef6af5 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -507,7 +507,7 @@ public:
void DM_OptionsApplied(WPARAM wParam, LPARAM lParam);
};
-class CChatRoomDlg : public CTabBaseDlg
+class CMsgDialog : public CTabBaseDlg
{
typedef CTabBaseDlg CSuper;
@@ -532,7 +532,7 @@ class CChatRoomDlg : public CTabBaseDlg
SESSION_INFO *m_pLastSession;
public:
- CChatRoomDlg(SESSION_INFO*);
+ CMsgDialog(SESSION_INFO*);
bool OnInitDialog() override;
void OnDestroy() override;
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp
index b2d6e85b11..ba039497f9 100644
--- a/protocols/Discord/src/guilds.cpp
+++ b/protocols/Discord/src/guilds.cpp
@@ -17,9 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-class CChatRoomDlg : public CSrmmBaseDialog
+class CMsgDialog : public CSrmmBaseDialog
{
- CChatRoomDlg(); // just to suppress compiler's warnings, never implemented
+ CMsgDialog(); // just to suppress compiler's warnings, never implemented
};
int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2);
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index f947c2c46b..8cc58a0d8b 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -28,9 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void Srmm_CreateToolbarIcons(HWND hwndDlg, int flags);
void Srmm_ProcessToolbarHotkey(MCONTACT hContact, INT_PTR iButtonFrom, HWND hwndDlg);
-class CChatRoomDlg : public CSrmmBaseDialog
+class CMsgDialog : public CSrmmBaseDialog
{
- CChatRoomDlg(); // just to suppress compiler's warnings, never implemented
+ CMsgDialog(); // just to suppress compiler's warnings, never implemented
};
extern HGENMENU hJoinMenuItem, hLeaveMenuItem;
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index cff7201f24..8911b21e59 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -61,7 +61,7 @@ CSrmmBaseDialog::CSrmmBaseDialog(CMPluginBase &pPlugin, int idDialog, SESSION_IN
m_btnHistory.OnClick = Callback(this, &CSrmmBaseDialog::onClick_History);
m_btnChannelMgr.OnClick = Callback(this, &CSrmmBaseDialog::onClick_ChanMgr);
- m_nickList.OnDblClick = Callback(this, &CChatRoomDlg::onDblClick_List);
+ m_nickList.OnDblClick = Callback(this, &CMsgDialog::onDblClick_List);
if (si) {
m_hContact = si->hContact;
@@ -633,8 +633,10 @@ bool CSrmmBaseDialog::OnInitDialog()
SetWindowLongPtr(m_message.GetHwnd(), GWLP_USERDATA, LPARAM(this));
mir_subclassWindow(m_message.GetHwnd(), stubMessageProc);
- SetWindowLongPtr(m_nickList.GetHwnd(), GWLP_USERDATA, LPARAM(this));
- mir_subclassWindow(m_nickList.GetHwnd(), stubNicklistProc);
+ if (isChat()) {
+ SetWindowLongPtr(m_nickList.GetHwnd(), GWLP_USERDATA, LPARAM(this));
+ mir_subclassWindow(m_nickList.GetHwnd(), stubNicklistProc);
+ }
// three buttons below are initiated inside this call, so button creation must precede subclassing
Srmm_CreateToolbarIcons(m_hwnd, isChat() ? BBBF_ISCHATBUTTON : BBBF_ISIMBUTTON);