diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-02 12:32:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-02 12:32:55 +0300 |
commit | 931a7dc1ac0dbc7e6c1083583ced915e572f5b47 (patch) | |
tree | 9fe9a6448d44030e26aa7107ce16044ed413e0d0 /plugins/CloudFile/src/srmm.cpp | |
parent | dd7d9954042254e66e3bbbec7195c6be8b1a0663 (diff) |
all protocols (even virtual ones) moved to the Protocols folder
Diffstat (limited to 'plugins/CloudFile/src/srmm.cpp')
-rw-r--r-- | plugins/CloudFile/src/srmm.cpp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/plugins/CloudFile/src/srmm.cpp b/plugins/CloudFile/src/srmm.cpp deleted file mode 100644 index b4d44c9fdd..0000000000 --- a/plugins/CloudFile/src/srmm.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "stdafx.h" - -int OnSrmmToolbarLoaded(WPARAM, LPARAM) -{ - BBButton bbd = {}; - bbd.pszModuleName = MODULENAME; - bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_ISARROWBUTTON; - - CMStringW tooltip(FORMAT, TranslateT("Upload files to...")); - bbd.pwszTooltip = tooltip; - bbd.hIcon = GetIconHandle(IDI_UPLOAD); - bbd.dwButtonID = BBB_ID_FILE_SEND; - bbd.dwDefPos = 100 + bbd.dwButtonID; - Srmm_AddButton(&bbd, &g_plugin); - return 0; -} - -int OnSrmmWindowOpened(WPARAM, LPARAM lParam) -{ - MessageWindowEventData *ev = (MessageWindowEventData*)lParam; - if (ev->uType == MSG_WINDOW_EVT_OPENING && ev->hContact) { - BBButton bbd = {}; - bbd.pszModuleName = MODULENAME; - bbd.dwButtonID = BBB_ID_FILE_SEND; - bbd.bbbFlags = CanSendToContact(ev->hContact) - ? BBSF_RELEASED - : BBSF_DISABLED; - Srmm_SetButtonState(ev->hContact, &bbd); - } - - return 0; -} - -int OnSrmmButtonPressed(WPARAM, LPARAM lParam) -{ - CustomButtonClickData *cbc = (CustomButtonClickData*)lParam; - - if (mir_strcmp(cbc->pszModule, MODULENAME)) - return 0; - - if (cbc->dwButtonId != BBB_ID_FILE_SEND) - return 0; - - if (cbc->flags != BBCF_ARROWCLICKED) { - ptrA defaultService(g_plugin.getStringA("DefaultService")); - if (defaultService) { - CCloudService *service = FindService(defaultService); - if (service) - service->OpenUploadDialog(cbc->hContact); - return 0; - } - } - - HMENU hMenu = CreatePopupMenu(); - for (auto &it : Services) - AppendMenu(hMenu, MF_STRING, Services.indexOf(&it) + 1, TranslateW(it->GetUserName())); - - int pos = TrackPopupMenu(hMenu, TPM_RETURNCMD, cbc->pt.x, cbc->pt.y, 0, cbc->hwndFrom, nullptr); - DestroyMenu(hMenu); - - if (pos > 0) { - CCloudService *service = Services[pos - 1]; - service->OpenUploadDialog(cbc->hContact); - } - - return 0; -}
\ No newline at end of file |