Ticket #632 (closed defect: fixed)
Opened 2011-06-24T08:36:50-05:00
Last modified 2012-06-08T12:47:31-05:00
Add access to menus and make them more dynamic
Reported by: | gharris | Owned by: | curtis |
---|---|---|---|
Priority: | critical | Milestone: |
|
Component: | UI Framework | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #629 |
Description (last modified by curtis)
For both #441 (Implement IJ1's Window menu functionality) and #584 (Get Open Recent menu working) we need a reference to the menubar, or at least the File:Recent and Window menus.
We could add getMenus() or getMenuX() to UserInterface, but then we need gui-toolkit-independent Menu (akin to Toolbar), and perhaps a MenuManager.
Change History
comment:1 Changed 2011-07-27T10:09:40-05:00 by curtis
- Description modified
- Summary changed from Add Access to Menus to Add access to menus and make them more dynamic
comment:2 Changed 2011-08-01T08:10:38-05:00 by curtis
- Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12
comment:4 Changed 2011-08-01T12:10:32-05:00 by curtis
- Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5
Milestone biweekly-2011: Aug-01 to Aug-12 deleted
comment:5 Changed 2011-08-05T09:09:25-05:00 by gharris
Curious... On Windows, at least, after opening an image, the menubar stops responding to mouse clicks. Alt-F opens the File menu, then I can use the mouse to select something. And when the menubar (inappropriately) appears in the Display window, the mouse clicks work on it... But not in the ImageJ App. window.
That said, the Open Recent dynamic menu works... Cool! I'll look at the code.
comment:6 Changed 2011-08-05T10:23:25-05:00 by curtis
Initial support for dynamic menus was added in b4815d4386b9d326ad0d72d876e84c66a623def5, and earlier commits which developed the MenuService.
There is still one big bug, which is that multiple menu bars are not kept synced. That is, the main ImageJ application menu bar updates, but other copies added to individual image windows are not.
comment:7 Changed 2011-10-18T14:45:40-05:00 by curtis
This ticket is waiting on some display refactoring. See ticket #828.
Fortunately, we have a GUI toolkit independent menu called ShadowMenu. It consists of menu entries for all available modules from the ModuleService (which includes plugins, scripts, etc.). By updating this to be kept in better sync with the UI's toolbar, it will become possible to add and remove modules from the ModuleService and see the menus update themselves accordingly. We can also provide a getter for accessing the ShadowMenu directly if desired (though this may be discouraged).