          frame.pack(fill=tk.X)
          logger.debug("Built control frame")
          return frame
  
      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):
          """ 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:
 
</s> remove         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
 </s> add         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) </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         frame = ttk.Frame(parent, name="fr_{}".format(self.title.lower()))
 </s> add         frame = ttk.Frame(parent, name="fr_{}".format(self.option.name)) </s> remove         if self.helptext is not None:
            get_tooltip(lbl, text=self.helptext, wraplength=600)
        logger.debug("Built control label: '%s'", self.title)
 </s> add         if self.option.helptext is not None:
            get_tooltip(lbl, text=self.option.helptext, wraplength=600)
        logger.debug("Built control label: (widget: '%s', title: '%s'",
                     self.option.name, self.option.title) </s> remove         logger.debug("Add control to Options Frame: (title: '%s', control: %s, choices: %s)",
                     self.title, self.control, choices)
        if self.control == ttk.Checkbutton:
            ctl = self.control(self.frame, variable=self.tk_var, text=None)
 </s> add         logger.debug("Add control to Options Frame: (widget: '%s', control: %s, choices: %s)",
                     self.option.name, self.option.control, self.option.choices)
        if self.option.control == ttk.Checkbutton:
            ctl = self.option.control(self.frame, variable=self.option.tk_var, text=None)
    def set_tk_var(self, blank_nones):
          frame.pack(fill=tk.X)
          logger.debug("Built control frame")
          return frame
  
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, blank_nones):
    def set_tk_var(self, 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:
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace 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