diff options
author | aunsane <aunsane@gmail.com> | 2018-02-21 00:05:54 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-21 00:05:54 +0300 |
commit | b1b10b4095c4e569cfeed632c2cfa08be766a01b (patch) | |
tree | 490d3f14e2a113257035393aecda6dda01e25ecc /plugins/CloudFile/src/srmm.cpp | |
parent | abf1919b649645aa20ce95903d7a42a1c81a2e45 (diff) |
Implement service that returns the list of available CloudFile services (#1144)
Diffstat (limited to 'plugins/CloudFile/src/srmm.cpp')
-rw-r--r-- | plugins/CloudFile/src/srmm.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/CloudFile/src/srmm.cpp b/plugins/CloudFile/src/srmm.cpp index 1d7742f3fc..68c2cca0cb 100644 --- a/plugins/CloudFile/src/srmm.cpp +++ b/plugins/CloudFile/src/srmm.cpp @@ -54,20 +54,16 @@ int OnSrmmButtonPressed(WPARAM, LPARAM lParam) } HMENU hMenu = CreatePopupMenu(); - - size_t count = Services.getCount(); - for (size_t i = 0; i < count; i++) { + for (int i = 0; i < Services.getCount(); i++) { CCloudService *service = Services[i]; - - InsertMenu(hMenu, i, MF_STRING | MF_BYPOSITION, i + 1,TranslateW(service->GetUserName())); - //HBITMAP hBitmap = (HBITMAP)LoadImage(hInstance, MAKEINTRESOURCE(service->GetIconId()), IMAGE_ICON, 16, 16, 0); - //SetMenuItemBitmaps(hMenu, i, MF_BITMAP, hBitmap, hBitmap); + AppendMenu(hMenu, MF_STRING, i + 1, TranslateW(service->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); } |