Exposing gconf key names



I have been doing some hacking this week that adds a key to the
http-method in gnome-vfs. I then added some code to both Epiphany and
Galeon to use the same key (they cannot use the http-method directly,
due to the way the gtkmozembed component works).

Now, this key is "owned" by gnome-vfs (i.e. it is described / defined in
a schema file that gnome-vfs installs), along with a number of other
gconf keys. Would it make sense, therefore, for gnome-vfs to expose
these keys via some constants in a public header file? When I was
bashing on the web browsers, I had to manually enter the full key name
and check half a dozen times to make sure I made no typos. If I was
using a pref-defined constant from gnome-vfs, the compiler would do the
typo checking for me.

Advantages:
	- compile time checking of the key name already existing.
	- define once, use everywhere.
	- an authoratative list of the keys available to programs (the
	  schema file already provides this, in theory, but it is not in
	  a useful form for coding).

Disadvantages:
	- if the key name ever changes in gnome-vfs, client applications
	  need to somehow find this out so that they can build in
	  backwards compatibility support for the old key name (a.k.a
	  good gconf behaviour). On the other hand, gnome-vfs should
	  also be supporting the older name, so this may be a moot
	  point.

This is all just syntactic sugar in a sense, but is it an enhancement
worth thinking about?

Malcolm

-- 
No one is listening until you make a mistake.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]