2006/11/5, Jorge Vargas <[EMAIL PROTECTED]>:
hi I'm following
http://www.gnome.org/projects/ORBit2/appletstutorial.html#AEN72

since
http://www.pygtk.org/articles/applets_arturogf/index.html#AEN55
is a bit outdated and it's more oriented to the app in question then a
general howto

I hope that when you will find out how things works you will update
the howto or write a brand new better one.


I'm trying to look for a way to translate this
image = gtk_image_new_from_file ("/usr/share/pixmaps/mypicture.png");

now on both api's for the GTKImage it says different.

http://developer.gimp.org/api/2.0/gtk/GtkImage.html
http://www.pygtk.org/docs/pygtk/class-gtkimage.html

according to the pygtk api there is no equivalent of the above method
and I have to do something like.

    image = gtk.Image()
    image.set_from_file('/usr/share/pixmaps/bug-buddy.png')

is this the correct approach?

I've sent a patch to pygtk [1] in order.to have the constructors:

gtk.image_new_from_pixmap
gtk.image_new_from_image
gtk.image_new_from_file
gtk.image_new_from_pixbuf

[1] http://bugzilla.gnome.org/show_bug.cgi?id=371293

at the moment yours seams to be the better solution.

cheers
--
Gian Mario Tagliaretti
http://www.parafernalia.org/pygtk/
_______________________________________________
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