mailr19706 - in /trunk: gui/uf_objects.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 23, 2013 - 18:42:
Author: bugman
Date: Thu May 23 18:42:41 2013
New Revision: 19706

URL: http://svn.gna.org/viewcvs/relax?rev=19706&view=rev
Log:
The preview button in the file selection elements of the user function 
windows can now be disabled.

This is via the new wiz_filesel_preview argument being set to False.


Modified:
    trunk/gui/uf_objects.py
    trunk/user_functions/objects.py

Modified: trunk/gui/uf_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/uf_objects.py?rev=19706&r1=19705&r2=19706&view=diff
==============================================================================
--- trunk/gui/uf_objects.py (original)
+++ trunk/gui/uf_objects.py Thu May 23 18:42:41 2013
@@ -525,7 +525,7 @@
 
             # Special arg type:  file selection dialog.
             if arg['arg_type'] == 'file sel':
-                self.uf_args[arg['name']] = Selector_file(name=arg['name'], 
parent=self, default=arg['default'], sizer=sizer, desc=desc, 
wildcard=arg['wiz_filesel_wildcard'], style=arg['wiz_filesel_style'], 
tooltip=arg['desc'], divider=self._div_left, 
height_element=self.height_element, read_only=arg['wiz_read_only'])
+                self.uf_args[arg['name']] = Selector_file(name=arg['name'], 
parent=self, default=arg['default'], sizer=sizer, desc=desc, 
wildcard=arg['wiz_filesel_wildcard'], style=arg['wiz_filesel_style'], 
tooltip=arg['desc'], divider=self._div_left, 
height_element=self.height_element, preview=arg['wiz_filesel_preview'], 
read_only=arg['wiz_read_only'])
 
             # Special arg type:  dir arg.
             elif arg['arg_type'] == 'dir':

Modified: trunk/user_functions/objects.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/objects.py?rev=19706&r1=19705&r2=19706&view=diff
==============================================================================
--- trunk/user_functions/objects.py (original)
+++ trunk/user_functions/objects.py Thu May 23 18:42:41 2013
@@ -391,7 +391,7 @@
         self.__dict__[name] = value
 
 
-    def add_keyarg(self, name=None, default=None, py_type=None, 
arg_type=None, dim=None, min=0, max=1000, desc_short=None, desc=None, 
list_titles=None, wiz_element_type='default', wiz_combo_choices=None, 
wiz_combo_data=None, wiz_combo_iter=None, wiz_combo_list_min=None, 
wiz_filesel_wildcard=FileSelectorDefaultWildcardStr, wiz_filesel_style=None, 
wiz_dirsel_style=DD_DEFAULT_STYLE, wiz_read_only=None, can_be_none=False, 
can_be_empty=False, none_elements=False):
+    def add_keyarg(self, name=None, default=None, py_type=None, 
arg_type=None, dim=None, min=0, max=1000, desc_short=None, desc=None, 
list_titles=None, wiz_element_type='default', wiz_combo_choices=None, 
wiz_combo_data=None, wiz_combo_iter=None, wiz_combo_list_min=None, 
wiz_filesel_wildcard=FileSelectorDefaultWildcardStr, wiz_filesel_style=None, 
wiz_dirsel_style=DD_DEFAULT_STYLE, wiz_read_only=None, 
wiz_filesel_preview=True, can_be_none=False, can_be_empty=False, 
none_elements=False):
         """Wrapper method for adding keyword argument information to the 
container.
 
         @keyword name:                  The name of the argument.
@@ -435,6 +435,8 @@
         @type wiz_dirsel_style:         int
         @keyword wiz_read_only:         A flag which if True means that the 
text of the GUI wizard page element cannot be edited.  If the default of None 
is given, then each UI element will decide for itself what to do.
         @type wiz_read_only:            bool or None
+        @keyword wiz_filesel_preview:   A flag which if True will enable the 
preview button in the file selection GUI wizard page element.
+        @type wiz_filesel_preview:      bool
         @keyword can_be_none:           A flag which specifies if the 
argument is allowed to have the None value.
         @type can_be_none:              bool
         @keyword can_be_empty:          A flag which if True allows the 
sequence type object to be empty.
@@ -484,6 +486,7 @@
         arg['wiz_filesel_style'] = wiz_filesel_style
         arg['wiz_dirsel_style'] = wiz_dirsel_style
         arg['wiz_read_only'] = wiz_read_only
+        arg['wiz_filesel_preview'] = wiz_filesel_preview
         arg['can_be_none'] = can_be_none
         arg['can_be_empty'] = can_be_empty
         arg['none_elements'] = none_elements




Related Messages


Powered by MHonArc, Updated Thu May 23 19:00:02 2013