Re: possible way to list the configured databases
- From: Yanko Kaneti <yaneti declera com>
- To: Havoc Pennington <hp redhat com>
- Cc: GConf development List <gconf-list gnome org>
- Subject: Re: possible way to list the configured databases
- Date: 31 Jul 2001 05:49:08 +0300
On 30 Jul 2001 22:24:34 -0400, Havoc Pennington wrote:
>
> Yanko Kaneti <yaneti declera com> writes:
> > hello
> >
> > i wonder if the following patch , which if applied produces output
> > similar to this:
> >
> > yaneti indigo:~/space/gconf-1-0/gconf$ ./gconftool-1 --list-databases
> > xml:readonly:/home/yaneti/local/etc/gconf/gconf.xml.mandatory
> > xml:readwrite:/home/yaneti/.gconf
> > xml:readonly:/home/yaneti/local/etc/gconf/gconf.xml.defaults
> > yaneti indigo:~/space/gconf-1-0/gconf$
> >
> > would be found acceptable?
> > if so i will gladly patch the remaining bits (ChangeLog, docs, whatever
> > is needed)
>
> What is the intended use for this feature? (I'm just curious - maybe
> we need other features like this, or could make the feature better.)
i will reveal the devilish plan ;) it involves an innocent schema too
i want to pair this with a macro in the spirit of
AM_GCONF_CHOOSE_DATABASE
which will interactively query the casual compiling user/developer
where he wants to install the schema in question
and also a marco AM_GCONF_GET_LAST_DATABASE_IN_LIST or something, in
other words the curent system default database
> > + if (list_databases)
> > + {
> > + int i;
> > + gchar** addresses;
> > + gchar* conffile;
> > +
> > + conffile = g_strconcat(GCONF_CONFDIR, "/path", NULL);
> > +
> > + /* send the internal output to the log */
> > + gconf_set_daemon_mode (TRUE);
>
> If gconf_load_source_path has a bunch of debug spew, then we should
> instead make it take a "gboolean do_logging" argument or the like.
> Daemon mode potentially affects things other than logging.
if its decided to go through the daemon, then i can figure what to do
with the output i guess, i just didnt want it to clog the stdout
i am probably missing something here, cuz currently i dont understand
well how to configure the logging better
> > +
> > + addresses = gconf_load_source_path(conffile, NULL);
> > +
> > + for (i = 0; addresses[i] != NULL;i++)
> > + printf("%s\n", addresses[i]);
> > +
> > + return 0;
> > + }
> > +
>
> I'm somewhat worried that we need to ask the daemon for the list of
> config sources, instead of doing it here. Remember the daemon and
> gconftool may not be from the same version of GConf, though that would
> be unusual.
my concern was that the parsing code(in gconf_load_source_path) is a
biggie, i can see it decoupled in a function, but on the other hand with
this simple method the daemon verifies the validity of the database
definitions
> This may not be a real issue though. Your patch has simplicity on its
> side. ;-)
i will be glad if you agree in principle with me(us from galeon) that
there is need for a little more configurabilty on configure time about
where the schema will be installed
hope i am not on crack here :)
yanko
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]