diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-03-03 14:47:53 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-03-03 14:47:53 +0000 |
commit | 999fdaa2662a1fe8937ec110232a78e87d79bfe7 (patch) | |
tree | 1c3d7c292fa5a54986e266778979c2496bb5a420 /plugins/Dropbox/src/dropbox_events.cpp | |
parent | 44223012ce0fa631cc5af6fc588166bccc3a66f6 (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_events.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_events.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index f8679362c6..02c1d7184f 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -7,8 +7,6 @@ int CDropbox::OnModulesLoaded(WPARAM, LPARAM) HookEventObj(ME_CLIST_PREBUILDCONTACTMENU, GlobalEvent<&CDropbox::OnPrebuildContactMenu>, this);
HookEventObj(ME_MSG_WINDOWEVENT, GlobalEvent<&CDropbox::OnSrmmWindowOpened>, this);
- HookEventObj(ME_FILEDLG_CANCELED, GlobalEvent<&CDropbox::OnFileDialogCancelled>, this);
- HookEventObj(ME_FILEDLG_SUCCEEDED, GlobalEvent<&CDropbox::OnFileDialogSuccessed>, this);
NETLIBUSER nlu = { sizeof(nlu) };
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
@@ -75,7 +73,7 @@ int CDropbox::OnSrmmWindowOpened(WPARAM, LPARAM lParam) bbd.pszModuleName = MODULE;
bbd.dwButtonID = BBB_ID_FILE_SEND;
bbd.bbbFlags = BBSF_RELEASED;
- if (!HasAccessToken() || ev->hContact == GetDefaultContact())
+ if (!HasAccessToken() || ev->hContact == GetDefaultContact() || IsAccountIntercepted(proto))
bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED;
else if (!isProtoOnline || (status == ID_STATUS_OFFLINE && !canSendOffline))
bbd.bbbFlags = BBSF_DISABLED;
@@ -90,10 +88,7 @@ int CDropbox::OnTabSrmmButtonPressed(WPARAM, LPARAM lParam) {
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
if (!mir_strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == BBB_ID_FILE_SEND && cbc->hContact) {
- hTransferContact = cbc->hContact;
- hTransferWindow = (HWND)CallService(MS_FILE_SENDFILE, GetDefaultContact(), 0);
-
- DisableSrmmButton(cbc->hContact);
+ CallService(MS_FILE_SENDFILE, GetDefaultContact(), 0);
}
return 0;
@@ -117,29 +112,6 @@ void __stdcall EnableTabSrmmButtonSync(void *arg) CallService(MS_BB_SETBUTTONSTATE, (UINT_PTR)arg, (LPARAM)&bbd);
}
-int CDropbox::OnFileDialogCancelled(WPARAM, LPARAM lParam)
-{
- HWND hwnd = (HWND)lParam;
- if (hTransferWindow == hwnd) {
- CallFunctionAsync(EnableTabSrmmButtonSync, (void*)hTransferContact);
- hTransferContact = 0;
- hTransferWindow = 0;
- }
-
- return 0;
-}
-
-int CDropbox::OnFileDialogSuccessed(WPARAM, LPARAM lParam)
-{
- HWND hwnd = (HWND)lParam;
- if (hTransferWindow == hwnd) {
- CallFunctionAsync(EnableTabSrmmButtonSync, (void*)hTransferContact);
- hTransferWindow = 0;
- }
-
- return 0;
-}
-
int CDropbox::OnProtoAck(WPARAM, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*)lParam;
|