On Sat, 8 Mar 2008 06:29:10 +0100 Joerg Fischer <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote: > > > The bug is the difference in behavior of combinations X-resouces + > > Background menu and X-resouces + Shell or Macro menu. > > The last works correctly: only one of bound macro is executed. > > The first is buggy: both function bound via X-resources and > > macro bound in menu are executed when the key is used! > > At the time the Background menu was added, the accelerators defined > there were not seen at all. Only in rather recent Open Motif versions > the accelerators are seen. The Background menu is a rather special > thing. Normally, there shouldn't be entry fields for defining key > bindings in the menu to give the impression the intention would be to > be able to define key bindings for it. I suspect they are there > because this menu is simply a copy of the macro menu and the > implementator was too lazy to do the changes. > > Btw, there is a bug report there already, but I doubt it is 'fixable' > from inside nedit other than to do an adapted Background menu > definition menu. > > http://sourceforge.net/tracker/index.php?func=detail&aid=1668273&group_id=11005&atid=111005 Thank you Jörg, I forgot this year-old report. A new topic on subject of this discussion is added to it. > If one likes key bindings, one can simply add the macros to the macro > menu. Yes, you are right. A key binding via Background menu is excessive, so can be removed to avoid a mishmash. > If one likes to show them in the Background menu, too, one > makes entries there containing just macro_menu_command("..."). In this case, if a key is bound to that macro_menu_command("...") it would be nice to see this key in the Background menu. Concerning the initial goal of the discussion on key binding: an order, in which key bindings are searched for, can be mentioned in the manual as follows: There are several ways to change key bindings in NEdit. The easiest way to add a new key binding in NEdit is to define a macro or a shell command in Preferences -> Default Settings -> Customize Menus -> Shell or Macro Menus. However, if you want to change existing bindings or add a significant number of new key bindings you will need to do so via X resources. The Shell and Macro Menus are searched for user-defined key bindings at first and then the bindings are searched in X resources. The built-in menu accelerators have a priority over user-defined bindings. In the section Problems/Defects the following can be added. P: When a key is bound to macros via X resources and in Window Background Menu, both macros are executed. S: Use Macro Menu to define key bindings. The same excessive ability provided by the Window Background Menu can be removed in future. My English is very bad so the text must be corrected by a native speaker. Alexey -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
