nodpc / jn-npp-plugin

Automatically exported from code.google.com/p/jn-npp-plugin
0 stars 0 forks source link

feature request: put all menus under one main menu entry in the menu bar #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I kind of didn't like the way the menus are arranged on jN since each script 
creates a menu item on the menu bar. I initially worked around this by 
disabling all scripts I didn't use, but I now think that it would be better to 
put all menus under on menu item.

This is easy by creating a menu item called jN-Scripts or something and the 
referencing the object in all scripts.

Original issue reported on code.google.com by alexl...@gmail.com on 6 Apr 2014 at 5:44

GoogleCodeExporter commented 9 years ago
I understand what you mean. I am opposite of you. I don't like that all plugins 
are collected together under "Plugins" menu item. It was a restriction of N++ I 
broke.

I think there are many people who would say Alex is right, but I think there 
are many people who would say Eugen is right also. 

If I look to other software products like Word/Excel/PhotoShop/VisualStudio. 
All of them offer own menus for actions which belong together.

What we can do to realize your suggestion? We can define new addMenu function 
in start.js

var jnScriptsMenu = Editor.addMenu("jN-Scripts");
var addMenu = function(cfgOrText){
    return jnScriptsMenu.addMenu(cfgOrText);
}

This redefinition can be made depending on a setting.

In all scripts Editor.addMenu should be replaced by simple addMenu.

Editor.addMenu can be used further to add menus to main menu and addMenu to add 
menus to jnScriptsMenu. 

What do you think about it?

Original comment by eugen.kr...@gmail.com on 6 Apr 2014 at 8:45

GoogleCodeExporter commented 9 years ago
Thats more or less how I implemented the menu as well.
Whether the menus are put into the menu bar or into one menu item could be made 
configurable in settings for the plugin.

Original comment by alexl...@gmail.com on 6 Apr 2014 at 9:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
incidentally, I discovered the plugin via this post in stackoverflow 
http://stackoverflow.com/questions/17430523/can-we-decode-url-with-nodepad, and 
there somebody complained in the comments about the menu items, that got me 
thinking.

Original comment by alexl...@gmail.com on 6 Apr 2014 at 9:02