From 66d3dde97abc7cfa40b9d5689dc7ee80b1510830 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Tue, 30 Jul 2013 15:10:02 +0000 Subject: [PATCH] 6663: RecentFiles.do_save() doesn't do XML escape ported my fix from gramps34, changes to gtk3 negligible svn: r22774 --- gramps/gen/recentfiles.py | 4 ++-- gramps/gui/displaystate.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gramps/gen/recentfiles.py b/gramps/gen/recentfiles.py index d09549873..a4ba4c03f 100644 --- a/gramps/gen/recentfiles.py +++ b/gramps/gen/recentfiles.py @@ -196,8 +196,8 @@ class RecentFiles(object): if index > MAX_GRAMPS_ITEMS: break xml_file.write(' \n') - xml_file.write(' %s\n' % item.get_path()) - xml_file.write(' %s\n' % item.get_name()) + xml_file.write(' \n' % item.get_path()) + xml_file.write(' \n' % item.get_name()) xml_file.write(' %d\n' % item.get_time()) xml_file.write(' \n') xml_file.write('\n') diff --git a/gramps/gui/displaystate.py b/gramps/gui/displaystate.py index 462b3c256..0a100d218 100644 --- a/gramps/gui/displaystate.py +++ b/gramps/gui/displaystate.py @@ -290,17 +290,18 @@ class RecentDocsMenu(object): for item in rfiles: try: - title = item.get_name().replace('_', '__') + title = item.get_name() filename = os.path.basename(item.get_path()) action_id = "RecentMenu%d" % count buf.write('' % action_id) actions.append((action_id, None, title, None, None, make_callback(item, self.load))) - mitem = Gtk.MenuItem(label=title) + mitem = Gtk.MenuItem(label=title, use_underline=False) mitem.connect('activate', make_callback(item, self.load)) mitem.show() new_menu.append(mitem) except RuntimeError: + _LOG.info("Ignoring the RecentItem %s (%s)" % (title, filename)) pass # ignore no longer existing files count += 1