intel1993 / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Popup menu text not being set #183

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Show the editor's popup menu
2. Notice that many of the actions have the action name key, not the MenuText

What is the expected output? What do you see instead?

e.g. for the "Find Next" action, in the right-click popup menu the menu item 
should read "Find Next". Instead, it is the action name "find-next".

What version of the product are you using? On what operating system?

0.9.5

Please provide any additional information below.

The problem is that in the config method, putValue(NAME, actionName) is being 
called after the MenuText is set. However, putValue(NAME, actionName) is 
already called in the constructor. The following patch fixes things up nicely:

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -46,7 +46,6 @@
                putValue(m.group1, m.value);
            }
        }
-       putValue(NAME, actionName);
        // if we did not put an icon, try and find one using our name
        if (getValue(SMALL_ICON) == null) {
            setSmallIcon(actionName + ".png");

Original issue reported on code.google.com by Gabriel....@gmail.com on 6 Mar 2012 at 3:50