mailRe: r28191 - /trunk/lib/system.py


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

Header


Content

Posted by Edward d'Auvergne on April 20, 2016 - 10:24:
Hi Troels,

This is an interesting concept, having an observer object set up to
monitor the current directory change!  Note that in almost all of the
auto-analyses in the GUI, that the results directory "Change" button
has a similar effect.  However this is not seen by the observer, so
the status bar is not updated.  Just play with the relaxation
dispersion in the GUI to see to problem.  Also, maybe you'd like to
synchronise the icons used for all the directory changes?  You could
even change the button action to call the system.cd user function, if
you feel really adventurous ;)

Regards,

Edward


On 2 April 2016 at 17:42,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Sat Apr  2 17:42:55 2016
New Revision: 28191

URL: http://svn.gna.org/viewcvs/relax?rev=28191&view=rev
Log:
Letting the lib.system.cd function notify the observer, when chanding 
directory.


Modified:
    trunk/lib/system.py

Modified: trunk/lib/system.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/system.py?rev=28191&r1=28190&r2=28191&view=diff
==============================================================================
--- trunk/lib/system.py (original)
+++ trunk/lib/system.py Sat Apr  2 17:42:55 2016
@@ -27,6 +27,7 @@

 # relax module imports.
 import lib.arg_check
+from status import Status; status = Status()


 def cd(path, verbose=False):
@@ -54,6 +55,9 @@
     # Print current working directory.
     print("The current working directory is now changed to: %s"%getcwd())

+    # Notify observers that the current working directory has changed.
+    status.observers.system_cwd_path.notify()
+

 def pwd(verbose=True):
     """Print and return string of the current working directory.  
Equivalent of python module os.getcwd().


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

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



Related Messages


Powered by MHonArc, Updated Wed Apr 20 10:40:05 2016