Stefan Schimanski wrote:

Am 02.02.2008 um 13:50 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:
Hi!
I (mostly) rewrote my patch to support pasting of graphics from the clipboard. In contrast to my old implementation it fits much better into LyX's architecture and is much much cleaner.

Indeed, I like it much more than your previous patch. But I still think that _any_ user interaction should be in the frontend, not in src/. I am talking about you use of FileDialogs in 'CutAndPaste.cpp'. Except for that you patch looks good to me from a quick glance.

Any idea how to do that in the frontend? I can just move the code which gets the filename into another function in the frontend folder and call that from the src/CutAndPaste.cpp. Is that how it should look like?

No, I would prefer the other way around, namely the frontend calling the core methods. I think that CutAndPaste should focus on moving LyX contents, not on creating them. It's OK to put there a function to create an InsetGraphics based on a given raw data and a filename but not to ask for this filename. So, I think that GuiClipboard should handle the file naming. As a first step, the FileDialog using code could be transfered to getAsGraphics() and the FileName integrated into GraphicsData.

Abdel.



Reply via email to