              opt["action_option"] = action_option
              opt["group"] = group
              final_options.append(opt)
              logger.trace("Processed: %s", opt)
          return final_options
  
      @staticmethod
      def set_control_title(opts):
          """ Take the option switch and format it nicely """
          ctltitle = opts[1] if len(opts) == 2 else opts[0]
 
</s> remove             ctl, sysbrowser, filetypes, action_option, group = self.set_control(opt)
            opt["control_title"] = self.set_control_title(opt.get("opts", ""))
            opt["control"] = ctl
            opt["filesystem_browser"] = sysbrowser
            opt["filetypes"] = filetypes
            opt["action_option"] = action_option
            opt["group"] = group
            final_options.append(opt)
 </s> add             title = self.set_control_title(opt["opts"])
            gui_options[title] = {
                "type": self.get_data_type(opt),
                "default": opt.get("default", None),
                "value": opt.get("default", ""),
                "choices": opt.get("choices", None),
                "gui_radio": opt.get("action", "") == cli.Radio,
                "rounding": self.get_rounding(opt),
                "min_max": opt.get("min_max", None),
                "sysbrowser": self.get_sysbrowser(opt, command),
                "group": opt.get("group", None),
                "helptext": opt["help"],
                "opts": opt["opts"]} </s> remove     def set_control(self, option):
        """ Set the control and filesystem browser to use for each option """
        sysbrowser = None
        group = option.get("group", None)
        action = option.get("action", None)
        action_option = option.get("action_option", None)
        filetypes = option.get("filetypes", None)
        ctl = ttk.Entry
        if action in (cli.FullPaths,
                      cli.DirFullPaths,
                      cli.FileFullPaths,
                      cli.FilesFullPaths,
                      cli.DirOrFileFullPaths,
                      cli.SaveFileFullPaths,
                      cli.ContextFullPaths):
            sysbrowser, filetypes = self.set_sysbrowser(action,
                                                        filetypes,
                                                        action_option)
        elif option.get("min_max", None):
            ctl = ttk.Scale
        elif option.get("action", "") == cli.Radio:
            ctl = ttk.Radiobutton
        elif option.get("choices", "") != "":
            ctl = ttk.Combobox
        elif option.get("action", "") == "store_true":
            ctl = ttk.Checkbutton
        return ctl, sysbrowser, filetypes, action_option, group
 </s> add     @staticmethod
    def get_data_type(opt):
        """ Return a datatype for passing into control_helper.py to get the correct control """
        if opt.get("type", None) is not None and isinstance(opt["type"], type):
            retval = opt["type"]
        elif opt.get("action", "") in ("store_true", "store_false"):
            retval = bool
        else:
            retval = str
        return retval </s> remove     def set_sysbrowser(action, filetypes, action_option):
        """ Set the correct file system browser and filetypes
            for the passed in action """
        sysbrowser = ["folder"]
        filetypes = "default" if not filetypes else filetypes
 </s> add     def get_rounding(opt):
        """ Return rounding if correct data type, else None """
        dtype = opt.get("type", None)
        if dtype == float:
            retval = opt.get("rounding", 2)
        elif dtype == int:
            retval = opt.get("rounding", 1)
        else:
            retval = None
        return retval

    @staticmethod
    def get_sysbrowser(option, command):
        """ Return the system file browser and file types if required else None """
        action = option.get("action", None)
        if action not in (cli.FullPaths,
                          cli.DirFullPaths,
                          cli.FileFullPaths,
                          cli.FilesFullPaths,
                          cli.DirOrFileFullPaths,
                          cli.SaveFileFullPaths,
                          cli.ContextFullPaths):
            return None

        retval = dict()
        action_option = option.get("action_option", None)
        retval["filetypes"] = option.get("filetypes", "default") </s> remove         final_options = list()
 </s> add         gui_options = OrderedDict() </s> remove     def process_options(self, command_options):
 </s> add     def process_options(self, command_options, command):
        return gui_options
              opt["action_option"] = action_option
              opt["group"] = group
              final_options.append(opt)
              logger.trace("Processed: %s", opt)
        return gui_options
  
      @staticmethod
      def set_control_title(opts):
          """ Take the option switch and format it nicely """
          ctltitle = opts[1] if len(opts) == 2 else opts[0]
keep keep keep keep replace keep keep keep keep keep
 GUI Update


- Launch in fullscreen
- Expand Control Helper. Clean up config popup
- Standardize and overhaul GUI for CliOpts 
lib/gui/options.py