mailr11898 - in /branches/bieri_gui/gui_bieri/user_functions: pipes.py residue.py spin.py


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

Header


Content

Posted by edward on December 18, 2010 - 18:29:
Author: bugman
Date: Sat Dec 18 18:29:57 2010
New Revision: 11898

URL: http://svn.gna.org/viewcvs/relax?rev=11898&view=rev
Log:
All the user function dialogs are now modal.


Modified:
    branches/bieri_gui/gui_bieri/user_functions/pipes.py
    branches/bieri_gui/gui_bieri/user_functions/residue.py
    branches/bieri_gui/gui_bieri/user_functions/spin.py

Modified: branches/bieri_gui/gui_bieri/user_functions/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/pipes.py?rev=11898&r1=11897&r2=11898&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/pipes.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/pipes.py Sat Dec 18 18:29:57 
2010
@@ -38,15 +38,6 @@
 class Pipes(UF_base):
     """The container class for holding all GUI elements."""
 
-    def setup(self):
-        """Place all the GUI classes into this class for storage."""
-
-        # The dialogs.
-        self._create_window = Add_window(self.gui, self.interpreter)
-        self._delete_window = Delete_window(self.gui, self.interpreter)
-        self._switch_window = Switch_window(self.gui, self.interpreter)
-
-
     def create(self, event):
         """The pipe.create user function.
 
@@ -54,7 +45,14 @@
         @type event:    wx event
         """
 
-        self._create_window.Show()
+        # Initialise the dialog.
+        self._create_window = Add_window(self.gui, self.interpreter)
+
+        # Show the dialog.
+        self._create_window.ShowModal()
+
+        # Destroy.
+        self._create_window.Destroy()
 
 
     def delete(self, event):
@@ -64,7 +62,14 @@
         @type event:    wx event
         """
 
-        self._delete_window.Show()
+        # Initialise the dialog.
+        self._delete_window = Delete_window(self.gui, self.interpreter)
+
+        # Show the dialog.
+        self._delete_window.ShowModal()
+
+        # Destroy.
+        self._delete_window.Destroy()
 
 
     def switch(self, event):
@@ -74,14 +79,13 @@
         @type event:    wx event
         """
 
-        self._switch_window.Show()
-
-
-    def destroy(self):
-        """Close all windows."""
-
-        self._create_window.Destroy()
-        self._delete_window.Destroy()
+        # Initialise the dialog.
+        self._switch_window = Switch_window(self.gui, self.interpreter)
+
+        # Show the dialog.
+        self._switch_window.ShowModal()
+
+        # Destroy.
         self._switch_window.Destroy()
 
 

Modified: branches/bieri_gui/gui_bieri/user_functions/residue.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/residue.py?rev=11898&r1=11897&r2=11898&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/residue.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/residue.py Sat Dec 18 
18:29:57 2010
@@ -41,14 +41,6 @@
 class Residue(UF_base):
     """The container class for holding all GUI elements."""
 
-    def setup(self):
-        """Place all the GUI classes into this class for storage."""
-
-        # The dialogs.
-        self._create_window = Create_window(self.gui, self.interpreter)
-        self._delete_window = Delete_window(self.gui, self.interpreter)
-
-
     def create(self, event, mol_name=None):
         """The residue.create user function.
 
@@ -58,12 +50,18 @@
         @type mol_name:     str
         """
 
+        # Initialise the dialog.
+        self._create_window = Create_window(self.gui, self.interpreter)
+
         # Show the dialog.
-        self._create_window.Show()
+        self._create_window.ShowModal()
 
         # Default molecule name.
         if mol_name:
             self._create_window.mol.SetValue(mol_name)
+
+        # Destroy.
+        self._create_window.Destroy()
 
 
     def delete(self, event, mol_name=None, res_num=None, res_name=None):
@@ -79,8 +77,11 @@
         @type res_name:     str
         """
 
+        # Initialise the dialog.
+        self._delete_window = Delete_window(self.gui, self.interpreter)
+
         # Show the dialog.
-        self._delete_window.Show()
+        self._delete_window.ShowModal()
 
         # Default molecule name.
         if mol_name:
@@ -90,11 +91,7 @@
         if res_num or res_name:
             self._delete_window.res.SetValue("%s %s" % (res_num, res_name))
 
-
-    def destroy(self):
-        """Close all windows."""
-
-        self._create_window.Destroy()
+        # Destroy.
         self._delete_window.Destroy()
 
 

Modified: branches/bieri_gui/gui_bieri/user_functions/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/spin.py?rev=11898&r1=11897&r2=11898&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/spin.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/spin.py Sat Dec 18 18:29:57 
2010
@@ -40,14 +40,6 @@
 # The container class.
 class Spin(UF_base):
     """The container class for holding all GUI elements."""
-
-    def setup(self):
-        """Place all the GUI classes into this class for storage."""
-
-        # The dialogs.
-        self._create_window = Create_window(self.gui, self.interpreter)
-        self._delete_window = Delete_window(self.gui, self.interpreter)
-
 
     def create(self, event, mol_name=None, res_num=None, res_name=None):
         """The spin.create user function.
@@ -62,8 +54,11 @@
         @type res_name:     str
         """
 
+        # Initialise the dialog.
+        self._create_window = Create_window(self.gui, self.interpreter)
+
         # Show the dialog.
-        self._create_window.Show()
+        self._create_window.ShowModal()
 
         # Default molecule name.
         if mol_name:
@@ -72,6 +67,9 @@
         # Default residue.
         if res_num or res_name:
             self._create_window.res.SetValue("%s %s" % (res_num, res_name))
+
+        # Destroy.
+        self._create_window.Destroy()
 
 
     def delete(self, event, mol_name=None, res_num=None, res_name=None, 
spin_num=None, spin_name=None):
@@ -91,8 +89,11 @@
         @type spin_name:    str
         """
 
+        # Initialise the dialog.
+        self._delete_window = Delete_window(self.gui, self.interpreter)
+
         # Show the dialog.
-        self._delete_window.Show()
+        self._delete_window.ShowModal()
 
         # Default molecule name.
         if mol_name:
@@ -106,11 +107,7 @@
         if spin_num or spin_name:
             self._delete_window.spin.SetValue("%s %s" % (spin_num, 
spin_name))
 
-
-    def destroy(self):
-        """Close all windows."""
-
-        self._create_window.Destroy()
+        # Destroy.
         self._delete_window.Destroy()
 
 




Related Messages


Powered by MHonArc, Updated Sat Dec 18 19:00:02 2010