* src/Plugins.py, src/PluginMgr.py: Move to ReportUtils.

svn: r6133
This commit is contained in:
Alex Roitman 2006-03-11 01:12:06 +00:00
parent 9d086fd022
commit 6b9d4207ce
91 changed files with 321 additions and 375 deletions

View File

@ -1,3 +1,7 @@
2006-03-10 Alex Roitman <shura@gramps-project.org>
* src/Plugins.py, src/PluginMgr.py: Move to ReportUtils.
* various: use ReportUtils instead of PluginMgr.
2006-03-10 Don Allingham <don@gramps-project.org>
* src/Mime/PythonMime.py: import gtk
* src/DataViews/_FamilyList.py: family_add explict function added,

View File

@ -46,8 +46,7 @@ import Mime
import QuestionDialog
import Config
import RecentFiles
import PluginMgr
from PluginUtils import Report, Tool
from PluginUtils import Report, Tool, cl_list, cli_tool_list
#-------------------------------------------------------------------------
#
@ -595,7 +594,7 @@ class ArgHandler:
print "Report name not given. Please use name=reportname"
os._exit(1)
for item in PluginMgr.cl_list:
for item in cl_list:
if name == item[0]:
category = item[1]
report_class = item[2]
@ -611,7 +610,7 @@ class ArgHandler:
return
print "Unknown report name. Available names are:"
for item in PluginMgr.cl_list:
for item in cl_list:
print " %s" % item[0]
elif action == "tool":
try:
@ -626,7 +625,7 @@ class ArgHandler:
print "Tool name not given. Please use name=toolname"
os._exit(1)
for item in PluginMgr.cli_tool_list:
for item in cli_tool_list:
if name == item[0]:
category = item[1]
tool_class = item[2]
@ -636,7 +635,7 @@ class ArgHandler:
return
print "Unknown tool name. Available names are:"
for item in PluginMgr.cli_tool_list:
for item in cli_tool_list:
print " %s" % item[0]
else:
print "Unknown action: %s." % action

View File

@ -114,7 +114,7 @@ def register_datehandler(locales,parse_class,display_class):
# Import localized date classes
#
#-------------------------------------------------------------------------
from PluginMgr import load_plugins
from PluginUtils import load_plugins
from const import datesDir
load_plugins(datesDir)

View File

@ -52,7 +52,7 @@ import gtk
#-------------------------------------------------------------------------
import const
import Utils
import PluginMgr
from PluginUtils import export_list
import QuestionDialog
import Config
import GrampsDisplay
@ -368,4 +368,4 @@ class Exporter:
native_description,
native_config,
native_ext)]
self.exports = self.exports + [item for item in PluginMgr.export_list]
self.exports = self.exports + [item for item in export_list]

View File

