Ticket #632 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

Add access to menus and make them more dynamic

Reported by: gharris Owned by: curtis
Priority: critical Milestone: imagej2-b1-initial
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #629

Description (last modified by curtis) (diff)

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 8 years ago by curtis

  • Description modified (diff)
  • Summary changed from Add Access to Menus to Add access to menus and make them more dynamic

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).

comment:2 Changed 8 years ago by curtis

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12

comment:3 Changed 8 years ago by curtis

  • Priority changed from major to critical

comment:4 Changed 8 years ago 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 8 years ago 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 8 years ago 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 8 years ago by curtis

This ticket is waiting on some display refactoring. See ticket #828.

comment:8 Changed 8 years ago by curtis

  • Status changed from new to accepted

comment:9 Changed 8 years ago by curtis

  • Status changed from accepted to closed
  • Resolution set to fixed

Remaining menu syncing problem filed as separate ticket #985. Closing this one, since the menu infrastructure is in place.

comment:10 Changed 7 years ago by curtis

  • Blocking 629 added
Note: See TracTickets for help on using tickets.