diff --git a/twander.py b/twander.py index f604e60..1871ca6 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.122 2003/03/03 22:49:08 tundra Exp $" +RCSID = "$Id: twander.py,v 3.123 2003/03/03 23:39:34 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -355,7 +355,7 @@ # Highest key index needed by Drive List View -MAXDLVKEY = 5 +MAXDLVKEY = 4 ##### @@ -467,7 +467,7 @@ WIN32GROUP = "win32" + FILEGROUP WIN32OWNER = "win32" + FILEOWNER WIN32FREE = " free" -WIN32TOTAL = " total " +WIN32TOTAL = " total " # Leave trailing space - drive letter follows if WIN32ALL: @@ -498,7 +498,8 @@ SZ_DRIVE_FREE = 13 # The trailing text string has as leading blank for separation SZ_DRIVE_TTL = 13 # The trailing text string has leading and trailing blanks for separation - SZ_DRIVE_TOTAL = SZ_DRIVE_SHARE + SZ_DRIVE_TYPE + SZ_DRIVE_FREE + len(WIN32FREE) + SZ_DRIVE_TTL + len(WIN32TOTAL) + SZ_DRIVE_TOTAL = SZ_DRIVE_SHARE + SZ_DRIVE_TYPE + SZ_DRIVE_FREE + len(WIN32FREE) + \ + SZ_DRIVE_TTL + len(WIN32TOTAL) # Constants used with the more usual Unix-style details # Used both by Unix and Win32 when win32all is not present or disabled. @@ -2034,7 +2035,7 @@ # in Drive List View - these are always mapped to fNAME if Name2Key[SORTBYFIELD.lower()][0] > MAXDLVKEY: - srtfld = fNAME.upper() + srtfld = dlvLETTER.upper() else: srtfld = Name2Key[SORTBYFIELD.lower()][2].upper() @@ -3101,21 +3102,21 @@ # haven't screwed up the widget's current # contents or program state. -# try: - contents = BuildDirList(newdir) -# except: -# # If CurrentDir set, we're still there: error w/ recovery -# if UI.CurrentDir: -# ErrMsg(eDIRRD % newdir) -# return -# -# # If not, we failed on the initial directory: error & abort -# else: -# ErrMsg(eINITDIRBAD % newdir) -# sys.exit(1) -# -# # Push last directory visited onto the visited stack -# + try: + contents = BuildDirList(newdir) + except: + # If CurrentDir set, we're still there: error w/ recovery + if UI.CurrentDir: + ErrMsg(eDIRRD % newdir) + return + + # If not, we failed on the initial directory: error & abort + else: + ErrMsg(eINITDIRBAD % newdir) + sys.exit(1) + + # Push last directory visited onto the visited stack + # We do NOT save this to the stack if: # # 1) We've been told not to. - Passed when we're called (save=FALSE). @@ -3369,7 +3370,7 @@ # If the user has selected one of these, map them to sort # by name in Drive List View. - dlvkey = Name2Key[SORTBYFIELD.lower()][0] + 1 + dlvkey = Name2Key[SORTBYFIELD.lower()][0] if dlvkey > MAXDLVKEY: dlvkey = MAXDLVKEY @@ -3382,7 +3383,7 @@ for drive in drivelist: - fields = [""] + fields = [] # Drive Label - Drive Might Not Be Available try: @@ -3438,8 +3439,8 @@ fields.append(tspace) - # Finally, tack on the drive name with some leading space - entry += " %s" % drive + # Finally, tack on the drive letter + entry += drive fields.append(drive) # If we're not going to sort later, just build the list