summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-03-03 14:47:53 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-03-03 14:47:53 +0000
commit999fdaa2662a1fe8937ec110232a78e87d79bfe7 (patch)
tree1c3d7c292fa5a54986e266778979c2496bb5a420 /plugins/Dropbox/src/dropbox_menus.cpp
parent44223012ce0fa631cc5af6fc588166bccc3a66f6 (diff)
Dropbox:
- remove menu item and srmm button for intercepted accounts - removed limitation on single transfer window from menu item and srmm git-svn-id: http://svn.miranda-ng.org/main/trunk@16405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_menus.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_menus.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp
index 7fd0c9a3cb..e99b92abf4 100644
--- a/plugins/Dropbox/src/dropbox_menus.cpp
+++ b/plugins/Dropbox/src/dropbox_menus.cpp
@@ -1,15 +1,13 @@
#include "stdafx.h"
-INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM hContact, LPARAM)
+INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM, LPARAM)
{
CDropbox *instance = (CDropbox*)obj;
if (!instance->HasAccessToken())
return 1;
- instance->hTransferContact = hContact;
- instance->hTransferWindow = (HWND)CallService(MS_FILE_SENDFILE, instance->GetDefaultContact(), 0);
+ CallService(MS_FILE_SENDFILE, instance->GetDefaultContact(), 0);
- DisableSrmmButton(hContact);
return 0;
}
@@ -32,15 +30,12 @@ int CDropbox::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
char *proto = GetContactProto(hContact);
if (proto != NULL) {
bool bHasIM = (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) != 0;
- if (bHasIM && HasAccessToken() && !hTransferContact && hContact != GetDefaultContact()) {
- bool isContact = db_get_b(hContact, proto, "ChatRoom", 0) == 0;
- if (isContact) {
- bool isProtoOnline = CallProtoService(proto, PS_GETSTATUS, 0, 0) > ID_STATUS_OFFLINE;
- WORD status = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
- bool canSendOffline = (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDOFFLINE) > 0;
- if (isProtoOnline && (status != ID_STATUS_OFFLINE || canSendOffline))
- bShow = true;
- }
+ if (bHasIM && HasAccessToken() && hContact != GetDefaultContact() && !IsAccountIntercepted(proto)) {
+ bool isProtoOnline = CallProtoService(proto, PS_GETSTATUS, 0, 0) > ID_STATUS_OFFLINE;
+ WORD status = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
+ bool canSendOffline = (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDOFFLINE) > 0;
+ if (isProtoOnline && (status != ID_STATUS_OFFLINE || canSendOffline))
+ bShow = true;
}
}