diff --git a/twander.py b/twander.py index 8f87134..c9eb18b 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.83 2002/11/26 18:58:30 tundra Exp $" +RCSID = "$Id: twander.py,v 1.84 2002/11/26 19:28:15 tundra Exp $" VERSION = RCSID.split()[2] @@ -132,7 +132,7 @@ WARN = TRUE # Warnings on - +AUTOREFRESH = TRUE # Automatically refresh the directory display ##### # Constants @@ -145,7 +145,7 @@ GB = MB * KB # 1 GB constant HOSTNAME = getfqdn() # Full name of this host POLLINT = 20 # Interval (ms) the poll routine should run -REFRESHINT = 2000 # Interval (ms) for automatic refresh +REFRESHINT = 3000 # Interval (ms) for automatic refresh # Stat-related @@ -250,6 +250,7 @@ " -h print this help information", " -n name name of font to use (default: courier)", " -q quiet mode - no warnings (default: warnings on)", + " -r turn off automatic refreshing of the directory display (default: on)", " -s size size of font to use (default: 12)", " -v print detailed version information", " -w wght weight/style of font to use (default: bold)", @@ -554,10 +555,11 @@ # See if its time to do a refresh - self.ElapsedTime += POLLINT - if self.ElapsedTime >= REFRESHINT: - RefreshDirList() - self.ElapsedTime = 0 + if AUTOREFRESH: + self.ElapsedTime += POLLINT + if self.ElapsedTime >= REFRESHINT: + RefreshDirList() + self.ElapsedTime = 0 # Setup next polling event self.DirList.after(POLLINT, self.poll) @@ -1188,7 +1190,7 @@ # Command line processing try: - opts, args = getopt.getopt(sys.argv[1:], '-b:c:f:hn:qs:vw:x:y:') + opts, args = getopt.getopt(sys.argv[1:], '-b:c:f:hn:qrs:vw:x:y:') except getopt.GetoptError: Usage() sys.exit(1) @@ -1209,6 +1211,8 @@ FNAME = val if opt == "-q": WARN = FALSE + if opt == "-r": + AUTOREFRESH = FALSE if opt == "-s": FSZ = val if opt == "-v":