diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-12 18:42:49 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-12 18:42:49 +0000 |
commit | 74e9b42783af6a0a9d51df6271bca169e3dcc81d (patch) | |
tree | 636b9ea671646559fd835766d482fd99b96bbd19 /plugins/UserInfoEx/src/Flags/svc_flags.cpp | |
parent | 4330c62d2fa5b2752036b43018044c7c01b10695 (diff) |
extraicons registration moved to Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@10168 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/Flags/svc_flags.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/Flags/svc_flags.cpp | 20 |
1 files changed, 10 insertions, 10 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;
|