Rsvg and GTree problems

Arnold GUILLAUMOT arnold.guillaumot at wanadoo.fr
Fri Jun 18 16:52:02 CEST 2004


>  > Hello,
>  > 
> > I am currently playing on win32 and linux with lablgtk2 (snapshot
> > 20040319 from CVS) and I encountered few problems.
> 
> That's very courageous of you, thank you :-)
> (Gtk on windows is not always easy)

I don't think so. Especially if you use MSYS that has an environment setting close to "linux" (don't flame me - it's just a shortcut) and that allows you to set properly the paths (that's the big problem in fact). Then lablgtk2 just builds smoothly as ocaml (if you don't forget to patch to build ocamlmklib.exe). Many efforts have been done to improve GTK2 on win32 so that would be a pity not to use it. It is working really fine, faster than GTK1, has an utf8 support, no more problem with the fonts presetting as default one are available ("sans" "sans serif", etc ...) and has a native look with the wimp engine.

If I were you I would even update the README.win32 with the new files available on the Tor Lillqvist and the GnuWin32 pages since GTK+ 2.4.1 is out and is mandatory to use widgets such as entry_completion, combo_box and the GTree model_filter ...
The weak point is that the rsvg library is not the best one, but it is easy to build it on win32.
glib-2.4.1 / glib-dev-2.4.1
pkgconfig-0.15
libiconv-1.9.1.bin.woe32
gettext-runtime-0.13.1
gettext-tools-0.13.1
gtk+-2.4.1 / gtk+-dev-2.4.1
pango-1.4.0 / pango-dev-1.4.0
atk-1.6.0 / atk-dev-1.6.0
jpeg-6b-3-bin / jpeg-6b-3-lib
tiff-3.6.1-2-bin / tiff-3.6.1-2-lib
freetype-2.1.8-bin / freetype-2.1.8-lib
zlib-1.2.1-1-bin / zlib-1.2.1-1-lib
fontconfig-2.2.2-20040412 / fontconfig-dev-2.2.2-20040412
libart_lgpl-2.3.14 / libart_lgpl-dev-2.3.14
librsvg-2.4.0 / librsvg-dev-2.4.0
libgsf-1.8.2-20040121 / libgsf-dev-1.8.2 to have support for svgz files : it is missing in lablgtk2 :-(
libxml2-2.6.4.win32

>  > 1/ Rsvg
>  > It is not possible to load rsvg files on win32 platform with the
>  > render_from_file function. Changing opening files with open_in_bin
>  > instead of open_in should fix it in rsvg.ml
> 
> Hmm, are you sure ? SVG are XML files, so I would classify them as
> text files rather than binary. No, I think it's the code in rsvg.ml
> that's broken. It does a in_channel_length then reads that many bytes
> from the channel: that doesn't work because of the line terminations.
> Could you try this (attached) patch ?

Yes, you are right. Patch is working on win32. Note that with open_in_bin it was working too ...

>  > Then the last point, I cannot succeed having the method
>  > set_visible_func (model_filter class) to work. I have always a
>  > segfault. There is a simple test to do changing the tree_model.ml
>  > example as follows :
>  > replace (in let make_model data) :
>  > f#set_visible_column vis_col 
>  > by :
>  > f#set_visible_func (fun m row ->
>  >    let b = m#get ~row ~column:vis_col in
>  >    b)
> 
> Right, it's a bug. Here's a patch.
 
working like a charm now. Thanks.
 
Subsidiary question : has one of you an idea when a new snapshot or stable version will be released because I am close to release a GUI using lablgtk2 but I cannot ask to the users to apply all the patches before building it :-)
Thank in advance for the reply.
 
regards



More information about the Lablgtk-list mailing list