mailr14641 - /1.3/gui/components/relax_data.py


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

Header


Content

Posted by edward on September 14, 2011 - 18:53:
Author: bugman
Date: Wed Sep 14 18:53:11 2011
New Revision: 14641

URL: http://svn.gna.org/viewcvs/relax?rev=14641&view=rev
Log:
Fixes for the relaxation data reading GUI element for the new GUI user 
function design.


Modified:
    1.3/gui/components/relax_data.py

Modified: 1.3/gui/components/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/components/relax_data.py?rev=14641&r1=14640&r2=14641&view=diff
==============================================================================
--- 1.3/gui/components/relax_data.py (original)
+++ 1.3/gui/components/relax_data.py Wed Sep 14 18:53:11 2011
@@ -35,6 +35,7 @@
 from gui.fonts import font
 from gui.misc import add_border, float_to_gui, str_to_gui
 from gui import paths
+from gui.user_functions import User_functions; user_functions = 
User_functions()
 
 
 class Relax_data_list:
@@ -132,7 +133,7 @@
         self.button_add.SetFont(font.normal)
         self.button_add.SetSize((80, self.height_buttons))
         button_sizer.Add(self.button_add, 0, 0, 0)
-        self.gui.Bind(wx.EVT_BUTTON, 
self.gui.user_functions.relax_data.read, self.button_add)
+        self.gui.Bind(wx.EVT_BUTTON, self.relax_data_read, self.button_add)
         self.button_add.SetToolTipString("Read relaxation data from file.")
 
         # Delete button.
@@ -141,7 +142,7 @@
         self.button_delete.SetFont(font.normal)
         self.button_delete.SetSize((80, self.height_buttons))
         button_sizer.Add(self.button_delete, 0, 0, 0)
-        self.gui.Bind(wx.EVT_BUTTON, 
self.gui.user_functions.relax_data.delete, self.button_delete)
+        self.gui.Bind(wx.EVT_BUTTON, self.relax_data_delete, 
self.button_delete)
         self.button_delete.SetToolTipString("Delete loaded relaxation data 
from the relax data store.")
 
 
@@ -237,6 +238,28 @@
         sizer.Add(self.element, 0, wx.ALL|wx.EXPAND, 0)
 
 
+    def relax_data_delete(self, event):
+        """Launch the relax_data.delete user function.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # Launch the dialog.
+        user_functions.relax_data.delete()
+
+
+    def relax_data_read(self, event):
+        """Launch the relax_data.read user function.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # Launch the dialog.
+        user_functions.relax_data.read()
+
+
     def resize(self, event):
         """Catch the resize to allow the element to be resized.
 




Related Messages


Powered by MHonArc, Updated Wed Sep 14 19:20:02 2011