summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AddContactPlus/main.cpp2
-rw-r--r--plugins/BasicHistory/Options.cpp2
-rw-r--r--plugins/BossKeyPlus/BossKey.cpp2
-rw-r--r--plugins/CSList/cslist.cpp22
-rw-r--r--plugins/Clist_modern/modern_keyboard.cpp25
-rw-r--r--plugins/Clist_mw/keyboard.cpp13
-rw-r--r--plugins/Console/Console.c37
-rw-r--r--plugins/FavContacts/resource.h1
-rw-r--r--plugins/FavContacts/resource.rc1
-rw-r--r--plugins/FavContacts/src/main.cpp240
-rw-r--r--plugins/FloatingContacts/main.cpp29
-rw-r--r--plugins/ListeningTo/listeningto.cpp42
-rw-r--r--plugins/PackUpdater/Src/Events.cpp2
-rw-r--r--plugins/Popup/src/main.cpp4
-rw-r--r--plugins/RecentContacts/RecentContacts.cpp20
-rw-r--r--plugins/Scriver/input.c36
-rw-r--r--plugins/Sessions/Src/Main.cpp8
-rw-r--r--plugins/SimpleStatusMsg/main.cpp2
-rw-r--r--plugins/SpellChecker/spellchecker.cpp20
-rw-r--r--plugins/Svc_crshdmp/crshdmp.cpp4
-rw-r--r--plugins/Svc_dbepp/main.cpp40
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp12
-rw-r--r--plugins/Updater/updater.cpp47
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp6
-rw-r--r--plugins/UserInfoEx/svc_refreshci.cpp2
-rw-r--r--plugins/UserInfoEx/svc_reminder.cpp3
-rw-r--r--plugins/WhenWasIt/hooked_events.cpp27
28 files changed, 292 insertions, 359 deletions
diff --git a/plugins/AddContactPlus/main.cpp b/plugins/AddContactPlus/main.cpp
index 68a210543a..402b9d5ecb 100644
--- a/plugins/AddContactPlus/main.cpp
+++ b/plugins/AddContactPlus/main.cpp
@@ -171,7 +171,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
hkd.ptszSection = LPGENT("Main");
hkd.pszService = MS_ADDCONTACTPLUS_SHOW;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'C') | HKF_MIRANDA_LOCAL;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
OnAccListChanged(0, 0);
diff --git a/plugins/BasicHistory/Options.cpp b/plugins/BasicHistory/Options.cpp
index 5f7b7f4997..29988fdd03 100644
--- a/plugins/BasicHistory/Options.cpp
+++ b/plugins/BasicHistory/Options.cpp
@@ -281,7 +281,7 @@ void Options::Load()
hid.pszService = g_HotkeyOptionsList[i].pszService;
hid.DefHotKey = g_HotkeyOptionsList[i].DefHotKey;
hid.lParam = g_HotkeyOptionsList[i].lParam;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hid);
+ Hotkey_Register(&hid);
}
showContacts = DBGetContactSettingByte(0, MODULE, "showContacts", 0) ? true : false;
diff --git a/plugins/BossKeyPlus/BossKey.cpp b/plugins/BossKeyPlus/BossKey.cpp
index 9a89bb372d..deeaa1ffa8 100644
--- a/plugins/BossKeyPlus/BossKey.cpp
+++ b/plugins/BossKeyPlus/BossKey.cpp
@@ -683,7 +683,7 @@ void RegisterCoreHotKeys (void)
hotkey.pszService = MS_BOSSKEY_HIDE;
hotkey.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F12);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hotkey);
+ Hotkey_Register(&hotkey);
}
static int ModernToolbarInit(WPARAM, LPARAM) // Modern toolbar support
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp
index 98d7c9e31f..4ce3f66d18 100644
--- a/plugins/CSList/cslist.cpp
+++ b/plugins/CSList/cslist.cpp
@@ -174,19 +174,15 @@ int CSList::postLoading( WPARAM wparam, LPARAM lparam )
void CSList::registerHotkeys(char buf[200], TCHAR* accName, int Number)
{
- // 0.9+ core hotkeys service
- if ( ServiceExists( MS_HOTKEY_REGISTER ) )
- {
- HOTKEYDESC hotkey = { 0 };
- hotkey.cbSize = sizeof(hotkey);
- hotkey.dwFlags = HKD_TCHAR;
- hotkey.pszName = buf;
- hotkey.ptszDescription = accName;
- hotkey.ptszSection = _T("Custom Status List");
- hotkey.pszService = buf;
- hotkey.DefHotKey = HOTKEYCODE( HOTKEYF_CONTROL | HOTKEYF_SHIFT, '0'+Number );
- CallService( MS_HOTKEY_REGISTER, 0, ( LPARAM )&hotkey );
- }
+ HOTKEYDESC hotkey = { 0 };
+ hotkey.cbSize = sizeof(hotkey);
+ hotkey.dwFlags = HKD_TCHAR;
+ hotkey.pszName = buf;
+ hotkey.ptszDescription = accName;
+ hotkey.ptszSection = LPGENT("Custom Status List");
+ hotkey.pszService = buf;
+ hotkey.DefHotKey = HOTKEYCODE( HOTKEYF_CONTROL | HOTKEYF_SHIFT, '0'+Number );
+ Hotkey_Register(&hotkey);
}
int CSList::initOptions( WPARAM wparam, LPARAM lparam )
diff --git a/plugins/Clist_modern/modern_keyboard.cpp b/plugins/Clist_modern/modern_keyboard.cpp
index 2bcd0a373f..ad686a1ec1 100644
--- a/plugins/Clist_modern/modern_keyboard.cpp
+++ b/plugins/Clist_modern/modern_keyboard.cpp
@@ -45,22 +45,19 @@ int InitSkinHotKeys(void)
CreateServiceFunction("CLIST/HK/RestoreStatus",hkRestoreStatus);
HOTKEYDESC shk = {0};
- shk.cbSize=sizeof(shk);
- shk.dwFlags=HKD_TCHAR;
+ shk.cbSize = sizeof(shk);
- shk.ptszDescription=LPGENT("Close Miranda");
- shk.pszName="CloseMiranda";
- shk.ptszSection=LPGENT("Main");
- shk.pszService="CLIST/HK/CloseMiranda";
- shk.DefHotKey=0;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&shk);
+ shk.pszDescription = LPGEN("Close Miranda");
+ shk.pszName = "CloseMiranda";
+ shk.pszSection = LPGEN("Main");
+ shk.pszService = "CLIST/HK/CloseMiranda";
+ Hotkey_Register(&shk);
- shk.ptszDescription=LPGENT("Restore last status");
- shk.pszName="RestoreLastStatus";
- shk.ptszSection=LPGENT("Status");
- shk.pszService="CLIST/HK/RestoreStatus";
- shk.DefHotKey=0;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&shk);
+ shk.pszDescription = LPGEN("Restore last status");
+ shk.pszName = "RestoreLastStatus";
+ shk.pszSection = LPGEN("Status");
+ shk.pszService = "CLIST/HK/RestoreStatus";
+ Hotkey_Register(&shk);
return 0;
}
diff --git a/plugins/Clist_mw/keyboard.cpp b/plugins/Clist_mw/keyboard.cpp
index 361a4f56f5..d099fab37c 100644
--- a/plugins/Clist_mw/keyboard.cpp
+++ b/plugins/Clist_mw/keyboard.cpp
@@ -39,26 +39,23 @@ INT_PTR hkRestoreStatus(WPARAM wParam,LPARAM lParam)
int InitSkinHotKeys(void)
{
- HOTKEYDESC shk = {0};
-
CreateServiceFunction("CLIST/HK/CloseMiranda",hkCloseMiranda);
CreateServiceFunction("CLIST/HK/RestoreStatus",hkRestoreStatus);
+ HOTKEYDESC shk = {0};
shk.cbSize = sizeof(shk);
- shk.pszDescription = "Close Miranda";
+ shk.pszDescription = LPGEN("Close Miranda");
shk.pszName = "CloseMiranda";
shk.pszSection = "Main";
shk.pszService = "CLIST/HK/CloseMiranda";
- shk.DefHotKey = 0;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&shk);
+ Hotkey_Register(&shk);
- shk.pszDescription = "Restore last status";
+ shk.pszDescription = LPGEN("Restore last status");
shk.pszName = "RestoreLastStatus";
shk.pszSection = "Status";
shk.pszService = "CLIST/HK/RestoreStatus";
- shk.DefHotKey = 0;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&shk);
+ Hotkey_Register(&shk);
return 0;
}
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c
index 7f752d36de..360065eb41 100644
--- a/plugins/Console/Console.c
+++ b/plugins/Console/Console.c
@@ -1259,12 +1259,9 @@ static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
CreateServiceFunction(MS_CONSOLE_SHOW_HIDE, ShowHideConsole);
-
- if (ServiceExists(MS_FONT_REGISTERT))
{
FontIDT fid={0};
-
- fid.cbSize=sizeof(fid);
+ fid.cbSize = sizeof(fid);
_tcscpy(fid.group,_T("Console"));
_tcscpy(fid.name,TranslateT("Text"));
strcpy(fid.dbSettingsGroup,"Console");
@@ -1286,11 +1283,10 @@ static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
hHooks[i++] = HookEvent(ME_FONT_RELOAD,OnFontChange);
}
- if (ServiceExists(MS_COLOUR_REGISTERT))
- {
- ColourIDT cid = {0};
+ {
+ ColourIDT cid = {0};
- cid.cbSize=sizeof(cid);
+ cid.cbSize=sizeof(cid);
_tcscpy(cid.group,_T("Console"));
_tcscpy(cid.name,_T("Background"));
strcpy(cid.dbSettingsGroup,"Console");
@@ -1301,28 +1297,23 @@ static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
CallService(MS_COLOUR_REGISTERT,(WPARAM)&cid,0);
hHooks[i++] = HookEvent(ME_COLOUR_RELOAD, OnColourChange);
- }
-
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC hkd = {0};
-
- hkd.cbSize=sizeof(hkd);
+ }
+ {
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
hkd.pszName = "Console_Show_Hide";
- hkd.pszDescription = Translate("Show/Hide Console");
+ hkd.pszDescription = LPGEN("Show/Hide Console");
hkd.pszSection = "Main";
hkd.pszService = MS_CONSOLE_SHOW_HIDE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_EXT, 'C');
+ Hotkey_Register(&hkd);
+ }
- CallService(MS_HOTKEY_REGISTER,(WPARAM)0,(LPARAM)&hkd);
- }
-
- if (ServiceExists(MS_TB_ADDBUTTON))
- {
+ if (ServiceExists(MS_TB_ADDBUTTON)) {
SKINICONDESC sid={0};
- TBButton tbb = {0};
- char szModuleFileName[MAX_PATH]={0};
+ TBButton tbb = {0};
+ char szModuleFileName[MAX_PATH]={0};
GetModuleFileNameA(hInst,szModuleFileName,MAX_PATH);
diff --git a/plugins/FavContacts/resource.h b/plugins/FavContacts/resource.h
index 4e3f557cf7..9466fd8859 100644
--- a/plugins/FavContacts/resource.h
+++ b/plugins/FavContacts/resource.h
@@ -24,7 +24,6 @@
#define IDC_BTN_FONTS 1015
#define IDC_TXT_RADIUS2 1016
#define IDC_TXT_MAXRECENT 1016
-#define IDC_BTN_HOTKEYS 1018
#define IDC_CHK_RIGHTAVATARS 1019
// Next default values for new objects
diff --git a/plugins/FavContacts/resource.rc b/plugins/FavContacts/resource.rc
index a96aabaf04..1aa618c55d 100644
--- a/plugins/FavContacts/resource.rc
+++ b/plugins/FavContacts/resource.rc
@@ -60,7 +60,6 @@ BEGIN
CONTROL "Enable groups",IDC_CHK_GROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,17,137,10
CONTROL "Multicolumn menu",IDC_CHK_GROUPCOLUMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,26,30,122,10
CONTROL "Configure fonts and colors...",IDC_BTN_FONTS,"Hyperlink",WS_TABSTOP,11,229,137,11
- CONTROL "Set up menu hotkey...",IDC_BTN_HOTKEYS,"Hyperlink",WS_TABSTOP,11,218,137,11
CONTROL "Align to the right",IDC_CHK_RIGHTAVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,26,69,122,10
CONTROL "Dim idle contact icons",IDC_CHK_DIMIDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,121,139,10
RTEXT "Show",IDC_STATIC,12,160,34,10,SS_CENTERIMAGE
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index a48cb4f536..c6dfaa7bb1 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -182,8 +182,7 @@ int ProcessReloadFonts(WPARAM wParam, LPARAM lParam)
int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- if (ServiceExists(MS_MSG_ADDICON))
- {
+ if (ServiceExists(MS_MSG_ADDICON)) {
StatusIconData sid = {0};
sid.cbSize = sizeof(sid);
sid.szModule = "FavContacts";
@@ -196,81 +195,78 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam)
HookEvent(ME_MSG_WINDOWEVENT, ProcessSrmmEvent);
}
- if (true /* ServiceExists(MS_FONT_REGISTERT) */)
- {
- //LOGFONT lf;
- //GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf);
-
- FontIDT fontid = {0};
- fontid.cbSize = sizeof(fontid);
- lstrcpy(fontid.group, _T("Favourite Contacts"));
- lstrcpyA(fontid.dbSettingsGroup, "FavContacts");
- lstrcpy(fontid.backgroundGroup, _T("Favourite Contacts"));
- fontid.flags = FIDF_DEFAULTVALID;
- fontid.deffontsettings.charset = DEFAULT_CHARSET;
- fontid.deffontsettings.size = -11;
- lstrcpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"));
- fontid.deffontsettings.style = 0;
-
- lstrcpy(fontid.backgroundName, _T("Background"));
-
- lstrcpy(fontid.name, _T("Contact name"));
- lstrcpyA(fontid.prefix, "fntName");
- fontid.deffontsettings.colour = GetSysColor(COLOR_MENUTEXT);
- fontid.deffontsettings.style = DBFONTF_BOLD;
- CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
-
- lstrcpy(fontid.name, _T("Second line"));
- lstrcpyA(fontid.prefix, "fntSecond");
- fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_MENUTEXT), GetSysColor(COLOR_MENU));
- fontid.deffontsettings.style = 0;
- CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
-
- lstrcpy(fontid.backgroundName, _T("Selected background"));
-
- lstrcpy(fontid.name, _T("Selected contact name (color)"));
- lstrcpyA(fontid.prefix, "fntNameSel");
- fontid.deffontsettings.colour = GetSysColor(COLOR_HIGHLIGHTTEXT);
- fontid.deffontsettings.style = DBFONTF_BOLD;
- CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
-
- lstrcpy(fontid.name, _T("Selected second line (color)"));
- lstrcpyA(fontid.prefix, "fntSecondSel");
- fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_HIGHLIGHTTEXT), GetSysColor(COLOR_HIGHLIGHT));
- fontid.deffontsettings.style = 0;
- CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
-
- ColourIDT colourid = {0};
- colourid.cbSize = sizeof(colourid);
- lstrcpy(colourid.group, _T("Favourite Contacts"));
- lstrcpyA(colourid.dbSettingsGroup, "FavContacts");
-
- lstrcpy(colourid.name, _T("Background"));
- lstrcpyA(colourid.setting, "BackColour");
- colourid.defcolour = GetSysColor(COLOR_MENU);
- CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0);
-
- lstrcpy(colourid.name, _T("Selected background"));
- lstrcpyA(colourid.setting, "SelectedColour");
- colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
- CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0);
-
- HookEvent(ME_FONT_RELOAD, ProcessReloadFonts);
- HookEvent(ME_COLOUR_RELOAD, ProcessReloadFonts);
- ProcessReloadFonts(0, 0);
- }
+ /////////////////////////////////////////////////////////////////////////////////////
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC hotkey = {0};
- hotkey.cbSize = sizeof(hotkey);
- hotkey.pszName = "FavContacts/ShowMenu";
- hotkey.pszDescription = "Show favourite contacts";
- hotkey.pszSection = "Contacts";
- hotkey.pszService = MS_FAVCONTACTS_SHOWMENU_CENTERED;
- hotkey.DefHotKey = MAKEWORD('Q', HOTKEYF_EXT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hotkey);
- }
+ FontIDT fontid = {0};
+ fontid.cbSize = sizeof(fontid);
+ lstrcpy(fontid.group, _T("Favourite Contacts"));
+ lstrcpyA(fontid.dbSettingsGroup, "FavContacts");
+ lstrcpy(fontid.backgroundGroup, _T("Favourite Contacts"));
+ fontid.flags = FIDF_DEFAULTVALID;
+ fontid.deffontsettings.charset = DEFAULT_CHARSET;
+ fontid.deffontsettings.size = -11;
+ lstrcpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"));
+ fontid.deffontsettings.style = 0;
+
+ lstrcpy(fontid.backgroundName, _T("Background"));
+
+ lstrcpy(fontid.name, _T("Contact name"));
+ lstrcpyA(fontid.prefix, "fntName");
+ fontid.deffontsettings.colour = GetSysColor(COLOR_MENUTEXT);
+ fontid.deffontsettings.style = DBFONTF_BOLD;
+ CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
+
+ lstrcpy(fontid.name, _T("Second line"));
+ lstrcpyA(fontid.prefix, "fntSecond");
+ fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_MENUTEXT), GetSysColor(COLOR_MENU));
+ fontid.deffontsettings.style = 0;
+ CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
+
+ lstrcpy(fontid.backgroundName, _T("Selected background"));
+
+ lstrcpy(fontid.name, _T("Selected contact name (color)"));
+ lstrcpyA(fontid.prefix, "fntNameSel");
+ fontid.deffontsettings.colour = GetSysColor(COLOR_HIGHLIGHTTEXT);
+ fontid.deffontsettings.style = DBFONTF_BOLD;
+ CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
+
+ lstrcpy(fontid.name, _T("Selected second line (color)"));
+ lstrcpyA(fontid.prefix, "fntSecondSel");
+ fontid.deffontsettings.colour = sttShadeColor(GetSysColor(COLOR_HIGHLIGHTTEXT), GetSysColor(COLOR_HIGHLIGHT));
+ fontid.deffontsettings.style = 0;
+ CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+
+ ColourIDT colourid = {0};
+ colourid.cbSize = sizeof(colourid);
+ lstrcpy(colourid.group, _T("Favourite Contacts"));
+ lstrcpyA(colourid.dbSettingsGroup, "FavContacts");
+
+ lstrcpy(colourid.name, _T("Background"));
+ lstrcpyA(colourid.setting, "BackColour");
+ colourid.defcolour = GetSysColor(COLOR_MENU);
+ CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0);
+
+ lstrcpy(colourid.name, _T("Selected background"));
+ lstrcpyA(colourid.setting, "SelectedColour");
+ colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT);
+ CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0);
+
+ HookEvent(ME_FONT_RELOAD, ProcessReloadFonts);
+ HookEvent(ME_COLOUR_RELOAD, ProcessReloadFonts);
+ ProcessReloadFonts(0, 0);
+
+ /////////////////////////////////////////////////////////////////////////////////////
+
+ HOTKEYDESC hotkey = {0};
+ hotkey.cbSize = sizeof(hotkey);
+ hotkey.pszName = "FavContacts/ShowMenu";
+ hotkey.pszDescription = "Show favourite contacts";
+ hotkey.pszSection = "Contacts";
+ hotkey.pszService = MS_FAVCONTACTS_SHOWMENU_CENTERED;
+ hotkey.DefHotKey = MAKEWORD('Q', HOTKEYF_EXT);
+ Hotkey_Register(&hotkey);
if (ServiceExists(MS_AV_GETAVATARBITMAP))
{
@@ -301,6 +297,8 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) int Load(PLUGINLINK * link)
{
pluginLink = link;
@@ -342,41 +340,40 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK * link)
HookEvent(ME_SYSTEM_MODULESLOADED, ProcessModulesLoaded);
hhkProcessTBLoaded = HookEvent(ME_TB_MODULELOADED, ProcessTBLoaded);
- if (true /*ServiceExists(MS_SKIN2_ADDICON)*/)
- {
- TCHAR buf[MAX_PATH];
- GetModuleFileName(g_hInst, buf, SIZEOF(buf));
+ /////////////////////////////////////////////////////////////////////////////////////
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(sid);
- sid.ptszSection = _T("Favourites");
- sid.ptszDefaultFile = buf;
- sid.cx = sid.cy = 16;
- sid.flags = SIDF_ALL_TCHAR;
-
- sid.pszName = "favcontacts_favourite";
- sid.ptszDescription = _T("Favourite Contact");
- sid.iDefaultIndex = -IDI_FAVOURITE;
- g_icoFavourite = CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
-
- sid.pszName = "favcontacts_regular";
- sid.ptszDescription = _T("Regular Contact");
- sid.iDefaultIndex = -IDI_REGULAR;
- g_icoRegular = CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
+ TCHAR buf[MAX_PATH];
+ GetModuleFileName(g_hInst, buf, SIZEOF(buf));
+
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszSection = _T("Favourites");
+ sid.ptszDefaultFile = buf;
+ sid.cx = sid.cy = 16;
+ sid.flags = SIDF_ALL_TCHAR;
+
+ sid.pszName = "favcontacts_favourite";
+ sid.ptszDescription = _T("Favourite Contact");
+ sid.iDefaultIndex = -IDI_FAVOURITE;
+ g_icoFavourite = CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ sid.pszName = "favcontacts_regular";
+ sid.ptszDescription = _T("Regular Contact");
+ sid.iDefaultIndex = -IDI_REGULAR;
+ g_icoRegular = CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
LoadHttpApi();
-#ifdef _DEBUG
- CLISTMENUITEM mi = { 0 };
- mi.cbSize = sizeof(mi);
- mi.flags = CMIF_ICONFROMICOLIB;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
- mi.position = 1900000000;
- mi.pszName = LPGEN("&Favourite Contacts...");
- mi.pszService = MS_FAVCONTACTS_SHOWMENU;
- Menu_AddMainMenuItem(&mi);
-#endif
+ #ifdef _DEBUG
+ CLISTMENUITEM mi = { 0 };
+ mi.cbSize = sizeof(mi);
+ mi.flags = CMIF_ICONFROMICOLIB;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.position = 1900000000;
+ mi.pszName = LPGEN("&Favourite Contacts...");
+ mi.pszService = MS_FAVCONTACTS_SHOWMENU;
+ Menu_AddMainMenuItem(&mi);
+ #endif
return 0;
}
@@ -1171,8 +1168,7 @@ static void sttActivateOptionsPage(HWND hwnd, TCHAR *aSection, TCHAR *aPage)
TCHAR *section = TranslateTS(aSection);
HWND hwndTree = FindWindowEx(GetParent(hwnd), NULL, WC_TREEVIEW, NULL);
- for (HTREEITEM htiSection = TreeView_GetRoot(hwndTree); htiSection; htiSection = TreeView_GetNextSibling(hwndTree, htiSection))
- {
+ for (HTREEITEM htiSection = TreeView_GetRoot(hwndTree); htiSection; htiSection = TreeView_GetNextSibling(hwndTree, htiSection)) {
TVITEM tvi = {0};
tvi.mask = TVIF_TEXT;
tvi.hItem = htiSection;
@@ -1180,20 +1176,15 @@ static void sttActivateOptionsPage(HWND hwnd, TCHAR *aSection, TCHAR *aPage)
tvi.cchTextMax = SIZEOF(buf);
TreeView_GetItem(hwndTree, &tvi);
- if (!lstrcmp(buf, section))
- {
- if (!aPage)
- {
+ if (!lstrcmp(buf, section)) {
+ if (!aPage) {
TreeView_Select(hwndTree, htiSection, TVGN_CARET);
return;
- } else
- {
- TreeView_Expand(hwndTree, htiSection, TVE_EXPAND);
}
+ else TreeView_Expand(hwndTree, htiSection, TVE_EXPAND);
TCHAR *page = TranslateTS(aPage);
- for (HTREEITEM htiPage = TreeView_GetChild(hwndTree, htiSection); htiPage; htiPage = TreeView_GetNextSibling(hwndTree, htiPage))
- {
+ for (HTREEITEM htiPage = TreeView_GetChild(hwndTree, htiSection); htiPage; htiPage = TreeView_GetNextSibling(hwndTree, htiPage)) {
TVITEM tvi = {0};
tvi.mask = TVIF_TEXT;
tvi.hItem = htiPage;
@@ -1201,8 +1192,7 @@ static void sttActivateOptionsPage(HWND hwnd, TCHAR *aSection, TCHAR *aPage)
tvi.cchTextMax = SIZEOF(buf);
TreeView_GetItem(hwndTree, &tvi);
- if (!lstrcmp(buf, page))
- {
+ if (!lstrcmp(buf, page)) {
TreeView_Select(hwndTree, htiPage, TVGN_CARET);
return;
}
@@ -1254,9 +1244,6 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
DBGetContactSettingByte(hContact, "FavContacts", "IsFavourite", 0));
}
- if (!ServiceExists(MS_HOTKEY_REGISTER))
- EnableWindow(GetDlgItem(hwnd, IDC_BTN_HOTKEYS), FALSE);
-
bInitialized = true;
PostMessage(hwnd, WM_APP, 0, 0);
@@ -1340,13 +1327,6 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
PostMessage(hwnd, WM_APP, 0, 0);
break;
- case IDC_BTN_HOTKEYS:
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- sttActivateOptionsPage(hwnd, _T("Customize"), _T("Hotkeys"));
- }
- break;
-
case IDC_BTN_FONTS:
sttActivateOptionsPage(hwnd, _T("Customize"), _T("Fonts"));
break;
diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp
index fc098001d3..f05fda305d 100644
--- a/plugins/FloatingContacts/main.cpp
+++ b/plugins/FloatingContacts/main.cpp
@@ -1086,22 +1086,21 @@ static void LoadMenus()
mi.pszService = sModule "/MainHideAllThumbs";
Menu_AddMainMenuItem(&mi);
- if (ServiceExists(MS_HOTKEY_REGISTER)) {
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
- hkd.pszSection = "Floating Contacts";
+ // Register hotkeys
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszSection = "Floating Contacts";
- hkd.pszName = sModule "/MainHideAllThumbs";
- hkd.pszDescription = "Show/Hide all thumbs";
- hkd.pszService = sModule "/MainHideAllThumbs";
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
-
- hHideWhenCListShow = CreateServiceFunction( sModule "/HideWhenCListShow", OnHotKey_HideWhenCListShow );
- hkd.pszName = sModule "/HideWhenCListShow";
- hkd.pszDescription = "Hide when contact list is shown";
- hkd.pszService = sModule "/HideWhenCListShow";
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
- }
+ hkd.pszName = sModule "/MainHideAllThumbs";
+ hkd.pszDescription = LPGEN("Show/Hide all thumbs");
+ hkd.pszService = sModule "/MainHideAllThumbs";
+ Hotkey_Register(&hkd);
+
+ hHideWhenCListShow = CreateServiceFunction( sModule "/HideWhenCListShow", OnHotKey_HideWhenCListShow );
+ hkd.pszName = sModule "/HideWhenCListShow";
+ hkd.pszDescription = LPGEN("Hide when contact list is shown");
+ hkd.pszService = sModule "/HideWhenCListShow";
+ Hotkey_Register(&hkd);
}
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index 68df0a7218..486a32b7a2 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -495,28 +495,26 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
}
// Hotkeys support
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
- hkd.pszSection = Translate("Listening to");
-
- hkd.pszService = MS_LISTENINGTO_HOTKEYS_ENABLE;
- hkd.pszName = "ListeningTo/EnableAll";
- hkd.pszDescription = Translate("Send to all protocols");
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
-
- hkd.pszService = MS_LISTENINGTO_HOTKEYS_DISABLE;
- hkd.pszName = "ListeningTo/DisableAll";
- hkd.pszDescription = Translate("Don't send to any protocols");
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
-
- hkd.pszService = MS_LISTENINGTO_HOTKEYS_TOGGLE;
- hkd.pszName = "ListeningTo/ToggleAll";
- hkd.pszDescription = Translate("Toggle send to all protocols");
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
- }
-
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszSection = LPGEN("Listening to");
+
+ hkd.pszService = MS_LISTENINGTO_HOTKEYS_ENABLE;
+ hkd.pszName = "ListeningTo/EnableAll";
+ hkd.pszDescription = LPGEN("Send to all protocols");
+ Hotkey_Register(&hkd);
+
+ hkd.pszService = MS_LISTENINGTO_HOTKEYS_DISABLE;
+ hkd.pszName = "ListeningTo/DisableAll";
+ hkd.pszDescription = LPGEN("Don't send to any protocols");
+ Hotkey_Register(&hkd);
+
+ hkd.pszService = MS_LISTENINGTO_HOTKEYS_TOGGLE;
+ hkd.pszName = "ListeningTo/ToggleAll";
+ hkd.pszDescription = LPGEN("Toggle send to all protocols");
+ Hotkey_Register(&hkd);
+
+ //
SetListeningInfos(NULL);
StartTimer();
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp
index f0f5ea8d69..eef80fc3f4 100644
--- a/plugins/PackUpdater/Src/Events.cpp
+++ b/plugins/PackUpdater/Src/Events.cpp
@@ -35,7 +35,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hkd.pszService = MODNAME"/CheckUpdates";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
if (AllowUpdateOnStartup())
DoCheck(UpdateOnStartup, (int)CheckThread);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 73920652fb..a239965695 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -367,13 +367,13 @@ void LoadHotkey() {
hk.ptszDescription = LPGENT("Toggle Popups");
hk.ptszSection = LPGENT(MODULNAME_PLU);
hk.pszService = MENUCOMMAND_SVC;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &hk);
+ Hotkey_Register( &hk);
// 'Popup History' Hotkey
hk.pszName = "Popup History";
hk.ptszDescription = LPGENT("Popup History");
hk.pszService = MENUCOMMAND_HISTORY;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &hk);
+ Hotkey_Register( &hk);
}
//menu
diff --git a/plugins/RecentContacts/RecentContacts.cpp b/plugins/RecentContacts/RecentContacts.cpp
index 3e43af0daa..8e9f4d8c07 100644
--- a/plugins/RecentContacts/RecentContacts.cpp
+++ b/plugins/RecentContacts/RecentContacts.cpp
@@ -609,17 +609,15 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
}
*/
- if (ServiceExists(MS_HOTKEY_REGISTER)) {
- // hotkeys
- HOTKEYDESC hotkey = {0};
- hotkey.cbSize = sizeof(hotkey);
- hotkey.pszName = msLastUC_ShowList;
- hotkey.pszDescription = LPGEN("Show Recent Contacts");
- hotkey.pszSection = "Contacts";
- hotkey.pszService = msLastUC_ShowList;
- hotkey.DefHotKey = MAKEWORD('R', HOTKEYF_CONTROL | HOTKEYF_SHIFT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hotkey);
- }
+ // hotkeys
+ HOTKEYDESC hk = {0};
+ hk.cbSize = sizeof(hk);
+ hk.pszName = msLastUC_ShowList;
+ hk.pszDescription = LPGEN("Show Recent Contacts");
+ hk.pszSection = "Contacts";
+ hk.pszService = msLastUC_ShowList;
+ hk.DefHotKey = MAKEWORD('R', HOTKEYF_CONTROL | HOTKEYF_SHIFT);
+ Hotkey_Register(&hk);
return 0;
}
diff --git a/plugins/Scriver/input.c b/plugins/Scriver/input.c
index c941479b60..57480d0a3c 100644
--- a/plugins/Scriver/input.c
+++ b/plugins/Scriver/input.c
@@ -299,21 +299,21 @@ void RegisterKeyBindings() {
desc.pszDescription = "Navigate: Previous Tab";
desc.lParam = KB_PREV_TAB;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_TAB);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_PRIOR);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, VK_LEFT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Nav/Next Tab";
desc.pszDescription = "Navigate: Next Tab";
desc.lParam = KB_NEXT_TAB;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_TAB);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_NEXT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, VK_RIGHT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = strName;
desc.pszDescription = strDesc;
for (i = 0; i < 9; i++) {
@@ -321,70 +321,70 @@ void RegisterKeyBindings() {
mir_snprintf(strDesc, SIZEOF(strDesc), "Navigate: Tab %d", i + 1);
desc.lParam = KB_TAB1 + i;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, '1' + i);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
}
desc.pszName = "Scriver/Wnd/Toggle Statusbar";
desc.pszDescription = "Window: Toggle Statusbar";
desc.lParam = KB_SWITCHSTATUSBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'S');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Toggle Titlebar";
desc.pszDescription = "Window: Toggle Titlebar";
desc.lParam = KB_SWITCHTITLEBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'M');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Toggle Toolbar";
desc.pszDescription = "Window: Toggle Toolbar";
desc.lParam = KB_SWITCHTOOLBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'T');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Toggle Infobar";
desc.pszDescription = "Window: Toggle Infobar";
desc.lParam = KB_SWITCHINFOBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'N');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Clear Log";
desc.pszDescription = "Window: Clear Log";
desc.lParam = KB_CLEAR_LOG;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'L');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Minimize";
desc.pszDescription = "Window: Minimize";
desc.lParam = KB_MINIMIZE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT, VK_ESCAPE);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Wnd/Close Tab";
desc.pszDescription = "Window: Close Tab";
desc.lParam = KB_CLOSE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F4);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'W');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Action/Quote";
desc.pszDescription = "Action: Quote";
desc.lParam = KB_QUOTE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'Q');
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Action/Send All";
desc.pszDescription = "Action: Send to All";
desc.lParam = KB_SEND_ALL;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, VK_RETURN);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
desc.pszName = "Scriver/Action/PasteSend";
desc.pszDescription = "Action: Paste & Send";
desc.lParam = KB_PASTESEND;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, VK_INSERT);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &desc);
+ Hotkey_Register( &desc);
}
BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK *lParam) {
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 496b279efd..a002af0f87 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -926,22 +926,22 @@ static int PluginInit(WPARAM wparam,LPARAM lparam)
hkd.pszName = "OpenSessionsManager";
hkd.ptszDescription = _T("Open Sessions Manager");
hkd.pszService = MS_SESSIONS_OPENMANAGER;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "RestoreLastSession";
hkd.ptszDescription = _T("Restore last Session");
hkd.pszService = MS_SESSIONS_RESTORELASTSESSION;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "SaveSession";
hkd.ptszDescription = _T("Save Session");
hkd.pszService = MS_SESSIONS_SAVEUSERSESSION;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "CloseSession";
hkd.ptszDescription = _T("Close Session");
hkd.pszService = MS_SESSIONS_CLOSESESSION;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hiChecked = LoadIcon(hinstance, MAKEINTRESOURCE(IDD_SESSION_CHECKED));
hiNotChecked = LoadIcon(hinstance, MAKEINTRESOURCE(IDD_SESSION_UNCHECKED));
diff --git a/plugins/SimpleStatusMsg/main.cpp b/plugins/SimpleStatusMsg/main.cpp
index f2d3e16613..ae103b715a 100644
--- a/plugins/SimpleStatusMsg/main.cpp
+++ b/plugins/SimpleStatusMsg/main.cpp
@@ -1642,7 +1642,7 @@ void RegisterHotkey(void)
hkd.ptszSection = _T("Status Message");
hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
}
static int OnIconsChanged(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/SpellChecker/spellchecker.cpp b/plugins/SpellChecker/spellchecker.cpp
index c121b57cda..348e15a51c 100644
--- a/plugins/SpellChecker/spellchecker.cpp
+++ b/plugins/SpellChecker/spellchecker.cpp
@@ -373,18 +373,14 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
}
}
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
- hkd.pszName = "Spell Checker/Toggle";
- hkd.ptszSection = LPGENT("Spell Checker");
- hkd.ptszDescription = LPGENT("Enable/disable spell checker");
- hkd.dwFlags = HKD_TCHAR;
-// hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_ALT, 'S');
- hkd.lParam = HOTKEY_ACTION_TOGGLE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &hkd);
- }
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszName = "Spell Checker/Toggle";
+ hkd.pszSection = LPGEN("Spell Checker");
+ hkd.pszDescription = LPGEN("Enable/disable spell checker");
+ hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_ALT, 'S');
+ hkd.lParam = HOTKEY_ACTION_TOGGLE;
+ Hotkey_Register( &hkd);
loaded = TRUE;
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp
index 919171c7f0..e0935bcdb6 100644
--- a/plugins/Svc_crshdmp/crshdmp.cpp
+++ b/plugins/Svc_crshdmp/crshdmp.cpp
@@ -359,12 +359,12 @@ static int ModulesLoaded(WPARAM, LPARAM)
hk.pszDescription = LPGEN("Copy Version Info to clipboard");
hk.pszName = "CopyVerInfo";
hk.pszService = MS_CRASHDUMPER_STORETOCLIP;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hk);
+ Hotkey_Register(&hk);
hk.pszDescription = LPGEN("Show Version Info");
hk.pszName = "ShowVerInfo";
hk.pszService = MS_CRASHDUMPER_VIEWINFO;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hk);
+ Hotkey_Register(&hk);
if (servicemode) ViewVersionInfo(0, 0);
else
diff --git a/plugins/Svc_dbepp/main.cpp b/plugins/Svc_dbepp/main.cpp
index dd6da983e4..7ec81267a3 100644
--- a/plugins/Svc_dbepp/main.cpp
+++ b/plugins/Svc_dbepp/main.cpp
@@ -323,11 +323,9 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
CLISTMENUITEM mi = { 0 };
mi.cbSize = sizeof(mi);
mi.position = 1900000001;
- mi.flags = CMIF_TCHAR;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
- mi.ptszName = _T(modFullname);
+ mi.pszName = modFullname;
mi.pszService = "DBEditorpp/MenuCommand";
- mi.pszContactOwner = NULL;
Menu_AddMainMenuItem(&mi);
ZeroMemory(&mi, sizeof(mi));
@@ -335,9 +333,8 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
mi.position = 1900000001;
mi.flags = DBGetContactSettingByte(NULL,modname,"UserMenuItem",0)?0:CMIF_HIDDEN;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGUSER));
- mi.ptszName = LPGENT("Open user tree in DBE++");
+ mi.pszName = LPGEN("Open user tree in DBE++");
mi.pszService = "DBEditorpp/MenuCommand";
- mi.pszContactOwner = NULL;
hUserMenu = Menu_AddContactMenuItem(&mi);
sServicemodeLaunch = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
@@ -345,29 +342,22 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
CallService("DBEditorpp/RegisterSingleModule",(WPARAM)modname,0);
// Ensure that the common control DLL is loaded.
- {
- INITCOMMONCONTROLSEX icex;
-
- icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
- icex.dwICC = ICC_LISTVIEW_CLASSES;
- InitCommonControlsEx(&icex);
- }
+ INITCOMMONCONTROLSEX icex;
+ icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ icex.dwICC = ICC_LISTVIEW_CLASSES;
+ InitCommonControlsEx(&icex);
ZeroMemory(&WatchListArray, sizeof(WatchListArray));
- if(ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
- hkd.dwFlags = HKD_TCHAR;
- hkd.pszName = "hk_dbepp_open";
- hkd.pszService = "DBEditorpp/MenuCommand";
- hkd.ptszDescription = LPGENT("Open Database Editor");
- hkd.ptszSection = _T(modFullname);
- hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_EXT, 'D');
-
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&hkd);
- }
+ // Register hotkeys
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszName = "hk_dbepp_open";
+ hkd.pszService = "DBEditorpp/MenuCommand";
+ hkd.ptszDescription = LPGEN("Open Database Editor");
+ hkd.ptszSection = modFullname;
+ hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_EXT, 'D');
+ Hotkey_Register(&hkd);
return 0;
}
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index ef5eeaf3af..65f8da6228 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -167,7 +167,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
for(i = 0; i < safe_sizeof(_hotkeydescs); i++) {
_hotkeydescs[i].cbSize = sizeof(HOTKEYDESC);
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&_hotkeydescs[i]);
+ Hotkey_Register(&_hotkeydescs[i]);
}
WM_TASKBARCREATED = RegisterWindowMessageA("TaskbarCreated");
diff --git a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
index c1828bfc5b..b6f0e43207 100644
--- a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
@@ -95,14 +95,14 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/ConvertLastOrSelected";
hkd.ptszDescription = _T("Convert Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT+HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
hkd.lParam = TRUE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitAllOrSelected";
hkd.ptszDescription = _T("Translit All / Selected");
@@ -110,14 +110,14 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitLastOrSelected";
hkd.ptszDescription = _T("Translit Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT+HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = TRUE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseAllOrSelected";
hkd.ptszDescription = _T("Invert Case All / Selected");
@@ -125,14 +125,14 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseLastOrSelected";
hkd.ptszDescription = _T("Invert Case Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT+HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = TRUE;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+ Hotkey_Register(&hkd);
hOnButtonPressed = HookEvent(ME_MSG_BUTTONPRESSED, OnButtonPressed);
if (ServiceExists(MS_BB_ADDBUTTON) && ServiceExists(MS_SKIN2_ADDICON))
diff --git a/plugins/Updater/updater.cpp b/plugins/Updater/updater.cpp
index 531689e5d1..8d6d3f9b2a 100644
--- a/plugins/Updater/updater.cpp
+++ b/plugins/Updater/updater.cpp
@@ -154,31 +154,28 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ar);
}
- if (ServiceExists(MS_HOTKEY_REGISTER))
- {
- HOTKEYDESC shk = {0};
-
- shk.cbSize = sizeof(shk);
- shk.pszSection = LPGEN("Updater");
-
- shk.pszDescription = LPGEN("Check for Updates");
- shk.pszName = "Update";
- shk.pszService = MS_UPDATE_CHECKFORUPDATES;
-// shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'U') | HKF_MIRANDA_LOCAL;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk);
-
- shk.pszDescription = LPGEN("Restart");
- shk.pszName = "Restart";
- shk.pszService = MS_UPDATE_MENURESTART;
-// shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'R') | HKF_MIRANDA_LOCAL;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk);
-
- shk.pszDescription = LPGEN("Update and Exit");
- shk.pszName = "UpdateAndExit";
- shk.pszService = MS_UPDATE_MENUUPDATEANDEXIT;
- shk.DefHotKey = 0;
- CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk);
- }
+ // register hotkeys
+ HOTKEYDESC shk = {0};
+ shk.cbSize = sizeof(shk);
+ shk.pszSection = LPGEN("Updater");
+
+ shk.pszDescription = LPGEN("Check for Updates");
+ shk.pszName = "Update";
+ shk.pszService = MS_UPDATE_CHECKFORUPDATES;
+ shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'U') | HKF_MIRANDA_LOCAL;
+ Hotkey_Register(&shk);
+
+ shk.pszDescription = LPGEN("Restart");
+ shk.pszName = "Restart";
+ shk.pszService = MS_UPDATE_MENURESTART;
+ shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'R') | HKF_MIRANDA_LOCAL;
+ Hotkey_Register(&shk);
+
+ shk.pszDescription = LPGEN("Update and Exit");
+ shk.pszName = "UpdateAndExit";
+ shk.pszService = MS_UPDATE_MENUUPDATEANDEXIT;
+ shk.DefHotKey = 0;
+ Hotkey_Register(&shk);
return 0;
}
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index a4e24cae9b..60718f5861 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -1129,15 +1129,13 @@ VOID DlgAnniversaryListOnToolBarLoaded()
**/
VOID DlgAnniversaryListLoadModule()
{
- HOTKEYDESC hk;
-
myCreateServiceFunction(MS_USERINFO_REMINDER_LIST, DlgAnniversaryListShow);
- ZeroMemory(&hk, sizeof(HOTKEYDESC));
+ HOTKEYDESC hk = { 0 };
hk.cbSize = sizeof(HOTKEYDESC);
hk.pszSection = MODNAME;
hk.pszName = "AnniversaryList";
hk.pszDescription = LPGEN("Popup Anniversary list");
hk.pszService = MS_USERINFO_REMINDER_LIST;
- CallService(MS_HOTKEY_REGISTER, NULL, (LPARAM)&hk);
+ Hotkey_Register(&hk);
}
diff --git a/plugins/UserInfoEx/svc_refreshci.cpp b/plugins/UserInfoEx/svc_refreshci.cpp
index fa3b00a584..b5e84d004a 100644
--- a/plugins/UserInfoEx/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/svc_refreshci.cpp
@@ -932,5 +932,5 @@ VOID SvcRefreshContactInfoLoadModule(VOID)
hk.pszName = "RefreshContactDetails";
hk.pszDescription = LPGEN("Refresh Contact Details");
hk.pszService = MS_USERINFO_REFRESH;
- CallService(MS_HOTKEY_REGISTER, NULL, (LPARAM)&hk);
+ Hotkey_Register(&hk);
}
diff --git a/plugins/UserInfoEx/svc_reminder.cpp b/plugins/UserInfoEx/svc_reminder.cpp
index 7899ccadc4..5b64720656 100644
--- a/plugins/UserInfoEx/svc_reminder.cpp
+++ b/plugins/UserInfoEx/svc_reminder.cpp
@@ -1210,13 +1210,14 @@ VOID SvcReminderLoadModule(VOID)
myCreateServiceFunction(MS_USERINFO_REMINDER_CHECK, CheckService);
myCreateServiceFunction(MS_USERINFO_REMINDER_AGGRASIVEBACKUP, BackupBirthdayService);
+ // register hotkey
HOTKEYDESC hk = { 0 };
hk.cbSize = sizeof(HOTKEYDESC);
hk.pszSection = MODNAME;
hk.pszName = "ReminderCheck";
hk.pszDescription = LPGEN("Check anniversaries");
hk.pszService = MS_USERINFO_REMINDER_CHECK;
- CallService(MS_HOTKEY_REGISTER, NULL, (LPARAM)&hk);
+ Hotkey_Register(&hk);
}
/**
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp
index bec98e9b4c..3b9d2dadef 100644
--- a/plugins/WhenWasIt/hooked_events.cpp
+++ b/plugins/WhenWasIt/hooked_events.cpp
@@ -97,7 +97,6 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
hExtraImageApply = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnExtraImageApply);
hContactSettingChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
hTopToolBarModuleLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarModuleLoaded);
- //hContactSendMessage = HookEvent(ME_WWI_SENDMESSAGE, OnContactSendMessage);
SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, "WhenWasIt", "Birthday near");
SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, "WhenWasIt", "Birthday today");
@@ -155,22 +154,20 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
cl.pszName = "Add/change user &birthday";
hmAddChangeBirthday = Menu_AddMainMenuItem(&cl);
- if(ServiceExists(MS_HOTKEY_REGISTER)) {
- HOTKEYDESC hotkey = {0};
- hotkey.cbSize = sizeof(hotkey);
- hotkey.dwFlags = HKD_TCHAR;
- hotkey.ptszSection = LPGENT("Birthdays");
+ // Register hotkeys
+ HOTKEYDESC hotkey = {0};
+ hotkey.cbSize = sizeof(hotkey);
+ hotkey.pszSection = LPGEN("Birthdays");
- hotkey.pszName = "wwi_birthday_list";
- hotkey.ptszDescription = LPGENT("Birthday list");
- hotkey.pszService = MS_WWI_LIST_SHOW;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&hotkey);
+ hotkey.pszName = "wwi_birthday_list";
+ hotkey.pszDescription = LPGEN("Birthday list");
+ hotkey.pszService = MS_WWI_LIST_SHOW;
+ Hotkey_Register(&hotkey);
- hotkey.pszName = "wwi_check_birthdays";
- hotkey.ptszDescription = LPGENT("Check for birthdays");
- hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
- CallService(MS_HOTKEY_REGISTER,0,(LPARAM)&hotkey);
- }
+ hotkey.pszName = "wwi_check_birthdays";
+ hotkey.ptszDescription = LPGENT("Check for birthdays");
+ hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
+ Hotkey_Register(&hotkey);
return 0;
}