                   variable=None):
          logger.debug("Initializing %s: (Handletype: '%s', filetype: '%s', command: '%s', action: "
                       "'%s', variable: %s)", self.__class__.__name__, handletype, filetype, command,
                       action, variable)
          self.handletype = handletype
          self.contexts = {
              "effmpeg": {
                  "input": {"extract": "filename",
                            "gen-vid": "dir",
                            "get-fps": "filename",
                            "get-info": "filename",
                            "mux-audio": "filename",
                            "rescale": "filename",
                            "rotate": "filename",
                            "slice": "filename"},
                  "output": {"extract": "dir",
                             "gen-vid": "savefilename",
                             "get-fps": "nothing",
                             "get-info": "nothing",
                             "mux-audio": "savefilename",
                             "rescale": "savefilename",
                             "rotate": "savefilename",
                             "slice": "savefilename"}
              }
          }
          self.defaults = self.set_defaults()
          self.kwargs = self.set_kwargs(filetype, command, action, variable)
          self.retfile = getattr(self, self.handletype.lower())()
          logger.debug("Initialized %s", self.__class__.__name__)
  
      @property
      def filetypes(self):
          """ Set the filetypes for opening/saving """
 
</s> remove     def set_defaults(self):
        """ Set the default filetype to be first in list of filetypes,
            or set a custom filetype if the first is not correct """
 </s> add     @property
    def _contexts(self):
        """dict: Mapping of commands, actions and their corresponding file dialog for context
        handle types. """
        return {
            "effmpeg": {
                "input": {
                    "extract": "filename",
                    "gen-vid": "dir",
                    "get-fps": "filename",
                    "get-info": "filename",
                    "mux-audio": "filename",
                    "rescale": "filename",
                    "rotate": "filename",
                    "slice": "filename"},
                "output": {
                    "extract": "dir",
                    "gen-vid": "savefilename",
                    "get-fps": "nothing",
                    "get-info": "nothing",
                    "mux-audio": "savefilename",
                    "rescale": "savefilename",
                    "rotate": "savefilename",
                    "slice": "savefilename"}
                }
            }

    def _set_defaults(self):
        """ Set the default file type for the file dialog. Generally the first found file type
        will be used, but this is overridden if it is not appropriate.

        Returns
        -------
        dict:
            The default file extension for each file type
        """ </s> remove     def __init__(self, handletype, filetype, command=None, action=None,
                 variable=None):
        logger.debug("Initializing %s: (Handletype: '%s', filetype: '%s', command: '%s', action: "
                     "'%s', variable: %s)", self.__class__.__name__, handletype, filetype, command,
 </s> add     def __init__(self, handletype, filetype, title=None, initialdir=None, command=None,
                 action=None, variable=None):
        logger.debug("Initializing %s: (Handletype: '%s', filetype: '%s', title: '%s', "
                     "initialdir: '%s, 'command: '%s', action: '%s', variable: %s)",
                     self.__class__.__name__, handletype, filetype, title, initialdir, command, </s> remove         if self.handletype.lower() == "context":
            self.set_context_handletype(command, action, variable)
 </s> add         if self._handletype.lower() == "context":
            self._set_context_handletype(command, action, variable)

        if title is not None:
            kwargs["title"] = title </s> remove     def set_kwargs(self, filetype, command, action, variable=None):
        """ Generate the required kwargs for the requested browser """
        logger.debug("Setting Kwargs: (filetype: '%s', command: '%s': action: '%s', "
                     "variable: '%s')", filetype, command, action, variable)
 </s> add     def _set_kwargs(self, title, initialdir, filetype, command, action, variable=None):
        """ Generate the required kwargs for the requested file dialog browser.

        Returns
        -------
        dict:
            The key word arguments for the file dialog to be launched
        """
        logger.debug("Setting Kwargs: (title: %s, initialdir: %s, filetype: '%s', "
                     "command: '%s': action: '%s', variable: '%s')",
                     title, initialdir, filetype, command, action, variable) </s> remove     def filetypes(self):
        """ Set the filetypes for opening/saving """
 </s> add     def _filetypes(self):
        """ dict: The accepted extensions for each file type for opening/saving """
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
                   variable=None):
          logger.debug("Initializing %s: (Handletype: '%s', filetype: '%s', command: '%s', action: "
                       "'%s', variable: %s)", self.__class__.__name__, handletype, filetype, command,
                       action, variable)
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
        self._handletype = handletype
        self._defaults = self._set_defaults()
        self._kwargs = self._set_kwargs(title, initialdir, filetype, command, action, variable)
        self.retfile = getattr(self, "_{}".format(self._handletype.lower()))()
          logger.debug("Initialized %s", self.__class__.__name__)
  
      @property
      def filetypes(self):
          """ Set the filetypes for opening/saving """
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 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