* src/Plugins.py, src/PluginMgr.py: Move to ReportUtils.
svn: r6133
This commit is contained in:
parent
4521959d93
commit
199a9b7616
@ -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>
|
2006-03-10 Don Allingham <don@gramps-project.org>
|
||||||
* src/Mime/PythonMime.py: import gtk
|
* src/Mime/PythonMime.py: import gtk
|
||||||
* src/DataViews/_FamilyList.py: family_add explict function added,
|
* src/DataViews/_FamilyList.py: family_add explict function added,
|
||||||
|
@ -46,8 +46,7 @@ import Mime
|
|||||||
import QuestionDialog
|
import QuestionDialog
|
||||||
import Config
|
import Config
|
||||||
import RecentFiles
|
import RecentFiles
|
||||||
import PluginMgr
|
from PluginUtils import Report, Tool, cl_list, cli_tool_list
|
||||||
from PluginUtils import Report, Tool
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -595,7 +594,7 @@ class ArgHandler:
|
|||||||
print "Report name not given. Please use name=reportname"
|
print "Report name not given. Please use name=reportname"
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
|
|
||||||
for item in PluginMgr.cl_list:
|
for item in cl_list:
|
||||||
if name == item[0]:
|
if name == item[0]:
|
||||||
category = item[1]
|
category = item[1]
|
||||||
report_class = item[2]
|
report_class = item[2]
|
||||||
@ -611,7 +610,7 @@ class ArgHandler:
|
|||||||
return
|
return
|
||||||
|
|
||||||
print "Unknown report name. Available names are:"
|
print "Unknown report name. Available names are:"
|
||||||
for item in PluginMgr.cl_list:
|
for item in cl_list:
|
||||||
print " %s" % item[0]
|
print " %s" % item[0]
|
||||||
elif action == "tool":
|
elif action == "tool":
|
||||||
try:
|
try:
|
||||||
@ -626,7 +625,7 @@ class ArgHandler:
|
|||||||
print "Tool name not given. Please use name=toolname"
|
print "Tool name not given. Please use name=toolname"
|
||||||
os._exit(1)
|
os._exit(1)
|
||||||
|
|
||||||
for item in PluginMgr.cli_tool_list:
|
for item in cli_tool_list:
|
||||||
if name == item[0]:
|
if name == item[0]:
|
||||||
category = item[1]
|
category = item[1]
|
||||||
tool_class = item[2]
|
tool_class = item[2]
|
||||||
@ -636,7 +635,7 @@ class ArgHandler:
|
|||||||
return
|
return
|
||||||
|
|
||||||
print "Unknown tool name. Available names are:"
|
print "Unknown tool name. Available names are:"
|
||||||
for item in PluginMgr.cli_tool_list:
|
for item in cli_tool_list:
|
||||||
print " %s" % item[0]
|
print " %s" % item[0]
|
||||||
else:
|
else:
|
||||||
print "Unknown action: %s." % action
|
print "Unknown action: %s." % action
|
||||||
|
@ -114,7 +114,7 @@ def register_datehandler(locales,parse_class,display_class):
|
|||||||
# Import localized date classes
|
# Import localized date classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import load_plugins
|
from PluginUtils import load_plugins
|
||||||
from const import datesDir
|
from const import datesDir
|
||||||
load_plugins(datesDir)
|
load_plugins(datesDir)
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
import PluginMgr
|
from PluginUtils import export_list
|
||||||
import QuestionDialog
|
import QuestionDialog
|
||||||
import Config
|
import Config
|
||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
@ -368,4 +368,4 @@ class Exporter:
|
|||||||
native_description,
|
native_description,
|
||||||
native_config,
|
native_config,
|
||||||
native_ext)]
|
native_ext)]
|
||||||
self.exports = self.exports + [item for item in PluginMgr.export_list]
|
self.exports = self.exports + [item for item in export_list]
|
||||||
|
@ -1368,5 +1368,5 @@ _description = _('GEDCOM is used to transfer data between genealogy programs. '
|
|||||||
_config = (_('GEDCOM export options'),GedcomWriterOptionBox)
|
_config = (_('GEDCOM export options'),GedcomWriterOptionBox)
|
||||||
_filename = 'ged'
|
_filename = 'ged'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
from PluginUtils import register_export
|
||||||
register_export(exportData,_title,_description,_config,_filename)
|
register_export(exportData,_title,_description,_config,_filename)
|
||||||
|
@ -997,5 +997,5 @@ _description = _('The GRAMPS XML database is a format used by older '
|
|||||||
_config = None
|
_config = None
|
||||||
_filename = 'gramps'
|
_filename = 'gramps'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
from PluginUtils import register_export
|
||||||
register_export(exportData,_title,_description,_config,_filename)
|
register_export(exportData,_title,_description,_config,_filename)
|
||||||
|
@ -75,8 +75,6 @@ gdir_PYTHON = \
|
|||||||
PageView.py\
|
PageView.py\
|
||||||
PaperMenu.py\
|
PaperMenu.py\
|
||||||
PeopleModel.py\
|
PeopleModel.py\
|
||||||
PluginMgr.py\
|
|
||||||
Plugins.py\
|
|
||||||
QuestionDialog.py\
|
QuestionDialog.py\
|
||||||
RecentFiles.py\
|
RecentFiles.py\
|
||||||
Relationship.py\
|
Relationship.py\
|
||||||
|
@ -11,7 +11,9 @@ pkgdata_PYTHON = \
|
|||||||
_ReportOptions.py\
|
_ReportOptions.py\
|
||||||
_Report.py\
|
_Report.py\
|
||||||
_ReportUtils.py\
|
_ReportUtils.py\
|
||||||
_Tool.py
|
_Tool.py\
|
||||||
|
_PluginMgr.py\
|
||||||
|
_Plugins.py
|
||||||
|
|
||||||
pkgpyexecdir = @pkgpyexecdir@/PluginUtils
|
pkgpyexecdir = @pkgpyexecdir@/PluginUtils
|
||||||
pkgpythondir = @pkgpythondir@/PluginUtils
|
pkgpythondir = @pkgpythondir@/PluginUtils
|
||||||
|
@ -195,14 +195,14 @@ def register_tool(
|
|||||||
them as needed.
|
them as needed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from PluginUtils import Tool
|
import _Tool
|
||||||
(junk,gui_task) = divmod(modes,2**Tool.MODE_GUI)
|
(junk,gui_task) = divmod(modes,2**_Tool.MODE_GUI)
|
||||||
if gui_task:
|
if gui_task:
|
||||||
_register_gui_tool(tool_class,options_class,translated_name,
|
_register_gui_tool(tool_class,options_class,translated_name,
|
||||||
name,category,description,
|
name,category,description,
|
||||||
status,author_name,author_email,unsupported)
|
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:
|
if cli_task:
|
||||||
_register_cli_tool(name,category,tool_class,options_class,
|
_register_cli_tool(name,category,tool_class,options_class,
|
||||||
translated_name,unsupported)
|
translated_name,unsupported)
|
||||||
@ -263,21 +263,21 @@ def register_report(
|
|||||||
The low-level functions (starting with '_') should not be used
|
The low-level functions (starting with '_') should not be used
|
||||||
on their own. Instead, this function will call them as needed.
|
on their own. Instead, this function will call them as needed.
|
||||||
"""
|
"""
|
||||||
from PluginUtils import Report
|
import _Report
|
||||||
(junk,standalone_task) = divmod(modes,2**Report.MODE_GUI)
|
(junk,standalone_task) = divmod(modes,2**_Report.MODE_GUI)
|
||||||
if standalone_task:
|
if standalone_task:
|
||||||
_register_standalone(report_class,options_class,translated_name,
|
_register_standalone(report_class,options_class,translated_name,
|
||||||
name,category,description,
|
name,category,description,
|
||||||
status,author_name,author_email,unsupported)
|
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:
|
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,
|
register_book_item(translated_name,book_item_category,
|
||||||
report_class,options_class,name,unsupported)
|
report_class,options_class,name,unsupported)
|
||||||
|
|
||||||
(junk,command_line_task) = divmod(modes-standalone_task-book_item_task,
|
(junk,command_line_task) = divmod(modes-standalone_task-book_item_task,
|
||||||
2**Report.MODE_CLI)
|
2**_Report.MODE_CLI)
|
||||||
if command_line_task:
|
if command_line_task:
|
||||||
_register_cl_report(name,category,report_class,options_class,
|
_register_cl_report(name,category,report_class,options_class,
|
||||||
translated_name,unsupported)
|
translated_name,unsupported)
|
@ -57,8 +57,9 @@ import const
|
|||||||
import Utils
|
import Utils
|
||||||
import Config
|
import Config
|
||||||
import Errors
|
import Errors
|
||||||
from PluginUtils import Report, Tool
|
import _Report
|
||||||
import PluginMgr
|
import _Tool
|
||||||
|
import _PluginMgr
|
||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
import DisplayState
|
import DisplayState
|
||||||
|
|
||||||
@ -158,10 +159,10 @@ class PluginDialog(DisplayState.ManagedWindow):
|
|||||||
|
|
||||||
(item_class,options_class,title,category,name) = self.item
|
(item_class,options_class,title,category,name) = self.item
|
||||||
if self.content == REPORTS:
|
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)
|
item_class,options_class,title,name,category)
|
||||||
else:
|
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,
|
item_class,options_class,title,name,category,
|
||||||
self.state.db.request_rebuild,self.parent)
|
self.state.db.request_rebuild,self.parent)
|
||||||
|
|
||||||
@ -266,8 +267,8 @@ class ReportPlugins(PluginDialog):
|
|||||||
dbstate,
|
dbstate,
|
||||||
uistate,
|
uistate,
|
||||||
track,
|
track,
|
||||||
PluginMgr.report_list,
|
_PluginMgr.report_list,
|
||||||
Report.standalone_categories,
|
_Report.standalone_categories,
|
||||||
_("Report Selection"),
|
_("Report Selection"),
|
||||||
_("Select a report from those available on the left."),
|
_("Select a report from those available on the left."),
|
||||||
_("_Generate"), _("Generate selected report"),
|
_("_Generate"), _("Generate selected report"),
|
||||||
@ -292,8 +293,8 @@ class ToolPlugins(PluginDialog):
|
|||||||
dbstate,
|
dbstate,
|
||||||
uistate,
|
uistate,
|
||||||
track,
|
track,
|
||||||
PluginMgr.tool_list,
|
_PluginMgr.tool_list,
|
||||||
Tool.tool_categories,
|
_Tool.tool_categories,
|
||||||
_("Tool Selection"),
|
_("Tool Selection"),
|
||||||
_("Select a tool from those available on the left."),
|
_("Select a tool from those available on the left."),
|
||||||
_("_Run"),
|
_("_Run"),
|
||||||
@ -335,16 +336,16 @@ class PluginStatus(DisplayState.ManagedWindow):
|
|||||||
|
|
||||||
info = cStringIO.StringIO()
|
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.'))
|
window.get_buffer().set_text(_('All modules were successfully loaded.'))
|
||||||
else:
|
else:
|
||||||
info.write(_("The following modules could not be loaded:"))
|
info.write(_("The following modules could not be loaded:"))
|
||||||
info.write("\n\n")
|
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))
|
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])
|
error = str(msgs[0])
|
||||||
if error[0:11] == "exceptions.":
|
if error[0:11] == "exceptions.":
|
||||||
error = error[11:]
|
error = error[11:]
|
||||||
@ -373,15 +374,15 @@ class PluginStatus(DisplayState.ManagedWindow):
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def build_tools_menu(top_menu,callback):
|
def build_tools_menu(top_menu,callback):
|
||||||
build_plugin_menu(PluginMgr.tool_list,
|
build_plugin_menu(_PluginMgr.tool_list,
|
||||||
Tool.tool_categories,
|
_Tool.tool_categories,
|
||||||
Tool.gui_tool,
|
_Tool.gui_tool,
|
||||||
top_menu,callback)
|
top_menu,callback)
|
||||||
|
|
||||||
def build_report_menu(top_menu,callback):
|
def build_report_menu(top_menu,callback):
|
||||||
build_plugin_menu(PluginMgr.report_list,
|
build_plugin_menu(_PluginMgr.report_list,
|
||||||
Report.standalone_categories,
|
_Report.standalone_categories,
|
||||||
Report.report,
|
_Report.report,
|
||||||
top_menu,callback)
|
top_menu,callback)
|
||||||
|
|
||||||
def build_plugin_menu(item_list,categories,func,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
|
# Reload plugins
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class Reload(Tool.Tool):
|
class Reload(_Tool.Tool):
|
||||||
def __init__(self,db,person,options_class,name,callback=None,parent=None):
|
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.
|
Treated as a callback, causes all plugins to get reloaded.
|
||||||
@ -463,42 +464,42 @@ class Reload(Tool.Tool):
|
|||||||
|
|
||||||
pymod = re.compile(r"^(.*)\.py$")
|
pymod = re.compile(r"^(.*)\.py$")
|
||||||
|
|
||||||
oldfailmsg = PluginMgr.failmsg_list[:]
|
oldfailmsg = _PluginMgr.failmsg_list[:]
|
||||||
PluginMgr.failmsg_list = []
|
_PluginMgr.failmsg_list = []
|
||||||
|
|
||||||
# attempt to reload all plugins that have succeeded in the past
|
# 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 = os.path.basename(plugin.__file__)
|
||||||
filename = filename.replace('pyc','py')
|
filename = filename.replace('pyc','py')
|
||||||
filename = filename.replace('pyo','py')
|
filename = filename.replace('pyo','py')
|
||||||
try:
|
try:
|
||||||
reload(plugin)
|
reload(plugin)
|
||||||
except:
|
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
|
# Remove previously good plugins that are now bad
|
||||||
# from the registered lists
|
# from the registered lists
|
||||||
(PluginMgr.export_list,
|
(_PluginMgr.export_list,
|
||||||
PluginMgr.import_list,
|
_PluginMgr.import_list,
|
||||||
PluginMgr.tool_list,
|
_PluginMgr.tool_list,
|
||||||
PluginMgr.cli_tool_list,
|
_PluginMgr.cli_tool_list,
|
||||||
PluginMgr.report_list,
|
_PluginMgr.report_list,
|
||||||
PluginMgr.bkitems_list,
|
_PluginMgr.bkitems_list,
|
||||||
PluginMgr.cl_list,
|
_PluginMgr.cl_list,
|
||||||
PluginMgr.textdoc_list,
|
_PluginMgr.textdoc_list,
|
||||||
PluginMgr.bookdoc_list,
|
_PluginMgr.bookdoc_list,
|
||||||
PluginMgr.drawdoc_list) = PluginMgr.purge_failed(
|
_PluginMgr.drawdoc_list) = _PluginMgr.purge_failed(
|
||||||
PluginMgr.failmsg_list,
|
_PluginMgr.failmsg_list,
|
||||||
PluginMgr.export_list,
|
_PluginMgr.export_list,
|
||||||
PluginMgr.import_list,
|
_PluginMgr.import_list,
|
||||||
PluginMgr.tool_list,
|
_PluginMgr.tool_list,
|
||||||
PluginMgr.cli_tool_list,
|
_PluginMgr.cli_tool_list,
|
||||||
PluginMgr.report_list,
|
_PluginMgr.report_list,
|
||||||
PluginMgr.bkitems_list,
|
_PluginMgr.bkitems_list,
|
||||||
PluginMgr.cl_list,
|
_PluginMgr.cl_list,
|
||||||
PluginMgr.textdoc_list,
|
_PluginMgr.textdoc_list,
|
||||||
PluginMgr.bookdoc_list,
|
_PluginMgr.bookdoc_list,
|
||||||
PluginMgr.drawdoc_list)
|
_PluginMgr.drawdoc_list)
|
||||||
|
|
||||||
# attempt to load the plugins that have failed in the past
|
# attempt to load the plugins that have failed in the past
|
||||||
for (filename,message) in oldfailmsg:
|
for (filename,message) in oldfailmsg:
|
||||||
@ -506,7 +507,7 @@ class Reload(Tool.Tool):
|
|||||||
match = pymod.match(name[1])
|
match = pymod.match(name[1])
|
||||||
if not match:
|
if not match:
|
||||||
continue
|
continue
|
||||||
PluginMgr.attempt_list.append(filename)
|
_PluginMgr.attempt_list.append(filename)
|
||||||
plugin = match.groups()[0]
|
plugin = match.groups()[0]
|
||||||
try:
|
try:
|
||||||
# For some strange reason second importing of a failed plugin
|
# For some strange reason second importing of a failed plugin
|
||||||
@ -514,29 +515,29 @@ class Reload(Tool.Tool):
|
|||||||
# Looks like a bug in Python.
|
# Looks like a bug in Python.
|
||||||
a = __import__(plugin)
|
a = __import__(plugin)
|
||||||
reload(a)
|
reload(a)
|
||||||
PluginMgr._success_list.append(a)
|
_PluginMgr._success_list.append(a)
|
||||||
except:
|
except:
|
||||||
PluginMgr.failmsg_list.append((filename,sys.exc_info()))
|
_PluginMgr.failmsg_list.append((filename,sys.exc_info()))
|
||||||
|
|
||||||
# attempt to load any new files found
|
# 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):
|
for filename in os.listdir(directory):
|
||||||
name = os.path.split(filename)
|
name = os.path.split(filename)
|
||||||
match = pymod.match(name[1])
|
match = pymod.match(name[1])
|
||||||
if not match:
|
if not match:
|
||||||
continue
|
continue
|
||||||
if filename in PluginMgr.attempt_list:
|
if filename in _PluginMgr.attempt_list:
|
||||||
continue
|
continue
|
||||||
PluginMgr.attempt_list.append(filename)
|
_PluginMgr.attempt_list.append(filename)
|
||||||
plugin = match.groups()[0]
|
plugin = match.groups()[0]
|
||||||
try:
|
try:
|
||||||
a = __import__(plugin)
|
a = __import__(plugin)
|
||||||
if a not in PluginMgr._success_list:
|
if a not in _PluginMgr._success_list:
|
||||||
PluginMgr._success_list.append(a)
|
_PluginMgr._success_list.append(a)
|
||||||
except:
|
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()
|
PluginStatus()
|
||||||
else:
|
else:
|
||||||
global status_up
|
global status_up
|
||||||
@ -547,13 +548,13 @@ class Reload(Tool.Tool):
|
|||||||
# Re-generate tool and report menus
|
# Re-generate tool and report menus
|
||||||
parent.build_plugin_menus(rebuild=True)
|
parent.build_plugin_menus(rebuild=True)
|
||||||
|
|
||||||
class ReloadOptions(Tool.ToolOptions):
|
class ReloadOptions(_Tool.ToolOptions):
|
||||||
"""
|
"""
|
||||||
Defines options and provides handling interface.
|
Defines options and provides handling interface.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self,name,person_id=None):
|
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__:
|
if __debug__:
|
||||||
PluginMgr.register_tool(
|
_PluginMgr.register_tool(
|
||||||
name = 'reload',
|
name = 'reload',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = _Tool.TOOL_DEBUG,
|
||||||
tool_class = Reload,
|
tool_class = Reload,
|
||||||
options_class = ReloadOptions,
|
options_class = ReloadOptions,
|
||||||
modes = Tool.MODE_GUI,
|
modes = _Tool.MODE_GUI,
|
||||||
translated_name = _("Reload plugins"),
|
translated_name = _("Reload plugins"),
|
||||||
description=_("Attempt to reload plugins. "
|
description=_("Attempt to reload plugins. "
|
||||||
"Note: This tool itself is not reloaded!"),
|
"Note: This tool itself is not reloaded!"),
|
@ -52,7 +52,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
import PluginMgr
|
import _PluginMgr
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from _StyleEditor import StyleListDisplay
|
from _StyleEditor import StyleListDisplay
|
||||||
import Config
|
import Config
|
||||||
@ -1769,27 +1769,27 @@ class CommandLineReport:
|
|||||||
self.options_help['of'].append(os.path.expanduser("~/whatever_name"))
|
self.options_help['of'].append(os.path.expanduser("~/whatever_name"))
|
||||||
|
|
||||||
if self.category == CATEGORY_TEXT:
|
if self.category == CATEGORY_TEXT:
|
||||||
for item in PluginMgr.textdoc_list:
|
for item in _PluginMgr.textdoc_list:
|
||||||
if item[7] == self.options_dict['off']:
|
if item[7] == self.options_dict['off']:
|
||||||
self.format = item[1]
|
self.format = item[1]
|
||||||
self.options_help['off'].append(
|
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)
|
self.options_help['off'].append(False)
|
||||||
elif self.category == CATEGORY_DRAW:
|
elif self.category == CATEGORY_DRAW:
|
||||||
for item in PluginMgr.drawdoc_list:
|
for item in _PluginMgr.drawdoc_list:
|
||||||
if item[6] == self.options_dict['off']:
|
if item[6] == self.options_dict['off']:
|
||||||
self.format = item[1]
|
self.format = item[1]
|
||||||
self.options_help['off'].append(
|
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)
|
self.options_help['off'].append(False)
|
||||||
elif self.category == CATEGORY_BOOK:
|
elif self.category == CATEGORY_BOOK:
|
||||||
for item in PluginMgr.bookdoc_list:
|
for item in _PluginMgr.bookdoc_list:
|
||||||
if item[6] == self.options_dict['off']:
|
if item[6] == self.options_dict['off']:
|
||||||
self.format = item[1]
|
self.format = item[1]
|
||||||
self.options_help['off'].append(
|
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)
|
self.options_help['off'].append(False)
|
||||||
else:
|
else:
|
||||||
@ -1956,9 +1956,9 @@ class GrampsTextFormatComboBox(gtk.ComboBox):
|
|||||||
|
|
||||||
out_pref = Config.get_output_preference()
|
out_pref = Config.get_output_preference()
|
||||||
index = 0
|
index = 0
|
||||||
PluginMgr.textdoc_list.sort()
|
_PluginMgr.textdoc_list.sort()
|
||||||
active_index = 0
|
active_index = 0
|
||||||
for item in PluginMgr.textdoc_list:
|
for item in _PluginMgr.textdoc_list:
|
||||||
if tables and item[2] == 0:
|
if tables and item[2] == 0:
|
||||||
continue
|
continue
|
||||||
name = item[0]
|
name = item[0]
|
||||||
@ -1973,25 +1973,25 @@ class GrampsTextFormatComboBox(gtk.ComboBox):
|
|||||||
self.set_active(active_index)
|
self.set_active(active_index)
|
||||||
|
|
||||||
def get_label(self):
|
def get_label(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][0]
|
return _PluginMgr.textdoc_list[self.get_active()][0]
|
||||||
|
|
||||||
def get_reference(self):
|
def get_reference(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][1]
|
return _PluginMgr.textdoc_list[self.get_active()][1]
|
||||||
|
|
||||||
def get_paper(self):
|
def get_paper(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][3]
|
return _PluginMgr.textdoc_list[self.get_active()][3]
|
||||||
|
|
||||||
def get_styles(self):
|
def get_styles(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][4]
|
return _PluginMgr.textdoc_list[self.get_active()][4]
|
||||||
|
|
||||||
def get_ext(self):
|
def get_ext(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][5]
|
return _PluginMgr.textdoc_list[self.get_active()][5]
|
||||||
|
|
||||||
def get_printable(self):
|
def get_printable(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][6]
|
return _PluginMgr.textdoc_list[self.get_active()][6]
|
||||||
|
|
||||||
def get_clname(self):
|
def get_clname(self):
|
||||||
return PluginMgr.textdoc_list[self.get_active()][7]
|
return _PluginMgr.textdoc_list[self.get_active()][7]
|
||||||
|
|
||||||
class GrampsDrawFormatComboBox(gtk.ComboBox):
|
class GrampsDrawFormatComboBox(gtk.ComboBox):
|
||||||
|
|
||||||
@ -2004,9 +2004,9 @@ class GrampsDrawFormatComboBox(gtk.ComboBox):
|
|||||||
|
|
||||||
out_pref = Config.get_output_preference()
|
out_pref = Config.get_output_preference()
|
||||||
index = 0
|
index = 0
|
||||||
PluginMgr.drawdoc_list.sort()
|
_PluginMgr.drawdoc_list.sort()
|
||||||
active_index = 0
|
active_index = 0
|
||||||
for item in PluginMgr.drawdoc_list:
|
for item in _PluginMgr.drawdoc_list:
|
||||||
if tables and item[2] == 0:
|
if tables and item[2] == 0:
|
||||||
continue
|
continue
|
||||||
name = item[0]
|
name = item[0]
|
||||||
@ -2021,25 +2021,25 @@ class GrampsDrawFormatComboBox(gtk.ComboBox):
|
|||||||
self.set_active(active_index)
|
self.set_active(active_index)
|
||||||
|
|
||||||
def get_reference(self):
|
def get_reference(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][1]
|
return _PluginMgr.drawdoc_list[self.get_active()][1]
|
||||||
|
|
||||||
def get_label(self):
|
def get_label(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][0]
|
return _PluginMgr.drawdoc_list[self.get_active()][0]
|
||||||
|
|
||||||
def get_paper(self):
|
def get_paper(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][2]
|
return _PluginMgr.drawdoc_list[self.get_active()][2]
|
||||||
|
|
||||||
def get_styles(self):
|
def get_styles(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][3]
|
return _PluginMgr.drawdoc_list[self.get_active()][3]
|
||||||
|
|
||||||
def get_ext(self):
|
def get_ext(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][4]
|
return _PluginMgr.drawdoc_list[self.get_active()][4]
|
||||||
|
|
||||||
def get_printable(self):
|
def get_printable(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][5]
|
return _PluginMgr.drawdoc_list[self.get_active()][5]
|
||||||
|
|
||||||
def get_clname(self):
|
def get_clname(self):
|
||||||
return PluginMgr.drawdoc_list[self.get_active()][6]
|
return _PluginMgr.drawdoc_list[self.get_active()][6]
|
||||||
|
|
||||||
class GrampsBookFormatComboBox(gtk.ComboBox):
|
class GrampsBookFormatComboBox(gtk.ComboBox):
|
||||||
|
|
||||||
@ -2052,10 +2052,10 @@ class GrampsBookFormatComboBox(gtk.ComboBox):
|
|||||||
|
|
||||||
out_pref = Config.get_output_preference()
|
out_pref = Config.get_output_preference()
|
||||||
index = 0
|
index = 0
|
||||||
PluginMgr.drawdoc_list.sort()
|
_PluginMgr.drawdoc_list.sort()
|
||||||
active_index = 0
|
active_index = 0
|
||||||
self.data = []
|
self.data = []
|
||||||
for item in PluginMgr.bookdoc_list:
|
for item in _PluginMgr.bookdoc_list:
|
||||||
if tables and item[2] == 0:
|
if tables and item[2] == 0:
|
||||||
continue
|
continue
|
||||||
self.data.append(item)
|
self.data.append(item)
|
||||||
|
@ -20,7 +20,16 @@
|
|||||||
|
|
||||||
# $Id: Report.py 6044 2006-03-03 00:10:52Z rshura $
|
# $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 _Report as Report
|
||||||
import _ReportOptions as ReportOptions
|
import _ReportOptions as ReportOptions
|
||||||
import _ReportUtils as ReportUtils
|
import _ReportUtils as ReportUtils
|
||||||
import _Tool as Tool
|
import _Tool as Tool
|
||||||
|
import _Plugins as Plugins
|
||||||
|
@ -52,8 +52,6 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import DisplayState
|
import DisplayState
|
||||||
import const
|
import const
|
||||||
import PluginMgr
|
|
||||||
import Plugins
|
|
||||||
import Config
|
import Config
|
||||||
import GrampsDb
|
import GrampsDb
|
||||||
import GrampsCfg
|
import GrampsCfg
|
||||||
@ -66,7 +64,9 @@ import TipOfDay
|
|||||||
import Bookmarks
|
import Bookmarks
|
||||||
import RecentFiles
|
import RecentFiles
|
||||||
import NameDisplay
|
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 Mime
|
||||||
import Config
|
import Config
|
||||||
import GrampsWidgets
|
import GrampsWidgets
|
||||||
@ -182,7 +182,7 @@ class ViewManager:
|
|||||||
|
|
||||||
self.statusbar = gtk.Statusbar()
|
self.statusbar = gtk.Statusbar()
|
||||||
|
|
||||||
self.RelClass = PluginMgr.relationship_class
|
self.RelClass = relationship_class
|
||||||
|
|
||||||
vbox = gtk.VBox()
|
vbox = gtk.VBox()
|
||||||
self.window.add(vbox)
|
self.window.add(vbox)
|
||||||
@ -264,19 +264,19 @@ class ViewManager:
|
|||||||
self.change_page(None,None)
|
self.change_page(None,None)
|
||||||
self.actiongroup.set_visible(False)
|
self.actiongroup.set_visible(False)
|
||||||
self.fileactions.set_sensitive(False)
|
self.fileactions.set_sensitive(False)
|
||||||
self.load_plugins()
|
self.do_load_plugins()
|
||||||
self.build_tools_menu()
|
self.build_tools_menu()
|
||||||
self.build_report_menu()
|
self.build_report_menu()
|
||||||
self.fileactions.set_sensitive(True)
|
self.fileactions.set_sensitive(True)
|
||||||
self.uistate.widget.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...'))
|
self.uistate.status_text(_('Loading document formats...'))
|
||||||
error = PluginMgr.load_plugins(const.docgenDir)
|
error = load_plugins(const.docgenDir)
|
||||||
error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/docgen"))
|
error |= load_plugins(os.path.expanduser("~/.gramps/docgen"))
|
||||||
self.uistate.status_text(_('Loading plugins...'))
|
self.uistate.status_text(_('Loading plugins...'))
|
||||||
error |= PluginMgr.load_plugins(const.pluginsDir)
|
error |= load_plugins(const.pluginsDir)
|
||||||
error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/plugins"))
|
error |= load_plugins(os.path.expanduser("~/.gramps/plugins"))
|
||||||
if Config.get_pop_plugin_status() and error:
|
if Config.get_pop_plugin_status() and error:
|
||||||
Plugins.PluginStatus(self)
|
Plugins.PluginStatus(self)
|
||||||
self.uistate.push_message(_('Ready'))
|
self.uistate.push_message(_('Ready'))
|
||||||
@ -546,7 +546,7 @@ class ViewManager:
|
|||||||
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
|
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
|
||||||
|
|
||||||
# Add more data type selections if opening existing db
|
# 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_filter = data[1]
|
||||||
mime_type = data[2]
|
mime_type = data[2]
|
||||||
native_format = data[2]
|
native_format = data[2]
|
||||||
@ -597,7 +597,7 @@ class ViewManager:
|
|||||||
# The above native formats did not work, so we need to
|
# The above native formats did not work, so we need to
|
||||||
# look up the importer for this format
|
# look up the importer for this format
|
||||||
# and create an empty native database to import data in
|
# 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:
|
# if filetype == mime_type or the_file == mime_type:
|
||||||
# QuestionDialog.OkDialog(
|
# QuestionDialog.OkDialog(
|
||||||
# _("Opening non-native format"),
|
# _("Opening non-native format"),
|
||||||
@ -903,7 +903,7 @@ class ViewManager:
|
|||||||
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
|
format_list = [const.app_gramps,const.app_gramps_xml,const.app_gedcom]
|
||||||
|
|
||||||
# Add more data type selections if opening existing db
|
# 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_filter = data[1]
|
||||||
mime_type = data[2]
|
mime_type = data[2]
|
||||||
native_format = data[3]
|
native_format = data[3]
|
||||||
@ -955,7 +955,7 @@ class ViewManager:
|
|||||||
(the_path,the_file) = os.path.split(filename)
|
(the_path,the_file) = os.path.split(filename)
|
||||||
Config.save_last_import_dir(the_path)
|
Config.save_last_import_dir(the_path)
|
||||||
for (importData,mime_filter,mime_type,
|
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:
|
if filetype == mime_type or the_file == mime_type:
|
||||||
self._do_import(choose,importData,filename)
|
self._do_import(choose,importData,filename)
|
||||||
return True
|
return True
|
||||||
@ -982,7 +982,7 @@ class ViewManager:
|
|||||||
def build_tools_menu(self):
|
def build_tools_menu(self):
|
||||||
self.toolactions = gtk.ActionGroup('ToolWindow')
|
self.toolactions = gtk.ActionGroup('ToolWindow')
|
||||||
(ui,actions) = self.build_plugin_menu('ToolsMenu',
|
(ui,actions) = self.build_plugin_menu('ToolsMenu',
|
||||||
PluginMgr.tool_list,
|
tool_list,
|
||||||
Tool.tool_categories,
|
Tool.tool_categories,
|
||||||
make_tool_callback)
|
make_tool_callback)
|
||||||
self.toolactions.add_actions(actions)
|
self.toolactions.add_actions(actions)
|
||||||
@ -992,7 +992,7 @@ class ViewManager:
|
|||||||
def build_report_menu(self):
|
def build_report_menu(self):
|
||||||
self.reportactions = gtk.ActionGroup('ReportWindow')
|
self.reportactions = gtk.ActionGroup('ReportWindow')
|
||||||
(ui,actions) = self.build_plugin_menu('ReportsMenu',
|
(ui,actions) = self.build_plugin_menu('ReportsMenu',
|
||||||
PluginMgr.report_list,
|
report_list,
|
||||||
Report.standalone_categories,
|
Report.standalone_categories,
|
||||||
make_report_callback)
|
make_report_callback)
|
||||||
self.reportactions.add_actions(actions)
|
self.reportactions.add_actions(actions)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -26,21 +26,25 @@ Provides a BaseDoc based interface to the AbiWord document format.
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Imported Modules
|
# Python Modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Gramps Modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import Errors
|
import Errors
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import Mime
|
import Mime
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
from gettext import gettext as _
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Class Definitions
|
# Class Definitions
|
||||||
@ -333,6 +337,6 @@ try:
|
|||||||
print_label=_("Open in %s") % prog[1]
|
print_label=_("Open in %s") % prog[1]
|
||||||
else:
|
else:
|
||||||
print_label=None
|
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:
|
except:
|
||||||
PluginMgr.register_text_doc(_('AbiWord document'),AbiWordDoc,1,1,1,".abw", None)
|
register_text_doc(_('AbiWord document'),AbiWordDoc,1,1,1,".abw", None)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -34,7 +34,7 @@ from gettext import gettext as _
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import Errors
|
import Errors
|
||||||
import Mime
|
import Mime
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ try:
|
|||||||
else:
|
else:
|
||||||
print_label=None
|
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:
|
except:
|
||||||
PluginMgr.register_text_doc(_("Plain Text"),AsciiDoc,1,1,1,".txt", None)
|
register_text_doc(_("Plain Text"),AsciiDoc,1,1,1,".txt", None)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ from gettext import gettext as _
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import tarfile
|
import tarfile
|
||||||
import const
|
import const
|
||||||
@ -506,6 +506,6 @@ try:
|
|||||||
print_label=_("Open in %s") % prog[1]
|
print_label=_("Open in %s") % prog[1]
|
||||||
else:
|
else:
|
||||||
print_label=None
|
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:
|
except:
|
||||||
PluginMgr.register_text_doc(_('HTML'),HtmlDoc,1,0,1,".html", None)
|
register_text_doc(_('HTML'),HtmlDoc,1,0,1,".html", None)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -20,21 +20,34 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
import BaseDoc
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Python modules
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
import time
|
import time
|
||||||
import cStringIO
|
import cStringIO
|
||||||
import gzip
|
import gzip
|
||||||
import os
|
import os
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Gramps modules
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
import BaseDoc
|
||||||
import Errors
|
import Errors
|
||||||
from TarFile import TarFile
|
from TarFile import TarFile
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import Mime
|
import Mime
|
||||||
|
|
||||||
from gettext import gettext as _
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
def points(val):
|
def points(val):
|
||||||
inch = float(val)/2.54
|
inch = float(val)/2.54
|
||||||
return (int(inch*72))
|
return (int(inch*72))
|
||||||
@ -495,6 +508,6 @@ try:
|
|||||||
print_label=_("Open in %s") % prog[1]
|
print_label=_("Open in %s") % prog[1]
|
||||||
else:
|
else:
|
||||||
print_label=None
|
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:
|
except:
|
||||||
PluginMgr.register_text_doc(_('KWord'), KwordDoc, 1, 1, 1, ".kwd", print_label)
|
register_text_doc(_('KWord'), KwordDoc, 1, 1, 1, ".kwd", print_label)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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:
|
# Modifications and feature additions:
|
||||||
# 2002 Donald A. Peterson
|
# 2002 Donald A. Peterson
|
||||||
@ -61,8 +61,9 @@ else:
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import PluginMgr
|
from PluginUtils import ReportUtils, \
|
||||||
from ReportUtils import rgb_color
|
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
|
# Register the document generator with the system
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
PluginMgr.register_text_doc(
|
register_text_doc(
|
||||||
name=_("Print..."),
|
name=_("Print..."),
|
||||||
classref=LPRDoc,
|
classref=LPRDoc,
|
||||||
table=1,
|
table=1,
|
||||||
@ -1255,7 +1256,7 @@ PluginMgr.register_text_doc(
|
|||||||
print_report_label=None,
|
print_report_label=None,
|
||||||
clname='print')
|
clname='print')
|
||||||
|
|
||||||
PluginMgr.register_book_doc(
|
register_book_doc(
|
||||||
_("Print..."),
|
_("Print..."),
|
||||||
LPRDoc,
|
LPRDoc,
|
||||||
1,
|
1,
|
||||||
@ -1264,7 +1265,7 @@ PluginMgr.register_book_doc(
|
|||||||
"",
|
"",
|
||||||
'print')
|
'print')
|
||||||
|
|
||||||
PluginMgr.register_draw_doc(
|
register_draw_doc(
|
||||||
_("Print..."),
|
_("Print..."),
|
||||||
LPRDoc,
|
LPRDoc,
|
||||||
1,
|
1,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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:
|
# Modifications and feature additions:
|
||||||
# 2002-2003 Donald A. Peterson
|
# 2002-2003 Donald A. Peterson
|
||||||
@ -41,7 +41,7 @@ from gettext import gettext as _
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import Errors
|
import Errors
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ class LaTeXDoc(BaseDoc.BaseDoc):
|
|||||||
# Register the document generator with the system
|
# Register the document generator with the system
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
PluginMgr.register_text_doc(
|
register_text_doc(
|
||||||
name=_("LaTeX"),
|
name=_("LaTeX"),
|
||||||
classref=LaTeXDoc,
|
classref=LaTeXDoc,
|
||||||
table=1,
|
table=1,
|
||||||
|
@ -41,11 +41,12 @@ from math import pi, cos, sin, fabs
|
|||||||
import Errors
|
import Errors
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import const
|
import const
|
||||||
import PluginMgr
|
import PluginUtils import ReportUtils, \
|
||||||
|
register_text_doc, register_draw_doc, register_book_doc
|
||||||
|
pt2cm = ReportUtils.pt2cm
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import FontScale
|
import FontScale
|
||||||
import Mime
|
import Mime
|
||||||
from ReportUtils import pt2cm
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1141,13 +1142,10 @@ try:
|
|||||||
else:
|
else:
|
||||||
print_label = None
|
print_label = None
|
||||||
|
|
||||||
PluginMgr.register_text_doc(mtype,ODFDoc,1,1,1,".odt",print_label)
|
register_text_doc(mtype,ODFDoc,1,1,1,".odt",print_label)
|
||||||
PluginMgr.register_book_doc(mtype,ODFDoc,1,1,1,".odt")
|
register_book_doc(mtype,ODFDoc,1,1,1,".odt")
|
||||||
PluginMgr.register_draw_doc(mtype,ODFDoc,1,1, ".odt",print_label);
|
register_draw_doc(mtype,ODFDoc,1,1, ".odt",print_label);
|
||||||
except:
|
except:
|
||||||
PluginMgr.register_text_doc(_('Open Document Text'),
|
register_text_doc(_('Open Document Text'),ODFDoc,1,1,1,".odt", None)
|
||||||
ODFDoc,1,1,1,".odt", None)
|
register_book_doc(_("Open Document Text"),ODFDoc,1,1,1,".odt")
|
||||||
PluginMgr.register_book_doc(_("Open Document Text"),
|
register_draw_doc(_("Open Document Text"),ODFDoc,1,1,".odt",None);
|
||||||
ODFDoc,1,1,1,".odt")
|
|
||||||
PluginMgr.register_draw_doc(_("Open Document Text"),
|
|
||||||
ODFDoc,1,1,".odt",None);
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -31,6 +31,8 @@ import time
|
|||||||
import locale
|
import locale
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from math import pi, cos, sin, fabs
|
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 Errors
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import const
|
import const
|
||||||
import PluginMgr
|
from PluginUtils import ReportUtils, \
|
||||||
|
register_text_doc, register_draw_doc, register_book_doc
|
||||||
|
pt2cm = ReportUtils.pt2cm
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import FontScale
|
import FontScale
|
||||||
import Mime
|
import Mime
|
||||||
import Utils
|
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'
|
_apptype = 'application/vnd.sun.xml.writer'
|
||||||
|
|
||||||
_esc_map = {
|
_esc_map = {
|
||||||
@ -1003,10 +1003,12 @@ try:
|
|||||||
else:
|
else:
|
||||||
print_label = None
|
print_label = None
|
||||||
|
|
||||||
PluginMgr.register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label)
|
register_text_doc(mtype,OpenOfficeDoc,1,1,1,".sxw",print_label)
|
||||||
PluginMgr.register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw")
|
register_book_doc(mtype,OpenOfficeDoc,1,1,1,".sxw")
|
||||||
PluginMgr.register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxw",print_label);
|
register_draw_doc(mtype,OpenOfficeDoc,1,1, ".sxw",print_label);
|
||||||
except:
|
except:
|
||||||
PluginMgr.register_text_doc(_('OpenOffice.org Writer'), OpenOfficeDoc,1,1,1,".sxw", None)
|
register_text_doc(_('OpenOffice.org Writer'),
|
||||||
PluginMgr.register_book_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,1,1,1,".sxw")
|
OpenOfficeDoc,1,1,1,".sxw", None)
|
||||||
PluginMgr.register_draw_doc(_("OpenOffice.org Writer"), OpenOfficeDoc,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);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -33,11 +33,10 @@ from gettext import gettext as _
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import PluginMgr
|
from PluginUtils import register_draw_doc, ReportUtils, Report
|
||||||
|
pt2cm, rgb_color = ReportUtils.pt2cm, ReportUtils.rgb_color
|
||||||
import Errors
|
import Errors
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from Report import run_print_dialog
|
|
||||||
from ReportUtils import pt2cm, rgb_color
|
|
||||||
from Utils import gformat
|
from Utils import gformat
|
||||||
|
|
||||||
def lrgb(grp):
|
def lrgb(grp):
|
||||||
@ -137,7 +136,7 @@ class PSDrawDoc(BaseDoc.BaseDoc):
|
|||||||
self.f.write('%%EOF\n')
|
self.f.write('%%EOF\n')
|
||||||
self.f.close()
|
self.f.close()
|
||||||
if self.print_req:
|
if self.print_req:
|
||||||
run_print_dialog (self.filename)
|
Report.run_print_dialog (self.filename)
|
||||||
|
|
||||||
def write_text(self,text):
|
def write_text(self,text):
|
||||||
pass
|
pass
|
||||||
@ -420,5 +419,5 @@ class PSDrawDoc(BaseDoc.BaseDoc):
|
|||||||
self.f.write("(%s) show\n" % lines[i])
|
self.f.write("(%s) show\n" % lines[i])
|
||||||
self.f.write('grestore\n')
|
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"));
|
_("Print a copy"));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -33,7 +33,7 @@ from gettext import gettext as _
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc, register_draw_doc, register_book_doc
|
||||||
import Errors
|
import Errors
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import Mime
|
import Mime
|
||||||
@ -643,14 +643,12 @@ try:
|
|||||||
print_label=_("Open in %s") % mprog[1]
|
print_label=_("Open in %s") % mprog[1]
|
||||||
else:
|
else:
|
||||||
print_label=None
|
print_label=None
|
||||||
PluginMgr.register_text_doc(mtype, PdfDoc, 1, 1, 1, ".pdf", print_label)
|
register_text_doc(mtype, PdfDoc, 1, 1, 1, ".pdf", print_label)
|
||||||
PluginMgr.register_draw_doc(mtype, PdfDoc, 1, 1, ".pdf", print_label)
|
register_draw_doc(mtype, PdfDoc, 1, 1, ".pdf", print_label)
|
||||||
PluginMgr.register_book_doc(mtype,classref=PdfDoc,
|
register_book_doc(mtype,classref=PdfDoc,
|
||||||
table=1,paper=1,style=1,ext=".pdf")
|
table=1,paper=1,style=1,ext=".pdf")
|
||||||
except:
|
except:
|
||||||
PluginMgr.register_text_doc(_('PDF document'), PdfDoc,
|
register_text_doc(_('PDF document'), PdfDoc,1, 1, 1,".pdf", None)
|
||||||
1, 1, 1,".pdf", None)
|
register_draw_doc(_('PDF document'), PdfDoc,1, 1, ".pdf", None)
|
||||||
PluginMgr.register_draw_doc(_('PDF document'), PdfDoc,
|
register_book_doc(name=_("PDF document"),classref=PdfDoc,
|
||||||
1, 1, ".pdf", None)
|
|
||||||
PluginMgr.register_book_doc(name=_("PDF document"),classref=PdfDoc,
|
|
||||||
table=1,paper=1,style=1,ext=".pdf")
|
table=1,paper=1,style=1,ext=".pdf")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -34,7 +34,7 @@ from gettext import gettext as _
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import PluginMgr
|
from PluginUtils import register_text_doc
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import Errors
|
import Errors
|
||||||
import Mime
|
import Mime
|
||||||
@ -427,6 +427,6 @@ try:
|
|||||||
print_label=_("Open in %s") % mprog[1]
|
print_label=_("Open in %s") % mprog[1]
|
||||||
else:
|
else:
|
||||||
print_label=None
|
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:
|
except:
|
||||||
PluginMgr.register_text_doc(_('RTF document'), RTFDoc, 1, 1, 1, ".rtf", None)
|
register_text_doc(_('RTF document'), RTFDoc, 1, 1, 1, ".rtf", None)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -25,16 +25,15 @@
|
|||||||
# python modules
|
# python modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import string
|
|
||||||
from math import pi, cos, sin, fabs
|
from math import pi, cos, sin, fabs
|
||||||
|
from gettext import gettext as _
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import PluginMgr
|
from PluginUtils import register_draw_doc
|
||||||
from gettext import gettext as _
|
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import Errors
|
import Errors
|
||||||
|
|
||||||
@ -200,7 +199,7 @@ class SvgDrawDoc(BaseDoc.BaseDoc):
|
|||||||
if text != "":
|
if text != "":
|
||||||
font = p.get_font()
|
font = p.get_font()
|
||||||
font_size = font.get_size()
|
font_size = font.get_size()
|
||||||
lines = string.split(text,'\n')
|
lines = text.split('\n')
|
||||||
nlines = len(lines)
|
nlines = len(lines)
|
||||||
mar = 10/28.35
|
mar = 10/28.35
|
||||||
fs = (font_size/28.35) * 1.2
|
fs = (font_size/28.35) * 1.2
|
||||||
@ -261,4 +260,4 @@ def units(val):
|
|||||||
# Register document generator
|
# 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");
|
||||||
|
@ -44,10 +44,8 @@ import Config
|
|||||||
import GrampsCfg
|
import GrampsCfg
|
||||||
import const
|
import const
|
||||||
import Errors
|
import Errors
|
||||||
import PluginMgr
|
|
||||||
import TipOfDay
|
import TipOfDay
|
||||||
import DataViews
|
import DataViews
|
||||||
|
|
||||||
from Mime import mime_type_is_defined
|
from Mime import mime_type_is_defined
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
from SubstKeywords import SubstKeywords
|
from SubstKeywords import SubstKeywords
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
|
|
||||||
@ -260,7 +260,6 @@ class AncestorChartOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'ancestor_chart',
|
name = 'ancestor_chart',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -44,7 +44,7 @@ import gtk
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from SubstKeywords import SubstKeywords
|
from SubstKeywords import SubstKeywords
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
cm2pt = ReportUtils.cm2pt
|
cm2pt = ReportUtils.cm2pt
|
||||||
|
|
||||||
@ -512,7 +512,6 @@ class AncestorChartOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'ancestor_chart2',
|
name = 'ancestor_chart2',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -35,7 +35,7 @@ from gettext import gettext as _
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportUtils, ReportOptions
|
from PluginUtils import Report, ReportUtils, ReportOptions, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import Errors
|
import Errors
|
||||||
import NameDisplay
|
import NameDisplay
|
||||||
@ -191,7 +191,6 @@ class AncestorOptions(ReportOptions.ReportOptions):
|
|||||||
# Register the plugin
|
# Register the plugin
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'ancestor_report',
|
name = 'ancestor_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -42,10 +42,10 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, \
|
||||||
|
register_report, relationship_class
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import RelLib
|
import RelLib
|
||||||
import PluginMgr
|
|
||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
from NameDisplay import displayer as _nd
|
from NameDisplay import displayer as _nd
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
|||||||
|
|
||||||
self.sources = []
|
self.sources = []
|
||||||
self.sourcerefs = []
|
self.sourcerefs = []
|
||||||
self.RelClass = PluginMgr.relationship_class
|
self.RelClass = relationship_class
|
||||||
self.relationship = self.RelClass(database)
|
self.relationship = self.RelClass(database)
|
||||||
|
|
||||||
def define_table_styles(self):
|
def define_table_styles(self):
|
||||||
@ -957,7 +957,7 @@ class ComprehensiveAncestorsOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
PluginMgr.register_report(
|
register_report(
|
||||||
name = 'ancestors_report',
|
name = 'ancestors_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
report_class = ComprehensiveAncestorsReport,
|
report_class = ComprehensiveAncestorsReport,
|
||||||
|
@ -66,8 +66,7 @@ from RelLib import Person
|
|||||||
|
|
||||||
import Utils
|
import Utils
|
||||||
import ListModel
|
import ListModel
|
||||||
import PluginMgr
|
from PluginUtils import Report, ReportOptions, bkitems_list, register_report
|
||||||
from PluginUtils import Report, ReportOptions
|
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from QuestionDialog import WarningDialog
|
from QuestionDialog import WarningDialog
|
||||||
import Plugins
|
import Plugins
|
||||||
@ -118,7 +117,7 @@ class BookItem:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
self.clear()
|
self.clear()
|
||||||
for item in PluginMgr.bkitems_list:
|
for item in bkitems_list:
|
||||||
if item[4] == name:
|
if item[4] == name:
|
||||||
self.translated_name = item[0]
|
self.translated_name = item[0]
|
||||||
if item[5]:
|
if item[5]:
|
||||||
@ -660,10 +659,10 @@ class BookReportSelector:
|
|||||||
The selections are read from the book item registry.
|
The selections are read from the book item registry.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not PluginMgr.bkitems_list:
|
if not bkitems_list:
|
||||||
return
|
return
|
||||||
|
|
||||||
for book_item in PluginMgr.bkitems_list:
|
for book_item in bkitems_list:
|
||||||
if book_item[5]:
|
if book_item[5]:
|
||||||
category = Plugins.UNSUPPORTED
|
category = Plugins.UNSUPPORTED
|
||||||
else:
|
else:
|
||||||
@ -1118,7 +1117,7 @@ def cl_report(database,name,category,options_str_dict):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
PluginMgr.register_report(
|
register_report(
|
||||||
name = 'book',
|
name = 'book',
|
||||||
category = Report.CATEGORY_BOOK,
|
category = Report.CATEGORY_BOOK,
|
||||||
report_class = BookReportSelector,
|
report_class = BookReportSelector,
|
||||||
|
@ -38,7 +38,7 @@ import locale
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
from DateHandler import DateDisplay
|
from DateHandler import DateDisplay
|
||||||
@ -927,7 +927,6 @@ class Holidays:
|
|||||||
# Register this plugin
|
# Register this plugin
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'calendar',
|
name = 'calendar',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -39,7 +39,6 @@ from gettext import gettext as _
|
|||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import GrampsDisplay
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -48,7 +47,8 @@ import GrampsDisplay
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
from QuestionDialog import OkDialog
|
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(
|
register_tool(
|
||||||
name = 'chname',
|
name = 'chname',
|
||||||
category = Tool.TOOL_DBPROC,
|
category = Tool.TOOL_DBPROC,
|
||||||
|
@ -47,7 +47,7 @@ import const
|
|||||||
import Utils
|
import Utils
|
||||||
from QuestionDialog import OkDialog
|
from QuestionDialog import OkDialog
|
||||||
import AutoComp
|
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(
|
register_tool(
|
||||||
name = 'chtype',
|
name = 'chtype',
|
||||||
category = Tool.TOOL_DBPROC,
|
category = Tool.TOOL_DBPROC,
|
||||||
|
@ -56,7 +56,7 @@ import gtk.glade
|
|||||||
import RelLib
|
import RelLib
|
||||||
import Utils
|
import Utils
|
||||||
import const
|
import const
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
from QuestionDialog import OkDialog, MissingMediaDialog
|
from QuestionDialog import OkDialog, MissingMediaDialog
|
||||||
|
|
||||||
|
|
||||||
@ -938,8 +938,6 @@ class CheckOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'check',
|
name = 'check',
|
||||||
category = Tool.TOOL_DBFIX,
|
category = Tool.TOOL_DBFIX,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -48,7 +48,7 @@ import gtk.glade
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from QuestionDialog import OkDialog, ErrorDialog
|
from QuestionDialog import OkDialog, ErrorDialog
|
||||||
import WriteXML
|
import WriteXML
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
import Utils
|
import Utils
|
||||||
import GrampsDisplay
|
import GrampsDisplay
|
||||||
|
|
||||||
@ -418,8 +418,6 @@ class CheckpointOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'chkpoint',
|
name = 'chkpoint',
|
||||||
category = Tool.TOOL_REVCTL,
|
category = Tool.TOOL_REVCTL,
|
||||||
|
@ -37,9 +37,8 @@ from gettext import gettext as _
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginUtils import Tool, Report
|
from PluginUtils import Tool, Report, cl_list, cli_tool_list, register_tool
|
||||||
import Utils
|
import Utils
|
||||||
import PluginMgr
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -95,12 +94,12 @@ class CmdRef(Tool.Tool):
|
|||||||
f.write(' <title>Reports</title>\n')
|
f.write(' <title>Reports</title>\n')
|
||||||
|
|
||||||
# Common report options
|
# Common report options
|
||||||
item = PluginMgr.cl_list[0]
|
item = cl_list[0]
|
||||||
clr = Report.CommandLineReport(db,item[0],item[1],item[3],{},True)
|
clr = Report.CommandLineReport(db,item[0],item[1],item[3],{},True)
|
||||||
self.write_ref(f,clr,level+2,id_counter,True)
|
self.write_ref(f,clr,level+2,id_counter,True)
|
||||||
id_counter = id_counter + 1
|
id_counter = id_counter + 1
|
||||||
|
|
||||||
for item in PluginMgr.cl_list:
|
for item in cl_list:
|
||||||
category = item[1]
|
category = item[1]
|
||||||
if category in (Report.CATEGORY_BOOK,
|
if category in (Report.CATEGORY_BOOK,
|
||||||
Report.CATEGORY_CODE,
|
Report.CATEGORY_CODE,
|
||||||
@ -116,12 +115,12 @@ class CmdRef(Tool.Tool):
|
|||||||
f.write(' <title>Tools</title>\n')
|
f.write(' <title>Tools</title>\n')
|
||||||
|
|
||||||
# Common tool options
|
# 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)
|
clr = Tool.CommandLineTool(db,item[0],item[1],item[3],{},True)
|
||||||
self.write_ref(f,clr,level+2,id_counter,True)
|
self.write_ref(f,clr,level+2,id_counter,True)
|
||||||
id_counter = id_counter + 1
|
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)
|
self.write_ref(f,item,level+2,id_counter)
|
||||||
id_counter = id_counter + 1
|
id_counter = id_counter + 1
|
||||||
f.write(' </%s>\n' % _tags[level+1] )
|
f.write(' </%s>\n' % _tags[level+1] )
|
||||||
@ -244,8 +243,6 @@ class CmdRefOptions(Tool.ToolOptions):
|
|||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
|
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'cmdref',
|
name = 'cmdref',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = Tool.TOOL_DEBUG,
|
||||||
|
@ -45,7 +45,7 @@ import gtk.glade
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
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(
|
register_report(
|
||||||
name = 'count_ancestors',
|
name = 'count_ancestors',
|
||||||
category = Report.CATEGORY_VIEW,
|
category = Report.CATEGORY_VIEW,
|
||||||
|
@ -41,7 +41,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions
|
from PluginUtils import Report, ReportOptions, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -208,7 +208,6 @@ class CustomTextOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'custom_text',
|
name = 'custom_text',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -41,7 +41,7 @@ import gtk
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from SubstKeywords import SubstKeywords
|
from SubstKeywords import SubstKeywords
|
||||||
@ -399,7 +399,6 @@ class DescendantGraphOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'descendant_graph',
|
name = 'descendant_graph',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -37,7 +37,7 @@ from gettext import gettext as _
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import NameDisplay
|
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(
|
register_tool(
|
||||||
name = 'dbrowse',
|
name = 'dbrowse',
|
||||||
category = Tool.TOOL_ANAL,
|
category = Tool.TOOL_ANAL,
|
||||||
|
@ -43,7 +43,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
cm2pt = ReportUtils.cm2pt
|
cm2pt = ReportUtils.cm2pt
|
||||||
from SubstKeywords import SubstKeywords
|
from SubstKeywords import SubstKeywords
|
||||||
@ -463,7 +463,6 @@ class DescendChartOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'descend_chart2',
|
name = 'descend_chart2',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -35,7 +35,7 @@ from gettext import gettext as _
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import Errors
|
import Errors
|
||||||
import Sort
|
import Sort
|
||||||
@ -246,7 +246,6 @@ class DescendantOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'descend_report',
|
name = 'descend_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -44,7 +44,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import RelLib
|
import RelLib
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import const
|
import const
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
@ -839,7 +839,6 @@ class DetAncestorOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'det_ancestor_report',
|
name = 'det_ancestor_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -45,7 +45,7 @@ import gtk
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import RelLib
|
import RelLib
|
||||||
import Errors
|
import Errors
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import const
|
import const
|
||||||
from DateHandler import displayer as _dd
|
from DateHandler import displayer as _dd
|
||||||
@ -874,7 +874,6 @@ class DetDescendantOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'det_descendant_report',
|
name = 'det_descendant_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import ListModel
|
import ListModel
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
_GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
|
_GENDER = [ _(u'female'), _(u'male'), _(u'unknown') ]
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -91,8 +91,6 @@ class DumpGenderStatsOptions(Tool.ToolOptions):
|
|||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
|
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'dgenstats',
|
name = 'dgenstats',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = Tool.TOOL_DEBUG,
|
||||||
|
@ -47,7 +47,7 @@ import gtk.glade
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -146,8 +146,6 @@ class EvalOptions(Tool.ToolOptions):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'eval',
|
name = 'eval',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = Tool.TOOL_DEBUG,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -53,7 +53,7 @@ import OpenSpreadSheet
|
|||||||
import const
|
import const
|
||||||
import DateHandler
|
import DateHandler
|
||||||
from QuestionDialog import WarningDialog
|
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(
|
register_tool(
|
||||||
name = 'eventcmp',
|
name = 'eventcmp',
|
||||||
category = Tool.TOOL_ANAL,
|
category = Tool.TOOL_ANAL,
|
||||||
|
@ -58,6 +58,7 @@ from RelLib import Date
|
|||||||
import Errors
|
import Errors
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from QuestionDialog import ErrorDialog
|
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)
|
_config = (_('vCalendar export options'),CalendarWriterOptionBox)
|
||||||
_filename = 'vcs'
|
_filename = 'vcs'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(exportData,_title,_description,_config,_filename)
|
register_export(exportData,_title,_description,_config,_filename)
|
||||||
|
@ -56,6 +56,7 @@ from RelLib import Date
|
|||||||
import Errors
|
import Errors
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from QuestionDialog import ErrorDialog
|
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)
|
_config = (_('vCard export options'),CardWriterOptionBox)
|
||||||
_filename = 'vcf'
|
_filename = 'vcf'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(exportData,_title,_description,_config,_filename)
|
register_export(exportData,_title,_description,_config,_filename)
|
||||||
|
@ -42,7 +42,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import RelLib
|
import RelLib
|
||||||
from PluginUtils import Report, ReportOptions
|
from PluginUtils import Report, ReportOptions, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import const
|
import const
|
||||||
import DateHandler
|
import DateHandler
|
||||||
@ -737,7 +737,6 @@ class FamilyGroupOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'family_group',
|
name = 'family_group',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -40,7 +40,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
from SubstKeywords import SubstKeywords
|
from SubstKeywords import SubstKeywords
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
|
|
||||||
@ -312,7 +312,6 @@ class FanChartOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'fan_chart',
|
name = 'fan_chart',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -61,7 +61,7 @@ import AutoComp
|
|||||||
import ListModel
|
import ListModel
|
||||||
import Utils
|
import Utils
|
||||||
import SelectPerson
|
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(
|
register_tool(
|
||||||
name = 'cfilted',
|
name = 'cfilted',
|
||||||
category = Tool.TOOL_UTILS,
|
category = Tool.TOOL_UTILS,
|
||||||
|
@ -38,7 +38,7 @@ import BaseDoc
|
|||||||
import RelLib
|
import RelLib
|
||||||
import DateHandler
|
import DateHandler
|
||||||
import const
|
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(
|
register_report(
|
||||||
name = 'ftm_ancestor_report',
|
name = 'ftm_ancestor_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -37,7 +37,7 @@ from gettext import gettext as _
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import RelLib
|
import RelLib
|
||||||
import DateHandler
|
import DateHandler
|
||||||
@ -560,7 +560,6 @@ class FtmDescendantOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'ftm_descendant_report',
|
name = 'ftm_descendant_report',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -52,7 +52,7 @@ import gtk
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions
|
from PluginUtils import Report, ReportOptions, register_report
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
import RelLib
|
import RelLib
|
||||||
import DateHandler
|
import DateHandler
|
||||||
@ -961,7 +961,6 @@ def get_description_graphics():
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'rel_graph',
|
name = 'rel_graph',
|
||||||
category = Report.CATEGORY_CODE,
|
category = Report.CATEGORY_CODE,
|
||||||
|
@ -57,6 +57,7 @@ import RelLib
|
|||||||
import const
|
import const
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
from DateHandler import parser as _dp
|
from DateHandler import parser as _dp
|
||||||
|
from PluginUtils import register_import
|
||||||
from htmlentitydefs import name2codepoint
|
from htmlentitydefs import name2codepoint
|
||||||
|
|
||||||
_date_parse = re.compile('([~?<>]+)?([0-9/]+)([J|H|F])?(\.\.)?([0-9/]+)?([J|H|F])?')
|
_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)
|
_filter.add_mime_type(_mime_type)
|
||||||
_format_name = _('GeneWeb')
|
_format_name = _('GeneWeb')
|
||||||
|
|
||||||
from PluginMgr import register_import
|
|
||||||
register_import(importData,_filter,_mime_type,0,_format_name)
|
register_import(importData,_filter,_mime_type,0,_format_name)
|
||||||
|
@ -56,6 +56,7 @@ import Errors
|
|||||||
import RelLib
|
import RelLib
|
||||||
import const
|
import const
|
||||||
from QuestionDialog import ErrorDialog
|
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
|
_mime_type = const.app_vcard
|
||||||
for mime in _mime_type:
|
for mime in _mime_type:
|
||||||
_filter = gtk.FileFilter()
|
_filter = gtk.FileFilter()
|
||||||
|
@ -45,7 +45,7 @@ import const
|
|||||||
import BaseDoc
|
import BaseDoc
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
import DateHandler
|
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(
|
register_report(
|
||||||
name = 'indiv_complete',
|
name = 'indiv_complete',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -45,7 +45,7 @@ import gtk
|
|||||||
import RelLib
|
import RelLib
|
||||||
import const
|
import const
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions
|
from PluginUtils import Report, ReportOptions, register_report
|
||||||
import DateHandler
|
import DateHandler
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -378,8 +378,6 @@ class IndivSummaryOptions(ReportOptions.ReportOptions):
|
|||||||
# Register plugins
|
# Register plugins
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'individual_summary',
|
name = 'individual_summary',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -48,7 +48,7 @@ import gc
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -148,8 +148,6 @@ class LeakOptions(Tool.ToolOptions):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'eval',
|
name = 'eval',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = Tool.TOOL_DEBUG,
|
||||||
|
@ -50,7 +50,7 @@ import soundex
|
|||||||
import NameDisplay
|
import NameDisplay
|
||||||
import ListModel
|
import ListModel
|
||||||
import MergePeople
|
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(
|
register_tool(
|
||||||
name = 'dupfind',
|
name = 'dupfind',
|
||||||
category = Tool.TOOL_DBPROC,
|
category = Tool.TOOL_DBPROC,
|
||||||
|
@ -69,7 +69,7 @@ import const
|
|||||||
from GrampsCfg import get_researcher
|
from GrampsCfg import get_researcher
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
import Sort
|
import Sort
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import Errors
|
import Errors
|
||||||
import Utils
|
import Utils
|
||||||
import ImgManip
|
import ImgManip
|
||||||
@ -2871,7 +2871,6 @@ def sort_nameof(person, private):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'navwebpage',
|
name = 'navwebpage',
|
||||||
category = Report.CATEGORY_WEB,
|
category = Report.CATEGORY_WEB,
|
||||||
|
@ -32,7 +32,7 @@ from random import randint
|
|||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
from PluginUtils import register_tool
|
||||||
#
|
#
|
||||||
# Interface to phpGedView
|
# Interface to phpGedView
|
||||||
#
|
#
|
||||||
@ -425,8 +425,6 @@ else:
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
def phpGedViewImporterCaller(database,active_person,callback,parent=None):
|
def phpGedViewImporterCaller(database,active_person,callback,parent=None):
|
||||||
phpGedViewImporter(database)
|
phpGedViewImporter(database)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ import GrampsDisplay
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
from QuestionDialog import OkDialog
|
from QuestionDialog import OkDialog
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -359,8 +359,6 @@ class PatchNamesOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'patchnames',
|
name = 'patchnames',
|
||||||
category = Tool.TOOL_DBPROC,
|
category = Tool.TOOL_DBPROC,
|
||||||
|
@ -55,6 +55,7 @@ import gtk
|
|||||||
import const
|
import const
|
||||||
from GrampsDb import gramps_db_reader_factory
|
from GrampsDb import gramps_db_reader_factory
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
|
from PluginUtils import register_import
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -118,5 +119,4 @@ _filter.set_name(_('GRAMPS packages'))
|
|||||||
_filter.add_mime_type(_mime_type)
|
_filter.add_mime_type(_mime_type)
|
||||||
_format_name = _('GRAMPS package')
|
_format_name = _('GRAMPS package')
|
||||||
|
|
||||||
from PluginMgr import register_import
|
|
||||||
register_import(impData,_filter,_mime_type,0,_format_name)
|
register_import(impData,_filter,_mime_type,0,_format_name)
|
||||||
|
@ -55,7 +55,7 @@ import gtk.glade
|
|||||||
import RelLib
|
import RelLib
|
||||||
import Utils
|
import Utils
|
||||||
import const
|
import const
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
from QuestionDialog import OkDialog
|
from QuestionDialog import OkDialog
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -111,8 +111,6 @@ class RebuildOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'rebuild',
|
name = 'rebuild',
|
||||||
category = Tool.TOOL_DBFIX,
|
category = Tool.TOOL_DBFIX,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -46,10 +46,9 @@ import RelLib
|
|||||||
import Utils
|
import Utils
|
||||||
import NameDisplay
|
import NameDisplay
|
||||||
import ListModel
|
import ListModel
|
||||||
import PluginMgr
|
|
||||||
import DateHandler
|
import DateHandler
|
||||||
import PeopleModel
|
import PeopleModel
|
||||||
import Tool
|
from PluginUtils import Tool, relationship_class, register_tool
|
||||||
|
|
||||||
column_names = [
|
column_names = [
|
||||||
_('Name'),
|
_('Name'),
|
||||||
@ -78,7 +77,7 @@ class RelCalc(Tool.Tool):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
self.person = person
|
self.person = person
|
||||||
self.RelClass = PluginMgr.relationship_class
|
self.RelClass = relationship_class
|
||||||
self.relationship = self.RelClass(self.db)
|
self.relationship = self.RelClass(self.db)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.win_key = self
|
self.win_key = self
|
||||||
@ -228,7 +227,7 @@ class RelCalcOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
PluginMgr.register_tool(
|
register_tool(
|
||||||
name = 'relcalc',
|
name = 'relcalc',
|
||||||
category = Tool.TOOL_UTILS,
|
category = Tool.TOOL_UTILS,
|
||||||
tool_class = RelCalc,
|
tool_class = RelCalc,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -40,7 +40,7 @@ from gettext import gettext as _
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import RelLib
|
import RelLib
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
from QuestionDialog import WarningDialog
|
from QuestionDialog import WarningDialog
|
||||||
|
|
||||||
_findint = re.compile('^[^\d]*(\d+)[^\d]*')
|
_findint = re.compile('^[^\d]*(\d+)[^\d]*')
|
||||||
@ -197,8 +197,6 @@ class ReorderIdsOptions(Tool.ToolOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'reorder_ids',
|
name = 'reorder_ids',
|
||||||
category = Tool.TOOL_DBPROC,
|
category = Tool.TOOL_DBPROC,
|
||||||
|
@ -41,7 +41,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions
|
from PluginUtils import Report, ReportOptions, register_report
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import SelectObject
|
import SelectObject
|
||||||
import AddMedia
|
import AddMedia
|
||||||
@ -290,7 +290,6 @@ class SimpleBookTitleOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'simple_book_title',
|
name = 'simple_book_title',
|
||||||
category = Report.CATEGORY_TEXT,
|
category = Report.CATEGORY_TEXT,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -47,7 +47,7 @@ import GrampsDisplay
|
|||||||
import soundex
|
import soundex
|
||||||
import Utils
|
import Utils
|
||||||
import AutoComp
|
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(
|
register_tool(
|
||||||
name = 'soundgen',
|
name = 'soundgen',
|
||||||
category = Tool.TOOL_UTILS,
|
category = Tool.TOOL_UTILS,
|
||||||
|
@ -53,7 +53,7 @@ import gtk
|
|||||||
from RelLib import Person, Family
|
from RelLib import Person, Family
|
||||||
# gender and report type names
|
# gender and report type names
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
import DateHandler
|
import DateHandler
|
||||||
from Utils import ProgressMeter
|
from Utils import ProgressMeter
|
||||||
@ -968,8 +968,6 @@ class StatisticsChartOptions(ReportOptions.ReportOptions):
|
|||||||
# Register report/options
|
# Register report/options
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'statistics_chart',
|
name = 'statistics_chart',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -45,7 +45,7 @@ import gtk.glade
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
import RelLib
|
import RelLib
|
||||||
from PluginUtils import Report
|
from PluginUtils import Report, register_report
|
||||||
import DateHandler
|
import DateHandler
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -166,8 +166,6 @@ class SummaryReport:
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'summary',
|
name = 'summary',
|
||||||
category = Report.CATEGORY_VIEW,
|
category = Report.CATEGORY_VIEW,
|
||||||
|
@ -48,7 +48,7 @@ import gtk.glade
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Errors
|
import Errors
|
||||||
import RelLib
|
import RelLib
|
||||||
import Tool
|
from PluginUtils import Tool, register_tool
|
||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
@ -1415,8 +1415,6 @@ class TestcaseGeneratorOptions(Tool.ToolOptions):
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
from PluginMgr import register_tool
|
|
||||||
|
|
||||||
register_tool(
|
register_tool(
|
||||||
name = 'testcasegenerator',
|
name = 'testcasegenerator',
|
||||||
category = Tool.TOOL_DEBUG,
|
category = Tool.TOOL_DEBUG,
|
||||||
|
@ -44,7 +44,7 @@ import gtk
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginUtils import Report, ReportOptions, ReportUtils
|
from PluginUtils import Report, ReportOptions, ReportUtils, register_report
|
||||||
pt2cm = ReportUtils.pt2cm
|
pt2cm = ReportUtils.pt2cm
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
@ -466,8 +466,6 @@ class TimeLineOptions(ReportOptions.ReportOptions):
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from PluginMgr import register_report
|
|
||||||
|
|
||||||
register_report(
|
register_report(
|
||||||
name = 'timeline',
|
name = 'timeline',
|
||||||
category = Report.CATEGORY_DRAW,
|
category = Report.CATEGORY_DRAW,
|
||||||
|
@ -47,7 +47,7 @@ import GrampsDisplay
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import RelLib
|
import RelLib
|
||||||
import Utils
|
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(
|
register_tool(
|
||||||
name = 'verify',
|
name = 'verify',
|
||||||
category = Tool.TOOL_UTILS,
|
category = Tool.TOOL_UTILS,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -64,6 +64,7 @@ import Mime
|
|||||||
import const
|
import const
|
||||||
import QuestionDialog
|
import QuestionDialog
|
||||||
import ImgManip
|
import ImgManip
|
||||||
|
from PluginUtils import register_export
|
||||||
|
|
||||||
_title_string = _("Export to CD")
|
_title_string = _("Export to CD")
|
||||||
|
|
||||||
@ -318,5 +319,4 @@ _description = _('Exporting to CD copies all your data and media '
|
|||||||
_config = None
|
_config = None
|
||||||
_filename = 'burn'
|
_filename = 'burn'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(writeData,_title,_description,_config,_filename)
|
register_export(writeData,_title,_description,_config,_filename)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -56,6 +56,7 @@ import Utils
|
|||||||
import GenericFilter
|
import GenericFilter
|
||||||
import Errors
|
import Errors
|
||||||
from QuestionDialog import ErrorDialog
|
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)
|
_config = (_('Web Family Tree export options'),FtreeWriterOptionBox)
|
||||||
_filename = 'wft'
|
_filename = 'wft'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(writeData,_title,_description,_config,_filename)
|
register_export(writeData,_title,_description,_config,_filename)
|
||||||
|
@ -57,6 +57,7 @@ import const
|
|||||||
import Utils
|
import Utils
|
||||||
import Errors
|
import Errors
|
||||||
from QuestionDialog import ErrorDialog
|
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)
|
_config = (_('GeneWeb export options'),GeneWebWriterOptionBox)
|
||||||
_filename = 'gw'
|
_filename = 'gw'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(exportData,_title,_description,_config,_filename)
|
register_export(exportData,_title,_description,_config,_filename)
|
||||||
|
@ -57,6 +57,7 @@ import gtk.glade
|
|||||||
from GrampsDb._WriteXML import XmlWriter
|
from GrampsDb._WriteXML import XmlWriter
|
||||||
import Utils
|
import Utils
|
||||||
from QuestionDialog import MissingMediaDialog
|
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
|
_config = None
|
||||||
_filename = 'gpkg'
|
_filename = 'gpkg'
|
||||||
|
|
||||||
from PluginMgr import register_export
|
|
||||||
register_export(writeData,_title,_description,_config,_filename)
|
register_export(writeData,_title,_description,_config,_filename)
|
||||||
|
@ -34,6 +34,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
[ "da", "DA", "da_DK", "danish", "Danish", "da_DK.UTF8",
|
[ "da", "DA", "da_DK", "danish", "Danish", "da_DK.UTF8",
|
||||||
"da_DK@euro", "da_DK.UTF8@euro", "dansk", "Dansk",
|
"da_DK@euro", "da_DK.UTF8@euro", "dansk", "Dansk",
|
||||||
|
@ -34,6 +34,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["de","DE","de_DE","deutsch","Deutsch","de_DE.UTF8","de_DE@euro","de_DE.UTF8@euro",
|
["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"])
|
"german","German", "de_DE.UTF-8", "de_DE.utf-8", "de_DE.utf8"])
|
||||||
|
@ -33,6 +33,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this function with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["es","ES","es_ES","espanol","Espanol","es_ES.UTF8","es_ES@euro","es_ES.UTF8@euro",
|
["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"])
|
"spanish","Spanish", "es_ES.UTF-8", "es_ES.utf-8", "es_ES.utf8"])
|
||||||
|
@ -34,6 +34,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["fi","FI","fi_FI","finnish","Finnish","fi_FI.UTF8","fi_FI@euro","fi_FI.UTF8@euro",
|
["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"])
|
"suomi","Suomi", "fi_FI.UTF-8", "fi_FI.utf-8", "fi_FI.utf8"])
|
||||||
|
@ -31,6 +31,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["fr", "FR", "fr_FR", "fr_CA", "francais", "Francais", "fr_FR.UTF8", "fr_FR@euro", "fr_FR.UTF8@euro",
|
["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"])
|
"french","French", "fr_FR.UTF-8", "fr_FR.utf-8", "fr_FR.utf8", "fr_CA.UTF-8"])
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
import RelLib
|
import RelLib
|
||||||
import Relationship
|
import Relationship
|
||||||
from PluginMgr import register_relcalc
|
from PluginUtils import register_relcalc
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
import RelLib
|
import RelLib
|
||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
|
from PluginUtils import register_relcalc
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -201,8 +201,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
# Function registration
|
# Function registration
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["it", "IT", "it_IT", "it_IT@euro", "it_IT.utf8"])
|
["it", "IT", "it_IT", "it_IT@euro", "it_IT.utf8"])
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["nb","nn","no", "nb_NO","nn_NO","no_NO","nb_NO.UTF8","nn_NO.UTF8","no_NO.UTF8",
|
["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",
|
"nb_NO.UTF-8","nn_NO.UTF-8","no_NO.UTF-8",
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
import RelLib
|
import RelLib
|
||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
|
from PluginUtils import register_relcalc
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -260,7 +261,5 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
# Register this class with the Plugins system
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
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"])
|
["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"])
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -34,6 +34,7 @@ import RelLib
|
|||||||
import Relationship
|
import Relationship
|
||||||
import types
|
import types
|
||||||
from gettext import gettext as _
|
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
|
# Register this class with the Plugins system
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PluginMgr import register_relcalc
|
|
||||||
|
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["sv","SV","sv_SE","swedish","Swedish","sv_SE.UTF8","sv_SE@euro","sv_SE.UTF8@euro",
|
["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"])
|
"svenska","Svenska", "sv_SE.UTF-8", "sv_SE.utf-8", "sv_SE.utf8"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user