On Mon, 17 Nov 2003, Ulf Lamping wrote:
> Well, that would be nice to look at. But please keep in mind, that making different GUIs for different platforms will force people to maintain different frontends at once, even if they don't have that platform by hand. Currently, you will write code for the GTK, and it will work (hopefully) on all supported platforms.
> The risk of forking the GUI code seems to become a maintenance *nightmare* and could slow down development of new features a lot...
...and so the nightmare begins. :) As a proof of concept I've cobbled
together some Python code that reads XUL interface definitions and
generates native Windows C SDK code. It combines the redeeming (to me,
at least) aspects of Mozilla's XPFE and AbiWords Application Framework.
The autogenerated code has been combined with some hand-written code
and linked with the rest of Ethereal to create an application with a
native look and feel. It isn't much more than a toy at the moment --
it can only open a file and display a packet list, but it looks promising.
This method has the following advantages:
- The interface layout is easy to change, since it's defined by the
XUL files.
- Much (but not all) of the code is automatically generated.
- Frontends are truly native, and can be tweaked extensively.
New features will require new code for each platform, but this can
hopefully be minimized with the use of generated code.
Does this seem like a viable approach? If so, I'll keep plodding along.
If not, speak up 'cause I finally have time to devote to a cross-platform
frontend and I'd _really_ like to use it effectively.
The code itself is at http://www.ethereal.com/~gerald/ui-poc.tar.gz.
To try it out, untar it into an Ethereal source directory and run "nmake
-f Makefile.nmake.ui", which generates "wethereal.exe". A more detailed
description is in ui/README.ui.