The source code for the GUI example can be found here.
set_sensitive()
method can be called on any GTK widget. It
accepts one argument, which is either true or false. When it is false,
the widget is greyed out and the user cannot interact with it. The tstep
and nstep values are only needed for the simulator, and not the minimiser.
Connect a callback to the option menu that greys out tstep and nstep entries
and labels when the user selects simulate, and desensitises them when they
select minimise. You may want to refer to the PyGTK tutorial for help.