fix typos on XML import
svn: r6405
This commit is contained in:
parent
28a48093ee
commit
0b35225daa
@ -1,4 +1,7 @@
|
|||||||
2006-04-21 Don Allingham <don@gramps-project.org>
|
2006-04-21 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDb/_ReadXML.py: fix typos
|
||||||
|
* src/PluginUtils/_PluginMgr.py: handle module to description mapping
|
||||||
|
* src/Editors/_EditRepoRef.py: fix typos
|
||||||
* src/Editors/_EditMediaRef.py: define warnbox
|
* src/Editors/_EditMediaRef.py: define warnbox
|
||||||
* src/GrampsDb/_DbUtils.py: fix old call to get_child_handle_list
|
* src/GrampsDb/_DbUtils.py: fix old call to get_child_handle_list
|
||||||
* src/Editors/_EditSource.py: remove warnbox
|
* src/Editors/_EditSource.py: remove warnbox
|
||||||
|
@ -137,7 +137,7 @@ class EditRepoRef(EditReference):
|
|||||||
self.backref_tab = self._add_tab(
|
self.backref_tab = self._add_tab(
|
||||||
notebook_src,
|
notebook_src,
|
||||||
SourceBackRefList(self.dbstate, self.uistate, self.track,
|
SourceBackRefList(self.dbstate, self.uistate, self.track,
|
||||||
self.db.find_backlink_handles(self.obj.handle),
|
self.db.find_backlink_handles(self.source.handle),
|
||||||
self.enable_warnbox))
|
self.enable_warnbox))
|
||||||
|
|
||||||
def build_menu_names(self,sourceref):
|
def build_menu_names(self,sourceref):
|
||||||
|
@ -652,7 +652,7 @@ class GrampsParser:
|
|||||||
self.person.lds_ord_list.append(self.ord)
|
self.person.lds_ord_list.append(self.ord)
|
||||||
elif self.family:
|
elif self.family:
|
||||||
if atype == "sealed_to_spouse":
|
if atype == "sealed_to_spouse":
|
||||||
self.ord.set_type(RelLib.LdsOrd.SEAL_TO_SPOUSES)
|
self.ord.set_type(RelLib.LdsOrd.SEAL_TO_SPOUSE)
|
||||||
self.family.lds_ord_list.append(self.ord)
|
self.family.lds_ord_list.append(self.ord)
|
||||||
|
|
||||||
def start_temple(self,attrs):
|
def start_temple(self,attrs):
|
||||||
@ -704,7 +704,7 @@ class GrampsParser:
|
|||||||
loc.postal = attrs.get('postal','')
|
loc.postal = attrs.get('postal','')
|
||||||
loc.city = attrs.get('city','')
|
loc.city = attrs.get('city','')
|
||||||
loc.parish = attrs.get('parish','')
|
loc.parish = attrs.get('parish','')
|
||||||
loc.state = attrs.bet('state','')
|
loc.state = attrs.get('state','')
|
||||||
loc.county = attrs.get('county','')
|
loc.county = attrs.get('county','')
|
||||||
loc.country = attrs.get('country','')
|
loc.country = attrs.get('country','')
|
||||||
if self.locations > 0:
|
if self.locations > 0:
|
||||||
@ -919,8 +919,7 @@ class GrampsParser:
|
|||||||
self.family = self.find_family_by_gramps_id(gramps_id)
|
self.family = self.find_family_by_gramps_id(gramps_id)
|
||||||
# GRAMPS LEGACY: the type now belongs to <rel> tag
|
# GRAMPS LEGACY: the type now belongs to <rel> tag
|
||||||
# Here we need to support old format of <family type="Married">
|
# Here we need to support old format of <family type="Married">
|
||||||
self.family.type = RelLib.FamilyRelType().set_from_xml_str(
|
self.family.type.set_from_xml_str(attrs.get("type",'Unknown'))
|
||||||
attrs.get("type",'Unknown'))
|
|
||||||
|
|
||||||
# Old and new markers: complete=1 and marker=word both have to work
|
# Old and new markers: complete=1 and marker=word both have to work
|
||||||
if attrs.get('complete'): # this is only true for complete=1
|
if attrs.get('complete'): # this is only true for complete=1
|
||||||
@ -952,8 +951,12 @@ class GrampsParser:
|
|||||||
|
|
||||||
# Here we are handling the old XML, in which
|
# Here we are handling the old XML, in which
|
||||||
# frel and mrel belonged to the "childof" tag
|
# frel and mrel belonged to the "childof" tag
|
||||||
mrel = RelLib.ChildRefType().set_from_xml_str(attrs.get('mrel'))
|
mrel = RelLib.ChildRefType()
|
||||||
frel = RelLib.ChildRefType().set_from_xml_str(attrs.get('frel'))
|
frel = RelLib.ChildRefType()
|
||||||
|
if attrs.get('mrel'):
|
||||||
|
mrel.set_from_xml_str(attrs['mrel'])
|
||||||
|
if attrs.get('frel'):
|
||||||
|
frel.set_from_xml_str(attrs['frel'])
|
||||||
|
|
||||||
childref = RelLib.ChildRef()
|
childref = RelLib.ChildRef()
|
||||||
childref.ref = self.person.handle
|
childref.ref = self.person.handle
|
||||||
|
@ -54,7 +54,6 @@ report_list = []
|
|||||||
tool_list = []
|
tool_list = []
|
||||||
import_list = []
|
import_list = []
|
||||||
export_list = []
|
export_list = []
|
||||||
expect_list = []
|
|
||||||
attempt_list = []
|
attempt_list = []
|
||||||
loaddir_list = []
|
loaddir_list = []
|
||||||
textdoc_list = []
|
textdoc_list = []
|
||||||
@ -64,9 +63,10 @@ failmsg_list = []
|
|||||||
bkitems_list = []
|
bkitems_list = []
|
||||||
cl_list = []
|
cl_list = []
|
||||||
cli_tool_list = []
|
cli_tool_list = []
|
||||||
|
|
||||||
success_list = []
|
success_list = []
|
||||||
|
|
||||||
|
mod2text = {}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Default relationship calculator
|
# Default relationship calculator
|
||||||
@ -126,12 +126,10 @@ def load_plugins(direct):
|
|||||||
try:
|
try:
|
||||||
a = __import__(plugin)
|
a = __import__(plugin)
|
||||||
success_list.append((filename,a))
|
success_list.append((filename,a))
|
||||||
except Errors.PluginError, msg:
|
|
||||||
expect_list.append((filename,str(msg)))
|
|
||||||
except:
|
except:
|
||||||
failmsg_list.append((filename,sys.exc_info()))
|
failmsg_list.append((filename,sys.exc_info()))
|
||||||
|
|
||||||
if len(expect_list)+len(failmsg_list):
|
if len(failmsg_list):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
@ -155,6 +153,7 @@ def register_export(exportData,title,description='',config=None,filename=''):
|
|||||||
del export_list[del_index]
|
del export_list[del_index]
|
||||||
|
|
||||||
export_list.append((exportData,title,description,config,filename))
|
export_list.append((exportData,title,description,config,filename))
|
||||||
|
mod2text[exportData.__module__] = description
|
||||||
|
|
||||||
def register_import(task, ffilter, mime=None, native_format=0, format_name=""):
|
def register_import(task, ffilter, mime=None, native_format=0, format_name=""):
|
||||||
"""Register an import filter, taking the task and file filter"""
|
"""Register an import filter, taking the task and file filter"""
|
||||||
@ -167,6 +166,7 @@ def register_import(task, ffilter, mime=None, native_format=0, format_name=""):
|
|||||||
del import_list[del_index]
|
del import_list[del_index]
|
||||||
|
|
||||||
import_list.append((task, ffilter, mime, native_format, format_name))
|
import_list.append((task, ffilter, mime, native_format, format_name))
|
||||||
|
mod2text[task.__module__] = format_name
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -196,6 +196,7 @@ def register_tool(
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
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,
|
||||||
@ -221,6 +222,7 @@ def _register_gui_tool(tool_class,options_class,translated_name,
|
|||||||
del_index = i
|
del_index = i
|
||||||
if del_index != -1:
|
if del_index != -1:
|
||||||
del tool_list[del_index]
|
del tool_list[del_index]
|
||||||
|
mod2text[tool_class.__module__] = description
|
||||||
tool_list.append((tool_class,options_class,translated_name,
|
tool_list.append((tool_class,options_class,translated_name,
|
||||||
category,name,description,status,
|
category,name,description,status,
|
||||||
author_name,author_email,unsupported))
|
author_name,author_email,unsupported))
|
||||||
@ -305,6 +307,7 @@ def _register_standalone(report_class, options_class, translated_name,
|
|||||||
report_list.append((report_class, options_class, translated_name,
|
report_list.append((report_class, options_class, translated_name,
|
||||||
category, name, description, status,
|
category, name, description, status,
|
||||||
author_name, author_email, unsupported))
|
author_name, author_email, unsupported))
|
||||||
|
mod2text[report_class.__module__] = description
|
||||||
|
|
||||||
def register_book_item(translated_name, category, report_class,
|
def register_book_item(translated_name, category, report_class,
|
||||||
option_class, name, unsupported):
|
option_class, name, unsupported):
|
||||||
@ -355,6 +358,7 @@ def register_text_doc(name,classref, table, paper, style, ext,
|
|||||||
textdoc_list.append(
|
textdoc_list.append(
|
||||||
(name, classref, table, paper, style,
|
(name, classref, table, paper, style,
|
||||||
ext, print_report_label, clname))
|
ext, print_report_label, clname))
|
||||||
|
mod2text[classref.__module__] = name
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -394,6 +398,7 @@ def register_draw_doc(name,classref,paper,style, ext,
|
|||||||
clname = ext[1:]
|
clname = ext[1:]
|
||||||
drawdoc_list.append((name, classref, paper,style, ext,
|
drawdoc_list.append((name, classref, paper,style, ext,
|
||||||
print_report_label, clname))
|
print_report_label, clname))
|
||||||
|
mod2text[classref.__module__] = name
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -97,10 +97,11 @@ class PluginStatus(ManagedWindow.ManagedWindow):
|
|||||||
i[0], str(i[1][1]), i[1]])
|
i[0], str(i[1][1]), i[1]])
|
||||||
|
|
||||||
for i in PluginMgr.success_list:
|
for i in PluginMgr.success_list:
|
||||||
|
modname = i[1].__name__
|
||||||
|
descr = PluginMgr.mod2text.get(modname,'')
|
||||||
self.model.append(row=[
|
self.model.append(row=[
|
||||||
'<span weight="bold" color="#267726">%s</span>' % _("OK"),
|
'<span weight="bold" color="#267726">%s</span>' % _("OK"),
|
||||||
i[0], '', None])
|
i[0], descr, None])
|
||||||
|
|
||||||
|
|
||||||
def button_press(self, obj, event):
|
def button_press(self, obj, event):
|
||||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||||
@ -118,7 +119,6 @@ class PluginTrace(ManagedWindow.ManagedWindow):
|
|||||||
def __init__(self, uistate, track, data):
|
def __init__(self, uistate, track, data):
|
||||||
|
|
||||||
self.title = _("Plugin Status Details")
|
self.title = _("Plugin Status Details")
|
||||||
print uistate, track, data
|
|
||||||
ManagedWindow.ManagedWindow.__init__(self, uistate, track, self)
|
ManagedWindow.ManagedWindow.__init__(self, uistate, track, self)
|
||||||
|
|
||||||
self.set_window(
|
self.set_window(
|
||||||
|
Loading…
Reference in New Issue
Block a user