          return control
  
      def set_tk_var(self, dtype, selected_value, blank_nones):
          """ Correct variable type for control """
          logger.debug("Setting tk variable: (title: '%s', dtype: %s, selected_value: %s, "
                       "blank_nones: %s)",
                       self.title, dtype, selected_value, blank_nones)
          if dtype == bool:
              var = tk.BooleanVar
          elif dtype == int:
              var = tk.IntVar
          elif dtype == float:
              var = tk.DoubleVar
          else:
              var = tk.StringVar
          var = var(self.frame)
          val = self.default if selected_value is None else selected_value
          val = "" if val is None and blank_nones else val
          var.set(val)
          logger.debug("Set tk variable: (title: '%s', type: %s, value: '%s')",
                       self.title, type(var), val)
          return var
  
      # Build the full control
      def build_control(self, choices, dtype, rounding, min_max, sysbrowser, option_columns,
                        control_width):
          """ Build the correct control type for the option passed through """
 
</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     def build_control(self, choices, dtype, rounding, min_max, sysbrowser, option_columns,
                      control_width):
 </s> add     def build_control(self): </s> remove         logger.debug("Build control: (title: '%s', control: %s, choices: %s, dtype: %s, "
                     "rounding: %s, sysbrowser: %s, min_max: %s: option_columns: %s, "
                     "control_width: %s)", self.title, self.control, choices, dtype, rounding,
                     sysbrowser, min_max, option_columns, control_width)
        if self.control == ttk.Scale:
            ctl = self.slider_control(dtype, rounding, min_max)
        elif self.control == ttk.Radiobutton:
            ctl = self.radio_control(choices, option_columns)
        elif self.control == ttk.Checkbutton:
 </s> add         logger.debug("Build control: '%s')", self.option.name)
        if self.option.control == ttk.Scale:
            ctl = self.slider_control()
        elif self.option.control == ttk.Radiobutton:
            ctl = self.radio_control()
        elif self.option.control == ttk.Checkbutton: </s> remove     def build_one_control(self, choices, dtype, rounding, min_max,
                          sysbrowser, option_columns, control_width):
 </s> add     def build_one_control(self): </s> remove         if self.control not in (ttk.Checkbutton, ttk.Radiobutton):
 </s> add         if self.option.control not in (ttk.Checkbutton, ttk.Radiobutton):
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
          return control
  
      def set_tk_var(self, dtype, selected_value, blank_nones):
          """ Correct variable type for control """
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
        val = "" if self.option.value is None and blank_nones else self.option.value
        self.option.tk_var.set(val)
        logger.debug("Set tk variable: (option: '%s', variable: %s, value: '%s')",
                     self.option.name, self.option.tk_var, val)
  
      # Build the full control
      def build_control(self, choices, dtype, rounding, min_max, sysbrowser, option_columns,
                        control_width):
          """ Build the correct control type for the option passed through """
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace 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/control_helper.py