summaryrefslogtreecommitdiff
path: root/plugins/Console/Console.c
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-19 16:10:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-19 16:10:58 +0000
commit394540126b181982d8b61d07a084ceeac8559ed1 (patch)
tree3950c99abcaeb77888271dd5994d96254f0492c6 /plugins/Console/Console.c
parentfe557276119e48389b9a471d5a4ed5d232a2857d (diff)
- 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
Diffstat (limited to 'plugins/Console/Console.c')
-rw-r--r--plugins/Console/Console.c37
1 files changed, 14 insertions, 23 deletions
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);