Ticket #632 (closed defect: fixed)

Opened 11 months ago

Last modified 3 months ago

Add access to menus and make them more dynamic

Reported by: gharris Owned by: curtis
Priority: critical Milestone: imagej-2.0.0-beta1
Component: ij-ui Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

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 10 months 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 10 months ago by curtis

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

comment:3 Changed 10 months ago by curtis

  • Priority changed from major to critical

comment:4 Changed 10 months 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 10 months 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 10 months ago by curtis

Initial support for dynamic menus was added in r3642, 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 7 months ago by curtis

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

comment:8 Changed 7 months ago by curtis

  • Status changed from new to accepted

comment:9 Changed 3 months 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.

Note: See TracTickets for help on using tickets.