diff options
Diffstat (limited to 'plugins/SendScreenshotPlus/src')
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendDropbox.cpp | 14 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/Main.cpp | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp index 93abeaf072..6f6808ec28 100644 --- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp +++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp @@ -56,14 +56,16 @@ void CSendDropbox::SendThread() { /// @todo : SS_DLG_DESCRIPTION and SS_DLG_DELETEAFTERSSEND are of no use as of now since we don't track upload progress - m_hDropHook = HookEventObj(ME_DROPBOX_SENT, OnDropSend, this); + DropboxUploadInfo ui = { m_pszFile, _T("SendSS") }; - if ((m_hDropSend = (HANDLE)CallService(MS_DROPBOX_SEND_FILE, (WPARAM)m_hContact, (LPARAM)m_pszFile)) == NULL) + if (CallService(MS_DROPBOX_UPLOAD, 0, (LPARAM)&ui)) { Error(LPGENT("%s (%i):\nCould not add a share to the Dropbox plugin."), TranslateTS(m_pszSendTyp), (INT_PTR)m_hDropSend); Exit(ACKRESULT_FAILED); return; } + m_hDropHook = HookEventObj(ME_DROPBOX_UPLOADED, OnDropSend, this); + m_hEvent.Wait(); UnhookEvent(m_hDropHook); @@ -76,12 +78,12 @@ void CSendDropbox::SendThread() int CSendDropbox::OnDropSend(void *obj, WPARAM, LPARAM lParam) { CSendDropbox *self = (CSendDropbox*)obj; - TRANSFERINFO *info = (TRANSFERINFO*)lParam; - if (info->hProcess == self->m_hDropSend) + DropboxUploadResult *ur = (DropboxUploadResult*)lParam; + if (ur->hProcess == self->m_hDropSend) { - if (!info->status) + if (!ur->status) { - self->m_URL = mir_strdup(info->data[0]); + self->m_URL = mir_strdup(ur->data); } self->m_hEvent.Set(); } diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 3f672f890c..62ee37e261 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -229,7 +229,7 @@ int hook_ModulesLoaded(WPARAM, LPARAM) g_myGlobals.PopupActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS); g_myGlobals.PluginHTTPExist = ServiceExists(MS_HTTP_ACCEPT_CONNECTIONS); g_myGlobals.PluginFTPExist = ServiceExists(MS_FTPFILE_SHAREFILE); - g_myGlobals.PluginDropboxExist = ServiceExists(MS_DROPBOX_SEND_FILE); + g_myGlobals.PluginDropboxExist = ServiceExists(MS_DROPBOX_UPLOAD); // Netlib register NETLIBUSER nlu = { sizeof(nlu) }; nlu.szSettingsModule = __PLUGIN_NAME; |