summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-02-23 21:08:36 +0000
committerRobert Pösel <robyer@seznam.cz>2013-02-23 21:08:36 +0000
commit350e18c684394b74097ff27a089f2dcf7b6433d9 (patch)
treea54204dbc9d58e38a2cde1b2331dab9c180a29bf
parentfce9734123b15ceabd38043b02c16b6ee21ecadf (diff)
Facebook, Smileyadd: Allow custom smileys in outgoing messages
Facebook: Workaround for showing also cached custom smileys git-svn-id: http://svn.miranda-ng.org/main/trunk@3743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/SmileyAdd/src/services.cpp4
-rw-r--r--protocols/FacebookRM/src/messages.cpp11
2 files changed, 8 insertions, 7 deletions
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index b2e749305b..c7f915eec9 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -102,8 +102,8 @@ INT_PTR ReplaceSmileysCommand(WPARAM, LPARAM lParam)
else if (smrec.rangeToReplace->cpMax < 0) smrec.rangeToReplace->cpMax = LONG_MAX;
SmileyPackCType* smcp = NULL;
- SmileyPackType* SmileyPack = GetSmileyPack(smrec.Protocolname, smrec.hContact,
- (smrec.flags & (SAFLRE_OUTGOING | SAFLRE_NOCUSTOM)) ? NULL : &smcp);
+ SmileyPackType* SmileyPack = GetSmileyPack(smrec.Protocolname, smrec.hContact,/*
+ (smrec.flags & (SAFLRE_OUTGOING | SAFLRE_NOCUSTOM)) ? NULL : */&smcp);
ReplaceSmileys(smre->hwndRichEditControl, SmileyPack, smcp, *smrec.rangeToReplace,
smrec.hContact == NULL, false, false, (smre->flags & SAFLRE_FIREVIEW)?true:false);
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 9fc25a3f76..4ff94a1bde 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -54,7 +54,7 @@ void FacebookProto::SendMsgWorker(void *p)
}
else if ( !DBGetContactSettingString(data->hContact,m_szModuleName,FACEBOOK_KEY_ID,&dbv))
{
- //parseSmileys(data->msg, data->hContact);
+ parseSmileys(data->msg, data->hContact);
int retries = 5;
std::string error_text = "";
@@ -215,9 +215,11 @@ void FacebookProto::parseSmileys(std::string message, HANDLE hContact)
std::tstring filename = GetAvatarFolder() + L"\\smileys\\" + (TCHAR*)_A2T(b64.c_str()) + _T(".jpg");
FILE *f = _tfopen(filename.c_str(), _T("r"));
- if (!f) {
+ if (f) {
+ fclose(f);
+ } else {
facy.save_url(url, filename, nlc);
-
+ }
TCHAR *path = _tcsdup(filename.c_str());
SMADD_CONT cont;
@@ -228,7 +230,6 @@ void FacebookProto::parseSmileys(std::string message, HANDLE hContact)
CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, (LPARAM)&cont);
mir_free(path);
- } else
- fclose(f);
+ //}
}
} \ No newline at end of file