Re: [Setup-tool-hackers] 0.4 release



On 16 Mar 2001, Ravi Pratap M wrote:

> Hi Chema,
> 
> 
> On 14 Mar 2001 13:49:57 -0600, Chema Celorio wrote:
> > to help us port the capplets. I guess the task is pretty straight
> > forward and people without too much experience can start with this.
> 
>     Well, this certainly seems like the right time for me to jump on. I
>     have been interested in hacking on setup tools for some time now but
>     have only recently managed a working CVS setup thanks to lots more
>     HD space on my machine here :-)
> 
>     I really would like to help you guys with this task. I am willing to
>     learn so I would greatly appreciate somebody providing me with a bit
>     of assistance.
> 
>     Would you mind saying what exactly you have in mind ? Are you
>     talking about porting them to become control-center applets ?

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.

>     Looking forward to some action :-) Do let me know how I can get
> started.
> 
>     Regards,
> 
>         Ravi
> 
> 

-- 
-Bradford Hovinen

"If the fool would persist in his folly he would become wise."

        - William Blake, "Proverbs of Hell," 1793



_______________________________________________
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]