diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-05-21 00:38:28 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-05-21 00:38:28 +0300 |
commit | 829c3778ac700f2d64e7032d0727f860196e4417 (patch) | |
tree | 6f3b295e9ba3a7ed8ad5c3771d832e4c949019f9 /utilities.cpp | |
parent | bad201c5132117e8b227021b12ff9e5377a98496 (diff) |
fixed another metacontacts problem
Diffstat (limited to 'utilities.cpp')
-rwxr-xr-x | utilities.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/utilities.cpp b/utilities.cpp index 67e0238..c52edde 100755 --- a/utilities.cpp +++ b/utilities.cpp @@ -1280,3 +1280,28 @@ string time_str() boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); return (string)boost::posix_time::to_simple_string(now); } + +int handleEnum(const char *szSetting, LPARAM lParam) +{ + if(szSetting[0] && StriStr(szSetting, "tabsrmm")) + { + bool f = false, *found = (bool*)lParam; + f = !DBGetContactSettingByte(NULL, "PluginDisable", szSetting, 0); + if(f) + *found = f; + } + return 0; +} + +bool isTabsrmmUsed() +{ + DBCONTACTENUMSETTINGS enm = {0}; + bool found = false; + enm.lParam = (LPARAM)&found; + enm.pfnEnumProc = (DBSETTINGENUMPROC)&handleEnum; + enm.szModule = "PluginDisable"; + if(CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&enm) == -1) + return false; + + return found; +} |