Skip to content

Commit d923135

Browse files
committed
Added save panel to cocoaagg. Sent to me by bwark@u.washington.edu.
Added setupegg.py to the manifest. svn path=/trunk/matplotlib/; revision=2097
1 parent 48bd724 commit d923135

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include API_CHANGES CHANGELOG KNOWN_BUGS INSTALL NUMARRAY_ISSUES
22
include INTERACTIVE TODO
33
include Makefile MANIFEST.in MANIFEST
44
include matplotlibrc.template matplotlibrc
5-
include __init__.py setupext.py setup.py makeswig.py
5+
include __init__.py setupext.py setup.py setupegg.py makeswig.py
66
include examples/data/*
77
include lib/matplotlib/toolkits
88
include images/*

lib/matplotlib/backends/backend_cocoaagg.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def windowShouldClose_(self, sender):
9292
return objc.YES
9393

9494
def saveFigure_(self, sender):
95-
print >>sys.stderr, 'Not Implented Yet'
95+
p = NSSavePanel.savePanel()
96+
if(p.runModal() == NSFileHandlingPanelOKButton):
97+
self.canvas.print_figure(p.filename())
9698

9799
def printFigure_(self, sender):
98100
op = NSPrintOperation.printOperationWithView_(self.plotView)

0 commit comments

Comments
 (0)