From 29f7dd24beaba743519f5f13439aab15ab190475 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 9 Mar 2006 20:21:32 +0000 Subject: [PATCH] Update svn: r6120 --- gramps2/src/ArgHandler.py | 3 +-- gramps2/src/MergePeople.py | 2 +- gramps2/src/PluginMgr.py | 6 +++--- gramps2/src/PluginUtils/_ReportUtils.py | 13 +++++++++---- gramps2/src/PluginUtils/__init__.py | 6 ++++-- gramps2/src/Plugins.py | 3 +-- gramps2/src/ViewManager.py | 3 +-- gramps2/src/plugins/AncestorChart2.py | 8 ++++---- 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/gramps2/src/ArgHandler.py b/gramps2/src/ArgHandler.py index cd67a2007..e732d566a 100644 --- a/gramps2/src/ArgHandler.py +++ b/gramps2/src/ArgHandler.py @@ -47,8 +47,7 @@ import QuestionDialog import Config import RecentFiles import PluginMgr -import Report -import Tool +from PluginUtils import Report, Tool #------------------------------------------------------------------------- # diff --git a/gramps2/src/MergePeople.py b/gramps2/src/MergePeople.py index cc895aefe..28e148729 100644 --- a/gramps2/src/MergePeople.py +++ b/gramps2/src/MergePeople.py @@ -42,7 +42,7 @@ import pango # #------------------------------------------------------------------------- import RelLib -import ReportUtils +from PluginUtils import ReportUtils import Utils import NameDisplay import const diff --git a/gramps2/src/PluginMgr.py b/gramps2/src/PluginMgr.py index e1ffa2727..590708078 100644 --- a/gramps2/src/PluginMgr.py +++ b/gramps2/src/PluginMgr.py @@ -195,7 +195,7 @@ def register_tool( them as needed. """ - import Tool + from PluginUtils import Tool (junk,gui_task) = divmod(modes,2**Tool.MODE_GUI) if gui_task: _register_gui_tool(tool_class,options_class,translated_name, @@ -263,7 +263,7 @@ def register_report( The low-level functions (starting with '_') should not be used on their own. Instead, this function will call them as needed. """ - import Report + from PluginUtils import Report (junk,standalone_task) = divmod(modes,2**Report.MODE_GUI) if standalone_task: _register_standalone(report_class,options_class,translated_name, @@ -292,7 +292,7 @@ def _register_standalone(report_class, options_class, translated_name, ): """Register a report with the plugin system""" - import Report + from PluginUtils import Report del_index = -1 for i in range(0,len(report_list)): diff --git a/gramps2/src/PluginUtils/_ReportUtils.py b/gramps2/src/PluginUtils/_ReportUtils.py index 0ba68da45..0e003f9f7 100644 --- a/gramps2/src/PluginUtils/_ReportUtils.py +++ b/gramps2/src/PluginUtils/_ReportUtils.py @@ -25,6 +25,15 @@ A collection of utilities to aid in the generation of reports. """ +#------------------------------------------------------------------------- +# +# Standard Python modules +# +#------------------------------------------------------------------------- +import time +import os +from gettext import gettext as _ + #------------------------------------------------------------------------ # # GRAMPS modules @@ -33,11 +42,7 @@ A collection of utilities to aid in the generation of reports. import DateHandler import RelLib from NameDisplay import displayer as _nd -import DateHandler from QuestionDialog import WarningDialog -import time -import os -from gettext import gettext as _ #------------------------------------------------------------------------ # diff --git a/gramps2/src/PluginUtils/__init__.py b/gramps2/src/PluginUtils/__init__.py index f930247a9..6c10aed7c 100644 --- a/gramps2/src/PluginUtils/__init__.py +++ b/gramps2/src/PluginUtils/__init__.py @@ -20,5 +20,7 @@ # $Id: Report.py 6044 2006-03-03 00:10:52Z rshura $ -import Report -import Tool +import _Report as Report +import _ReportOptions as ReportOptions +import _ReportUtils as ReportUtils +import _Tool as Tool diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index e99c4513b..5527ecaf1 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -57,8 +57,7 @@ import const import Utils import Config import Errors -import Report -import Tool +from PluginUtils import Report, Tool import PluginMgr import GrampsDisplay import DisplayState diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 87ce114d9..409ced275 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -66,8 +66,7 @@ import TipOfDay import Bookmarks import RecentFiles import NameDisplay -import Tool -import Report +from PluginUtils import Report, Tool import Mime import Config import GrampsWidgets diff --git a/gramps2/src/plugins/AncestorChart2.py b/gramps2/src/plugins/AncestorChart2.py index cdd506384..d542f6151 100644 --- a/gramps2/src/plugins/AncestorChart2.py +++ b/gramps2/src/plugins/AncestorChart2.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 from SubstKeywords import SubstKeywords -from ReportUtils import pt2cm, cm2pt -import ReportOptions +pt2cm = ReportUtils.pt2cm +cm2pt = ReportUtils.cm2pt #------------------------------------------------------------------------ #