From bd67a5ec842620cb1066aa7fb19f4d4bd905306b Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 9 Mar 2006 20:49:29 +0000 Subject: [PATCH] * PluginUtils: Add module with Report and Tool utils. svn: r6121 --- ChangeLog | 3 + configure.in | 1 + src/Makefile.am | 6 +- src/PluginUtils/Makefile.am | 23 +++++ src/PluginUtils/_Report.py | 152 ++++++++++++++++++++++++++++- src/Plugins.py | 146 --------------------------- src/plugins/AncestorChart.py | 7 +- src/plugins/AncestorChart2.py | 2 +- src/plugins/AncestorReport.py | 6 +- src/plugins/Ancestors.py | 6 +- src/plugins/BookReport.py | 5 +- src/plugins/Calendar.py | 5 +- src/plugins/CmdRef.py | 5 +- src/plugins/CountAncestors.py | 4 +- src/plugins/CustomBookText.py | 5 +- src/plugins/DesGraph.py | 7 +- src/plugins/DescendChart.py | 8 +- src/plugins/DescendReport.py | 6 +- src/plugins/DetAncestralReport.py | 5 +- src/plugins/DetDescendantReport.py | 5 +- src/plugins/FamilyGroup.py | 3 +- src/plugins/FanChart.py | 7 +- src/plugins/FtmStyleAncestors.py | 6 +- src/plugins/FtmStyleDescendants.py | 6 +- src/plugins/GraphViz.py | 5 +- src/plugins/IndivComplete.py | 6 +- src/plugins/IndivSummary.py | 5 +- src/plugins/NavWebPage.py | 6 +- src/plugins/SimpleBookTitle.py | 5 +- src/plugins/StatisticsChart.py | 6 +- src/plugins/Summary.py | 4 +- src/plugins/TimeLine.py | 7 +- 32 files changed, 231 insertions(+), 242 deletions(-) create mode 100644 src/PluginUtils/Makefile.am diff --git a/ChangeLog b/ChangeLog index cf2eeac64..092d7d084 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-03-09 Alex Roitman + * PluginUtils: Add module with Report and Tool utils. + 2006-03-09 Don Allingham * src/const.py.in: add use_tips variable * src/PeopleModel.py: use_tips to control tool tips diff --git a/configure.in b/configure.in index a946dee85..ebad6eaf1 100644 --- a/configure.in +++ b/configure.in @@ -241,6 +241,7 @@ src/docgen/Makefile src/Models/Makefile src/Editors/Makefile src/DataViews/Makefile +src/PluginUtils/Makefile src/plugins/Makefile src/DateHandler/Makefile src/data/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index e74dbea14..79b70df3a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,6 +14,7 @@ SUBDIRS = \ TreeViews \ data \ DateHandler \ + PluginUtils \ glade \ docgen \ images \ @@ -71,7 +72,6 @@ gdir_PYTHON = \ MergePeople.py\ NameDisplay.py\ Navigation.py\ - Options.py\ PageView.py\ PaperMenu.py\ PeopleModel.py\ @@ -81,9 +81,6 @@ gdir_PYTHON = \ RecentFiles.py\ Relationship.py\ RelImage.py\ - ReportOptions.py\ - Report.py\ - ReportUtils.py\ ScratchPad.py\ SelectEvent.py\ SelectObject.py\ @@ -96,7 +93,6 @@ gdir_PYTHON = \ StyleEditor.py\ SubstKeywords.py\ TipOfDay.py\ - Tool.py\ ToolTips.py\ TransUtils.py\ TreeTips.py\ diff --git a/src/PluginUtils/Makefile.am b/src/PluginUtils/Makefile.am new file mode 100644 index 000000000..74430f097 --- /dev/null +++ b/src/PluginUtils/Makefile.am @@ -0,0 +1,23 @@ +# This is the src/PluginUtils level Makefile for Gramps +# We could use GNU make's ':=' syntax for nice wildcard use, +# but that is not necessarily portable. +# If not using GNU make, then list all .py files individually + +pkgdatadir = $(datadir)/@PACKAGE@/PluginUtils + +pkgdata_PYTHON = \ + __init__.py\ + _Options.py\ + _ReportOptions.py\ + _Report.py\ + _ReportUtils.py\ + _Tool.py + +pkgpyexecdir = @pkgpyexecdir@/PluginUtils +pkgpythondir = @pkgpythondir@/PluginUtils + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON)); diff --git a/src/PluginUtils/_Report.py b/src/PluginUtils/_Report.py index ae4dac1e5..6605a0e31 100644 --- a/src/PluginUtils/_Report.py +++ b/src/PluginUtils/_Report.py @@ -52,7 +52,6 @@ import gtk #------------------------------------------------------------------------- import const import Utils -import Plugins import PluginMgr import BaseDoc import StyleEditor @@ -1576,7 +1575,7 @@ class TextReportDialog(ReportDialog): """Build a menu of document types that are appropriate for this text report. This menu will be generated based upon whether the document requires table support, etc.""" - self.format_menu = Plugins.GrampsTextFormatComboBox() + self.format_menu = GrampsTextFormatComboBox() self.format_menu.set(self.doc_uses_tables(), self.doc_type_changed, None, active) @@ -1602,7 +1601,7 @@ class DrawReportDialog(ReportDialog): def make_doc_menu(self,active=None): """Build a menu of document types that are appropriate for this drawing report.""" - self.format_menu = Plugins.GrampsDrawFormatComboBox() + self.format_menu = GrampsDrawFormatComboBox() self.format_menu.set(False,self.doc_type_changed, None, active) @@ -1940,3 +1939,150 @@ def cl_report(database,name,category,report_class,options_class,options_str_dict MyReport.end_report() except: log.error("Failed to write report.", exc_info=True) + +#------------------------------------------------------------------------- +# +# get_text_doc_menu +# +#------------------------------------------------------------------------- +class GrampsTextFormatComboBox(gtk.ComboBox): + + def set(self,tables,callback,obj=None,active=None): + self.store = gtk.ListStore(str) + self.set_model(self.store) + cell = gtk.CellRendererText() + self.pack_start(cell,True) + self.add_attribute(cell,'text',0) + + out_pref = Config.get_output_preference() + index = 0 + PluginMgr.textdoc_list.sort() + active_index = 0 + for item in PluginMgr.textdoc_list: + if tables and item[2] == 0: + continue + name = item[0] + self.store.append(row=[name]) + #if callback: + # menuitem.connect("activate",callback) + if item[7] == active: + active_index = index + elif not active and name == out_pref: + active_index = index + index = index + 1 + self.set_active(active_index) + + def get_label(self): + return PluginMgr.textdoc_list[self.get_active()][0] + + def get_reference(self): + return PluginMgr.textdoc_list[self.get_active()][1] + + def get_paper(self): + return PluginMgr.textdoc_list[self.get_active()][3] + + def get_styles(self): + return PluginMgr.textdoc_list[self.get_active()][4] + + def get_ext(self): + return PluginMgr.textdoc_list[self.get_active()][5] + + def get_printable(self): + return PluginMgr.textdoc_list[self.get_active()][6] + + def get_clname(self): + return PluginMgr.textdoc_list[self.get_active()][7] + +class GrampsDrawFormatComboBox(gtk.ComboBox): + + def set(self,tables,callback,obj=None,active=None): + self.store = gtk.ListStore(str) + self.set_model(self.store) + cell = gtk.CellRendererText() + self.pack_start(cell,True) + self.add_attribute(cell,'text',0) + + out_pref = Config.get_output_preference() + index = 0 + PluginMgr.drawdoc_list.sort() + active_index = 0 + for item in PluginMgr.drawdoc_list: + if tables and item[2] == 0: + continue + name = item[0] + self.store.append(row=[name]) + #if callback: + # menuitem.connect("activate",callback) + if item[6] == active: + active_index = index + elif not active and name == out_pref: + active_index = index + index = index + 1 + self.set_active(active_index) + + def get_reference(self): + return PluginMgr.drawdoc_list[self.get_active()][1] + + def get_label(self): + return PluginMgr.drawdoc_list[self.get_active()][0] + + def get_paper(self): + return PluginMgr.drawdoc_list[self.get_active()][2] + + def get_styles(self): + return PluginMgr.drawdoc_list[self.get_active()][3] + + def get_ext(self): + return PluginMgr.drawdoc_list[self.get_active()][4] + + def get_printable(self): + return PluginMgr.drawdoc_list[self.get_active()][5] + + def get_clname(self): + return PluginMgr.drawdoc_list[self.get_active()][6] + +class GrampsBookFormatComboBox(gtk.ComboBox): + + def set(self,tables,callback,obj=None,active=None): + self.store = gtk.ListStore(str) + self.set_model(self.store) + cell = gtk.CellRendererText() + self.pack_start(cell,True) + self.add_attribute(cell,'text',0) + + out_pref = Config.get_output_preference() + index = 0 + PluginMgr.drawdoc_list.sort() + active_index = 0 + self.data = [] + for item in PluginMgr.bookdoc_list: + if tables and item[2] == 0: + continue + self.data.append(item) + name = item[0] + self.store.append(row=[name]) + if item[7] == active: + active_index = index + elif not active and name == out_pref: + active_index = index + index += 1 + self.set_active(active_index) + + def get_reference(self): + return self.data[self.get_active()][1] + + def get_label(self): + return self.data[self.get_active()][0] + + def get_paper(self): + return self.data[self.get_active()][3] + + def get_ext(self): + return self.data[self.get_active()][5] + + def get_printable(self): + return self.data[self.get_active()][6] + + def get_clname(self): + return self.data[self.get_active()][7] + diff --git a/src/Plugins.py b/src/Plugins.py index 5527ecaf1..4497947fb 100644 --- a/src/Plugins.py +++ b/src/Plugins.py @@ -447,152 +447,6 @@ def build_plugin_menu(item_list,categories,func,top_menu,callback): def by_menu_name(a,b): return cmp(a[2],b[2]) -#------------------------------------------------------------------------- -# -# get_text_doc_menu -# -#------------------------------------------------------------------------- -class GrampsTextFormatComboBox(gtk.ComboBox): - - def set(self,tables,callback,obj=None,active=None): - self.store = gtk.ListStore(str) - self.set_model(self.store) - cell = gtk.CellRendererText() - self.pack_start(cell,True) - self.add_attribute(cell,'text',0) - - out_pref = Config.get_output_preference() - index = 0 - PluginMgr.textdoc_list.sort() - active_index = 0 - for item in PluginMgr.textdoc_list: - if tables and item[2] == 0: - continue - name = item[0] - self.store.append(row=[name]) - #if callback: - # menuitem.connect("activate",callback) - if item[7] == active: - active_index = index - elif not active and name == out_pref: - active_index = index - index = index + 1 - self.set_active(active_index) - - def get_label(self): - return PluginMgr.textdoc_list[self.get_active()][0] - - def get_reference(self): - return PluginMgr.textdoc_list[self.get_active()][1] - - def get_paper(self): - return PluginMgr.textdoc_list[self.get_active()][3] - - def get_styles(self): - return PluginMgr.textdoc_list[self.get_active()][4] - - def get_ext(self): - return PluginMgr.textdoc_list[self.get_active()][5] - - def get_printable(self): - return PluginMgr.textdoc_list[self.get_active()][6] - - def get_clname(self): - return PluginMgr.textdoc_list[self.get_active()][7] - -class GrampsDrawFormatComboBox(gtk.ComboBox): - - def set(self,tables,callback,obj=None,active=None): - self.store = gtk.ListStore(str) - self.set_model(self.store) - cell = gtk.CellRendererText() - self.pack_start(cell,True) - self.add_attribute(cell,'text',0) - - out_pref = Config.get_output_preference() - index = 0 - PluginMgr.drawdoc_list.sort() - active_index = 0 - for item in PluginMgr.drawdoc_list: - if tables and item[2] == 0: - continue - name = item[0] - self.store.append(row=[name]) - #if callback: - # menuitem.connect("activate",callback) - if item[6] == active: - active_index = index - elif not active and name == out_pref: - active_index = index - index = index + 1 - self.set_active(active_index) - - def get_reference(self): - return PluginMgr.drawdoc_list[self.get_active()][1] - - def get_label(self): - return PluginMgr.drawdoc_list[self.get_active()][0] - - def get_paper(self): - return PluginMgr.drawdoc_list[self.get_active()][2] - - def get_styles(self): - return PluginMgr.drawdoc_list[self.get_active()][3] - - def get_ext(self): - return PluginMgr.drawdoc_list[self.get_active()][4] - - def get_printable(self): - return PluginMgr.drawdoc_list[self.get_active()][5] - - def get_clname(self): - return PluginMgr.drawdoc_list[self.get_active()][6] - -class GrampsBookFormatComboBox(gtk.ComboBox): - - def set(self,tables,callback,obj=None,active=None): - self.store = gtk.ListStore(str) - self.set_model(self.store) - cell = gtk.CellRendererText() - self.pack_start(cell,True) - self.add_attribute(cell,'text',0) - - out_pref = Config.get_output_preference() - index = 0 - PluginMgr.drawdoc_list.sort() - active_index = 0 - self.data = [] - for item in PluginMgr.bookdoc_list: - if tables and item[2] == 0: - continue - self.data.append(item) - name = item[0] - self.store.append(row=[name]) - if item[7] == active: - active_index = index - elif not active and name == out_pref: - active_index = index - index += 1 - self.set_active(active_index) - - def get_reference(self): - return self.data[self.get_active()][1] - - def get_label(self): - return self.data[self.get_active()][0] - - def get_paper(self): - return self.data[self.get_active()][3] - - def get_ext(self): - return self.data[self.get_active()][5] - - def get_printable(self): - return self.data[self.get_active()][6] - - def get_clname(self): - return self.data[self.get_active()][7] - #------------------------------------------------------------------------- # # Reload plugins diff --git a/src/plugins/AncestorChart.py b/src/plugins/AncestorChart.py index 59f00486b..6ada15abc 100644 --- a/src/plugins/AncestorChart.py +++ b/src/plugins/AncestorChart.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -42,10 +42,9 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -import Report +from PluginUtils import Report, ReportOptions, ReportUtils from SubstKeywords import SubstKeywords -from ReportUtils import pt2cm -import ReportOptions +pt2cm = ReportUtils.pt2cm #------------------------------------------------------------------------ # diff --git a/src/plugins/AncestorChart2.py b/src/plugins/AncestorChart2.py index d542f6151..4c154cea4 100644 --- a/src/plugins/AncestorChart2.py +++ b/src/plugins/AncestorChart2.py @@ -43,8 +43,8 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -from PluginUtils import Report, ReportOptions, ReportUtils from SubstKeywords import SubstKeywords +from PluginUtils import Report, ReportOptions, ReportUtils pt2cm = ReportUtils.pt2cm cm2pt = ReportUtils.cm2pt diff --git a/src/plugins/AncestorReport.py b/src/plugins/AncestorReport.py index e5f517808..c8ebd4846 100644 --- a/src/plugins/AncestorReport.py +++ b/src/plugins/AncestorReport.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -35,12 +35,10 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -import Report -import ReportUtils +from PluginUtils import Report, ReportUtils, ReportOptions import BaseDoc import Errors import NameDisplay -import ReportOptions #------------------------------------------------------------------------ # diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index f51d0fb7d..a07ea3a9b 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # Copyright (C) 2003 Tim Waugh # # This program is free software; you can redistribute it and/or modify @@ -42,12 +42,10 @@ import gtk # #------------------------------------------------------------------------ import const -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import BaseDoc import RelLib import PluginMgr -import ReportOptions -import ReportUtils from DateHandler import displayer as _dd from NameDisplay import displayer as _nd diff --git a/src/plugins/BookReport.py b/src/plugins/BookReport.py index eb19e89a8..711c73f69 100644 --- a/src/plugins/BookReport.py +++ b/src/plugins/BookReport.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -67,10 +67,9 @@ from RelLib import Person import Utils import ListModel import PluginMgr -import Report +from PluginUtils import Report, ReportOptions import BaseDoc from QuestionDialog import WarningDialog -import ReportOptions import Plugins #------------------------------------------------------------------------ diff --git a/src/plugins/Calendar.py b/src/plugins/Calendar.py index 20c52e909..26ddc73f5 100644 --- a/src/plugins/Calendar.py +++ b/src/plugins/Calendar.py @@ -38,11 +38,10 @@ import locale # #------------------------------------------------------------------------ import BaseDoc -import Report +from PluginUtils import Report, ReportOptions, ReportUtils +pt2cm = ReportUtils.pt2cm import GenericFilter -from ReportUtils import pt2cm from DateHandler import DateDisplay -import ReportOptions import RelLib # _days could be added to DateDisplay: diff --git a/src/plugins/CmdRef.py b/src/plugins/CmdRef.py index 6204bbb2a..c78cb86b5 100644 --- a/src/plugins/CmdRef.py +++ b/src/plugins/CmdRef.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -37,10 +37,9 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -import Tool +from PluginUtils import Tool, Report import Utils import PluginMgr -import Report #------------------------------------------------------------------------- # diff --git a/src/plugins/CountAncestors.py b/src/plugins/CountAncestors.py index 3982f326a..3bbcb7ec2 100644 --- a/src/plugins/CountAncestors.py +++ b/src/plugins/CountAncestors.py @@ -2,7 +2,7 @@ # count_anc.py - Ancestor counting plugin for gramps # # Copyright (C) 2001 Jesper Zedlitz -# Copyright (C) 2004 Donald Allingham +# Copyright (C) 2004-2006 Donald Allingham # # 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 @@ -45,7 +45,7 @@ import gtk.glade # #------------------------------------------------------------------------ import Utils -import Report +from PluginUtils import Report #------------------------------------------------------------------------ # diff --git a/src/plugins/CustomBookText.py b/src/plugins/CustomBookText.py index bc74f384f..0f57ca1bb 100644 --- a/src/plugins/CustomBookText.py +++ b/src/plugins/CustomBookText.py @@ -1,6 +1,6 @@ # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -41,9 +41,8 @@ import gtk # gramps modules # #------------------------------------------------------------------------ -import Report +from PluginUtils import Report, ReportOptions import BaseDoc -import ReportOptions #------------------------------------------------------------------------ # diff --git a/src/plugins/DesGraph.py b/src/plugins/DesGraph.py index e663863e4..771cec293 100644 --- a/src/plugins/DesGraph.py +++ b/src/plugins/DesGraph.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -41,11 +41,10 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -import Report +from PluginUtils import Report, ReportOptions, ReportUtils +pt2cm = ReportUtils.pt2cm import BaseDoc from SubstKeywords import SubstKeywords -from ReportUtils import pt2cm -import ReportOptions #------------------------------------------------------------------------ # diff --git a/src/plugins/DescendChart.py b/src/plugins/DescendChart.py index f13765b2b..6bdef37d8 100644 --- a/src/plugins/DescendChart.py +++ b/src/plugins/DescendChart.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -43,10 +43,10 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -import Report +from PluginUtils import Report, ReportOptions, ReportUtils +pt2cm = ReportUtils.pt2cm +cm2pt = ReportUtils.cm2pt from SubstKeywords import SubstKeywords -from ReportUtils import pt2cm, cm2pt -import ReportOptions import NameDisplay #------------------------------------------------------------------------ diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index 5a67e7380..8801a03f1 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -35,13 +35,11 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import BaseDoc import Errors import Sort from QuestionDialog import ErrorDialog -import ReportOptions -import ReportUtils import NameDisplay #------------------------------------------------------------------------ diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 1d54b415c..bc1cbde85 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -44,12 +44,9 @@ import gtk # #------------------------------------------------------------------------ import RelLib -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import BaseDoc -import ReportOptions import const -import ReportUtils - from QuestionDialog import ErrorDialog from DateHandler import displayer as _dd from NameDisplay import displayer as _nd diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index ae1649ed9..f61217cf6 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -45,12 +45,9 @@ import gtk #------------------------------------------------------------------------ import RelLib import Errors -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import BaseDoc -import ReportOptions -import ReportUtils import const - from DateHandler import displayer as _dd from NameDisplay import displayer as _nd from QuestionDialog import ErrorDialog diff --git a/src/plugins/FamilyGroup.py b/src/plugins/FamilyGroup.py index 5268caf6c..c3ec79da3 100644 --- a/src/plugins/FamilyGroup.py +++ b/src/plugins/FamilyGroup.py @@ -42,9 +42,8 @@ import gtk # #------------------------------------------------------------------------ import RelLib -import Report +from PluginUtils import Report, ReportOptions import BaseDoc -import ReportOptions import const import DateHandler diff --git a/src/plugins/FanChart.py b/src/plugins/FanChart.py index 4d6645a8e..cd21cca0e 100644 --- a/src/plugins/FanChart.py +++ b/src/plugins/FanChart.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -40,10 +40,9 @@ import gtk # #------------------------------------------------------------------------ import BaseDoc -import Report -import ReportOptions +from PluginUtils import Report, ReportOptions, ReportUtils from SubstKeywords import SubstKeywords -from ReportUtils import pt2cm +pt2cm = ReportUtils.pt2cm #------------------------------------------------------------------------ # diff --git a/src/plugins/FtmStyleAncestors.py b/src/plugins/FtmStyleAncestors.py index c23296f10..5a3fd11f1 100644 --- a/src/plugins/FtmStyleAncestors.py +++ b/src/plugins/FtmStyleAncestors.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -34,13 +34,11 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -import Report import BaseDoc import RelLib -import ReportOptions import DateHandler import const -import ReportUtils +from PluginUtils import Report, ReportOptions, ReportUtils #------------------------------------------------------------------------ # diff --git a/src/plugins/FtmStyleDescendants.py b/src/plugins/FtmStyleDescendants.py index 0a0a549fa..17e42cba3 100644 --- a/src/plugins/FtmStyleDescendants.py +++ b/src/plugins/FtmStyleDescendants.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -37,11 +37,9 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import BaseDoc import RelLib -import ReportUtils -import ReportOptions import DateHandler import const diff --git a/src/plugins/GraphViz.py b/src/plugins/GraphViz.py index 45baa2093..d8f438f41 100644 --- a/src/plugins/GraphViz.py +++ b/src/plugins/GraphViz.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # Contributions by Lorenzo Cappelletti # # This program is free software; you can redistribute it and/or modify @@ -52,8 +52,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -import Report -import ReportOptions +from PluginUtils import Report, ReportOptions import GenericFilter import RelLib import DateHandler diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index a283e7355..b5ccad143 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -43,11 +43,9 @@ import gtk import RelLib import const import BaseDoc -import Report -import ReportUtils import GenericFilter -import ReportOptions import DateHandler +from PluginUtils import Report, ReportOptions, ReportUtils #------------------------------------------------------------------------ # diff --git a/src/plugins/IndivSummary.py b/src/plugins/IndivSummary.py index 76db6cd68..bff9c3eb5 100644 --- a/src/plugins/IndivSummary.py +++ b/src/plugins/IndivSummary.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -45,8 +45,7 @@ import gtk import RelLib import const import BaseDoc -import Report -import ReportOptions +from PluginUtils import Report, ReportOptions import DateHandler #------------------------------------------------------------------------ diff --git a/src/plugins/NavWebPage.py b/src/plugins/NavWebPage.py index 7b37a42b8..3b0222157 100644 --- a/src/plugins/NavWebPage.py +++ b/src/plugins/NavWebPage.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2005 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pubilc License as published by @@ -69,11 +69,9 @@ import const from GrampsCfg import get_researcher import GenericFilter import Sort -import Report +from PluginUtils import Report, ReportOptions, ReportUtils import Errors import Utils -import ReportOptions -import ReportUtils import ImgManip import GrampsLocale from QuestionDialog import ErrorDialog, WarningDialog diff --git a/src/plugins/SimpleBookTitle.py b/src/plugins/SimpleBookTitle.py index fa3e5c7fb..dfe871f4c 100644 --- a/src/plugins/SimpleBookTitle.py +++ b/src/plugins/SimpleBookTitle.py @@ -1,6 +1,6 @@ # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -41,11 +41,10 @@ import gtk # gramps modules # #------------------------------------------------------------------------ -import Report +from PluginUtils import Report, ReportOptions import BaseDoc import SelectObject import AddMedia -import ReportOptions import ImgManip #------------------------------------------------------------------------ diff --git a/src/plugins/StatisticsChart.py b/src/plugins/StatisticsChart.py index 1f771cfa0..51e00ffd6 100644 --- a/src/plugins/StatisticsChart.py +++ b/src/plugins/StatisticsChart.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -53,9 +53,7 @@ import gtk from RelLib import Person, Family # gender and report type names import BaseDoc -import Report -import ReportUtils -import ReportOptions +from PluginUtils import Report, ReportOptions, ReportUtils import GenericFilter import DateHandler from Utils import ProgressMeter diff --git a/src/plugins/Summary.py b/src/plugins/Summary.py index 981cb8c45..1bcc7f312 100644 --- a/src/plugins/Summary.py +++ b/src/plugins/Summary.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2006 Donald N. Allingham # # 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 @@ -45,7 +45,7 @@ import gtk.glade #------------------------------------------------------------------------ import Utils import RelLib -import Report +from PluginUtils import Report import DateHandler #------------------------------------------------------------------------ diff --git a/src/plugins/TimeLine.py b/src/plugins/TimeLine.py index 82a160a49..f5be1b285 100644 --- a/src/plugins/TimeLine.py +++ b/src/plugins/TimeLine.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2005 Donald N. Allingham +# Copyright (C) 2003-2006 Donald N. Allingham # # 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 @@ -44,12 +44,11 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------ -from ReportUtils import pt2cm -import Report +from PluginUtils import Report, ReportOptions, ReportUtils +pt2cm = ReportUtils.pt2cm import BaseDoc import GenericFilter import Sort -import ReportOptions from QuestionDialog import ErrorDialog #------------------------------------------------------------------------