Patch from Paul Franklin - Partial work for: 0004646: reports cannot be run from the command line in a non-GUI environment
svn: r18047
This commit is contained in:
parent
3b30d1dee6
commit
b0b919d148
@ -18,6 +18,8 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The "plug" package for handling plugins in Gramps.
|
The "plug" package for handling plugins in Gramps.
|
||||||
"""
|
"""
|
||||||
@ -39,7 +41,8 @@ from _export import ExportPlugin
|
|||||||
from _docgenplugin import DocGenPlugin
|
from _docgenplugin import DocGenPlugin
|
||||||
from _gramplet import Gramplet
|
from _gramplet import Gramplet
|
||||||
from utils import *
|
from utils import *
|
||||||
from gen.plug._options import Options, OptionListCollection, OptionList, OptionHandler
|
from _options import (Options, OptionListCollection, OptionList,
|
||||||
|
OptionHandler, MenuOptions)
|
||||||
|
|
||||||
__all__ = [ "docbackend", "docgen", "menu", Plugin, PluginData,
|
__all__ = [ "docbackend", "docgen", "menu", Plugin, PluginData,
|
||||||
PluginRegister, BasePluginManager,
|
PluginRegister, BasePluginManager,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2004-2005 Donald N. Allingham
|
# Copyright (C) 2004-2005 Donald N. Allingham
|
||||||
# Copyright (C) 2010 Jakim Friant
|
# Copyright (C) 2010 Jakim Friant
|
||||||
|
# Copyright (C) 2011 Paul Franklin
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -51,6 +52,7 @@ except:
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
|
import gen
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -337,7 +339,7 @@ class OptionHandler(object):
|
|||||||
bad_opts = []
|
bad_opts = []
|
||||||
for option_name, option_data in options.iteritems():
|
for option_name, option_data in options.iteritems():
|
||||||
if option_name not in self.options_dict:
|
if option_name not in self.options_dict:
|
||||||
print "Option %s is present in the %s but is not known "\
|
print "Option '%s' is present in %s but is not known "\
|
||||||
"to the module." % (option_name,
|
"to the module." % (option_name,
|
||||||
self.option_list_collection.filename)
|
self.option_list_collection.filename)
|
||||||
print "Ignoring..."
|
print "Ignoring..."
|
||||||
@ -441,17 +443,11 @@ class Options(object):
|
|||||||
"""
|
"""
|
||||||
self.handler = OptionHandler(self.name,self.options_dict,self.person_id)
|
self.handler = OptionHandler(self.name,self.options_dict,self.person_id)
|
||||||
|
|
||||||
def add_user_options(self,dialog):
|
def add_user_options(self):
|
||||||
"""
|
"""
|
||||||
Set up UI controls (widgets) for the options specific for this modul.
|
Set up UI controls (widgets) for the options specific for this modul.
|
||||||
|
|
||||||
This method MUST be overridden by modules that define new options.
|
This method MUST be overridden by modules that define new options.
|
||||||
The single argument 'dialog' is the Report.ReportDialog instance.
|
|
||||||
Any attribute of the dialog is available.
|
|
||||||
|
|
||||||
After the widgets are defined, they MUST be added to the dialog
|
|
||||||
using the following call:
|
|
||||||
dialog.add_options(LABEL,widget)
|
|
||||||
|
|
||||||
NOTE: To really have any effect besides looking pretty, each widget
|
NOTE: To really have any effect besides looking pretty, each widget
|
||||||
set up here must be also parsed in the parse_user_options()
|
set up here must be also parsed in the parse_user_options()
|
||||||
@ -459,13 +455,11 @@ class Options(object):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def parse_user_options(self,dialog):
|
def parse_user_options(self):
|
||||||
"""
|
"""
|
||||||
Parses UI controls (widgets) for the options specific for this module.
|
Parses UI controls (widgets) for the options specific for this module.
|
||||||
|
|
||||||
This method MUST be overridden by modules that define new options.
|
This method MUST be overridden by modules that define new options.
|
||||||
The single argument 'dialog' is the Report.ReportDialog instance.
|
|
||||||
Any attribute of the dialog is available.
|
|
||||||
|
|
||||||
After obtaining values from the widgets, they MUST be used to set the
|
After obtaining values from the widgets, they MUST be used to set the
|
||||||
appropriate options_dict values. Otherwise the values will not have
|
appropriate options_dict values. Otherwise the values will not have
|
||||||
@ -475,3 +469,72 @@ class Options(object):
|
|||||||
in the add_user_options() method above.
|
in the add_user_options() method above.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# MenuOptions class
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
class MenuOptions(object):
|
||||||
|
"""
|
||||||
|
Introduction
|
||||||
|
============
|
||||||
|
A MenuOptions is used to implement the necessary functions for adding
|
||||||
|
options to a menu.
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self.menu = gen.plug.menu.Menu()
|
||||||
|
|
||||||
|
# Fill options_dict with report/tool defaults:
|
||||||
|
self.options_dict = {}
|
||||||
|
self.options_help = {}
|
||||||
|
self.add_menu_options(self.menu)
|
||||||
|
for name in self.menu.get_all_option_names():
|
||||||
|
option = self.menu.get_option_by_name(name)
|
||||||
|
self.options_dict[name] = option.get_value()
|
||||||
|
self.options_help[name] = [ "", option.get_help() ]
|
||||||
|
|
||||||
|
def make_default_style(self, default_style):
|
||||||
|
"""
|
||||||
|
This function is currently required by some reports.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def add_menu_options(self, menu):
|
||||||
|
"""
|
||||||
|
Add the user defined options to the menu.
|
||||||
|
|
||||||
|
@param menu: A menu class for the options to belong to.
|
||||||
|
@type menu: Menu
|
||||||
|
@return: nothing
|
||||||
|
"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def add_menu_option(self, category, name, option):
|
||||||
|
"""
|
||||||
|
Add a single option to the menu.
|
||||||
|
"""
|
||||||
|
self.menu.add_option(category, name, option)
|
||||||
|
self.options_dict[name] = option.get_value()
|
||||||
|
self.options_help[name] = [ "", option.get_help() ]
|
||||||
|
|
||||||
|
def add_user_options(self):
|
||||||
|
"""
|
||||||
|
Generic method to add user options to the menu.
|
||||||
|
"""
|
||||||
|
for category in self.menu.get_categories():
|
||||||
|
for name in self.menu.get_option_names(category):
|
||||||
|
option = self.menu.get_option(category, name)
|
||||||
|
|
||||||
|
# override option default with xml-saved value:
|
||||||
|
if name in self.options_dict:
|
||||||
|
option.set_value(self.options_dict[name])
|
||||||
|
|
||||||
|
def parse_user_options(self):
|
||||||
|
"""
|
||||||
|
Load the changed values into the saved options.
|
||||||
|
"""
|
||||||
|
for name in self.menu.get_all_option_names():
|
||||||
|
option = self.menu.get_option_by_name(name)
|
||||||
|
self.options_dict[name] = option.get_value()
|
||||||
|
|
||||||
|
@ -32,3 +32,4 @@ from _reportbase import Report
|
|||||||
|
|
||||||
from _bibliography import Bibliography, Citation
|
from _bibliography import Bibliography, Citation
|
||||||
|
|
||||||
|
from _options import MenuReportOptions
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||||
# Copyright (C) 2008,2011 Gary Burton
|
# Copyright (C) 2008,2011 Gary Burton
|
||||||
# Copyright (C) 2010 Jakim Friant
|
# Copyright (C) 2010 Jakim Friant
|
||||||
|
# Copyright (C) 2011 Paul Franklin
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -53,12 +54,14 @@ except:
|
|||||||
#
|
#
|
||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
|
# (do not import anything from 'gui' as this is in 'gen')
|
||||||
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
import config
|
import config
|
||||||
from gen.plug.docgen import PAPER_PORTRAIT
|
from gen.plug.docgen import PAPER_PORTRAIT
|
||||||
from gen.plug import _options
|
from gen.plug import _options
|
||||||
from gui.plug import GuiMenuOptions
|
from gen.plug import MenuOptions
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -789,44 +792,26 @@ class ReportOptions(_options.Options):
|
|||||||
"""
|
"""
|
||||||
self.handler.output = val
|
self.handler.output = val
|
||||||
|
|
||||||
def init_selection(self, dbstate, uistate):
|
|
||||||
"""
|
|
||||||
Initialize selection options for GUI.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def save_selection(self):
|
|
||||||
"""
|
|
||||||
Move selection options to handler.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def build_selection(self):
|
|
||||||
"""
|
|
||||||
Move selection options to handler.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# MenuReportOptions
|
# MenuReportOptions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class MenuReportOptions(GuiMenuOptions, ReportOptions):
|
class MenuReportOptions(MenuOptions, ReportOptions):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
The MenuReportOptions class implements the ReportOptions
|
The MenuReportOptions class implements the ReportOptions
|
||||||
functionality in a generic way so that the user does not need to
|
functionality in a generic way so that the user does not need to
|
||||||
be concerned with the graphical representation of the options.
|
be concerned with the actual representation of the options.
|
||||||
|
|
||||||
The user should inherit the MenuReportOptions class and override the
|
The user should inherit the MenuReportOptions class and override the
|
||||||
add_menu_options function. The user can add options to the menu and the
|
add_menu_options function. The user can add options to the menu and the
|
||||||
MenuReportOptions class will worry about setting up the GUI.
|
MenuReportOptions class will worry about setting up the UI.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, name, dbase):
|
def __init__(self, name, dbase):
|
||||||
ReportOptions.__init__(self, name, dbase)
|
ReportOptions.__init__(self, name, dbase)
|
||||||
GuiMenuOptions.__init__(self)
|
MenuOptions.__init__(self)
|
||||||
|
|
||||||
def load_previous_values(self):
|
def load_previous_values(self):
|
||||||
ReportOptions.load_previous_values(self)
|
ReportOptions.load_previous_values(self)
|
||||||
|
@ -169,6 +169,10 @@ def show_settings():
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
gtkver_str = 'not found'
|
gtkver_str = 'not found'
|
||||||
pygtkver_str = 'not found'
|
pygtkver_str = 'not found'
|
||||||
|
# no DISPLAY is a RuntimeError in an older pygtk (e.g. 2.17 in Fedora 14)
|
||||||
|
except RuntimeError:
|
||||||
|
gtkver_str = 'DISPLAY not set'
|
||||||
|
pygtkver_str = 'DISPLAY not set'
|
||||||
#exept TypeError: To handle back formatting on version split
|
#exept TypeError: To handle back formatting on version split
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -333,7 +337,8 @@ def run():
|
|||||||
return error
|
return error
|
||||||
|
|
||||||
from cli.argparser import ArgParser
|
from cli.argparser import ArgParser
|
||||||
argpars = ArgParser(sys.argv)
|
argv_copy = sys.argv[:]
|
||||||
|
argpars = ArgParser(argv_copy)
|
||||||
|
|
||||||
if argpars.need_gui():
|
if argpars.need_gui():
|
||||||
#A GUI is needed, set it up
|
#A GUI is needed, set it up
|
||||||
|
@ -29,13 +29,14 @@ __date__ ="$Apr 20, 2010 3:13:24 PM$"
|
|||||||
|
|
||||||
from gui.plug import tool
|
from gui.plug import tool
|
||||||
|
|
||||||
from _guioptions import GuiMenuOptions, make_gui_option
|
from _guioptions import make_gui_option, add_gui_options
|
||||||
|
from gen.plug import MenuOptions
|
||||||
|
|
||||||
from _dialogs import ReportPluginDialog, ToolPluginDialog
|
from _dialogs import ReportPluginDialog, ToolPluginDialog
|
||||||
import _windows as PluginWindows
|
import _windows as PluginWindows
|
||||||
|
|
||||||
# This needs to go above Tool and MenuOption as it needs both
|
# This needs to go above Tool and MenuOption as it needs both
|
||||||
class MenuToolOptions(GuiMenuOptions, tool.ToolOptions):
|
class MenuToolOptions(MenuOptions, tool.ToolOptions):
|
||||||
"""
|
"""
|
||||||
The MenuToolOptions class implements the ToolOptions
|
The MenuToolOptions class implements the ToolOptions
|
||||||
functionality in a generic way so that the user does not need to
|
functionality in a generic way so that the user does not need to
|
||||||
@ -47,4 +48,4 @@ class MenuToolOptions(GuiMenuOptions, tool.ToolOptions):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, name, person_id=None, dbstate=None):
|
def __init__(self, name, person_id=None, dbstate=None):
|
||||||
tool.ToolOptions.__init__(self, name, person_id)
|
tool.ToolOptions.__init__(self, name, person_id)
|
||||||
GuiMenuOptions.__init__(self)
|
MenuOptions.__init__(self)
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
# Copyright (C) 2009 Nick Hall
|
# Copyright (C) 2009 Nick Hall
|
||||||
# Copyright (C) 2010 Jakim Friant
|
# Copyright (C) 2010 Jakim Friant
|
||||||
# Copyright (C) 2011 Adam Stein <adam@csh.rit.edu>
|
# Copyright (C) 2011 Adam Stein <adam@csh.rit.edu>
|
||||||
|
# Copyright (C) 2011 Paul Franklin
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -1849,102 +1850,6 @@ class GuiBooleanListOption(gtk.HBox):
|
|||||||
self.__option.disconnect(self.valuekey)
|
self.__option.disconnect(self.valuekey)
|
||||||
self.__option = None
|
self.__option = None
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# GuiMenuOptions class
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
class GuiMenuOptions(object):
|
|
||||||
"""
|
|
||||||
Introduction
|
|
||||||
============
|
|
||||||
A GuiMenuOptions is used to implement the necessary functions for adding
|
|
||||||
options to a GTK dialog.
|
|
||||||
"""
|
|
||||||
def __init__(self):
|
|
||||||
self.menu = gen.plug.menu.Menu()
|
|
||||||
|
|
||||||
# Fill options_dict with report/tool defaults:
|
|
||||||
self.options_dict = {}
|
|
||||||
self.options_help = {}
|
|
||||||
self.add_menu_options(self.menu)
|
|
||||||
for name in self.menu.get_all_option_names():
|
|
||||||
option = self.menu.get_option_by_name(name)
|
|
||||||
self.options_dict[name] = option.get_value()
|
|
||||||
self.options_help[name] = [ "", option.get_help() ]
|
|
||||||
|
|
||||||
def make_default_style(self, default_style):
|
|
||||||
"""
|
|
||||||
This function is currently required by some reports.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def add_menu_options(self, menu):
|
|
||||||
"""
|
|
||||||
Add the user defined options to the menu.
|
|
||||||
|
|
||||||
@param menu: A menu class for the options to belong to.
|
|
||||||
@type menu: Menu
|
|
||||||
@return: nothing
|
|
||||||
"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def add_menu_option(self, category, name, option):
|
|
||||||
"""
|
|
||||||
Add a single option to the menu.
|
|
||||||
"""
|
|
||||||
self.menu.add_option(category, name, option)
|
|
||||||
self.options_dict[name] = option.get_value()
|
|
||||||
self.options_help[name] = [ "", option.get_help() ]
|
|
||||||
|
|
||||||
def add_user_options(self, dialog):
|
|
||||||
"""
|
|
||||||
Generic method to add user options to the gui.
|
|
||||||
"""
|
|
||||||
for category in self.menu.get_categories():
|
|
||||||
for name in self.menu.get_option_names(category):
|
|
||||||
option = self.menu.get_option(category, name)
|
|
||||||
|
|
||||||
# override option default with xml-saved value:
|
|
||||||
if name in self.options_dict:
|
|
||||||
option.set_value(self.options_dict[name])
|
|
||||||
|
|
||||||
widget, label = make_gui_option(option, dialog.dbstate,
|
|
||||||
dialog.uistate, dialog.track)
|
|
||||||
if widget is not None:
|
|
||||||
if label:
|
|
||||||
dialog.add_frame_option(category,
|
|
||||||
option.get_label(),
|
|
||||||
widget)
|
|
||||||
else:
|
|
||||||
dialog.add_frame_option(category, "", widget)
|
|
||||||
|
|
||||||
def parse_user_options(self, dialog): # IGNORE:W0613 - dialog is unused
|
|
||||||
"""
|
|
||||||
Load the changed values into the saved options.
|
|
||||||
"""
|
|
||||||
for name in self.menu.get_all_option_names():
|
|
||||||
option = self.menu.get_option_by_name(name)
|
|
||||||
self.options_dict[name] = option.get_value()
|
|
||||||
|
|
||||||
def init_selection(self, dbstate, uistate):
|
|
||||||
"""
|
|
||||||
Initialize selection options for GUI.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def save_selection(self):
|
|
||||||
"""
|
|
||||||
Move selection options to handler.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def build_selection(self):
|
|
||||||
"""
|
|
||||||
Move selection options to handler.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
# #
|
# #
|
||||||
# Table mapping menu types to gui widgets used in make_gui_option function #
|
# Table mapping menu types to gui widgets used in make_gui_option function #
|
||||||
@ -2001,3 +1906,29 @@ def make_gui_option(option, dbstate, uistate, track):
|
|||||||
widget = widget(option, dbstate, uistate, track)
|
widget = widget(option, dbstate, uistate, track)
|
||||||
|
|
||||||
return widget, label
|
return widget, label
|
||||||
|
|
||||||
|
def add_gui_options(dialog):
|
||||||
|
"""
|
||||||
|
Stand-alone function to add user options to the GUI.
|
||||||
|
"""
|
||||||
|
if not hasattr(dialog.options, "menu"):
|
||||||
|
return
|
||||||
|
menu = dialog.options.menu
|
||||||
|
options_dict = dialog.options.options_dict
|
||||||
|
for category in menu.get_categories():
|
||||||
|
for name in menu.get_option_names(category):
|
||||||
|
option = menu.get_option(category, name)
|
||||||
|
|
||||||
|
# override option default with xml-saved value:
|
||||||
|
if name in options_dict:
|
||||||
|
option.set_value(options_dict[name])
|
||||||
|
|
||||||
|
widget, label = make_gui_option(option, dialog.dbstate,
|
||||||
|
dialog.uistate, dialog.track)
|
||||||
|
if widget is not None:
|
||||||
|
if label:
|
||||||
|
dialog.add_frame_option(category,
|
||||||
|
option.get_label(),
|
||||||
|
widget)
|
||||||
|
else:
|
||||||
|
dialog.add_frame_option(category, "", widget)
|
||||||
|
@ -8,7 +8,6 @@ pkgdata_PYTHON = \
|
|||||||
_drawreportdialog.py\
|
_drawreportdialog.py\
|
||||||
_fileentry.py\
|
_fileentry.py\
|
||||||
_graphvizreportdialog.py\
|
_graphvizreportdialog.py\
|
||||||
_options.py\
|
|
||||||
_papermenu.py\
|
_papermenu.py\
|
||||||
_reportdialog.py\
|
_reportdialog.py\
|
||||||
_stylecombobox.py\
|
_stylecombobox.py\
|
||||||
|
@ -30,6 +30,3 @@
|
|||||||
from _reportdialog import report
|
from _reportdialog import report
|
||||||
from _drawreportdialog import DrawReportDialog
|
from _drawreportdialog import DrawReportDialog
|
||||||
from _textreportdialog import TextReportDialog
|
from _textreportdialog import TextReportDialog
|
||||||
|
|
||||||
from _options import ReportOptions, MenuReportOptions
|
|
||||||
|
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
#
|
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
|
||||||
#
|
|
||||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
|
||||||
# Copyright (C) 2008 Gary Burton
|
|
||||||
# Copyright (C) 2010 Jakim Friant
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
# Written by Alex Roitman
|
|
||||||
|
|
||||||
"""
|
|
||||||
Report option handling, including saving and parsing.
|
|
||||||
"""
|
|
||||||
from gen.plug.report._options import ReportOptions
|
|
||||||
from gui.plug import GuiMenuOptions
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# MenuReportOptions
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
class MenuReportOptions(GuiMenuOptions, ReportOptions):
|
|
||||||
"""
|
|
||||||
|
|
||||||
The MenuReportOptions class implements the ReportOptions
|
|
||||||
functionality in a generic way so that the user does not need to
|
|
||||||
be concerned with the graphical representation of the options.
|
|
||||||
|
|
||||||
The user should inherit the MenuReportOptions class and override the
|
|
||||||
add_menu_options function. The user can add options to the menu and the
|
|
||||||
MenuReportOptions class will worry about setting up the GUI.
|
|
||||||
|
|
||||||
"""
|
|
||||||
def __init__(self, name, dbase):
|
|
||||||
ReportOptions.__init__(self, name, dbase)
|
|
||||||
GuiMenuOptions.__init__(self)
|
|
||||||
|
|
||||||
def load_previous_values(self):
|
|
||||||
ReportOptions.load_previous_values(self)
|
|
||||||
# Pass the loaded values to the menu options so they will be displayed
|
|
||||||
# properly.
|
|
||||||
for optname in self.options_dict:
|
|
||||||
menu_option = self.menu.get_option_by_name(optname)
|
|
||||||
if menu_option:
|
|
||||||
menu_option.set_value(self.options_dict[optname])
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
|||||||
# Copyright (C) 2001-2006 Donald N. Allingham
|
# Copyright (C) 2001-2006 Donald N. Allingham
|
||||||
# Copyright (C) 2008 Brian G. Matherly
|
# Copyright (C) 2008 Brian G. Matherly
|
||||||
# Copyright (C) 2010 Jakim Friant
|
# Copyright (C) 2010 Jakim Friant
|
||||||
|
# Copyright (C) 2011 Paul Franklin
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -51,6 +52,7 @@ from gen.ggettext import gettext as _
|
|||||||
import config
|
import config
|
||||||
import Errors
|
import Errors
|
||||||
from gui.utils import ProgressMeter, open_file_with_default_application
|
from gui.utils import ProgressMeter, open_file_with_default_application
|
||||||
|
from gui.plug import add_gui_options
|
||||||
from QuestionDialog import ErrorDialog, OptionDialog
|
from QuestionDialog import ErrorDialog, OptionDialog
|
||||||
from gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
|
from gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
|
||||||
CATEGORY_CODE, CATEGORY_WEB, CATEGORY_GRAPHVIZ,
|
CATEGORY_CODE, CATEGORY_WEB, CATEGORY_GRAPHVIZ,
|
||||||
@ -168,7 +170,6 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
self.options = option_class(self.raw_name, self.db)
|
self.options = option_class(self.raw_name, self.db)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
self.options = option_class
|
self.options = option_class
|
||||||
self.options.init_selection(self.dbstate, self.uistate)
|
|
||||||
self.options.load_previous_values()
|
self.options.load_previous_values()
|
||||||
|
|
||||||
def build_window_key(self, obj):
|
def build_window_key(self, obj):
|
||||||
@ -232,7 +233,6 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
self.window.vbox.add(self.notebook)
|
self.window.vbox.add(self.notebook)
|
||||||
|
|
||||||
self.setup_report_options_frame()
|
self.setup_report_options_frame()
|
||||||
self.setup_selection_frame()
|
|
||||||
self.setup_other_frames()
|
self.setup_other_frames()
|
||||||
self.notebook.set_current_page(0)
|
self.notebook.set_current_page(0)
|
||||||
|
|
||||||
@ -255,14 +255,14 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
It is called immediately before the window is displayed. All
|
It is called immediately before the window is displayed. All
|
||||||
calls to add_option or add_frame_option should be called in
|
calls to add_option or add_frame_option should be called in
|
||||||
this task."""
|
this task."""
|
||||||
self.options.add_user_options(self)
|
add_gui_options(self)
|
||||||
|
|
||||||
def parse_user_options(self):
|
def parse_user_options(self):
|
||||||
"""Called to allow parsing of added widgets.
|
"""Called to allow parsing of added widgets.
|
||||||
It is called when OK is pressed in a dialog.
|
It is called when OK is pressed in a dialog.
|
||||||
All custom widgets should provide a parsing code here."""
|
All custom widgets should provide a parsing code here."""
|
||||||
try:
|
try:
|
||||||
self.options.parse_user_options(self)
|
self.options.parse_user_options()
|
||||||
except:
|
except:
|
||||||
LOG.error("Failed to parse user options.", exc_info=True)
|
LOG.error("Failed to parse user options.", exc_info=True)
|
||||||
|
|
||||||
@ -371,13 +371,6 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
style = self.options.handler.get_default_stylesheet_name()
|
style = self.options.handler.get_default_stylesheet_name()
|
||||||
self.build_style_menu(style)
|
self.build_style_menu(style)
|
||||||
|
|
||||||
def setup_selection_frame(self):
|
|
||||||
widget = self.options.build_selection()
|
|
||||||
if widget:
|
|
||||||
l = gtk.Label("<b>%s</b>" % _("Selection Options"))
|
|
||||||
l.set_use_markup(True)
|
|
||||||
self.notebook.append_page(widget, l)
|
|
||||||
|
|
||||||
def setup_report_options_frame(self):
|
def setup_report_options_frame(self):
|
||||||
"""Set up the report options frame of the dialog. This
|
"""Set up the report options frame of the dialog. This
|
||||||
function relies on several report_xxx() customization
|
function relies on several report_xxx() customization
|
||||||
@ -617,7 +610,6 @@ class ReportDialog(ManagedWindow.ManagedWindow):
|
|||||||
self.parse_user_options()
|
self.parse_user_options()
|
||||||
|
|
||||||
# Save options
|
# Save options
|
||||||
self.options.save_selection()
|
|
||||||
self.options.handler.save_options()
|
self.options.handler.save_options()
|
||||||
|
|
||||||
def on_cancel(self, *obj):
|
def on_cancel(self, *obj):
|
||||||
|
@ -45,7 +45,7 @@ from gen.plug.menu import (BooleanOption, EnumeratedListOption,
|
|||||||
FilterOption, PersonOption, StringOption)
|
FilterOption, PersonOption, StringOption)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from Utils import probably_alive
|
from Utils import probably_alive
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# $Id: Ancestor2.py
|
# $Id$
|
||||||
|
|
||||||
"""Reports/Graphical Reports/Ancestor Tree"""
|
"""Reports/Graphical Reports/Ancestor Tree"""
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ from gen.plug.menu import PersonOption
|
|||||||
|
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
from gen.display.name import displayer as name_displayer
|
from gen.display.name import displayer as name_displayer
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ from gen.plug.menu import (BooleanOption, StringOption, NumberOption,
|
|||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from Utils import probably_alive
|
from Utils import probably_alive
|
||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
import GrampsLocale
|
import GrampsLocale
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
# $Id: Descend2.py
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Reports/Graphical Reports/Familial Tree
|
Reports/Graphical Reports/Familial Tree
|
||||||
@ -52,7 +52,7 @@ from gen.plug.menu import FamilyOption
|
|||||||
|
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
PT2CM = ReportUtils.pt2cm
|
PT2CM = ReportUtils.pt2cm
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
|||||||
from gen.plug.menu import EnumeratedListOption, NumberOption, PersonOption
|
from gen.plug.menu import EnumeratedListOption, NumberOption, PersonOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import config
|
import config
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -52,7 +52,7 @@ from gen.plug.menu import BooleanOption, NumberOption, EnumeratedListOption, \
|
|||||||
FilterOption, PersonOption
|
FilterOption, PersonOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import DateHandler
|
import DateHandler
|
||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ from gen.ggettext import sgettext as _
|
|||||||
from gen.plug.menu import PersonOption, FilterOption, EnumeratedListOption
|
from gen.plug.menu import PersonOption, FilterOption, EnumeratedListOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
|
||||||
FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER)
|
FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER)
|
||||||
|
@ -55,7 +55,7 @@ import ThumbNails
|
|||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.menu import (NumberOption, ColorOption, BooleanOption,
|
from gen.plug.menu import (NumberOption, ColorOption, BooleanOption,
|
||||||
EnumeratedListOption, PersonListOption,
|
EnumeratedListOption, PersonListOption,
|
||||||
SurnameColorOption)
|
SurnameColorOption)
|
||||||
|
@ -44,7 +44,7 @@ from gen.plug.menu import (PersonOption, BooleanOption, NumberOption,
|
|||||||
EnumeratedListOption)
|
EnumeratedListOption)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import DateHandler
|
import DateHandler
|
||||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ from gen.plug.menu import (BooleanOption, EnumeratedListOption, FilterOption,
|
|||||||
PersonOption, ColorOption)
|
PersonOption, ColorOption)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.display.name import displayer as name_displayer
|
from gen.display.name import displayer as name_displayer
|
||||||
import DateHandler
|
import DateHandler
|
||||||
import gen.lib
|
import gen.lib
|
||||||
|
@ -47,7 +47,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
|||||||
PARA_ALIGN_CENTER)
|
PARA_ALIGN_CENTER)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import TransUtils
|
import TransUtils
|
||||||
from libnarrate import Narrator
|
from libnarrate import Narrator
|
||||||
from libtranslate import Translator, get_language_string
|
from libtranslate import Translator, get_language_string
|
||||||
|
@ -48,7 +48,7 @@ from gen.plug.menu import (BooleanOption, StringOption, NumberOption,
|
|||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from Utils import probably_alive
|
from Utils import probably_alive
|
||||||
import GrampsLocale
|
import GrampsLocale
|
||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
|
@ -44,7 +44,7 @@ from gen.ggettext import gettext as _
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from gen.plug.menu import TextOption
|
from gen.plug.menu import TextOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (FontStyle, ParagraphStyle, FONT_SANS_SERIF,
|
from gen.plug.docgen import (FontStyle, ParagraphStyle, FONT_SANS_SERIF,
|
||||||
PARA_ALIGN_CENTER)
|
PARA_ALIGN_CENTER)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ from gen.display.name import displayer as _nd
|
|||||||
from Errors import ReportError
|
from Errors import ReportError
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import DateHandler
|
import DateHandler
|
||||||
import Sort
|
import Sort
|
||||||
from gen.utils import (get_birth_or_fallback, get_death_or_fallback,
|
from gen.utils import (get_birth_or_fallback, get_death_or_fallback,
|
||||||
|
@ -50,7 +50,7 @@ from gen.plug.menu import BooleanOption, NumberOption, PersonOption, EnumeratedL
|
|||||||
from gen.plug.report import ( Report, Bibliography )
|
from gen.plug.report import ( Report, Bibliography )
|
||||||
from gen.plug.report import endnotes
|
from gen.plug.report import endnotes
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
import DateHandler
|
import DateHandler
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
|||||||
from gen.plug.report import (Report, Bibliography)
|
from gen.plug.report import (Report, Bibliography)
|
||||||
from gen.plug.report import endnotes
|
from gen.plug.report import endnotes
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
import DateHandler
|
import DateHandler
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
|||||||
from gen.plug.menu import PersonOption
|
from gen.plug.menu import PersonOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import DateHandler
|
import DateHandler
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@ -40,7 +40,7 @@ import gen.lib
|
|||||||
from gen.plug.menu import BooleanOption, FamilyOption
|
from gen.plug.menu import BooleanOption, FamilyOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||||
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
||||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||||
|
@ -47,7 +47,7 @@ from gen.plug.menu import (BooleanOption, FilterOption, PersonOption,
|
|||||||
BooleanListOption)
|
BooleanListOption)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.report import Bibliography
|
from gen.plug.report import Bibliography
|
||||||
from gen.plug.report import endnotes as Endnotes
|
from gen.plug.report import endnotes as Endnotes
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
|
@ -45,7 +45,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
|||||||
from gen.plug.menu import NumberOption, BooleanOption, PersonOption
|
from gen.plug.menu import NumberOption, BooleanOption, PersonOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
import DateHandler
|
import DateHandler
|
||||||
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
from gen.utils import get_birth_or_fallback, get_death_or_fallback
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
|||||||
INDEX_TYPE_TOC)
|
INDEX_TYPE_TOC)
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -39,7 +39,7 @@ from gen.ggettext import gettext as _
|
|||||||
from gen.plug.menu import FilterOption, PlaceListOption, EnumeratedListOption, \
|
from gen.plug.menu import FilterOption, PlaceListOption, EnumeratedListOption, \
|
||||||
BooleanOption
|
BooleanOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
|
||||||
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
TableCellStyle, FONT_SANS_SERIF, FONT_SERIF,
|
||||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||||
|
@ -37,7 +37,7 @@ from gen.ggettext import sgettext as _
|
|||||||
from gen.plug.menu import StringOption, MediaOption, NumberOption
|
from gen.plug.menu import StringOption, MediaOption, NumberOption
|
||||||
from Utils import media_path_full
|
from Utils import media_path_full
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (FontStyle, ParagraphStyle,
|
from gen.plug.docgen import (FontStyle, ParagraphStyle,
|
||||||
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
FONT_SANS_SERIF, PARA_ALIGN_CENTER)
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ from gen.ggettext import gettext as _
|
|||||||
import gen.lib
|
import gen.lib
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||||
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||||
from Utils import media_path_full
|
from Utils import media_path_full
|
||||||
|
@ -40,7 +40,7 @@ from gen.ggettext import gettext as _
|
|||||||
from gen.plug.menu import EnumeratedListOption
|
from gen.plug.menu import EnumeratedListOption
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
|
||||||
TableStyle, TableCellStyle, FONT_SANS_SERIF,
|
TableStyle, TableCellStyle, FONT_SANS_SERIF,
|
||||||
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
|
||||||
|
@ -87,7 +87,7 @@ from gen.plug.menu import PersonOption, NumberOption, StringOption, \
|
|||||||
NoteOption, MediaOption, DestinationOption
|
NoteOption, MediaOption, DestinationOption
|
||||||
from gen.plug.report import ( Report, Bibliography)
|
from gen.plug.report import ( Report, Bibliography)
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
|
|
||||||
import Utils
|
import Utils
|
||||||
import constfunc
|
import constfunc
|
||||||
|
@ -53,7 +53,7 @@ import const
|
|||||||
import constfunc
|
import constfunc
|
||||||
from gen.plug.report import Report
|
from gen.plug.report import Report
|
||||||
from gen.plug.report import utils as ReportUtils
|
from gen.plug.report import utils as ReportUtils
|
||||||
from gui.plug.report import MenuReportOptions
|
from gen.plug.report import MenuReportOptions
|
||||||
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
|
||||||
EnumeratedListOption, FilterOption, PersonOption, \
|
EnumeratedListOption, FilterOption, PersonOption, \
|
||||||
DestinationOption, NoteOption
|
DestinationOption, NoteOption
|
||||||
|
Loading…
Reference in New Issue
Block a user