diff options
author | George Hazan <ghazan@miranda.im> | 2019-06-27 21:23:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-06-27 21:23:35 +0300 |
commit | 44525f461757fc859616fda16820351b07238842 (patch) | |
tree | 117ad05514eed381fc13dcf8befcf0ff06023e57 /protocols/Non-IM Contact/src | |
parent | 810ed4dea67b54a18f6ec3f5273d2f8efe08708c (diff) |
manual access to CList/Group restricted
Diffstat (limited to 'protocols/Non-IM Contact/src')
-rw-r--r-- | protocols/Non-IM Contact/src/contactinfo.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/protocols/Non-IM Contact/src/contactinfo.cpp b/protocols/Non-IM Contact/src/contactinfo.cpp index 00c718fad2..38a6312728 100644 --- a/protocols/Non-IM Contact/src/contactinfo.cpp +++ b/protocols/Non-IM Contact/src/contactinfo.cpp @@ -135,10 +135,9 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP for (int i = 1; (szGroup = Clist_GroupGetName(i, nullptr)) != nullptr; i++) SendDlgItemMessage(hwnd, IDC_GROUP, CB_INSERTSTRING, 0, LPARAM(szGroup)); - if (!db_get_ws(hContact, "CList", "Group", &dbv)) { - SetDlgItemText(hwnd, IDC_GROUP, dbv.pwszVal); - db_free(&dbv); - } + ptrW wszGroup(Clist_GetGroup(hContact)); + if (wszGroup) + SetDlgItemTextW(hwnd, IDC_GROUP, wszGroup); /* icons */ CheckRadioButton(hwnd, 40072, 40077, g_plugin.getWord(hContact, "Icon", ID_STATUS_ONLINE)); @@ -237,9 +236,9 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP wchar_t text[512]; GetDlgItemText(hwnd, IDC_GROUP, text, _countof(text)); Clist_GroupCreate(NULL, text); - db_set_ws(hContact, "CList", "Group", text); + Clist_SetGroup(hContact, text); } - else db_unset(hContact, "CList", "Group"); + else Clist_SetGroup(hContact, nullptr); for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_MAX; i++) if (IsDlgButtonChecked(hwnd, i)) |