Skip to content

Commit bbb8abe

Browse files
author
Steve Chaplin
committed
SC 24/11/2004
svn path=/trunk/matplotlib/; revision=713
1 parent 09676a1 commit bbb8abe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/backends/backend_gtk.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ def _render_to_pixmap(self, width, height):
754754
- rendering the pixmap to save to a file (matlab.savefig)
755755
Should not be overridden
756756
"""
757-
if DEBUG: print 'backend_gtk.%s' % fn_name()
757+
if DEBUG: print 'FigureCanvasGTK.%s' % fn_name()
758758
create_pixmap = False
759759
if width > self._pixmap_width:
760760
# increase the pixmap in 10%+ (rather than 1 pixel) steps
@@ -766,7 +766,7 @@ def _render_to_pixmap(self, width, height):
766766
create_pixmap = True
767767

768768
if create_pixmap:
769-
if DEBUG: print 'backend_gtk.%s: new pixmap' % fn_name()
769+
if DEBUG: print 'FigureCanvasGTK.%s new pixmap' % fn_name()
770770
self._pixmap = gtk.gdk.Pixmap (self.window, self._pixmap_width,
771771
self._pixmap_height)
772772
self._renderer._set_pixmap (self._pixmap)
@@ -779,7 +779,7 @@ def expose_event(self, widget, event):
779779
"""Expose_event for all GTK backends
780780
Should not be overridden.
781781
"""
782-
if DEBUG: print 'backend_gtk.%s' % fn_name()
782+
if DEBUG: print 'FigureCanvasGTK.%s' % fn_name()
783783
if self._draw_pixmap and GTK_WIDGET_DRAWABLE(self):
784784
width, height = self.allocation.width, self.allocation.height
785785
self._render_to_pixmap(width, height)
@@ -893,6 +893,7 @@ class FigureManagerGTK(FigureManagerBase):
893893
894894
"""
895895
def __init__(self, canvas, num):
896+
if DEBUG: print 'FigureManagerGTK.%s' % fn_name()
896897
FigureManagerBase.__init__(self, canvas, num)
897898

898899
self.window = gtk.Window()
@@ -926,16 +927,19 @@ def destroy(*args): Gcf.destroy(num)
926927

927928

928929
def add_subplot(self, *args, **kwargs):
930+
if DEBUG: print 'FigureManagerGTK.%s' % fn_name()
929931
a = FigureManagerBase.add_subplot(self, *args, **kwargs)
930932
if self.toolbar is not None: self.toolbar.update()
931933
return a
932934

933935
def add_axes(self, rect, **kwargs):
936+
if DEBUG: print 'FigureManagerGTK.%s' % fn_name()
934937
a = FigureManagerBase.add_axes(self, rect, **kwargs)
935938
if self.toolbar is not None: self.toolbar.update()
936939
return a
937940

938941
def destroy(self, *args):
942+
if DEBUG: print 'FigureManagerGTK.%s' % fn_name()
939943
self.window.destroy()
940944
if Gcf.get_num_fig_managers()==0 and not matplotlib.is_interactive():
941945
gtk.main_quit()

0 commit comments

Comments
 (0)