@@ -8,8 +8,12 @@ namespace Rubberduck.VBEditor.SafeComWrappers.VB6
88{
99 public class AddIn : SafeComWrapper < VB . AddIn > , IAddIn
1010 {
11- // this one is an index, not an ID:
11+
1212 private const int MenuBar = 1 ;
13+ private const int CodeWindow = 15 ;
14+ private const int ProjectExplorer = 22 ;
15+ private const int MsForm = 20 ;
16+ private const int MsFormControl = 21 ;
1317
1418 private const int WindowMenu = 30009 ;
1519 private const int ListProperties = 2529 ;
@@ -18,16 +22,16 @@ public class AddIn : SafeComWrapper<VB.AddIn>, IAddIn
1822 private const int ViewCode = 2558 ;
1923
2024
21- public AddIn ( VB . AddIn target , bool rewrapping = false )
25+ public AddIn ( VB . AddIn target , bool rewrapping = false )
2226 : base ( target , rewrapping )
23- {
27+ {
2428 CommandBarLocations = new ReadOnlyDictionary < CommandBarSite , CommandBarLocation > ( new Dictionary < CommandBarSite , CommandBarLocation >
2529 {
2630 { CommandBarSite . MenuBar , new CommandBarLocation ( MenuBar , WindowMenu ) } ,
27- { CommandBarSite . CodePaneContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . CodePaneContext , ListProperties ) } ,
28- { CommandBarSite . ProjectExplorerContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . ProjectExplorerContext , ProjectProperties ) } ,
29- //{CommandBarSite.FormDesignerContextMenu , new CommandBarLocation(VbeCommandBarMenuNames.FormDesignerContext, ViewCode )}, // FIXME - see #4280
30- { CommandBarSite . FormDesignerControlContextMenu , new CommandBarLocation ( VbeCommandBarMenuNames . FormDesignerControlContext , ViewCode ) } ,
31+ { CommandBarSite . CodePaneContextMenu , new CommandBarLocation ( CodeWindow , ListProperties ) } ,
32+ { CommandBarSite . ProjectExplorerContextMenu , new CommandBarLocation ( ProjectExplorer , ProjectProperties ) } ,
33+ // {CommandBarSite.MsForm , new CommandBarLocation(MsForm, UpdateUserControls )}, // FIXME - quick hack for #4280
34+ { CommandBarSite . FormDesignerContextMenu , new CommandBarLocation ( MsFormControl , ViewCode ) }
3135 } ) ;
3236 }
3337
0 commit comments