  
      Parameters
      ----------
      name: str
          The name of the configuration file. Used for the pop-up title bar.
      configuration: :class:`~lib.config.FaceswapConfig`
          The configuration options for the requested pop-up window
      """
      def __init__(self, name, configuration):
          logger.debug("Initializing %s: (name: %s, configuration: %s)",
                       self.__class__.__name__, name, configuration)
          super().__init__()
 
</s> remove     def __init__(self, name, configuration):
        logger.debug("Initializing %s: (name: %s, configuration: %s)",
                     self.__class__.__name__, name, configuration)
 </s> add     def __init__(self, name, configurations):
        logger.debug("Initializing %s: (name: %s, configurations: %s)",
                     self.__class__.__name__, name, configurations) </s> remove         self._name = name
        self._config = configuration
 </s> add  </s> remove     Parameters
    ----------
    name: str
        The name of the configuration file. Used for the pop-up title bar.
    configuration: :class:`~lib.config.FaceswapConfig`
        The configuration options for the requested pop-up window
    """
    logger.debug("name: %s, configuration: %s", name, configuration)
    if POPUP:
        p_key = list(POPUP.keys())[0]
        logger.debug("Closing open popup: '%s'", p_key)
        POPUP[p_key].destroy()
        del POPUP[p_key]
    window = _ConfigurePlugins(name, configuration)
    POPUP[name] = window
    logger.debug("Current pop-up: %s", POPUP)
 </s> add     def open_popup(self, name=None):
        """ Launch the popup, ensuring only one instance is ever open

        Parameters
        ----------
        name: str, Optional
            The name of the configuration file. Used for selecting the correct section if required.
            Set to ``None`` if no initial section should be selected. Default: ``None``
        """
        if not self._configs:
            self._scan_for_configs()
        logger.debug("name: %s", name)
        if self._popup is not None:
            logger.info("Popup already open. Returning: %s", _POPUP)
            return
        self._popup = _ConfigurePlugins(name, self._configs)

    def close_popup(self):
        """ Destroy the open popup and remove it from tracking. """
        if self._popup is None:
            logger.info("No popup to close. Returning")
            return
        self._popup.destroy()
        del self._popup
        self._popup = None

    def _scan_for_configs(self):
        """ Scan the plugin folders for configuration settings. Add in the GUI configuration also.

        Populates the attribute :attr:`_configs`.
        """
        root_path = os.path.abspath(os.path.dirname(sys.argv[0]))
        plugins_path = os.path.join(root_path, "plugins")
        logger.debug("Scanning path: '%s'", plugins_path)
        for dirpath, _, filenames in os.walk(plugins_path):
            if "_config.py" in filenames:
                plugin_type = os.path.split(dirpath)[-1]
                config = self._load_config(plugin_type)
                self._configs[plugin_type] = config
        self._configs["gui"] = get_config().user_config
        logger.debug("Configs loaded: %s", sorted(list(self._configs.keys())))

    @classmethod
    def _load_config(cls, plugin_type):
        """ Load the config from disk. If the file doesn't exist, then it will be generated.

        Parameters
        ----------
        plugin_type: str
            The plugin type (i.e. extract, train convert) that the config should be loaded for

        Returns
        -------
        :class:`lib.config.FaceswapConfig`
            The Configuration for the selected plugin
        """
        # Load config to generate default if doesn't exist
        mod = ".".join(("plugins", plugin_type, "_config"))
        module = import_module(mod)
        config = module.Config(None)
        logger.debug("Found '%s' config at '%s'", plugin_type, config.configfile)
        return config


_STATE = _State()
open_popup = _STATE.open_popup </s> remove def popup_config(name, configuration):
    """ Open the settings for the requested configuration file and close any already active
    pop-ups.
 </s> add class _State():
    """ Holds the existing config files and the current state of the popup window. """
    def __init__(self):
        self._popup = None
        # The GUI Config cannot be scanned until GUI is launched, so this is populated
        # on the first call to load the settings
        self._configs = dict() </s> remove         container: :class:`ttk.Notebook`
            The notebook to place the category options into
        category: str
            The name of the categories to build options for
 </s> add         section: str
            The main section to be navigated to (or root node)
        subsections: list
            The full list of subsections ending on the required node
        """
        labels = ["global"] if not subsections else subsections
        self._vars["header"].set(" - ".join(sect.replace("_", " ").title() for sect in labels))
        self._set_display(section, subsections)
        The name of the section that is being navigated to. Used for opening on the correct
        page in the Tree View.
    configurations: dict
        Dictionary containing the :class:`~lib.config.FaceswapConfig` object for each
        configuration section for the requested pop-up window
  
      Parameters
      ----------
      name: str
        The name of the section that is being navigated to. Used for opening on the correct
        page in the Tree View.
    configurations: dict
        Dictionary containing the :class:`~lib.config.FaceswapConfig` object for each
        configuration section for the requested pop-up window
        The name of the section that is being navigated to. Used for opening on the correct
        page in the Tree View.
    configurations: dict
        Dictionary containing the :class:`~lib.config.FaceswapConfig` object for each
        configuration section for the requested pop-up window
        The name of the section that is being navigated to. Used for opening on the correct
        page in the Tree View.
    configurations: dict
        Dictionary containing the :class:`~lib.config.FaceswapConfig` object for each
        configuration section for the requested pop-up window
      """
      def __init__(self, name, configuration):
          logger.debug("Initializing %s: (name: %s, configuration: %s)",
                       self.__class__.__name__, name, configuration)
          super().__init__()
keep keep keep keep replace replace replace keep keep keep keep keep
 GUI: Consolidate settings to single menu 
lib/gui/popup_configure.py