              self.config.insert_config_section(section, items["helptext"], config=new_config)
              for item, def_opt in items.items():
                  if item == "helptext":
                      continue
                  new_opt = options[section][item]
                  logger.debug("Adding option: (item: '%s', default: '%s' new: '%s'",
                               item, def_opt, new_opt)
                  helptext = def_opt["helptext"]
                  helptext = self.config.format_help(helptext, is_section=False)
                  new_config.set(section, helptext)
                  new_config.set(section, item, str(new_opt["selected"].get()))
 
</s> remove                 new_config.set(section, item, str(new_opt["selected"].get()))
 </s> add                 new_config.set(section, item, str(new_opt)) </s> remove                 tk_var = self.config_dict_gui[lookup[0]][lookup[1]][item]["selected"]
 </s> add  </s> remove             lookup = [section.split(".")[0], section] if "." in section else [section, section]
 </s> add             lookup = [section.split(".")[0], section.split(".")[-1]] </s> remove     def format_helptext(self, helptext):
        """ Format the help text for tooltips """
        if helptext is None:
            return helptext
        logger.debug("Format control help: '%s'", self.title)
        if helptext.startswith("R|"):
            helptext = helptext[2:].replace("\nL|", "\n - ").replace("\n", "\n\n")
        else:
            helptext = helptext.replace("\n\t", "\n - ").replace("%%", "%")
        helptext = ". ".join(i.capitalize() for i in helptext.split(". "))
        helptext = self.title + " - " + helptext
        logger.debug("Formatted control help: (title: '%s', help: '%s'", self.title, helptext)
        return helptext

    def set_control(self, dtype, choices, is_radio):
        """ Set the correct control type based on the datatype or for this option """
        if choices and is_radio:
            control = ttk.Radiobutton
        elif choices:
            control = ttk.Combobox
        elif dtype == bool:
            control = ttk.Checkbutton
        elif dtype in (int, float):
            control = ttk.Scale
        else:
            control = ttk.Entry
        logger.debug("Setting control '%s' to %s", self.title, control)
        return control

    def set_tk_var(self, dtype, selected_value, blank_nones):
 </s> add     def set_tk_var(self, blank_nones): </s> remove                 tk_var.set(default)
 </s> add                 self.config_cpanel_dict[lookup[0]][lookup[1]][item].set(default)
                new_opt = options[section][item].get()
                logger.debug("Adding option: (item: '%s', default: %s new: '%s'",
              self.config.insert_config_section(section, items["helptext"], config=new_config)
              for item, def_opt in items.items():
                  if item == "helptext":
                      continue
                new_opt = options[section][item].get()
                logger.debug("Adding option: (item: '%s', default: %s new: '%s'",
                new_opt = options[section][item].get()
                logger.debug("Adding option: (item: '%s', default: %s new: '%s'",
                               item, def_opt, new_opt)
                  helptext = def_opt["helptext"]
                  helptext = self.config.format_help(helptext, is_section=False)
                  new_config.set(section, helptext)
                  new_config.set(section, item, str(new_opt["selected"].get()))
keep keep keep keep replace replace keep keep keep keep keep
 GUI Fixups

- GUI Bugfix: Startup options - fix min/max thresholds
- GUI Bugfix: Make console read-only
- GUI Bugfix: Rightclick menu for recreated widgets
- Enhancement: Create ControlPanelOptions Class + migrate options 
lib/gui/popup_configure.py