diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-23 19:35:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-23 19:35:41 +0000 |
commit | ecbc38dec485f26b80889f104c68636f67a1251f (patch) | |
tree | 490cc2d05a318307b1daa83f03b1a64f2d63cfc3 /plugins/Clist_nicer | |
parent | 45c2ed059fdbfb2f5e9a9281f2e0538704f17017 (diff) |
rest of MetaProto/Enabled
git-svn-id: http://svn.miranda-ng.org/main/trunk@9929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 17 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/init.cpp | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 2821d6c39a..e9c7520c6a 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -97,6 +97,15 @@ static int ClcEventAdded(WPARAM hContact, LPARAM lParam) return 0;
}
+static int ClcMetamodeChanged(WPARAM bMetaEnabled, LPARAM lParam)
+{
+ if (bMetaEnabled != cfg::dat.bMetaEnabled) {
+ cfg::dat.bMetaEnabled = (BYTE)bMetaEnabled;
+ pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
+ }
+ return 0;
+}
+
static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
{
char *szProto = NULL;
@@ -159,13 +168,6 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) pcli->pfnClcBroadcast(INTM_HIDDENCHANGED, hContact, lParam);
}
}
- else if (!__strcmp(cws->szModule, META_PROTO)) {
- BYTE bMetaEnabled = cfg::getByte(META_PROTO, "Enabled", 1);
- if (bMetaEnabled != (BYTE)cfg::dat.bMetaEnabled) {
- cfg::dat.bMetaEnabled = bMetaEnabled;
- pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
- }
- }
else if (!__strcmp(cws->szModule, "Skin") && !__strcmp(cws->szSetting, "UseSound")) {
cfg::dat.soundsOff = cfg::getByte(cws->szModule, cws->szSetting, 0) ? 0 : 1;
ClcSetButtonState(IDC_TBSOUND, cfg::dat.soundsOff ? BST_CHECKED : BST_UNCHECKED);
@@ -217,6 +219,7 @@ int LoadCLCModule(void) hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
+ HookEvent(ME_MC_ENABLED, ClcMetamodeChanged);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
HookEvent(ME_DB_EVENT_ADDED, ClcEventAdded);
HookEvent(ME_OPT_INITIALISE, ClcOptInit);
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index d19ea44be7..de0efb2551 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -173,7 +173,7 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam) GetSystemTime(&cfg::dat.st);
SystemTimeToFileTime(&cfg::dat.st, &cfg::dat.ft);
- cfg::dat.bMetaEnabled = cfg::getByte(META_PROTO, "Enabled", 1);
+ cfg::dat.bMetaEnabled = db_mc_isEnabled();
cfg::dat.bAvatarServiceAvail = ServiceExists(MS_AV_GETAVATARBITMAP) ? TRUE : FALSE;
if (cfg::dat.bAvatarServiceAvail)
|