From 74e9b42783af6a0a9d51df6271bca169e3dcc81d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 12 Aug 2014 18:42:49 +0000 Subject: extraicons registration moved to Load() git-svn-id: http://svn.miranda-ng.org/main/trunk@10168 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/UserInfoEx/src/Flags') 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; -- cgit v1.2.3