glibwww2 patches, gtk object



Howdy, all,

	I've made some changes to glibwww2, since I intend to use it in the
upcoming future.  However, since I will be moving across the Atlantic on
Friday, I figured I'd get as much done as I could now and release that work
to everyone in the hopes that it'll be of use, and maybe that someone will
do something with it in the interim. ;-)

	I noticed that it hasn't been touched in quite a while, but there's
nothing in the cvs tree indicating that it's dead or will die anytime soon.

	Basically, what I've done is create a GtkObject wrapper on top of
the glib code, which emits signals when events occur.  This ought to be more
useful to developers at large than was the original set of gnome widgets
which were linked in directly.

	Also, I've modified src/Makefile.am so that there are now 3
libraries: glibwww, glibwww-gtk, and glibwww-gnome.  As you might imagine,
the first is based strictly on glib (as per the original code), the second
includes my gtk object, and the third contains those gnome widgets which
were in the cvs tree.

	It was/is my intention to extend the underlying glib code to call
callbacks during the data-reception process (e.g., for progressive loading;
it should be pretty simple, since the ability is there in libwww), extend
the gtk+ module to throw appropriate signals as that data is received, and
modify the gnome stuff to use the widget and its signals instead of the
underlying glib-callbacks.  However, I don't have any time now.

	Currently, the widget only throws the "load_done" signal, which is
all that the underlying glib code makes easily available.  And the gnome
widgets are still tied to the glib-callbacks (though they are in a separate
library).

	This code is highly experimental.  I have not tested it on anything. 
I /think/ it works, but I won't believe it until I test it.  Also, it has a
very severe memory leak -- the requests are never destroyed.  It's a simple
fix, but it needs to be done.  One simple way would be to delete the request
after throwing the 'load_done' signal, which would literally be a one-line
fix.  Another idea would be to keep everything in a hash table.  There do be
more ideas, too.  I know it compiles.  That's all I can promise at this
time.

	Also, I tried to arrange things such that this could be dropped into
the new GObject stuff.  I don't know enough about glib2/GObject to know
whether that will work or not, but the only thing I'm using from the
GtkObject is the ability to throw signals.  Hopefully it'll work.  But it
could still stand to be renamed.

	That's about it.  Enjoy.  I'll be available again in a few weeks.

Tschuß
Bibek

Attachment: glibwww2.diff.gz
Description: Binary data



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