diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-06-17 17:09:19 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-06-17 17:09:19 +0000 |
commit | e64af5a540c207def33e9413228e9be64b42f13b (patch) | |
tree | 60c54088dcb74f9e97bc5c6050533653fff46f33 /protocols/FacebookRM | |
parent | f7402a5fd3c86c1844cb0fcc14a33e0724b118d4 (diff) |
FacebookRM sync.
git-svn-id: http://svn.miranda-ng.org/main/trunk@466 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/process.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/proto.cpp | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp index e63d186fb3..09bdd2ac79 100644 --- a/protocols/FacebookRM/process.cpp +++ b/protocols/FacebookRM/process.cpp @@ -593,14 +593,14 @@ void FacebookProto::ProcessFriendRequests( void* ) dbei.cbSize = sizeof( DBEVENTINFO );
dbei.szModule = m_szModuleName;
dbei.timestamp = ::time( NULL );
- dbei.flags = 0; //DBEF_UTF;
+ dbei.flags = DBEF_UTF;
dbei.eventType = EVENTTYPE_AUTHREQUEST;
dbei.cbBlob = (DWORD)(sizeof( DWORD )+ sizeof( HANDLE ) + fbu->real_name.length() + 5);
PBYTE pCurBlob = dbei.pBlob = ( PBYTE ) mir_alloc( dbei.cbBlob );
*(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
*(PHANDLE)pCurBlob = hContact; pCurBlob += sizeof(HANDLE); // Contact Handle
- strcpy((char*)pCurBlob, fbu->real_name.c_str()); pCurBlob += fbu->real_name.length()+1; // Nickname
+ strcpy((char*)pCurBlob, fbu->real_name.data()); pCurBlob += fbu->real_name.length()+1; // Nickname
*pCurBlob = '\0'; pCurBlob++; // First Name
*pCurBlob = '\0'; pCurBlob++; // Last Name
*pCurBlob = '\0'; pCurBlob++; // E-mail
diff --git a/protocols/FacebookRM/proto.cpp b/protocols/FacebookRM/proto.cpp index 72222c1403..50ff0f66bc 100644 --- a/protocols/FacebookRM/proto.cpp +++ b/protocols/FacebookRM/proto.cpp @@ -492,18 +492,17 @@ int FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) return 0;
DBVARIANT dbv;
- char str[256];
+ TCHAR tstr[256];
- if ( !DBGetContactSettingUTF8String(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
- mir_snprintf(str,SIZEOF(str),Translate("Do you want to cancel your friendship with '%s'?"), dbv.pszVal);
+ if ( !DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_NAME, &dbv) ) {
+ mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
- } else if ( !DBGetContactSettingUTF8String(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
- mir_snprintf(str,SIZEOF(str),Translate("Do you want to cancel your friendship with '%s'?"), dbv.pszVal);
+ } else if ( !DBGetContactSettingTString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) ) {
+ mir_sntprintf(tstr,SIZEOF(tstr),TranslateT("Do you want to cancel your friendship with '%s'?"), dbv.ptszVal);
DBFreeVariant(&dbv);
}
- TCHAR *text = mir_a2t_cp(str, CP_UTF8);
- if (MessageBox( 0, text, m_tszUserName, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2 ) == IDYES) {
+ if (MessageBox( 0, tstr, m_tszUserName, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2 ) == IDYES) {
if ( !DBGetContactSettingString(hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv) )
{
@@ -521,7 +520,6 @@ int FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) }
}
- mir_free(text);
return 0;
}
|