From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/avatar.cpp | 8 ++++---- protocols/GTalkExt/src/db.cpp | 4 ++-- protocols/GTalkExt/src/inbox.cpp | 2 +- protocols/GTalkExt/src/notifications.cpp | 16 ++++++++-------- protocols/GTalkExt/src/options.cpp | 4 ++-- protocols/GTalkExt/src/tipper_items.cpp | 18 +++++++++--------- 6 files changed, 26 insertions(+), 26 deletions(-) (limited to 'protocols/GTalkExt') diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index 9c87926832..84de3a28d8 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -33,7 +33,7 @@ LPTSTR CreateAvaFile(HANDLE *hFile) { wchar_t name[MAX_PATH + 2]; - if (CallService(MS_DB_GETPROFILENAMET, (WPARAM)_countof(name), (LPARAM)&name)) + if (CallService(MS_DB_GETPROFILENAMEW, (WPARAM)_countof(name), (LPARAM)&name)) return NULL; wchar_t *p = wcsrchr(name, '.'); @@ -41,12 +41,12 @@ LPTSTR CreateAvaFile(HANDLE *hFile) *p = 0; wchar_t path[MAX_PATH + 2]; - if (CallService(MS_DB_GETPROFILEPATHT, (WPARAM)_countof(path), (LPARAM)&path)) + if (CallService(MS_DB_GETPROFILEPATHW, (WPARAM)_countof(path), (LPARAM)&path)) return NULL; wchar_t full[MAX_PATH + 2]; mir_snwprintf(full, AVA_FILE_NAME_FORMAT, path, name); - CreateDirectoryTreeT(full); + CreateDirectoryTreeW(full); HANDLE h = CreateFile(full, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (h == INVALID_HANDLE_VALUE) @@ -156,5 +156,5 @@ void SetAvatar(MCONTACT hContact) if (ava) CallService(MS_AV_SETAVATART, hContact, (LPARAM)L""); CallService(MS_AV_SETAVATART, hContact, (LPARAM)avaFile); - db_set_ts(hContact, SRMM_MODULE_NAME, SRMM_AVATAR_SETTING_NAME, avaFile); + db_set_ws(hContact, SRMM_MODULE_NAME, SRMM_AVATAR_SETTING_NAME, avaFile); } diff --git a/protocols/GTalkExt/src/db.cpp b/protocols/GTalkExt/src/db.cpp index 691e065bc3..1d18ed6121 100644 --- a/protocols/GTalkExt/src/db.cpp +++ b/protocols/GTalkExt/src/db.cpp @@ -24,10 +24,10 @@ LPTSTR ReadJidSetting(LPCSTR name, LPCTSTR jid) { - return db_get_tsa(0, name, _T2A(jid)); + return db_get_wsa(0, name, _T2A(jid)); } void WriteJidSetting(LPCSTR name, LPCTSTR jid, LPCTSTR setting) { - db_set_ts(0, name, _T2A(jid), setting); + db_set_ws(0, name, _T2A(jid), setting); } diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 2e73250e7d..f5433032a0 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -196,7 +196,7 @@ void OpenUrl(LPCSTR acc, LPCTSTR mailbox, LPCTSTR url) void OpenContactInbox(LPCSTR szModuleName) { - ptrW tszJid(db_get_tsa(0, szModuleName, "jid")); + ptrW tszJid(db_get_wsa(0, szModuleName, "jid")); if (tszJid == NULL) return; diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index e2243609ca..e80e573742 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -54,7 +54,7 @@ LPCSTR GetJidAcc(LPCTSTR jid) Proto_EnumAccounts(&count, &protos); for (int i = 0; i < count; i++) { if (getJabberApi(protos[i]->szModuleName)) { - ptrW tszJid(db_get_tsa(0, protos[i]->szModuleName, "jid")); + ptrW tszJid(db_get_wsa(0, protos[i]->szModuleName, "jid")); if (!mir_wstrcmpi(jid, tszJid)) return protos[i]->szModuleName; } @@ -179,12 +179,12 @@ MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTST if (displayName == NULL) { wchar_t *tszTemp = (wchar_t*)alloca((mir_wstrlen(jid) + mir_wstrlen(unreadCount) + 3 + 1) * sizeof(wchar_t)); FormatPseudocontactDisplayName(tszTemp, jid, unreadCount); - db_set_ts(hContact, CLIST_MODULE_NAME, CONTACT_DISPLAY_NAME_SETTING, tszTemp); + db_set_ws(hContact, CLIST_MODULE_NAME, CONTACT_DISPLAY_NAME_SETTING, tszTemp); } - else db_set_ts(hContact, CLIST_MODULE_NAME, CONTACT_DISPLAY_NAME_SETTING, displayName); + else db_set_ws(hContact, CLIST_MODULE_NAME, CONTACT_DISPLAY_NAME_SETTING, displayName); - db_set_ts(hContact, CLIST_MODULE_NAME, STATUS_MSG_SETTING, TranslateTS(MAIL_NOTIFICATIONS)); - db_set_ts(hContact, SHORT_PLUGIN_NAME, UNREAD_THREADS_SETTING, unreadCount); + db_set_ws(hContact, CLIST_MODULE_NAME, STATUS_MSG_SETTING, TranslateW(MAIL_NOTIFICATIONS)); + db_set_ws(hContact, SHORT_PLUGIN_NAME, UNREAD_THREADS_SETTING, unreadCount); return hContact; } @@ -263,7 +263,7 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre POPUPDATAT data = { 0 }; FormatPseudocontactDisplayName(&data.lptzContactName[0], jid, unreadCount); - CMString tszSenders; + CMStringW tszSenders; for (int i = 0; i < SENDER_COUNT; i++) { const SENDER &p = mtn->senders[i]; if (p.addr == NULL) @@ -276,9 +276,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre } if (ReadCheckbox(0, IDC_ADDSNIP, (UINT_PTR)TlsGetValue(itlsSettings))) - mir_snwprintf(data.lptzText, TranslateTS(FULL_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str(), mtn->snip); + mir_snwprintf(data.lptzText, TranslateW(FULL_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str(), mtn->snip); else - mir_snwprintf(data.lptzText, TranslateTS(SHORT_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str()); + mir_snwprintf(data.lptzText, TranslateW(SHORT_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str()); ShowNotification(acc, &data, jid, url, unreadCount); } diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index 9183d773e4..378f83404c 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -155,8 +155,8 @@ INT_PTR CALLBACK AccOptionsDlgProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lPa void ShowTestPopup(HWND wnd) { POPUPDATAT data = { 0 }; - mir_snwprintf(data.lptzContactName, TranslateTS(TEST_LETTER_INBOX)); - mir_snwprintf(data.lptzText, TranslateTS(FULL_NOTIFICATION_FORMAT), TranslateTS(TEST_LETTER_SUBJECT), TranslateTS(TEST_LETTER_SENDER), TranslateTS(TEST_LETTER_SNIP)); + mir_snwprintf(data.lptzContactName, TranslateW(TEST_LETTER_INBOX)); + mir_snwprintf(data.lptzText, TranslateW(FULL_NOTIFICATION_FORMAT), TranslateW(TEST_LETTER_SUBJECT), TranslateW(TEST_LETTER_SENDER), TranslateW(TEST_LETTER_SNIP)); int len = SendDlgItemMessage(wnd, IDC_TIMEOUTEDIT, WM_GETTEXTLENGTH, 0, 0) + 1; LPTSTR timeout = (LPTSTR)_alloca(len * sizeof(wchar_t)); diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index 929078c2f7..5f7baa7f27 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -74,18 +74,18 @@ void SetLabelProp(int index, LPSTR setting) { sprintf(setting, LABEL_SETTING_PROP, index); //!!!!!!!!!!!!!! - ptrW tszProp(db_get_tsa(0, TIPPER_ITEMS_MOD_NAME, setting)); + ptrW tszProp(db_get_wsa(0, TIPPER_ITEMS_MOD_NAME, setting)); if (tszProp == NULL) return; - ptrW tszLastWritten(db_get_tsa(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING)); + ptrW tszLastWritten(db_get_wsa(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING)); if (tszLastWritten == NULL) return; if (!mir_wstrcmp(tszProp, tszLastWritten)) { - LPTSTR label = TranslateTS(UNREAD_THREADS_LABEL); - db_set_ts(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, label); - db_set_ts(0, TIPPER_ITEMS_MOD_NAME, setting, label); + LPTSTR label = TranslateW(UNREAD_THREADS_LABEL); + db_set_ws(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, label); + db_set_ws(0, TIPPER_ITEMS_MOD_NAME, setting, label); } } @@ -103,7 +103,7 @@ void AddTipperItem() for (i = 0; i < itemCount; i++) { mir_snprintf(setting, l, VALUE_SETTING_PROP, i); - ptrW tszSetting(db_get_tsa(0, TIPPER_ITEMS_MOD_NAME, setting)); + ptrW tszSetting(db_get_wsa(0, TIPPER_ITEMS_MOD_NAME, setting)); if (tszSetting) { if (!mir_wstrcmp(UNREAD_THREADS_RAW, tszSetting)) { SetLabelProp(i, setting); @@ -117,14 +117,14 @@ void AddTipperItem() #define WRITE_TIPPER_PROPS(index, value)\ mir_snprintf(setting, l, TipperItemProps[##index##], 0);\ - db_set_ts(0, TIPPER_ITEMS_MOD_NAME, setting, ##value##) + db_set_ws(0, TIPPER_ITEMS_MOD_NAME, setting, ##value##) #define WRITE_TIPPER_PROPB(index, value)\ mir_snprintf(setting, l, TipperItemProps[##index##], 0);\ db_set_b(0, TIPPER_ITEMS_MOD_NAME, setting, ##value##) - LPTSTR label = TranslateTS(UNREAD_THREADS_LABEL); + LPTSTR label = TranslateW(UNREAD_THREADS_LABEL); - db_set_ts(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, label); + db_set_ws(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, label); WRITE_TIPPER_PROPS(0, label); WRITE_TIPPER_PROPB(1, 0); -- cgit v1.2.3