diff options
Diffstat (limited to 'protocols/Twitter')
-rw-r--r-- | protocols/Twitter/src/chat.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/connection.cpp | 10 | ||||
-rw-r--r-- | protocols/Twitter/src/contacts.cpp | 8 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 8 | ||||
-rw-r--r-- | protocols/Twitter/src/theme.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/ui.cpp | 4 | ||||
-rw-r--r-- | protocols/Twitter/src/utility.cpp | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 8a7d155f26..0daee31258 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -64,7 +64,7 @@ int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam) switch (hook->pDest->iType) {
case GC_USER_MESSAGE:
- debugLog(L"**Chat - Outgoing message: %s", hook->ptszText);
+ debugLogW(L"**Chat - Outgoing message: %s", hook->ptszText);
{
T2Utf text(hook->ptszText);
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index bad7284cbf..913bcd70e2 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -162,8 +162,8 @@ bool TwitterProto::NegotiateConnection() }
//write those bitches to the db foe latta
- setTString(TWITTER_KEY_OAUTH_TOK, oauthToken.c_str());
- setTString(TWITTER_KEY_OAUTH_TOK_SECRET, oauthTokenSecret.c_str());
+ setWString(TWITTER_KEY_OAUTH_TOK, oauthToken.c_str());
+ setWString(TWITTER_KEY_OAUTH_TOK_SECRET, oauthTokenSecret.c_str());
// this looks like bad code.. can someone clean this up please? or confirm that it's ok
wchar_t buf[1024] = {};
@@ -175,7 +175,7 @@ bool TwitterProto::NegotiateConnection() ShowPinDialog();
}
- if (!getTString(TWITTER_KEY_GROUP, &dbv)) {
+ if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
Clist_GroupCreate(0, dbv.ptszVal);
db_free(&dbv);
}
@@ -396,7 +396,7 @@ void TwitterProto::UpdateAvatarWorker(void *p) // db_get_s returns 0 when it suceeds, so if this suceeds it will return 0, or false.
// therefore if it returns 1, or true, we want to return as there is no such user.
// as a side effect, dbv now has the username in it i think
- if (getTString(data->hContact, TWITTER_KEY_UN, &dbv))
+ if (getWString(data->hContact, TWITTER_KEY_UN, &dbv))
return;
std::string ext = data->url.substr(data->url.rfind('.')); // finds the filetype of the avatar
@@ -535,7 +535,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, popup.colorBack = GetSysColor(COLOR_WINDOWTEXT);
DBVARIANT dbv;
- if (!db_get_ts(hContact, "CList", "MyHandle", &dbv) || !getTString(hContact, TWITTER_KEY_UN, &dbv)) {
+ if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !getWString(hContact, TWITTER_KEY_UN, &dbv)) {
wcsncpy(popup.lptzContactName, dbv.ptszVal, MAX_CONTACTNAME);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 174046afdb..d5d56f9d85 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -126,7 +126,7 @@ void TwitterProto::DoSearch(void *pArg) if (found) {
PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.nick.w = mir_a2u(info.username.c_str());
psr.firstName.w = mir_a2u(info.real_name.c_str());
@@ -162,7 +162,7 @@ void TwitterProto::GetAwayMsgWorker(void *arg) return;
DBVARIANT dbv;
- if (!db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
@@ -251,8 +251,8 @@ MCONTACT TwitterProto::AddToClientList(const char *name, const char *status) setString(hContact, "Homepage", url.c_str());
SkinPlaySound("TwitterNewContact");
DBVARIANT dbv;
- if (!getTString(TWITTER_KEY_GROUP, &dbv)) {
- db_set_ts(hContact, "CList", "Group", dbv.ptszVal);
+ if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
+ db_set_ws(hContact, "CList", "Group", dbv.ptszVal);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index c0f1e32b01..bfe83fcb81 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -256,7 +256,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM) {
CMenuItem mi;
mi.root = Menu_GetProtocolRoot(this);
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
mi.position = 1001;
Menu_AddStatusMenuItem(&mi, m_szModuleName);
@@ -279,7 +279,7 @@ int TwitterProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.pwszGroup = LPGENW("Network");
odp.pwszTitle = m_tszUserName;
odp.dwInitParam = LPARAM(this);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTab = LPGENW("Basic");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
@@ -309,7 +309,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) {
wchar_t descr[512];
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
// Create standard network connection
@@ -455,7 +455,7 @@ void TwitterProto::UpdateSettings() std::wstring TwitterProto::GetAvatarFolder()
{
wchar_t path[MAX_PATH];
- mir_snwprintf(path, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
+ mir_snwprintf(path, L"%s\\%s", VARSW(L"%miranda_avatarcache%"), m_tszUserName);
return path;
}
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 4f0f988d02..3365299b08 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -90,7 +90,7 @@ void InitContactMenus() HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
CMenuItem mi;
- mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
+ mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
SET_UID(mi, 0xfc4e1245, 0xc8e0, 0x4de2, 0x92, 0x15, 0xfc, 0xcf, 0x48, 0xf9, 0x41, 0x56);
mi.position = -2000006000;
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index e6e5dc2a5e..f2bad47bed 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -39,7 +39,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
DBVARIANT dbv;
- if (!proto->getTString(TWITTER_KEY_GROUP, &dbv)) {
+ if (!proto->getWString(TWITTER_KEY_GROUP, &dbv)) {
SetDlgItemText(hwndDlg, IDC_GROUP, dbv.ptszVal);
db_free(&dbv);
}
@@ -88,7 +88,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM proto->setString(TWITTER_KEY_BASEURL, str);
GetDlgItemText(hwndDlg, IDC_GROUP, tstr, _countof(tstr));
- proto->setTString(TWITTER_KEY_GROUP, tstr);
+ proto->setWString(TWITTER_KEY_GROUP, tstr);
return true;
}
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 565ef3622b..b427f64f1f 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -146,7 +146,7 @@ bool save_url(HANDLE hNetlib, const std::string &url, const std::wstring &filena // Create folder if necessary
std::wstring dir = filename.substr(0, filename.rfind('\\'));
if (_waccess(dir.c_str(), 0))
- CreateDirectoryTreeT(dir.c_str());
+ CreateDirectoryTreeW(dir.c_str());
// Write to file
FILE *f = _wfopen(filename.c_str(), L"wb");
|