Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread Tomeu Vizoso
On Wed, Aug 5, 2009 at 13:05, sumit singhsumit.co...@gmail.com wrote: Hi Tomeu, Thanx for your reply. I tried using the it , but it doesn't seem to work, it gives an error that the image should be a gdkpixbuf or None. Here is my code-  http://pastebin.be/20184  , isn't it so that while

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread sumit singh
Hi Tomeu, Thanx for your reply. I tried this as well, but doesn't seems to work. Here is my code-- http://pastebin.be/20215 , where get_preview2() is similar to get_preview fn and it returns in a similar manner. This is the get preview2 fn--- http://pastebin.be/20216 . The log error can be

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread sumit singh
Tomeu, Moreover, is it possible to use a hippocanvas surface as a button image or something like a button or a normal image even, I mean can I pack a hippocanvas in a vbox or hbox? Sorry, for asking such a basic question but I don't have any idea about hippocanvas. Regards, sumit On Thu, Aug 6,

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread Tomeu Vizoso
On Thu, Aug 6, 2009 at 16:58, sumit singhsumit.co...@gmail.com wrote: Hi Tomeu, Thanx for your reply. I tried this as well, but doesn't seems to work. Here is my code--   http://pastebin.be/20215  , where get_preview2() is similar to get_preview fn and it returns in a similar manner. This is

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread Tomeu Vizoso
On Thu, Aug 6, 2009 at 17:05, sumit singhsumit.co...@gmail.com wrote: Tomeu, Moreover, is it possible to use a hippocanvas surface as a button image or something like a button or a normal image even, I mean can I pack a hippocanvas in a vbox or hbox? Sorry, for asking such a basic question

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-06 Thread sumit singh
I tried it using the self.canvas.window and the self.window both of them , but they still give the same error. On a separate note, would it be a good idea to use the hippoImage itself as the image of the button, I mean wrapping it into a hippobox and then using that box as the image of the

Re: [Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-05 Thread Tomeu Vizoso
On Wed, Aug 5, 2009 at 03:06, sumit singhsumit.co...@gmail.com wrote: Hi all, I would like to ask what is the best way to get a gtk.Image from the data returned by get_preview function of activity.Activity fn of sugar. I want to make an image buttton using this data. Currently, I am doing it

[Sugar-devel] Getting a gtk.image from the get_preview function

2009-08-04 Thread sumit singh
Hi all, I would like to ask what is the best way to get a gtk.Image from the data returned by get_preview function of activity.Activity fn of sugar. I want to make an image buttton using this data. Currently, I am doing it by saving the data in a temp file using the tempfile module of sugar and