summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/menus.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-28 23:31:19 +0300
committeraunsane <aunsane@gmail.com>2018-02-28 23:34:28 +0300
commit98be8c0a0db8d4866535028e21a5d958c3d893ab (patch)
treef4de203d8fa1af0023621ede8316c7641499510c /plugins/CloudFile/src/menus.cpp
parent107bbe53ce937334d8a47ca96e632f5a1f965725 (diff)
CloudFile: cannot see cloud accounts after setup (fixed #1169)
Diffstat (limited to 'plugins/CloudFile/src/menus.cpp')
-rw-r--r--plugins/CloudFile/src/menus.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/plugins/CloudFile/src/menus.cpp b/plugins/CloudFile/src/menus.cpp
index 900e47e636..9bb7ccda8d 100644
--- a/plugins/CloudFile/src/menus.cpp
+++ b/plugins/CloudFile/src/menus.cpp
@@ -30,29 +30,35 @@ void InitializeMenus()
mi.hIcon = LoadIconEx(IDI_UPLOAD);
hContactMenu = Menu_AddContactMenuItem(&mi);
- if (defaultService)
+ /*if (defaultService)
return;
UNSET_UID(mi);
mi.root = hContactMenu;
- for (int i = 0; i < Services.getCount(); i++) {
- CCloudService *service = Services[i];
- CMStringA serviceName(FORMAT, "/%s/Upload", service->GetAccountName());
- mi.pszService = serviceName.GetBuffer();
- mi.flags = CMIF_SYSTEM | CMIF_UNICODE;
- mi.name.w = (wchar_t*)service->GetUserName();
- mi.position = i;
- mi.hIcolibItem = GetIconHandle(service->GetIconId());
- Menu_AddContactMenuItem(&mi);
- CreateServiceFunctionObj(mi.pszService, UploadMenuCommand, service);
- }
+ for (auto &service : Services)
+ AddServiceMenuItem(service);*/
+}
+
+void AddServiceMenuItem(const CCloudService *service)
+{
+ CMenuItem mi;
+ mi.root = hContactMenu;
+ CMStringA serviceName(FORMAT, "/%s/Upload", service->GetAccountName());
+ mi.pszService = serviceName.GetBuffer();
+ mi.hLangpack = service->GetId();
+ mi.flags = CMIF_SYSTEM | CMIF_UNICODE;
+ mi.name.w = (wchar_t*)service->GetUserName();
+ mi.position = Services.getCount();
+ mi.hIcolibItem = GetIconHandle(service->GetIconId());
+ Menu_AddContactMenuItem(&mi);
+ CreateServiceFunctionObj(mi.pszService, UploadMenuCommand, (void*)service);
}
int OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- Menu_ShowItem(hContactMenu, CanSendToContact(hContact));
+ //Menu_ShowItem(hContactMenu, CanSendToContact(hContact));
return 0;
} \ No newline at end of file