diff --git a/twander.py b/twander.py index 5390c4f..98fc8db 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.140 2004/03/11 03:31:33 tundra Exp $" +RCSID = "$Id: twander.py,v 3.141 2004/03/11 06:51:58 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -303,6 +303,7 @@ NUMPROGMEM = 12 # Number of program memories POLLINT = 20 # Interval (ms) the poll routine should run PSEP = os.sep # Character separating path components +REFRESHINDI = "*" # Titlebar character used to indicate refresh underway REFRESHAFTER = '+' # Indicate we want a refresh after a command runs SHOWDRIVES = '\\\\' # Logical directory name for Win32 Drive Lists STRICTMATCH = CMDESCAPE # Tells wildcard system to enforce strict matching @@ -2083,7 +2084,7 @@ # Update title bar with most current information ##### - def UpdateTitle(self, mainwin): + def UpdateTitle(self, mainwin, refreshing=""): if UI.CurrentDir == SHOWDRIVES: @@ -2110,12 +2111,15 @@ sortedby = "%s %s " % (TTLSORTFLD, srtfld) - autostate = YesOrNo[AUTOREFRESH] + autostate = YesOrNo[AUTOREFRESH] + refreshing mainwin.title("%s %s %s: %s %s %s %s %s %s%s %s %s" % (PROGNAME, VERSION, FULLNAME, UI.CurrentDir, TTLFILES, str(self.DirList.size()), TTLSIZE, FileLength(self.TotalSize), sortedby, sepsort, TTLAUTO, autostate)) + # Make sure the title bar gets updated + mainwin.update_idletasks() + # End of method 'twanderUI.UpdateTitle()' # End of class definition, 'twanderUI' @@ -3184,7 +3188,7 @@ # Load UI With Selected Directory ##### -def LoadDirList(newdir, save=TRUE): +def LoadDirList(newdir, save=TRUE, updtitle=True): # Make sure we're permitted to navigate - we have to allow initial entry into STARTDIR if NONAVIGATE and (newdir != STARTDIR): @@ -3218,6 +3222,13 @@ elif OSNAME != 'nt' or not GetWin32Drives(): return + # Indicate we are doing a refresh. + # This defaults to always being done. + # Exception is first call to this routine from setup logic. + + if updtitle: + UI.UpdateTitle(UIroot, refreshing=REFRESHINDI) + # Check right now to see if we can read # the directory. If not, at least we # haven't screwed up the widget's current @@ -4015,6 +4026,9 @@ def RefreshDirList(*args): + # Indicate that we are doing an refresh + UI.UpdateTitle(UIroot, refreshing=REFRESHINDI) + # Wait until we have exclusive access to the widget while not UI.DirListMutex.testandset(): @@ -4555,7 +4569,7 @@ STARTDIR = os.path.abspath(STARTDIR) # Initialize the UI directory listing -LoadDirList(STARTDIR) +LoadDirList(STARTDIR, updtitle = False) # Process options to catch any changes detected in # environment variable or command line