Thanks, I was sort of expecting someone to fix the nits i didn't have time to 
look at.

Your solution seems about right.

----- Original message -----
> I've pushed a change so that plugin menu item names and names of commands
> created by plugins are as they were before the new plugin import mechanism.
> I.e. just strip everything up to and including the last '.'.
>
> This doesn't address namespace collisions (which the new plugin import 
> mechanism
> itself avoids), but does make the plugins menu look better and keybindings to
> plugin commands work again.  I'm not sure what the best solution is, this is
> just a patch from 'broken' to 'like it was before'.
>
> Cheers -Terry
>
> trunk> bzr diff -r -2 --using='diff --context=0'
> === modified file 'leo/plugins/plugins_menu.py'
> *** old/leo/plugins/plugins_menu.py        2010-03-02 14:42:51.000000000 -0600
> --- new/leo/plugins/plugins_menu.py        2010-03-04 08:55:20.000000000 -0600
> ***************
> *** 157 ****
> --- 158,159 ----
> +        plugin_name = p.name.split('.')[-1]  # TNB 20100304 strip module path
> +
> ***************
> *** 169 ****
> !                table = ((p.name,None,callback),)
> --- 171 ----
> !                table = ((plugin_name,None,callback),)
> ***************
> *** 180 ****
> !                m = c.frame.menu.createNewMenu(p.name,menu_location)
> --- 182 ----
> !                m = c.frame.menu.createNewMenu(plugin_name,menu_location)
> ***************
> *** 196 ****
> !                table = ((p.name,None,p.about),)
> --- 198 ----
> !                table = ((plugin_name,None,p.about),)
> ***************
> *** 424 ****
> --- 427,429 ----
> +
> +                                base = base.split('.')[-1]  # TNB 20100304 
> strip module path
> +
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group. To post to this group, send email to
> [email protected]. To unsubscribe from this group, send email to
> [email protected]. For more options, visit this group at
> http://groups.google.com/group/leo-editor?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to