          if dirname:
              filepath.set(dirname)
     
      @staticmethod
      def askfile(filepath):
          ''' Pop-up to get path to a file '''
          filename = filedialog.askopenfilename()
          if filename:
              filepath.set(filename)
 
</s> remove     def askdirectory(filepath):
        ''' Pop-up to get path to a directory '''
 </s> add     def ask_folder(filepath):
        ''' Pop-up to get path to a folder ''' </s> remove         if opentype == 'filechooser':
            fileopn = tk.Button(frame, image=self.icofile, command=lambda: self.askfile(filepath), width=16, height=16)
        else:
            fileopn = tk.Button(frame, image=self.icofolder, command=lambda: self.askdirectory(filepath))
 </s> add         img = getattr(self.gui, 'ico' + sysbrowser)
        action = getattr(self, 'ask_' + sysbrowser)
        fileopn = tk.Button(frame, image=img, command=lambda cmd=action: cmd(filepath)) </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         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: </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:
    def ask_load(filepath):
          if dirname:
              filepath.set(dirname)
     
      @staticmethod
    def ask_load(filepath):
          ''' Pop-up to get path to a file '''
          filename = filedialog.askopenfilename()
          if filename:
              filepath.set(filename)
keep keep keep keep replace 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