Use filename instead of URI for XML parser (works on Windows and Linux)
svn: r6215
This commit is contained in:
parent
9dd96871ff
commit
ae7296cb25
@ -1,3 +1,13 @@
|
|||||||
|
2006-03-28 Brian Matherly <pez4brian@users.sourceforge.net>
|
||||||
|
* src/PluginUtils/_Options.py: Use filename instead of URI for XML parser
|
||||||
|
* src/PluginUtils/_Report.py: Use filename instead of URI for XML parser
|
||||||
|
* src/PluginUtils/_ReportOptions.py: Use filename instead of URI
|
||||||
|
* src/Plugins/BookReport.py: Use filename instead of URI for XML parser
|
||||||
|
* src/RecentFiles.py: Use filename instead of URI for XML parser
|
||||||
|
* src/GenericFilter.py: Use filename instead of URI for XML parser
|
||||||
|
* src/BaseDoc.py: Use filename instead of URI for XML parser
|
||||||
|
(works on Windows and Linux)
|
||||||
|
|
||||||
2006-03-28 Don Allingham <don@gramps-project.org>
|
2006-03-28 Don Allingham <don@gramps-project.org>
|
||||||
* src/Mime/_GnomeMime.py: find the default application instead of
|
* src/Mime/_GnomeMime.py: find the default application instead of
|
||||||
using the first returned by mime_get_app_short_list
|
using the first returned by mime_get_app_short_list
|
||||||
|
@ -894,7 +894,7 @@ class StyleSheetList:
|
|||||||
try:
|
try:
|
||||||
p = make_parser()
|
p = make_parser()
|
||||||
p.setContentHandler(SheetParser(self))
|
p.setContentHandler(SheetParser(self))
|
||||||
p.parse('file://' + self.file)
|
p.parse(self.file)
|
||||||
except (IOError,OSError,SAXParseException):
|
except (IOError,OSError,SAXParseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -2314,9 +2314,6 @@ class GenericFilterList:
|
|||||||
try:
|
try:
|
||||||
parser = make_parser()
|
parser = make_parser()
|
||||||
parser.setContentHandler(FilterParser(self))
|
parser.setContentHandler(FilterParser(self))
|
||||||
if self.file[0:7] != "file://":
|
|
||||||
parser.parse("file://" + self.file)
|
|
||||||
else:
|
|
||||||
parser.parse(self.file)
|
parser.parse(self.file)
|
||||||
except (IOError,OSError):
|
except (IOError,OSError):
|
||||||
pass
|
pass
|
||||||
|
@ -223,7 +223,7 @@ class OptionListCollection:
|
|||||||
try:
|
try:
|
||||||
p = make_parser()
|
p = make_parser()
|
||||||
p.setContentHandler(OptionParser(self))
|
p.setContentHandler(OptionParser(self))
|
||||||
p.parse('file://' + self.filename)
|
p.parse(self.filename)
|
||||||
except (IOError,OSError,SAXParseException):
|
except (IOError,OSError,SAXParseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1648,11 +1648,11 @@ try:
|
|||||||
parser = make_parser()
|
parser = make_parser()
|
||||||
gspath = const.template_dir
|
gspath = const.template_dir
|
||||||
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
||||||
parser.parse("file://%s/templates.xml" % gspath)
|
parser.parse("%s/templates.xml" % gspath)
|
||||||
parser = make_parser()
|
parser = make_parser()
|
||||||
gspath = os.path.expanduser("~/.gramps/templates")
|
gspath = os.path.expanduser("~/.gramps/templates")
|
||||||
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
||||||
parser.parse("file://%s/templates.xml" % gspath)
|
parser.parse("%s/templates.xml" % gspath)
|
||||||
except (IOError,OSError,SAXParseException):
|
except (IOError,OSError,SAXParseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ class OptionListCollection(_Options.OptionListCollection):
|
|||||||
try:
|
try:
|
||||||
p = make_parser()
|
p = make_parser()
|
||||||
p.setContentHandler(OptionParser(self))
|
p.setContentHandler(OptionParser(self))
|
||||||
p.parse('file://' + self.filename)
|
p.parse(self.filename)
|
||||||
except (IOError,OSError,SAXParseException):
|
except (IOError,OSError,SAXParseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ class OptionParser(_Options.OptionParser):
|
|||||||
self.option_list.set_orientation(int(attrs['value']))
|
self.option_list.set_orientation(int(attrs['value']))
|
||||||
else:
|
else:
|
||||||
# Tag is not report-specific, so we let the base class handle it.
|
# Tag is not report-specific, so we let the base class handle it.
|
||||||
OptionParser.startElement(self,tag,attrs)
|
_Options.OptionParser.startElement(self,tag,attrs)
|
||||||
|
|
||||||
def endElement(self,tag):
|
def endElement(self,tag):
|
||||||
"Overridden class that handles the end of a XML element"
|
"Overridden class that handles the end of a XML element"
|
||||||
@ -340,7 +340,7 @@ class OptionParser(_Options.OptionParser):
|
|||||||
self.common = False
|
self.common = False
|
||||||
else:
|
else:
|
||||||
# Tag is not report-specific, so we let the base class handle it.
|
# Tag is not report-specific, so we let the base class handle it.
|
||||||
OptionParser.endElement(self,tag)
|
_Options.OptionParser.endElement(self,tag)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -408,7 +408,7 @@ def recent_files(filename,filetype):
|
|||||||
# Add the file to the recent items
|
# Add the file to the recent items
|
||||||
gnome_rf = GnomeRecentFiles()
|
gnome_rf = GnomeRecentFiles()
|
||||||
gnome_item = GnomeRecentItem(
|
gnome_item = GnomeRecentItem(
|
||||||
u='file://%s' % filename,
|
u=filename,
|
||||||
m=filetype,
|
m=filetype,
|
||||||
t=the_time,
|
t=the_time,
|
||||||
p=False,
|
p=False,
|
||||||
|
@ -391,7 +391,7 @@ class BookList:
|
|||||||
try:
|
try:
|
||||||
p = make_parser()
|
p = make_parser()
|
||||||
p.setContentHandler(BookParser(self))
|
p.setContentHandler(BookParser(self))
|
||||||
p.parse('file://' + self.file)
|
p.parse(self.file)
|
||||||
except (IOError,OSError,SAXParseException):
|
except (IOError,OSError,SAXParseException):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user