On Mon, 18 Feb 2008 16:45:46 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
Hi,
Here is a first draft version of VCDiff windows support. It behaves
Cool, looks fine. There seems to be a little problem with the "Diff from current file" action: it seems it generates always a diff from the directory of the current file instead of the current file itself. I didn't do much testing but I guess it's only a small error.
It uses its own spawn functions based on CreateProcess and CreatePipe. Ideally we may create a common wrapper for all platform specific spawn (until glib works correctly). It is not yet complete as I was not sure
Yes, this would be a good idea and especially to save duplicate code because we need your code in Geany, in the vcdiff plugin and Frank and Yura probably want to use it also in their GeanyVC plugin. Not to mention any other plugins which want to execute some programs on Windows. Maybe we should put your code into src/win32.c. And we create a wrapper function for g_spawn_sync() and g_spawn_async() which just call these functions on non-Windows systems, else the Win32 specific versions. Could you also create a geany_w32_spawn_async()?
And we should file a bug report in GLib's bugzilla.
about the error management in geany,. I use mix of printf and dialog boxes for now. What is the common method to tell the user that something went wrong? And which kind of error (or level of details) do we display?
We never defined explicit rules for displaying error messages, but in general it's something like this: - real errors (ongoing action could not be performed): dialog box - common errors & warnings (action could not performed completely or not as expected): status bar - all other things should go to the conosle with geany_debug().
Regards, Enrico