summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classPsTree.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-23 21:56:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-23 21:56:20 +0000
commit037286255b6a26ed5fba94c5fe9e68b88c1755f7 (patch)
tree81508b2d8829b9757981ad5e39a1de6945859626 /plugins/UserInfoEx/src/classPsTree.cpp
parent8110099815a7ab25ff492ba34814eb21c9640ab9 (diff)
unifoex moved to the standard db_* functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@5103 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTree.cpp')
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 2a26926a35..0c2157bcd2 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -127,8 +127,7 @@ int CPsTree::AddDummyItem(LPCSTR pszGroup)
psh._pPages = _pItems;
psh._numPages = _numItems;
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = ghInst;
odp.flags = ODPF_TCHAR;
odp.ptszTitle = mir_utf8decodeT(pszGroup);
@@ -163,7 +162,7 @@ BYTE CPsTree::InitTreeItems(LPWORD needWidth)
if (!DB::Setting::GetUString(NULL, MODNAME, SET_LASTITEM, &dbv))
{
_curItem = FindItemIndexByName(dbv.pszVal);
- DB::Variant::Free(&dbv);
+ db_free(&dbv);
}
// init the groups
@@ -184,9 +183,8 @@ BYTE CPsTree::InitTreeItems(LPWORD needWidth)
// need to add an empty parent item
if (iParent == -1)
- {
iParent = AddDummyItem(pszGroup);
- }
+
_pItems[i]->Parent(iParent);
mir_free(pszGroup);
}
@@ -555,8 +553,8 @@ void CPsTree::SaveState()
}
// save current selected item
- if (pti) DB::Setting::WriteUString(SET_LASTITEM, pti->Name());
- else DB::Setting::Delete(NULL, MODNAME, SET_LASTITEM);
+ if (pti) db_set_utf(NULL, MODNAME, SET_LASTITEM, pti->Name());
+ else db_unset(NULL, MODNAME, SET_LASTITEM);
}
/**
@@ -588,7 +586,7 @@ void CPsTree::DBResetState()
if (s && *s == '{' && !mir_strnicmp(s + 1, p, c))
{
- DB::Setting::Delete(NULL, MODNAME, s);
+ db_unset(NULL, MODNAME, s);
}
}
// keep only these flags
@@ -640,7 +638,7 @@ int CPsTree::BeginLabelEdit(HTREEITEM hItem)
CPsTreeItem* pti;
// tree is readonly
- if (DB::Setting::GetByte(SET_PROPSHEET_READONLYLABEL, 0))
+ if (db_get_b(NULL, MODNAME, SET_PROPSHEET_READONLYLABEL, 0))
return 0;
// get item text
@@ -744,7 +742,7 @@ void CPsTree::PopupMenu()
tvi.hItem = hti.hItem;
TreeView_GetItem(_hWndTree, &tvi);
- if (!DB::Setting::GetByte(SET_PROPSHEET_READONLYLABEL, FALSE)) {
+ if (!db_get_b(NULL, MODNAME, SET_PROPSHEET_READONLYLABEL, FALSE)) {
mii.dwTypeData = TranslateT("Rename Item");
mii.wID = 32001;
InsertMenuItem(hPopup, 0, FALSE, &mii);