From 394540126b181982d8b61d07a084ceeac8559ed1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Jun 2012 16:10:58 +0000 Subject: - dynamic hotkey translation - MS_HOTKEY_REGISTER replaced with Hotkey_Register git-svn-id: http://svn.miranda-ng.org/main/trunk@482 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Console/Console.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'plugins/Console') 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); -- cgit v1.2.3