mailr12970 - in /1.3/gui/analyses: auto_model_free.py 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:28:
Author: bugman
Date: Fri Jun 10 15:28:06 2011
New Revision: 12970

URL: http://svn.gna.org/viewcvs/relax?rev=12970&view=rev
Log:
The method is now passed into add_execute_relax() to allow derived classes to 
specify this.


Modified:
    1.3/gui/analyses/auto_model_free.py
    1.3/gui/analyses/base.py

Modified: 1.3/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_model_free.py?rev=12970&r1=12969&r2=12970&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_model_free.py (original)
+++ 1.3/gui/analyses/auto_model_free.py Fri Jun 10 15:28:06 2011
@@ -718,7 +718,7 @@
         self.field_results_dir = self.add_text_sel_element(box, self.parent, 
text="Results directory", default=self.data.results_dir_model, 
fn=self.resdir_modelfree, button=True)
 
         # Add the execution GUI element.
-        self.add_execute_relax(box)
+        self.add_execute_relax(box, self.automatic_protocol_controller)
 
         # Return the packed box.
         return box

Modified: 1.3/gui/analyses/base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/base.py?rev=12970&r1=12969&r2=12970&view=diff
==============================================================================
--- 1.3/gui/analyses/base.py (original)
+++ 1.3/gui/analyses/base.py Fri Jun 10 15:28:06 2011
@@ -70,11 +70,13 @@
         box.Add(button, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0)
 
 
-    def add_execute_relax(self, box):
+    def add_execute_relax(self, box, method):
         """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
+        @param method:  The method to execute when the button is clicked.
+        @type method:   method
         """
 
         # A horizontal sizer for the contents.
@@ -90,7 +92,7 @@
         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.automatic_protocol_controller, 
button)
+        self.gui.Bind(wx.EVT_BUTTON, method, button)
         sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0)
 
         # Add the element to the box.




Related Messages


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