Am 04.06.04 22:46 schrieb(en) Peter Bloomfield:Oh, yes, your suggestion is more general. It's a pity gtk has never had a way to modify the existing popup menu on a widget--I saw a discussion once about an "about-to-popup-menu" signal, which would allow an app to modify the menu, but I guess it never happened.
Well, this may be gtk+ 2.4 specific, but by catching the populate- popup signal of a text_view, you can actually add items to the popup. Below is a modified patch against the HEAD cvs doing the following:
* for text/html: add the message parts vfs popup to the zoom menu items. The popup is called both using Shift-F10 and right-click;
* for text/other: do the same, appending the vfs stuff to the text_view popup. Again called by hotkey or mouse button;
* for image/something: display the vfs popup using right-click. These parts apparently don't get the focus if they are attached inline, so the hotkey doesn't work here.
Opinions?
I've just tested your patch. It works fine and I'm happy with it ;-)
-- regards - Jean-Luc
Cheers, Albrecht.
Attachment:
signature.asc
Description: PGP signature