summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/SendScreenshotPlus/src/CSendDropbox.cpp25
-rw-r--r--plugins/SendScreenshotPlus/src/CSendDropbox.h5
2 files changed, 3 insertions, 27 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
index 6f6808ec28..dc675a6a40 100644
--- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp
@@ -58,38 +58,19 @@ void CSendDropbox::SendThread()
DropboxUploadInfo ui = { m_pszFile, _T("SendSS") };
- if (CallService(MS_DROPBOX_UPLOAD, 0, (LPARAM)&ui))
+ char **test = &m_URL;
+ if (CallService(MS_DROPBOX_UPLOAD, (WPARAM)&m_URL, (LPARAM)&ui))
{
- Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), (INT_PTR)m_hDropSend);
+ Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), 0);
Exit(ACKRESULT_FAILED); return;
}
- m_hDropHook = HookEventObj(ME_DROPBOX_UPLOADED, OnDropSend, this);
-
- m_hEvent.Wait();
- UnhookEvent(m_hDropHook);
-
if (m_URL)
svcSendMsgExit(m_URL);
else
Exit(ACKRESULT_FAILED);
}
-int CSendDropbox::OnDropSend(void *obj, WPARAM, LPARAM lParam)
-{
- CSendDropbox *self = (CSendDropbox*)obj;
- DropboxUploadResult *ur = (DropboxUploadResult*)lParam;
- if (ur->hProcess == self->m_hDropSend)
- {
- if (!ur->status)
- {
- self->m_URL = mir_strdup(ur->data);
- }
- self->m_hEvent.Set();
- }
- return 0;
-}
-
void CSendDropbox::SendThreadWrapper(void * Obj)
{
reinterpret_cast<CSendDropbox*>(Obj)->SendThread();
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.h b/plugins/SendScreenshotPlus/src/CSendDropbox.h
index adcc331921..e138eee00f 100644
--- a/plugins/SendScreenshotPlus/src/CSendDropbox.h
+++ b/plugins/SendScreenshotPlus/src/CSendDropbox.h
@@ -40,13 +40,8 @@ class CSendDropbox : public CSend {
int Send();
protected:
- EventHandle m_hEvent;
- HANDLE m_hDropHook;
- HANDLE m_hDropSend;
-
void SendThread();
static void SendThreadWrapper(void *Obj);
- static int OnDropSend(void*, WPARAM, LPARAM);
static int OnDropAck(void*, WPARAM, LPARAM);
};