summaryrefslogtreecommitdiff
path: root/plugins/MenuItemEx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/MenuItemEx
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/MenuItemEx')
-rw-r--r--plugins/MenuItemEx/src/main.cpp8
-rw-r--r--plugins/MenuItemEx/src/options.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index ab07749d10..c06be5f329 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -560,7 +560,7 @@ static INT_PTR onCopyID(WPARAM hContact, LPARAM)
wchar_t szID[256], buffer[256];
GetID(hContact, szProto, szID, _countof(szID));
- if (db_get_dw(NULL, MODULENAME, "flags", vf_default) & VF_CIDN) {
+ if (g_plugin.getDword("flags", vf_default) & VF_CIDN) {
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (!pa->bOldProto)
mir_snwprintf(buffer, L"%s: %s", pa->tszAccountName, szID);
@@ -578,7 +578,7 @@ static INT_PTR onCopyID(WPARAM hContact, LPARAM)
static INT_PTR onCopyStatusMsg(WPARAM hContact, LPARAM)
{
- DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
+ DWORD flags = g_plugin.getDword("flags", vf_default);
LPSTR module = GetContactProto(hContact);
if (!module)
@@ -704,7 +704,7 @@ static int isIgnored(MCONTACT hContact, int type)
static INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
{
- if (db_get_b(NULL, MODULENAME, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL))
+ if (g_plugin.getByte("ignorehide", 0) && (lparam == IGNOREEVENT_ALL))
db_set_b((MCONTACT)wparam, "CList", "Hidden", (isIgnored((MCONTACT)wparam, lparam) ? (byte)0 : (byte)1));
CallService(isIgnored((MCONTACT)wparam, lparam) ? MS_IGNORE_UNIGNORE : MS_IGNORE_IGNORE, wparam, lparam);
@@ -739,7 +739,7 @@ static void ModifySubmenuItem(HGENMENU hItem, int checked, int hidden)
// called when the contact-menu is built
static int BuildMenu(WPARAM wparam, LPARAM)
{
- DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
+ DWORD flags = g_plugin.getDword("flags", vf_default);
int j = 0, all = 0, hide = 0;
BOOL bIsOnline = FALSE, bShowAll = CTRL_IS_PRESSED;
MCONTACT hContact = (MCONTACT)wparam;
diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp
index 313ee51702..13512fff96 100644
--- a/plugins/MenuItemEx/src/options.cpp
+++ b/plugins/MenuItemEx/src/options.cpp
@@ -28,7 +28,7 @@ static const checkboxes[] = {
INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
- DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
+ DWORD flags = g_plugin.getDword("flags", vf_default);
wchar_t buffer[64] = { 0 };
int i;
@@ -68,7 +68,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
for (auto &it : checkboxes)
mod_flags |= IsDlgButtonChecked(hdlg, it.idc) ? it.flag : 0;
- db_set_dw(NULL, MODULENAME, "flags", mod_flags);
+ g_plugin.setDword("flags", mod_flags);
return 1;
}
break;