diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index bc09d987f..52ceb2030 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -1152,7 +1152,7 @@ class GrampletPane(Gtk.ScrolledWindow): retval = [] filename = self.configfile if filename and os.path.exists(filename): - cp = configparser.ConfigParser() + cp = configparser.ConfigParser(strict=False) try: cp.read(filename, encoding='utf-8') except Exception as err: @@ -1216,12 +1216,10 @@ class GrampletPane(Gtk.ScrolledWindow): for key in base_opts: if key in gramplet.__dict__: base_opts[key] = gramplet.__dict__[key] - fp.write("[%s]\n" % gramplet.gname) + base_opts['state'] = gramplet.gstate + fp.write("[%s]\n" % gramplet.title) # section for key in base_opts: if key == "content": continue - elif key == "title": - if gramplet.title_override: - fp.write("title=%s\n" % base_opts[key]) elif key == "tname": continue elif key == "column": continue elif key == "row": continue @@ -1247,6 +1245,7 @@ class GrampletPane(Gtk.ScrolledWindow): for key in base_opts: if key in gramplet.__dict__: base_opts[key] = gramplet.__dict__[key] + base_opts['state'] = gramplet.gstate fp.write("[%s]\n" % gramplet.title) for key in base_opts: if key == "content": continue @@ -1266,7 +1265,7 @@ class GrampletPane(Gtk.ScrolledWindow): fp.write("data[%d]=%s\n" % (cnt, item)) cnt += 1 else: - fp.write("%s=%s\n\n" % (key, base_opts[key])) + fp.write("%s=%s\n" % (key, base_opts[key])) except IOError as err: LOG.warning("Failed to open %s because $s; gramplets not saved",