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

Skip to content

Commit 8e25df6

Browse files
committed
added a show method for gtk fig manager
svn path=/trunk/matplotlib/; revision=3975
1 parent 1f0693b commit 8e25df6

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"""
5656
from __future__ import generators
5757

58-
NEWCONFIG = True
58+
NEWCONFIG = False
5959

6060
__version__ = '0.90.1'
6161
__revision__ = '$Revision$'

lib/matplotlib/backends/backend_gtk.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def __init__(self, canvas, num):
390390

391391
self.window = gtk.Window()
392392
self.window.set_title("Figure %d" % num)
393-
393+
394394
self.vbox = gtk.VBox()
395395
self.window.add(self.vbox)
396396
self.vbox.show()
@@ -439,7 +439,10 @@ def destroy(self, *args):
439439
gtk.main_level() >= 1:
440440
gtk.main_quit()
441441

442-
442+
def show(self):
443+
# show the figure window
444+
self.window.show()
445+
443446
def full_screen_toggle (self):
444447
self._full_screen_flag = not self._full_screen_flag
445448
if self._full_screen_flag:

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
# it. It makes very nice antialiased output and also supports alpha
2525
# blending
2626
BUILD_AGG = 1
27-
BUILD_GTKAGG = 'auto'
28-
BUILD_GTK = 'auto'
27+
BUILD_GTKAGG = 1
28+
BUILD_GTK = 1
2929

3030
# build TK GUI with Agg renderer ; requires Tkinter Python extension
3131
# and Tk includes
@@ -271,7 +271,7 @@ def add_dateutil():
271271
# packagers: set rc['numerix'] and rc['backend'] here to override the auto
272272
# defaults, eg
273273
#rc['numerix'] = numpy
274-
#rc['backend'] = GTKAgg
274+
#rc['backend'] = 'GTKAgg'
275275
if sys.platform=='win32':
276276
rc = dict(backend='TkAgg', numerix='numpy')
277277
template = file('matplotlibrc.template').read()

setupext.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343

4444
import os
4545

46+
4647
basedir = {
4748
'win32' : ['win32_static',],
48-
'linux2' : ['/usr/local', '/usr',],
49+
'linux2' : ['/usr/local', '/usr'],
4950
'linux' : ['/usr/local', '/usr',],
5051
'cygwin' : ['/usr/local', '/usr',],
5152
'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
@@ -170,6 +171,7 @@ def has_pkgconfig():
170171
if sys.platform == 'win32':
171172
has_pkgconfig.cache = False
172173
else:
174+
#print 'environ', os.environ['PKG_CONFIG_PATH']
173175
status, output = commands.getstatusoutput("pkg-config --help")
174176
has_pkgconfig.cache = (status == 0)
175177
return has_pkgconfig.cache
@@ -192,6 +194,9 @@ def get_pkgconfig(module,
192194

193195
status, output = commands.getstatusoutput(
194196
"%s %s %s" % (pkg_config_exec, flags, packages))
197+
#if packages.startswith('pygtk'):
198+
# print 'status', status, output
199+
# raise SystemExit
195200
if status == 0:
196201
for token in output.split():
197202
attr = _flags.get(token[:2], None)

0 commit comments

Comments
 (0)