Re: [Setup-tool-hackers] 0.4 release



Hi Bradford,

    Thanks for the pointers. I shall get started on this ASAP and get
    back to you with any questions/trouble I might have.

    Thanks.

    Regards,

        Ravi

On 17 Mar 2001 05:24:44 -0500, Bradford Hovinen wrote:
> Not quite. What I have done is to create a system that allows users to
> store configuration data in different profiles (called locations) and
> switch between them quickly. This is done by having all the tools managed
> by this system store data in XML snapshots. Of course, for the setup
> tools, this is trivial, since they already speak XML. I modified the
> capplets in the HEAD branch of the control center in CVS to read and write
> XML. The only remaining task to complete the circle and have this system
> working is to modify the capplets ever so slightly so that they store
> their XML data with this location manager when the user clicks "Ok". I
> have taken a few minutes to change most of the capplets currently in
> use. The ones that remain are wm-properties, theme-switcher, and
> (IIRC) gnome-edit-properties, and maybe one or two others.
> 
> The procedure is to #include <ximian-archiver/{archive|location}.h> and,
> in the signal handler for the "Ok" button, after the code that reads the 
> preferences from the dialog and applies them, do the following:
> 
>  - Open the archive with Archive *archive = archive_open (FALSE);
>  - Open the current location with Location *current_location =
> archive_get_current_location (archive);
>  - Get the XML data with whatever procedure in the capplet writes the
> preferences structure to XML (it should be the only function that returns
> an XmlDocPtr, and it should already be called from do_get_xml)
>  - Store the data with location_store_xml (current_location,
> "<name-of-capplet-binary>", xml_data, STORE_MASK_PREVIOUS);
>  - Close the archive with archive_close (archive);
> 
> That's all. Please let me know if you have any trouble.
> 

-- 
"If you're smart, you'll be humble. There always is somebody
who hasn't read a book and knows twice as much as you do."

              -- David Duchonvy in Readers' Digest

        Ravi Pratap M         <ravi@che.iitm.ac.in>
                      <http://www.iitm.ac.in/~ravi>


_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@helixcode.com
http://lists.helixcode.com/mailman/listinfo/setup-tool-hackers



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