Bug #3130
closed
Add an accelerator (keyboard shortcut) for opening a new blank workflow
Added by Derik Barseghian almost 17 years ago.
Updated over 16 years ago.
Description
Add an accelerator for opening a new blank workflow canvas (File => New Workflow => Blank).
Unless 'n' is taken I will use it. e.g. apple-n will be the accelerator on a mac for this action.
If this bug is easily fixable, do it. If not, postpone it.
I'll postpone. Looking in Top.java, where I thought this change might go (now I'm not sure), it isn't immediately apparent to me how to add the accelerator for Kepler's New Workflow => Blank menu item
Top.java has this about the New file menu item:
// The mnemonic isn't set in the static
// initializer because JMenu doesn't have an
// appropriate constructor.
_fileMenuItems[2].setMnemonic(KeyEvent.VK_N);
// New button disabled by default.
_fileMenuItems[2].setEnabled(false);
This has been implemented in TableauFrame.java.
However, ClassDefinitionController.java already set meta-n to create new instances of class actors. I changed this to meta-i and added the modified ClassDefinitionController to exp/ptolemy/.
I'm leaving this bug open since ClassDefinitionController will need to be committed to Ptolemy CVS. Otherwise, if Ptolemy and Kepler are going to use different accelerators for the same action, then this should be stored in different configuration files instead of the source code.
I merged these changes into the ptII tree, but not into
the ptII rel-7-0-beta-2 branch for two reasons:
1) Adding Control-N to open a new blank graph seems like a new feature
not a bug fix
2) Currently, there have been no new changes added to the rel-7-0-beta-2
branch, so what shipped in Ptolemy II 7.0.1 is unchanged.
If we end up making further modifications to rel-7-0-beta-2, then it
might be useful to add this change to kepler-1.0, but it might require
doc changes etc. So, let's just leave this one out of rel-7-0-beta-2
unless there is clamor for it.
This bug could be marked as Fixed once someone verifies that it is fixed
in the devel branch.
Thanks Christopher, works great.
Original Bugzilla ID was 3130
Also available in: Atom
PDF