mailr16200 - in /branches/uf_redesign: graphics/wizards/ prompt/ user_functions/


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

Header


Content

Posted by edward on May 10, 2012 - 18:30:
Author: bugman
Date: Thu May 10 18:30:28 2012
New Revision: 16200

URL: http://svn.gna.org/viewcvs/relax?rev=16200&view=rev
Log:
Converted the reset user function to the auto-generation design.

A fast and dirty wizard graphic was also added for the user function.


Added:
    branches/uf_redesign/graphics/wizards/reset.png   (with props)
    branches/uf_redesign/graphics/wizards/reset.xcf   (with props)
    branches/uf_redesign/user_functions/reset.py
      - copied, changed from r16198, branches/uf_redesign/prompt/reset.py
Removed:
    branches/uf_redesign/prompt/reset.py
Modified:
    branches/uf_redesign/prompt/__init__.py
    branches/uf_redesign/prompt/interpreter.py
    branches/uf_redesign/user_functions/__init__.py

Added: branches/uf_redesign/graphics/wizards/reset.png
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/graphics/wizards/reset.png?rev=16200&view=auto
==============================================================================
Binary file - no diff available.

Propchange: branches/uf_redesign/graphics/wizards/reset.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: branches/uf_redesign/graphics/wizards/reset.xcf
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/graphics/wizards/reset.xcf?rev=16200&view=auto
==============================================================================
Binary file - no diff available.

Propchange: branches/uf_redesign/graphics/wizards/reset.xcf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: branches/uf_redesign/prompt/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/__init__.py?rev=16200&r1=16199&r2=16200&view=diff
==============================================================================
--- branches/uf_redesign/prompt/__init__.py (original)
+++ branches/uf_redesign/prompt/__init__.py Thu May 10 18:30:28 2012
@@ -28,7 +28,6 @@
            'help',
            'interpreter',
            'objects',
-           'reset',
            'results',
            'sequence',
            'spectrum',

Modified: branches/uf_redesign/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/interpreter.py?rev=16200&r1=16199&r2=16200&view=diff
==============================================================================
--- branches/uf_redesign/prompt/interpreter.py (original)
+++ branches/uf_redesign/prompt/interpreter.py Thu May 10 18:30:28 2012
@@ -56,7 +56,6 @@
 
 # User functions.
 from gpl import GPL
-from reset import Reset
 from sys_info import Sys_info
 from temperature import Temp
 
@@ -175,12 +174,10 @@
         objects['gpl'] = objects['GPL'] = GPL()
 
         # Initialise the user functions (those not in user function classes)
-        reset = Reset()
         sys_info = Sys_info()
         temp = Temp()
 
         # Place the user functions in the local namespace.
-        objects['reset'] = reset.reset
         objects['sys_info'] = sys_info.sys_info
         objects['temperature'] = temp.set
 

Removed: branches/uf_redesign/prompt/reset.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/reset.py?rev=16199&view=auto
==============================================================================
--- branches/uf_redesign/prompt/reset.py (original)
+++ branches/uf_redesign/prompt/reset.py (removed)
@@ -1,39 +1,0 @@
-###############################################################################
-#                                                                            
 #
-# Copyright (C) 2003-2012 Edward d'Auvergne                                  
 #
-#                                                                            
 #
-# This file is part of the program relax.                                    
 #
-#                                                                            
 #
-# relax is free software; you can redistribute it and/or modify              
 #
-# it under the terms of the GNU General Public License as published by       
 #
-# the Free Software Foundation; either version 2 of the License, or          
 #
-# (at your option) any later version.                                        
 #
-#                                                                            
 #
-# relax is distributed in the hope that it will be useful,                   
 #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
-# GNU General Public License for more details.                               
 #
-#                                                                            
 #
-# You should have received a copy of the GNU General Public License          
 #
-# along with relax; if not, write to the Free Software                       
 #
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
-#                                                                            
 #
-###############################################################################
-
-# relax module imports.
-import generic_fns.reset
-from status import Status; status = Status()
-
-
-class Reset:
-    """Class containing the function for reinitialising the relax data 
storage object."""
-
-    def reset(self):
-        """Reset relax.
-
-        All of the data of the relax data storage object will be erased and 
hence relax will return
-        to its initial state.
-        """
-
-        # Execute the functional code.
-        generic_fns.reset.reset()

Modified: branches/uf_redesign/user_functions/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/__init__.py?rev=16200&r1=16199&r2=16200&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/__init__.py (original)
+++ branches/uf_redesign/user_functions/__init__.py Thu May 10 18:30:28 2012
@@ -66,6 +66,7 @@
     'relax_data',
     'relax_fit',
     'residue',
+    'reset',
     'select',
     'state'
 ]
@@ -103,6 +104,7 @@
 import user_functions.relax_data
 import user_functions.relax_fit
 import user_functions.residue
+import user_functions.reset
 import user_functions.select
 import user_functions.state
 

Copied: branches/uf_redesign/user_functions/reset.py (from r16198, 
branches/uf_redesign/prompt/reset.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/reset.py?p2=branches/uf_redesign/user_functions/reset.py&p1=branches/uf_redesign/prompt/reset.py&r1=16198&r2=16200&rev=16200&view=diff
==============================================================================
--- branches/uf_redesign/prompt/reset.py (original)
+++ branches/uf_redesign/user_functions/reset.py Thu May 10 18:30:28 2012
@@ -22,18 +22,20 @@
 
 # relax module imports.
 import generic_fns.reset
-from status import Status; status = Status()
+from graphics import WIZARD_IMAGE_PATH
+from user_functions.data import Uf_info; uf_info = Uf_info()
 
 
-class Reset:
-    """Class containing the function for reinitialising the relax data 
storage object."""
-
-    def reset(self):
-        """Reset relax.
-
-        All of the data of the relax data storage object will be erased and 
hence relax will return
-        to its initial state.
-        """
-
-        # Execute the functional code.
-        generic_fns.reset.reset()
+# The reset user function.
+uf = uf_info.add_uf('reset')
+uf.title = "Reinitialise the relax data storage object."
+uf.title_short = "Reset relax."
+uf.desc = """
+All of the data of the relax data storage object will be erased and hence 
relax will return to its initial state.
+"""
+uf.backend = generic_fns.reset.reset
+uf.menu_text = "&reset"
+uf.gui_icon = "oxygen.actions.dialog-close"
+uf.wizard_size = (600, 300)
+uf.wizard_apply_button = False
+uf.wizard_image = WIZARD_IMAGE_PATH + 'reset.png'




Related Messages


Powered by MHonArc, Updated Thu May 10 20:00:02 2012