diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-27 10:29:01 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-27 10:29:01 +0000 |
commit | 9cc7d99f174805bc965f5bc6d0ba09e592515b80 (patch) | |
tree | f47e17ea2d751d193d3b6901cd3e5b09630f8c89 /protocols/VKontakte/src/misc.cpp | |
parent | 908f1787312f52e30020163ba29d1326b76b4ca6 (diff) |
VKontakte:
remove unneeded code
add “Open broadcast” contacts menuitem
when ListeningTo \<VK>Enabled is change, MusicSendMetod is also change
some cleanup
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@10877 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 98ab1cf2b1..e0b89acbff 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -189,7 +189,8 @@ static IconItem iconList[] = { LPGEN("Add to friend list icon"), "addfriend", IDI_FRIENDADD },
{ LPGEN("Delete from friend list icon"), "delfriend", IDI_FRIENDDEL },
{ LPGEN("Report abuse icon"), "abuse", IDI_ABUSE },
- { LPGEN("Ban user icon"), "ban", IDI_BAN}
+ { LPGEN("Ban user icon"), "ban", IDI_BAN},
+ { LPGEN("Broadcast icon"), "broadcast", IDI_BROADCAST}
};
void InitIcons()
@@ -594,4 +595,30 @@ char* CVkProto::GetStickerId(const char* Msg, int &stickerid) }
stickerid = 0;
return NULL;
-}
\ No newline at end of file +}
+
+int CVkProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
+{
+ DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
+ if (hContact != NULL)
+ return 0;
+
+ if (strcmp(cws->szModule, "ListeningTo"))
+ return 0;
+
+ CMStringA szListeningTo(m_szModuleName);
+ szListeningTo += "Enabled";
+ if (!strcmp(cws->szSetting, szListeningTo.GetBuffer())){
+ int iOldMusicSendMetod = getByte("OldMusicSendMetod", 3);
+
+ if (cws->value.bVal == 0)
+ setByte("OldMusicSendMetod", m_iMusicSendMetod);
+ else
+ db_unset(0, m_szModuleName, "OldMusicSendMetod");
+
+ m_iMusicSendMetod = cws->value.bVal == 0 ? 0 : iOldMusicSendMetod;
+ setByte("MusicSendMetod", m_iMusicSendMetod);
+ }
+
+ return 0;
+}
|