summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2017-11-27 00:12:03 +0300
committerKirill Volinsky <mataes2007@gmail.com>2017-11-27 00:12:03 +0300
commit48affc01c9a19f3ce39a4600ec6b8e0b247b80c1 (patch)
treebf3b9a4e139ec0fb2831da27942772933e43ef28 /plugins/TabSRMM/src
parent56d1702de011963f3506a481a43c68beb97c8fe8 (diff)
add module name (part 1)
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp41
-rw-r--r--plugins/TabSRMM/src/typingnotify.h2
3 files changed, 24 insertions, 21 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index a002a44042..2dd65a150d 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -124,6 +124,7 @@ void CGlobals::reloadSystemModulesChanged()
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
+ mi.Module = "TabSRMM";
PluginConfig.m_hMenuItem = Menu_AddContactMenuItem(&mi);
m_useAeroPeek = M.GetByte("useAeroPeek", 1);
@@ -311,6 +312,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
mi.hIcolibItem = PluginConfig.g_iconContainer;
mi.name.a = LPGEN("&Messaging settings...");
mi.pszService = MS_TABMSG_SETUSERPREFS;
+ mi.Module = "TabSRMM";
PluginConfig.m_UserMenuItem = Menu_AddContactMenuItem(&mi);
if (sendLater->isAvail()) {
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index fcef66e691..8e3c4cce61 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -456,7 +456,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case PSN_APPLY:
for (int i = 0; i < sizeof(colorPicker) / sizeof(colorPicker[0]); i++) {
colorPicker[i].color = SendDlgItemMessage(hwndDlg, colorPicker[i].res, CPM_GETCOLOUR, 0, 0);
- db_set_dw(0, Module, colorPicker[i].desc, colorPicker[i].color);
+ db_set_dw(0, TypigModule, colorPicker[i].desc, colorPicker[i].color);
}
Timeout = newTimeout; TimeoutMode = newTimeoutMode;
@@ -471,14 +471,14 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
OnePopup = IsDlgButtonChecked(hwndDlg, IDC_ONEPOPUP);
ShowMenu = IsDlgButtonChecked(hwndDlg, IDC_SHOWMENU);
- db_set_b(0, Module, SET_ONEPOPUP, OnePopup);
- db_set_b(0, Module, SET_SHOWDISABLEMENU, ShowMenu);
- db_set_b(0, Module, SET_DISABLED, (BYTE)(StartDisabled | StopDisabled));
- db_set_b(0, Module, SET_COLOR_MODE, ColorMode);
- db_set_b(0, Module, SET_TIMEOUT_MODE, TimeoutMode);
- db_set_b(0, Module, SET_TIMEOUT, (BYTE)Timeout);
- db_set_b(0, Module, SET_TIMEOUT_MODE2, TimeoutMode2);
- db_set_b(0, Module, SET_TIMEOUT2, (BYTE)Timeout2);
+ db_set_b(0, TypigModule, SET_ONEPOPUP, OnePopup);
+ db_set_b(0, TypigModule, SET_SHOWDISABLEMENU, ShowMenu);
+ db_set_b(0, TypigModule, SET_DISABLED, (BYTE)(StartDisabled | StopDisabled));
+ db_set_b(0, TypigModule, SET_COLOR_MODE, ColorMode);
+ db_set_b(0, TypigModule, SET_TIMEOUT_MODE, TimeoutMode);
+ db_set_b(0, TypigModule, SET_TIMEOUT, (BYTE)Timeout);
+ db_set_b(0, TypigModule, SET_TIMEOUT_MODE2, TimeoutMode2);
+ db_set_b(0, TypigModule, SET_TIMEOUT2, (BYTE)Timeout2);
return TRUE;
}
}
@@ -507,23 +507,23 @@ int TN_ModuleInit()
{
hPopupsList = WindowList_Create();
- OnePopup = M.GetByte(Module, SET_ONEPOPUP, DEF_ONEPOPUP);
- ShowMenu = M.GetByte(Module, SET_SHOWDISABLEMENU, DEF_SHOWDISABLEMENU);
+ OnePopup = M.GetByte(TypigModule, SET_ONEPOPUP, DEF_ONEPOPUP);
+ ShowMenu = M.GetByte(TypigModule, SET_SHOWDISABLEMENU, DEF_SHOWDISABLEMENU);
- int i = M.GetByte(Module, SET_DISABLED, DEF_DISABLED);
+ int i = M.GetByte(TypigModule, SET_DISABLED, DEF_DISABLED);
Disabled = i & 1;
StartDisabled = i & 2;
StopDisabled = i & 4;
- ColorMode = M.GetByte(Module, SET_COLOR_MODE, DEF_COLOR_MODE);
- TimeoutMode = M.GetByte(Module, SET_TIMEOUT_MODE, DEF_TIMEOUT_MODE);
- Timeout = M.GetByte(Module, SET_TIMEOUT, DEF_TIMEOUT);
- TimeoutMode2 = M.GetByte(Module, SET_TIMEOUT_MODE2, DEF_TIMEOUT_MODE2);
- Timeout2 = M.GetByte(Module, SET_TIMEOUT2, DEF_TIMEOUT2);
+ ColorMode = M.GetByte(TypigModule, SET_COLOR_MODE, DEF_COLOR_MODE);
+ TimeoutMode = M.GetByte(TypigModule, SET_TIMEOUT_MODE, DEF_TIMEOUT_MODE);
+ Timeout = M.GetByte(TypigModule, SET_TIMEOUT, DEF_TIMEOUT);
+ TimeoutMode2 = M.GetByte(TypigModule, SET_TIMEOUT_MODE2, DEF_TIMEOUT_MODE2);
+ Timeout2 = M.GetByte(TypigModule, SET_TIMEOUT2, DEF_TIMEOUT2);
- if (!(M.GetDword(Module, colorPicker[0].desc, 1) && !M.GetDword(Module, colorPicker[0].desc, 0)))
+ if (!(M.GetDword(TypigModule, colorPicker[0].desc, 1) && !M.GetDword(TypigModule, colorPicker[0].desc, 0)))
for (i = 0; i < _countof(colorPicker); i++)
- colorPicker[i].color = M.GetDword(Module, colorPicker[i].desc, 0);
+ colorPicker[i].color = M.GetDword(TypigModule, colorPicker[i].desc, 0);
mir_snwprintf(szStart, TranslateT("...is typing a message."));
mir_snwprintf(szStop, TranslateT("...has stopped typing."));
@@ -543,6 +543,7 @@ int TN_ModuleInit()
}
mi.pszService = "TypingNotify/EnableDisableMenuCommand";
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ mi.Module = "TabSRMM";
hDisableMenu = Menu_AddMainMenuItem(&mi);
}
@@ -554,6 +555,6 @@ int TN_ModuleInit()
int TN_ModuleDeInit()
{
WindowList_Destroy(hPopupsList);
- db_set_b(0, Module, SET_DISABLED, (BYTE)(Disabled | StartDisabled | StopDisabled));
+ db_set_b(0, TypigModule, SET_DISABLED, (BYTE)(Disabled | StartDisabled | StopDisabled));
return 0;
}
diff --git a/plugins/TabSRMM/src/typingnotify.h b/plugins/TabSRMM/src/typingnotify.h
index c851c51991..800cdb5930 100644
--- a/plugins/TabSRMM/src/typingnotify.h
+++ b/plugins/TabSRMM/src/typingnotify.h
@@ -10,7 +10,7 @@
#define COLOR_WINDOWS 2
#define COLOR_POPUP 3
-#define Module "TypingNotify"
+#define TypigModule "TypingNotify"
#define SET_WO "NotWhenFocused"
#define DEF_WO 0