summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/svc_phone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/svc_phone.cpp')
-rw-r--r--plugins/UserInfoEx/src/svc_phone.cpp78
1 files changed, 34 insertions, 44 deletions
diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp
index 7ccdc576b4..5d4e2f13d1 100644
--- a/plugins/UserInfoEx/src/svc_phone.cpp
+++ b/plugins/UserInfoEx/src/svc_phone.cpp
@@ -2,7 +2,7 @@
UserinfoEx plugin for Miranda IM
Copyright:
-© 2006-2010 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
+� 2006-2010 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -169,52 +169,42 @@ VOID SvcPhoneApplyCListIcons()
**/
VOID SvcPhoneEnableExtraIcons(BOOLEAN bEnable, BOOLEAN bUpdateDB)
{
- if (myGlobals.HaveCListExtraIcons)
- {
- if (bUpdateDB)
- {
- DB::Setting::WriteByte(SET_CLIST_EXTRAICON_PHONE, bEnable);
- }
-
- // force module enabled, if extraicon plugin was found
- if (bEnable)
- {
- // hook events
- if (hChangedHook == NULL)
- hChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, (MIRANDAHOOK)OnContactSettingChanged);
-
- if (hApplyIconHook == NULL)
- hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcons);
-
- if (ghExtraIconSvc == INVALID_HANDLE_VALUE) {
- EXTRAICON_INFO ico = { sizeof(ico) };
- ico.type = EXTRAICON_TYPE_ICOLIB;
- ico.name = "sms"; //must be the same as the group name in extraicon
- ico.description = "(uinfoex)";
- ico.descIcon = ICO_BTN_CELLULAR;
- ghExtraIconSvc = (HANDLE)CallService(MS_EXTRAICON_REGISTER, (WPARAM)&ico, 0);
- }
+ if (bUpdateDB)
+ DB::Setting::WriteByte(SET_CLIST_EXTRAICON_PHONE, bEnable);
+
+ // force module enabled, if extraicon plugin was found
+ if (bEnable) {
+ // hook events
+ if (hChangedHook == NULL)
+ hChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, (MIRANDAHOOK)OnContactSettingChanged);
+
+ if (hApplyIconHook == NULL)
+ hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcons);
+
+ if (ghExtraIconSvc == INVALID_HANDLE_VALUE) {
+ EXTRAICON_INFO ico = { sizeof(ico) };
+ ico.type = EXTRAICON_TYPE_ICOLIB;
+ ico.name = "sms"; //must be the same as the group name in extraicon
+ ico.description = "(uinfoex)";
+ ico.descIcon = ICO_BTN_CELLULAR;
+ ghExtraIconSvc = (HANDLE)CallService(MS_EXTRAICON_REGISTER, (WPARAM)&ico, 0);
}
- else
- {
- if (hChangedHook)
- {
- UnhookEvent(hChangedHook);
- hChangedHook = NULL;
- }
- if (hApplyIconHook)
- {
- UnhookEvent(hApplyIconHook);
- hApplyIconHook = NULL;
- }
- if (hRebuildIconsHook)
- {
- UnhookEvent(hRebuildIconsHook);
- hRebuildIconsHook = NULL;
- }
+ }
+ else {
+ if (hChangedHook) {
+ UnhookEvent(hChangedHook);
+ hChangedHook = NULL;
+ }
+ if (hApplyIconHook) {
+ UnhookEvent(hApplyIconHook);
+ hApplyIconHook = NULL;
+ }
+ if (hRebuildIconsHook) {
+ UnhookEvent(hRebuildIconsHook);
+ hRebuildIconsHook = NULL;
}
- SvcPhoneApplyCListIcons();
}
+ SvcPhoneApplyCListIcons();
}
/**