diff options
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/resource.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_events.cpp | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_options.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_options.h | 1 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.h | 23 |
5 files changed, 17 insertions, 21 deletions
diff --git a/protocols/SkypeWeb/src/resource.h b/protocols/SkypeWeb/src/resource.h index 40a04e3b8e..eb58a41d1e 100644 --- a/protocols/SkypeWeb/src/resource.h +++ b/protocols/SkypeWeb/src/resource.h @@ -28,6 +28,8 @@ #define IDC_MESASUREAD 1033
#define IDC_PLACE 1034
#define IDC_USEHOST 1035
+#define IDC_CHECK1 1036
+#define IDC_BBCODES 1036
// Next default values for new objects
//
@@ -35,7 +37,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 124
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1036
+#define _APS_NEXT_CONTROL_VALUE 1037
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
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()));
}
}
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index c78dd53aed..d2339df840 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -26,7 +26,8 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog) m_autosync(this, IDC_AUTOSYNC),
m_localtime(this, IDC_LOCALTIME),
m_allasunread(this, IDC_MESASUREAD),
- m_usehostname(this, IDC_USEHOST)
+ m_usehostname(this, IDC_USEHOST),
+ m_usebb(this, IDC_BBCODES)
{
CreateLink(m_group, SKYPE_SETTINGS_GROUP, _T("Skype"));
CreateLink(m_autosync, "AutoSync", DBVT_BYTE, 1);
@@ -34,6 +35,7 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog) CreateLink(m_allasunread, "MarkMesUnread", DBVT_BYTE, 1);
CreateLink(m_place, "Place", _T(""));
CreateLink(m_usehostname, "UseHostName", DBVT_BYTE, 0);
+ CreateLink(m_usebb, "UseBBCodes", DBVT_BYTE, 1);
m_usehostname.OnChange = Callback(this, &CSkypeOptionsMain::OnUsehostnameCheck);
}
diff --git a/protocols/SkypeWeb/src/skype_options.h b/protocols/SkypeWeb/src/skype_options.h index 27174d62c4..90d60ae138 100644 --- a/protocols/SkypeWeb/src/skype_options.h +++ b/protocols/SkypeWeb/src/skype_options.h @@ -29,6 +29,7 @@ private: CCtrlCheck m_localtime;
CCtrlCheck m_allasunread;
CCtrlCheck m_usehostname;
+ CCtrlCheck m_usebb;
protected:
CSkypeOptionsMain(CSkypeProto *proto, int idDialog);
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h index 6f79be2655..f4f7c14035 100644 --- a/protocols/SkypeWeb/src/skype_utils.h +++ b/protocols/SkypeWeb/src/skype_utils.h @@ -35,27 +35,18 @@ class DB_AUTH_BLOB pCurBlob += sizeof(DWORD);
*((PDWORD)pCurBlob) = (DWORD)hContact;
pCurBlob += sizeof(DWORD);
-
- if (szNick){ mir_strcpy((char*)pCurBlob, szNick); pCurBlob += mir_strlen(szNick); }
- pCurBlob += 1;
-
- if (szFirstName){ mir_strcpy((char*)pCurBlob, szFirstName); pCurBlob += mir_strlen(szFirstName); }
- pCurBlob += 1;
-
- if (szLastName){ mir_strcpy((char*)pCurBlob, szLastName); pCurBlob += mir_strlen(szLastName); }
- pCurBlob += 1;
-
- if (szId){ mir_strcpy((char*)pCurBlob, szId); pCurBlob += mir_strlen(szId); }
- pCurBlob += 1;
-
- if (szReason){ mir_strcpy((char*)pCurBlob, szReason); pCurBlob += mir_strlen(szReason); }
- pCurBlob += 1;
+ if (szNick) { mir_strcpy((char*)pCurBlob, szNick ); pCurBlob += mir_strlen(szNick ); } pCurBlob += 1;
+ if (szFirstName){ mir_strcpy((char*)pCurBlob, szFirstName); pCurBlob += mir_strlen(szFirstName); } pCurBlob += 1;
+ if (szLastName) { mir_strcpy((char*)pCurBlob, szLastName ); pCurBlob += mir_strlen(szLastName ); } pCurBlob += 1;
+ if (szId) { mir_strcpy((char*)pCurBlob, szId ); pCurBlob += mir_strlen(szId ); } pCurBlob += 1;
+ if (szReason) { mir_strcpy((char*)pCurBlob, szReason ); pCurBlob += mir_strlen(szReason ); } pCurBlob += 1;
return pBlob;
}
public:
- __inline explicit DB_AUTH_BLOB(MCONTACT _hContact, LPCSTR nick, LPCSTR fname, LPCSTR lname, LPCSTR id, LPCSTR reason)
+ __inline explicit
+ DB_AUTH_BLOB(MCONTACT _hContact, LPCSTR nick, LPCSTR fname, LPCSTR lname, LPCSTR id, LPCSTR reason)
: hContact(_hContact), szNick(mir_strdup(nick)), szFirstName(mir_strdup(fname)), szLastName(mir_strdup(lname)), szId(mir_strdup(id)), szReason(mir_strdup(reason)) {}
__inline size_t size(){ return ((sizeof(DWORD) * 2) + (mir_strlen(szNick) + 1) + (mir_strlen(szFirstName) + 1) + (mir_strlen(szLastName) + 1) + (mir_strlen(szId) + 1) + (mir_strlen(szReason) + 1)); }
|