  
          actframe = tk.Frame(frame)
          actframe.pack(fill=tk.X, side=tk.BOTTOM, pady=(15, 0))
  
          btnexecute = tk.Button(actframe, text=title, height=2, width=12, command=lambda: self.execute_script(command))
          btnexecute.pack()
          self.bind_help(btnexecute, 'Run the {} script'.format(title))
  
      def add_util_buttons(self, frame, title):
          ''' Add the section utility buttons '''
          command = title.lower()
          title = title.capitalize()
 
</s> remove         actframe.pack(fill=tk.X, side=tk.BOTTOM, pady=(15, 0))
 </s> add         actframe.pack(fill=tk.X, side=tk.TOP, pady=(15, 0)) </s> remove     def add_util_buttons(self, frame, title):
 </s> add     def add_util_buttons(self, frame): </s> remove         command = title.lower()
        title = title.capitalize()

 </s> add  </s> remove         command = title.lower()
        title = title.capitalize()

        utilframe = tk.Frame(frame)
        utilframe.pack(side=tk.TOP, pady=(5,0))

        btnload = tk.Button(utilframe, image=self.icofile, height=16, width=16, command=lambda: self.load_config(command))
        btnload.pack(padx=2, pady=2, side=tk.LEFT)
        self.bind_help(btnload, 'Load existing {} config'.format(title))

        btnsave = tk.Button(utilframe, image=self.icosave, height=16, width=16, command=lambda: self.save_config(command))
        btnsave.pack(padx=2, pady=2, side=tk.LEFT)
        self.bind_help(btnsave, 'Save {} config'.format(title))

        btnreset = tk.Button(utilframe, image=self.icoreset, height=16, width=16, command=lambda: self.reset_config(command))
        btnreset.pack(padx=2, pady=2, side=tk.RIGHT)
        self.bind_help(btnreset, 'Reset {} config to default'.format(title))

        btnclear = tk.Button(utilframe, image=self.icoclear, height=16, width=16, command=lambda: self.clear_config(command))
        btnclear.pack(padx=2, pady=2, side=tk.RIGHT)
        self.bind_help(btnclear, 'Clear all entries for {} config'.format(title))
 </s> add         utlframe = tk.Frame(frame)
        utlframe.pack(side=tk.TOP, pady=(5,0))

        for utl in ('load', 'save', 'clear', 'reset'):
            img = getattr(self.gui, 'ico' + utl)
            action = getattr(self.gui, utl + '_config')
            btnutl = tk.Button( utlframe,
                                height=16,
                                width=16,
                                image=img,
                                command=lambda cmd=action: cmd(self.command))
            btnutl.pack(padx=2, pady=2, side=tk.LEFT)
            self.gui.bind_help(btnutl, utl.capitalize() + ' ' + self.title + ' config') </s> remove         helpframe=tk.Frame(frame)
        helpframe.pack(fill=tk.X, side=tk.TOP, pady=5)
        lbl_title = tk.Label(helpframe, text='Info', width=15, anchor=tk.SW)
        lbl_title.pack(side=tk.TOP)
        self.helptext.set('')
        lbl_help = tk.Label(helpframe, height=20, width=15, textvariable=self.helptext,  wraplength=120, justify=tk.LEFT, anchor=tk.NW, bg="gray90")
        lbl_help.pack(side=tk.BOTTOM, anchor=tk.N)

    def bind_help(self, control, helptext):
        ''' Controls the help text displayed on mouse hover '''
        control.bind('<Enter>', lambda event: self.helptext.set(helptext))
        control.bind('<FocusIn>', lambda event: self.helptext.set(helptext))
        control.bind('<Leave>', lambda event: self.helptext.set(''))
        control.bind('<FocusOut>', lambda event: self.helptext.set(''))

    def add_action_buttons(self, frame, title):
 </s> add         hlpframe=tk.Frame(frame)
        hlpframe.pack(fill=tk.X, side=tk.TOP, pady=5)
        lbltitle = tk.Label(hlpframe, text='Info', width=15, anchor=tk.SW)
        lbltitle.pack(side=tk.TOP)
        self.gui.helptext.set('')
        lblhelp = tk.Label( hlpframe,
                            height=20,
                            width=15,
                            textvariable=self.gui.helptext,
                            wraplength=120, 
                            justify=tk.LEFT, 
                            anchor=tk.NW,
                            bg="gray90")
        lblhelp.pack(side=tk.TOP, anchor=tk.N)

    def add_action_buttons(self, frame):
        btnexecute = tk.Button( actframe,
                                text=self.title,
                                height=2,
                                width=12,
                                command=lambda: self.gui.execute_task(self.command))
        btnexecute.pack(side=tk.TOP)
        self.gui.bind_help(btnexecute, 'Run the {} script'.format(self.title))
  
          actframe = tk.Frame(frame)
          actframe.pack(fill=tk.X, side=tk.BOTTOM, pady=(15, 0))
  
        btnexecute = tk.Button( actframe,
                                text=self.title,
                                height=2,
                                width=12,
                                command=lambda: self.gui.execute_task(self.command))
        btnexecute.pack(side=tk.TOP)
        self.gui.bind_help(btnexecute, 'Run the {} script'.format(self.title))
        btnexecute = tk.Button( actframe,
                                text=self.title,
                                height=2,
                                width=12,
                                command=lambda: self.gui.execute_task(self.command))
        btnexecute.pack(side=tk.TOP)
        self.gui.bind_help(btnexecute, 'Run the {} script'.format(self.title))
        btnexecute = tk.Button( actframe,
                                text=self.title,
                                height=2,
                                width=12,
                                command=lambda: self.gui.execute_task(self.command))
        btnexecute.pack(side=tk.TOP)
        self.gui.bind_help(btnexecute, 'Run the {} script'.format(self.title))
  
      def add_util_buttons(self, frame, title):
          ''' Add the section utility buttons '''
          command = title.lower()
          title = title.capitalize()
keep keep keep keep replace 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