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.cpp20
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp7
2 files changed, 14 insertions, 13 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index 75da95834c..637c6472a4 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -212,6 +212,16 @@ void SvcFlagsLoadModule()
g_bShowStatusIconFlag = db_get_b(NULL, MODNAMEFLAGS, "ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT) != 0;
HookEvent(ME_SKIN2_ICONSCHANGED, OnStatusIconsChanged);
+
+ // get local langID for descIcon (try to use user local Flag as icon)
+ DWORD langid = 0;
+ int r = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICOUNTRY | LOCALE_RETURN_NUMBER, (LPTSTR)&langid, sizeof(langid) / sizeof(TCHAR));
+ if (!CallService(MS_UTILS_GETCOUNTRYBYNUMBER, langid, 0))
+ langid = 1;
+
+ char szId[20];
+ mir_snprintf(szId, SIZEOF(szId), (langid == 0xFFFF) ? "%s_0x%X" : "%s_%i", "flags", langid); /* buffer safe */
+ hExtraIconSvc = ExtraIcon_Register("Flags", LPGEN("Flags (uinfoex)"), szId);
}
/**
@@ -224,16 +234,6 @@ void SvcFlagsLoadModule()
void SvcFlagsOnModulesLoaded()
{
- // get local langID for descIcon (try to use user local Flag as icon)
- DWORD langid = 0;
- int r = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ICOUNTRY | LOCALE_RETURN_NUMBER, (LPTSTR)&langid, sizeof(langid) / sizeof(TCHAR));
- if (!CallService(MS_UTILS_GETCOUNTRYBYNUMBER, langid, 0))
- langid = 1;
-
- char szId[20];
- mir_snprintf(szId, SIZEOF(szId), (langid == 0xFFFF) ? "%s_0x%X" : "%s_%i", "flags", langid); /* buffer safe */
- hExtraIconSvc = ExtraIcon_Register("Flags", LPGEN("Flags (uinfoex)"), szId);
-
/* Status Icon */
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODNAMEFLAGS;
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index b5808aa64c..7651ec6d09 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -844,9 +844,6 @@ static void UpdateTimer(BYTE bStartup)
void SvcReminderEnable(BYTE bEnable)
{
if (bEnable) { // Reminder is on
- if (ExtraIcon == INVALID_HANDLE_VALUE)
- ExtraIcon = ExtraIcon_Register("Reminder", LPGEN("Reminder (uinfoex)"), ICO_COMMON_ANNIVERSARY);
-
// init hooks
if (!ghCListIA)
ghCListIA = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, (MIRANDAHOOK)OnCListApplyIcon);
@@ -932,6 +929,10 @@ void SvcReminderLoadModule(void)
hk.pszDescription = LPGEN("Check anniversaries");
hk.pszService = MS_USERINFO_REMINDER_CHECK;
Hotkey_Register(&hk);
+
+ if (db_get_b(NULL, MODNAME, SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) != REMIND_OFF && ExtraIcon == INVALID_HANDLE_VALUE)
+ ExtraIcon = ExtraIcon_Register("Reminder", LPGEN("Reminder (uinfoex)"), ICO_COMMON_ANNIVERSARY);
+
}
/**