mailr12973 - in /1.3/gui/analyses: auto_noe.py auto_rx_base.py


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

Header


Content

Posted by edward on June 10, 2011 - 15:35:
Author: bugman
Date: Fri Jun 10 15:35:58 2011
New Revision: 12973

URL: http://svn.gna.org/viewcvs/relax?rev=12973&view=rev
Log:
The NOE and Rx frames are now using the base method add_execute_relax().


Modified:
    1.3/gui/analyses/auto_noe.py
    1.3/gui/analyses/auto_rx_base.py

Modified: 1.3/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_noe.py?rev=12973&r1=12972&r2=12973&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_noe.py (original)
+++ 1.3/gui/analyses/auto_noe.py Fri Jun 10 15:35:58 2011
@@ -89,33 +89,6 @@
         self.build_main_box(box)
 
 
-    def add_execute_relax(self, box):
-        """Create and add the relax execution GUI element to the given box.
-
-        @param box:     The box element to pack the relax execution GUI 
element into.
-        @type box:      wx.BoxSizer instance
-        """
-
-        # A horizontal sizer for the contents.
-        sizer = wx.BoxSizer(wx.HORIZONTAL)
-
-        # The label.
-        label = wx.StaticText(self.parent, -1, "Execute relax        ", 
style=wx.ALIGN_RIGHT)
-        label.SetMinSize((118, 17))
-        label.SetFont(self.gui.font_normal)
-        sizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
-
-        # The button.
-        button = wx.BitmapButton(self.parent, -1, 
wx.Bitmap(IMAGE_PATH+'relax_start.gif', wx.BITMAP_TYPE_ANY))
-        button.SetName('hello')
-        button.SetSize(button.GetBestSize())
-        self.gui.Bind(wx.EVT_BUTTON, self.execute, button)
-        sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0)
-
-        # Add the element to the box.
-        box.Add(sizer, 0, wx.ALIGN_RIGHT, 0)
-
-
     def assemble_data(self):
         """Assemble the data required for the Auto_noe class.
 
@@ -260,7 +233,7 @@
         box.AddStretchSpacer()
 
         # Add the execution GUI element.
-        self.add_execute_relax(box)
+        self.add_execute_relax(box, self.execute)
 
         # Return the box.
         return box

Modified: 1.3/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_rx_base.py?rev=12973&r1=12972&r2=12973&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_rx_base.py (original)
+++ 1.3/gui/analyses/auto_rx_base.py Fri Jun 10 15:35:58 2011
@@ -87,33 +87,6 @@
         self.build_main_box(box)
 
 
-    def add_execute_relax(self, box):
-        """Create and add the relax execution GUI element to the given box.
-
-        @param box:     The box element to pack the relax execution GUI 
element into.
-        @type box:      wx.BoxSizer instance
-        """
-
-        # A horizontal sizer for the contents.
-        sizer = wx.BoxSizer(wx.HORIZONTAL)
-
-        # The label.
-        label = wx.StaticText(self.parent, -1, "Execute relax        ", 
style=wx.ALIGN_RIGHT)
-        label.SetMinSize((118, 17))
-        label.SetFont(self.gui.font_normal)
-        sizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
-
-        # The button.
-        button = wx.BitmapButton(self.parent, -1, 
wx.Bitmap(paths.IMAGE_PATH+'relax_start.gif', wx.BITMAP_TYPE_ANY))
-        button.SetName('hello')
-        button.SetSize(button.GetBestSize())
-        self.gui.Bind(wx.EVT_BUTTON, self.execute, button)
-        sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0)
-
-        # Add the element to the box.
-        box.Add(sizer, 0, wx.ALIGN_RIGHT, 0)
-
-
     def assemble_data(self):
         """Assemble the data required for the Relax_fit class.
 
@@ -247,7 +220,7 @@
         self.peak_intensity = Peak_intensity(gui=self.gui, 
parent=self.parent, subparent=self, data=self.data, label=self.label, box=box)
 
         # Add the execution GUI element.
-        self.add_execute_relax(box)
+        self.add_execute_relax(box, self.execute)
 
         # Return the box.
         return box




Related Messages


Powered by MHonArc, Updated Fri Jun 10 15:40:02 2011