diff options
author | ElzorFox <elzorfox@ya.ru> | 2020-08-15 20:42:02 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2020-08-15 20:42:02 +0500 |
commit | 8e0f6324331fa9ac7425bb155321cbe2726e0161 (patch) | |
tree | 0994e274705f32176b3f11c0b82777b03487ea8d /protocols/VKontakte/src | |
parent | 3d754a28afdcac002ef1d958c4d2ad3793bddb5a (diff) |
VKontakte: fix typos
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 5 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.cpp | 12 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.h | 4 |
5 files changed, 18 insertions, 9 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 018c0da7fe..c657d8ecd6 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1290,9 +1290,9 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport wszUrl = wszLink.IsEmpty() ? (wszLink128.IsEmpty() ? wszLinkLast : wszLink128) : wszLink;
- if (!m_vkOptions.bStikersAsSmyles)
+ if (!m_vkOptions.bStikersAsSmileys)
res += SetBBCString(wszUrl, iBBC, vkbbcImg);
- else if (m_vkOptions.bUseStikersAsStaticSmyles)
+ else if (m_vkOptions.bUseStikersAsStaticSmileys)
res.AppendFormat(L"[sticker:%d]", iStickerId);
else {
if (ServiceExists(MS_SMILEYADD_LOADCONTACTSMILEYS)) {
@@ -1321,6 +1321,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport else
bSuccess = true;
+
if (bSuccess) {
res.AppendFormat(L"[sticker-%d]", iStickerId);
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 7ab851186b..da9ee174b5 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -440,7 +440,7 @@ CVkOptionViewForm::CVkOptionViewForm(CVkProto *proto) : m_cbUseNonStandardNotifications(this, IDC_USENOSTDPOPUPS)
{
CreateLink(m_cbUseBBCOnAttacmentsAsNews, m_proto->m_vkOptions.bUseBBCOnAttacmentsAsNews);
- CreateLink(m_cbStikersAsSmyles, m_proto->m_vkOptions.bStikersAsSmyles);
+ CreateLink(m_cbStikersAsSmyles, m_proto->m_vkOptions.bStikersAsSmileys);
CreateLink(m_cbShortenLinksForAudio, m_proto->m_vkOptions.bShortenLinksForAudio);
CreateLink(m_cbAddMessageLinkToMesWAtt, m_proto->m_vkOptions.bAddMessageLinkToMesWAtt);
CreateLink(m_cbUseNonStandardNotifications, m_proto->m_vkOptions.bUseNonStandardNotifications);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 9fb235deeb..adced3d770 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -119,10 +119,10 @@ void CVkProto::OnModulesLoaded() void CVkProto::InitSmileys()
{
- if (!m_vkOptions.bStikersAsSmyles)
+ if (!m_vkOptions.bStikersAsSmileys)
return;
- if (m_vkOptions.bUseStikersAsStaticSmyles)
+ if (m_vkOptions.bUseStikersAsStaticSmileys)
return;
CMStringW wszPath(FORMAT, L"%s\\%S\\Stickers\\*.png", VARSW(L"%miranda_avatarcache%").get(), m_szModuleName);
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index 7afe14c6e7..ebff631cc1 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -159,8 +159,8 @@ CVKOptions::CVKOptions(PROTO_INTERFACE* proto) : bRemoveFromCList(proto, "RemoveFromClistOnBanUser", false),
bPopUpSyncHistory(proto, "PopUpSyncHistory", false),
iMarkMessageReadOn(proto, "MarkMessageReadOn", MarkMsgReadOn::markOnRead),
- bStikersAsSmyles(proto, "StikersAsSmyles", false),
- bUseStikersAsStaticSmyles(proto, "UseStikersAsStaticSmyles", false),
+ bStikersAsSmileys(proto, "StikersAsSmileys", false),
+ bUseStikersAsStaticSmileys(proto, "UseStikersAsStaticSmileys", false),
bUserForceInvisibleOnActivity(proto, "UserForceOnlineOnActivity", false),
bNewsEnabled(proto, "NewsEnabled", false),
iMaxLoadNewsPhoto(proto, "MaxLoadNewsPhoto", 5),
@@ -225,4 +225,12 @@ CVKOptions::CVKOptions(PROTO_INTERFACE* proto) : pwszVKLang(proto, "VKLang", nullptr)
{
+ // Note: Delete this code after next stable build
+ int iStikersAsSmyles = db_get_b(0, proto->m_szModuleName, "StikersAsSmyles", -1);
+ if (iStikersAsSmyles != -1) {
+ bStikersAsSmileys = iStikersAsSmyles == 1;
+ db_set_b(0, proto->m_szModuleName, "StikersAsSmileys", (BYTE)iStikersAsSmyles);
+ db_unset(0, proto->m_szModuleName, "StikersAsSmyles");
+ }
+ // Note
}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h index 67506acc62..11c5840820 100644 --- a/protocols/VKontakte/src/vk_struct.h +++ b/protocols/VKontakte/src/vk_struct.h @@ -256,8 +256,8 @@ struct CVKOptions { CMOption<BYTE> bRemoveFromCList;
CMOption<BYTE> bPopUpSyncHistory;
CMOption<BYTE> iMarkMessageReadOn;
- CMOption<BYTE> bStikersAsSmyles;
- CMOption<BYTE> bUseStikersAsStaticSmyles;
+ CMOption<BYTE> bStikersAsSmileys;
+ CMOption<BYTE> bUseStikersAsStaticSmileys;
CMOption<BYTE> bUserForceInvisibleOnActivity;
CMOption<BYTE> iMusicSendMetod;
CMOption<BYTE> bPopupContactsMusic;
|