summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_options.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-09 19:52:07 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-09 19:52:07 +0000
commit56c1f62b71e28b12e83e4ee7999461f73a3367fb (patch)
tree4a8f66d01a94d3bed7bcd614d5bcaaa1250221ae /protocols/Tox/src/tox_options.cpp
parent4becc46d15baf8393a347c1d3897af5d8d55dea6 (diff)
Tox: id saves in db as blob at now
git-svn-id: http://svn.miranda-ng.org/main/trunk@10412 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r--protocols/Tox/src/tox_options.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 7df550d585..081da9d7b0 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -15,8 +15,15 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
ptrW nick(proto->getTStringA("Nick"));
SetDlgItemText(hwnd, IDC_NAME, nick);
- ptrA toxId(proto->getStringA(TOX_SETTINGS_ID));
- SetDlgItemTextA(hwnd, IDC_TOXID, toxId);
+ DBVARIANT dbv;
+ ;
+ if (!db_get(NULL, proto->m_szModuleName, TOX_SETTINGS_ID, &dbv))
+ {
+ std::vector<uint8_t> address(dbv.pbVal, dbv.pbVal + TOX_FRIEND_ADDRESS_SIZE);
+ std::string toxId = proto->DataToHexString(address);
+ SetDlgItemTextA(hwnd, IDC_TOXID, toxId.c_str());
+ db_free(&dbv);
+ }
ptrW group(proto->getTStringA(TOX_SETTINGS_GROUP));
SetDlgItemText(hwnd, IDC_GROUP, group);