some gtk2 code

Miscellaneous Forums/Linux Discussion/some gtk2 code

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Just had a small play with the latest code. If I remove the pngloader from gtkmaxgui loading png files in a gtkwebgtk htmlview doesn't cause a glibc memfree'd twice error which makes me think there is a problem with our version of pnglib. Also had to disable garbage collection until I changed the following to processURL:
	Global banks:TList=New TList

	Function processURL(handle:Byte Ptr, url:Byte Ptr, html_stream:Byte Ptr, data:Object)

		Local u:String = parse_href(checkURL(String.FromCString(url)), String.FromCString(gtk_html_get_base(handle)))
		Local path$=urlLessAnchor(checkURL(u, True))
		If FileType(path)=FILETYPE_FILE	
			Local b:TBank=LoadBank(path)
			banks.addlast b
			gtk_html_write(handle, html_stream, LockBank(b), BankSize(b))
		Else
			DebugStop
		End If
   	    gtk_html_end(handle, html_stream, GTK_HTML_STREAM_OK)
	End Function

So there looks to be some issues here also with the memory being used to feed the browser.


also sorry for being stupid but how do I get round this link error with ubuntu when trying to use the firefox htmlview -
/home/simon/blitzmax/mod/bah.mod/gtkmaxgui.mod/tests/createhtmlview:

error while loading shared libraries: libgtkembedmoz.so: cannot open shared object file: No such file or directory