                                            bottom=bottomcontainer)
  
          logger.debug("Added containers")
  
      @staticmethod
      def set_initial_focus():
          """ Set the tab focus from settings """
          config = get_config()
          tab = config.user_config_dict["tab"]
          logger.debug("Setting focus for tab: %s", tab)
          tabs = config.command_tabs
 
</s> remove         config = get_config()
        tab = config.user_config_dict["tab"]
 </s> add         tab = self._config.user_config_dict["tab"] </s> remove         tabs = config.command_tabs
        if tab in tabs:
            config.command_notebook.select(tabs[tab])
        else:
            tool_tabs = config.tools_command_tabs
            if tab in tool_tabs:
                config.command_notebook.select(tabs["tools"])
                config.command_notebook.tools_notebook.select(tool_tabs[tab])
 </s> add         self._config.set_active_tab_by_name(tab) </s> remove         self.objects["containers"] = dict(main=maincontainer,
                                          top=topcontainer,
                                          bottom=bottomcontainer)
 </s> add         self.objects["container_main"] = maincontainer
        self.objects["container_top"] = topcontainer
        self.objects["container_bottom"] = bottomcontainer </s> remove     @property
    def command_tabs(self):
        """ Return dict of command tab titles with their IDs """
        return {self.command_notebook.tab(tab_id, "text").lower(): tab_id
                for tab_id in range(0, self.command_notebook.index("end"))}
 </s> add     @staticmethod
    def _get_scaling(root):
        """ Get the display DPI.

        Returns
        -------
        float:
            The scaling factor
        """
        dpi = root.winfo_fpixels("1i")
        scaling = dpi / 72.0
        logger.debug("dpi: %s, scaling: %s'", dpi, scaling)
        return scaling

    def set_command_notebook(self, notebook):
        """ Set the command notebook to the :attr:`command_notebook` attribute
        and enable the modified callback for :attr:`project`.

        Parameters
        ----------
        notebook: :class:`lib.gui.command.CommandNotebook`
            The main command notebook for the Faceswap GUI
        """
        logger.debug("Setting commane notebook: %s", notebook)
        self._gui_objects["command_notebook"] = notebook
        self.project.set_modified_callback()

    def set_active_tab_by_name(self, name):
        """ Sets the :attr:`command_notebook` or :attr:`tools_notebook` to active based on given
        name.

        Parameters
        ----------
        name: str
            The name of the tab to set active
        """
        name = name.lower()
        if name in self._command_tabs:
            tab_id = self._command_tabs[name]
            logger.debug("Setting active tab to: (name: %s, id: %s)", name, tab_id)
            self.command_notebook.select(tab_id)
        elif name in self._tools_tabs:
            self.command_notebook.select(self._command_tabs["tools"])
            tab_id = self._tools_tabs[name]
            logger.debug("Setting active Tools tab to: (name: %s, id: %s)", name, tab_id)
            self.tools_notebook.select()
        else:
            logger.debug("Name couldn't be found. Setting to id 0: %s", name)
            self.command_notebook.select(0) </s> remove     def __init__(self, root, cli_opts, scaling_factor, pathcache, statusbar, session):
        logger.debug("Initializing %s: (root %s, cli_opts: %s, scaling_factor: %s, pathcache: %s, "
                     "statusbar: %s, session: %s)", self.__class__.__name__, root, cli_opts,
                     scaling_factor, pathcache, statusbar, session)
        self.root = root
        self.cli_opts = cli_opts
        self.scaling_factor = scaling_factor
        self.pathcache = pathcache
        self.statusbar = statusbar
        self.serializer = get_serializer("json")
        self.tk_vars = self.set_tk_vars()
        self.user_config = UserConfig(None)
        self.user_config_dict = self.user_config.config_dict
        self.command_notebook = None  # set in command.py
        self.session = session
        logger.debug("Initialized %s", self.__class__.__name__)
 </s> add     @property
    def _command_tabs(self):
        """ dict: Command tab titles with their IDs. """
        return self.command_notebook.tab_names

    @property
    def _tools_tabs(self):
        """ dict: Tools command tab titles with their IDs. """
        return self.command_notebook.tools_tab_names

    # Config
    @property
    def user_config(self):
        """ dict: The GUI config in dict form. """
        return self._user_config

    @property
    def user_config_dict(self):
        """ dict: The GUI config in dict form. """
        return self._user_config.config_dict
    def set_initial_focus(self):
                                            bottom=bottomcontainer)
  
          logger.debug("Added containers")
  
    def set_initial_focus(self):
    def set_initial_focus(self):
          """ Set the tab focus from settings """
          config = get_config()
          tab = config.user_config_dict["tab"]
          logger.debug("Setting focus for tab: %s", tab)
          tabs = config.command_tabs
keep keep keep keep 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 
scripts/gui.py