mailr12935 - /1.3/gui/relax_gui.py


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

Header


Content

Posted by edward on June 09, 2011 - 17:18:
Author: bugman
Date: Thu Jun  9 17:18:10 2011
New Revision: 12935

URL: http://svn.gna.org/viewcvs/relax?rev=12935&view=rev
Log:
Eliminated the __set_properties() and __do_layout() methods.

The code has been shifted into __init__() and some variables shifted to 
hardcoded class variables.


Modified:
    1.3/gui/relax_gui.py

Modified: 1.3/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/relax_gui.py?rev=12935&r1=12934&r2=12935&view=diff
==============================================================================
--- 1.3/gui/relax_gui.py (original)
+++ 1.3/gui/relax_gui.py Thu Jun  9 17:18:10 2011
@@ -73,6 +73,8 @@
     """The main GUI class."""
 
     # Hard coded variables.
+    min_width = 1000
+    min_height = 600
     sequence_file_msg = "please insert sequence file"
     structure_file_pdb_msg = "please insert .pdb file"
 
@@ -137,40 +139,33 @@
         rx_data = ds.relax_gui.analyses[self.noe_index[0]]
         self.frame_1_statusbar = self.CreateStatusBar(3, 0)
 
-        self.__set_properties()
-        self.__do_layout()
-
-        # Close Box event
-        self.Bind(wx.EVT_CLOSE, self.exit_gui)
-
-        # Run a script.
-        if script:
-            self.user_functions.script.script_exec(script)
-
-
-    def __do_layout(self):
-        # Build layout
-        self.Layout()
-        self.SetSize((1000, 600))
-        self.Centre()
-
-
-    def __set_properties(self):
-        # begin wxGlade: main.__set_properties
+        # Set the title.
         self.SetTitle("relaxGUI " + GUI_version)
 
-        # Disable icon if running on a Mac
+        # Set up the program icon (disabled on Macs).
         if not 'darwin' in sys.platform:
-            _icon = wx.EmptyIcon()
-            _icon.CopyFromBitmap(wx.Bitmap(paths.IMAGE_PATH+'relax.gif', 
wx.BITMAP_TYPE_ANY))
-            self.SetIcon(_icon)
-            self.SetSize((1000, 600))
-
-        # statusbar fields
+            icon = wx.EmptyIcon()
+            icon.CopyFromBitmap(wx.Bitmap(paths.IMAGE_PATH+'relax.gif', 
wx.BITMAP_TYPE_ANY))
+            self.SetIcon(icon)
+            self.SetSize((self.min_width, self.min_height))
+
+        # Statusbar fields.
         self.frame_1_statusbar.SetStatusWidths([800, 50, -1])
         frame_1_statusbar_fields = ["relaxGUI (C) 2009 Michael Bieri and (C) 
2010-2011 the relax development team", "relax:", version]
         for i in range(len(frame_1_statusbar_fields)):
             
self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
+
+        # Set up the frame.
+        self.Layout()
+        self.SetSize((1000, 600))
+        self.Centre()
+
+        # Close Box event
+        self.Bind(wx.EVT_CLOSE, self.exit_gui)
+
+        # Run a script.
+        if script:
+            self.user_functions.script.script_exec(script)
 
 
     def about_gui(self, event):




Related Messages


Powered by MHonArc, Updated Thu Jun 09 17:40:02 2011