Some comments on what is already done in gnome-apt... On Sun, 21 Mar 1999, Jason Gunthorpe wrote: > > You can create your own Progress class to interface with a GTK progress > meter, an example of this is in gui/progress.cc. >
I already did this for gnome-apt so here you get a freebie. :-) > Recomended Implementation > The best way to make use of the library in a GUI is with an owner draw > tree widget. In most GUI implementations this means you pass an object > handle and a draw function to the tree. To get the best use out of the > library you would pass the package pointer to the tree and a draw > function that gets it's information directly from the cache. This does > two things, > 1) Assures minimal memory usage by not duplicating strings > 2) Assures the tree is always perfectly in sync with the state of the > package in the fastest manner possible > I also have a hideous implementation of this in gnome-apt; if you read the gnome-apt home page, you'll see that one of the TODO items is to rewrite it. I have a start on such a rewrite on the Gnome CVS server, but I am not very far along yet. Still, if you want to write this you will probably want to look at what I have so far. I'm redoing it with a generic Gtk widget in C. > want to make a function that takes the error text and puts it into a > dialog, see gui/errorshow.cc. > I have this in gnome-apt too... > Very soon the new tree will have the completed acquire system which will > allow you to write a pretty front end to the download progress meter, > that's not finished yet though. > It is now, I think. I already have the frontend in gnome-apt also. Havoc

