Author: bugman Date: Sun Apr 21 00:44:54 2013 New Revision: 19519 URL: http://svn.gna.org/viewcvs/relax?rev=19519&view=rev Log: The relaxation time part of the spectra list GUI element can now be turned on or off. Modified: trunk/gui/analyses/auto_rx_base.py trunk/gui/components/spectrum.py Modified: trunk/gui/analyses/auto_rx_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_rx_base.py?rev=19519&r1=19518&r2=19519&view=diff ============================================================================== --- trunk/gui/analyses/auto_rx_base.py (original) +++ trunk/gui/analyses/auto_rx_base.py Sun Apr 21 00:44:54 2013 @@ -219,7 +219,7 @@ # Add the peak list selection GUI element, with spacing. box.AddSpacer(20) - self.peak_intensity = Spectra_list(gui=self.gui, parent=self, box=box, id=str(self.data_index), fn_add=self.peak_wizard) + self.peak_intensity = Spectra_list(gui=self.gui, parent=self, box=box, id=str(self.data_index), fn_add=self.peak_wizard, relax_times=True) box.AddSpacer(10) # The optimisation settings. Modified: trunk/gui/components/spectrum.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/components/spectrum.py?rev=19519&r1=19518&r2=19519&view=diff ============================================================================== --- trunk/gui/components/spectrum.py (original) +++ trunk/gui/components/spectrum.py Sun Apr 21 00:44:54 2013 @@ -45,7 +45,7 @@ class Spectra_list(Base_list): """The GUI element for listing loaded spectral data.""" - def __init__(self, gui=None, parent=None, box=None, id=None, fn_add=None, proportion=0, button_placement='default'): + def __init__(self, gui=None, parent=None, box=None, id=None, fn_add=None, proportion=0, button_placement='default', relax_times=False): """Build the spectral list GUI element. @keyword gui: The main GUI object. @@ -64,10 +64,13 @@ @type proportion: bool @keyword button_placement: Override the button visibility and placement. The value of 'default' will leave the buttons at the default setting. The value of 'top' will place the buttons at the top, 'bottom' will place them at the bottom, and None will turn off the buttons. @type button_placement: str or None + @keyword relax_times: A flag which if True will activate the relaxation time parts of the GUI element. + @type relax_times: bool """ # Store the arguments. self.fn_add = fn_add + self.relax_times_flag = relax_times # Initialise the base class. super(Spectra_list, self).__init__(gui=gui, parent=parent, box=box, id=id, proportion=proportion, button_placement=button_placement) @@ -337,13 +340,15 @@ 'text': "Specify which spectra are &replicated", 'icon': fetch_icon(uf_info.get_uf('spectrum.replicated').gui_icon), 'method': self.action_spectrum_replicated - }, { + } + ] + if self.relax_times_flag: + self.popup_menus.append({ 'id': wx.NewId(), 'text': "Set the relaxation &time", 'icon': fetch_icon(uf_info.get_uf('relax_fit.relax_time').gui_icon), 'method': self.action_relax_fit_relax_time - } - ] + }) def update_data(self): @@ -374,7 +379,7 @@ index += 1 # The relaxation times. - if self.relax_times(index): + if self.relax_times_flag and self.relax_times(index): index += 1 # The replicated spectra.