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>
|
||||
* src/Mime/_GnomeMime.py: find the default application instead of
|
||||
using the first returned by mime_get_app_short_list
|
||||
|
@ -894,7 +894,7 @@ class StyleSheetList:
|
||||
try:
|
||||
p = make_parser()
|
||||
p.setContentHandler(SheetParser(self))
|
||||
p.parse('file://' + self.file)
|
||||
p.parse(self.file)
|
||||
except (IOError,OSError,SAXParseException):
|
||||
pass
|
||||
|
||||
|
@ -2314,10 +2314,7 @@ class GenericFilterList:
|
||||
try:
|
||||
parser = make_parser()
|
||||
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):
|
||||
pass
|
||||
except SAXParseException:
|
||||
|
@ -223,7 +223,7 @@ class OptionListCollection:
|
||||
try:
|
||||
p = make_parser()
|
||||
p.setContentHandler(OptionParser(self))
|
||||
p.parse('file://' + self.filename)
|
||||
p.parse(self.filename)
|
||||
except (IOError,OSError,SAXParseException):
|
||||
pass
|
||||
|
||||
|
@ -1648,11 +1648,11 @@ try:
|
||||
parser = make_parser()
|
||||
gspath = const.template_dir
|
||||
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
||||
parser.parse("file://%s/templates.xml" % gspath)
|
||||
parser.parse("%s/templates.xml" % gspath)
|
||||
parser = make_parser()
|
||||
gspath = os.path.expanduser("~/.gramps/templates")
|
||||
parser.setContentHandler(TemplateParser(_template_map,gspath))
|
||||
parser.parse("file://%s/templates.xml" % gspath)
|
||||
parser.parse("%s/templates.xml" % gspath)
|
||||
except (IOError,OSError,SAXParseException):
|
||||
pass
|
||||
|
||||
|
@ -276,7 +276,7 @@ class OptionListCollection(_Options.OptionListCollection):
|
||||
try:
|
||||
p = make_parser()
|
||||
p.setContentHandler(OptionParser(self))
|
||||
p.parse('file://' + self.filename)
|
||||
p.parse(self.filename)
|
||||
except (IOError,OSError,SAXParseException):
|
||||
pass
|
||||
|
||||
@ -331,7 +331,7 @@ class OptionParser(_Options.OptionParser):
|
||||
self.option_list.set_orientation(int(attrs['value']))
|
||||
else:
|
||||
# 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):
|
||||
"Overridden class that handles the end of a XML element"
|
||||
@ -340,7 +340,7 @@ class OptionParser(_Options.OptionParser):
|
||||
self.common = False
|
||||
else:
|
||||
# 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
|
||||
gnome_rf = GnomeRecentFiles()
|
||||
gnome_item = GnomeRecentItem(
|
||||
u='file://%s' % filename,
|
||||
u=filename,
|
||||
m=filetype,
|
||||
t=the_time,
|
||||
p=False,
|
||||
|
@ -391,7 +391,7 @@ class BookList:
|
||||
try:
|
||||
p = make_parser()
|
||||
p.setContentHandler(BookParser(self))
|
||||
p.parse('file://' + self.file)
|
||||
p.parse(self.file)
|
||||
except (IOError,OSError,SAXParseException):
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user