Re: Milestones document

On Mon, 6 Dec 1999, NotZed wrote:
> The source luke, the bloody source!
> My initial whine was to do with just how much *source*code*-bloat is
> required just to manage so many options.  Your code only sets 4
> options of the same datatype (and look how long it is).

This is caused by Revert. Look at a capplet sometime. I really doubt you
can improve on the line count with gnome-config - maybe remove
gconf_init(), but that will go in gnome_init() anyway. Of course you don't
have to support Revert with GConf, and then you get a lot less complexity.

If you want to use GConf with just get/set as if it were gnome-config you
can do that too.

Anyway the source isn't huge; and fully 1/5 of it is caused by using
object data instead of global variables:
$ grep ';' basic-gconf-app.c | wc -l
$ egrep 'gtk_object_(get|set)_data' basic-gconf-app.c | wc -l
(plus a local variable declaration for each get_data() to store the 
gotten pointer.)

And this is with deliberate overengineering for the sake of example.

A notable thing about the source is that there are two entirely
unconnected hunks of code, the prefs dialog and the main app. The prefs
dialog doesn't need to know anything about the main app.  The larger your
main app and the more different code sections that care about prefs
settings, the more useful this is.


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