diff options
author | Daniel Francis <francis@sugarlabs.org> | 2012-08-03 16:46:38 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2012-08-03 16:46:38 (GMT) |
commit | f5b4acc672730f44262bd705e8bc9715068e3a25 (patch) | |
tree | 41a4ef0e35cf8823ec17e1511aa71b5b55508140 | |
parent | bade914ec69e0efcb40e13e1b4c9e66a41052a05 (diff) |
Remove old drawable commented code
-rw-r--r-- | activity.py | 22 | ||||
-rw-r--r-- | graph.py | 5 |
2 files changed, 7 insertions, 20 deletions
diff --git a/activity.py b/activity.py index c11b25c..2f8ec2c 100644 --- a/activity.py +++ b/activity.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- # # Copyright 2012 S. Daniel Francis <francis@sugarlabs.org> # @@ -27,20 +27,6 @@ from toolbars import GraphPlotterToolbarBox class GraphPlotterActivity(activity.Activity): - #def write_file(self, file_path): - #x, y, w, h = self.graph.get_allocation() - #pix_buffer = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, w, h) - #pix_buffer.get_from_drawable(self.graph.pix_map, - #self.graph.pix_map.get_colormap(), - #0, 0, 0, 0, w, h) - #pix_buffer.save(file_path, 'png') - - def write_file(self, path): - return self.canvas.write_file(path) - - def read_file(self, path): - return self.canvas.read_file(path) - def __init__(self, handle): activity.Activity.__init__(self, handle) self.activity_button = ActivityToolbarButton(self) @@ -52,3 +38,9 @@ class GraphPlotterActivity(activity.Activity): self) self.set_canvas(self.activity_canvas) self.activity_canvas.show() + + def write_file(self, path): + return self.canvas.write_file(path) + + def read_file(self, path): + return self.canvas.read_file(path) @@ -566,7 +566,6 @@ class Graph(gtk.DrawingArea): self.context.clip() - #self.draw_drawable() def set_xmax(self, xmax): self.xmax = eval(xmax, {'__builtins__': {}}, self.safe_dict) @@ -609,10 +608,6 @@ class Graph(gtk.DrawingArea): context.set_source_surface(self.surface, 0, 0) self.draw_queue() context.paint() - - #widget.window.draw_drawable( - # widget.get_style().fg_gc[gtk.STATE_NORMAL], - # self.pix_map, x, y, x, y, w, h) return False def canvas_y(self, y): |