summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/menus.cpp
diff options
context:
space:
mode:
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