summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-15 15:31:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-15 15:31:06 +0300
commit3342dd204597c09bb726dfc1d7a0acbfd2fd5d8f (patch)
tree03d29ca3ad2c9918314f92ccfdbb515ecd510aa7 /plugins
parentf52b5cc86d9eff2494902157c8fc0a4e019a3c95 (diff)
anonymous SRMM services got names
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp4
-rw-r--r--plugins/Clist_modern/src/stdafx.h1
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp6
-rw-r--r--plugins/Clist_nicer/src/stdafx.h1
-rw-r--r--plugins/Scriver/src/msgs.cpp11
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.cpp5
10 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index 377949ba85..c9e9a7702a 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -97,8 +97,8 @@ CListEvent* cli_AddEvent(CLISTEVENT *cle)
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID;
if (p->pszService &&
- (!strncmp("SRMsg/ReadMessage", p->pszService, _countof("SRMsg/ReadMessage")) ||
- !strncmp("GChat/DblClickEvent", p->pszService, _countof("GChat/DblClickEvent")))) {
+ (!strncmp(MS_MSG_READMESSAGE, p->pszService, _countof(MS_MSG_READMESSAGE)) ||
+ !strncmp("GChat/DblClickEvent", p->pszService, _countof("GChat/DblClickEvent")))) {
// dup check only for msg events
for (int j = 0; j < GetMenuItemCount(g_CluiData.hMenuNotify); j++) {
if (GetMenuItemInfo(g_CluiData.hMenuNotify, j, TRUE, &mii) != 0) {
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h
index 5b1c5a4531..f2e3fbb331 100644
--- a/plugins/Clist_modern/src/stdafx.h
+++ b/plugins/Clist_modern/src/stdafx.h
@@ -82,6 +82,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clist.h>
#include <m_skin.h>
#include <m_skin_eng.h>
+#include <m_message.h>
#include <m_skinbutton.h>
#include <m_contacts.h>
#include <m_avatars.h>
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index 7ea9af4889..e2cd2825d2 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -235,14 +235,14 @@ LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
CListEvent* AddEvent(CLISTEVENT *cle)
{
CListEvent *p = coreCli.pfnAddEvent(cle);
- if (p == NULL)
- return NULL;
+ if (p == nullptr)
+ return nullptr;
if (p->hContact != 0 && p->hDbEvent != 1 && !(p->flags & CLEF_ONLYAFEW)) {
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID;
- if (p->pszService && !strncmp("SRMsg/ReadMessage", p->pszService, 17)) {
+ if (!mir_strncmp(MS_MSG_READMESSAGE, p->pszService, _countof(MS_MSG_READMESSAGE))) {
// dup check only for msg events
for (int j = 0; j < GetMenuItemCount(cfg::dat.hMenuNotify); j++) {
if (GetMenuItemInfo(cfg::dat.hMenuNotify, j, TRUE, &mii) != 0) {
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h
index 23fe833568..35c41717fb 100644
--- a/plugins/Clist_nicer/src/stdafx.h
+++ b/plugins/Clist_nicer/src/stdafx.h
@@ -42,6 +42,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_database.h>
#include <m_system.h>
#include <m_langpack.h>
+#include <m_message.h>
#include <m_avatars.h>
#include <m_button.h>
#include <m_options.h>
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index a335489ee8..8f583564b2 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -121,7 +121,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = "SRMsg/ReadMessage";
+ cle.pszService = MS_MSG_READMESSAGE;
cle.szTooltip.w = toolTip;
pcli->pfnAddEvent(&cle);
}
@@ -204,7 +204,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hIcon = GetCachedIcon("scriver_TYPING");
- cle.pszService = "SRMsg/TypingMessage";
+ cle.pszService = MS_MSG_TYPINGMESSAGE;
cle.szTooltip.w = szTip;
pcli->pfnAddEvent(&cle);
}
@@ -271,7 +271,7 @@ static void RestoreUnreadMessageAlerts(void)
CLISTEVENT cle = {};
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = "SRMsg/ReadMessage";
+ cle.pszService = MS_MSG_READMESSAGE;
cle.flags = CLEF_UNICODE;
cle.szTooltip.w = toolTip;
@@ -642,11 +642,10 @@ int OnLoadModule(void)
HookEvent(ME_SYSTEM_MODULELOAD, ModuleLoad);
HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);
+ CreateServiceFunction(MS_MSG_READMESSAGE, ReadMessageCommand);
CreateServiceFunction(MS_MSG_SENDMESSAGE, SendMessageCommand);
CreateServiceFunction(MS_MSG_SENDMESSAGEW, SendMessageCommandW);
-
- CreateServiceFunction("SRMsg/ReadMessage", ReadMessageCommand);
- CreateServiceFunction("SRMsg/TypingMessage", TypingMessageCommand);
+ CreateServiceFunction(MS_MSG_TYPINGMESSAGE, TypingMessageCommand);
SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (focused window)"));
SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (unfocused window)"));
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index b47f1f6214..5b4539fb8f 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -529,7 +529,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
CLISTEVENT cle = {};
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = "SRMsg/ReadMessage";
+ cle.pszService = MS_MSG_READMESSAGE;
cle.flags = CLEF_UNICODE;
cle.szTooltip.w = toolTip;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 10d092cb5e..5e613b9f6a 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -145,7 +145,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
CLISTEVENT *cli = pcli->pfnGetEvent(-1, 0);
if (cli != nullptr) {
- if (strncmp(cli->pszService, "SRMsg/TypingMessage", mir_strlen(cli->pszService))) {
+ if (strncmp(cli->pszService, MS_MSG_TYPINGMESSAGE, mir_strlen(cli->pszService))) {
CallService(cli->pszService, 0, (LPARAM)cli);
break;
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 63e9975081..a275fa74be 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -283,7 +283,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_UNICODE;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
- cle.pszService = "SRMsg/TypingMessage";
+ cle.pszService = MS_MSG_TYPINGMESSAGE;
cle.szTooltip.w = szTip;
pcli->pfnAddEvent(&cle);
}
@@ -514,7 +514,7 @@ nowindowcreate:
cle.hDbEvent = hDbEvent;
cle.flags = CLEF_UNICODE;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = "SRMsg/ReadMessage";
+ cle.pszService = MS_MSG_READMESSAGE;
contactName = pcli->pfnGetContactDisplayName(hContact, 0);
mir_snwprintf(toolTip, TranslateT("Message from %s"), contactName);
cle.szTooltip.w = toolTip;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index d28eaad284..f49abafe3c 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -777,7 +777,7 @@ void CTabBaseDlg::FlashOnClist(MEVENT hEvent, DBEVENTINFO *dbei)
cle.hContact = m_hContact;
cle.hDbEvent = hEvent;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- cle.pszService = "SRMsg/ReadMessage";
+ cle.pszService = MS_MSG_READMESSAGE;
pcli->pfnAddEvent(&cle);
m_dwFlagsEx |= MWF_SHOW_FLASHCLIST;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 3a88bd7ee1..2e7473b05a 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -1004,15 +1004,14 @@ static INT_PTR ReloadSettings(WPARAM, LPARAM lParam)
static void TSAPI InitAPI()
{
+ CreateServiceFunction(MS_MSG_READMESSAGE, ReadMessageCommand);
CreateServiceFunction(MS_MSG_SENDMESSAGE, SendMessageCommand);
CreateServiceFunction(MS_MSG_SENDMESSAGEW, SendMessageCommand_W);
+ CreateServiceFunction(MS_MSG_TYPINGMESSAGE, TypingMessageCommand);
CreateServiceFunction("TabSRMsg/ReloadSkin", ReloadSkin);
CreateServiceFunction("TabSRMsg/ReloadSettings", ReloadSettings);
- CreateServiceFunction("SRMsg/ReadMessage", ReadMessageCommand);
- CreateServiceFunction("SRMsg/TypingMessage", TypingMessageCommand);
-
CreateServiceFunction(MS_TABMSG_SETUSERPREFS, SetUserPrefs);
CreateServiceFunction(MS_TABMSG_TRAYSUPPORT, Service_OpenTrayMenu);
CreateServiceFunction(MS_TABMSG_SLQMGR, CSendLater::svcQMgr);