Re: init clarity needed



On Monday, July 16, 2001, at 03:00  PM, Havoc Pennington wrote:

Theoretically gnome_program_init() is the big uber-init-wrapper that
handles calling all the others, IIRC.

That's what I would thought at first. But gnome_program_init does not call gtk_init. And bonobo_ui_init seems to call both gnome_program_init and gtk_init. So it seems from that that non-bonobo programs need to call both gnome_program_init and gtk_init.

Also, for gnome_program_init, which properties do my programs need to pass in? And do I really need to make an explicit choice between xmldb and gconf for every program's config URI? What about test programs that don't really want persistent
config storage?

If we allow a choice here it is broken. config: should simply point to
GConf and apps should use config:. Apps that want something else
should hardcode xmldb:, but there shouldn't be special support for
that in GNOME, because we don't encourage it.

I am confused because I can't find an exemplar program. It seems that you can't call gnome_program_init without properties in the varargs part, because some properties are required. what exactly does using "config:" entail? Do I have to invent a unique URL inside the config: URL space for each program?

For example, gnome-vfs will just call gconf_init() if it hasn't been
called, which is on crack, because if gconf_init() was actually needed
(and it really isn't), then it would be important to call gconf_init()
only at application startup time, so it could get argc/argv. Since
gconf_init() is actually useless, gnome-vfs calling it is harmless,
but there is no reason anyone should have to call it. I believe all
gconf_init() does these days is call oaf_init().

I'd love to fix this in gnome-vfs to be right. What do you think it should be changed to do? Always call gconf_init()? Never call gconf_init()?

    -- Darin




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