Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Pane context menu is misplaced in Office 365 #5016

Open
retailcoder opened this issue Jun 20, 2019 · 0 comments

Comments

@retailcoder
Copy link
Member

commented Jun 20, 2019

Discovered by accident in #5015; the Rubberduck code pane context menu is buried in the "Toggle" sub-menu in Office 365:

wtf

The context menu location is configured at the AddIn level, here:

public class AddIn : SafeComWrapper<VB.AddIn>, IAddIn
{
private const int MenuBar = 1;
private const int CodeWindow = 9;
private const int ProjectExplorer = 14;
private const int MsForm = 17;
private const int MsFormControl = 18;
private const int WindowMenu = 30009;
private const int ListProperties = 2529;
private const int ProjectProperties = 2578;
private const int ViewCode = 2558;
public AddIn(VB.AddIn target, bool rewrapping = false)
: base(target, rewrapping)
{
CommandBarLocations = new ReadOnlyDictionary<CommandBarSite, CommandBarLocation>(new Dictionary<CommandBarSite, CommandBarLocation>
{
{CommandBarSite.MenuBar, new CommandBarLocation(MenuBar, WindowMenu)},
{CommandBarSite.CodeWindow, new CommandBarLocation(CodeWindow, ListProperties)},
{CommandBarSite.ProjectExplorer, new CommandBarLocation(ProjectExplorer, ProjectProperties)},
{CommandBarSite.MsForm, new CommandBarLocation(MsForm, ViewCode)},
{CommandBarSite.MsFormControl, new CommandBarLocation(MsFormControl, ViewCode)}
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.