Hi Enrico,
On Feb 19, 2008 10:44 AM, Enrico Tröger enrico.troeger@uvena.de wrote:
What I still have to do is:
- display errors using the various UI methods when necessary
Do it like you think it's good, or just use geany_debug() for now. This can be improved once the code itself is working.
Ok, I will use dialogs for failure and status bar for the notices.
- move the win32 codes to win32.c
- add utils_spawn_sync to the struct UtilsFuncs
You can also skip this and leave it to be done by me. No problem, it's just moving code.
I can try to finish it later today or during the weekend.
I don't see a need of async call right now, I will implement sync only for now. However, on windows it will be async anyway, but I don't feel confortable enough with geany to go down the road of non blocking async IO for the plugins, maybe later :)
Hmmm, async process spawning is used inside Geany for the build commands. It's better to run compiler and make processes asynchronous to avoid a frozen GUI while waiting for the process to finish. If the process calling on Windows is always async, then it doesn't matter. The g_spawn_sync* calls in the vcdiff plugin were only because it is sufficient at this point(a svn diff doesn't take very long in usually) and the g_spawn_sync is just simpler to use.
But in Geany we need, or at least we want, the more sophisticated syntax of the async calls to read from the stdout and stderr pipes while the command is executed. Would this also be possible with your code?
Yes, windows does it asynchronously already. Then one will have to call WaitForChild or use some kind of events. It is done implicitely now.
If not, it's not a big problem. This would only mean, when compiling some code on Windows inside Geany, the compiler output wouldn't be inserted "live" in the messages window but complete once the process finished.
Oh right, compilation and other similar tasks may take longer. I have to take a look at how you use it and how you manage the display of stdout/stderr. It should not be that hard to adapt my code to do the same (The hard part is done now, we get stdout and stderr ;)
Thank you very much for your efforts.
You are welcome, it was a big opportunitiy to give something back to my favorite editor (with GUI :-)
Cheers,