                  title = title.replace("_", " ").title()
                  page.add(frame, text=title)
              page.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
          else:
              cp_options = list(self._config_cpanel_dict[category][plugins[0]].values())
              page = ControlPanel(container,
                                  cp_options,
                                  header_text=self._plugin_info[plugins[0]],
                                  **panel_kwargs)
  
          logger.debug("Built plugin config page: '%s'", category)
  
          return page
  
      def _add_frame_separator(self):
          """ Add a separator between the configuration options and the action buttons. """
          logger.debug("Add frame seperator")
          sep = ttk.Frame(self._page_frame, height=2, relief=tk.RIDGE)
          sep.pack(fill=tk.X, pady=(5, 0), side=tk.BOTTOM)
          logger.debug("Added frame seperator")
  
      def _add_actions(self):
          """ Add Action buttons to the bottom of the pop-up window. """
          logger.debug("Add action buttons")
          frame = ttk.Frame(self._page_frame)
          btn_cls = ttk.Button(frame, text="Cancel", width=10, command=self.destroy)
          btn_ok = ttk.Button(frame, text="OK", width=10, command=self._save)
          btn_rst = ttk.Button(frame, text="Reset", width=10, command=self._reset)
  
          Tooltip(btn_cls, text="Close without saving", wraplength=720)
          Tooltip(btn_ok, text="Close and save config", wraplength=720)
          Tooltip(btn_rst, text="Reset all plugins to default values", wraplength=720)
  
 
</s> remove         Tooltip(btn_cls, text="Close without saving", wraplength=720)
        Tooltip(btn_ok, text="Close and save config", wraplength=720)
        Tooltip(btn_rst, text="Reset all plugins to default values", wraplength=720)
 </s> add     def _create_links_page(self, key):
        """ For headings which don't have settings, build a links page to the subsections. </s> remove         frame.pack(fill=tk.BOTH, padx=5, pady=5, side=tk.BOTTOM)
        btn_cls.pack(padx=2, side=tk.RIGHT)
        btn_ok.pack(padx=2, side=tk.RIGHT)
        btn_rst.pack(padx=2, side=tk.RIGHT)
 </s> add         Parameters
        ----------
        key: str
            The lookup key to set the links page for
        """
        frame = ttk.Frame(self)
        links = {item.replace(key, "")[1:].split("|")[0]
                 for item in self._config_cpanel_dict
                 if item.startswith(key)}

        if not links:
            return frame

        header_lbl = ttk.Label(frame, text="Select a plugin to configure:")
        header_lbl.pack(side=tk.TOP, fill=tk.X, padx=5, pady=(5, 10))
        for link in sorted(links):
            lbl = ttk.Label(frame,
                            text=link.replace("_", " ").title(),
                            anchor=tk.W,
                            foreground="blue",
                            cursor="hand2")
            lbl.pack(side=tk.TOP, fill=tk.X, padx=10, pady=(0, 5))
            bind = "{}|{}".format(key, link)
            lbl.bind("<Button-1>", lambda e, l=bind: self._link_callback(l))

        return frame

    def _link_callback(self, identifier):
        """ Set the tree view to the selected item and display the requested page on a link click. </s> remove         logger.debug("Building plugin config page: '%s'", category)
        plugins = sorted(list(key for key in self._config_cpanel_dict[category].keys()))
        panel_kwargs = dict(columns=2, max_columns=2, option_columns=2, blank_nones=False)
        if any(plugin != category for plugin in plugins):
            page = ttk.Notebook(container)
            for plugin in plugins:
                cp_options = list(self._config_cpanel_dict[category][plugin].values())
                frame = ControlPanel(page,
                                     cp_options,
                                     header_text=self._plugin_info[plugin],
                                     **panel_kwargs)
                title = plugin[plugin.rfind(".") + 1:]
                title = title.replace("_", " ").title()
                page.add(frame, text=title)
            page.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
 </s> add         key = "|".join([section] + subsections)
        if self._displayed_frame is not None:
            self._displayed_frame.pack_forget()

        if key not in self._cache:
            self._cache_page(key)

        self._displayed_frame = self._cache[key]
        self._displayed_frame.pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)

    def _cache_page(self, key):
        """ Create the control panel options for the requested configuration and cache.

        Parameters
        ----------
        key: str
            The lookup key to the settings cache
        """
        panel_kwargs = dict(columns=1, max_columns=1, option_columns=4, blank_nones=False)
        info = self._config_cpanel_dict.get(key, None)
        if info is None:
            logger.debug("key '%s' does not exist in options. Creating links page.", key)
            self._cache[key] = self._create_links_page(key) </s> remove         logger.debug("Added action buttons")
 </s> add         Parameters
        ----------
        identifier: str
            The identifier from the tree view for the page to display
        """
        parent = "|".join(identifier.split("|")[:-1])
        self._tree.item(parent, open=True)
        self._tree.selection_set(identifier)
        self._tree.focus(identifier)
        split = identifier.split("|")
        section = split[0]
        subsections = split[1:] if len(split) > 1 else []
        self.select_options(section, subsections)

    def reset(self, page_only=False):
        """ Reset all configuration options to their default values. </s> remove     def _reset(self):
        """ Reset all configuration options to their default values. """
        logger.debug("Resetting config")
        for section, items in self._config.defaults.items():
            logger.debug("Resetting section: '%s'", section)
            lookup = [section.split(".")[0], section.split(".")[-1]]
            for item, def_opt in items.items():
                if item == "helptext":
                    continue
                default = def_opt["default"]
                logger.debug("Resetting: '%s' to '%s'", item, default)
                self._config_cpanel_dict[lookup[0]][lookup[1]][item].set(default)
 </s> add         Parameters
        ----------
        page_only: bool, optional
            ``True`` resets just the currently selected page's options to default, ``False`` resets
            all plugins within the currently selected config to default. Default: ``False``
        """
        logger.debug("Resetting config, page_only: %s", page_only)
        selection = self._tree.focus()
        if page_only:
            if selection not in self._config_cpanel_dict:
                logger.info("No configuration options to reset for current page: %s", selection)
                return
            items = list(self._config_cpanel_dict[selection]["options"].values())
        else:
            items = [opt
                     for key, val in self._config_cpanel_dict.items()
                     for opt in val["options"].values()
                     if key.startswith(selection.split("|")[0])]
        for item in items:
            logger.debug("Resetting item '%s' from '%s' to default '%s'",
                         item.title, item.get(), item.default)
            item.set(item.default)
        logger.debug("Reset config")

    def save(self, page_only=False):
        """ Save the configuration file to disk.
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
                  title = title.replace("_", " ").title()
                  page.add(frame, text=title)
              page.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
          else:
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
            self._cache[key] = ControlPanel(self,
                                            list(info["options"].values()),
                                            header_text=info["helptext"],
                                            **panel_kwargs)
  
          Tooltip(btn_cls, text="Close without saving", wraplength=720)
          Tooltip(btn_ok, text="Close and save config", wraplength=720)
          Tooltip(btn_rst, text="Reset all plugins to default values", wraplength=720)
  
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: Consolidate settings to single menu 
lib/gui/popup_configure.py