[pygtk] Screenshot example, XID problem

2004-10-24 Thread Jean-Baptiste Cazier
Sæll I am very happy to use import and click on a window to get the correct one However I got so many nice examples using convert and some xid However I cannot succeed to get the xid of my gtk.window, or drawing area, etc... gtk.gdk.Window object (GdkWindow) at 0x81dfad4 Traceback (most recent

[pygtk] Re: Screenshots ? EXAMPLE anyone ?

2004-10-21 Thread Jean-Baptiste Cazier
+ From: Jean-Baptiste Cazier [EMAIL PROTECTED] Subject: [pygtk] Screenshot ? To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 S_l, How can I take a screnshot of my main gtk.Window to save/print ? Takk Jean-Baptiste PS: How can I

Re: [pygtk] Re: Screenshots ? EXAMPLE anyone ?

2004-10-21 Thread Jean-Baptiste Cazier
Oh my god ! So simple It is really magic ! ;-) Thanks a lot Jean-Baptiste On Thu, 21 Oct 2004 11:09:54 +0200 Johan Dahlin [EMAIL PROTECTED] wrote: ImageMagick sounds good, but how should i implement it ? Anybody has got a working example ? os.system(import screenshot.png)

[pygtk] Rotate Pango by 90 degrees ?

2004-09-24 Thread Jean-Baptiste Cazier
Sæl ! About a year ago John Hunter proposed a routine to rotate pango text ( draw= _text_rotated) I wonder if the procedure has been implemented by default in a pango method= yet. It would be VERY useful for many to have the possibility to rotate pangolay= out, at least by 90,180,270 degrees

[pygtk] tooltip emulation on drawingarea

2004-03-10 Thread Jean-Baptiste Cazier
Sæl I would like to emulate a tooltip on a GtkDrawingarea. I am aware the The Drawing Area does not emit signals to allow this, however I want the tooltip to be triggered by the click of the mouse: When I click on the mouse, I want to have information appearing right under the pointer related

[pygtk] Multiple fonts on drawingArea . [WAS: High CPU problem example]

2003-12-15 Thread Jean-Baptiste Cazier
removed some code, but that should be enough. It's from the class Message of IMFish(.sourceforge.net) :-) Also, i think that you should setup what font do you want to use, in other place, than the expose-cb! Seeya! -Original Message- From: Jean-Baptiste Cazier [EMAIL PROTECTED

[pygtk] Multiple fonts in single drawingArea ? [WAS: High CPU problem example]

2003-12-15 Thread Jean-Baptiste Cazier
(.sourceforge.net) :-) Also, i think that you should setup what font do you want to use, in other place, than the expose-cb! Seeya! -Original Message- From: Jean-Baptiste Cazier [EMAIL PROTECTED] To: Gustavo J. A. M. Carneiro [EMAIL PROTECTED] Date: Fri, 12 Dec 2003 17:38:46 +

[pygtk] Re: Multiple fonts on drawingArea . [WAS: High CPU problem example]

2003-12-15 Thread Jean-Baptiste Cazier
be enough. It's from the class Message of IMFish(.sourceforge.net) :-) Also, i think that you should setup what font do you want to use, in other place, than the expose-cb! Seeya! -Original Message- From: Jean-Baptiste Cazier [EMAIL PROTECTED] To: Gustavo J. A. M

[pygtk] High CPU problem example

2003-12-10 Thread Jean-Baptiste Cazier
Hi again ! Despite the many e-mails and suggestions I received, nothing has solved my problem so far. So, I stripped down my program to some essentials to show you the problem I am running into: The script below does nothing, but consumes 95% of my CPU ! If I comment out the line

Re: [pygtk] High CPU with expose-event

2003-12-08 Thread Jean-Baptiste Cazier
the signal_handler_block method ? Any other idea on the way to proceed ? Takk Jean-Baptiste On Fri, 5 Dec 2003 16:32:03 -0200 Christian Robottom Reis [EMAIL PROTECTED] wrote: On Fri, Dec 05, 2003 at 06:13:06PM +, Jean-Baptiste Cazier wrote: After further investigation it seems that the routine

Re: [pygtk] High CPU with expose-event

2003-12-08 Thread Jean-Baptiste Cazier
) AttributeError: 'gtk.DrawingArea' object has no attribute 'signal_handler_block' Also the area itself does not have the attribute ! Takk JB On Mon, 8 Dec 2003 10:14:36 -0200 Christian Robottom Reis [EMAIL PROTECTED] wrote: On Mon, Dec 08, 2003 at 09:50:30AM +, Jean-Baptiste Cazier wrote: I tried my

Re: [pygtk] High CPU with expose-event

2003-12-08 Thread Jean-Baptiste Cazier
the modification of the font makes a call to this routine self.area.modify_font(font_desc) JB On Mon, 8 Dec 2003 10:59:52 -0200 Christian Robottom Reis [EMAIL PROTECTED] wrote: On Mon, Dec 08, 2003 at 12:47:39PM +, Jean-Baptiste Cazier wrote: But I realise I put the wrong output line

