On Sat, 21 May 2005, James Graham wrote:

In the interests of scratching my own itch, attached is a patch that allows basic copy-and-paste of widgets. It basically copies the set of commands used to create the subtree being copied. It seems to work OK but has the following known limitations:

This looks a nice patch, James. I've put it into the tree in a slightly modified form. I've moved the logic to enable/disable the paste button out of slotAboutToShowEdit, and into when the widget is selected.

I've also put in some code to make sure a widget is selected after one is deleted, to get rid of some corner cases.

I think you're right that the menu code should be refactored. I haven't come up with a good way of working out whether we can copy/paste from other windows though. The problem is that controls often lose their selection if the menu gets it. The only way around it is with a particularly nasty event filter, perhaps.

Jeremy

--
Jeremy Sanders <[EMAIL PROTECTED]>
http://www.jeremysanders.net/                Cambridge, UK
Public Key Server PGP Key ID: E1AAE053

Répondre à