summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-10-29 04:44:31 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-10-29 04:44:31 +0000
commit116c762e508fef30be544a9e07a2f89b33b481f6 (patch)
tree795a5a2ebac9c8a134fe5f4c905d612dc295128f /protocols/VKontakte/src/vk_proto.cpp
parent120019609ad472cdfa973f641958db730a6b0873 (diff)
VKontakte:
fix for news notification in clist fix option dialog labels code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@15645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 0d213c09cc..7f61927ca8 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -114,7 +114,7 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) :
m_bNotificationFilterReposts = getBool("NotificationFilterReposts", true);
m_bNotificationFilterMentions = getBool("NotificationFilterMentions", true);
m_bNotificationFilterInvites = getBool("NotificationFilterInvites", true);
-
+
m_bUseNonStandardNotifications = getBool("UseNonStandardNotifications", false);
m_bUseNonStandardUrlEncode = getBool("UseNonStandardUrlEncode", true);
@@ -126,7 +126,7 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) :
m_bSyncReadMessageStatusFromServer = getBool("SyncReadMessageStatusFromServer", false);
m_bLoadFullCList = getBool("LoadFullCList", false);
-
+
m_bSetBroadcast = false;
m_bNeedSendOnline = false;
delSetting("InviteGroupIds");
@@ -210,7 +210,7 @@ void CVkProto::InitMenus()
CreateProtoService(PS_LOADVKNEWS, &CVkProto::SvcLoadVKNews);
CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
-
+
CMenuItem mi;
mi.root = Menu_GetProtocolRoot(this);
@@ -242,7 +242,7 @@ void CVkProto::InitMenus()
mi.name.a = LPGEN("Load news from VK");
SET_UID(mi, 0x7c449456, 0xb731, 0x48cc, 0x9c, 0x4e, 0x20, 0xe4, 0x66, 0x7a, 0x16, 0x23);
g_hProtoMenuItems[PMI_LOADVKNEWS] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
+
mi.pszService = PS_VISITPROFILE;
mi.position = 10009 + PMI_VISITPROFILE;
mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_VISITPROFILE));
@@ -323,7 +323,7 @@ void CVkProto::InitMenus()
mi.name.t = LPGENT("Reload messages from vk.com...");
SET_UID(mi, 0xc6b59e9f, 0x5250, 0x4146, 0xb6, 0xf3, 0x2d, 0xe1, 0x4, 0x3b, 0x95, 0xf5);
g_hContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
-
+
mi.root = g_hContactMenuItems[CMI_GETSERVERHISTORY];
mi.pszService = PS_GETSERVERHISTORYLAST1DAY;
@@ -394,7 +394,7 @@ void CVkProto::UnInitMenus()
debugLogA("CVkProto::UnInitMenus");
for (int i = 0; i < PMI_COUNT; i++)
Menu_RemoveItem(g_hProtoMenuItems[i]);
-
+
for (int i = 0; i < CHMI_COUNT; i++)
Menu_RemoveItem(g_hContactHistoryMenuItems[i]);
@@ -405,29 +405,29 @@ void CVkProto::UnInitMenus()
/////////////////////////////////////////////////////////////////////////////////////////
// PopUp support
-LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch (message) {
- case WM_COMMAND:
- case WM_CONTEXTMENU:
- {
- CVkSendMsgParam *pd = (CVkSendMsgParam *)PUGetPluginData(hwnd);
- if (pd != NULL && pd->hContact != NULL)
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)pd->hContact, 0);
- PUDeletePopup(hwnd);
- }
- break;
- case UM_FREEPLUGINDATA:
- {
- CVkSendMsgParam *pd = (CVkSendMsgParam *)PUGetPluginData(hwnd);
- delete pd;
- }
- return FALSE;
- default:
- break;
- }
-
- return DefWindowProc(hwnd, message, wParam, lParam);
+LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message) {
+ case WM_COMMAND:
+ case WM_CONTEXTMENU:
+ {
+ CVkSendMsgParam *pd = (CVkSendMsgParam *)PUGetPluginData(hwnd);
+ if (pd != NULL && pd->hContact != NULL)
+ CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)pd->hContact, 0);
+ PUDeletePopup(hwnd);
+ }
+ break;
+ case UM_FREEPLUGINDATA:
+ {
+ CVkSendMsgParam *pd = (CVkSendMsgParam *)PUGetPluginData(hwnd);
+ delete pd;
+ }
+ return FALSE;
+ default:
+ break;
+ }
+
+ return DefWindowProc(hwnd, message, wParam, lParam);
}
void CVkProto::InitPopups(void)
@@ -436,7 +436,7 @@ void CVkProto::InitPopups(void)
char name[256];
POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
- ppc.PluginWindowProc = PopupDlgProc;
+ ppc.PluginWindowProc = PopupDlgProc;
ppc.lParam = APF_RETURN_HWND;
mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
@@ -486,7 +486,7 @@ void CVkProto::MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTi
int CVkProto::OnPreShutdown(WPARAM, LPARAM)
{
debugLogA("CVkProto::OnPreShutdown");
-
+
m_bTerminated = true;
SetEvent(m_evRequestsQueue);
return 0;
@@ -627,7 +627,7 @@ int CVkProto::Authorize(MEVENT hDbEvent)
MCONTACT hContact = MContactFromDbEvent(hDbEvent);
if (hContact == INVALID_CONTACT_ID)
return 1;
-
+
return AuthRequest(hContact, NULL);
}
@@ -650,7 +650,7 @@ int CVkProto::UserIsTyping(MCONTACT hContact, int type)
LONG userID = getDword(hContact, "ID", -1);
if (userID == -1 || !IsOnline() || userID == VK_FEED_USER)
return 1;
-
+
if (m_iMarkMessageReadOn == markOnTyping)
MarkMessagesRead(hContact);