diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/UserInfoEx/src/mir_menuitems.cpp | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/UserInfoEx/src/mir_menuitems.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/mir_menuitems.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index 157d7fcc1a..8b33978a46 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -73,10 +73,10 @@ void RebuildContact() SvcHomepageRebuildMenu();
// load options
- int flag = db_get_b(NULL, MODULENAME, SET_MI_CONTACT, MCAS_NOTINITIATED);
+ int flag = g_plugin.getByte(SET_MI_CONTACT, MCAS_NOTINITIATED);
if (flag == MCAS_NOTINITIATED) {
flag = MCAS_EXIMPORT | TRUE;
- db_set_b(NULL, MODULENAME, SET_MI_CONTACT, flag);
+ g_plugin.setByte(SET_MI_CONTACT, flag);
}
// delete all MenuItems and set all bytes 0 to avoid problems
@@ -166,10 +166,10 @@ void RebuildMain() static HGENMENU hMenuItem[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
// load options
- int flag = db_get_b(NULL, MODULENAME, SET_MI_MAIN, MCAS_NOTINITIATED);
+ int flag = g_plugin.getByte(SET_MI_MAIN, MCAS_NOTINITIATED);
if (flag == MCAS_NOTINITIATED) {
flag = MCAS_ALL | TRUE;
- db_set_b(NULL, MODULENAME, SET_MI_MAIN, flag);
+ g_plugin.setByte(SET_MI_MAIN, flag);
}
// delete all MenuItems and set all bytes 0 to avoid problems
@@ -240,8 +240,8 @@ void RebuildMain() // reminder
mi.root = mhRoot;
const BYTE bRemindMenus =
- db_get_b(NULL, MODULENAME, SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) &&
- db_get_b(NULL, MODULENAME, SET_REMIND_MENUENABLED, DEFVAL_REMIND_MENUENABLED);
+ g_plugin.getByte(SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) &&
+ g_plugin.getByte(SET_REMIND_MENUENABLED, DEFVAL_REMIND_MENUENABLED);
if (bRemindMenus) {
// make backup of each protocol based birthday
SET_UID(mi, 0x67980bea, 0x8fca, 0x4642, 0x96, 0x78, 0x6a, 0xc0, 0xe3, 0x74, 0x4c, 0x2a);
@@ -300,10 +300,10 @@ void RebuildGroup() static HGENMENU hMenuItem[3] = { nullptr, nullptr, nullptr };
// load options
- flag = db_get_b(NULL, MODULENAME, SET_MI_GROUP, MCAS_NOTINITIATED);
+ flag = g_plugin.getByte(SET_MI_GROUP, MCAS_NOTINITIATED);
if (flag == MCAS_NOTINITIATED) {
flag = MCAS_EXIMPORT | TRUE;
- db_set_b(NULL, MODULENAME, SET_MI_GROUP, flag);
+ g_plugin.setByte(SET_MI_GROUP, flag);
}
// delete all MenuItems and set all bytes 0 to avoid problems
@@ -391,10 +391,10 @@ void RebuildSubGroup() static HGENMENU hMenuItem[3] = { nullptr, nullptr, nullptr };
// load options
- flag = db_get_b(NULL, MODULENAME, SET_MI_SUBGROUP, MCAS_NOTINITIATED);
+ flag = g_plugin.getByte(SET_MI_SUBGROUP, MCAS_NOTINITIATED);
if (flag == MCAS_NOTINITIATED) {
flag = MCAS_DISABLED | TRUE;
- db_set_b(NULL, MODULENAME, SET_MI_SUBGROUP, flag);
+ g_plugin.setByte(SET_MI_SUBGROUP, flag);
}
// delete all MenuItems and set all bytes 0 to avoid problems
@@ -499,10 +499,10 @@ INT_PTR RebuildAccount(WPARAM, LPARAM lParam) RemoveMenuItems(hMenuItemAccount, mItems * g_clistApi.menuProtos->getCount());
// load options
- int flag = db_get_b(NULL, MODULENAME, SET_MI_ACCOUNT, MCAS_NOTINITIATED);
+ int flag = g_plugin.getByte(SET_MI_ACCOUNT, MCAS_NOTINITIATED);
if (flag == MCAS_NOTINITIATED) {
flag = MCAS_EXIMPORT | TRUE;
- db_set_b(NULL, MODULENAME, SET_MI_ACCOUNT, flag);
+ g_plugin.setByte(SET_MI_ACCOUNT, flag);
}
// loop for all account names
|