summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_menus.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-03-15 10:10:51 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-03-15 10:10:51 +0000
commitccd3481caa5dda6816747901108166298c8037d9 (patch)
treee72418c55d54631c06c389a4179867525ad2b9e6 /plugins/Dropbox/src/dropbox_menus.cpp
parent40989eb0a17169c3b2e44a51a7db91b1876bbd62 (diff)
Dropbox: fixed sending link after upload
git-svn-id: http://svn.miranda-ng.org/main/trunk@16484 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_menus.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_menus.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp
index e99b92abf4..c4949ee421 100644
--- a/plugins/Dropbox/src/dropbox_menus.cpp
+++ b/plugins/Dropbox/src/dropbox_menus.cpp
@@ -1,12 +1,19 @@
#include "stdafx.h"
-INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM, LPARAM)
+INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM hContact, LPARAM)
{
CDropbox *instance = (CDropbox*)obj;
if (!instance->HasAccessToken())
return 1;
- CallService(MS_FILE_SENDFILE, instance->GetDefaultContact(), 0);
+ auto it = instance->interceptedContacts.find(hContact);
+ if (it == instance->interceptedContacts.end())
+ {
+ HWND hwnd = (HWND)CallService(MS_FILE_SENDFILE, hContact, 0);
+ instance->interceptedContacts[hContact] = hwnd;
+ }
+ else
+ SetActiveWindow(it->second);
return 0;
}