summaryrefslogtreecommitdiff
path: root/plugins/ChangeKeyboardLayout/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-01 21:07:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-01 21:07:34 +0000
commit66ddfd87a0e55b9534b8669392bb0cdee2e9fa3b (patch)
tree6075890e2ba60622069d5179f280d64b225c9be9 /plugins/ChangeKeyboardLayout/src
parent1860018b201d995ed051c0affb72d5a1d09fa02e (diff)
SKINICONDESC initialization - end-II :)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ChangeKeyboardLayout/src')
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index 323e26ea85..69f5266a5b 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -109,21 +109,15 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
LPTSTR ptszCurrLayout;
LPSTR ptszTemp;
- SKINICONDESC sid = {0};
- TCHAR szFile[MAX_PATH];
-
-
//Заполняем конфигурационные строки из базы. Если их там нет - генерируем.
- for (i = 0; i < bLayNum; i++)
- {
+ for (i = 0; i < bLayNum; i++) {
ptszCurrLayout = GenerateLayoutString(hklLayouts[i]);
ptszTemp = GetNameOfLayout(hklLayouts[i]);
iRes = DBGetContactSettingTString(NULL, ModuleName, ptszTemp, &dbv);
if (iRes != 0)
ptszLayStrings[i] = ptszCurrLayout;
else
- if(_tcscmp((dbv.ptszVal), ptszEmptySting) == 0)
- {
+ if(_tcscmp((dbv.ptszVal), ptszEmptySting) == 0) {
ptszLayStrings[i] = ptszCurrLayout;
mir_free(dbv.ptszVal);
}
@@ -156,9 +150,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hChangeTextLayout = CreateServiceFunction(MS_CKL_CHANGETEXTLAYOUT, APIChangeTextLayout);
// IcoLib support
+ TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
+
+ SKINICONDESC sid = { sizeof(sid) };
sid.ptszDefaultFile = szFile;
- sid.cbSize = sizeof(sid);
sid.flags = SIDF_PATH_TCHAR;
sid.pszSection = Translate(ModuleName);
@@ -183,9 +179,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = {0};
-
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_MAIN_OPTION_FORM);
odp.pszTitle = ModuleName;
@@ -203,8 +197,6 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam)
return 0;
}
-
-
LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam)
{
DWORD lcode;