summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-07-22 14:16:33 +0500
committerElzorFox <elzorfox@ya.ru>2017-07-22 14:16:33 +0500
commit598832374fdbd4ceb6d2e670bc2082e4d3fd8385 (patch)
treeb71958ddea1375045b6bfc20af08f4cfd7000495
parentee83be6d28b4719d6b74158d458a73c096fb53e7 (diff)
VKontakte:
remove ‘Use non-standard urlEncode for sent messages (less traffic)’ option (now ExpUrlEncode is used by default) add UseStandardUrlEncode hidden option :) add ‘Notify about changes of contacts audio broadcast’ option (default false) add FloodListingToPopups contacts hidden option (default true) version bump
-rw-r--r--protocols/VKontakte/res/resource.rc8
-rw-r--r--protocols/VKontakte/src/resource.h3
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_options.cpp4
-rw-r--r--protocols/VKontakte/src/vk_options.h2
-rw-r--r--protocols/VKontakte/src/vk_struct.cpp7
-rw-r--r--protocols/VKontakte/src/vk_struct.h3
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp3
8 files changed, 18 insertions, 14 deletions
diff --git a/protocols/VKontakte/res/resource.rc b/protocols/VKontakte/res/resource.rc
index 38e40080a5..dbaaa47e0d 100644
--- a/protocols/VKontakte/res/resource.rc
+++ b/protocols/VKontakte/res/resource.rc
@@ -266,11 +266,11 @@ BEGIN
LTEXT "Invisible interval timeout (min):",IDC_STATIC,16,63,184,8
EDITTEXT IDC_ED_INT_INVIS,204,60,40,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SPIN_INT_INVIS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,244,60,14,13
- CONTROL "Use non-standard urlEncode for sent messages (less traffic)",IDC_USENOSTDURLENCODE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,74,278,10
CONTROL "Send VK-objects links as attachments",IDC_SENDVKURLSASATTACH,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,85,278,10
- CONTROL "and load sent attachments",IDC_LOADSENTATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,96,269,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,74,278,10
+ CONTROL "and load sent attachments",IDC_LOADSENTATTACH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,85,269,10
+ CONTROL "Notify about changes of contacts audio broadcast",IDC_POPUP_CONTACT_MUSIC,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,96,278,10
GROUPBOX "When I ban user...",IDC_STATIC,4,108,293,33
CONTROL "Report abuse",IDC_REPORT_ABUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,129,10
CONTROL "Clear server history",IDC_CLEAR_SERVER_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,129,129,10
diff --git a/protocols/VKontakte/src/resource.h b/protocols/VKontakte/src/resource.h
index ec7626e033..79b0cbb797 100644
--- a/protocols/VKontakte/src/resource.h
+++ b/protocols/VKontakte/src/resource.h
@@ -103,7 +103,7 @@
#define IDC_ATTBBC_BASIC 1085
#define IDC_ATTBBC_ADV 1086
#define IDC_BBC_ATT_NEWS 1087
-#define IDC_USENOSTDURLENCODE 1088
+#define IDC_POPUP_CONTACT_MUSIC 1088
#define IDC_ED_INT_INVIS 1089
#define IDC_SPIN_INT_INVIS 1090
#define IDC_ED_MSG 1091
@@ -130,7 +130,6 @@
#define IDC_ADD_MES_LINK_MES_ATT 1113
// Next default values for new objects
-//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index 357cc86271..c11e6bf78f 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 2
-#define __BUILD_NUM 20
+#define __BUILD_NUM 21
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 3f04ec8d6f..7f527dde20 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -236,7 +236,7 @@ CVkOptionAdvancedForm::CVkOptionAdvancedForm(CVkProto *proto) :
m_spInvInterval(this, IDC_SPIN_INT_INVIS),
m_cbSendVKLinksAsAttachments(this, IDC_SENDVKURLSASATTACH),
m_cbLoadSentAttachments(this, IDC_LOADSENTATTACH),
- m_cbUseNonStandardUrlEncode(this, IDC_USENOSTDURLENCODE),
+ m_cbPopupContactsMusic(this, IDC_POPUP_CONTACT_MUSIC),
m_cbReportAbuse(this, IDC_REPORT_ABUSE),
m_cbClearServerHistory(this, IDC_CLEAR_SERVER_HISTORY),
m_cbRemoveFromFrendlist(this, IDC_REMOVE_FROM_FRENDLIST),
@@ -254,7 +254,7 @@ CVkOptionAdvancedForm::CVkOptionAdvancedForm(CVkProto *proto) :
CreateLink(m_edtInvInterval, m_proto->m_vkOptions.iInvisibleInterval);
CreateLink(m_cbSendVKLinksAsAttachments, m_proto->m_vkOptions.bSendVKLinksAsAttachments);
CreateLink(m_cbLoadSentAttachments, m_proto->m_vkOptions.bLoadSentAttachments);
- CreateLink(m_cbUseNonStandardUrlEncode, m_proto->m_vkOptions.bUseNonStandardUrlEncode);
+ CreateLink(m_cbPopupContactsMusic, m_proto->m_vkOptions.bPopupContactsMusic);
CreateLink(m_cbReportAbuse, m_proto->m_vkOptions.bReportAbuse);
CreateLink(m_cbClearServerHistory, m_proto->m_vkOptions.bClearServerHistory);
CreateLink(m_cbRemoveFromFrendlist, m_proto->m_vkOptions.bRemoveFromFrendlist);
diff --git a/protocols/VKontakte/src/vk_options.h b/protocols/VKontakte/src/vk_options.h
index 59a6ec2980..457bbbc9e0 100644
--- a/protocols/VKontakte/src/vk_options.h
+++ b/protocols/VKontakte/src/vk_options.h
@@ -77,9 +77,9 @@ class CVkOptionAdvancedForm : public CVkDlgBase
CCtrlEdit m_edtInvInterval;
CCtrlSpin m_spInvInterval;
- CCtrlCheck m_cbUseNonStandardUrlEncode;
CCtrlCheck m_cbSendVKLinksAsAttachments;
CCtrlCheck m_cbLoadSentAttachments;
+ CCtrlCheck m_cbPopupContactsMusic;
CCtrlCheck m_cbReportAbuse;
CCtrlCheck m_cbClearServerHistory;
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp
index 66563c5ad7..9726e89d68 100644
--- a/protocols/VKontakte/src/vk_struct.cpp
+++ b/protocols/VKontakte/src/vk_struct.cpp
@@ -32,7 +32,7 @@ AsyncHttpRequest::AsyncHttpRequest()
bNeedsRestart = false;
bIsMainConn = false;
m_pFunc = NULL;
- bExpUrlEncode = false;
+ bExpUrlEncode = true;
m_reqNum = ::InterlockedIncrement(&m_reqCount);
m_priority = rpLow;
}
@@ -42,7 +42,7 @@ AsyncHttpRequest::AsyncHttpRequest(CVkProto *ppro, int iRequestType, LPCSTR _url
cbSize = sizeof(NETLIBHTTPREQUEST);
m_bApiReq = true;
bIsMainConn = false;
- bExpUrlEncode = (BYTE)ppro->m_vkOptions.bUseNonStandardUrlEncode != 0;
+ bExpUrlEncode = (BYTE)ppro->m_vkOptions.bUseStandardUrlEncode == 0;
AddHeader("Connection", "keep-alive");
if (*_url == '/') { // relative url leads to a site
@@ -208,7 +208,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) :
bSendVKLinksAsAttachments(proto, "SendVKLinksAsAttachments", true),
bLoadSentAttachments(proto, "LoadSentAttachments", bSendVKLinksAsAttachments),
bUseNonStandardNotifications(proto, "UseNonStandardNotifications", false),
- bUseNonStandardUrlEncode(proto, "UseNonStandardUrlEncode", true),
+ bUseStandardUrlEncode(proto, "UseStandardUrlEncode", false),
bShortenLinksForAudio(proto, "ShortenLinksForAudio", true),
bAddMessageLinkToMesWAtt(proto, "AddMessageLinkToMesWAtt", true),
bSplitFormatFwdMsg(proto, "SplitFormatFwdMsg", true),
@@ -225,6 +225,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) :
bShowProtoMenuItem6(proto, "ShowProtoMenuItem6", true),
iMusicSendMetod(proto, "MusicSendMetod", MusicSendMetod::sendBroadcastOnly),
+ bPopupContactsMusic(proto, "PopupContactsMusic", false),
iSyncHistoryMetod(proto, "SyncHistoryMetod", SyncHistoryMetod::syncOff),
iIMGBBCSupport(proto, "IMGBBCSupport", IMGBBCSypport::imgNo),
iBBCForNews(proto, "BBCForNews", BBCSupport::bbcBasic),
diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h
index 7b94c9e461..00da7f1950 100644
--- a/protocols/VKontakte/src/vk_struct.h
+++ b/protocols/VKontakte/src/vk_struct.h
@@ -302,6 +302,7 @@ struct CVKOptions {
CMOption<BYTE> bStikersAsSmyles;
CMOption<BYTE> bUserForceInvisibleOnActivity;
CMOption<BYTE> iMusicSendMetod;
+ CMOption<BYTE> bPopupContactsMusic;
CMOption<BYTE> iSyncHistoryMetod;
CMOption<BYTE> bNewsEnabled;
CMOption<BYTE> iMaxLoadNewsPhoto;
@@ -330,7 +331,7 @@ struct CVKOptions {
CMOption<BYTE> bNotificationFilterInvites;
CMOption<BYTE> bNotificationFilterAcceptedFriends;
CMOption<BYTE> bUseNonStandardNotifications;
- CMOption<BYTE> bUseNonStandardUrlEncode;
+ CMOption<BYTE> bUseStandardUrlEncode;
CMOption<BYTE> bShortenLinksForAudio;
CMOption<BYTE> bAddMessageLinkToMesWAtt;
CMOption<BYTE> bSplitFormatFwdMsg;
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index a0bf8e7dc7..67f6acce0e 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -401,6 +401,9 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self)
if (wszListeningTo != wszOldListeningTo) {
setWString(hContact, "ListeningTo", wszListeningTo);
setWString(hContact, "AudioUrl", jnAudio["url"].as_mstring());
+
+ if (m_vkOptions.bPopupContactsMusic && getBool(hContact, "FloodListingToPopups", true))
+ MsgPopup(hContact, wszListeningTo, TranslateT("Listing to"));
}
}
else if (wszValue[0] == wchar_t(9835) && wszValue.GetLength() > 2) {