From ef903664d17b14d2d6d0ce24c94207b51ad15575 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 8 Aug 2015 09:07:44 +0000 Subject: SkypeWeb: bbcodes in edited messages git-svn-id: http://svn.miranda-ng.org/main/trunk@14859 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_events.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_events.cpp') diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index b993a8973e..b6442d1b93 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -23,7 +23,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) DBEVENTGETTEXT *pEvent = (DBEVENTGETTEXT *)lParam; CMStringA szText; - + bool bUseBB = db_get_b(NULL, pEvent->dbei->szModule, "UseBBCodes", 1); switch (pEvent->dbei->eventType) { case SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE: @@ -33,7 +33,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) if (jMsg) { JSONNode &jOriginalMsg = jMsg["original_message"]; - szText.AppendFormat(Translate("Original message:\n\t%s\n"), mir_utf8decodeA(jOriginalMsg["text"].as_string().c_str())); + szText.AppendFormat(bUseBB ? Translate("[b]Original message:[/b]\n%s\n") : Translate("Original message:\n%s\n"), mir_utf8decodeA(jOriginalMsg["text"].as_string().c_str())); JSONNode &jEdits = jMsg["edits"]; for (auto it = jEdits.begin(); it != jEdits.end(); ++it) { @@ -43,7 +43,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) char szTime[MAX_PATH]; strftime(szTime, sizeof(szTime), "%X %x", localtime(&time)); - szText.AppendFormat(Translate("Edited at %s:\n\t%s\n"), szTime, mir_utf8decodeA(jEdit["text"].as_string().c_str())); + szText.AppendFormat(bUseBB ? Translate("[b]Edited at %s:[/b]\n%s\n") : Translate("Edited at %s:\n%s\n"), szTime, mir_utf8decodeA(jEdit["text"].as_string().c_str())); } } -- cgit v1.2.3