  
  def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
      _RECREATE_OBJECTS["tooltips"][str(widget)] = {"text": text,
                                                    "text_variable": text_variable,
                                                    "wrap_length": wrap_length}
      logger.debug("Adding to tooltips dict: (widget: %s. text: '%s', wrap_length: %s)",
                   widget, text, wrap_length)
      return Tooltip(widget, text=text, text_variable=text_variable, wrap_length=wrap_length)
  
  
  def _get_contextmenu(widget):
      """ Create a context menu, store its mapping and return """
 
</s> remove def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
    """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
 </s> add def _get_tooltip(widget, text=None, text_variable=None):
    """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip.

    Auto adjust tooltip width based on amount of text.

    """ </s> remove _RECREATE_OBJECTS = dict(tooltips=dict(), commands=dict(), contextmenus=dict())
 </s> add _RECREATE_OBJECTS = dict(tooltips={}, commands={}, contextmenus={}) </s> remove             _get_tooltip(lbl, text=self.option.helptext, wrap_length=600)
 </s> add             _get_tooltip(lbl, text=self.option.helptext) </s> remove                           name="fr_{}".format(self.option.name),
 </s> add                           name=f"fr_{self.option.name}", </s> remove         retval = filename if extension else "{}.{}".format(filename, self.file_extension)
 </s> add         retval = filename if extension else f"{filename}.{self.file_extension}"
                                                  "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)

  
  def _get_tooltip(widget, text=None, text_variable=None, wrap_length=600):
      """ Store the tooltip layout and widget id in _TOOLTIPS and return a tooltip """
      _RECREATE_OBJECTS["tooltips"][str(widget)] = {"text": text,
                                                  "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)

                                                  "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)

                                                  "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)

                                                  "text_variable": text_variable}
    logger.debug("Adding to tooltips dict: (widget: %s. text: '%s')", widget, text)

    wrap_length = 400
    if text is not None:
        while True:
            if len(text) < wrap_length * 5:
                break
            if wrap_length > 720:
                break
            wrap_length = int(wrap_length * 1.10)

      return Tooltip(widget, text=text, text_variable=text_variable, wrap_length=wrap_length)
  
  
  def _get_contextmenu(widget):
      """ Create a context menu, store its mapping and return """
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
lib/gui/control_helper.py