mailr19773 - /branches/relax_disp/gui/components/spectrum.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 29, 2013 - 15:30:
Author: bugman
Date: Wed May 29 15:30:48 2013
New Revision: 19773

URL: http://svn.gna.org/viewcvs/relax?rev=19773&view=rev
Log:
The spectrum wizard now uses the spectrometer.frequency user function rather 
than frq.set.

The frq.set user function is now called spectrometer.frequency.


Modified:
    branches/relax_disp/gui/components/spectrum.py

Modified: branches/relax_disp/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/components/spectrum.py?rev=19773&r1=19772&r2=19773&view=diff
==============================================================================
--- branches/relax_disp/gui/components/spectrum.py (original)
+++ branches/relax_disp/gui/components/spectrum.py Wed May 29 15:30:48 2013
@@ -85,31 +85,6 @@
         super(Spectra_list, self).__init__(gui=gui, parent=parent, box=box, 
id=id, proportion=proportion, button_placement=button_placement)
 
 
-    def action_frq_set(self, event):
-        """Launch the frq.set user function.
-
-        @param event:   The wx event.
-        @type event:    wx event
-        """
-
-        # The current selection.
-        item = self.element.GetFirstSelected()
-
-        # The spectrum ID.
-        id = gui_to_str(self.element.GetItemText(item))
-
-        # The current time.
-        frq = None
-        if hasattr(cdp, 'spectrometer_frq') and id in cdp.spectrometer_frq:
-            frq = cdp.spectrometer_frq[id]
-
-        # Launch the dialog.
-        if frq == None:
-            uf_store['frq.set'](id=id)
-        else:
-            uf_store['frq.set'](frq=frq, id=id)
-
-
     def action_relax_disp_cpmg_frq(self, event):
         """Launch the relax_disp.cpmg_frq user function.
 
@@ -183,6 +158,31 @@
             uf_store['relax_fit.relax_time'](spectrum_id=id)
         else:
             uf_store['relax_fit.relax_time'](time=time, spectrum_id=id)
+
+
+    def action_spectrometer_frq(self, event):
+        """Launch the spectrometer.frequency user function.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # The current selection.
+        item = self.element.GetFirstSelected()
+
+        # The spectrum ID.
+        id = gui_to_str(self.element.GetItemText(item))
+
+        # The current frequency.
+        frq = None
+        if hasattr(cdp, 'spectrometer_frq') and id in cdp.spectrometer_frq:
+            frq = cdp.spectrometer_frq[id]
+
+        # Launch the dialog.
+        if frq == None:
+            uf_store['spectrometer.frequency'](id=id)
+        else:
+            uf_store['spectrometer.frequency'](frq=frq, id=id)
 
 
     def action_spectrum_baseplane_rmsd(self, event):
@@ -524,8 +524,8 @@
             self.popup_menus.append({
                 'id': wx.NewId(),
                 'text': "Set the spectrometer &frequency",
-                'icon': fetch_icon("relax.frq"),
-                'method': self.action_frq_set
+                'icon': fetch_icon("relax.spectrometer"),
+                'method': self.action_spectrometer_frq
             })
         if self.spin_lock_flag:
             self.popup_menus.append({




Related Messages


Powered by MHonArc, Updated Wed May 29 16:00:02 2013