      _RECREATE_OBJECTS["commands"][str(name)] = func
  
  
  def set_slider_rounding(value, var, d_type, round_to, min_max):
      """ Set the underlying variable to correct number based on slider rounding """
      if d_type == float:
          var.set(round(float(value), round_to))
      else:
          steps = range(min_max[0], min_max[1] + round_to, round_to)
          value = min(steps, key=lambda x: abs(x - int(float(value))))
 
</s> remove def adjust_wraplength(event):
    """ dynamically adjust the wraplength of a label on event """
    label = event.widget
    label.configure(wraplength=event.width - 1)


 </s> add  </s> remove             handletype = self.contexts[command][action]
 </s> add             handletype = self._contexts[command][action] </s> remove     def set_context_handletype(self, command, action, variable):
        """ Choose the correct file browser action based on context """
        if self.contexts[command].get(variable, None) is not None:
            handletype = self.contexts[command][variable][action]
 </s> add     def _set_context_handletype(self, command, action, variable):
        """ Sets the correct handle type  based on context.

        Parameters
        ----------
        command: str
            The command that is being executed. Used to look up the context actions
        action: str
            The action that is being performed. Used to look up the correct file dialog
        variable: :class:`tkinter.StringVar`
            The variable associated with this file dialog
        """
        if self._contexts[command].get(variable, None) is not None:
            handletype = self._contexts[command][variable][action] </s> remove def add_command(name, func):
 </s> add def _add_command(name, func): </s> remove     def get_tag(self, string):
        """ Set the tag based on regex of log output """
        if self.out_type == "stderr":
            # Output all stderr in red
            return self.out_type
 </s> add     @property
    def tk_vars(self):
        """ dict: The global tkinter variables. """
        return self._gui_objects["tk_vars"]
    """ Set the value of sliders underlying variable based on their datatype,
    rounding value and min/max.

    Parameters
    ----------
    var: tkinter.Var
        The variable to set the value for
    d_type: [:class:`int`, :class:`float`]
        The type of value that is stored in :attr:`var`
    round_to: int
        If :attr:`dtype` is :class:`float` then this is the decimal place rounding for :attr:`var`.
        If :attr:`dtype` is :class:`int` then this is the number of steps between each increment
        for :attr:`var`
    min_max: tuple (`int`, `int`)
        The (``min``, ``max``) values that this slider accepts
    """
      _RECREATE_OBJECTS["commands"][str(name)] = func
  
  
  def set_slider_rounding(value, var, d_type, round_to, min_max):
    """ Set the value of sliders underlying variable based on their datatype,
    rounding value and min/max.

    Parameters
    ----------
    var: tkinter.Var
        The variable to set the value for
    d_type: [:class:`int`, :class:`float`]
        The type of value that is stored in :attr:`var`
    round_to: int
        If :attr:`dtype` is :class:`float` then this is the decimal place rounding for :attr:`var`.
        If :attr:`dtype` is :class:`int` then this is the number of steps between each increment
        for :attr:`var`
    min_max: tuple (`int`, `int`)
        The (``min``, ``max``) values that this slider accepts
    """
      if d_type == float:
          var.set(round(float(value), round_to))
      else:
          steps = range(min_max[0], min_max[1] + round_to, round_to)
          value = min(steps, key=lambda x: abs(x - int(float(value))))
keep keep keep keep replace keep keep keep keep keep
 GUI Updates (#940)

* lib.gui: Update icons
* tools.cli: Add video filetype flag to mask input
* lib.gui.popup_configure: Refresh GUI on config save
* lib.gui._config: Add Icon size and load last session options
* lib.gui.control_helper - Add control modification tracking
* lib.gui - Add Projects and Last Session
- Main root title handled by projects
- Add Hotkeys
- Create projects module
- split fsw and fst filetypes
- Add last_session saving

* lib.project
- Documentation
- Ask confirm on closing unsaved project
-Fixups

* Track model folder changes
- Shuffle some globals
- Activate System Verbosity for GUI

* lib.gui.utils - Documentation and clean up
- lib.gui.custom_widgets - Create and document

* Add GUI config option to disable auto loading model stats 
lib/gui/control_helper.py