diff options
-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;
}
|