GConf’s User Interface

Last month I have found some time to hack again on the Gnome2::GConf module, the Perl bindings to GConf. IOI wrapped the GConfEngine low-level stuff, and rewrote the entire error handling layer.

While I was at it, I began thinking of a simple Perl module containing GConf-bound widgets, as a commodity module. The code itself was pretty much trivial, but as soon as I began working on it, I began feeling that a more complex approach was in order. I coded a GInterface in C, in order to implement it in Perl – but that would have required a modified version of GConf, dependent on Gtk.

Therefore, I started working on a complete C library, connecting GConf to Gtk and, with a serious lack of imagination, I called it libgconfui.

The GConf-bound widgets are, for now, a Entry and a Label; but I’ve also implemented something neat: a configuration group, which is an object to which we add a set of configurable widgets. If the state of a widget inside the group changes, the entire group might commit its contents to GConf, or to a GConf changeset. This would mean that creating a preferences dialog, either using the implicit or the explicit apply paradigm, should be easy enough to do. You should just bind a GConf key to a configurable widget, and BLAM!, each changes is handled by libgconfui.