Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/charts.py
diff options
context:
space:
mode:
Diffstat (limited to 'charts.py')
-rw-r--r--charts.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/charts.py b/charts.py
index e291d2b..35fc44a 100644
--- a/charts.py
+++ b/charts.py
@@ -32,10 +32,6 @@ CHART_IMAGE = os.path.join("/tmp", "chart.png")
class Chart(gobject.GObject):
-
- __gsignals__ = {
- 'ready': (gobject.SIGNAL_RUN_FIRST, None, [str])}
-
def __init__(self, type="vertical", width=600, height=460):
gobject.GObject.__init__(self)
@@ -119,5 +115,7 @@ class Chart(gobject.GObject):
chart.addDataset(self.dataSet)
chart.render()
+ def as_png(self):
+ # FIXME, don't use a temporal file
self.surface.write_to_png(CHART_IMAGE)
- self.emit("ready", CHART_IMAGE)
+ return CHART_IMAGE