Re: [system-tools] reload xml element from the backend
- From: Carlos Garnacho <carlosg gnome org>
- To: Guillaume Desmottes <cass skynet be>
- Cc: system-tools-list gnome org
- Subject: Re: [system-tools] reload xml element from the backend
- Date: Mon, 21 Mar 2005 03:53:39 +0100
Hi,
On Wed, 2005-03-16 at 23:52 +0100, Guillaume Desmottes wrote:
> Hi!
>
> I'm writing a patch for ubuntu to give the possibility for the user to
> install (with synaptic) samba and/or NFS when he launch shares-admin and
> none of these services are installed.
>
> To do this, i need to "reload" 2 values from the backend.
> Indeed, after the installation of samba (or nfs)
> gst_xml_element_get_boolean (root, "smbinstalled")
> return again false (i suppose these values are loaded at the init of the
> program from the backennd).
Unfortunately, you can't just extract just a couple of values (ATM),
you'd have to reload all the configuration (when the tool starts, it
does --get to the backend, getting the whole XML), so you could make
something like:
tool->config = gst_tool_run_directive (tool, NULL, "get", NULL);
But this would replace any change done with the old config, so you might
do 2 things:
1) Store the possibly modified config in an auxiliar xmlDocPtr for
mixing both of them after installing the package
2) Just update the "smbinstalled" tag with gst_xml_element_set_boolean()
if you know whether it was installed correctly :)
I'm very sorry that there isn't a better method for doing this, I'm
already working in a solution
Regards
>
> I'm not familiar with the backend (and Perl in general) so, i would like
> to know how to solve this problem.
>
> Thanks a lot :)
>
> Guillaume
>
> _______________________________________________
> system-tools-list mailing list
> system-tools-list gnome org
> http://mail.gnome.org/mailman/listinfo/system-tools-list
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]