diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-22 17:14:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-22 17:14:39 +0300 |
commit | 737d05018bbc2da54414bea0c2ccce6f1e15bde2 (patch) | |
tree | 35f84ba2f7e3db56618b8925654b9e84593fe4fe | |
parent | 869094d2aabef8ab10a1178907cb31ae84f504f9 (diff) |
Hotkey_Register => CMPlugin::addHotkey
50 files changed, 107 insertions, 99 deletions
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index 016a4864b1..3964415921 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -53,7 +53,7 @@ struct HOTKEYDESC // Registers new hotkey
// Returns 0 on failure or hotkey atom id on success
-EXTERN_C MIR_APP_DLL(int) Hotkey_Register(const HOTKEYDESC *hk, int = hLangpack);
+EXTERN_C MIR_APP_DLL(int) Hotkey_Register(const HOTKEYDESC *hk, int langId);
/////////////////////////////////////////////////////////////////////////////////////////
// Unregister existing hotkey
diff --git a/include/m_icolib.h b/include/m_icolib.h index 3e8bdef226..465ccf36b2 100644 --- a/include/m_icolib.h +++ b/include/m_icolib.h @@ -60,7 +60,7 @@ extern "C" // Adds an icon into the icon library
// returns a handle to the newly added item
-MIR_APP_DLL(HANDLE) IcoLib_AddIcon(SKINICONDESC *sid, int langId);
+MIR_APP_DLL(HANDLE) IcoLib_AddIcon(const SKINICONDESC *sid, int langId);
///////////////////////////////////////////////////////////////////////////////
// Removes an icon from icon library by icon's name or handle
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 3e8f2d6993..611b92b7b0 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -199,8 +199,9 @@ public: void openOptions(const wchar_t *pszGroup, const wchar_t *pszPage = 0, const wchar_t *pszTab = 0);
void openOptionsPage(const wchar_t *pszGroup, const wchar_t *pszPage = 0, const wchar_t *pszTab = 0);
- HANDLE addIcon(struct SKINICONDESC*);
+ HANDLE addIcon(const struct SKINICONDESC*);
+ int addHotkey(const struct HOTKEYDESC*);
int addSound(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = nullptr);
int addUserInfo(WPARAM wParam, struct OPTIONSDIALOGPAGE *odp);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex e6a8f5d1bc..cbe8c84467 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex b224143391..4e9c9e999c 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index d752236830..720395d8bc 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -129,7 +129,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) hkd.szSection.w = LPGENW("Main");
hkd.pszService = MS_ADDCONTACTPLUS_SHOW;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'C') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
OnAccListChanged(0, 0);
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index e80f819147..aceb66cc18 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -205,5 +205,5 @@ void AddHotkey() hkd.szSection.w = LPGENW("Main");
hkd.pszService = "AutoShutdown/MenuCommand";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'T') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 0c13190e5a..839a42fcd4 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -272,7 +272,7 @@ void Options::Load(void) hid.pszService = g_HotkeyOptionsList[i].pszService;
hid.DefHotKey = g_HotkeyOptionsList[i].DefHotKey;
hid.lParam = g_HotkeyOptionsList[i].lParam;
- Hotkey_Register(&hid);
+ g_plugin.addHotkey(&hid);
}
showContacts = db_get_b(0, MODULENAME, "showContacts", 0) ? true : false;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 1ce90fa190..0f7e6b2680 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -557,7 +557,7 @@ void RegisterCoreHotKeys(void) hotkey.pszService = MS_BOSSKEY_HIDE;
hotkey.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F12);
- Hotkey_Register(&hotkey);
+ g_plugin.addHotkey(&hotkey);
}
static int TopToolbarInit(WPARAM, LPARAM)
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 5182886fde..8dd2ce56f0 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -160,7 +160,7 @@ void RegisterHotkeys(char buf[200], wchar_t* accName, int Number) hotkey.szSection.w = LPGENW("Custom Status List"); hotkey.pszService = buf; hotkey.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, '0' + Number); - Hotkey_Register(&hotkey); + g_plugin.addHotkey(&hotkey); } void SetStatus(WORD code, StatusItem* item, char *szAccName) diff --git a/plugins/Clist_modern/src/modern_keyboard.cpp b/plugins/Clist_modern/src/modern_keyboard.cpp index 07037071b3..219e89a7ef 100644 --- a/plugins/Clist_modern/src/modern_keyboard.cpp +++ b/plugins/Clist_modern/src/modern_keyboard.cpp @@ -52,18 +52,18 @@ int InitSkinHotKeys(void) shk.szDescription.w = LPGENW("Close Miranda");
shk.pszName = "CloseMiranda";
shk.pszService = "CLIST/HK/CloseMiranda";
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szSection.w = LPGENW("Status");
shk.szDescription.w = LPGENW("Restore last status");
shk.pszName = "RestoreLastStatus";
shk.pszService = "CLIST/HK/RestoreStatus";
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szSection.w = LPGENW("Main");
shk.szDescription.w = LPGENW("Show/Hide offline users");
shk.pszName = "ShowHideOfflineUsers";
shk.pszService = MS_CLIST_TOGGLEHIDEOFFLINE;
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
return 0;
}
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index f9c47a74a5..3152d46524 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -1136,7 +1136,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) hkd.szDescription.a = LPGEN("Show/Hide Console");
hkd.pszService = MS_CONSOLE_SHOW_HIDE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_EXT, 'C');
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
if (hwndConsole && IsWindow(hwndConsole)) {
HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 16fdc7282e..eb3e85ec00 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -329,12 +329,12 @@ static int ModulesLoaded(WPARAM, LPARAM) hk.szDescription.a = LPGEN("Copy Version Info to clipboard");
hk.pszName = "CopyVerInfo";
hk.pszService = MS_CRASHDUMPER_STORETOCLIP;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
hk.szDescription.a = LPGEN("Show Version Info");
hk.pszName = "ShowVerInfo";
hk.pszService = MS_CRASHDUMPER_VIEWINFO;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
UploadInit();
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 00eec758c1..164411a54a 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -131,7 +131,7 @@ static int ModulesLoaded(WPARAM, LPARAM) hkd.szSection.a = modFullname;
hkd.szDescription.a = LPGEN("Open Database Editor");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
g_bUsePopups = db_get_b(NULL, MODULENAME, "UsePopUps", 0) != 0;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 593784f358..494bd5aa4f 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -172,7 +172,7 @@ void InitHotkeys() hk.szDescription.a = LPGEN("Show FTPFile manager");
hk.pszName = "FTP_ShowManager";
hk.pszService = MS_FTPFILE_SHOWMANAGER;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
}
void InitTabsrmmButton()
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp index 5b013ea536..896a1c61ab 100644 --- a/plugins/FavContacts/src/services.cpp +++ b/plugins/FavContacts/src/services.cpp @@ -224,7 +224,7 @@ int ProcessModulesLoaded(WPARAM, LPARAM) hotkey.szSection.a = "Contacts";
hotkey.pszService = MS_FAVCONTACTS_SHOWMENU_CENTERED;
hotkey.DefHotKey = MAKEWORD('Q', HOTKEYF_EXT);
- Hotkey_Register(&hotkey);
+ g_plugin.addHotkey(&hotkey);
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
for (auto &hContact : Contacts())
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index fe8dcd26ea..a0d2441eea 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -742,13 +742,13 @@ static void LoadMenus() hkd.pszName = MODULE "/MainHideAllThumbs";
hkd.szDescription.a = LPGEN("Show/Hide all thumbs");
hkd.pszService = MODULE "/MainHideAllThumbs";
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
CreateServiceFunction(MODULE "/HideWhenCListShow", OnHotKey_HideWhenCListShow);
hkd.pszName = MODULE "/HideWhenCListShow";
hkd.szDescription.a = LPGEN("Hide when contact list is shown");
hkd.pszService = MODULE "/HideWhenCListShow";
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index ad615e7de4..4cd31b2450 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -295,17 +295,17 @@ int ModulesLoaded(WPARAM, LPARAM) hkd.pszService = MS_LISTENINGTO_HOTKEYS_ENABLE;
hkd.pszName = "ListeningTo/EnableAll";
hkd.szDescription.a = LPGEN("Send to all protocols");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszService = MS_LISTENINGTO_HOTKEYS_DISABLE;
hkd.pszName = "ListeningTo/DisableAll";
hkd.szDescription.a = LPGEN("Don't send to any protocols");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszService = MS_LISTENINGTO_HOTKEYS_TOGGLE;
hkd.pszName = "ListeningTo/ToggleAll";
hkd.szDescription.a = LPGEN("Toggle send to all protocols");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
//
SetListeningInfos();
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 6924eb5c30..273236bd4d 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -97,7 +97,7 @@ extern "C" __declspec(dllexport) int Load(void) hkd.szSection.w = LPGENW("News Aggregator");
hkd.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'O') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
InitIcons();
diff --git a/plugins/NotesAndReminders/src/hotkeys.cpp b/plugins/NotesAndReminders/src/hotkeys.cpp index f04531cd9f..6e17e03f55 100644 --- a/plugins/NotesAndReminders/src/hotkeys.cpp +++ b/plugins/NotesAndReminders/src/hotkeys.cpp @@ -17,28 +17,28 @@ void RegisterKeyBindings() desc.lParam = KB_NEW_NOTE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_INSERT);
desc.pszService = MODULENAME"/MenuCommandAddNew";
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = MODULENAME"/ToggleNotesVis";
desc.szDescription.w = LPGENW("Toggle Notes Visibility");
desc.lParam = KB_TOGGLE_NOTES;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_ADD);
desc.pszService = MODULENAME"/MenuCommandShowHide";
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = MODULENAME"/BringNotesFront";
desc.szDescription.w = LPGENW("Bring All Notes to Front");
desc.lParam = KB_TOGGLE_NOTES;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_HOME);
desc.pszService = MODULENAME"/MenuCommandBringAllFront";
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = MODULENAME"/NewReminder";
desc.szDescription.w = LPGENW("New Reminder");
desc.lParam = KB_NEW_REMINDER;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, VK_SUBTRACT);
desc.pszService = MODULENAME"/MenuCommandNewReminder";
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
}
LRESULT CALLBACK NotifyHotKeyWndProc(HWND AHwnd, UINT Message, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index d17844108d..5077b2d773 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -408,7 +408,7 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) static int TabsrmmButtonInit(WPARAM, LPARAM)
{
HOTKEYDESC hkd = { "srmm_nudge", LPGEN("Send nudge"), BB_HK_SECTION, nullptr, HOTKEYCODE(HOTKEYF_CONTROL, 'N'), LPARAM(g_plugin.getInst()) };
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
BBButton bbd = {};
bbd.pszModuleName = "Nudge";
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index 98277c5fa5..313c0391de 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -101,7 +101,7 @@ extern "C" int __declspec(dllexport) Load() hotkey.szSection.w = LPGENW("Main");
hotkey.pszService = MS_OPENFOLDER_OPEN;
hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT );
- Hotkey_Register(&hotkey);
+ g_plugin.addHotkey(&hotkey);
CMenuItem mi;
SET_UID(mi, 0xbba6ad01, 0x755a, 0x4d01, 0x94, 0xee, 0x57, 0x84, 0x18, 0x70, 0x77, 0x4f);
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp index 9ad9d4918b..20bc99e53e 100644 --- a/plugins/PackUpdater/Src/Events.cpp +++ b/plugins/PackUpdater/Src/Events.cpp @@ -33,7 +33,7 @@ int ModulesLoaded(WPARAM, LPARAM) hkd.szSection.w = LPGENW("Pack Updater");
hkd.pszService = MODULENAME"/CheckUpdates";
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
if (AllowUpdateOnStartup())
DoCheck(UpdateOnStartup);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 67cb116790..d7d2a7b48f 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -96,7 +96,7 @@ extern "C" __declspec(dllexport) int Load(void) hkd.pszService = MS_PU_CHECKUPDATES;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
hkd.lParam = FALSE;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
InitEvents();
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 616ef9834d..aca148afb2 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -216,13 +216,13 @@ void LoadHotkey() hk.szDescription.w = LPGENW("Toggle Popups");
hk.szSection.w = MODULNAME_PLUW;
hk.pszService = MENUCOMMAND_SVC;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
// 'Popup History' Hotkey
hk.pszName = "Popup History";
hk.szDescription.w = LPGENW("Popup History");
hk.pszService = MENUCOMMAND_HISTORY;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
}
// menu
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 1bb00b3cee..5f9fadb248 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -76,7 +76,7 @@ static int ModulesLoaded(WPARAM, LPARAM) hkd.szSection.w = LPGENW("Quick Contacts");
hkd.pszService = MS_QC_SHOW_DIALOG;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_ALT, 'Q');
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszService = nullptr;
@@ -84,37 +84,37 @@ static int ModulesLoaded(WPARAM, LPARAM) hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'F');
hkd.pszName = "Quick Contacts/File";
hkd.szDescription.w = LPGENW("Send file");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.lParam = HOTKEY_URL;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'U');
hkd.pszName = "Quick Contacts/URL";
hkd.szDescription.w = LPGENW("Send URL");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.lParam = HOTKEY_INFO;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'I');
hkd.pszName = "Quick Contacts/Info";
hkd.szDescription.w = LPGENW("Open user info");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.lParam = HOTKEY_HISTORY;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'H');
hkd.pszName = "Quick Contacts/History";
hkd.szDescription.w = LPGENW("Open history");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.lParam = HOTKEY_MENU;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'M');
hkd.pszName = "Quick Contacts/Menu";
hkd.szDescription.w = LPGENW("Open contact menu");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.lParam = HOTKEY_ALL_CONTACTS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'A');
hkd.pszName = "Quick Contacts/All Contacts";
hkd.szDescription.w = LPGENW("Show all contacts");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
if (ServiceExists(MS_SKIN_ADDHOTKEY)) {
SKINHOTKEYDESCEX hk = { 0 };
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index feb11eb84e..9c5be6eca8 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -533,7 +533,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) hk.szDescription.a = LPGEN("Show Recent Contacts");
hk.pszService = msLastUC_ShowList;
hk.DefHotKey = MAKEWORD('R', HOTKEYF_CONTROL | HOTKEYF_SHIFT);
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
return 0;
}
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 2302c01c7d..5e819d1322 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -267,21 +267,21 @@ void RegisterKeyBindings() desc.szDescription.a = LPGEN("Navigate: Previous tab");
desc.lParam = KB_PREV_TAB;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, VK_TAB);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_PRIOR);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, VK_LEFT);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Nav/Next Tab";
desc.szDescription.a = LPGEN("Navigate: Next tab");
desc.lParam = KB_NEXT_TAB;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_TAB);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_NEXT);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, VK_RIGHT);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = strName;
desc.szDescription.a = strDesc;
@@ -290,68 +290,68 @@ void RegisterKeyBindings() mir_snprintf(strDesc, Translate("Navigate: Tab %d"), i + 1);
desc.lParam = KB_TAB1 + i;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, '1' + i);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
}
desc.pszName = "Scriver/Wnd/Toggle Statusbar";
desc.szDescription.a = LPGEN("Window: Toggle status bar");
desc.lParam = KB_SWITCHSTATUSBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'S');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Toggle Titlebar";
desc.szDescription.a = LPGEN("Window: Toggle title bar");
desc.lParam = KB_SWITCHTITLEBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'M');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Toggle Toolbar";
desc.szDescription.a = LPGEN("Window: Toggle toolbar");
desc.lParam = KB_SWITCHTOOLBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'T');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Toggle Infobar";
desc.szDescription.a = LPGEN("Window: Toggle info bar");
desc.lParam = KB_SWITCHINFOBAR;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'N');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Clear Log";
desc.szDescription.a = LPGEN("Window: Clear log");
desc.lParam = KB_CLEAR_LOG;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'L');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Minimize";
desc.szDescription.a = LPGEN("Window: Minimize");
desc.lParam = KB_MINIMIZE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT, VK_ESCAPE);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Wnd/Close Tab";
desc.szDescription.a = LPGEN("Window: Close tab");
desc.lParam = KB_CLOSE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F4);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'W');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Action/Quote";
desc.szDescription.a = LPGEN("Action: Quote");
desc.lParam = KB_QUOTE;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, 'Q');
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Action/Send All";
desc.szDescription.a = LPGEN("Action: Send to all");
desc.lParam = KB_SEND_ALL;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, VK_RETURN);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
desc.pszName = "Scriver/Action/PasteSend";
desc.szDescription.a = LPGEN("Action: Paste and send");
desc.lParam = KB_PASTESEND;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, VK_INSERT);
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
}
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 5b52babbc8..a1084f5eb4 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -322,7 +322,7 @@ extern "C" __declspec(dllexport) int Load(void) hkd.pszService = MS_SENDSS_OPENDIALOG; hkd.lParam = 0xFFFF; hkd.dwFlags = HKD_UNICODE; - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); /// register highlighter window class HBRUSH brush = CreateSolidBrush(0x0000FF00);//owned by class diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 6c6faa4eba..e1643e681f 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -760,22 +760,22 @@ static int PluginInit(WPARAM, LPARAM) hkd.szSection.a = LPGEN("Sessions");
hkd.szDescription.a = LPGEN("Open Sessions Manager");
hkd.pszService = MS_SESSIONS_OPENMANAGER;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "RestoreLastSession";
hkd.szDescription.a = LPGEN("Restore last Session");
hkd.pszService = MS_SESSIONS_RESTORELASTSESSION;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "SaveSession";
hkd.szDescription.a = LPGEN("Save Session");
hkd.pszService = MS_SESSIONS_SAVEUSERSESSION;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "CloseSession";
hkd.szDescription.a = LPGEN("Close Session");
hkd.pszService = MS_SESSIONS_CLOSESESSION;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
// Main menu
CMenuItem mi;
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 07b0f933cd..57725e0a64 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1250,7 +1250,7 @@ void RegisterHotkey(void) hkd.szSection.w = LPGENW("Status message");
hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3);
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
}
static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 378a68688f..509862ec3f 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -156,7 +156,7 @@ int SmileyButtonCreate(WPARAM, LPARAM) desc.szDescription.a = LPGEN("Smiley selector");
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'E');
desc.lParam = LPARAM(g_plugin.getInst());
- Hotkey_Register(&desc);
+ g_plugin.addHotkey(&desc);
BBButton bbd = {};
bbd.pszModuleName = MODULENAME;
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 3d2325641e..7e1de83072 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -213,7 +213,7 @@ static int ModulesLoaded(WPARAM, LPARAM) hkd.szDescription.a = LPGEN("Enable/disable spell checker"); hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_ALT, 'S'); hkd.lParam = HOTKEY_ACTION_TOGGLE; - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); loaded = TRUE; diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 94428ebea9..89d3f904ad 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -133,7 +133,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (msg) {
case WM_CREATE:
for (auto &it : _hotkeydescs)
- Hotkey_Register(&it);
+ g_plugin.addHotkey(&it);
WM_TASKBARCREATED = RegisterWindowMessageA("TaskbarCreated");
ShowWindow(hwndDlg, SW_HIDE);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index cb76adfffc..782b99e40d 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -1170,7 +1170,7 @@ static int TrafficCounterModulesLoaded(WPARAM, LPARAM) hkd.szDescription.a = LPGEN("Show/Hide frame");
hkd.pszName = "TC_Show_Hide";
hkd.pszService = "TrafficCounter/ShowHide";
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
}
// Добавляем пункт в главное меню.
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp index 843db98dae..7a12fc2149 100644 --- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp +++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp @@ -130,39 +130,39 @@ extern "C" __declspec(dllexport) int Load(void) hkd.szSection.w = L"TranslitSwitcher";
hkd.pszService = MS_TS_SWITCHLAYOUT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "TranslitSwitcher/ConvertLastOrSelected";
hkd.szDescription.w = LPGENW("Convert Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitAllOrSelected";
hkd.szDescription.w = LPGENW("Translit All / Selected");
hkd.pszService = MS_TS_TRANSLITLAYOUT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = false;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "TranslitSwitcher/TranslitLastOrSelected";
hkd.szDescription.w = LPGENW("Translit Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'T') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseAllOrSelected";
hkd.szDescription.w = LPGENW("Invert Case All / Selected");
hkd.pszService = MS_TS_INVERTCASE;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = false;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
hkd.pszName = "TranslitSwitcher/InvertCaseLastOrSelected";
hkd.szDescription.w = LPGENW("Invert Case Last / Selected");
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT + HKCOMB_A, 'Y') | HKF_MIRANDA_LOCAL;
hkd.lParam = true;
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
return 0;
}
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 4f13b68327..d2a3ba0439 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -982,5 +982,5 @@ void DlgAnniversaryListLoadModule() hk.szSection.a = MODULENAME;
hk.szDescription.a = LPGEN("Popup anniversary list");
hk.pszService = MS_USERINFO_REMINDER_LIST;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
}
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 9295e6de7a..53cdac42d9 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -867,5 +867,5 @@ void SvcRefreshContactInfoLoadModule(void) hk.szSection.a = MODULENAME;
hk.szDescription.a = LPGEN("Refresh contact details");
hk.pszService = MS_USERINFO_REFRESH;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 1558a72854..2da0ae3ff6 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -907,7 +907,7 @@ void SvcReminderLoadModule(void) hk.szSection.a = MODULENAME;
hk.szDescription.a = LPGEN("Check anniversaries");
hk.pszService = MS_USERINFO_REMINDER_CHECK;
- Hotkey_Register(&hk);
+ g_plugin.addHotkey(&hk);
if (db_get_b(NULL, MODULENAME, SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) != REMIND_OFF && ExtraIcon == INVALID_HANDLE_VALUE)
ExtraIcon = ExtraIcon_RegisterIcolib("Reminder", LPGEN("Reminder (UInfoEx)"), ICO_COMMON_ANNIVERSARY);
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index f4a2c5cc91..947a9a2de7 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -126,12 +126,12 @@ extern "C" int __declspec(dllexport) Load(void) hotkey.pszName = "wwi_birthday_list";
hotkey.szDescription.a = LPGEN("Birthday list");
hotkey.pszService = MS_WWI_LIST_SHOW;
- Hotkey_Register(&hotkey);
+ g_plugin.addHotkey(&hotkey);
hotkey.pszName = "wwi_check_birthdays";
hotkey.szDescription.a = LPGEN("Check for birthdays");
hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
- Hotkey_Register(&hotkey);
+ g_plugin.addHotkey(&hotkey);
g_plugin.addSound(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near"));
g_plugin.addSound(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today"));
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 13dc9db9cb..c162a2d4d0 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -314,7 +314,7 @@ extern "C" int __declspec(dllexport) Load(void) hkd.szSection.a = YAMN_DBMODULE; hkd.szDescription.a = LPGEN("Check mail"); hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F11); - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); //Create thread that will be executed every second if (!(SecTimer = SetTimer(nullptr, 0, 1000, TimerProc))) diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index d683dc848f..633e9274ac 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -1018,16 +1018,16 @@ void FacebookProto::InitHotkeys() mir_strcpy(tDest, "/VisitProfile"); hkd.szDescription.w = LPGENW("Visit profile"); - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); mir_strcpy(tDest, "/VisitNotifications"); hkd.szDescription.w = LPGENW("Visit notifications"); - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); mir_strcpy(tDest, "/Mind"); hkd.szDescription.w = LPGENW("Show 'Share status' window"); hkd.DefHotKey = HOTKEYCODE(HOTKEYF_ALT | HOTKEYF_EXT, 'F'); - Hotkey_Register(&hkd); + g_plugin.addHotkey(&hkd); } /** diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 272c3504d9..913f9330fa 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -750,19 +750,19 @@ void CJabberProto::GlobalMenuInit() mir_strcpy(tDest, "/Groupchat");
hkd.szDescription.w = LPGENW("Join conference");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
mir_strcpy(tDest, "/Bookmarks");
hkd.szDescription.w = LPGENW("Open bookmarks");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
mir_strcpy(tDest, "/PrivacyLists");
hkd.szDescription.w = LPGENW("Privacy lists");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
mir_strcpy(tDest, "/ServiceDiscovery");
hkd.szDescription.w = LPGENW("Service discovery");
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
}
static INT_PTR g_ToolbarHandleJoinGroupchat(WPARAM w, LPARAM l)
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index fe1e265fcd..17a4deb100 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -50,7 +50,7 @@ TwitterProto::TwitterProto(const char *proto_name, const wchar_t *username) : hkd.pszService = text;
hkd.szSection.a = m_szModuleName; // Section title; TODO: use username?
hkd.szDescription.a = "Send Tweet";
- Hotkey_Register(&hkd);
+ g_plugin.addHotkey(&hkd);
// set Tokens and stuff
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp index 3c39dc1675..bb08a3c2df 100644 --- a/src/mir_app/src/CMPluginBase.cpp +++ b/src/mir_app/src/CMPluginBase.cpp @@ -165,7 +165,12 @@ void CMPluginBase::openOptionsPage(const wchar_t *pszGroup, const wchar_t *pszPa ///////////////////////////////////////////////////////////////////////////////////////// -HANDLE CMPluginBase::addIcon(SKINICONDESC *sid) +int CMPluginBase::addHotkey(const HOTKEYDESC *hk) +{ + return Hotkey_Register(hk, m_hLang); +} + +HANDLE CMPluginBase::addIcon(const SKINICONDESC *sid) { return IcoLib_AddIcon(sid, m_hLang); } diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index 4d735a09c3..153153a44c 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -461,7 +461,7 @@ void IcolibItem::clear() /////////////////////////////////////////////////////////////////////////////////////////
// IcoLib_AddIcon
-MIR_APP_DLL(HANDLE) IcoLib_AddIcon(SKINICONDESC *sid, int _hLang)
+MIR_APP_DLL(HANDLE) IcoLib_AddIcon(const SKINICONDESC *sid, int _hLang)
{
mir_cslock lck(csIconList);
diff --git a/src/mir_app/src/keyboard.cpp b/src/mir_app/src/keyboard.cpp index 3517ceb001..966281a42a 100644 --- a/src/mir_app/src/keyboard.cpp +++ b/src/mir_app/src/keyboard.cpp @@ -61,34 +61,34 @@ int InitClistHotKeys(void) shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/SHOWHIDE";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'A');
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szDescription.w = LPGENW("Read message");
shk.pszName = "ReadMessage";
shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/Read";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'I');
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szDescription.w = LPGENW("Open Options page");
shk.pszName = "ShowOptions";
shk.szSection.w = L"Main";
shk.pszService = "CLIST/HK/Opts";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'O') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szDescription.w = LPGENW("Open logging options");
shk.pszName = "ShowLogOptions";
shk.szSection.w = L"Main";
shk.pszService = "Netlib/Log/Win";
shk.DefHotKey = 0;
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
shk.szDescription.w = LPGENW("Open 'Find user' dialog");
shk.pszName = "FindUsers";
shk.szSection.w = L"Main";
shk.pszService = "FindAdd/FindAddCommand";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'F') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&shk);
+ g_plugin.addHotkey(&shk);
return 0;
}
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index d2cbbfeac8..59188edb5b 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -1079,7 +1079,7 @@ void InitCustomMenus(void) hkd.szDescription.w = Clist_GetStatusModeDescription(hkd.lParam, GSMDF_UNTRANSLATED);
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, '0' + i) | HKF_MIRANDA_LOCAL;
hkd.pszService = MS_CLIST_HKSTATUS;
- g_statuses[i].iHotKey = Hotkey_Register(&hkd);
+ g_statuses[i].iHotKey = g_plugin.addHotkey(&hkd);
}
HookEvent(ME_HOTKEYS_CHANGED, sttRebuildHotkeys);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 162a756d66..215666d9a7 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -602,4 +602,5 @@ GetPluginByInstance @626 ?getInfo@CMPluginBase@@QBEABUPLUGININFOEX@@XZ @631 NONAME
RegisterPlugin @632
UnregisterPlugin @633
-?addIcon@CMPluginBase@@QAEPAXPAUSKINICONDESC@@@Z @634 NONAME
+?addHotkey@CMPluginBase@@QAEHPBUHOTKEYDESC@@@Z @634 NONAME
+?addIcon@CMPluginBase@@QAEPAXPBUSKINICONDESC@@@Z @635 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index c3f3b19748..6201fd8878 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -602,4 +602,5 @@ GetPluginByInstance @626 ?getInfo@CMPluginBase@@QEBAAEBUPLUGININFOEX@@XZ @631 NONAME
RegisterPlugin @632
UnregisterPlugin @633
-?addIcon@CMPluginBase@@QEAAPEAXPEAUSKINICONDESC@@@Z @634 NONAME
+?addHotkey@CMPluginBase@@QEAAHPEBUHOTKEYDESC@@@Z @634 NONAME
+?addIcon@CMPluginBase@@QEAAPEAXPEBUSKINICONDESC@@@Z @635 NONAME
|