About gmconf

August 10, 2007

Some years ago, we decided that gnomemeeting, being mostly based on pwlib, openh323 and gtk+, which were portable to win32, could perhaps be ported to this platform.

Of course, being a full fledged gnome application, it also used things like gconf, bonobo, etc. Those were a problem.

A –disable-gnome switch and a few #ifdef quite quickly got away with everything but gconf. Last hurdle. Last but not least, as the saying goes.

So I studied a little how gconf was used in gnomemeeting. I wrote a nice gmconf.h header with a pure glib api. Then implemented a gmconf-gconf.c implementation. Easy.

Next step was to go through each and every gconf call in ekiga and replace it by a gmconf call. Oh, the joy. Hundreds of them.

The final step, of course, was to write gmconf-glib.c : a pure glib implementation. This wasn’t particularly difficult. What was a little trickier was that I decided to make it easier to maintain the default settings by parsing the gconf schema. This involved parsing said schema, using GMarkup. It worked!

Of course, when I wrote all of this, my idea was that within one year, all of gnome would be ported to win32 following ekiga’s trail. In fact, ekiga wasn’t ported before much longer (and I don’t even know if gconf made it through), but it still uses gmconf — with some bugfixes here and there but mostly intact.

Yesterday I had to write a piece of code to parse another xml-like chunk of data, but this time used libxml2. Wow. I should have used libxml2 back then : a pleasure. And it sports different api to parse — one is callback-based like GMarkup (hence as painful — but it has its uses), and the other is tree-walk based (much better for the task). Still, I won’t rewrite another gmconf implementation : either we stick with those we have — or we get gconf everywhere.