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 /src | |
parent | 869094d2aabef8ab10a1178907cb31ae84f504f9 (diff) |
Hotkey_Register => CMPlugin::addHotkey
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/CMPluginBase.cpp | 7 | ||||
-rw-r--r-- | src/mir_app/src/icolib.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/keyboard.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 3 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 3 |
6 files changed, 17 insertions, 10 deletions
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
|