mailr16033 - in /branches/uf_redesign: gui/relax_gui.py gui/uf_objects.py gui/wizard.py user_functions/objects.py


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

Header


Content

Posted by edward on May 07, 2012 - 11:21:
Author: bugman
Date: Mon May  7 11:21:23 2012
New Revision: 16033

URL: http://svn.gna.org/viewcvs/relax?rev=16033&view=rev
Log:
The wizard height_desc variable can now be set in the auto-generated user 
functions.

This is via the wizard_height_desc variable.


Modified:
    branches/uf_redesign/gui/relax_gui.py
    branches/uf_redesign/gui/uf_objects.py
    branches/uf_redesign/gui/wizard.py
    branches/uf_redesign/user_functions/objects.py

Modified: branches/uf_redesign/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/relax_gui.py?rev=16033&r1=16032&r2=16033&view=diff
==============================================================================
--- branches/uf_redesign/gui/relax_gui.py (original)
+++ branches/uf_redesign/gui/relax_gui.py Mon May  7 11:21:23 2012
@@ -284,7 +284,7 @@
         # Generate the user functions.
         for name, data in uf_info.uf_loop():
             # Generate a new container.
-            obj = Uf_object(name, self, title=data.title, 
size=data.wizard_size, apply_button=data.wizard_apply_button)
+            obj = Uf_object(name, self, title=data.title, 
size=data.wizard_size, height_desc=data.wizard_height_desc, 
apply_button=data.wizard_apply_button)
 
             # Store it.
             store[name] = obj

Modified: branches/uf_redesign/gui/uf_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16033&r1=16032&r2=16033&view=diff
==============================================================================
--- branches/uf_redesign/gui/uf_objects.py (original)
+++ branches/uf_redesign/gui/uf_objects.py Mon May  7 11:21:23 2012
@@ -55,7 +55,7 @@
         wizard = Wiz_window(parent=self._parent, size_x=self._size[0], 
size_y=self._size[1], title=self._title)
 
         # Create the page.
-        page = Uf_page(self._name, parent=wizard)
+        page = Uf_page(self._name, parent=wizard, 
height_desc=self._height_desc)
 
         # Add the page to the wizard.
         wizard.add_page(page, apply_button=self._apply_button)
@@ -64,7 +64,7 @@
         wizard.run()
 
 
-    def __init__(self, name, parent, title=None, size=None, 
apply_button=True):
+    def __init__(self, name, parent, title=None, size=None, 
height_desc=None, apply_button=True):
         """Set up the object.
 
         @param name:            The name of the user function.
@@ -75,6 +75,8 @@
         @type title:            str
         @keyword size:          The window size.
         @type size:             tuple of int
+        @keyword height_desc:   The height in pixels of the description part 
of the wizard.
+        @type height_desc:      int or None
         @keyword apply_button:  A flag specifying if the apply button should 
be shown or not.  This defaults to True.
         @type apply_button:     bool
         """
@@ -84,6 +86,7 @@
         self._parent = parent
         self._title = title
         self._size = size
+        self._height_desc = height_desc
         self._apply_button = apply_button
 
 

Modified: branches/uf_redesign/gui/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard.py?rev=16033&r1=16032&r2=16033&view=diff
==============================================================================
--- branches/uf_redesign/gui/wizard.py (original)
+++ branches/uf_redesign/gui/wizard.py Mon May  7 11:21:23 2012
@@ -71,7 +71,6 @@
     # Some class variables.
     art_spacing = 20
     divider = None
-    height_desc = 220
     height_element = 27
     image_path = paths.IMAGE_PATH + "relax.gif"
     main_text = ''
@@ -80,15 +79,18 @@
     size_square_button = (33, 33)
     title = ''
 
-    def __init__(self, parent):
+    def __init__(self, parent, height_desc=220):
         """Set up the window.
 
-        @param parent:  The parent GUI element.
-        @type parent:   wx.object instance
+        @param parent:          The parent GUI element.
+        @type parent:           wx.object instance
+        @keyword height_desc:   The height in pixels of the description part 
of the wizard.
+        @type height_desc:      int or None
         """
 
         # Store the args.
         self.parent = parent
+        self.height_desc = height_desc
 
         # Execute the base class method.
         wx.Panel.__init__(self, parent, id=-1)

Modified: branches/uf_redesign/user_functions/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/objects.py?rev=16033&r1=16032&r2=16033&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/objects.py (original)
+++ branches/uf_redesign/user_functions/objects.py Mon May  7 11:21:23 2012
@@ -105,6 +105,8 @@
     @type wizard_size:          tuple of int or None
     @ivar wizard_image:         The 200 pixel wide image to use for the user 
function wizard.  This should be the path to the bitmap image.  This defaults 
to the relax Ulysses butterfly image.
     @type wizard_image:         str
+    @ivar wizard_height_desc:   The height in pixels of the description part 
of the wizard.
+    @type wizard_height_desc:   int
     @ivar wizard_apply_button:  A flag specifying if the apply button should 
be shown or not.  This defaults to True.
     @type wizard_apply_button:  bool
     """
@@ -123,6 +125,7 @@
             'gui_icon',
             'wizard_size',
             'wizard_image',
+            'wizard_height_desc',
             'wizard_apply_button'
     ]
 
@@ -143,6 +146,7 @@
         self.gui_icon = None
         self.wizard_size = (600, 400)
         self.wizard_image = IMAGE_PATH + "relax.gif"
+        self.wizard_height_desc = 220
         self.wizard_apply_button = True
 
 




Related Messages


Powered by MHonArc, Updated Mon May 07 11:40:01 2012