Index: src/sas/sasgui/perspectives/fitting/gpu_options.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision 9a26428d3d80b70594e1dbb7f815bf6073515036)
+++ src/sas/sasgui/perspectives/fitting/gpu_options.py	(revision c2cb772613608c771fa30f86e8061e89cb7bdbd6)
@@ -53,20 +53,19 @@
             clinfo = None
 
-        #####################################
         self.panel1 = wx.Panel(self, -1)
         static_box1 = wx.StaticBox(self.panel1, -1, "OpenCL Options")
 
-        #contextes = ("Intel(R) Iris(TM) Graphics 6100",
-        #             "Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz",
-        #             "No OpenCL")
         rows = len(clinfo)
 
         flexsizer = wx.FlexGridSizer(rows, 1, hgap=20, vgap=10)
-        self.fitter_button = {}
-        for fitter in clinfo:
+        self.option_button = {}
+        for index, fitter in enumerate(clinfo):
             button = wx.RadioButton(self.panel1, -1,
                     label=fitter, name=fitter)
-            self.fitter_button[fitter] = button
-            #self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, id=button.GetId())
+            if fitter != "No OpenCL":
+                self.option_button[fitter] = str(index)
+            else:
+                self.option_button[fitter] = "None"
+            self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, id=button.GetId())
             flexsizer.Add(button, 0, 0)
 
@@ -78,17 +77,45 @@
         self.vbox = wx.BoxSizer(wx.VERTICAL)
         self.vbox.Add(self.panel1, 0, wx.ALL, 10)
-        ###########################################
-        #self.preamble = wx.StaticText(self, -1, config._acknowledgement_preamble)
-        #items = [config._acknowledgement_preamble_bullet1,
-        #         config._acknowledgement_preamble_bullet2,
-        #         config._acknowledgement_preamble_bullet3,
-        #         config._acknowledgement_preamble_bullet4]
-        #self.list1 = wx.StaticText(self, -1, "\t(1) " + items[0])
-        #self.list2 = wx.StaticText(self, -1, "\t(2) " + items[1])
-        #self.list3 = wx.StaticText(self, -1, "\t(3) " + items[2])
-        #self.list4 = wx.StaticText(self, -1, "\t(4) " + items[3])
-        #self.static_line = wx.StaticLine(self, 0)
-        self.__set_properties()
-        self.__do_layout()
+
+        accept_btn = wx.Button(self, wx.ID_OK)
+        accept_btn.SetToolTipString("Accept new options for GPU")
+
+        help_btn = wx.Button(self, wx.ID_HELP, 'Help')
+        #help_btn = wx.Button(self, wx.ID_ANY, 'Help')
+        help_btn.SetToolTipString("Help on the GPU options")
+
+        self.Bind(wx.EVT_BUTTON, self.OnAccept, accept_btn)
+        #self.Bind(wx.EVT_BUTTON, self.OnCancel, cancel_btn)
+        if help is not None:
+            self.Bind(wx.EVT_BUTTON, self.OnHelp, help_btn)
+
+        self.Bind(wx.EVT_CLOSE, self.OnClose)
+
+        # Create the button sizer that will put the buttons in a row, right
+        # justified, and with a fixed amount of space between them.  This
+        # emulates the Windows convention for placing a set of buttons at the
+        # bottom right of the window.
+        btn_sizer = wx.BoxSizer(wx.HORIZONTAL)
+        btn_sizer.Add((10,20), 1)  # stretchable whitespace
+        btn_sizer.Add(accept_btn, 0)
+        #btn_sizer.Add((10,20), 0)  # non-stretchable whitespace
+        #btn_sizer.Add(cancel_btn, 0)
+        #btn_sizer.Add((10,20), 0)  # non-stretchable whitespace
+        btn_sizer.Add((10,20), 0)  # non-stretchable whitespace
+        btn_sizer.Add(help_btn, 0)
+
+        # Add the button sizer to the main sizer.
+        self.vbox.Add(btn_sizer, 0, wx.EXPAND|wx.ALL, 10)
+
+        # Finalize the sizer and establish the dimensions of the dialog box.
+        # The minimum width is explicitly set because the sizer is not able to
+        # take into consideration the width of the enclosing frame's title.
+        self.SetSizer(self.vbox)
+        #self.vbox.SetMinSize((size[0], -1))
+        self.vbox.Fit(self)
+
+        self.Centre()
+        #self.__set_properties()
+        #self.__do_layout()
 
     def __set_properties(self):
@@ -96,9 +123,5 @@
         :TODO - add method documentation
         """
-        # begin wxGlade: DialogAbout.__set_properties
-        #self.preamble.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
-        #self.preamble.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
         self.SetTitle("Fitting on GPU Options")
-        #Increased size of box from (525, 225), SMK, 04/10/16
         self.SetSize((400, 150))
         # end wxGlade
@@ -108,15 +131,6 @@
         :TODO - add method documentation
         """
-        # begin wxGlade: DialogAbout.__do_layout
         sizer_main = wx.BoxSizer(wx.VERTICAL)
-        #sizer_titles = wx.BoxSizer(wx.VERTICAL)
-        #sizer_titles.Add(self.preamble, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_titles.Add(self.list1, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_titles.Add(self.list2, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_titles.Add(self.list3, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_titles.Add(self.list4, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_titles.Add(self.static_line, 0, wx.ALL|wx.EXPAND, 0)
-        #sizer_titles.Add(self.ack, 0, wx.ALL|wx.EXPAND, 5)
-        #sizer_main.Add(sizer_titles, -1, wx.ALL|wx.EXPAND, 5)
+
         self.SetAutoLayout(True)
         self.SetSizer(sizer_main)
@@ -125,4 +139,34 @@
         # end wxGlade
 
+    def OnRadio(self, event):
+        import sasmodels
+        button = event.GetEventObject()
+        print(self.option_button[button.Name])
+        os.environ["SAS_OPENCL"] = self.option_button[button.Name]
+        sasmodels.kernelcl.ENV = None
+        reload(sasmodels.core)
+        #if self.option_button[button.Name] == "None":
+        #    sasmodels.core.HAVE_OPENCL = False
+        #else:
+        #    sasmodels.kernelcl.ENV.
+
+    def OnAccept(self, event):
+        """
+        Save the current fitter and options to the fit config.
+        """
+        event.Skip()
+
+    def OnHelp(self, event):
+        """
+        Provide help on the selected fitter.
+        """
+        #if self.help is not None:
+        #    self.help(self._get_fitter())
+
+    def OnClose(self, event):
+        """
+        Don't close the window, just hide it.
+        """
+        event.Skip()
 
 ##### testing code ############################################################
