          self.widget = widget
          self.standard_actions()
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def standard_actions(self):
          """ Standard menu actions """
          self.add_command(label="Cut", command=lambda: self.widget.event_generate("<<Cut>>"))
          self.add_command(label="Copy", command=lambda: self.widget.event_generate("<<Copy>>"))
          self.add_command(label="Paste", command=lambda: self.widget.event_generate("<<Paste>>"))
          self.add_separator()
          self.add_command(label="Select all", command=self.select_all)
  
      def cm_bind(self):
          """ Bind the menu to the widget's Right Click event """
          button = "<Button-2>" if platform.system() == "Darwin" else "<Button-3>"
          logger.debug("Binding '%s' to '%s'", button, self.widget.winfo_class())
          scaling_factor = get_config().scaling_factor if get_config() is not None else 1.0
          x_offset = int(34 * scaling_factor)
          self.widget.bind(button,
                           lambda event: self.tk_popup(event.x_root + x_offset, event.y_root, 0))
  
      def select_all(self):
          """ Select all for Text or Entry widgets """
          logger.debug("Selecting all for '%s'", self.widget.winfo_class())
          if self.widget.winfo_class() == "Text":
              self.widget.focus_force()
              self.widget.tag_add("sel", "1.0", "end")
          else:
              self.widget.focus_force()
              self.widget.select_range(0, tk.END)
  
  
  class LongRunningTask(Thread):
      """ For long running tasks, to stop the GUI becoming unresponsive
          Run in a thread and handle cursor events """
 
</s> remove class LongRunningTask(Thread):
    """ For long running tasks, to stop the GUI becoming unresponsive
        Run in a thread and handle cursor events """
 </s> add     Parameters
    ----------
    widget: tkinter object, optional
        The widget that this :class:`LongRunningTask` is associated with. Used for setting the busy
        cursor in the correct location. Default: ``None``.
    """ </s> remove     def set_command_args(self, command, options):
        """ Pass the saved config items back to the CliOptions """
        if not options:
            return
        for srcopt, srcval in options.items():
            optvar = self.cli_opts.get_one_option_variable(command, srcopt)
            if not optvar:
                continue
            optvar.set(srcval)

    def save(self, command=None):
        """ Save the current GUI state to a config file in json format """
        logger.debug("Saving config: (command: '%s')", command)
        cfgfile = FileHandler("save", "config").retfile
        if not cfgfile:
            return
        filename = cfgfile.name
        cfgfile.close()
        cfg = self.cli_opts.get_option_values(command)
        self.serializer.save(filename, cfg)
        self.add_to_recent(filename, command)
        logger.debug("Saved config: (command: '%s', filename: '%s')", command, filename)

    def add_to_recent(self, filename, command):
        """ Add to recent files """
        recent_filename = os.path.join(self.pathcache, ".recent.json")
        logger.debug("Adding to recent files '%s': (%s, %s)", recent_filename, filename, command)
        if not os.path.exists(recent_filename) or os.path.getsize(recent_filename) == 0:
            recent_files = list()
        else:
            recent_files = self.serializer.load(recent_filename)
        logger.debug("Initial recent files: %s", recent_files)
        filenames = [recent[0] for recent in recent_files]
        if filename in filenames:
            idx = filenames.index(filename)
            del recent_files[idx]
        recent_files.insert(0, (filename, command))
        recent_files = recent_files[:20]
        logger.debug("Final recent files: %s", recent_files)
        self.serializer.save(recent_filename, recent_files)


class ContextMenu(tk.Menu):  # pylint: disable=too-many-ancestors
    """ Pop up menu """
    def __init__(self, widget):
        logger.debug("Initializing %s: (widget_class: '%s')",
                     self.__class__.__name__, widget.winfo_class())
        super().__init__(tearoff=0)
        self.widget = widget
        self.standard_actions()
        logger.debug("Initialized %s", self.__class__.__name__)
 </s> add  </s> remove     def set_geometry(self, root):
 </s> add     def set_geometry(self): </s> remove         self._config.set_cursor_busy(widget=self.widget)
        self.complete = Event()
 </s> add         self._config.set_cursor_busy(widget=self._widget)
        self._complete = Event() </s> remove         self.add_command(label="Load full config...", underline=0, command=self.config.load)
        self.add_command(label="Save full config...", underline=0, command=self.config.save)
 </s> add         self.add_command(label="New Project...",
                         underline=0,
                         accelerator="Ctrl+N",
                         command=self._config.project.new)
        self.root.bind_all("<Control-n>", self._config.project.new)
        self.add_command(label="Open Project...",
                         underline=0,
                         accelerator="Ctrl+O",
                         command=self._config.project.load)
        self.root.bind_all("<Control-o>", self._config.project.load)
        self.add_command(label="Save Project",
                         underline=0,
                         accelerator="Ctrl+S",
                         command=lambda: self._config.project.save(save_as=False))
        self.root.bind_all("<Control-s>", lambda e: self._config.project.save(e, save_as=False))
        self.add_command(label="Save Project as...",
                         underline=13,
                         accelerator="Ctrl+Alt+S",
                         command=lambda: self._config.project.save(save_as=True))
        self.root.bind_all("<Control-Alt-s>", lambda e: self._config.project.save(e, save_as=True))
        self.add_command(label="Reload Project from Disk",
                         underline=0,
                         accelerator="F5",
                         command=self._config.project.reload)
        self.root.bind_all("<F5>", self._config.project.reload)
        self.add_command(label="Close Project",
                         underline=0,
                         accelerator="Ctrl+W",
                         command=self._config.project.close)
        self.root.bind_all("<Control-w>", self._config.project.close)
        self.add_separator()
        self.add_command(label="Open Task...",
                         underline=5,
                         accelerator="Ctrl+Alt+T",
                         command=lambda: self._config.tasks.load(current_tab=False))
        self.root.bind_all("<Control-Alt-t>",
                           lambda e: self._config.tasks.load(e, current_tab=False))
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
          self.widget = widget
          self.standard_actions()
          logger.debug("Initialized %s", self.__class__.__name__)
  
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
class LongRunningTask(Thread):
    """ Runs long running tasks in a background thread to prevent the GUI from becoming
    unresponsive.
  
  
  class LongRunningTask(Thread):
      """ For long running tasks, to stop the GUI becoming unresponsive
          Run in a thread and handle cursor events """
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 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/utils.py