diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-26 20:03:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-26 20:03:41 +0000 |
commit | cccc944fb630649383e2bc6f0fac656090695397 (patch) | |
tree | cc0a8d9a242bdf73d7120ac0fa070f2bfd14e453 /plugins | |
parent | b68274ddc0b326609281387ca5497d332ed4a0ae (diff) |
fix for chinese in clist_modern after language reload
git-svn-id: http://svn.miranda-ng.org/main/trunk@8764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_nicer/src/init.cpp | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 2188683315..009d5bf4d3 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -30,8 +30,7 @@ CLIST_INTERFACE* pcli = NULL; int hLangpack;
#define DEFAULT_TB_VISIBILITY (1 | 2 | 4 | 8 | 16 | 32 | 64 | 8192)
-TCHAR *szNoevents = LPGENT("No events...");
-//extern HICON im_clienthIcons[NR_CLIENTS];
+
extern HICON overlayicons[10];
extern int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
@@ -192,6 +191,12 @@ static int fnIconFromStatusMode(const char* szProto, int status, MCONTACT hConta return IconFromStatusMode(szProto, status, hContact, NULL);
}
+static int OnLangChange(WPARAM, LPARAM)
+{
+ cfg::dat.szNoEvents = TranslateT("No events...");
+ return 0;
+}
+
extern "C" int __declspec(dllexport) CListInitialise()
{
mir_getLP( &pluginInfo );
@@ -211,37 +216,38 @@ extern "C" int __declspec(dllexport) CListInitialise() cfg::init();
- cfg::dat.hMenuNotify = CreatePopupMenu();
- cfg::dat.wNextMenuID = 1;
- cfg::dat.sortTimer = cfg::getDword("CLC", "SortTimer", 150);
- cfg::dat.szNoEvents = TranslateTS(szNoevents);
- cfg::dat.avatarBorder = (COLORREF)cfg::getDword("CLC", "avatarborder", 0);
- cfg::dat.avatarRadius = (COLORREF)cfg::getDword("CLC", "avatarradius", 4);
- cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
- cfg::dat.avatarSize = cfg::getWord("CList", "AvatarSize", 24);
- cfg::dat.dualRowMode = cfg::getByte("CLC", "DualRowMode", 0);
- cfg::dat.avatarPadding = cfg::getByte("CList", "AvatarPadding", 0);
- cfg::dat.isTransparent = cfg::getByte("CList", "Transparent", 0);
- cfg::dat.alpha = cfg::getByte("CList", "Alpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.autoalpha = cfg::getByte("CList", "AutoAlpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.fadeinout = cfg::getByte("CLUI", "FadeInOut", 0);
- cfg::dat.autosize = cfg::getByte("CLUI", "AutoSize", 0);
- cfg::dat.bNoOfflineAvatars = cfg::getByte("CList", "NoOfflineAV", 1);
- cfg::dat.bFullTransparent = cfg::getByte("CLUI", "fulltransparent", 0);
- cfg::dat.bDblClkAvatars = cfg::getByte("CLC", "dblclkav", 0);
- cfg::dat.bEqualSections = cfg::getByte("CLUI", "EqualSections", 0);
- cfg::dat.bCenterStatusIcons = cfg::getByte("CLC", "si_centered", 1);
- cfg::dat.boldHideOffline = -1;
- cfg::dat.bSecIMAvail = ServiceExists("SecureIM/IsContactSecured") ? 1 : 0;
- cfg::dat.bNoTrayTips = cfg::getByte("CList", "NoTrayTips", 0);
- cfg::dat.bShowLocalTime = cfg::getByte("CLC", "ShowLocalTime", 1);
+ cfg::dat.hMenuNotify = CreatePopupMenu();
+ cfg::dat.wNextMenuID = 1;
+ cfg::dat.sortTimer = cfg::getDword("CLC", "SortTimer", 150);
+ cfg::dat.avatarBorder = (COLORREF)cfg::getDword("CLC", "avatarborder", 0);
+ cfg::dat.avatarRadius = (COLORREF)cfg::getDword("CLC", "avatarradius", 4);
+ cfg::dat.hBrushAvatarBorder = CreateSolidBrush(cfg::dat.avatarBorder);
+ cfg::dat.avatarSize = cfg::getWord("CList", "AvatarSize", 24);
+ cfg::dat.dualRowMode = cfg::getByte("CLC", "DualRowMode", 0);
+ cfg::dat.avatarPadding = cfg::getByte("CList", "AvatarPadding", 0);
+ cfg::dat.isTransparent = cfg::getByte("CList", "Transparent", 0);
+ cfg::dat.alpha = cfg::getByte("CList", "Alpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.autoalpha = cfg::getByte("CList", "AutoAlpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.fadeinout = cfg::getByte("CLUI", "FadeInOut", 0);
+ cfg::dat.autosize = cfg::getByte("CLUI", "AutoSize", 0);
+ cfg::dat.bNoOfflineAvatars = cfg::getByte("CList", "NoOfflineAV", 1);
+ cfg::dat.bFullTransparent = cfg::getByte("CLUI", "fulltransparent", 0);
+ cfg::dat.bDblClkAvatars = cfg::getByte("CLC", "dblclkav", 0);
+ cfg::dat.bEqualSections = cfg::getByte("CLUI", "EqualSections", 0);
+ cfg::dat.bCenterStatusIcons = cfg::getByte("CLC", "si_centered", 1);
+ cfg::dat.boldHideOffline = -1;
+ cfg::dat.bSecIMAvail = ServiceExists("SecureIM/IsContactSecured") ? 1 : 0;
+ cfg::dat.bNoTrayTips = cfg::getByte("CList", "NoTrayTips", 0);
+ cfg::dat.bShowLocalTime = cfg::getByte("CLC", "ShowLocalTime", 1);
cfg::dat.bShowLocalTimeSelective = cfg::getByte("CLC", "SelectiveLocalTime", 1);
- cfg::dat.bDontSeparateOffline = cfg::getByte("CList", "DontSeparateOffline", 0);
- cfg::dat.bShowXStatusOnSbar = cfg::getByte("CLUI", "xstatus_sbar", 0);
- cfg::dat.bLayeredHack = cfg::getByte("CLUI", "layeredhack", 1);
- cfg::dat.bFirstRun = cfg::getByte("CLUI", "firstrun", 1);
- cfg::dat.langPackCP = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- cfg::dat.realTimeSaving = cfg::getByte("CLUI", "save_pos_always", 0);
+ cfg::dat.bDontSeparateOffline = cfg::getByte("CList", "DontSeparateOffline", 0);
+ cfg::dat.bShowXStatusOnSbar = cfg::getByte("CLUI", "xstatus_sbar", 0);
+ cfg::dat.bLayeredHack = cfg::getByte("CLUI", "layeredhack", 1);
+ cfg::dat.bFirstRun = cfg::getByte("CLUI", "firstrun", 1);
+ cfg::dat.langPackCP = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
+ cfg::dat.realTimeSaving = cfg::getByte("CLUI", "save_pos_always", 0);
+
+ OnLangChange(0, 0);
DWORD sortOrder = cfg::getDword("CList", "SortOrder", SORTBY_NAME);
cfg::dat.sortOrder[0] = LOBYTE(LOWORD(sortOrder));
@@ -309,7 +315,9 @@ extern "C" int __declspec(dllexport) CListInitialise() rc = LoadCLCModule();
LoadCLUIModule();
LoadButtonModule();
+
HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
+ HookEvent(ME_LANGPACK_CHANGED, OnLangChange);
return rc;
}
|