[Config] Add type-safe configuration parsing
authorIra W. Snyder <devel@irasnyder.com>
Mon, 28 Jan 2008 04:42:18 +0000 (20:42 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Mon, 28 Jan 2008 04:42:18 +0000 (20:42 -0800)
commit4d710a43f2dec32560833a4cf2ba27324c219b8c
tree0621168c8026852632b108aa7c7b3e35f3a4413c
parent3a353bab78ecec2bfe0397c7f7929177829417a6
[Config] Add type-safe configuration parsing

This makes the GKeyFile engine do the parsing for all of the GObject
properties, instead of rolling our own. The default configuration was
moved to a file (share-tilda.conf) which will live in /usr/share when
the project is autoconfed.

The rewritten configuration parser determines the type of parameter
given to it using its type registration, then invokes the appropriate
parser in GKeyFile. The whole thing is basically function overloading
from C++, but done in C.

I also exported all of the enums to the tilda-types.[ch] files, then
hooked them into the GType system so they can be auto-parsed later.
The config file parser is actually pretty nice, because it allows
you to use the enum value's nick in the configuration file. It's
harder for us as programmers (and harder on the computer) but it sure
makes for a pretty configuration file. Might as well make the computer
work /for/ us after all. ^_^

Sorry about the huge changeset.
Makefile
share-tilda.conf [new file with mode: 0644]
tilda-config.c
tilda-config.h
tilda-terminal.c
tilda-terminal.h
tilda-types.c [new file with mode: 0644]
tilda-types.h [new file with mode: 0644]
tilda-window.c
tilda-window.h