mailr11746 - in /branches/bieri_gui/gui_bieri: menu.py relax_gui.py user_functions/__init__.py user_functions/molecule.py


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

Header


Content

Posted by edward on December 08, 2010 - 18:07:
Author: bugman
Date: Wed Dec  8 18:07:21 2010
New Revision: 11746

URL: http://svn.gna.org/viewcvs/relax?rev=11746&view=rev
Log:
The molecule.add user function GUI element is now partly functional, in that 
a blank window is shown.

The empty window is now being created, and all the user function windows are 
now cleanly destroyed
on exit.


Modified:
    branches/bieri_gui/gui_bieri/menu.py
    branches/bieri_gui/gui_bieri/relax_gui.py
    branches/bieri_gui/gui_bieri/user_functions/__init__.py
    branches/bieri_gui/gui_bieri/user_functions/molecule.py

Modified: branches/bieri_gui/gui_bieri/menu.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/menu.py?rev=11746&r1=11745&r2=11746&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/menu.py (original)
+++ branches/bieri_gui/gui_bieri/menu.py Wed Dec  8 18:07:21 2010
@@ -191,8 +191,8 @@
 
         # The list of entries to build.
         entries = [
-            [id_base + 000, "&molecule", paths.icon_16x16.molecule, 
self.gui.user_functions.script.run, [
-                [id_base + 001, "&add", paths.icon_16x16.add, 
self.gui.user_functions.script.run]
+            [id_base + 000, "&molecule", paths.icon_16x16.molecule, None, [
+                [id_base + 001, "&add", paths.icon_16x16.add, 
self.gui.user_functions.molecule.add]
             ]],
             [id_base + 100, "&script",   paths.icon_16x16.uf_script, 
self.gui.user_functions.script.run, []]
         ]

Modified: branches/bieri_gui/gui_bieri/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/relax_gui.py?rev=11746&r1=11745&r2=11746&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/relax_gui.py (original)
+++ branches/bieri_gui/gui_bieri/relax_gui.py Wed Dec  8 18:07:21 2010
@@ -368,6 +368,7 @@
             self.dialog_about_relax.Destroy()
             self.relax_prompt.Destroy()
             self.mol_res_spin_tree.Destroy()
+            self.user_functions.destroy()
 
             # Destroy the main window.
             self.Destroy()

Modified: branches/bieri_gui/gui_bieri/user_functions/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/__init__.py?rev=11746&r1=11745&r2=11746&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/__init__.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/__init__.py Wed Dec  8 
18:07:21 2010
@@ -54,3 +54,10 @@
         # The user functions.
         self.molecule = Molecule(self.gui, self.interpreter)
         self.script = Script(self.gui, self.interpreter)
+
+
+    def destroy(self):
+        """Close all windows."""
+
+        # Send the commands onwards to the user function classes.
+        self.molecule.destroy()

Modified: branches/bieri_gui/gui_bieri/user_functions/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/molecule.py?rev=11746&r1=11745&r2=11746&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/molecule.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/molecule.py Wed Dec  8 
18:07:21 2010
@@ -34,8 +34,24 @@
     def setup(self):
         """Place all the GUI classes into this class for storage."""
 
-        # The add dialog.
-        self.add = Add_window(self.gui, self.interpreter)
+        # The dialogs.
+        self._add_window = Add_window(self.gui, self.interpreter)
+
+
+    def add(self, event):
+        """The molecule.add user function.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        self._add_window.Show()
+
+
+    def destroy(self):
+        """Close all windows."""
+
+        self._add_window.Destroy()
 
 
 class Add_window(UF_window):
@@ -44,4 +60,3 @@
     # Some class variables.
     title = 'Molecule addition'
 
-    




Related Messages


Powered by MHonArc, Updated Wed Dec 08 19:20:02 2010