summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classPsTree.cpp
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/UserInfoEx/src/classPsTree.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTree.cpp')
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index fb895460cc..c3939a94f9 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -158,7 +158,7 @@ BYTE CPsTree::InitTreeItems(LPWORD needWidth)
return FALSE;
}
- if (!DB::Setting::GetUString(NULL, MODULENAME, SET_LASTITEM, &dbv))
+ if (!DB::Setting::GetUString(0, MODULENAME, SET_LASTITEM, &dbv))
{
_curItem = FindItemIndexByName(dbv.pszVal);
db_free(&dbv);
@@ -552,8 +552,8 @@ void CPsTree::SaveState()
}
// save current selected item
- if (pti) db_set_utf(NULL, MODULENAME, SET_LASTITEM, pti->Name());
- else db_unset(NULL, MODULENAME, SET_LASTITEM);
+ if (pti) db_set_utf(0, MODULENAME, SET_LASTITEM, pti->Name());
+ else g_plugin.delSetting(SET_LASTITEM);
}
/**
@@ -576,7 +576,7 @@ void CPsTree::DBResetState()
for (auto &s : Settings)
if (s && *s == '{' && !mir_strncmpi(s + 1, p, c))
- db_unset(NULL, MODULENAME, s);
+ g_plugin.delSetting(s);
// keep only these flags
_dwFlags &= PSTVF_SORTTREE|PSTVF_GROUPS;
@@ -627,7 +627,7 @@ int CPsTree::BeginLabelEdit(HTREEITEM hItem)
CPsTreeItem* pti;
// tree is readonly
- if (db_get_b(NULL, MODULENAME, SET_PROPSHEET_READONLYLABEL, 0))
+ if (g_plugin.getByte(SET_PROPSHEET_READONLYLABEL, 0))
return 0;
// get item text
@@ -731,7 +731,7 @@ void CPsTree::PopupMenu()
tvi.hItem = hti.hItem;
TreeView_GetItem(_hWndTree, &tvi);
- if (!db_get_b(NULL, MODULENAME, SET_PROPSHEET_READONLYLABEL, FALSE)) {
+ if (!g_plugin.getByte(SET_PROPSHEET_READONLYLABEL, FALSE)) {
mii.dwTypeData = TranslateT("Rename Item");
mii.wID = 32001;
InsertMenuItem(hPopup, 0, FALSE, &mii);