diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-04 00:20:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-04 00:20:24 +0300 |
commit | 5c3ab50ab27ba9a517cf56d0626c641883e3fd39 (patch) | |
tree | 553f38fa4a7673d710ee18f570201d177e2f64ac /plugins/TabSRMM/src | |
parent | 7f513673b523ecfbf6ded0a2d0e5cdf5496bd6b0 (diff) |
SRMM window list completely incapsulated into mir_app to avoid corrupting it by someone's dirty hands
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/chat_options.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/hotkeyhandler.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 26 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.h | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 12 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 22 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 2 |
16 files changed, 54 insertions, 76 deletions
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index b4d9224f01..24e66f19cf 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -647,7 +647,7 @@ int FontServiceFontsChanged(WPARAM, LPARAM) FreeTabConfig();
ReloadTabConfig();
Skin->setupAeroSkins();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 1, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
return 0;
}
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 8e97de36f9..8b24b7526c 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -2424,7 +2424,7 @@ void ShowRoom(SESSION_INFO *si) return; // smth went wrong, nothing to do here MCONTACT hContact = si->hContact; - if (M.FindWindow(hContact) != 0) + if (Srmm_FindWindow(hContact) != 0) return; if (hContact != 0 && M.GetByte("limittabs", 0) && !wcsncmp(pContainer->m_wszName, L"default", 6)) diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 91debd2d38..08a742babf 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -74,7 +74,7 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg) dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
}
else {
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd != nullptr)
dat = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
@@ -1030,12 +1030,12 @@ panel_found: case ID_VIEW_BOTTOMTOOLBAR:
ApplyContainerSetting(pContainer, CNT_BOTTOMTOOLBAR, pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? 0 : 1, false);
- M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 1);
+ Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1);
return 0;
case ID_VIEW_SHOWTOOLBAR:
ApplyContainerSetting(pContainer, CNT_HIDETOOLBAR, pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1, false);
- M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 1);
+ Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1);
return 0;
case ID_VIEW_SHOWMENUBAR:
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index f507994631..0137a4ce52 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -322,7 +322,7 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar m_SendFormat = M.GetDword(m_hContact, "sendformat", PluginConfig.m_SendFormat); if (m_SendFormat == -1) // per contact override to disable it.. m_SendFormat = 0; - M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 1); + Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1); } } break; @@ -1362,9 +1362,9 @@ static HANDLE hHookIconPressedEvt; static int OnSrmmIconChanged(WPARAM hContact, LPARAM) { if (hContact == 0) - M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0); + Srmm_Broadcast(DM_STATUSICONCHANGE, 0, 0); else { - HWND hwnd = M.FindWindow(hContact); + HWND hwnd = Srmm_FindWindow(hContact); if (hwnd) PostMessage(hwnd, DM_STATUSICONCHANGE, 0, 0); } diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 9fd2aa5151..11c85ec380 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -352,7 +352,7 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) if (hContact == 0) {
if (!strcmp("Nick", setting))
- M.BroadcastMessage(DM_OWNNICKCHANGED, 0, (LPARAM)cws->szModule);
+ Srmm_Broadcast(DM_OWNNICKCHANGED, 0, (LPARAM)cws->szModule);
return 0;
}
@@ -377,7 +377,7 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) if (!strcmp(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact
return 0;
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
bool fChanged = false, fExtendedStatusChange = false;
if (!strcmp(cws->szSetting, "Status"))
fChanged = c->updateStatus(cws->value.wVal);
@@ -520,7 +520,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void) DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) {
- if (M.FindWindow(hContact) != nullptr)
+ if (Srmm_FindWindow(hContact) != nullptr)
continue;
arEvents.insert(new MSavedEvent(hContact, hDbEvent));
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 226298640e..865f2a77af 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -94,7 +94,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact) if (hContact == 0)
return;
- HWND hWnd = M.FindWindow(hContact);
+ HWND hWnd = Srmm_FindWindow(hContact);
if (hWnd && IsWindow(hWnd)) {
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
@@ -178,7 +178,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE;
}
else if (dis->CtlType == ODT_MENU) {
- HWND hWnd = M.FindWindow((MCONTACT)dis->itemID);
+ HWND hWnd = Srmm_FindWindow((MCONTACT)dis->itemID);
DWORD idle = 0;
if (hWnd == nullptr) {
@@ -354,7 +354,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case DM_DOCREATETAB:
{
- HWND hWnd = M.FindWindow(lParam);
+ HWND hWnd = Srmm_FindWindow(lParam);
if (hWnd && IsWindow(hWnd)) {
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
@@ -388,7 +388,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP HKL hkl = (HKL)lParam;
MCONTACT hContact = wParam;
- HWND hWnd = M.FindWindow(hContact);
+ HWND hWnd = Srmm_FindWindow(hContact);
if (hWnd) {
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (dat) {
@@ -430,7 +430,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
}
- M.BroadcastMessage(WM_DWMCOMPOSITIONCHANGED, 0, 0);
+ Srmm_Broadcast(WM_DWMCOMPOSITIONCHANGED, 0, 0);
break;
// this message is fired when the user changes desktop color
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 83eeb5ebfd..2a37689a54 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -148,7 +148,7 @@ void CInfoPanel::setHeight(LONG newHeight, bool fBroadcast) if (fBroadcast) {
if (!m_fPrivateHeight) {
if (!m_dat->m_pContainer->settings->fPrivate)
- M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
+ Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
}
@@ -1194,13 +1194,13 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L if (BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_NOSYNC)) {
loadHeight();
if (!m_dat->m_pContainer->settings->fPrivate)
- M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
+ Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
}
else {
if (!m_dat->m_pContainer->settings->fPrivate)
- M.BroadcastMessage(DM_SETINFOPANEL, (WPARAM)m_dat, 0);
+ Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, 0);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, 0);
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index f1c4e258e8..63e9975081 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -52,24 +52,6 @@ wchar_t CMimAPI::m_userDir[] = L"\0"; bool CMimAPI::m_haveBufferedPaint = false; ///////////////////////////////////////////////////////////////////////////////////////// -// window list functions - -void CMimAPI::BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam) -{ - WindowList_Broadcast(pci->hWindowList, msg, wParam, lParam); -} - -void CMimAPI::BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam) -{ - WindowList_BroadcastAsync(pci->hWindowList, msg, wParam, lParam); -} - -HWND CMimAPI::FindWindow(MCONTACT h) const -{ - return WindowList_Find(pci->hWindowList, h); -} - -///////////////////////////////////////////////////////////////////////////////////////// int CMimAPI::FoldersPathChanged(WPARAM, LPARAM) { @@ -224,11 +206,11 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode) int foundWin = 0, preTyping = 0; BOOL fShowOnClist = TRUE; - HWND hwnd = M.FindWindow(hContact); + HWND hwnd = Srmm_FindWindow(hContact); MCONTACT hMeta = db_mc_getMeta(hContact); if (hMeta) { if (!hwnd) - hwnd = M.FindWindow(hMeta); + hwnd = Srmm_FindWindow(hMeta); hContact = hMeta; } @@ -399,9 +381,9 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) DBEVENTINFO dbei = {}; db_event_get(hDbEvent, &dbei); - HWND hwnd = M.FindWindow(hContact); + HWND hwnd = Srmm_FindWindow(hContact); if (hwnd == nullptr) - hwnd = M.FindWindow(db_event_getContact(hDbEvent)); + hwnd = Srmm_FindWindow(db_event_getContact(hDbEvent)); BOOL isCustomEvent = IsCustomEvent(dbei.eventType); BOOL isShownCustomEvent = DbEventIsForMsgWindow(&dbei); diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 183b96b6a6..a956fdd1ba 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -179,16 +179,12 @@ public: __forceinline bool isVSThemed() { return m_isVsThemed; }
// window lists
- void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);
- void BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam);
- HWND FindWindow(MCONTACT h) const;
-
- static int FoldersPathChanged(WPARAM wParam, LPARAM lParam); // hook subscriber for folders plugin
- static int TypingMessage(WPARAM wParam, LPARAM lParam);
- static int ProtoAck(WPARAM wParam, LPARAM lParam);
- static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam);
- static int DispatchNewEvent(WPARAM wParam, LPARAM lParam);
- static int MessageEventAdded(WPARAM wParam, LPARAM lParam);
+ static int FoldersPathChanged(WPARAM wParam, LPARAM lParam); // hook subscriber for folders plugin
+ static int TypingMessage(WPARAM wParam, LPARAM lParam);
+ static int ProtoAck(WPARAM wParam, LPARAM lParam);
+ static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam);
+ static int DispatchNewEvent(WPARAM wParam, LPARAM lParam);
+ static int MessageEventAdded(WPARAM wParam, LPARAM lParam);
public:
// various function pointers
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 55e362f9f8..da9531b32f 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -151,7 +151,7 @@ void CTabBaseDlg::ShowPopupMenu(const CCtrlBase &pCtrl, POINT pt) case ID_EDITOR_SHOWMESSAGELENGTHINDICATOR:
PluginConfig.m_visualMessageSizeIndicator = !PluginConfig.m_visualMessageSizeIndicator;
db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
- M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 0);
+ Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 0);
SendMessage(m_hwnd, WM_SIZE, 0, 0);
if (m_pContainer->hwndStatus)
RedrawWindow(m_pContainer->hwndStatus, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
@@ -550,7 +550,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM PluginConfig.lastSPlitterPos.off_chat = dwOff_CHAT;
PluginConfig.lastSPlitterPos.off_im = dwOff_IM;
SendMessage(dat->GetHwnd(), DM_SPLITTERGLOBALEVENT, 0, 0);
- M.BroadcastMessage(DM_SPLITTERGLOBALEVENT, 0, 0);
+ Srmm_Broadcast(DM_SPLITTERGLOBALEVENT, 0, 0);
}
break;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 0f2784c6a7..a00131b43c 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -354,7 +354,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) case ID_PICMENU_ALWAYSKEEPTHEBUTTONBARATFULLWIDTH:
PluginConfig.m_bAlwaysFullToolbarWidth = !PluginConfig.m_bAlwaysFullToolbarWidth;
db_set_b(0, SRMSGMOD_T, "alwaysfulltoolbar", (BYTE)PluginConfig.m_bAlwaysFullToolbarWidth);
- M.BroadcastMessage(DM_CONFIGURETOOLBAR, 0, 1);
+ Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1);
break;
case ID_PICMENU_SAVETHISPICTUREAS:
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 88b7e23dd3..e0ce019d05 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -323,8 +323,8 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L CacheMsgLogIcons();
PluginConfig.reloadSettings();
CSkin::setAeroEffect(-1);
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 1, 0);
- M.BroadcastMessage(DM_FORCEDREMAKELOG, 0, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
+ Srmm_Broadcast(DM_FORCEDREMAKELOG, 0, 0);
SendMessage(GetParent(hwndDlg), WM_COMMAND, IDCANCEL, 0);
}
}
@@ -621,7 +621,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP // scan the tree view and obtain the options...
TreeViewToDB(GetDlgItem(hwndDlg, IDC_WINDOWOPTIONS), CTranslator::TREE_MSG, SRMSGMOD_T, nullptr);
PluginConfig.reloadSettings();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 1, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
return TRUE;
}
break;
@@ -826,7 +826,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, else
db_set_dw(0, SRMSGMOD_T, "maxhist", 0);
PluginConfig.reloadSettings();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 1, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
return TRUE;
}
}
@@ -1055,7 +1055,7 @@ static INT_PTR CALLBACK DlgProcTabbedOptions(HWND hwndDlg, UINT msg, WPARAM wPar PluginConfig.m_EscapeCloses = (int)SendDlgItemMessage(hwndDlg, IDC_ESCMODE, CB_GETCURSEL, 0, 0);
db_set_b(0, SRMSGMOD_T, "escmode", (BYTE)PluginConfig.m_EscapeCloses);
PluginConfig.reloadSettings();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 0, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
return TRUE;
}
}
@@ -1592,7 +1592,7 @@ static INT_PTR CALLBACK DlgProcTabSrmmModernOptions(HWND hwndDlg, UINT msg, WPAR break;
}
PluginConfig.reloadSettings();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 1, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 1, 0);
return TRUE;
}
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 57e6949b92..8efe5d6fe2 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -45,7 +45,7 @@ void CB_InitCustomButtons(); int IEViewOptionsChanged(WPARAM, LPARAM)
{
- M.BroadcastMessage(DM_IEVIEWOPTIONSCHANGED, 0, 0);
+ Srmm_Broadcast(DM_IEVIEWOPTIONSCHANGED, 0, 0);
return 0;
}
@@ -54,7 +54,7 @@ int IEViewOptionsChanged(WPARAM, LPARAM) int SmileyAddOptionsChanged(WPARAM, LPARAM)
{
- M.BroadcastMessage(DM_SMILEYOPTIONSCHANGED, 0, 0);
+ Srmm_Broadcast(DM_SMILEYOPTIONSCHANGED, 0, 0);
pci->SM_BroadcastMessage(nullptr, DM_SMILEYOPTIONSCHANGED, 0, 0, FALSE);
return 0;
}
@@ -280,9 +280,9 @@ void CTabBaseDlg::NotifyDeliveryFailure() const static INT_PTR SetStatusText(WPARAM hContact, LPARAM lParam)
{
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd == nullptr)
- hwnd = M.FindWindow(db_mc_getMeta(hContact));
+ hwnd = Srmm_FindWindow(db_mc_getMeta(hContact));
if (hwnd == nullptr)
return 0;
@@ -344,7 +344,7 @@ int TSAPI MessageWindowOpened(MCONTACT hContact, HWND _hwnd) TContainerData *pContainer = nullptr;
if (hContact)
- hwnd = M.FindWindow(hContact);
+ hwnd = Srmm_FindWindow(hContact);
else if (_hwnd)
hwnd = _hwnd;
else
@@ -382,7 +382,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) {
MCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
- HWND hwndExisting = M.FindWindow(hContact);
+ HWND hwndExisting = Srmm_FindWindow(hContact);
if (hwndExisting != 0)
SendMessage(hwndExisting, DM_ACTIVATEME, 0, 0);
else {
@@ -422,7 +422,7 @@ INT_PTR SendMessageCommand_Worker(MCONTACT hContact, LPCSTR pszMsg, bool isWchar if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 0;
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd) {
if (pszMsg) {
HWND hEdit = GetDlgItem(hwnd, IDC_SRMM_MESSAGE);
@@ -570,7 +570,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, bool bActivateTab, bool bPopupContainer, bool bWantPopup, MEVENT hdbEvent, bool bIsUnicode, const char *pszInitialText)
{
- if (M.FindWindow(hContact) != 0) {
+ if (Srmm_FindWindow(hContact) != 0) {
_DebugPopup(hContact, L"Warning: trying to create duplicate window");
return 0;
}
@@ -946,7 +946,7 @@ static int TSAPI LoadFromIconLib() PluginConfig.g_iconClock = IcoLib_GetIcon("tabSRMM_clock_symbol");
CacheMsgLogIcons();
- M.BroadcastMessage(WM_CBD_LOADICONS, 0, 0);
+ Srmm_Broadcast(WM_CBD_LOADICONS, 0, 0);
return 0;
}
@@ -993,8 +993,8 @@ int IconsChanged(WPARAM, LPARAM) {
CreateImageList(FALSE);
CacheMsgLogIcons();
- M.BroadcastMessage(DM_OPTIONSAPPLIED, 0, 0);
- M.BroadcastMessage(DM_UPDATEWINICON, 0, 0);
+ Srmm_Broadcast(DM_OPTIONSAPPLIED, 0, 0);
+ Srmm_Broadcast(DM_UPDATEWINICON, 0, 0);
return 0;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index afaa5a663e..6e54e8d65e 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -509,7 +509,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) SkinPlaySound("SendMsg"); - M.BroadcastMessage(DM_APPENDMCEVENT, job.hContact, LPARAM(hNewEvent)); + Srmm_Broadcast(DM_APPENDMCEVENT, job.hContact, hNewEvent); job.iSendId = 0; job.iAcksNeeded--; diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 256b74ccfa..a2e5f3c501 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -135,7 +135,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, CSrmmWindow *dat = 0;
DWORD *pdwActionToTake = (DWORD *)lParam;
unsigned int iOldIEView = 0;
- HWND hWnd = M.FindWindow(hContact);
+ HWND hWnd = Srmm_FindWindow(hContact);
BYTE bOldInfoPanel = M.GetByte(hContact, "infopanel", 0);
if (hWnd) {
@@ -340,7 +340,7 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA case WM_USER + 100: {
int i = 0;
LRESULT state;
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
DWORD *dwActionToTake = (DWORD *)lParam, dwMask = 0, dwFlags = 0, maskval;
CSrmmWindow *dat = nullptr;
@@ -466,7 +466,7 @@ INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDOK:
DWORD dwActionToTake = 0; // child pages request which action to take
- HWND hwnd = M.FindWindow(hContact);
+ HWND hwnd = Srmm_FindWindow(hContact);
tci.mask = TCIF_PARAM;
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 48800498a7..1e66c60cc8 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -736,7 +736,7 @@ AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const MCONTACT hContact) void Utils::sendContactMessage(MCONTACT hContact, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- HWND h = M.FindWindow(hContact);
+ HWND h = Srmm_FindWindow(hContact);
if (h != nullptr)
PostMessage(h, uMsg, wParam, lParam);
}
|