diff options
author | George Hazan <ghazan@miranda.im> | 2017-07-30 21:42:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-07-30 21:42:04 +0300 |
commit | fbdfd82d0cf0975b80a2afa5eda141c4940ada9d (patch) | |
tree | c6d4e64590e400867f250749e90b244dacf6ee05 /plugins/SmileyAdd | |
parent | b1684967aae9ac5b29b283bfdef17926edbbddc0 (diff) |
SmileyAdd toolbar icon now has wrongly removed hotkey
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/dlgboxsubclass.cpp | 10 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/main.cpp | 7 |
2 files changed, 10 insertions, 7 deletions
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 9f8eab1afe..fff1cfee75 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -149,12 +149,22 @@ static LRESULT CALLBACK MessageDlgSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, int SmileyButtonCreate(WPARAM, LPARAM)
{
+ // create a hotkey for the button first
+ HOTKEYDESC desc = {};
+ desc.pszName = "srmm_smileyadd";
+ desc.szSection.a = BB_HK_SECTION;
+ desc.szDescription.a = LPGEN("Smiley selector");
+ desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'E');
+ desc.lParam = LPARAM(g_hInst);
+ Hotkey_Register(&desc);
+
BBButton bbd = {};
bbd.pszModuleName = MODULENAME;
bbd.pwszTooltip = LPGENW("Show smiley selection window");
bbd.dwDefPos = 31;
bbd.hIcon = IcoLib_GetIconHandle("SmileyAdd_ButtonSmiley");
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON;
+ bbd.pszHotkey = desc.pszName;
Srmm_AddButton(&bbd);
return 0;
}
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index fb8ed6a51d..38d1380068 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -67,13 +67,6 @@ static int ModulesLoaded(WPARAM, LPARAM) g_SmileyCategories.AddAllProtocolsAsCategory();
g_SmileyCategories.ClearAndLoadAll();
- HOTKEYDESC desc = {};
- desc.pszName = "smileyadd";
- desc.szSection.a = MODULENAME;
- desc.szDescription.a = LPGEN("Smiley selector");
- desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'E');
- Hotkey_Register(&desc);
-
ColourID cid = { sizeof(cid) };
strcpy_s(cid.dbSettingsGroup, MODULENAME);
strcpy_s(cid.group, MODULENAME);
|