Padraig Brady wrote:

Juri wrote:
> Hi,
>
> I was going to ask about how to get Gnome widgets to work with
> libglade and python but apparently I solved the problem. I've seen
> other people complaining about the problem but no solution, so I
> decided to post this anyway; consider it a bug report. I was getting
> this error when I tried running a project file containing Gnome stuff
> using glade.py (which is included at least in the Debian python-glade
> package):
>
> GnomeUI-CRITICAL **: file gnome-app.c: line 208 (gnome_app_new): assertion `appname != NULL' failed.
>
> Gtk-WARNING **: invalid cast from (NULL) pointer to `GnomeApp'
> zsh: segmentation fault
>
> The problem is avoided if I import gnome.ui. No need to call any
> functions or instantiate any classes, it just has to be imported. This
> seems massively unintuitive to a person with relatively little
> Gnome/Gtk programming experience and absolutely no experience with
> Glade; it would be nice if this was clearly documented (or fixed)
> somewhere.

OK I would like to release a python app using libglade that
just has a dependency on gtk and not gnome. The above is still
happening on my RH7.3 system so is there a work around or
is it possible at all to not import gnome.ui ?
If you want to use gnome widgets in your libglade generated interface, you must initialise libgnomeui (the same as for C programs). To do this, the steps are:
import gnome.ui
gnome.init("programname", "version")

As you can see, this can't easily be handled by "initialise on import", as I don't know what your app is called, or what version it is.

James.

--
Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.



_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Reply via email to