3- I managed to disable the menu item when no text is selected and posted the patch to sf.net. Thanks for the tip. I don't know why the menu item is enabled when the current editor is a diagram though. Fortunately it doesn't lead to a crash when activated.