Esempio n. 1
0
 def restoreConfigDefaults(self, parm_map):
     d = OptionsClass()
     d.load_defaults(defaults)
     for section, option in parm_map:
         if option is not None:
             if not options.no_restore(section, option):
                 options.set(section, option, d.get(section,option))
     options.update_file(optionsPathname)
Esempio n. 2
0
    def restoreConfigDefaults(self, parm_map):
        # note that the behaviour of this function has subtly changed:
        # previously options were removed from the config file, now the
        # config file is updated to match the defaults
        d = OptionsClass()
        d.load_defaults(defaults)

        # Only restore the settings that appear on the form.
        for section, option in parm_map:
            if option is not None:
                if not options.no_restore(section, option):
                    options.set(section, option, d.get(section,option))

        options.update_file(optionsPathname)