Stefan Glienke 2002 Posted November 14, 2019 Might it be worth considering restructuring the Main menu which is getting longer and longer and organize the items in sub items to clean it up? 1 Share this post Link to post
Anders Melander 1782 Posted November 14, 2019 They can start by getting rid of the Refactor menu - and that might also improve the stability of the IDE. 1 Share this post Link to post
dummzeuch 1505 Posted November 14, 2019 I think you are talking about different "main menus" here. 😉 @Stefan Glienke Yes, it's getting larger (which annoys me too sometimes), but do you really use all the experts? You could simply disable those you don't use which removes them from the menu. Organizing it into submenus would be a major change since currently the menu is built by enumerating all the experts and adding an entry for all that are active. Feel free to submit a feature request though. One day I might get bored enough to do it or maybe somebody else does it and submits a patch. 1 Share this post Link to post
Stefan Glienke 2002 Posted November 14, 2019 Nah, in fact I only use a fraction of what GExperts offers, I just cba to disable those that I don't need. Share this post Link to post
Anders Melander 1782 Posted November 14, 2019 Oh... This is the GExperts sub forum... I didn't notice that so I actually thought you meant the IDE main menu (which is what I was talking about). Well then, pls ignore what I said. Share this post Link to post
Fr0sT.Brutal 900 Posted November 15, 2019 15 hours ago, Anders Melander said: They can start by getting rid of the Refactor menu - and that might also improve the stability of the IDE. You can rename/remove refactoride###.bpl file Share this post Link to post
Anders Melander 1782 Posted November 15, 2019 1 hour ago, Fr0sT.Brutal said: You can rename/remove refactoride###.bpl file Yes but that also removes the stuff I use and which actually works (mostly): "Find References" and "Rename". 1 Share this post Link to post
Guest Posted November 15, 2019 @Anders Melander, we should maybe start another thread, in andother sub-forum, but i have also made that mistake when reading and commenting. The sub-forum name is IMHO visually too suppressed. Share this post Link to post
dummzeuch 1505 Posted November 15, 2019 1 hour ago, Dany Marmur said: @Anders Melander, we should maybe start another thread, in andother sub-forum Actually: It should be easy for yet another expert (yet another GExperts menu entry 😉) to hide some of the menu entries of the IDE. Or, since there is already an expert for changing the menu shortcuts of the IDE, it could be extended to also allow hiding those entries. 23 hours ago, Anders Melander said: and that might also improve the stability of the IDE In that case obviously not. Share this post Link to post
Anders Melander 1782 Posted November 15, 2019 13 minutes ago, dummzeuch said: In that case obviously not. Actually it might. One of my grieves with the Refactor menu item is that if you accidentally move the mouse over the menu item (e.g. on the way to the View or Project menu item) then there's a noticeable delay (very noticeable on low end systems) as the IDE loads the refactor stuff (among it the J# run time I suspect) in order to populate the sub menu. 2 hours ago, Dany Marmur said: we should maybe start another thread Agree, but I don't think I'll have more to contribute on the subject. Share this post Link to post
luciano_f 5 Posted September 22, 2023 On 11/15/2019 at 12:49 PM, dummzeuch said: Actually: It should be easy for yet another expert (yet another GExperts menu entry 😉) to hide some of the menu entries of the IDE. Or, since there is already an expert for changing the menu shortcuts of the IDE, it could be extended to also allow hiding those entries. In that case obviously not. This post is old. Is there anything in gexpert to remove items or move them from the Delphi mainmenu ? Share this post Link to post
dummzeuch 1505 Posted September 22, 2023 7 hours ago, luciano_f said: This post is old. Is there anything in gexpert to remove items or move them from the Delphi mainmenu ? There are only two options for now: Hide Window Menu Move the Component menu to Tools Both can be found on the IDE tab of the GExperts configuration dialog. I have no plans exending this functionality, but I am - as always - accepting patches. Share this post Link to post
luciano_f 5 Posted September 22, 2023 3 hours ago, dummzeuch said: There are only two options for now: Hide Window Menu Move the Component menu to Tools Both can be found on the IDE tab of the GExperts configuration dialog. I have no plans exending this functionality, but I am - as always - accepting patches. I wanted to hide Delphi's "UniDac" menu, it has no use Share this post Link to post
dummzeuch 1505 Posted September 22, 2023 2 hours ago, luciano_f said: I wanted to hide Delphi's "UniDac" menu, it has no use That is not a menu of the IDE but one added by some plugin or possibly a property editor. (Or it is part of a higher SKU than I know, e.g. Delphi Enterprise or Delphi Architect) Share this post Link to post
luciano_f 5 Posted September 22, 2023 1 hour ago, dummzeuch said: That is not a menu of the IDE but one added by some plugin or possibly a property editor. (Or it is part of a higher SKU than I know, e.g. Delphi Enterprise or Delphi Architect) I would have to install some BPL just to remove this Menu How could I do it ? Share this post Link to post
Uwe Raabe 2057 Posted September 22, 2023 2 hours ago, dummzeuch said: (Or it is part of a higher SKU than I know, e.g. Delphi Enterprise or Delphi Architect) It probably is part of the UniDAC components from DevArt. Share this post Link to post
Kas Ob. 121 Posted September 22, 2023 2 hours ago, luciano_f said: How could I do it ? Using BPL maybe ?!! Share this post Link to post
Kas Ob. 121 Posted September 22, 2023 Sorry couldn't resist. Here try this 1) New package. 2) Add to required 3) add this huge unit to search and hide menu unit uRemoveUniDacMenu; interface uses Classes, SysUtils, ToolsAPI, VCL.Menus; implementation procedure FindMenuByCaptionAndHide(aMenu: TMenu; aCaption: string); var i: Integer; begin i := aMenu.Items.Count; while i > 0 do begin Dec(i); if aMenu.Items.Items[i].Caption = aCaption then begin aMenu.Items.Items[i].Visible := false; Break; end; end; end; procedure RemoveUniDacMenu; var NTAServices: INTAServices; IDEMainMenu: TMenu; begin if Supports(BorlandIDEServices, INTAServices, NTAServices) then IDEMainMenu := NTAServices.MainMenu; if Assigned(IDEMainMenu) then begin FindMenuByCaptionAndHide(IDEMainMenu, '&UniDAC'); FindMenuByCaptionAndHide(IDEMainMenu, 'V&irtualDAC'); end; end; initialization RemoveUniDacMenu; end. Enjoy ! Share this post Link to post
luciano_f 5 Posted September 22, 2023 1 hour ago, Kas Ob. said: Sorry couldn't resist. Here try this 1) New package. 2) Add to required 3) add this huge unit to search and hide menu unit uRemoveUniDacMenu; interface uses Classes, SysUtils, ToolsAPI, VCL.Menus; implementation procedure FindMenuByCaptionAndHide(aMenu: TMenu; aCaption: string); var i: Integer; begin i := aMenu.Items.Count; while i > 0 do begin Dec(i); if aMenu.Items.Items[i].Caption = aCaption then begin aMenu.Items.Items[i].Visible := false; Break; end; end; end; procedure RemoveUniDacMenu; var NTAServices: INTAServices; IDEMainMenu: TMenu; begin if Supports(BorlandIDEServices, INTAServices, NTAServices) then IDEMainMenu := NTAServices.MainMenu; if Assigned(IDEMainMenu) then begin FindMenuByCaptionAndHide(IDEMainMenu, '&UniDAC'); FindMenuByCaptionAndHide(IDEMainMenu, 'V&irtualDAC'); end; end; initialization RemoveUniDacMenu; end. Enjoy ! Wonder, It worked Much obliged. Share this post Link to post
luciano_f 5 Posted September 23, 2023 On 11/14/2019 at 2:24 PM, dummzeuch said: I think you are talking about different "main menus" here. 😉 @Stefan Glienke Yes, it's getting larger (which annoys me too sometimes), but do you really use all the experts? You could simply disable those you don't use which removes them from the menu. Organizing it into submenus would be a major change since currently the menu is built by enumerating all the experts and adding an entry for all that are active. Feel free to submit a feature request though. One day I might get bored enough to do it or maybe somebody else does it and submits a patch. I don't know if it would be too much to ask, Gexpert could have a feature to remove items from the menu or even move items to other places Share this post Link to post
Kas Ob. 121 Posted September 23, 2023 @luciano_f I tried my own code today and the IDE generated a warning, it didn't show me yesterday so the code without warning is unit uRemoveUniDacMenu; interface uses Classes, SysUtils, ToolsAPI, Windows, VCL.Menus; implementation procedure FindMenuByCaptionAndHide(aMenu: TMenu; aCaption: string); var i: Integer; begin i := aMenu.Items.Count; while i > 0 do begin Dec(i); if aMenu.Items.Items[i].Caption = aCaption then begin aMenu.Items.Items[i].Visible := false; Break; end; end; end; procedure RemoveUniDacMenu; var NTAServices: INTAServices; IDEMainMenu: TMenu; begin if Supports(BorlandIDEServices, INTAServices, NTAServices) then begin IDEMainMenu := NTAServices.MainMenu; FindMenuByCaptionAndHide(IDEMainMenu, '&UniDAC'); FindMenuByCaptionAndHide(IDEMainMenu, 'V&irtualDAC'); end; end; initialization RemoveUniDacMenu; end. Another problem is after first IDE restart the menu was deleted but after two restart the menu was there and the code failed to delete the menu, the reason was something changed the order of package loading also this IDE is a cloned one meaning is really missed up, so can't be sure of the reason. Any way to make sure it will work always you need to add to required any of the UniDac packages like "dcldac220" and this ensure this package will follow the needed package, in this case all the UniDac RTL packages are loaded together so it will work with any of them. Share this post Link to post