  
      def clear_config(self, command=None):
          ''' Clear all values from the GUI '''
          if command is None:
              options = [option for options in self.opts.values() for option in options]
          else:
              options = [option for option in self.opts[command]]
          for option in options:
              if isinstance(option['value'].get(), bool):
                  option['value'].set(False)
 
</s> remove             options = [option for option in self.opts[command]]
 </s> add             options = [opt for opt in self.opts[command]] </s> remove             options = [option for options in self.opts.values() for option in options]
 </s> add             options = [opt for opts in self.opts.values() for opt in opts] </s> remove             options = [option for option in self.opts[command]]
 </s> add             options = [opt for opt in self.opts[command]] </s> remove             config = {command: {option['control_title']: option['value'].get() for option in self.opts[command]}}
        config_file.write(self.serializer.marshal(config))
        config_file.close
 </s> add             cfg = {command: {opt['control_title']: opt['value'].get()
                   for opt in self.opts[command]}}
        cfgfile.write(self.serializer.marshal(cfg))
        cfgfile.close </s> remove         config_file = filedialog.asksaveasfile(mode='w', filetypes=self.filetypes, defaultextension='.fsw')
        if not config_file:
 </s> add         cfgfile = filedialog.asksaveasfile( mode='w',
                                            filetypes=self.filetypes, 
                                            defaultextension='.fsw')
        if not cfgfile:
            options = [opt for opts in self.opts.values() for opt in opts]
  
      def clear_config(self, command=None):
          ''' Clear all values from the GUI '''
          if command is None:
            options = [opt for opts in self.opts.values() for opt in opts]
          else:
              options = [option for option in self.opts[command]]
          for option in options:
              if isinstance(option['value'].get(), bool):
                  option['value'].set(False)
keep keep keep keep replace keep keep keep keep keep
 GUI v0.1.0a (#336)

* Code clean up

* Code refactor

* bugfix: Find paths to icons when launched from outside faceswap dir

* Bugfix: Disable GUI if TkInter app not available

* BugFix: Disable GUI if $DISPLAY not detected

* Minor code ammends

* Code Refactor

* DISPLAY check fix 
scripts/gui.py