mailr14625 - /1.3/gui/user_functions/base.py


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

Header


Content

Posted by edward on September 13, 2011 - 15:03:
Author: bugman
Date: Tue Sep 13 15:03:01 2011
New Revision: 14625

URL: http://svn.gna.org/viewcvs/relax?rev=14625&view=rev
Log:
Added the return_page arg to create_wizard() so that the user function page 
can be selectively returned.


Modified:
    1.3/gui/user_functions/base.py

Modified: 1.3/gui/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/base.py?rev=14625&r1=14624&r2=14625&view=diff
==============================================================================
--- 1.3/gui/user_functions/base.py (original)
+++ 1.3/gui/user_functions/base.py Tue Sep 13 15:03:01 2011
@@ -54,7 +54,7 @@
         self.parent = parent
 
 
-    def create_wizard(self, size_x=600, size_y=400, name=None, uf_page=None, 
apply_button=True):
+    def create_wizard(self, size_x=600, size_y=400, name=None, uf_page=None, 
apply_button=True, return_page=False):
         """Create and return the wizard window.
 
         @keyword size_x:        The width of the wizard.
@@ -67,8 +67,10 @@
         @type uf_page:          class
         @keyword apply_button:  A flag which if true will show the apply 
button for that page.  This will be passed to the wizard's add_page() method.
         @type apply_button:     bool
-        @return:                The wizard dialog and wizard page.
-        @rtype:                 gui.wizard.Wiz_window instance and wizard 
page instance
+        @keyword return_page:   A flag which if True will cause the user 
function page to be returned.
+        @type return_page:      bool
+        @return:                The wizard dialog (and wizard page if the 
return flag is given).
+        @rtype:                 gui.wizard.Wiz_window instance, wizard page 
instance
         """
 
         # Split the name.
@@ -88,7 +90,10 @@
         wizard.add_page(page, apply_button=apply_button)
 
         # Return the wizard and the page.
-        return wizard, page
+        if return_page:
+            return wizard, page
+        else:
+            return wizard
 
 
     def get_title(self, base=None, fn=None):




Related Messages


Powered by MHonArc, Updated Tue Sep 13 15:20:02 2011