Gtk.Notebook problem in PyGTK 2.6

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Gtk.Notebook problem in PyGTK 2.6

dimitri pater - serpia
Hello,
I upgraded to PyGTK 2.6 from 2.4 . Now, when I switch from page 2 on a Gtk.Notebook back to page 1, page 1 still shows some elements from page 2 (it is not refreshed, just some parts). Both pages contain graphs created with Matplotlib. I never had problems like this with 2.4...
Any clues somebody? If necessary, I will attach the source files.

Best regards,
Dimitri


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: Gtk.Notebook problem in PyGTK 2.6

John Gill
I think this might be a matplotlib issue.

I've been having some refresh issues with matplotlib since switching to 2.6.  In particular I've noticed that if I put my mouse over the toolbar and let a tooltip pop up the canvas does not get repainted.

Up to now I'd been assuming this problem was isolated to me (I use ratpoison as a window manager, which can confuse some apps).

I've cc'ed the matplotlib list in case anyone can throw some light on this.

John

dimitri pater wrote:
Hello,
I upgraded to PyGTK 2.6 from 2.4 . Now, when I switch from page 2 on a Gtk.Notebook back to page 1, page 1 still shows some elements from page 2 (it is not refreshed, just some parts). Both pages contain graphs created with Matplotlib. I never had problems like this with 2.4...
Any clues somebody? If necessary, I will attach the source files.

Best regards,
Dimitri


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

_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: Gtk.Notebook problem in PyGTK 2.6

dimitri pater - serpia
Yes, this could could very well be a matplotlib issue. I will try to do some tests, thanks for cc'ing it to the matplotlib list.

Dimitri

On 5/31/05, John Gill <[hidden email]> wrote:
I think this might be a matplotlib issue.

I've been having some refresh issues with matplotlib since switching to 2.6.  In particular I've noticed that if I put my mouse over the toolbar and let a tooltip pop up the canvas does not get repainted.

Up to now I'd been assuming this problem was isolated to me (I use ratpoison as a window manager, which can confuse some apps).

I've cc'ed the matplotlib list in case anyone can throw some light on this.

John

dimitri pater wrote:
Hello,
I upgraded to PyGTK 2.6 from 2.4 . Now, when I switch from page 2 on a Gtk.Notebook back to page 1, page 1 still shows some elements from page 2 (it is not refreshed, just some parts). Both pages contain graphs created with Matplotlib. I never had problems like this with 2.4...
Any clues somebody? If necessary, I will attach the source files.

Best regards,
Dimitri



_______________________________________________
pygtk mailing list [hidden email]
<a href="http://www.daa.com.au/mailman/listinfo/pygtk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: <a href="http://www.async.com.br/faq/pygtk/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.async.com.br/faq/pygtk/



--
Please visit dimitri's website: www.serpia.com
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Re: Gtk.Notebook problem in PyGTK 2.6

dimitri pater - serpia
I made a small test app which clearly shows that Matplotlib 0.8 and PyGTK 2.6 don't work well together. No problem in PyGTK 2.4

bye,
Dimtiri

On 6/1/05, N. Volbers <[hidden email]> wrote:
dimitri pater schrieb:

> Yes, this could could very well be a matplotlib issue. I will try to
> do some tests, thanks for cc'ing it to the matplotlib list.
>
> Dimitri
>
> On 5/31/05, *John Gill* < [hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I think this might be a matplotlib issue.
>
>     I've been having some refresh issues with matplotlib since
>     switching to 2.6.  In particular I've noticed that if I put my
>     mouse over the toolbar and let a tooltip pop up the canvas does
>     not get repainted.
>
>     Up to now I'd been assuming this problem was isolated to me (I use
>     ratpoison as a window manager, which can confuse some apps).
>
>     I've cc'ed the matplotlib list in case anyone can throw some light
>     on this.
>
>     John
>
>     dimitri pater wrote:
>
>>     Hello,
>>     I upgraded to PyGTK 2.6 from 2.4 . Now, when I switch from page 2
>>     on a Gtk.Notebook back to page 1, page 1 still shows some
>>     elements from page 2 (it is not refreshed, just some parts). Both
>>     pages contain graphs created with Matplotlib. I never had
>>     problems like this with 2.4...
>>     Any clues somebody? If necessary, I will attach the source files.
>>
>>     Best regards,
>>     Dimitri
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>pygtk mailing list
>>[hidden email] <mailto:[hidden email]>
>>http://www.daa.com.au/mailman/listinfo/pygtk
>>Read the PyGTK FAQ:
>>http://www.async.com.br/faq/pygtk/
>>
>>
>
>
>
> --
> Please visit dimitri's website: www.serpia.com <http://www.serpia.com>

I can confirm this (mis)behaviour with matplotlib 0.80 and gtk+/pygtk
2.6.  I had wanted to look into this matter, but didn't yet have time to
do it.  A simple guess would be that the expose-event is not handled
properly by the GTK backend.

I noticed the problem when I put a menu-bar over a matplotlib GTK
Canvas.  When you leave an opened menu, the menu will not disappear.

Niklas.








--
Please visit dimitri's website: www.serpia.com
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

