diff options
Diffstat (limited to 'plugins/CloudFile/src/menus.cpp')
-rw-r--r-- | plugins/CloudFile/src/menus.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/CloudFile/src/menus.cpp b/plugins/CloudFile/src/menus.cpp index c0ed61285b..fed19569f6 100644 --- a/plugins/CloudFile/src/menus.cpp +++ b/plugins/CloudFile/src/menus.cpp @@ -30,23 +30,24 @@ void InitializeMenus() hContactMenu = Menu_AddContactMenuItem(&mi); } -void AddServiceMenuItem(const CCloudService *service) +void CCloudService::OnModulesLoaded() { CMenuItem mi; mi.root = hContactMenu; - CMStringA serviceName(FORMAT, "/%s/Upload", service->GetAccountName()); + CMStringA serviceName(FORMAT, "/%s/Upload", GetAccountName()); mi.pszService = serviceName.GetBuffer(); - mi.hLangpack = service->GetId(); + mi.hLangpack = GetId(); mi.flags = CMIF_SYSTEM | CMIF_UNICODE; - mi.name.w = (wchar_t*)service->GetUserName(); + mi.name.w = (wchar_t*)GetUserName(); mi.position = Services.getCount(); - mi.hIcolibItem = GetIconHandle(service->GetIconId()); + mi.hIcolibItem = GetIconHandle(GetIconId()); Menu_AddContactMenuItem(&mi); - CreateServiceFunctionObj(mi.pszService, UploadMenuCommand, (void*)service); + + CreateServiceFunctionObj(mi.pszService, UploadMenuCommand, this); } int OnPrebuildContactMenu(WPARAM hContact, LPARAM) { Menu_ShowItem(hContactMenu, CanSendToContact(hContact)); return 0; -}
\ No newline at end of file +} |