diff options
Diffstat (limited to 'plugins/WebView')
-rw-r--r-- | plugins/WebView/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/WebView/src/webview.cpp | 6 | ||||
-rw-r--r-- | plugins/WebView/src/webview_alerts.cpp | 12 | ||||
-rw-r--r-- | plugins/WebView/src/webview_datawnd.cpp | 24 | ||||
-rw-r--r-- | plugins/WebView/src/webview_getdata.cpp | 18 | ||||
-rw-r--r-- | plugins/WebView/src/webview_opts.cpp | 60 | ||||
-rw-r--r-- | plugins/WebView/src/webview_services.cpp | 30 |
7 files changed, 78 insertions, 78 deletions
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index a47782293c..e3beb4f848 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -164,13 +164,13 @@ extern "C" int __declspec(dllexport) Load() InitServices();
//add sound event to options
- SkinAddNewSoundExT("webviewalert", MODULENAMEW, LPGENW("Alert event"));
+ SkinAddNewSoundExW("webviewalert", MODULENAMEW, LPGENW("Alert event"));
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
if ( db_get_b(NULL, MODULENAME, MENU_OFF, 0)) {
//value is 0 if menu is enabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 0);
@@ -230,7 +230,7 @@ extern "C" int __declspec(dllexport) Load() }
// contact menu
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xadc6a9a4, 0xdf7, 0x4f63, 0x89, 0x11, 0x8e, 0x42, 0x1d, 0xd6, 0x29, 0x31);
CreateServiceFunction("Open web page", WebsiteMenuCommand);
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 39cbf6dfc7..4cfc3f1d0d 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -173,7 +173,7 @@ int Doubleclick(WPARAM wParam, LPARAM) int action = db_get_b(hContact, MODULENAME, DBLE_WIN_KEY, 1);
if (action == 0) {
- ptrW url(db_get_tsa(hContact, MODULENAME, "URL"));
+ ptrW url(db_get_wsa(hContact, MODULENAME, "URL"));
Utils_OpenUrlT(url);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
@@ -240,7 +240,7 @@ int SendToRichEdit(HWND hWindow, char *truncated, COLORREF rgbText, COLORREF rgb cfFM.dwEffects = bold | italic | underline;
- if (!db_get_ts(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
mir_wstrcpy(cfFM.szFaceName, dbv.ptszVal);
db_free(&dbv);
}
@@ -443,7 +443,7 @@ int OnTopMenuCommand(WPARAM, LPARAM, MCONTACT singlecontact) INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM)
{
MCONTACT hContact = wParam;
- ptrW url(db_get_tsa(hContact, MODULENAME, "URL"));
+ ptrW url(db_get_wsa(hContact, MODULENAME, "URL"));
if (url)
Utils_OpenUrlT(url);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index eee757a5e8..f5e40cb45d 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -30,7 +30,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_COMMAND:
case WM_CONTEXTMENU:
MCONTACT hContact = PUGetContact(hWnd);
- ptrW url( db_get_tsa(hContact, MODULENAME, URL_KEY));
+ ptrW url( db_get_wsa(hContact, MODULENAME, URL_KEY));
if (message == WM_COMMAND) { // left click
if(hContact != NULL) {
@@ -115,7 +115,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) if( ((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- db_get_ts(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
+ db_get_ws(wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
mir_wstrncpy(ppd.lptzContactName, dbv.ptszVal, _countof(ppd.lptzContactName));
db_free(&dbv);
}
@@ -192,7 +192,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) PUShowMessageT(newdisplaytext, SM_WARNING);
}
else if ( ServiceExists("OSD/Announce") && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_snwprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateTS(displaytext));
+ mir_snwprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateW(displaytext));
CallService("OSD/Announce", (WPARAM)newdisplaytext, 0);
}
else if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
@@ -200,7 +200,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) webview_tip.cbSize = sizeof(MIRANDASYSTRAYNOTIFY);
webview_tip.szProto = NULL;
webview_tip.tszInfoTitle = ptszContactName;
- webview_tip.tszInfo = TranslateTS(displaytext);
+ webview_tip.tszInfo = TranslateW(displaytext);
webview_tip.dwInfoFlags = NIIF_ERROR | NIIF_INTERN_UNICODE;
webview_tip.uTimeout = 15000;
CallService(MS_CLIST_SYSTRAY_NOTIFY, 0, (LPARAM) &webview_tip);
@@ -445,7 +445,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn else {
fwrite(tempraw, mir_strlen(tempraw), 1, pcachefile); //smaller cache
fclose(pcachefile);
- db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
+ db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
}
// end write to cache
@@ -656,7 +656,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, mir_strlen(raw), 1, pcachefile); //smaller cache
- db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
+ db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
fclose(pcachefile);
}
// end write to cache
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index a45f188ac1..462b903628 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -129,8 +129,8 @@ static MCONTACT FindContactByUrl(HWND hwndDlg) GetWindowText(hwndDlg, titlebartxt, _countof(titlebartxt));
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
- ptrW db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
- ptrW db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
+ ptrW db1( db_get_wsa(hContact, MODULENAME, URL_KEY));
+ ptrW db2( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
if (!mir_wstrcmp(urltext, db1) && !mir_wstrcmp(titlebartxt, db2)) {
contactcount++;
@@ -161,7 +161,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA WindowList_Add(hWindowList, hwndDlg, hContact2);
url[0] = '\0';
- if (!db_get_ts(hContact2, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_ws(hContact2, MODULENAME, URL_KEY, &dbv)) {
wcsncpy_s(url, dbv.ptszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -183,29 +183,29 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, colour);
SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_UPDATE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Update data"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_UPDATE_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Update data"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_FIND), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Find"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_FIND_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Find"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_OPTIONS), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Contact options"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_OPTIONS_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Contact options"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_ALERT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Alert options"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_ALERT_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Alert options"), BATF_UNICODE);
SendDlgItemMessage(hwndDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_STOP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stop processing"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stop processing"), BATF_UNICODE);
- SendDlgItemMessage(hwndDlg, IDC_OPEN_URL, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Click here to open this URL in a browser window."), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_OPEN_URL, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Click here to open this URL in a browser window."), BATF_UNICODE);
if (!db_get_b(hContact2, MODULENAME, ON_TOP_KEY, 0)) {
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_UNSTICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stick to the front"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Stick to the front"), BATF_UNICODE);
}
else {
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadImage(hInst, MAKEINTRESOURCE(IDI_STICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Disable stick to the front"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Disable stick to the front"), BATF_UNICODE);
}
SendDlgItemMessage(hwndDlg, IDC_DATA, WM_SETFONT, (WPARAM) h_font, 1);
@@ -369,7 +369,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ptszToolTip = TranslateT("Disable stick to the front");
}
SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_UNSTICK), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
- SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM)ptszToolTip, BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDC_STICK_BUTTON, BUTTONADDTOOLTIP, (WPARAM)ptszToolTip, BATF_UNICODE);
SetWindowPos(hwndDlg, hTopmost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
break;
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index 55299017a5..75fca2a20f 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -131,7 +131,7 @@ void GetData(void *param) EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE_BUTTON), 1);
SetDlgItemText(hwndDlg, IDC_STATUSBAR, TranslateT("Download in progress, please wait..."));
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Updating..."));
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_DND); // download
NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST *) CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM) hNetlibUser, (LPARAM) & nlhr);
@@ -142,7 +142,7 @@ void GetData(void *param) wchar_t *statusText = TranslateT("The server replied with a failure code");
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
}
if (nlhrReply->dataLength) {
trunccount = 0;
@@ -158,7 +158,7 @@ void GetData(void *param) wchar_t *statusText = TranslateT("The server is down or lagging.");
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
}
if (!(nlhrReply))
@@ -248,7 +248,7 @@ void GetData(void *param) if (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 0) {
wchar_t *statusText = TranslateT("Both search strings not found or strings not set.");
WErrorPopup(hContact, statusText);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
DownloadSuccess = 0;
SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
@@ -286,7 +286,7 @@ void GetData(void *param) db_free(&dbv);
}
else {
- db_get_ts(hContact, "CList", "MyHandle", &dbv);
+ db_get_ws(hContact, "CList", "MyHandle", &dbv);
memset(&temptime, 0, sizeof(temptime));
memset(&tstr, 0, sizeof(tstr));
ftime = time(NULL);
@@ -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_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
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)
@@ -359,7 +359,7 @@ LBL_Stop: wchar_t *statusText = TranslateT("Processing data stopped by user.") SetDlgItemText(hwndDlg, IDC_STATUSBAR, statusText);
db_set_b(hContact, MODULENAME, STOP_KEY, 0);
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
- db_set_ts(hContact, "CList", "StatusMsg", statusText);
+ db_set_ws(hContact, "CList", "StatusMsg", statusText);
AlreadyDownloading = 0;
return;
}
@@ -444,11 +444,11 @@ LBL_Stop: wchar_t *statusText = TranslateT("Processing data stopped by user.") if (TherewasAlert) {
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_OCCUPIED);
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Alert!"));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Alert!"));
}
else {
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
- db_set_ts(hContact, "CList", "StatusMsg", TranslateT("Online"));
+ db_set_ws(hContact, "CList", "StatusMsg", TranslateT("Online"));
}
}
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index 69d878fbd6..393388ea34 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -283,15 +283,15 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l EnableWindow(GetDlgItem(hwndDlg, IDC_ALERT_APPLY), 0);
- if (!db_get_ts(hContact, MODULENAME, ALERT_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALERT_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_ALERT_STRING, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_START2, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_END2, dbv.ptszVal);
db_free(&dbv);
}
@@ -300,14 +300,14 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l CheckDlgButton(hwndDlg, IDC_24_HOUR, db_get_b(hContact, MODULENAME, USE_24_HOUR_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ALWAYS_LOG, db_get_b(hContact, MODULENAME, ALWAYS_LOG_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemText(hwndDlg, IDC_ALERT_TYPE, TranslateTS(AlertTypes[db_get_b(hContact, MODULENAME, ALRT_INDEX_KEY, 0)]));
- SetDlgItemText(hwndDlg, IDC_EVENT_TYPE, TranslateTS(EventTypes[db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0)]));
+ SetDlgItemText(hwndDlg, IDC_ALERT_TYPE, TranslateW(AlertTypes[db_get_b(hContact, MODULENAME, ALRT_INDEX_KEY, 0)]));
+ SetDlgItemText(hwndDlg, IDC_EVENT_TYPE, TranslateW(EventTypes[db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0)]));
for (i = 0; i < _countof(AlertTypes); i++)
- SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(AlertTypes[i]));
+ SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(AlertTypes[i]));
for (i = 0; i < _countof(EventTypes); i++)
- SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(EventTypes[i]));
+ SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateW(EventTypes[i]));
if (db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) {
CheckDlgButton(hwndDlg, IDC_ENABLE_ALERTS, BST_UNCHECKED);
@@ -412,7 +412,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
}
- if (!db_get_ts(hContact, MODULENAME, FILE_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, FILE_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILENAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -746,19 +746,19 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
GetDlgItemText(hwndDlg, IDC_FILENAME, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, FILE_KEY, buf);
+ db_set_ws(hContact, MODULENAME, FILE_KEY, buf);
db_set_b(hContact, MODULENAME, APPEND_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_APPEND));
db_set_b(hContact, MODULENAME, SAVE_AS_RAW_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVE_AS_RAW));
GetDlgItemText(hwndDlg, IDC_ALERT_STRING, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALERT_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALERT_STRING_KEY, buf);
GetDlgItemText(hwndDlg, IDC_START2, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, buf);
GetDlgItemText(hwndDlg, IDC_END2, buf, _countof(buf));
- db_set_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, buf);
+ db_set_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, buf);
db_set_b(hContact, MODULENAME, CONTACT_PREFIX_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PREFIX));
@@ -823,25 +823,25 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_APPLY), 0);
- if (!db_get_ts(hContact, MODULENAME, URL_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, URL_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_URL, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, START_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_START, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, END_STRING_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_END, dbv.ptszVal);
db_free(&dbv);
}
- if (db_get_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
db_free(&dbv);
- db_get_ts(hContact, "CList", "MyHandle", &dbv);
- db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
+ db_get_ws(hContact, "CList", "MyHandle", &dbv);
+ db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, dbv.ptszVal);
db_free(&dbv);
}
- if (!db_get_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if (!db_get_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_SITE_NAME, dbv.ptszVal);
db_free(&dbv);
}
@@ -850,7 +850,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_SETRANGE, FALSE, MAKELONG(0, 4));
SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_SETPOS, TRUE, db_get_b(hContact, MODULENAME, RWSPACE_KEY, 0));
- SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateTS(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateW(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
EnableWindow(GetDlgItem(hwndDlg, IDC_RWSPACE), (IsDlgButtonChecked(hwndDlg, IDC_CLEAN)));
EnableWindow(GetDlgItem(hwndDlg, IDC_RWSPC_TEXT), (IsDlgButtonChecked(hwndDlg, IDC_CLEAN)));
@@ -876,7 +876,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
case WM_HSCROLL:
- SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateTS(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
+ SetDlgItemText(hwndDlg, IDC_RWSPC_TEXT, TranslateW(szTrackerBarDescr[SendDlgItemMessage(hwndDlg, IDC_RWSPACE, TBM_GETPOS, 0, 0)]));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_APPLY), 1);
break;
@@ -918,10 +918,10 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_START, string, _countof(string));
- db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
+ db_set_ws(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
GetDlgItemText(hwndDlg, IDC_END, string, _countof(string));
- db_set_ts(hContact, MODULENAME, ALRT_E_STRING_KEY, string);
+ db_set_ws(hContact, MODULENAME, ALRT_E_STRING_KEY, string);
db_set_w(hContact, MODULENAME, EVNT_INDEX_KEY, 2);
}
@@ -1013,17 +1013,17 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_URL, url, _countof(url));
- db_set_ts(hContact, MODULENAME, URL_KEY, url);
- db_set_ts(hContact, MODULENAME, "Homepage", url);
+ db_set_ws(hContact, MODULENAME, URL_KEY, url);
+ db_set_ws(hContact, MODULENAME, "Homepage", url);
GetDlgItemText(hwndDlg, IDC_START, str, _countof(str));
- db_set_ts(hContact, MODULENAME, START_STRING_KEY, str);
+ db_set_ws(hContact, MODULENAME, START_STRING_KEY, str);
GetDlgItemText(hwndDlg, IDC_END, str, _countof(str));
- db_set_ts(hContact, MODULENAME, END_STRING_KEY, str);
+ db_set_ws(hContact, MODULENAME, END_STRING_KEY, str);
GetDlgItemText(hwndDlg, IDC_SITE_NAME, str, _countof(str));
- db_set_ts(hContact, "CList", "MyHandle", str);
+ db_set_ws(hContact, "CList", "MyHandle", str);
db_set_b(hContact, MODULENAME, DBLE_WIN_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DBLE_WIN));
db_set_b(hContact, MODULENAME, U_ALLSITE_KEY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_U_ALLSITE));
@@ -1103,7 +1103,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara CheckDlgButton(hwndDlg, IDC_NO_PROTECT, db_get_b(NULL, MODULENAME, NO_PROTECT_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DATAPOPUP, db_get_b(NULL, MODULENAME, DATA_POPUP_KEY, 0) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get_ts(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
+ if (!db_get_ws(NULL, MODULENAME, FONT_FACE_KEY, &dbv)) {
SetDlgItemText(hwndDlg, IDC_TYPEFACE, dbv.ptszVal);
db_free(&dbv);
}
@@ -1269,7 +1269,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara wchar_t str[100];
GetDlgItemText(hwndDlg, IDC_TYPEFACE, str, _countof(str));
- db_set_ts(NULL, MODULENAME, FONT_FACE_KEY, str);
+ db_set_ws(NULL, MODULENAME, FONT_FACE_KEY, str);
db_set_b(NULL, MODULENAME, FONT_SIZE_KEY, (GetDlgItemInt(hwndDlg, IDC_FONTSIZE, NULL, FALSE)));
db_set_b(NULL, MODULENAME, FONT_SCRIPT_KEY, ((BYTE)SendDlgItemMessage(hwndDlg, IDC_SCRIPT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_SCRIPT, CB_GETCURSEL, 0, 0), 0)));
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index b3d8a70504..9958e98629 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -46,12 +46,12 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) // A contact is renamed if (!strcmp(cws->szSetting, "MyHandle")) { - ptrW oldName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); + ptrW oldName( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); if (oldName == NULL) return 0; wchar_t nick[100]; - ptrW oldnick( db_get_tsa(hContact, "CList", "MyHandle")); + ptrW oldnick( db_get_wsa(hContact, "CList", "MyHandle")); if (oldnick != NULL) wcsncpy_s(nick, oldnick, _TRUNCATE); else @@ -74,9 +74,9 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) } if ( wcschr(nick, '(') == 0) { - db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, nick); - db_set_ts(hContact, MODULENAME, "Nick", nick); - db_set_ts(hContact, "CList", "MyHandle", nick); + db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, nick); + db_set_ws(hContact, MODULENAME, "Nick", nick); + db_set_ws(hContact, "CList", "MyHandle", nick); } // TEST GET NAME FOR CACHE @@ -99,7 +99,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) fclose(pcachefile); if (mir_wstrcmp(newcachepath, renamedcachepath)) { MoveFile(newcachepath, renamedcachepath); - db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath); + db_set_ws(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath); } } } @@ -115,7 +115,7 @@ int SiteDeleted(WPARAM wParam, LPARAM) if (mir_strcmp(GetContactProto(hContact), MODULENAME)) return 0; - ptrW contactName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); + ptrW contactName( db_get_wsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); // TEST GET NAME FOR CACHE wchar_t cachepath[MAX_PATH], cachedirectorypath[MAX_PATH], newcachepath[MAX_PATH + 50]; @@ -167,7 +167,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM) return 0; } - ptrW url( db_get_tsa(wParam, MODULENAME, "URL")); + ptrW url( db_get_wsa(wParam, MODULENAME, "URL")); if (url == NULL) return 0; @@ -353,7 +353,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam) // search for existing contact for (hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) { // check ID to see if the contact already exist in the database - if (db_get_ts(hContact, MODULENAME, "URL", &dbv)) + if (db_get_ws(hContact, MODULENAME, "URL", &dbv)) continue; if (!mir_wstrcmpi(psr->nick.w, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the @@ -405,7 +405,7 @@ INT_PTR AddToList(WPARAM, LPARAM lParam) if (Nend) *Nend = '\0'; for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) { - if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { + if (!db_get_ws(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { if (!mir_wstrcmpi(Newnick, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the // contact visible @@ -431,13 +431,13 @@ INT_PTR AddToList(WPARAM, LPARAM lParam) } //end convert - db_set_ts(hContact, "CList", "MyHandle", Newnick); - db_set_ts(hContact, MODULENAME, PRESERVE_NAME_KEY, Newnick); - db_set_ts(hContact, MODULENAME, "Nick", Newnick); + db_set_ws(hContact, "CList", "MyHandle", Newnick); + db_set_ws(hContact, MODULENAME, PRESERVE_NAME_KEY, Newnick); + db_set_ws(hContact, MODULENAME, "Nick", Newnick); db_set_b(hContact, MODULENAME, CLEAR_DISPLAY_KEY, 1); db_set_s(hContact, MODULENAME, START_STRING_KEY, ""); - db_set_ts(hContact, MODULENAME, URL_KEY, psr->nick.w); - db_set_ts(hContact, MODULENAME, "Homepage", psr->nick.w); + db_set_ws(hContact, MODULENAME, URL_KEY, psr->nick.w); + db_set_ws(hContact, MODULENAME, "Homepage", psr->nick.w); db_set_b(hContact, MODULENAME, U_ALLSITE_KEY, 1); db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE); |