mailr11897 - in /branches/bieri_gui/gui_bieri/user_functions: base.py molecule.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:22:
Author: bugman
Date: Sat Dec 18 18:22:16 2010
New Revision: 11897

URL: http://svn.gna.org/viewcvs/relax?rev=11897&view=rev
Log:
The molecule user function dialogs are now modal.


Modified:
    branches/bieri_gui/gui_bieri/user_functions/base.py
    branches/bieri_gui/gui_bieri/user_functions/molecule.py

Modified: branches/bieri_gui/gui_bieri/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/base.py?rev=11897&r1=11896&r2=11897&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/base.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/base.py Sat Dec 18 18:22:16 
2010
@@ -75,7 +75,7 @@
     main_text = ''
     title = ''
 
-    def __init__(self, gui, interpreter, style=wx.DEFAULT_FRAME_STYLE):
+    def __init__(self, gui, interpreter, style=wx.DEFAULT_DIALOG_STYLE):
         """Set up the user function class."""
 
         # Store the args.

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=11897&r1=11896&r2=11897&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/user_functions/molecule.py (original)
+++ branches/bieri_gui/gui_bieri/user_functions/molecule.py Sat Dec 18 
18:22:16 2010
@@ -39,14 +39,6 @@
 class Molecule(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)
-
-
     def create(self, event):
         """The molecule.create user function.
 
@@ -54,7 +46,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, mol_name=None):
@@ -66,18 +65,17 @@
         @type mol_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:
             self._delete_window.mol.SetValue(mol_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 18:40:02 2010