From 00c866aaa0b79c354f9c71ca5d61f57daeec6e6a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Jul 2013 20:01:20 +0000 Subject: protocol DB helpers for Skype git-svn-id: http://svn.miranda-ng.org/main/trunk@5313 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_dialogs.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'protocols/Skype/src/skype_dialogs.cpp') diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 010e599ec4..f907eedb90 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -585,7 +585,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA // nick DBVARIANT dbv; - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "Nick", &dbv)) + if ( !ppro->getTString("Nick", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_FULLNAME, dbv.ptszVal); ::db_free(&dbv); @@ -594,7 +594,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA ::SetDlgItemText(hwndDlg, IDC_FULLNAME, _T("")); // homepage - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "Homepage", &dbv)) + if ( !ppro->getTString("Homepage", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_HOMEPAGE, dbv.ptszVal); ::db_free(&dbv); @@ -603,7 +603,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA ::SetDlgItemText(hwndDlg, IDC_HOMEPAGE, _T("")); // about - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "About", &dbv)) { + if ( !ppro->getTString("About", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_ABOUT, dbv.ptszVal); ::db_free(&dbv); } @@ -611,7 +611,7 @@ INT_PTR CALLBACK CSkypeProto::PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARA ::SetDlgItemText(hwndDlg, IDC_ABOUT, _T("")); // mood - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "XStatusMsg", &dbv)) { + if ( !ppro->getTString("XStatusMsg", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_MOOD, dbv.ptszVal); ::db_free(&dbv); } @@ -664,42 +664,42 @@ INT_PTR CALLBACK CSkypeProto::ContactSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM ::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); DBVARIANT dbv; - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "Cellular", &dbv)) { + if ( !ppro->getTString("Cellular", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_MOBPHONE, dbv.ptszVal); ::db_free(&dbv); } else ::SetDlgItemText(hwndDlg, IDC_MOBPHONE, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "Phone", &dbv)) { + if ( !ppro->getTString("Phone", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_HOMEPHONE, dbv.ptszVal); ::db_free(&dbv); } else ::SetDlgItemText(hwndDlg, IDC_HOMEPHONE, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "CompanyPhone", &dbv)) { + if ( !ppro->getTString("CompanyPhone", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_OFFICEPHONE, dbv.ptszVal); ::db_free(&dbv); } else ::SetDlgItemText(hwndDlg, IDC_OFFICEPHONE, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "e-mail0", &dbv)) { + if ( !ppro->getTString("e-mail0", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_EMAIL1, dbv.ptszVal); ::db_free(&dbv); } else ::SetDlgItemText(hwndDlg, IDC_EMAIL1, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "e-mail1", &dbv)) { + if ( !ppro->getTString("e-mail1", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_EMAIL2, dbv.ptszVal); ::db_free(&dbv); } else ::SetDlgItemText(hwndDlg, IDC_EMAIL2, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "e-mail2", &dbv)) { + if ( !ppro->getTString("e-mail2", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_EMAIL3, dbv.ptszVal); ::db_free(&dbv); } @@ -749,19 +749,17 @@ INT_PTR CALLBACK CSkypeProto::HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wP ::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); DBVARIANT dbv; - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "City", &dbv)) { + if ( !ppro->getTString("City", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal); ::db_free(&dbv); } - else - ::SetDlgItemText(hwndDlg, IDC_CITY, _T("")); + else ::SetDlgItemText(hwndDlg, IDC_CITY, _T("")); - if ( !::db_get_ts(NULL, ppro->m_szModuleName, "State", &dbv)) { + if ( !ppro->getTString("State", &dbv)) { ::SetDlgItemText(hwndDlg, IDC_STATE, dbv.ptszVal); ::db_free(&dbv); } - else - ::SetDlgItemText(hwndDlg, IDC_STATE, _T("")); + else ::SetDlgItemText(hwndDlg, IDC_STATE, _T("")); ptrW countr(::db_get_wsa(NULL, ppro->m_szModuleName, "Country")); for (int i = 0; i < g_cbCountries; i++) -- cgit v1.2.3