From e90712c9a70c7871057816e148ee715067061780 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Wed, 10 Dec 2008 23:16:29 +0000 Subject: [PATCH] copied & pasted this back in, can't work out how to revert my reversion. --- pyfpdb/GuiGraphViewer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index 7c91bde9..bd79d71d 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -233,6 +233,18 @@ class GuiGraphViewer (threading.Thread): entry.set_text(ds) win.destroy() + def exportGraph (self, widget, data): + dia_chooser = gtk.FileChooserDialog(title="Please choose the directory you wish to export to:", + action=gtk.FILE_CHOOSER_ACTION_OPEN, + buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) + + response = dia_chooser.run() + if response == gtk.RESPONSE_OK: + self.exportDir = dia_chooser.get_filename() + elif response == gtk.RESPONSE_CANCEL: + print 'Closed, no graph exported' + dia_chooser.destroy() + def __init__(self, db, settings, querylist, config, debug=True): """Constructor for GraphViewer""" self.debug=debug