summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp60
-rw-r--r--plugins/UserInfoEx/src/svc_gender.cpp3
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp3
-rw-r--r--plugins/UserInfoEx/src/svc_phone.cpp3
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp7
5 files changed, 34 insertions, 42 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);
}
}
diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp
index 6ac632e6af..68d6f5b8ec 100644
--- a/plugins/UserInfoEx/src/svc_gender.cpp
+++ b/plugins/UserInfoEx/src/svc_gender.cpp
@@ -108,9 +108,8 @@ static INT OnCListApplyIcons(HANDLE hContact, LPARAM)
static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !mir_stricmp(pdbcws->szSetting, SET_CONTACT_GENDER))
- {
OnCListApplyIcons(hContact, 0);
- }
+
return 0;
}
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index b6a6f9ee46..8c3cf5ff3d 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -132,9 +132,8 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
(!strncmp(pdbcws->szSetting, SET_CONTACT_HOMEPAGE, 8) ||
!strncmp(pdbcws->szSetting, SET_CONTACT_COMPANY_HOMEPAGE, 15)))
- {
OnCListApplyIcons(hContact, 0);
- }
+
return 0;
}
diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp
index 5d4e2f13d1..941003716b 100644
--- a/plugins/UserInfoEx/src/svc_phone.cpp
+++ b/plugins/UserInfoEx/src/svc_phone.cpp
@@ -134,9 +134,8 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
!strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_PHONE) ||
!strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_CELLULAR) ||
!strncmp(pdbcws->szSetting, "MyPhone0", 8)))
- {
OnCListApplyIcons(hContact, 0);
- }
+
return 0;
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index 3781145d11..91f19eb804 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -766,18 +766,13 @@ static INT OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
// check metacontact instead of subcontact
if (hMeta)
- {
hContact = hMeta;
- }
+
now.GetLocalTime();
if (!strcmp(pdbcws->szModule, SvcReminderGetMyBirthdayModule()))
- {
CheckContact(hContact, now, evt, FALSE, &LastAnswer);
- }
else
- {
CheckContact(hContact, now, evt, FALSE, 0);
- }
}
return 0;
}