mailr20948 - in /branches/relax_disp: ./ gui/analyses/auto_model_free.py gui/analyses/elements/model_list.py


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

Header


Content

Posted by edward on September 09, 2013 - 19:12:
Author: bugman
Date: Mon Sep  9 19:12:23 2013
New Revision: 20948

URL: http://svn.gna.org/viewcvs/relax?rev=20948&view=rev
Log:
Merged revisions 20946-20947 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r20946 | bugman | 2013-09-09 19:10:45 +0200 (Mon, 09 Sep 2013) | 3 lines
  
  The size of the model list GUI window is now automatically set to the best 
fit.
........
  r20947 | bugman | 2013-09-09 19:11:22 +0200 (Mon, 09 Sep 2013) | 3 lines
  
  Removed the now unused size variables from the model-free model list GUI 
elements.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/analyses/auto_model_free.py
    branches/relax_disp/gui/analyses/elements/model_list.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Sep  9 19:12:23 2013
@@ -1,1 +1,1 @@
-/trunk:1-20944
+/trunk:1-20947

Modified: branches/relax_disp/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_model_free.py?rev=20948&r1=20947&r2=20948&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_model_free.py (original)
+++ branches/relax_disp/gui/analyses/auto_model_free.py Mon Sep  9 19:12:23 
2013
@@ -854,7 +854,6 @@
     ]
     warning = "The model-free models used in dauvergne_protocol 
auto-analysis should almost never be changed!  The consequences will be 
unpredictable.  Please proceed only if you are sure of what you are doing.  
Would you like to modify the model-free model list?"
     red_flag = True
-    size = (800, 350)
     tooltip = "The list model-free models with the %s parameter to optimise 
as the first step of the protocol (see the about window for details).  This 
really should not be changed." % local_tm
     tooltip_button = "Open the model list selector window."
 
@@ -903,7 +902,6 @@
     ]
     warning = "The model-free models used in dauvergne_protocol 
auto-analysis should almost never be changed!  The consequences will be 
unpredictable.  Please proceed only if you are sure of what you are doing.  
Would you like to modify the model-free model list?"
     red_flag = True
-    size = (900, 350)
     tooltip = "The list model-free models to optimise as the iterative part 
of the protocol (see the about window for details).  This really should not 
be changed."
     tooltip_button = "Open the model list selector window."
 

Modified: branches/relax_disp/gui/analyses/elements/model_list.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/model_list.py?rev=20948&r1=20947&r2=20948&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/elements/model_list.py (original)
+++ branches/relax_disp/gui/analyses/elements/model_list.py Mon Sep  9 
19:12:23 2013
@@ -54,9 +54,6 @@
     params = []
     """The list of parameters of each model in string form."""
 
-    size = (500, 300)
-    """The fixed size of the Window."""
-
     warning = None
     """A warning string which if set will present a warning message to the 
user prior to allowing them to modify the list of models."""
 
@@ -91,7 +88,7 @@
                 self.models_stripped.append(model)
 
         # Initialise the model selection window.
-        self.model_win = Model_sel_window(self.models, self.params, 
self.model_desc, size=self.size, border=self.border)
+        self.model_win = Model_sel_window(self.models, self.params, 
self.model_desc, border=self.border)
 
         # Horizontal packing for this element.
         sizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -228,7 +225,7 @@
 class Model_sel_window(wx.Dialog):
     """The model selector window object."""
 
-    def __init__(self, models, params, desc, size=None, border=None):
+    def __init__(self, models, params, desc, border=None):
         """Set up the model selector window.
 
         @param models:      The list of models.
@@ -237,8 +234,6 @@
         @type params:       list of str
         @param desc:        The description for each model.
         @type desc:         list of str
-        @keyword size:      The fixed size of the Window.
-        @type size:         tuple of int
         @keyword border:    The border width, in pixels.
         @type border:       int
         """
@@ -247,13 +242,11 @@
         wx.Dialog.__init__(self, None, id=-1, title="Model list selector")
 
         # Initialise some values
-        width = size[0] - 2*border
         desc_flag = False
         if len(desc):
             desc_flag = True
 
         # Set the frame properties.
-        self.SetSize(size)
         self.Centre()
         self.SetFont(font.normal)
 
@@ -314,6 +307,9 @@
         # Add the table to the sizer.
         sizer.Add(self.grid_sizer, 1, wx.ALL|wx.EXPAND, 0)
 
+        # Auto-size the window.
+        self.SetInitialSize()
+
 
     def get_selection(self):
         """Return the selection as a list of booleans.




Related Messages


Powered by MHonArc, Updated Mon Sep 09 19:20:01 2013