testMPL-GTK.py (2K) Download Attachment
project1.glade (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Re: Gtk.Notebook problem in PyGTK 2.6

Steven Chaplin
In reply to this post by dimitri pater - serpia
On Wed, 2005-06-01 at 05:12 -0700, matplotlib-users-
[hidden email] wrote:
> > I made a small test app which clearly shows that Matplotlib 0.8 and
> > PyGTK 2.6 don't work well together. No problem in PyGTK 2.4
> >
> > bye,
> > Dimtiri

I have problems with it in PyGTK 2.4

$ python testMPL-GTK.py
(testMPL-GTK.py:12685): libglade-WARNING **: unknown property
`focus_on_map' for class `GtkWindow'

(testMPL-GTK.py:12685): libglade-WARNING **: unknown property
`ellipsize' for class `GtkLabel'
...

I then click on the 'graph' Tab and the 'make graph!' button and get:
Traceback (most recent call last):
  File "testMPL-GTK.py", line 55, in createProjectGraph
    p1 = self.axis.bar(ind, int(age), width, color='r')
ValueError: invalid literal for int():


Do you think this is a gtk.Notebook problem or a matplotlib
FigureCanvasGTK widget problem?
If its a FigureCanvasGTK problem then you should be able to forget about
the gtk.Notebook and run
matplotlib/examples/embedding_in_gtk.py, or
matplotlib/examples/embedding_in_gtk2.py and demonstrate the problem.

Try running embedding_in_gtk.py and moving another window partly in
front of it, then click the embedding_in_gtk window to bring it back on
top - does the window get redrawn?

I can verify that on PyGTK 2.4 on Linux it works fine.
Could you test it on PyGTK 2.6, and also report the operating system you
are using.

Steve

Send instant messages to your online friends http://au.messenger.yahoo.com 
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Re: Gtk.Notebook problem in PyGTK 2.6

John Hunter-8
>>>>> "Steve" == Steve Chaplin <[hidden email]> writes:

    Steve> Try running embedding_in_gtk.py and moving another window
    Steve> partly in front of it, then click the embedding_in_gtk
    Steve> window to bring it back on top - does the window get
    Steve> redrawn?

    Steve> I can verify that on PyGTK 2.4 on Linux it works fine.
    Steve> Could you test it on PyGTK 2.6, and also report the
    Steve> operating system you are using.

I get the problem in Ubuntu Hoary Hedgehog ( 2.16.10 I think), with a
normal mpl pylab figure in GTKAgg.  It is hard to see with normal
figure sizes, because the tooltips by default appear below the toolbar
and thus do not occlude the FigureCanvas, but if you resize the figure
so that it takes up the entire vertical extent of the desktop, and
then hover over the toolbar, the tooltips will occlude the canvas and
will expose the bug -- no pun intended :-)  The basic problem is that
the area occluded by the tooltip is not redrawn when, for example, you
hover over a different toolbar button.

JDH
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Re: Gtk.Notebook problem in PyGTK 2.6

dimitri pater - serpia
In reply to this post by Steven Chaplin

I then click on the 'graph' Tab and the 'make graph!' button and get:
Traceback (most recent call last):
  File "testMPL-GTK.py", line 55, in createProjectGraph
    p1 = self.axis.bar(ind, int(age), width, color='r')
ValueError: invalid literal for int():

You should enter two  values before creating the graph (use the two text entries located above the button)
It should work then
(remember, this only a test app)
Thnaks for trying,
Dimitri


_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Gtk.Notebook problem in PyGTK 2.6

John Hunter-8
In reply to this post by John Hunter-8
>>>>> "Steve" == Steve Chaplin <[hidden email]> writes:

    Steve> I updated backend_gtk.py in cvs to remove the DBL_BUFFER
    Steve> code - it was just an experimental feature and I do not
    Steve> think anyone had a use for it, and it was confusing the
    Steve> rest of the code.  I added the call to
    Steve> self.window.clear_area() which should solve the
    Steve> problem. Could someone using PyGTK 2.6 install from cvs and
    Steve> let me know if it works.


These changes fixed the problem for 2.6.

Thanks Steve!

JDH
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Reply | Threaded
Open this post in threaded view
|

Re: [Matplotlib-users] Gtk.Notebook problem in PyGTK 2.6

dimitri pater - serpia
Thanks to you all, this is another example how open source software  works. We tend to take it for granted now, but actually... it is amazing!

thanks,
Dimitri

On 6/3/05, John Hunter <[hidden email]> wrote:
>>>>> "Steve" == Steve Chaplin <[hidden email]> writes:

    Steve> I updated backend_gtk.py in cvs to remove the DBL_BUFFER
    Steve> code - it was just an experimental feature and I do not
    Steve> think anyone had a use for it, and it was confusing the
    Steve> rest of the code.  I added the call to
    Steve> self.window.clear_area () which should solve the
    Steve> problem. Could someone using PyGTK 2.6 install from cvs and
    Steve> let me know if it works.


These changes fixed the problem for 2.6.

Thanks Steve!

JDH


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Please visit dimitri's website: www.serpia.com
_______________________________________________
pygtk mailing list   [hidden email]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/