          ctltitle = opts[1] if len(opts) == 2 else opts[0]
          ctltitle = ctltitle.replace("-", " ").replace("_", " ").strip().title()
          return ctltitle
  
      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
  
      @staticmethod
      def set_sysbrowser(action, filetypes, action_option):
          """ Set the correct file system browser and filetypes
              for the passed in action """
 
</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             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             sysbrowser = ["load"]
 </s> add             retval["browser"] = ["load"] </s> remove             sysbrowser = ["context"]
        logger.debug("sysbrowser: %s, filetypes: '%s'", sysbrowser, filetypes)
        return sysbrowser, filetypes

    def set_context_option(self, command):
        """ Set the tk_var for the source action option
            that dictates the context sensitive file browser. """
        actions = {item["opts"][0]: item["value"]
                   for item in self.gen_command_options(command)}
        for opt in self.gen_command_options(command):
            if opt["filesystem_browser"] == ["context"]:
                opt["action_option"] = actions[opt["action_option"]]
 </s> add             retval["browser"] = ["context"]
            retval["command"] = command
            retval["action_option"] = action_option
            retval["destination"] = option.get("dest", option["opts"][1].replace("--", ""))
        else:
            retval["browser"] = ["folder"]
        logger.debug(retval)
        return retval </s> remove         return final_options
 </s> add         return gui_options
    @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
          ctltitle = opts[1] if len(opts) == 2 else opts[0]
          ctltitle = ctltitle.replace("-", " ").replace("_", " ").strip().title()
          return ctltitle
  
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
    @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
  
      @staticmethod
      def set_sysbrowser(action, filetypes, action_option):
          """ Set the correct file system browser and filetypes
              for the passed in action """
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 replace replace 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