diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-30 18:22:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-30 18:22:58 +0000 |
commit | ca7197e8812b188a99fc72b524f936e06e08327a (patch) | |
tree | 2f213b16b57f387282611a4653bd2f139b1154f2 /plugins/Variables | |
parent | 7d1ec34709876918614f21f70cbe35f2667175c4 (diff) |
fix for the default hook handlers
git-svn-id: http://svn.miranda-ng.org/main/trunk@703 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables')
-rw-r--r-- | plugins/Variables/variables.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/Variables/variables.cpp b/plugins/Variables/variables.cpp index 7f8c97371b..d10e42a1ab 100644 --- a/plugins/Variables/variables.cpp +++ b/plugins/Variables/variables.cpp @@ -552,26 +552,22 @@ int setParseOptions(struct ParseOptions *po) { return 0;
}
-int LoadVarModule() {
-
- HMODULE hUxTheme;
-
- if ((initTokenRegister() != 0) || (initContactModule() != 0)) {
-
+int LoadVarModule()
+{
+ if (initTokenRegister() != 0 || initContactModule() != 0)
return -1;
- }
+
setParseOptions(NULL);
hFormatStringService = CreateServiceFunction(MS_VARS_FORMATSTRING, formatStringService);
hFreeMemoryService = CreateServiceFunction(MS_VARS_FREEMEMORY, freeMemory);
hRegisterVariableService = CreateServiceFunction(MS_VARS_REGISTERTOKEN, registerToken);
// help dialog
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
- hUxTheme = NULL;
+
if(IsWinVerXPPlus()) {
- hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
- if (hUxTheme) {
+ HMODULE hUxTheme = GetModuleHandle(_T("uxtheme.dll"));
+ if (hUxTheme)
pfnEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- }
}
hShowHelpService = CreateServiceFunction(MS_VARS_SHOWHELP, showHelpService);
hShowHelpExService = CreateServiceFunction(MS_VARS_SHOWHELPEX, showHelpExService);
@@ -612,9 +608,7 @@ int LoadVarModule() { log_debugA("Variables: Internal tokens registered");
if (db_getb(SETTING_PARSEATSTARTUP, 0)) {
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
+ FORMATINFO fi = { 0 };
fi.cbSize = sizeof(fi);
fi.tszFormat = db_gets(SETTING_STARTUPTEXT, NULL);
if (fi.tszFormat != NULL) {
|