summaryrefslogtreecommitdiff
path: root/plugins/WebView/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-24 11:11:26 +0300
commitd296f9f99daf102b9af5d56690e2bd00d61c1267 (patch)
tree39311caaf80abf0b47ecb78cf94dc8157b193575 /plugins/WebView/src
parentffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff)
database:
- senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead; - if you want db_get to return a string, you need to use db_get_s.
Diffstat (limited to 'plugins/WebView/src')
-rw-r--r--plugins/WebView/src/webview.cpp2
-rw-r--r--plugins/WebView/src/webview_alerts.cpp2
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp2
-rw-r--r--plugins/WebView/src/webview_getdata.cpp2
-rw-r--r--plugins/WebView/src/webview_opts.cpp20
-rw-r--r--plugins/WebView/src/webview_services.cpp4
6 files changed, 16 insertions, 16 deletions
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp
index d00e473a66..2be23ed09a 100644
--- a/plugins/WebView/src/webview.cpp
+++ b/plugins/WebView/src/webview.cpp
@@ -239,7 +239,7 @@ int SendToRichEdit(HWND hWindow, char *truncated, COLORREF rgbText, COLORREF rgb
cfFM.dwEffects = bold | italic | underline;
if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
- mir_wstrcpy(cfFM.szFaceName, dbv.ptszVal);
+ mir_wstrcpy(cfFM.szFaceName, dbv.pwszVal);
db_free(&dbv);
}
else mir_wstrcpy(cfFM.szFaceName, Def_font_face);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 2cf0cdaf5a..ad281c4b3c 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -116,7 +116,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
if( ((HANDLE)wParam) != nullptr) {
DBVARIANT dbv;
db_get_ws(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
- mir_wstrncpy(ppd.lptzContactName, dbv.ptszVal, _countof(ppd.lptzContactName));
+ mir_wstrncpy(ppd.lptzContactName, dbv.pwszVal, _countof(ppd.lptzContactName));
db_free(&dbv);
}
else mir_wstrcpy(ppd.lptzContactName, _A2W(MODULENAME));
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index 19b600d481..4b70e7c2cb 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -162,7 +162,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
url[0] = '\0';
if (!db_get_ws(hContact2, MODULENAME, URL_KEY, &dbv)) {
- wcsncpy_s(url, dbv.ptszVal, _TRUNCATE);
+ wcsncpy_s(url, dbv.pwszVal, _TRUNCATE);
db_free(&dbv);
}
SetDlgItemText(hwndDlg, IDC_OPEN_URL, FixButtonText(url, _countof(url)));
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp
index 7340f6a58c..3d8a3db19c 100644
--- a/plugins/WebView/src/webview_getdata.cpp
+++ b/plugins/WebView/src/webview_getdata.cpp
@@ -298,7 +298,7 @@ void GetData(void *param)
if (db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) == 1)
strftime(temptime, 128, "(%b %d,%H:%M:%S)", nTime);
- db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.pwszVal);
if (db_get_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, 1) == 1)
mir_snprintf(tstr, "%s %s", temptime, dbv.pszVal);
if (db_get_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, 1) == 0)
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp
index 3573ead3c2..27091fd65b 100644
--- a/plugins/WebView/src/webview_opts.cpp
+++ b/plugins/WebView/src/webview_opts.cpp
@@ -279,15 +279,15 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
EnableWindow(GetDlgItem(hwndDlg, IDC_ALERT_APPLY), 0);
if (!db_get_ws(hContact, MODULENAME, ALERT_STRING_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_ALERT_STRING, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_ALERT_STRING, dbv.pwszVal);
db_free(&dbv);
}
if (!db_get_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_START2, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_START2, dbv.pwszVal);
db_free(&dbv);
}
if (!db_get_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_END2, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_END2, dbv.pwszVal);
db_free(&dbv);
}
CheckDlgButton(hwndDlg, IDC_ENABLE_ALERTS, db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
@@ -408,7 +408,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
}
if (!db_get_ws(hContact, MODULENAME, FILE_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.pwszVal);
db_free(&dbv);
}
@@ -801,25 +801,25 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_APPLY), 0);
if (!db_get_ws(hContact, MODULENAME, URL_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_URL, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_URL, dbv.pwszVal);
db_free(&dbv);
}
if (!db_get_ws(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_START, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_START, dbv.pwszVal);
db_free(&dbv);
}
if (!db_get_ws(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_END, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_END, dbv.pwszVal);
db_free(&dbv);
}
if (db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
db_free(&dbv);
db_get_ws(hContact, "CList", "MyHandle", &dbv);
- db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.pwszVal);
db_free(&dbv);
}
if (!db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_SITE_NAME, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_SITE_NAME, dbv.pwszVal);
db_free(&dbv);
}
@@ -1063,7 +1063,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
CheckDlgButton(hwndDlg, IDC_DATAPOPUP, db_get_b(NULL, MODULENAME, DATA_POPUP_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_TYPEFACE, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_TYPEFACE, dbv.pwszVal);
db_free(&dbv);
}
else SetDlgItemText(hwndDlg, IDC_TYPEFACE, Def_font_face);
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index 5830d5ea65..229583a1e8 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -347,7 +347,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
// check ID to see if the contact already exist in the database
if (db_get_ws(hContact, MODULENAME, "URL", &dbv))
continue;
- if (!mir_wstrcmpi(psr->nick.w, dbv.ptszVal)) {
+ if (!mir_wstrcmpi(psr->nick.w, dbv.pwszVal)) {
// remove the flag for not on list and hidden, thus make the
// contact visible
// and add them on the list
@@ -398,7 +398,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam)
for (auto &hContact2 : Contacts(MODULENAME)) {
if (!db_get_ws(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
- if (!mir_wstrcmpi(Newnick, dbv.ptszVal)) {
+ if (!mir_wstrcmpi(Newnick, dbv.pwszVal)) {
// remove the flag for not on list and hidden, thus make the
// contact visible
// and add them on the list