From e19d519d25e67acbca20d9d4764d7db18a38285b Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Fri, 17 May 2013 15:50:42 +0000 Subject: [PATCH] 5900: reports should remember their last-used GUI output filename Requested on 6720: Reports: Translated filename by default on output (5900 is already in gramps40 and trunk, see revision 19988) svn: r22355 --- src/gen/plug/report/_options.py | 28 +++++++++++++++++++- src/gui/plug/report/_docreportdialog.py | 6 ++++- src/gui/plug/report/_graphvizreportdialog.py | 5 +++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/gen/plug/report/_options.py b/src/gen/plug/report/_options.py index 80b519b1f..778db6fd9 100644 --- a/src/gen/plug/report/_options.py +++ b/src/gen/plug/report/_options.py @@ -4,7 +4,7 @@ # Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2008,2011 Gary Burton # Copyright (C) 2010 Jakim Friant -# Copyright (C) 2011 Paul Franklin +# Copyright (C) 2011-2013 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -83,6 +83,7 @@ class OptionList(_options.OptionList): self.margins = [2.54, 2.54, 2.54, 2.54] self.format_name = None self.css_filename = None + self.output = None def set_style_name(self, style_name): """ @@ -234,6 +235,22 @@ class OptionList(_options.OptionList): """ return self.format_name + def set_output(self, output): + """ + Set the output for the OptionList. + @param output: name of the output to set. + @type output: str + """ + self.output = output + + def get_output(self): + """ + Return the output of the OptionList. + @returns: returns the output name + @rtype: str + """ + return self.output + #------------------------------------------------------------------------- # # Collection of option lists @@ -445,6 +462,9 @@ class OptionListCollection(_options.OptionListCollection): if option_list.get_style_name(): f.write('