Author: bugman
Date: Wed Feb 4 15:49:30 2015
New Revision: 27512
URL: http://svn.gna.org/viewcvs/relax?rev=27512&view=rev
Log:
The maximum number of pages in the GUI wizard is no longer hardcoded.
The max_pages argument has been added to allow this value to be changed.
Modified:
trunk/gui/wizards/wiz_objects.py
Modified: trunk/gui/wizards/wiz_objects.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/wizards/wiz_objects.py?rev=27512&r1=27511&r2=27512&view=diff
==============================================================================
--- trunk/gui/wizards/wiz_objects.py (original)
+++ trunk/gui/wizards/wiz_objects.py Wed Feb 4 15:49:30 2015
@@ -366,9 +366,11 @@
TEXT_SKIP = " Skip"
- def __init__(self, parent=None, size_x=400, size_y=400, title='',
border=10, style=wx.DEFAULT_DIALOG_STYLE):
+ def __init__(self, max_pages=15, parent=None, size_x=400, size_y=400,
title='', border=10, style=wx.DEFAULT_DIALOG_STYLE):
"""Set up the window.
+ @keyword max_pages: The maximum number of pages for the wizard.
+ @type max_pages: int
@keyword parent: The parent window.
@type parent: wx.Window instance
@keyword size_x: The width of the wizard.
@@ -388,6 +390,7 @@
self._size_y = size_y
self._border = border
self.title = title
+ self.max_pages = max_pages
# Execute the base class method.
wx.Dialog.__init__(self, parent, id=-1, title=title, style=style)
@@ -427,8 +430,8 @@
self._seq_prev = []
self._skip_flag = []
- # A max of 15 pages should be enough.
- for i in range(15):
+ # Generate the elements for all pages.
+ for i in range(self.max_pages):
# Append some Nones.
self._pages.append(None)
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits