A feature as the following would have saved me an hour or more yesterday.
for any image you have included in a document, have a contextmenu item, which says "Edit in external editor", which does just that. copies the image to /tmp and open an external editor (say gimp, should maybe be a preference somewhere), afterwards the image in the document should be replaced by the edited one.
maybe use inotify or something similar to detect changes to the editable copy.
Sounds nice - Thorsten, anything we could easily achieve?
Nice idea, and not too hard to implement - adding easy2dev keyword - Tobias, would you even want to have a shot at it, we'll help with pointing to the right places of course?
Thorsten, I can take this up. There is a query though. /tmp method will be only for Linux/Mac. How can we standardize the temp file creation across all platforms?
Use osl::FileBase::createTempFile() for that (from osl/file.hxx)
I am taking this bug. Thanks for the Temporary file suggestion. Will submit a first cuts patch soon enough.
I have attached a code snippet with which I have saved the Graphic to a temp file from your suggestion. Going further I was going to implement some thing like this,
0. Lock the Graphic ( un-editable)
1. create a new writer thread
2. From the thread open the temporary file external application via osl_executeProcess from osl/process.h and wait for applicaton termination on that thread.
3. On thread completion, update graphic with new file and join the thread
4. Unlock the graphic.
I wanted to know if this is the recommended way of doing it. Please advice :)
Created attachment 40087 [details]
Snippet for saving to a temporary file
I have also added "Edit with External tool" to the Graphic's Pop Up menu and called the method in this snippet in the Menu Item's ExecMethod. Works fine for me.
Suren, approach looks good to me - would you attach a more complete patch so I could have a try? Alternatively, you can post it to email@example.com for broader discussion. Thanks!
This is already done.
Migrating Whiteboard tags to Keywords: (EasyHack)