[pygtk] High CPU with expose-event

2003-12-05 Thread Jean-Baptiste Cazier
hi ! After further investigation it seems that the routine called by my expose_event signal is generating itself new expose_event... To avoid that effect I would like to block the signal when entering the routine and unblock it while leaving but I have problem transferring the event id through

Re: Re[2]: [pygtk] High CPU consumption when idle !?

2003-12-02 Thread Jean-Baptiste Cazier
Message- From: Jean-Baptiste Cazier [EMAIL PROTECTED] To: Alejandro David Weil [EMAIL PROTECTED] Date: Tue, 2 Dec 2003 13:38:50 + Subject: Re: [pygtk] High CPU consumption when idle !? SÔll ! Thanks for he interest. I am creating a gtkWindow and fill it with a GTkDrawingArea

[pygtk] High CPU consumption when idle !?

2003-12-01 Thread Jean-Baptiste Cazier
Sæll ! I have developped a nice, but large program with a graphical interface with pygtk. However it is extremly CPU consuming (95%) even when idle or when the window is minimized I have indeed a lot of connect set-up but could this be due to something else ? Could you please tell me if this

[pygtk] gtk.FontSelection pb with set_font_name

2003-07-30 Thread Jean-Baptiste Cazier
Hi ! I am trying to use gtk.FontSelection. I can read the choice from the dialog box all right with get_font_name, but set_font_name just does not set anything and return false. I am not sure if it is a pygtk or gtk bug. Any idea would be appreciated to fix it: Python 2.2.2 (#1, Feb 24 2003,

[pygtk] catching a window resizew event in pygtk2

2003-07-01 Thread Jean-Baptiste Cazier
Sæl ! I am porting my code from gtk1 to GTk2, ie pygtk 0.6 to 1.99 (quite painful btw) I am stuck with the resizing manually of the window : everytime I resize the I want to update the drawing area it contains I used to connect to size_allocate signal in pygtk 0.6

Re: [pygtk] catching a window resizew event in pygtk2

2003-07-01 Thread Jean-Baptiste Cazier
How can I get around this problem and find my window size without calling for the size_allocate event ? Thanks Jean-Baptiste On Tue, 01 Jul 2003 15:33:56 +0800 James Henstridge [EMAIL PROTECTED] wrote: Jean-Baptiste Cazier wrote: Sæl ! I am porting my code from gtk1 to GTk2, ie

[pygtk] Lines in GtkFixed ?

2003-06-13 Thread Jean-Baptiste Cazier
Sæl ! I am trying to draw a tree (not a directory like GtkTree but more like a graph) which nodes and edges should be active (ie tootip, clickable, ...) Therefore I decided to draw them on a GtkFixed rather than a GtkDrawingArea. My nodes are buttons which are very easy to handle. However I

Re: [pygtk] Execution in background

2003-06-10 Thread Jean-Baptiste Cazier
stop ~/devel/queue $ pb.py 1 [1] 24102 ~/devel/queue $ Queue will refresh every 1 seconds refresh [1]+ Stopped pb.py 1 On Tue, 10 Jun 2003 08:52:09 -0300 Christian Reis [EMAIL PROTECTED] wrote: On Tue, Jun 10, 2003 at 09:35:33AM +, Jean-Baptiste Cazier wrote

[pygtk] Execution in background

2003-06-06 Thread Jean-Baptiste Cazier
Saell ! When I try to run my program in the background with '', it just stops. If I run it directly there is no problem, but otherwise I need to restart it manually: ~ $ devel/queue/queue.py Queue will refresh every 60 seconds ~ $ devel/queue/queue.py [2] 21046 ~ $ [2]+ Stopped

[pygtk] pygtk or py + tk ?

2003-06-05 Thread Jean-Baptiste Cazier
Sæl ! I have been designing a couple of applications on my linux box based on python + gtk and they work just fine. But porting them to any Windows system is quite a pain because GTK is not straight forward to install on those platforms However, Tcl /Tk is very easy to install on both *nix and

[pygtk] GtkPixmap in PIL

2003-02-22 Thread Jean-Baptiste Cazier
Sæl ! I created a GtkPixmap from Python 1.5, gtk 1.2 using pixmap = gtk.create_pixmap(self.area, xs, ys, -1) and I am trying to import it into a PIL image I tried Image.paste without great result so far because my GtkPixmap is not an Image Which routine should I use ? Thanks Jean-Baptiste --

[pygtk] pixbuf binding to pygtk

2002-11-27 Thread Jean-Baptiste Cazier
Sæl ! Few days ago Evgeny proposed a solution to John for saving a window based on the Pixbuf. However I am not able to reproduce the solution: pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, 0, 8, width, height) Traceback (innermost last): File stdin, line 1, in ? AttributeError: gdk I do

[pygtk] rotating text

2002-11-12 Thread Jean-Baptiste Cazier
Sæl ! I saw in the archive that drawing rotated text with python 1.5 is not straight forward. The discussed solution is based on PyFT, but I may need the other one as making a pixmap to be rotated. since this is a very common task, many must have written scipts to do so. Can anybody point me to