Author: bugman Date: Fri Jun 10 15:24:59 2011 New Revision: 12969 URL: http://svn.gna.org/viewcvs/relax?rev=12969&view=rev Log: Shifted the model-free add_execute_relax() method into the base class. 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=12969&r1=12968&r2=12969&view=diff ============================================================================== --- 1.3/gui/analyses/auto_model_free.py (original) +++ 1.3/gui/analyses/auto_model_free.py Fri Jun 10 15:24:59 2011 @@ -207,33 +207,6 @@ # Show the dialog. dialog.Show() - - - 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.automatic_protocol_controller, button) - sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0) - - # Add the element to the box. - box.Add(sizer, 1, wx.ALIGN_RIGHT, 0) def add_max_iterations(self, box): Modified: 1.3/gui/analyses/base.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/base.py?rev=12969&r1=12968&r2=12969&view=diff ============================================================================== --- 1.3/gui/analyses/base.py (original) +++ 1.3/gui/analyses/base.py Fri Jun 10 15:24:59 2011 @@ -26,6 +26,9 @@ # Python module imports. import wx + +# relax GUI module imports. +from gui import paths class Base_frame: @@ -65,6 +68,33 @@ # Add the button to the box. box.Add(button, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0) + + + 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.automatic_protocol_controller, button) + sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0) + + # Add the element to the box. + box.Add(sizer, 1, wx.ALIGN_RIGHT, 0) def add_static_text(self, box, parent, text='', width=-1, height=-1):