          if command is None:
              for command, options in config.items():
                  self.set_command_args(command, options)
          else:
              options = config[command]
              self.set_command_args(command, options)
                  
      def set_command_args(self, command, options):
          ''' Pass the saved config items back to the GUI '''
          for src_option, src_value in options.items():
              for dst_options in self.opts[command]:
 
</s> remove         for src_option, src_value in options.items():
            for dst_options in self.opts[command]:
                if dst_options['control_title'] == src_option:
                    dst_options['value'].set(src_value)
 </s> add         for srcopt, srcval in options.items():
            for dstopts in self.opts[command]:
                if dstopts['control_title'] == srcopt:
                    dstopts['value'].set(srcval) </s> remove             for command, options in config.items():
                self.set_command_args(command, options)
 </s> add             for cmd, opts in cfg.items():
                self.set_command_args(cmd, opts) </s> remove         config = self.serializer.unmarshal(config_file.read())
 </s> add         cfg = self.serializer.unmarshal(cfgfile.read()) </s> remove         config_file = filedialog.askopenfile(mode='r', filetypes=self.filetypes)
        if not config_file:
 </s> add         cfgfile = filedialog.askopenfile(mode='r', filetypes=self.filetypes)
        if not cfgfile: </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
            opts = cfg[command]
            self.set_command_args(command, opts)
          if command is None:
              for command, options in config.items():
                  self.set_command_args(command, options)
          else:
            opts = cfg[command]
            self.set_command_args(command, opts)
            opts = cfg[command]
            self.set_command_args(command, opts)
                  
      def set_command_args(self, command, options):
          ''' Pass the saved config items back to the GUI '''
          for src_option, src_value in options.items():
              for dst_options in self.opts[command]:
keep keep keep keep replace 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