@ -1368,5 +1368,5 @@ _description = _('GEDCOM is used to transfer data between genealogy programs. '
_config = (_('GEDCOM export options'),GedcomWriterOptionBox)
_filename = 'ged'
from PluginMgr import register_export
from PluginUtils import register_export
register_export(exportData,_title,_description,_config,_filename)

View File

@ -997,5 +997,5 @@ _description = _('The GRAMPS XML database is a format used by older '
_config = None
_filename = 'gramps'
from PluginMgr import register_export
from PluginUtils import register_export
register_export(exportData,_title,_description,_config,_filename)

View File

@ -75,8 +75,6 @@ gdir_PYTHON = \
PageView.py\
PaperMenu.py\
PeopleModel.py\
PluginMgr.py\
Plugins.py\
QuestionDialog.py\
RecentFiles.py\
Relationship.py\

View File

@ -11,7 +11,9 @@ pkgdata_PYTHON = \
_ReportOptions.py\
_Report.py\
_ReportUtils.py\
_Tool.py
_Tool.py\
_PluginMgr.py\
_Plugins.py
pkgpyexecdir = @pkgpyexecdir@/PluginUtils
pkgpythondir = @pkgpythondir@/PluginUtils

View File

@ -195,14 +195,14 @@ def register_tool(
them as needed.
"""
from PluginUtils import Tool
(junk,gui_task) = divmod(modes,2**Tool.MODE_GUI)
import _Tool
(junk,gui_task) = divmod(modes,2**_Tool.MODE_GUI)
if gui_task:
_register_gui_tool(tool_class,options_class,translated_name,
name,category,description,
status,author_name,author_email,unsupported)
(junk,cli_task) = divmod(modes-gui_task,2**Tool.MODE_CLI)
(junk,cli_task) = divmod(modes-gui_task,2**_Tool.MODE_CLI)
if cli_task:
_register_cli_tool(name,category,tool_class,options_class,
translated_name,unsupported)
@ -263,21 +263,21 @@ def register_report(
The low-level functions (starting with '_') should not be used
on their own. Instead, this function will call them as needed.
"""
from PluginUtils import Report
(junk,standalone_task) = divmod(modes,2**Report.MODE_GUI)
import _Report
(junk,standalone_task) = divmod(modes,2**_Report.MODE_GUI)
if standalone_task:
_register_standalone(report_class,options_class,translated_name,
name,category,description,
status,author_name,author_email,unsupported)
(junk,book_item_task) = divmod(modes-standalone_task,2**Report.MODE_BKI)
(junk,book_item_task) = divmod(modes-standalone_task,2**_Report.MODE_BKI)
if book_item_task:
book_item_category = Report.book_categories[category]
book_item_category = _Report.book_categories[category]
register_book_item(translated_name,book_item_category,
report_class,options_class,name,unsupported)
(junk,command_line_task) = divmod(modes-standalone_task-book_item_task,
2**Report.MODE_CLI)
2**_Report.MODE_CLI)
if command_line_task:
_register_cl_report(name,category,report_class,options_class,
translated_name,unsupported)

View File

@ -57,8 +57,9 @@ import const
import Utils
import Config
import Errors
from PluginUtils import Report, Tool
import PluginMgr
import _Report
import _Tool
import _PluginMgr
import GrampsDisplay
import DisplayState
@ -158,10 +159,10 @@ class PluginDialog(DisplayState.ManagedWindow):
(item_class,options_class,title,category,name) = self.item
if self.content == REPORTS:
Report.report(self.state.db,self.state.active,
_Report.report(self.state.db,self.state.active,
item_class,options_class,title,name,category)
else:
Tool.gui_tool(self.state.db,self.state.active,
_Tool.gui_tool(self.state.db,self.state.active,
item_class,options_class,title,name,category,
self.state.db.request_rebuild,self.parent)
@ -266,8 +267,8 @@ class ReportPlugins(PluginDialog):
dbstate,
uistate,
track,
PluginMgr.report_list,
Report.standalone_categories,
_PluginMgr.report_list,
_Report.standalone_categories,
_("Report Selection"),
_("Select a report from those available on the left."),
_("_Generate"), _("Generate selected report"),
@ -292,8 +293,8 @@ class ToolPlugins(PluginDialog):
dbstate,
uistate,
track,
PluginMgr.tool_list,
Tool.tool_categories,
_PluginMgr.tool_list,
_Tool.tool_categories,
_("Tool Selection"),
_("Select a tool from those available on the left."),
_("_Run"),
@ -335,16 +336,16 @@ class PluginStatus(DisplayState.ManagedWindow):
info = cStringIO.StringIO()
if len(PluginMgr.expect_list) + len(PluginMgr.failmsg_list) == 0:
if len(_PluginMgr.expect_list) + len(_PluginMgr.failmsg_list) == 0:
window.get_buffer().set_text(_('All modules were successfully loaded.'))
else:
info.write(_("The following modules could not be loaded:"))
info.write("\n\n")
for (filename,msg) in PluginMgr.expect_list:
for (filename,msg) in _PluginMgr.expect_list:
info.write("%s: %s\n\n" % (filename,msg))
for (filename,msgs) in PluginMgr.failmsg_list:
for (filename,msgs) in _PluginMgr.failmsg_list:
error = str(msgs[0])
if error[0:11] == "exceptions.":
error = error[11:]
@ -373,15 +374,15 @@ class PluginStatus(DisplayState.ManagedWindow):
#
#-------------------------------------------------------------------------
def build_tools_menu(top_menu,callback):
build_plugin_menu(PluginMgr.tool_list,
Tool.tool_categories,
Tool.gui_tool,
build_plugin_menu(_PluginMgr.tool_list,
_Tool.tool_categories,
_Tool.gui_tool,
top_menu,callback)
def build_report_menu(top_menu,callback):
build_plugin_menu(PluginMgr.report_list,
Report.standalone_categories,
Report.report,
build_plugin_menu(_PluginMgr.report_list,
_Report.standalone_categories,
_Report.report,
top_menu,callback)
def build_plugin_menu(item_list,categories,func,top_menu,callback):
@ -452,9 +453,9 @@ def by_menu_name(a,b):
# Reload plugins
#
#-------------------------------------------------------------------------
class Reload(Tool.Tool):
class Reload(_Tool.Tool):
def __init__(self,db,person,options_class,name,callback=None,parent=None):
Tool.Tool.__init__(self,db,person,options_class,name)
_Tool.Tool.__init__(self,db,person,options_class,name)
"""
Treated as a callback, causes all plugins to get reloaded.
@ -463,42 +464,42 @@ class Reload(Tool.Tool):
pymod = re.compile(r"^(.*)\.py$")
oldfailmsg = PluginMgr.failmsg_list[:]
PluginMgr.failmsg_list = []
oldfailmsg = _PluginMgr.failmsg_list[:]
_PluginMgr.failmsg_list = []
# attempt to reload all plugins that have succeeded in the past
for plugin in PluginMgr._success_list:
for plugin in _PluginMgr._success_list:
filename = os.path.basename(plugin.__file__)
filename = filename.replace('pyc','py')
filename = filename.replace('pyo','py')
try:
reload(plugin)
except:
PluginMgr.failmsg_list.append((filename,sys.exc_info()))
_PluginMgr.failmsg_list.append((filename,sys.exc_info()))
# Remove previously good plugins that are now bad
# from the registered lists
(PluginMgr.export_list,
PluginMgr.import_list,
PluginMgr.tool_list,
PluginMgr.cli_tool_list,
PluginMgr.report_list,
PluginMgr.bkitems_list,
PluginMgr.cl_list,
PluginMgr.textdoc_list,
PluginMgr.bookdoc_list,
PluginMgr.drawdoc_list) = PluginMgr.purge_failed(
PluginMgr.failmsg_list,
PluginMgr.export_list,
PluginMgr.import_list,
PluginMgr.tool_list,
PluginMgr.cli_tool_list,
PluginMgr.report_list,
PluginMgr.bkitems_list,
PluginMgr.cl_list,
PluginMgr.textdoc_list,
PluginMgr.bookdoc_list,
PluginMgr.drawdoc_list)
(_PluginMgr.export_list,
_PluginMgr.import_list,
_PluginMgr.tool_list,
_PluginMgr.cli_tool_list,
_PluginMgr.report_list,
_PluginMgr.bkitems_list,
_PluginMgr.cl_list,
_PluginMgr.textdoc_list,
_PluginMgr.bookdoc_list,
_PluginMgr.drawdoc_list) = _PluginMgr.purge_failed(
_PluginMgr.failmsg_list,
_PluginMgr.export_list,
_PluginMgr.import_list,
_PluginMgr.tool_list,
_PluginMgr.cli_tool_list,
_PluginMgr.report_list,
_PluginMgr.bkitems_list,
_PluginMgr.cl_list,
_PluginMgr.textdoc_list,
_PluginMgr.bookdoc_list,
_PluginMgr.drawdoc_list)
# attempt to load the plugins that have failed in the past
for (filename,message) in oldfailmsg:
@ -506,7 +507,7 @@ class Reload(Tool.Tool):
match = pymod.match(name[1])
if not match:
continue
PluginMgr.attempt_list.append(filename)
_PluginMgr.attempt_list.append(filename)
plugin = match.groups()[0]
try:
# For some strange reason second importing of a failed plugin
@ -514,29 +515,29 @@ class Reload(Tool.Tool):
# Looks like a bug in Python.
a = __import__(plugin)
reload(a)
PluginMgr._success_list.append(a)
_PluginMgr._success_list.append(a)
except:
PluginMgr.failmsg_list.append((filename,sys.exc_info()))
_PluginMgr.failmsg_list.append((filename,sys.exc_info()))
# attempt to load any new files found
for directory in PluginMgr.loaddir_list:
for directory in _PluginMgr.loaddir_list:
for filename in os.listdir(directory):
name = os.path.split(filename)
match = pymod.match(name[1])
if not match:
continue
if filename in PluginMgr.attempt_list:
if filename in _PluginMgr.attempt_list:
continue
PluginMgr.attempt_list.append(filename)
_PluginMgr.attempt_list.append(filename)
plugin = match.groups()[0]
try:
a = __import__(plugin)
if a not in PluginMgr._success_list:
PluginMgr._success_list.append(a)
if a not in _PluginMgr._success_list:
_PluginMgr._success_list.append(a)
except:
PluginMgr.failmsg_list.append((filename,sys.exc_info()))
_PluginMgr.failmsg_list.append((filename,sys.exc_info()))
if Config.get_pop_plugin_status() and len(PluginMgr.failmsg_list):
if Config.get_pop_plugin_status() and len(_PluginMgr.failmsg_list):
PluginStatus()
else:
global status_up
@ -547,13 +548,13 @@ class Reload(Tool.Tool):
# Re-generate tool and report menus
parent.build_plugin_menus(rebuild=True)
class ReloadOptions(Tool.ToolOptions):
class ReloadOptions(_Tool.ToolOptions):
"""
Defines options and provides handling interface.
"""
def __init__(self,name,person_id=None):
Tool.ToolOptions.__init__(self,name,person_id)
_Tool.ToolOptions.__init__(self,name,person_id)
#-------------------------------------------------------------------------
#
@ -562,12 +563,12 @@ class ReloadOptions(Tool.ToolOptions):
#-------------------------------------------------------------------------
if __debug__:
PluginMgr.register_tool(
_PluginMgr.register_tool(
name = 'reload',
category = Tool.TOOL_DEBUG,
category = _Tool.TOOL_DEBUG,
tool_class = Reload,
options_class = ReloadOptions,
modes = Tool.MODE_GUI,
modes = _Tool.MODE_GUI,
translated_name = _("Reload plugins"),
description=_("Attempt to reload plugins. "
"Note: This tool itself is not reloaded!"),

View File

@ -52,7 +52,7 @@ import gtk
#-------------------------------------------------------------------------
import const
import Utils
import PluginMgr
import _PluginMgr
import BaseDoc
from _StyleEditor import StyleListDisplay
import Config
@ -1769,27 +1769,27 @@ class CommandLineReport:
self.options_help['of'].append(os.path.expanduser("~/whatever_name"))
if self.category == CATEGORY_TEXT:
for item in PluginMgr.textdoc_list:
for item in _PluginMgr.textdoc_list:
if item[7] == self.options_dict['off']:
self.format = item[1]
self.options_help['off'].append(
[ item[7] for item in PluginMgr.textdoc_list ]
[ item[7] for item in _PluginMgr.textdoc_list ]
)
self.options_help['off'].append(False)
elif self.category == CATEGORY_DRAW:
for item in PluginMgr.drawdoc_list:
for item in _PluginMgr.drawdoc_list:
if item[6] == self.options_dict['off']:
self.format = item[1]
self.options_help['off'].append(
[ item[6] for item in PluginMgr.drawdoc_list ]
[ item[6] for item in _PluginMgr.drawdoc_list ]
)
self.options_help['off'].append(False)
elif self.category == CATEGORY_BOOK:
for item in PluginMgr.bookdoc_list:
for item in _PluginMgr.bookdoc_list:
if item[6] == self.options_dict['off']:
self.format = item[1]
self.options_help['off'].append(
[ item[6] for item in PluginMgr.bookdoc_list ]
[ item[6] for item in _PluginMgr.bookdoc_list ]
)
self.options_help['off'].append(False)
else:
@ -1956,9 +1956,9 @@ class GrampsTextFormatComboBox(gtk.ComboBox):
out_pref = Config.get_output_preference()
index = 0
PluginMgr.textdoc_list.sort()
_PluginMgr.textdoc_list.sort()
active_index = 0
for item in PluginMgr.textdoc_list:
for item in _PluginMgr.textdoc_list:
if tables and item[2] == 0:
continue
name = item[0]
@ -1973,25 +1973,25 @@ class GrampsTextFormatComboBox(gtk.ComboBox):
self.set_active(active_index)
def get_label(self):
return PluginMgr.textdoc_list[self.get_active()][0]
return _PluginMgr.textdoc_list[self.get_active()][0]
def get_reference(self):
return PluginMgr.textdoc_list[self.get_active()][1]
return _PluginMgr.textdoc_list[self.get_active()][1]
def get_paper(self):
return PluginMgr.textdoc_list[self.get_active()][3]
return _PluginMgr.textdoc_list[self.get_active()][3]
def get_styles(self):
return PluginMgr.textdoc_list[self.get_active()][4]
return _PluginMgr.textdoc_list[self.get_active()][4]
def get_ext(self):
return PluginMgr.textdoc_list[self.get_active()][5]
return _PluginMgr.textdoc_list[self.get_active()][5]
def get_printable(self):
return PluginMgr.textdoc_list[self.get_active()][6]
return _PluginMgr.textdoc_list[self.get_active()][6]
def get_clname(self):
return PluginMgr.textdoc_list[self.get_active()][7]
return _PluginMgr.textdoc_list[self.get_active()][7]
class GrampsDrawFormatComboBox(gtk.ComboBox):
@ -2004,9 +2004,9 @@ class GrampsDrawFormatComboBox(gtk.ComboBox):
out_pref = Config.get_output_preference()
index = 0
PluginMgr.drawdoc_list.sort()
_PluginMgr.drawdoc_list.sort()
active_index = 0
for item in PluginMgr.drawdoc_list:
for item in _PluginMgr.drawdoc_list:
if tables and item[2] == 0:
continue
name = item[0]
@ -2021,25 +2021,25 @@ class GrampsDrawFormatComboBox(gtk.ComboBox):
self.set_active(active_index)
def get_reference(self):
return PluginMgr.drawdoc_list[self.get_active()][1]
return _PluginMgr.drawdoc_list[self.get_active()][1]
def get_label(self):
return PluginMgr.drawdoc_list[self.get_active()][0]
return _PluginMgr.drawdoc_list[self.get_active()][0]
def get_paper(self):
return PluginMgr.drawdoc_list[self.get_active()][2]
return _PluginMgr.drawdoc_list[self.get_active()][2]
def get_styles(self):
return PluginMgr.drawdoc_list[self.get_active()][3]
return _PluginMgr.drawdoc_list[self.get_active()][3]
def get_ext(self):
return PluginMgr.drawdoc_list[self.get_active()][4]
return _PluginMgr.drawdoc_list[self.get_active()][4]
def get_printable(self):
return PluginMgr.drawdoc_list[self.get_active()][5]
return _PluginMgr.drawdoc_list[self.get_active()][5]
def get_clname(self):
return PluginMgr.drawdoc_list[self.get_active()][6]
return _PluginMgr.drawdoc_list[self.get_active()][6]
class GrampsBookFormatComboBox(gtk.ComboBox):
@ -2052,10 +2052,10 @@ class GrampsBookFormatComboBox(gtk.ComboBox):
out_pref = Config.get_output_preference()
index = 0
PluginMgr.drawdoc_list.sort()
_PluginMgr.drawdoc_list.sort()
active_index = 0
self.data = []
for item in PluginMgr.bookdoc_list:
for item in _PluginMgr.bookdoc_list:
if tables and item[2] == 0:
continue
self.data.append(item)

View File

@ -20,7 +20,16 @@
# $Id: Report.py 6044 2006-03-03 00:10:52Z rshura $
from _PluginMgr import \
register_export, register_import, \
register_tool, register_report, \
register_relcalc, relationship_class, \
textdoc_list, drawdoc_list, bookdoc_list, \
bkitems_list, cl_list, cli_tool_list, \
load_plugins
import _Report as Report
import _ReportOptions as ReportOptions
import _ReportUtils as ReportUtils
import _Tool as Tool
import _Plugins as Plugins

View File

@ -52,8 +52,6 @@ import gtk
#-------------------------------------------------------------------------
import DisplayState
import const
import PluginMgr
import Plugins
import Config
import GrampsDb
import GrampsCfg
@ -66,7 +64,9 @@ import TipOfDay
import Bookmarks
import RecentFiles
import NameDisplay
from PluginUtils import Report, Tool
from PluginUtils import Plugins, Report, Tool, \
relationship_class, load_plugins, \
import_list, tool_list, report_list
import Mime
import Config
import GrampsWidgets
@ -182,7 +182,7 @@ class ViewManager:
self.statusbar = gtk.Statusbar()
self.RelClass = PluginMgr.relationship_class
self.RelClass = relationship_class
vbox = gtk.VBox()
self.window.add(vbox)
@ -264,19 +264,19 @@ class ViewManager:
self.change_page(None,None)
self.actiongroup.set_visible(False)
self.fileactions.set_sensitive(False)
self.load_plugins()
self.do_load_plugins()
self.build_tools_menu()
self.build_report_menu()
self.fileactions.set_sensitive(True)
self.uistate.widget.set_sensitive(True)
def load_plugins(self):
def do_load_plugins(self):
self.uistate.status_text(_('Loading document formats...'))
error = PluginMgr.load_plugins(const.docgenDir)
error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/docgen"))
error = load_plugins(const.docgenDir)
error |= load_plugins(os.path.expanduser("~/.gramps/docgen"))
self.uistate.status_text(_('Loading plugins...'))
error |= PluginMgr.load_plugins(const.pluginsDir)
error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/plugins"))
error |= load_plugins(const.pluginsDir)
error |= load_plugins(os.path.expanduser("~/.gramps/plugins"))
if Config.get_pop_plugin_status() and error:
Plugins.PluginStatus(self)
self.uistate.push_message(_('Ready'))
@ -546,7 +546,7 @@ class ViewManager:
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
# Add more data type selections if opening existing db
for data in PluginMgr.import_list:
for data in import_list:
mime_filter = data[1]
mime_type = data[2]
native_format = data[2]
@ -597,7 +597,7 @@ class ViewManager:
# The above native formats did not work, so we need to
# look up the importer for this format
# and create an empty native database to import data in
# for (importData,mime_filter,mime_type,native_format,format_name) in PluginMgr.import_list:
# for (importData,mime_filter,mime_type,native_format,format_name) in import_list:
# if filetype == mime_type or the_file == mime_type:
# QuestionDialog.OkDialog(
# _("Opening non-native format"),
@ -903,7 +903,7 @@ class ViewManager:
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
# Add more data type selections if opening existing db
for data in PluginMgr.import_list:
for data in import_list:
mime_filter = data[1]
mime_type = data[2]
native_format = data[3]
@ -955,7 +955,7 @@ class ViewManager:
(the_path,the_file) = os.path.split(filename)
Config.save_last_import_dir(the_path)
for (importData,mime_filter,mime_type,
native_format,format_name) in PluginMgr.import_list:
native_format,format_name) in import_list:
if filetype == mime_type or the_file == mime_type:
self._do_import(choose,importData,filename)
return True
@ -982,7 +982,7 @@ class ViewManager:
def build_tools_menu(self):
self.toolactions = gtk.ActionGroup('ToolWindow')
(ui,actions) = self.build_plugin_menu('ToolsMenu',
PluginMgr.tool_list,
tool_list,
Tool.tool_categories,
make_tool_callback)
self.toolactions.add_actions(actions)
@ -992,7 +992,7 @@ class ViewManager:
def build_report_menu(self):
self.reportactions = gtk.ActionGroup('ReportWindow')
(ui,actions) = self.build_plugin_menu('ReportsMenu',
PluginMgr.report_list,
report_list,
Report.standalone_categories,
make_report_callback)
self.reportactions.add_actions(actions)

View File

@ -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
@ -26,21 +26,25 @@ Provides a BaseDoc based interface to the AbiWord document format.
#-------------------------------------------------------------------------
#
# Imported Modules
# Python Modules
#
#-------------------------------------------------------------------------
import base64
import os
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# Gramps Modules
#
#-------------------------------------------------------------------------
import BaseDoc
import Errors
import PluginMgr
from PluginUtils import register_text_doc
import ImgManip
import Mime
import Utils
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# Class Definitions
@ -333,6 +337,6 @@ try:
print_label=_("Open in %s") % prog[1]
else:
print_label=None
PluginMgr.register_text_doc(mtype,AbiWordDoc,1,1,1,".abw", print_label)
register_text_doc(mtype,AbiWordDoc,1,1,1,".abw", print_label)
except:
PluginMgr.register_text_doc(_('AbiWord document'),AbiWordDoc,1,1,1,".abw", None)
register_text_doc(_('AbiWord document'),AbiWordDoc,1,1,1,".abw", None)

View File

@ -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
@ -34,7 +34,7 @@ from gettext import gettext as _
#
#------------------------------------------------------------------------
import BaseDoc
import PluginMgr
from PluginUtils import register_text_doc
import Errors
import Mime
@ -391,7 +391,7 @@ try:
else:
print_label=None
PluginMgr.register_text_doc(mtype,AsciiDoc,1,1,1,".txt", print_label)
register_text_doc(mtype,AsciiDoc,1,1,1,".txt", print_label)
except:
PluginMgr.register_text_doc(_("Plain Text"),AsciiDoc,1,1,1,".txt", None)
register_text_doc(_("Plain Text"),AsciiDoc,1,1,1,".txt", None)

View File

@ -35,7 +35,7 @@ from gettext import gettext as _
# GRAMPS modules
#
#------------------------------------------------------------------------
import PluginMgr
from PluginUtils import register_text_doc
import ImgManip
import tarfile
import const
@ -506,6 +506,6 @@ try:
print_label=_("Open in %s") % prog[1]
else:
print_label=None
PluginMgr.register_text_doc(mtype,HtmlDoc,1,0,1,".html", print_label)
register_text_doc(mtype,HtmlDoc,1,0,1,".html", print_label)
except:
PluginMgr.register_text_doc(_('HTML'),HtmlDoc,1,0,1,".html", None)
register_text_doc(_('HTML'),HtmlDoc,1,0,1,".html", None)

View File

@ -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
@ -20,21 +20,34 @@
# $Id$
import BaseDoc
#------------------------------------------------------------------------
#
# Python modules
#
#------------------------------------------------------------------------
import time
import cStringIO
import gzip
import os
from gettext import gettext as _
#------------------------------------------------------------------------
#
# Gramps modules
#
#------------------------------------------------------------------------
import BaseDoc
import Errors
from TarFile import TarFile
import PluginMgr
from PluginUtils import register_text_doc
import ImgManip
import Mime
from gettext import gettext as _
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
def points(val):
inch = float(val)/2.54
return (int(inch*72))
@ -495,6 +508,6 @@ try:
print_label=_("Open in %s") % prog[1]
else:
print_label=None
PluginMgr.register_text_doc(mtype, KwordDoc, 1, 1, 1, ".kwd", print_label)
register_text_doc(mtype, KwordDoc, 1, 1, 1, ".kwd", print_label)
except:
PluginMgr.register_text_doc(_('KWord'), KwordDoc, 1, 1, 1, ".kwd", print_label)
register_text_doc(_('KWord'), KwordDoc, 1, 1, 1, ".kwd", print_label)

View File

@ -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
#
# Modifications and feature additions:
# 2002 Donald A. Peterson
@ -61,8 +61,9 @@ else:
#
#------------------------------------------------------------------------
import BaseDoc
import PluginMgr
from ReportUtils import rgb_color
from PluginUtils import ReportUtils, \
register_text_doc, register_draw_doc, register_book_doc
rgb_color = ReportUtils.rgb_color
#------------------------------------------------------------------------
#
@ -1245,7 +1246,7 @@ class LPRDoc(BaseDoc.BaseDoc):
# Register the document generator with the system
#
#------------------------------------------------------------------------
PluginMgr.register_text_doc(
register_text_doc(
name=_("Print..."),
classref=LPRDoc,
table=1,
@ -1255,7 +1256,7 @@ PluginMgr.register_text_doc(
print_report_label=None,
clname='print')
PluginMgr.register_book_doc(
register_book_doc(
_("Print..."),
LPRDoc,
1,
@ -1264,7 +1265,7 @@ PluginMgr.register_book_doc(
"",
'print')
PluginMgr.register_draw_doc(
register_draw_doc(
_("Print..."),
LPRDoc,
1,

View File

@ -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
#
# Modifications and feature additions:
# 2002-2003 Donald A. Peterson
@ -41,7 +41,7 @@ from gettext import gettext as _
#
#------------------------------------------------------------------------
import BaseDoc
import PluginMgr
from PluginUtils import register_text_doc
import ImgManip
import Errors
@ -501,7 +501,7 @@ class LaTeXDoc(BaseDoc.BaseDoc):
# Register the document generator with the system
#
#------------------------------------------------------------------------
PluginMgr.register_text_doc(
register_text_doc(
name=_("LaTeX"),
classref=LaTeXDoc,
table=1,

View File

@ -41,11 +41,12 @@ from math import pi, cos, sin, fabs
import Errors
import BaseDoc
import const
import PluginMgr
import PluginUtils import ReportUtils, \
register_text_doc, register_draw_doc, register_book_doc
pt2cm = ReportUtils.pt2cm
import ImgManip
import FontScale
import Mime
from ReportUtils import pt2cm
#-------------------------------------------------------------------------
#
@ -1141,13 +1142,10 @@ try:
else:
print_label = None
PluginMgr.register_text_doc(mtype,ODFDoc,1,1,1,".odt",print_label)
PluginMgr.register_book_doc(mtype,ODFDoc,1,1,1,".odt")
PluginMgr.register_draw_doc(mtype,ODFDoc,1,1, ".odt",print_label);
register_text_doc(mtype,ODFDoc,1,1,1,".odt",print_label)
register_book_doc(mtype,ODFDoc,1,1,1,".odt")
register_draw_doc(mtype,ODFDoc,1,1, ".odt",print_label);
except:
PluginMgr.register_text_doc(_('Open Document Text'),
ODFDoc,1,1,1,".odt", None)
PluginMgr.register_book_doc(_("Open Document Text"),
ODFDoc,1,1,1,".odt")
PluginMgr.register_draw_doc(_("Open Document Text"),
ODFDoc,1,1,".odt",None);
register_text_doc(_('Open Document Text'),ODFDoc,1,1,1,".odt", None)
register_book_doc(_("Open Document Text"),ODFDoc,1,1,1,".odt")
register_draw_doc(_("Open Document Text"),ODFDoc,1,1,".odt",None);

View File

@ -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
@ -31,6 +31,8 @@ import time
import locale
from cStringIO import StringIO
from math import pi, cos, sin, fabs
from gettext import gettext as _
from xml.sax.saxutils import escape
#-------------------------------------------------------------------------
#
@ -40,21 +42,19 @@ from math import pi, cos, sin, fabs
import Errors
import BaseDoc
import const
import PluginMgr
from PluginUtils import ReportUtils, \
register_text_doc, register_draw_doc, register_book_doc
pt2cm = ReportUtils.pt2cm
import ImgManip
import FontScale
import Mime
import Utils
from ReportUtils import pt2cm
#-------------------------------------------------------------------------
#
# internationalization
# constants
#
#-------------------------------------------------------------------------
from gettext import gettext as _
from xml.sax.saxutils import escape
_apptype = 'application/vnd.sun.xml.writer'
_esc_map = {
@ -1003,10 +1003,12 @@ try:
else:
print_label = None
PluginMgr.register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label)
PluginMgr.register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw")
PluginMgr.register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxw",print_label);
register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label)
register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw")
register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxw",print_label);
except:
PluginMgr.register_text_doc(_('OpenOffice.org Writer'), OpenOfficeDoc,1,1,1,".sxw", None)
PluginMgr.register_book_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,1,1,1,".sxw")
PluginMgr.register_draw_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,1,1,".sxw",None);
register_text_doc(_('OpenOffice.org Writer'),
OpenOfficeDoc,1,1,1,".sxw", None)
register_book_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,1,1,1,".sxw")
register_draw_doc(_("OpenOffice.org Writer"),
OpenOfficeDoc,1,1,".sxw",None);

View File

@ -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
@ -33,11 +33,10 @@ from gettext import gettext as _
# Gramps modules
#
#-------------------------------------------------------------------------
import PluginMgr
from PluginUtils import register_draw_doc, ReportUtils, Report
pt2cm, rgb_color = ReportUtils.pt2cm, ReportUtils.rgb_color
import Errors
import BaseDoc
from Report import run_print_dialog
from ReportUtils import pt2cm, rgb_color
from Utils import gformat
def lrgb(grp):
@ -137,7 +136,7 @@ class PSDrawDoc(BaseDoc.BaseDoc):
self.f.write('%%EOF\n')
self.f.close()
if self.print_req:
run_print_dialog (self.filename)
Report.run_print_dialog (self.filename)
def write_text(self,text):
pass
@ -420,5 +419,5 @@ class PSDrawDoc(BaseDoc.BaseDoc):
self.f.write("(%s) show\n" % lines[i])
self.f.write('grestore\n')
PluginMgr.register_draw_doc(_("PostScript"),PSDrawDoc,1,1,".ps",
register_draw_doc(_("PostScript"),PSDrawDoc,1,1,".ps",
_("Print a copy"));

View File

@ -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
@ -33,7 +33,7 @@ from gettext import gettext as _
#
#------------------------------------------------------------------------
import BaseDoc
import PluginMgr
from PluginUtils import register_text_doc, register_draw_doc, register_book_doc
import Errors
import ImgManip
import Mime
@ -643,14 +643,12 @@ try:
print_label=_("Open in %s") % mprog[1]
else:
print_label=None
PluginMgr.register_text_doc(mtype, PdfDoc, 1, 1, 1, ".pdf", print_label)
PluginMgr.register_draw_doc(mtype, PdfDoc, 1, 1, ".pdf", print_label)
PluginMgr.register_book_doc(mtype,classref=PdfDoc,
table=1,paper=1,style=1,ext=".pdf")
register_text_doc(mtype, PdfDoc, 1, 1, 1, ".pdf", print_label)
register_draw_doc(mtype, PdfDoc, 1, 1, ".pdf", print_label)
register_book_doc(mtype,classref=PdfDoc,
table=1,paper=1,style=1,ext=".pdf")
except:
PluginMgr.register_text_doc(_('PDF document'), PdfDoc,
1, 1, 1,".pdf", None)
PluginMgr.register_draw_doc(_('PDF document'), PdfDoc,
1, 1, ".pdf", None)
PluginMgr.register_book_doc(name=_("PDF document"),classref=PdfDoc,
table=1,paper=1,style=1,ext=".pdf")
register_text_doc(_('PDF document'), PdfDoc,1, 1, 1,".pdf", None)
register_draw_doc(_('PDF document'), PdfDoc,1, 1, ".pdf", None)
register_book_doc(name=_("PDF document"),classref=PdfDoc,
table=1,paper=1,style=1,ext=".pdf")

View File

@ -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
@ -34,7 +34,7 @@ from gettext import gettext as _
#
#------------------------------------------------------------------------
import BaseDoc
import PluginMgr
from PluginUtils import register_text_doc
import ImgManip
import Errors
import Mime
@ -427,6 +427,6 @@ try:
print_label=_("Open in %s") % mprog[1]
else:
print_label=None
PluginMgr.register_text_doc(mtype, RTFDoc, 1, 1, 1, ".rtf", print_label)
register_text_doc(mtype, RTFDoc, 1, 1, 1, ".rtf", print_label)
except:
PluginMgr.register_text_doc(_('RTF document'), RTFDoc, 1, 1, 1, ".rtf", None)
register_text_doc(_('RTF document'), RTFDoc, 1, 1, 1, ".rtf", None)

View File

@ -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
@ -25,16 +25,15 @@
# python modules
#
#-------------------------------------------------------------------------
import string
from math import pi, cos, sin, fabs
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# Gramps modules
#
#-------------------------------------------------------------------------
import PluginMgr
from gettext import gettext as _
from PluginUtils import register_draw_doc
import BaseDoc
import Errors
@ -200,7 +199,7 @@ class SvgDrawDoc(BaseDoc.BaseDoc):
if text != "":
font = p.get_font()
font_size = font.get_size()
lines = string.split(text,'\n')
lines = text.split('\n')
nlines = len(lines)
mar = 10/28.35
fs = (font_size/28.35) * 1.2
@ -261,4 +260,4 @@ def units(val):
# Register document generator
#
#-------------------------------------------------------------------------
PluginMgr.register_draw_doc(_("SVG (Scalable Vector Graphics)"),SvgDrawDoc,1,1,".svg");
register_draw_doc(_("SVG (Scalable Vector Graphics)"),SvgDrawDoc,1,1,".svg");

View File

@ -44,10 +44,8 @@ import Config
import GrampsCfg
import const
import Errors
import PluginMgr
import TipOfDay
import DataViews
from Mime import mime_type_is_defined
from QuestionDialog import ErrorDialog

View File

@ -42,7 +42,7 @@ import gtk
#
#------------------------------------------------------------------------
import BaseDoc
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
from SubstKeywords import SubstKeywords
pt2cm = ReportUtils.pt2cm
@ -260,7 +260,6 @@ class AncestorChartOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'ancestor_chart',
category = Report.CATEGORY_DRAW,

View File

@ -44,7 +44,7 @@ import gtk
#------------------------------------------------------------------------
import BaseDoc
from SubstKeywords import SubstKeywords
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
pt2cm = ReportUtils.pt2cm
cm2pt = ReportUtils.cm2pt
@ -512,7 +512,6 @@ class AncestorChartOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'ancestor_chart2',
category = Report.CATEGORY_DRAW,

View File

@ -35,7 +35,7 @@ from gettext import gettext as _
# gramps modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportUtils, ReportOptions
from PluginUtils import Report, ReportUtils, ReportOptions, register_report
import BaseDoc
import Errors
import NameDisplay
@ -191,7 +191,6 @@ class AncestorOptions(ReportOptions.ReportOptions):
# Register the plugin
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'ancestor_report',
category = Report.CATEGORY_TEXT,

View File

@ -42,10 +42,10 @@ import gtk
#
#------------------------------------------------------------------------
import const
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, \
register_report, relationship_class
import BaseDoc
import RelLib
import PluginMgr
from DateHandler import displayer as _dd
from NameDisplay import displayer as _nd
@ -84,7 +84,7 @@ class ComprehensiveAncestorsReport (Report.Report):
self.sources = []
self.sourcerefs = []
self.RelClass = PluginMgr.relationship_class
self.RelClass = relationship_class
self.relationship = self.RelClass(database)
def define_table_styles(self):
@ -957,7 +957,7 @@ class ComprehensiveAncestorsOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
PluginMgr.register_report(
register_report(
name = 'ancestors_report',
category = Report.CATEGORY_TEXT,
report_class = ComprehensiveAncestorsReport,

View File

@ -66,8 +66,7 @@ from RelLib import Person
import Utils
import ListModel
import PluginMgr
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, bkitems_list, register_report
import BaseDoc
from QuestionDialog import WarningDialog
import Plugins
@ -118,7 +117,7 @@ class BookItem:
"""
self.clear()
for item in PluginMgr.bkitems_list:
for item in bkitems_list:
if item[4] == name:
self.translated_name = item[0]
if item[5]:
@ -660,10 +659,10 @@ class BookReportSelector:
The selections are read from the book item registry.
"""
if not PluginMgr.bkitems_list:
if not bkitems_list:
return
for book_item in PluginMgr.bkitems_list:
for book_item in bkitems_list:
if book_item[5]:
category = Plugins.UNSUPPORTED
else:
@ -1118,7 +1117,7 @@ def cl_report(database,name,category,options_str_dict):
#
#
#------------------------------------------------------------------------
PluginMgr.register_report(
register_report(
name = 'book',
category = Report.CATEGORY_BOOK,
report_class = BookReportSelector,

View File

@ -38,7 +38,7 @@ import locale
#
#------------------------------------------------------------------------
import BaseDoc
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
pt2cm = ReportUtils.pt2cm
import GenericFilter
from DateHandler import DateDisplay
@ -927,7 +927,6 @@ class Holidays:
# Register this plugin
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'calendar',
category = Report.CATEGORY_DRAW,

View File

@ -39,7 +39,6 @@ from gettext import gettext as _
import gobject
import gtk
import gtk.glade
import GrampsDisplay
#-------------------------------------------------------------------------
#
@ -48,7 +47,8 @@ import GrampsDisplay
#-------------------------------------------------------------------------
import Utils
from QuestionDialog import OkDialog
import Tool
import GrampsDisplay
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -204,8 +204,6 @@ class ChangeNamesOptions(Tool.ToolOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'chname',
category = Tool.TOOL_DBPROC,

View File

@ -47,7 +47,7 @@ import const
import Utils
from QuestionDialog import OkDialog
import AutoComp
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -209,7 +209,6 @@ class ChangeTypesOptions(Tool.ToolOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'chtype',
category = Tool.TOOL_DBPROC,

View File

@ -56,7 +56,7 @@ import gtk.glade
import RelLib
import Utils
import const
import Tool
from PluginUtils import Tool, register_tool
from QuestionDialog import OkDialog, MissingMediaDialog
@ -938,8 +938,6 @@ class CheckOptions(Tool.ToolOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'check',
category = Tool.TOOL_DBFIX,

View File

@ -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
@ -48,7 +48,7 @@ import gtk.glade
#-------------------------------------------------------------------------
from QuestionDialog import OkDialog, ErrorDialog
import WriteXML
import Tool
from PluginUtils import Tool, register_tool
import Utils
import GrampsDisplay
@ -418,8 +418,6 @@ class CheckpointOptions(Tool.ToolOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'chkpoint',
category = Tool.TOOL_REVCTL,

View File

@ -37,9 +37,8 @@ from gettext import gettext as _
# GRAMPS modules
#
#-------------------------------------------------------------------------
from PluginUtils import Tool, Report
from PluginUtils import Tool, Report, cl_list, cli_tool_list, register_tool
import Utils
import PluginMgr
#-------------------------------------------------------------------------
#
@ -95,12 +94,12 @@ class CmdRef(Tool.Tool):
f.write(' <title>Reports</title>\n')
# Common report options
item = PluginMgr.cl_list[0]
item = cl_list[0]
clr = Report.CommandLineReport(db,item[0],item[1],item[3],{},True)
self.write_ref(f,clr,level+2,id_counter,True)
id_counter = id_counter + 1
for item in PluginMgr.cl_list:
for item in cl_list:
category = item[1]
if category in (Report.CATEGORY_BOOK,
Report.CATEGORY_CODE,
@ -116,12 +115,12 @@ class CmdRef(Tool.Tool):
f.write(' <title>Tools</title>\n')
# Common tool options
item = PluginMgr.cli_tool_list[0]
item = cli_tool_list[0]
clr = Tool.CommandLineTool(db,item[0],item[1],item[3],{},True)
self.write_ref(f,clr,level+2,id_counter,True)
id_counter = id_counter + 1
for item in PluginMgr.cli_tool_list:
for item in cli_tool_list:
self.write_ref(f,item,level+2,id_counter)
id_counter = id_counter + 1
f.write(' </%s>\n' % _tags[level+1] )
@ -244,8 +243,6 @@ class CmdRefOptions(Tool.ToolOptions):
if __debug__:
from PluginMgr import register_tool
register_tool(
name = 'cmdref',
category = Tool.TOOL_DEBUG,

View File

@ -45,7 +45,7 @@ import gtk.glade
#
#------------------------------------------------------------------------
import Utils
from PluginUtils import Report
from PluginUtils import Report, register_report
#------------------------------------------------------------------------
#
@ -110,7 +110,6 @@ class CountAncestors:
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'count_ancestors',
category = Report.CATEGORY_VIEW,

View File

@ -41,7 +41,7 @@ import gtk
# gramps modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, register_report
import BaseDoc
#------------------------------------------------------------------------
@ -208,7 +208,6 @@ class CustomTextOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'custom_text',
category = Report.CATEGORY_TEXT,

View File

@ -41,7 +41,7 @@ import gtk
# GRAMPS modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
pt2cm = ReportUtils.pt2cm
import BaseDoc
from SubstKeywords import SubstKeywords
@ -399,7 +399,6 @@ class DescendantGraphOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'descendant_graph',
category = Report.CATEGORY_DRAW,

View File

@ -37,7 +37,7 @@ from gettext import gettext as _
#------------------------------------------------------------------------
import Utils
import NameDisplay
import Tool
from PluginUtils import Tool, register_tool
#------------------------------------------------------------------------
#
@ -167,8 +167,6 @@ class DesBrowseOptions(Tool.ToolOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'dbrowse',
category = Tool.TOOL_ANAL,

View File

@ -43,7 +43,7 @@ import gtk
#
#------------------------------------------------------------------------
import BaseDoc
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
pt2cm = ReportUtils.pt2cm
cm2pt = ReportUtils.cm2pt
from SubstKeywords import SubstKeywords
@ -463,7 +463,6 @@ class DescendChartOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'descend_chart2',
category = Report.CATEGORY_DRAW,

View File

@ -35,7 +35,7 @@ from gettext import gettext as _
# GRAMPS modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import BaseDoc
import Errors
import Sort
@ -246,7 +246,6 @@ class DescendantOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'descend_report',
category = Report.CATEGORY_TEXT,

View File

@ -44,7 +44,7 @@ import gtk
#
#------------------------------------------------------------------------
import RelLib
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import BaseDoc
import const
from QuestionDialog import ErrorDialog
@ -839,7 +839,6 @@ class DetAncestorOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'det_ancestor_report',
category = Report.CATEGORY_TEXT,

View File

@ -45,7 +45,7 @@ import gtk
#------------------------------------------------------------------------
import RelLib
import Errors
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import BaseDoc
import const
from DateHandler import displayer as _dd
@ -874,7 +874,6 @@ class DetDescendantOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'det_descendant_report',
category = Report.CATEGORY_TEXT,

View File

@ -24,7 +24,7 @@
import gtk
import ListModel
import Tool
from PluginUtils import Tool, register_tool
_GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
#-------------------------------------------------------------------------
@ -91,8 +91,6 @@ class DumpGenderStatsOptions(Tool.ToolOptions):
if __debug__:
from PluginMgr import register_tool
register_tool(
name = 'dgenstats',
category = Tool.TOOL_DEBUG,

View File

@ -47,7 +47,7 @@ import gtk.glade
#
#------------------------------------------------------------------------
import Utils
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -146,8 +146,6 @@ class EvalOptions(Tool.ToolOptions):
#------------------------------------------------------------------------
if __debug__:
from PluginMgr import register_tool
register_tool(
name = 'eval',
category = Tool.TOOL_DEBUG,

View File

@ -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
@ -53,7 +53,7 @@ import OpenSpreadSheet
import const
import DateHandler
from QuestionDialog import WarningDialog
import Tool
from PluginUtils import Tool, register_tool
#------------------------------------------------------------------------
#
@ -477,8 +477,6 @@ class EventComparisonOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'eventcmp',
category = Tool.TOOL_ANAL,

View File

@ -58,6 +58,7 @@ from RelLib import Date
import Errors
from gettext import gettext as _
from QuestionDialog import ErrorDialog
from PluginUtils import register_export
#-------------------------------------------------------------------------
#
@ -323,5 +324,4 @@ _description = _('vCalendar is used in many calendaring and pim applications.')
_config = (_('vCalendar export options'),CalendarWriterOptionBox)
_filename = 'vcs'
from PluginMgr import register_export
register_export(exportData,_title,_description,_config,_filename)

View File

@ -56,6 +56,7 @@ from RelLib import Date
import Errors
from gettext import gettext as _
from QuestionDialog import ErrorDialog
from PluginUtils import register_export
#-------------------------------------------------------------------------
#
@ -242,5 +243,4 @@ _description = _('vCard is used in many addressbook and pim applications.')
_config = (_('vCard export options'),CardWriterOptionBox)
_filename = 'vcf'
from PluginMgr import register_export
register_export(exportData,_title,_description,_config,_filename)

View File

@ -42,7 +42,7 @@ import gtk
#
#------------------------------------------------------------------------
import RelLib
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, register_report
import BaseDoc
import const
import DateHandler
@ -737,7 +737,6 @@ class FamilyGroupOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'family_group',
category = Report.CATEGORY_TEXT,

View File

@ -40,7 +40,7 @@ import gtk
#
#------------------------------------------------------------------------
import BaseDoc
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
from SubstKeywords import SubstKeywords
pt2cm = ReportUtils.pt2cm
@ -312,7 +312,6 @@ class FanChartOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'fan_chart',
category = Report.CATEGORY_DRAW,

View File

@ -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
@ -61,7 +61,7 @@ import AutoComp
import ListModel
import Utils
import SelectPerson
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -961,8 +961,6 @@ class FilterEditorOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'cfilted',
category = Tool.TOOL_UTILS,

View File

@ -38,7 +38,7 @@ import BaseDoc
import RelLib
import DateHandler
import const
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
#------------------------------------------------------------------------
#
@ -411,8 +411,6 @@ class FtmAncestorOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'ftm_ancestor_report',
category = Report.CATEGORY_TEXT,

View File

@ -37,7 +37,7 @@ from gettext import gettext as _
# gramps modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import BaseDoc
import RelLib
import DateHandler
@ -560,7 +560,6 @@ class FtmDescendantOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'ftm_descendant_report',
category = Report.CATEGORY_TEXT,

View File

@ -52,7 +52,7 @@ import gtk
# GRAMPS modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, register_report
import GenericFilter
import RelLib
import DateHandler
@ -961,7 +961,6 @@ def get_description_graphics():
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'rel_graph',
category = Report.CATEGORY_CODE,

View File

@ -57,6 +57,7 @@ import RelLib
import const
from QuestionDialog import ErrorDialog
from DateHandler import parser as _dp
from PluginUtils import register_import
from htmlentitydefs import name2codepoint
_date_parse = re.compile('([~?<>]+)?([0-9/]+)([J|H|F])?(\.\.)?([0-9/]+)?([J|H|F])?')
@ -775,5 +776,4 @@ _filter.set_name(_('GeneWeb files'))
_filter.add_mime_type(_mime_type)
_format_name = _('GeneWeb')
from PluginMgr import register_import
register_import(importData,_filter,_mime_type,0,_format_name)

View File

@ -56,6 +56,7 @@ import Errors
import RelLib
import const
from QuestionDialog import ErrorDialog
from PluginUtils import register_import
#-------------------------------------------------------------------------
#
@ -219,7 +220,6 @@ class VCardParser:
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_import
_mime_type = const.app_vcard
for mime in _mime_type:
_filter = gtk.FileFilter()

View File

@ -45,7 +45,7 @@ import const
import BaseDoc
import GenericFilter
import DateHandler
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
#------------------------------------------------------------------------
#
@ -600,8 +600,6 @@ class IndivCompleteOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'indiv_complete',
category = Report.CATEGORY_TEXT,

View File

@ -45,7 +45,7 @@ import gtk
import RelLib
import const
import BaseDoc
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, register_report
import DateHandler
#------------------------------------------------------------------------
@ -378,8 +378,6 @@ class IndivSummaryOptions(ReportOptions.ReportOptions):
# Register plugins
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'individual_summary',
category = Report.CATEGORY_TEXT,

View File

@ -48,7 +48,7 @@ import gc
#
#------------------------------------------------------------------------
import Utils
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -148,8 +148,6 @@ class LeakOptions(Tool.ToolOptions):
#------------------------------------------------------------------------
if __debug__:
from PluginMgr import register_tool
register_tool(
name = 'eval',
category = Tool.TOOL_DEBUG,

View File

@ -50,7 +50,7 @@ import soundex
import NameDisplay
import ListModel
import MergePeople
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -676,8 +676,6 @@ class MergeOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'dupfind',
category = Tool.TOOL_DBPROC,

View File

@ -69,7 +69,7 @@ import const
from GrampsCfg import get_researcher
import GenericFilter
import Sort
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import Errors
import Utils
import ImgManip
@ -2871,7 +2871,6 @@ def sort_nameof(person, private):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'navwebpage',
category = Report.CATEGORY_WEB,

View File

@ -32,7 +32,7 @@ from random import randint
from tempfile import NamedTemporaryFile
from tempfile import mkstemp
from gettext import gettext as _
from PluginUtils import register_tool
#
# Interface to phpGedView
#
@ -425,8 +425,6 @@ else:
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
def phpGedViewImporterCaller(database,active_person,callback,parent=None):
phpGedViewImporter(database)

View File

@ -47,7 +47,7 @@ import GrampsDisplay
#
#-------------------------------------------------------------------------
import Utils
import Tool
from PluginUtils import Tool, register_tool
from QuestionDialog import OkDialog
#-------------------------------------------------------------------------
@ -359,8 +359,6 @@ class PatchNamesOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'patchnames',
category = Tool.TOOL_DBPROC,

View File

@ -55,6 +55,7 @@ import gtk
import const
from GrampsDb import gramps_db_reader_factory
from QuestionDialog import ErrorDialog
from PluginUtils import register_import
#-------------------------------------------------------------------------
#
@ -118,5 +119,4 @@ _filter.set_name(_('GRAMPS packages'))
_filter.add_mime_type(_mime_type)
_format_name = _('GRAMPS package')
from PluginMgr import register_import
register_import(impData,_filter,_mime_type,0,_format_name)

View File

@ -55,7 +55,7 @@ import gtk.glade
import RelLib
import Utils
import const
import Tool
from PluginUtils import Tool, register_tool
from QuestionDialog import OkDialog
#-------------------------------------------------------------------------
@ -111,8 +111,6 @@ class RebuildOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'rebuild',
category = Tool.TOOL_DBFIX,

View File

@ -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
@ -46,10 +46,9 @@ import RelLib
import Utils
import NameDisplay
import ListModel
import PluginMgr
import DateHandler
import PeopleModel
import Tool
from PluginUtils import Tool, relationship_class, register_tool
column_names = [
_('Name'),
@ -78,7 +77,7 @@ class RelCalc(Tool.Tool):
"""
self.person = person
self.RelClass = PluginMgr.relationship_class
self.RelClass = relationship_class
self.relationship = self.RelClass(self.db)
self.parent = parent
self.win_key = self
@ -228,7 +227,7 @@ class RelCalcOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
PluginMgr.register_tool(
register_tool(
name = 'relcalc',
category = Tool.TOOL_UTILS,
tool_class = RelCalc,

View File

@ -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
@ -40,7 +40,7 @@ from gettext import gettext as _
#------------------------------------------------------------------------
import Utils
import RelLib
import Tool
from PluginUtils import Tool, register_tool
from QuestionDialog import WarningDialog
_findint = re.compile('^[^\d]*(\d+)[^\d]*')
@ -197,8 +197,6 @@ class ReorderIdsOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'reorder_ids',
category = Tool.TOOL_DBPROC,

View File

@ -41,7 +41,7 @@ import gtk
# gramps modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions
from PluginUtils import Report, ReportOptions, register_report
import BaseDoc
import SelectObject
import AddMedia
@ -290,7 +290,6 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'simple_book_title',
category = Report.CATEGORY_TEXT,

View File

@ -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
@ -47,7 +47,7 @@ import GrampsDisplay
import soundex
import Utils
import AutoComp
import Tool
from PluginUtils import Tool, register_tool
#-------------------------------------------------------------------------
#
@ -160,8 +160,6 @@ class SoundGenOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'soundgen',
category = Tool.TOOL_UTILS,

View File

@ -53,7 +53,7 @@ import gtk
from RelLib import Person, Family
# gender and report type names
import BaseDoc
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
import GenericFilter
import DateHandler
from Utils import ProgressMeter
@ -968,8 +968,6 @@ class StatisticsChartOptions(ReportOptions.ReportOptions):
# Register report/options
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'statistics_chart',
category = Report.CATEGORY_DRAW,

View File

@ -45,7 +45,7 @@ import gtk.glade
#------------------------------------------------------------------------
import Utils
import RelLib
from PluginUtils import Report
from PluginUtils import Report, register_report
import DateHandler
#------------------------------------------------------------------------
@ -166,8 +166,6 @@ class SummaryReport:
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'summary',
category = Report.CATEGORY_VIEW,

View File

@ -48,7 +48,7 @@ import gtk.glade
#-------------------------------------------------------------------------
import Errors
import RelLib
import Tool
from PluginUtils import Tool, register_tool
import const
import Utils
from QuestionDialog import ErrorDialog
@ -1415,8 +1415,6 @@ class TestcaseGeneratorOptions(Tool.ToolOptions):
#-------------------------------------------------------------------------
if __debug__:
from PluginMgr import register_tool
register_tool(
name = 'testcasegenerator',
category = Tool.TOOL_DEBUG,

View File

@ -44,7 +44,7 @@ import gtk
# GRAMPS modules
#
#------------------------------------------------------------------------
from PluginUtils import Report, ReportOptions, ReportUtils
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
pt2cm = ReportUtils.pt2cm
import BaseDoc
import GenericFilter
@ -466,8 +466,6 @@ class TimeLineOptions(ReportOptions.ReportOptions):
#
#
#------------------------------------------------------------------------
from PluginMgr import register_report
register_report(
name = 'timeline',
category = Report.CATEGORY_DRAW,

View File

@ -47,7 +47,7 @@ import GrampsDisplay
#------------------------------------------------------------------------
import RelLib
import Utils
import Tool
from PluginUtils import Tool, register_report
#-------------------------------------------------------------------------
#
@ -705,8 +705,6 @@ class VerifyOptions(Tool.ToolOptions):
#
#
#-------------------------------------------------------------------------
from PluginMgr import register_tool
register_tool(
name = 'verify',
category = Tool.TOOL_UTILS,

View File

@ -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
@ -64,6 +64,7 @@ import Mime
import const
import QuestionDialog
import ImgManip
from PluginUtils import register_export
_title_string = _("Export to CD")
@ -318,5 +319,4 @@ _description = _('Exporting to CD copies all your data and media '
_config = None
_filename = 'burn'
from PluginMgr import register_export
register_export(writeData,_title,_description,_config,_filename)

View File

@ -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
@ -56,6 +56,7 @@ import Utils
import GenericFilter
import Errors
from QuestionDialog import ErrorDialog
from PluginUtils import register_export
#-------------------------------------------------------------------------
#
@ -286,5 +287,4 @@ _description = _('Web Family Tree format.')
_config = (_('Web Family Tree export options'),FtreeWriterOptionBox)
_filename = 'wft'
from PluginMgr import register_export
register_export(writeData,_title,_description,_config,_filename)

View File

@ -57,6 +57,7 @@ import const
import Utils
import Errors
from QuestionDialog import ErrorDialog
from PluginUtils import register_export
#-------------------------------------------------------------------------
#
@ -602,5 +603,4 @@ _description = _('GeneWeb is a web based genealogy program.')
_config = (_('GeneWeb export options'),GeneWebWriterOptionBox)
_filename = 'gw'
from PluginMgr import register_export
register_export(exportData,_title,_description,_config,_filename)

View File

@ -57,6 +57,7 @@ import gtk.glade
from GrampsDb._WriteXML import XmlWriter
import Utils
from QuestionDialog import MissingMediaDialog
from PluginUtils import register_export
#-------------------------------------------------------------------------
#
@ -210,5 +211,4 @@ _description = _('GRAMPS package is an archived XML database together with the m
_config = None
_filename = 'gpkg'
from PluginMgr import register_export
register_export(writeData,_title,_description,_config,_filename)

View File

@ -34,6 +34,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -175,8 +176,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
[ "da", "DA", "da_DK", "danish", "Danish", "da_DK.UTF8",
"da_DK@euro", "da_DK.UTF8@euro", "dansk", "Dansk",

View File

@ -34,6 +34,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -392,8 +393,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["de","DE","de_DE","deutsch","Deutsch","de_DE.UTF8","de_DE@euro","de_DE.UTF8@euro",
"german","German", "de_DE.UTF-8", "de_DE.utf-8", "de_DE.utf8"])

View File

@ -33,6 +33,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -330,8 +331,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this function with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["es","ES","es_ES","espanol","Espanol","es_ES.UTF8","es_ES@euro","es_ES.UTF8@euro",
"spanish","Spanish", "es_ES.UTF-8", "es_ES.utf-8", "es_ES.utf8"])

View File

@ -34,6 +34,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -217,8 +218,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["fi","FI","fi_FI","finnish","Finnish","fi_FI.UTF8","fi_FI@euro","fi_FI.UTF8@euro",
"suomi","Suomi", "fi_FI.UTF-8", "fi_FI.utf-8", "fi_FI.utf8"])

View File

@ -31,6 +31,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -224,8 +225,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["fr", "FR", "fr_FR", "fr_CA", "francais", "Francais", "fr_FR.UTF8", "fr_FR@euro", "fr_FR.UTF8@euro",
"french","French", "fr_FR.UTF-8", "fr_FR.utf-8", "fr_FR.utf8", "fr_CA.UTF-8"])

View File

@ -32,7 +32,7 @@
import RelLib
import Relationship
from PluginMgr import register_relcalc
from PluginUtils import register_relcalc
import types
from gettext import gettext as _

View File

@ -34,7 +34,7 @@
import RelLib
import Relationship
import types
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -201,8 +201,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Function registration
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["it", "IT", "it_IT", "it_IT@euro", "it_IT.utf8"])

View File

@ -34,6 +34,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -267,8 +268,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["nb","nn","no", "nb_NO","nn_NO","no_NO","nb_NO.UTF8","nn_NO.UTF8","no_NO.UTF8",
"nb_NO.UTF-8","nn_NO.UTF-8","no_NO.UTF-8",

View File

@ -32,6 +32,7 @@
import RelLib
import Relationship
import types
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -260,7 +261,5 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["ru","RU","ru_RU","koi8r","ru_koi8r","russian","Russian","ru_RU.koi8r","ru_RU.KOI8-R","ru_RU.utf8","ru_RU.UTF8", "ru_RU.utf-8","ru_RU.UTF-8","ru_RU.iso88595","ru_RU.iso8859-5","ru_RU.iso-8859-5"])

View File

@ -2,7 +2,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,6 +34,7 @@ import RelLib
import Relationship
import types
from gettext import gettext as _
from PluginUtils import register_relcalc
#-------------------------------------------------------------------------
#
@ -222,8 +223,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
# Register this class with the Plugins system
#
#-------------------------------------------------------------------------
from PluginMgr import register_relcalc
register_relcalc(RelationshipCalculator,
["sv","SV","sv_SE","swedish","Swedish","sv_SE.UTF8","sv_SE@euro","sv_SE.UTF8@euro",
"svenska","Svenska", "sv_SE.UTF-8", "sv_SE.utf-8", "sv_SE.utf8"])