Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfecff2

Browse files
author
Steve Chaplin
committed
SC 04/10/2004
svn path=/trunk/matplotlib/; revision=581
1 parent 823bf42 commit cfecff2

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

lib/matplotlib/backends/backend_gtk.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def show(mainloop=True):
588588

589589
#if show._needmain and mainloop:
590590
if gtk.main_level() == 0 and mainloop:
591-
if gtk.pygtk_version >= (2,3,97): gtk.main()
591+
if gtk.pygtk_version >= (2,4,0): gtk.main()
592592
else: gtk.mainloop()
593593
#show._needmain = False
594594
#show._needmain = True
@@ -610,7 +610,7 @@ def show_xvfb():
610610
manager.window.show()
611611

612612
gtk.idle_add(_quit_after_print_xvfb)
613-
if gtk.pygtk_version >= (2,3,97):
613+
if gtk.pygtk_version >= (2,4,0):
614614
gtk.main()
615615
else:
616616
gtk.mainloop()
@@ -1062,7 +1062,7 @@ def idle_draw(*args):
10621062
def _init_toolbar(self):
10631063
self.set_style(gtk.TOOLBAR_ICONS)
10641064

1065-
if gtk.pygtk_version >= (2,3,97):
1065+
if gtk.pygtk_version >= (2,4,0):
10661066
self._init_toolbar2_4()
10671067
else:
10681068
self._init_toolbar2_2()
@@ -1188,7 +1188,7 @@ def __init__(self, canvas, window=None):
11881188

11891189
self.set_style(gtk.TOOLBAR_ICONS)
11901190

1191-
if gtk.pygtk_version >= (2,3,97):
1191+
if gtk.pygtk_version >= (2,4,0):
11921192
self._create_toolitems_2_4()
11931193
self.update = self._update_2_4
11941194
self.fileselect = FileChooserDialog(title='Save the figure',
@@ -1303,7 +1303,6 @@ def _update_2_2(self):
13031303
# called by __init__() and FigureManagerGTK
13041304

13051305
self._axes = self.canvas.figure.axes
1306-
#self.set_active(range(len(self._axes))) # duplicates line below
13071306

13081307
if len(self._axes) >= 2:
13091308
# set up the axis menu
@@ -1439,7 +1438,7 @@ def get_filename_from_user(self, path=None, title=None):
14391438
return filename
14401439

14411440

1442-
if gtk.pygtk_version >= (2,3,97):
1441+
if gtk.pygtk_version >= (2,4,0):
14431442
class FileChooserDialog(gtk.FileChooserDialog):
14441443
"""GTK+ 2.4 file selector which remembers the last
14451444
file/directory selected
@@ -1481,4 +1480,4 @@ def get_filename_from_user (self, path=None, title=None):
14811480
fname = os.path.join(basedir, 'matplotlib.svg')
14821481
try: gtk.window_set_default_icon_from_file (fname)
14831482
except:
1484-
print >>sys.stderr, 'Could not load matplotlib icon:', sys.exc_info()[1]
1483+
verbose.report_error('Could not load matplotlib icon: %s' % sys.exc_info()[1])

0 commit comments

Comments
 (0)