mailr14634 - /1.3/gui/spin_viewer/tree.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:14:
Author: bugman
Date: Wed Sep 14 18:14:12 2011
New Revision: 14634

URL: http://svn.gna.org/viewcvs/relax?rev=14634&view=rev
Log:
The spin loading wizard is now accessible from the tree's root menu in the 
spin viewer window.


Modified:
    1.3/gui/spin_viewer/tree.py

Modified: 1.3/gui/spin_viewer/tree.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/spin_viewer/tree.py?rev=14634&r1=14633&r2=14634&view=diff
==============================================================================
--- 1.3/gui/spin_viewer/tree.py (original)
+++ 1.3/gui/spin_viewer/tree.py Wed Sep 14 18:14:12 2011
@@ -45,6 +45,7 @@
 
     # Some IDs for the menu entries.
     MENU_ROOT_MOLECULE_CREATE = wx.NewId()
+    MENU_ROOT_LOAD_SPINS = wx.NewId()
     MENU_SPIN_SPIN_DELETE = wx.NewId()
     MENU_SPIN_SPIN_SELECT = wx.NewId()
     MENU_SPIN_SPIN_DESELECT = wx.NewId()
@@ -70,6 +71,7 @@
 
         # Store the args.
         self.gui = gui
+        self.parent = parent
 
         # Execute the base class method.
         wx.Window.__init__(self, parent, id, style=wx.WANTS_CHARS)
@@ -417,13 +419,22 @@
 
         # The menu.
         menu = wx.Menu()
+
+        # The add molecule entry.
         item = build_menu_item(menu, id=self.MENU_ROOT_MOLECULE_CREATE, 
text="Add molecule", icon=paths.icon_16x16.add)
         menu.AppendItem(item)
         if status.exec_lock.locked():
             item.Enable(False)
 
+        # The add molecule entry.
+        item = build_menu_item(menu, id=self.MENU_ROOT_LOAD_SPINS, 
text="Load spins", icon=paths.icon_16x16.spin)
+        menu.AppendItem(item)
+        if status.exec_lock.locked():
+            item.Enable(False)
+
         # The menu actions.
         self.Bind(wx.EVT_MENU, self.gui.user_functions.molecule.create, 
id=self.MENU_ROOT_MOLECULE_CREATE)
+        self.Bind(wx.EVT_MENU, self.gui.spin_viewer.load_spins_wizard, 
id=self.MENU_ROOT_LOAD_SPINS)
 
         # Show the menu.
         if status.show_gui:




Related Messages


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