summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/Flags/svc_flags.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-10 21:36:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-10 21:36:54 +0000
commit9c2e0c8b025c98cbff2975e6dd9c86e03cd04244 (patch)
treebd95b8ef2753ef3f2b3701bfe350eb7682794319 /plugins/UserInfoEx/src/Flags/svc_flags.cpp
parentf22d8982b41614d703b0db98264e01ef7049a4a0 (diff)
code cleaning for ME_DB_CONTACT_SETTINGCHANGED in plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@2283 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/Flags/svc_flags.cpp')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index e1f4b700f0..c864e0bca8 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -284,34 +284,34 @@ static int OnCListApplyIcons(WPARAM wParam,LPARAM lParam)
static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
- if ((HANDLE)wParam!=NULL)return 0;
- if (!lstrcmpA(dbcws->szModule, "ExtraIcons") &&
- !lstrcmpA(dbcws->szSetting,"Slot_Flags")) {
- BOOL bEnable;
- switch (dbcws->value.type) {
- case DBVT_BYTE:
- bEnable = dbcws->value.bVal != (BYTE)-1;
- break;
- case DBVT_WORD:
- bEnable = dbcws->value.wVal != (WORD)-1;
- break;
- case DBVT_DWORD:
- bEnable = dbcws->value.dVal != (DWORD)-1;
- break;
- default:
- bEnable = -1;
- break;
- }
- if(bEnable == -1) {
- return 0;
- }
- else if(bEnable && !hApplyIconHook) {
- hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
- }
- else if (!bEnable && hApplyIconHook) {
- UnhookEvent(hApplyIconHook); hApplyIconHook = NULL;
- }
- CallFunctionBuffered(UpdateExtraImages,(LPARAM)bEnable,FALSE,EXTRAIMAGE_REFRESHDELAY);
+ if ((HANDLE)wParam != NULL)
+ return 0;
+
+ if (!lstrcmpA(dbcws->szModule, "ExtraIcons") && !lstrcmpA(dbcws->szSetting,"Slot_Flags")) {
+ BOOL bEnable;
+ switch (dbcws->value.type) {
+ case DBVT_BYTE:
+ bEnable = dbcws->value.bVal != (BYTE)-1;
+ break;
+ case DBVT_WORD:
+ bEnable = dbcws->value.wVal != (WORD)-1;
+ break;
+ case DBVT_DWORD:
+ bEnable = dbcws->value.dVal != (DWORD)-1;
+ break;
+ default:
+ bEnable = -1;
+ break;
+ }
+ if(bEnable == -1)
+ return 0;
+
+ if(bEnable && !hApplyIconHook)
+ hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
+ else if (!bEnable && hApplyIconHook)
+ UnhookEvent(hApplyIconHook); hApplyIconHook = NULL;
+
+ CallFunctionBuffered(UpdateExtraImages,(LPARAM)bEnable,FALSE,EXTRAIMAGE_REFRESHDELAY);
}
return 0;
}
@@ -347,10 +347,10 @@ VOID SvcFlagsEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB)
//init hooks
if (!hApplyIconHook)
- hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
+ hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
if (!hSettingChangedHook)
- hSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
+ hSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
}
}