From 66ddfd87a0e55b9534b8669392bb0cdee2e9fa3b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 1 Dec 2012 21:07:34 +0000 Subject: SKINICONDESC initialization - end-II :) git-svn-id: http://svn.miranda-ng.org/main/trunk@2599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ChangeKeyboardLayout/src/hook_events.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'plugins/ChangeKeyboardLayout') 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; -- cgit v1.2.3