
RCS file: RCS/twander.py,v
Working file: twander.py
head: 3.231
branch:
locks: strict
	tundra: 3.231
access list:
symbolic names:
keyword substitution: kv
total revisions: 295;	selected revisions: 295
description:
Part Of The 'twander' Project
----------------------------
revision 3.231	locked by: tundra;
date: 2009/07/01 07:29:20;  author: tundra;  state: Exp;  lines: +13 -4
Fixed problem with relative symlink references pointing to directories
not being properly sorted if directories and files were being
separated (SYMDIR = True).
----------------------------
revision 3.230
date: 2009/07/01 00:44:39;  author: tundra;  state: Exp;  lines: +43 -9
Modified RefreshDirList() to keep track of the selections and the
active marker *by name* rather than by position.  This ensures correct
reselection after the contents of a directory have changed.
----------------------------
revision 3.229
date: 2009/06/29 21:41:23;  author: tundra;  state: Exp;  lines: +35 -17
Added ASSOCNOCASE symbol ("/") to force case-insensitive associations and exclusions.
----------------------------
revision 3.228
date: 2009/06/28 07:21:32;  author: tundra;  state: Exp;  lines: +15 -24
Removed column width options from last version. Updated copyright notice.
----------------------------
revision 3.227
date: 2009/06/28 07:13:58;  author: tundra;  state: Exp;  lines: +24 -15
Added ability for user to adjust column widths by making the
ST_SZUNAME, ST_SZGNAME, ST_SZLEN, variable user options.  Cleaned up
related column logic and added boundary checking to PadString() to
indicate when impossible padding is being requested.
----------------------------
revision 3.226
date: 2009/06/28 05:35:56;  author: tundra;  state: Exp;  lines: +11 -4
Added variable precision capability to the length scaling algorithm
and the associated SCALPRECISION (Default: 1) variable.
----------------------------
revision 3.225
date: 2009/06/27 22:17:56;  author: tundra;  state: Exp;  lines: +9 -14
Changed size scaling algorithm to display one digit of precision for files greater than 999 bytes.
----------------------------
revision 3.224
date: 2007/01/11 07:08:31;  author: tundra;  state: Exp;  lines: +10 -8
Minor corrections to title bar logic for ~/ substitution.
----------------------------
revision 3.223
date: 2007/01/11 06:43:10;  author: tundra;  state: Exp;  lines: +22 -3
Modified display of directory on title bar to use ~ as a shortcut for home directories to save space.
----------------------------
revision 3.222
date: 2007/01/11 00:15:18;  author: tundra;  state: Exp;  lines: +10 -8
KeyToggle() now calls LoadHelpMenu() so update options values are reflected in Help.
Went back to displaying all of SYMDIR, SYMEXPAND, and SYMRESOLV status in title bar.
----------------------------
revision 3.221
date: 2007/01/10 23:07:42;  author: tundra;  state: Exp;  lines: +14 -4
Changed title bar symlink status display to show either Expanded or Resolved, but not both.
Changed SYMRESOLV toggle logic to force target display if its state is changed.
----------------------------
revision 3.220
date: 2007/01/10 10:05:41;  author: tundra;  state: Exp;  lines: +4 -4
Remapped SYMDIR, SYMEXPAND, & SYMRESOLV to Control-~, Control-!, and Control-@ respectively.
----------------------------
revision 3.219
date: 2007/01/10 09:34:11;  author: tundra;  state: Exp;  lines: +2 -2
Minor change to iNOSTAT prompt to avoid conflict with the SYMPTR string that triggers symbolic link options logic.
----------------------------
revision 3.218
date: 2007/01/10 09:16:31;  author: tundra;  state: Exp;  lines: +60 -19
Added key binding to toggle SYMDIR, TOGSYMDIR (default: Control-5).
NOTE: Control-5 seems to be trapped by the system and not recognized.  To be fixed later.
Added titlebar status display for symlink options.
Corrected problem: When SYMEXPAND=False and symlink->dir it did not end with a path separator.
BUGFIX: When SYMDIR=False, symlinks->dir did not end in a path separator.
BUGFIX: When HIDEDOT=True, symlinks beginning with '.' were not being hidden.
----------------------------
revision 3.217
date: 2007/01/09 23:27:51;  author: tundra;  state: Exp;  lines: +49 -55
Renamed EXPANDSYMLINKS, RESOLVSYMLINKS to SYMEXPAND, SYMRESOLV.
Added associated toggling key bindings TOGSYMEXPAND (default:Control-7) and TOGSYMRESOLV (default: Control-6).
Created generic option toggling function, KeyToggle(), for the new symbolic link toggles.
Changed TOGLENGTH and TOGHIDEDOT to use the new KeyToggle() function as well.
----------------------------
revision 3.216
date: 2007/01/08 20:40:11;  author: tundra;  state: Exp;  lines: +13 -1
Added EXPANDSYMLINKS option (default: True) that can be used to inhibit the display of a symlink target.
----------------------------
revision 3.215
date: 2007/01/08 18:04:33;  author: tundra;  state: Exp;  lines: +41 -32
Added RESOLVSYMLINKS program option (default: False).
----------------------------
revision 3.214
date: 2007/01/08 17:36:14;  author: tundra;  state: Exp;  lines: +7 -9
Changed symbolic link handling to read the link as defined instead of resolving the true path.
----------------------------
revision 3.213
date: 2007/01/08 07:39:04;  author: tundra;  state: Exp;  lines: +2 -2
Changed code to permit Directory Shortcuts to reference user-defined variables.
----------------------------
revision 3.212
date: 2007/01/02 20:07:03;  author: tundra;  state: Exp;  lines: +3 -3
Updated copyright date.
----------------------------
revision 3.211
date: 2007/01/02 19:53:29;  author: tundra;  state: Exp;  lines: +30 -5
Implemented ISODATE option to display time/date in ISO 8601 format.
----------------------------
revision 3.210
date: 2006/12/19 09:12:05;  author: tundra;  state: Exp;  lines: +21 -8
Implemented glob style wildcarding for associations.
Changed the exclude association character from "-" to "!".
Fixed bug that showed up when you tried to remove an association that did not exist.
Added code to properly handle a blank RHS for an exclusion entry - it now resets the list to empty
instead of deleting it.
----------------------------
revision 3.209
date: 2006/12/19 00:13:16;  author: tundra;  state: Exp;  lines: +20 -2
Implemented association removal with blank RHS of an association statement.
----------------------------
revision 3.208
date: 2006/12/18 23:50:43;  author: tundra;  state: Exp;  lines: +3 -3
Removed debugging statement left in the association exclusion processing logic during last file edit.
Added logic to prevent duplicate entries in association exclusion list.
----------------------------
revision 3.207
date: 2006/12/18 23:27:51;  author: tundra;  state: Exp;  lines: +32 -18
Implemented association exclusion feature.
----------------------------
revision 3.206
date: 2006/12/18 22:02:25;  author: tundra;  state: Exp;  lines: +29 -14
Added logic to throw an error if user attempts to run a non-executable that has no association.
----------------------------
revision 3.205
date: 2006/12/18 17:35:09;  author: tundra;  state: Exp;  lines: +3 -2
Made association matching case-insensitive on Windows.
----------------------------
revision 3.204
date: 2006/12/15 23:10:22;  author: tundra;  state: Exp;  lines: +20 -53
Reimplemented Directory Shortcut override as an interactive dialog instead of explicit keys for each shortcut.
Further shortened titlebar prompt strings.
----------------------------
revision 3.203
date: 2006/12/15 08:11:24;  author: tundra;  state: Exp;  lines: +3 -3
Changed MOUSEC assignment to Alt-Control-ButtonRelease-1.
----------------------------
revision 3.202
date: 2006/12/15 04:24:02;  author: tundra;  state: Exp;  lines: +9 -8
Cleaned up associations and program execution for Win32.
----------------------------
revision 3.201
date: 2006/12/14 23:05:15;  author: tundra;  state: Exp;  lines: +10 -6
Modified association logic so that a full path is only computed for executables.i.e., For those cases where there is no association and the file is executable.
----------------------------
revision 3.200
date: 2006/12/14 22:48:05;  author: tundra;  state: Exp;  lines: +7 -2
Added logic to inhibit default associations on executable files.
----------------------------
revision 3.199
date: 2006/12/14 19:10:57;  author: tundra;  state: Exp;  lines: +79 -17
Implemented associations.
----------------------------
revision 3.198
date: 2006/12/14 07:23:06;  author: tundra;  state: Exp;  lines: +8 -1
Added CMDMENUSORT option to allow user to enable sorting of the command menu.
----------------------------
revision 3.197
date: 2006/12/14 06:26:01;  author: tundra;  state: Exp;  lines: +68 -2
Added keyboard bindings and logic to support assignment of current directory to any of the directory shortcut keys.
----------------------------
revision 3.196
date: 2006/12/11 09:21:19;  author: tundra;  state: Exp;  lines: +72 -59
Changed title bar boolean state display to just Y/N instead of Yes/No to save space.
Created general purpose multi-column formatting routine.
Changed options and key bindings help screens to be multicolumn.
Removed shortcut key display from help menus - redundant with main menu bar.
----------------------------
revision 3.195
date: 2005/02/14 09:49:44;  author: tundra;  state: Exp;  lines: +7 -4
Fixed bug that counted the ".." file in the total on the title bar.
----------------------------
revision 3.194
date: 2005/02/11 00:45:54;  author: tundra;  state: Exp;  lines: +42 -10
Implemented 'dotfile' hiding logic.
Added TOHIDEDOT key binding (Control-9).
Added DOTFILE (".") option.
Added HIDEDOTFILES (False) option.
----------------------------
revision 3.193
date: 2005/02/03 11:24:55;  author: tundra;  state: Exp;  lines: +13 -13
Reorganized menu order so they grouped together more sensibly.
----------------------------
revision 3.192
date: 2005/02/02 10:12:43;  author: tundra;  state: Exp;  lines: +14 -9
Changed KeyFiltWild() to KeyFilterWild().
Implemented WILDFILTER= and WILDSELECT= to replace WILDCARD= in configuration files.
----------------------------
revision 3.191
date: 2005/02/02 09:39:08;  author: tundra;  state: Exp;  lines: +9 -9
Changed MOUSEFILTER to MOUSEWILDFILTER
Confirmed that MOUSESEL changed to MOUSEWILDSEL.
----------------------------
revision 3.190
date: 2005/02/02 09:13:09;  author: tundra;  state: Exp;  lines: +168 -80
Split old wildcard menu into separate Filter and Select menus.
Debug option 0x100 now dumps both Filter and Select wildcard lists.
----------------------------
revision 3.189
date: 2005/02/01 23:09:01;  author: tundra;  state: Exp;  lines: +16 -12
Corrected wildcard logic so that escaped filter/selection ignore WILDNOCASE.
----------------------------
revision 3.188
date: 2005/02/01 22:36:33;  author: tundra;  state: Exp;  lines: +15 -6
Added MOUSEFILTER key binding.
----------------------------
revision 3.187
date: 2005/02/01 22:11:09;  author: tundra;  state: Exp;  lines: +13 -2
Added wildcard filtering to Win32 Drive List View.
----------------------------
revision 3.186
date: 2005/01/29 04:54:06;  author: tundra;  state: Exp;  lines: +19 -8
Made wildcard-based selection also honor the WILDNOCASE option setting.
----------------------------
revision 3.185
date: 2005/01/29 04:31:54;  author: tundra;  state: Exp;  lines: +56 -29
Implemented default case-insensitive wildcard filtering for Win32 and case-sensitive for everything else.
Option WILDCASE sets this feature.
Changed all references to OSNAME looking for 'nt' to OSPLATFORM looking for 'win32'.
----------------------------
revision 3.184
date: 2005/01/29 00:37:38;  author: tundra;  state: Exp;  lines: +83 -21
Factored wildcard filtering match code into a separate function, FilterWildcardMatch().
Implemented ability to invert currently active filtering wildcard.
Key: TOGFILT (Control-minus), Option: INVERTFILTER (Default: False)
----------------------------
revision 3.183
date: 2005/01/28 23:18:35;  author: tundra;  state: Exp;  lines: +20 -13
Cleaned up formatting and max lengths of file/drive size fields throughout.
Max max length and trailing padding for this symbolic (MAX_SZ_CHARS and SZ_TRAILING_SPACE) for ease of future maintenance.
----------------------------
revision 3.182
date: 2005/01/28 22:26:21;  author: tundra;  state: Exp;  lines: +55 -13
Actual file lengths are now returned with commas every 3 digits.
File lengths are now displayed right-aligned in the detail view.
----------------------------
revision 3.181
date: 2005/01/28 11:09:27;  author: tundra;  state: Exp;  lines: +29 -5
Implemented ability to toggle actual and normalized file length display.
Added ACTUALLENGTH option, TOGLENGTH key binding (Control-0), and KeyToggleLength().
----------------------------
revision 3.180
date: 2005/01/28 10:19:42;  author: tundra;  state: Exp;  lines: +43 -37
Corrected TotalSize to work when wildcard active.
Implemented TotalSize for Drive List View.
Added factoring for > GB sized files in FileLength().
----------------------------
revision 3.179
date: 2005/01/27 11:15:01;  author: tundra;  state: Exp;  lines: +10 -4
Created distinct entry dialogs for selection and filtering wildcards.
----------------------------
revision 3.178
date: 2005/01/27 11:06:26;  author: tundra;  state: Exp;  lines: +12 -12
Added wildcard filtration status to titlebar.
----------------------------
revision 3.177
date: 2005/01/27 10:53:44;  author: tundra;  state: Exp;  lines: +47 -27
Provided complete support for selection and filtering wildcards via a common routine.
Filtering wildcard now also reset by the REFRESH (Control-l) command.
----------------------------
revision 3.176
date: 2005/01/27 10:21:39;  author: tundra;  state: Exp;  lines: +43 -15
Implemented rudiments of filtering displayed items based on wildcard.
----------------------------
revision 3.175
date: 2005/01/25 22:28:49;  author: tundra;  state: Exp;  lines: +2 -2
Set default for QUOTECHAR to None if -t startup option selected.
----------------------------
revision 3.174
date: 2005/01/25 20:36:33;  author: tundra;  state: Exp;  lines: +6 -6
Minor cosmetic cleanups leftover from changing TRUE/FALSE to True/False in last revision.
----------------------------
revision 3.173
date: 2005/01/25 20:16:03;  author: tundra;  state: Exp;  lines: +90 -90
Minor corrections/edits.
Changed all references of TRUE/FALSE to True/False.
----------------------------
revision 3.172
date: 2005/01/25 20:01:32;  author: tundra;  state: Exp;  lines: +73 -76
Changed delimiters for PROMPT and YESNO from [] to {} to facilitate embedding variable references within them.
Restructured the code so that variable dereferencing does not take place until command executes.
----------------------------
revision 3.171
date: 2005/01/25 08:08:24;  author: tundra;  state: Exp;  lines: +12 -24
Restructured the YESNO/PROMPT string preservation logic so it works correctly in all cases.
----------------------------
revision 3.170
date: 2005/01/25 07:22:18;  author: tundra;  state: Exp;  lines: +14 -11
Restructured prompt default handling to gracefully  handle case when there is no default.
----------------------------
revision 3.169
date: 2005/01/25 03:37:22;  author: tundra;  state: Exp;  lines: +7 -6
Fixed problem with circular .include suppression logic interfering with a configuration reload.
----------------------------
revision 3.168
date: 2005/01/25 00:57:17;  author: tundra;  state: Exp;  lines: +25 -7
Added logic to suppress circular includes.
----------------------------
revision 3.167
date: 2005/01/24 23:53:24;  author: tundra;  state: Exp;  lines: +34 -6
Implemented GetStatusOutput() so that Execution Variables work portably across Unix and Win32.
----------------------------
revision 3.166
date: 2005/01/24 20:33:19;  author: tundra;  state: Exp;  lines: +41 -1
Addeded support for Execution Variables.
----------------------------
revision 3.165
date: 2005/01/24 11:55:28;  author: tundra;  state: Exp;  lines: +10 -4
Added code to catch nested variable references within PROMPT and YESNO builtin definitions.
----------------------------
revision 3.164
date: 2005/01/24 11:00:19;  author: tundra;  state: Exp;  lines: +8 -1
Accomodated default handler for situations where command begins with REFRESHAFTER.
----------------------------
revision 3.163
date: 2005/01/24 10:43:31;  author: tundra;  state: Exp;  lines: +61 -7
Added code to preserve content of PROMPT and YESNO builtins so user-formatting is maintained.
----------------------------
revision 3.162
date: 2005/01/23 11:26:04;  author: tundra;  state: Exp;  lines: +113 -88
Added default support for the PROMPT and YESNO macro language features.
Added the DEFAULTSEP option to support defaults.
----------------------------
revision 3.161
date: 2005/01/21 21:04:42;  author: tundra;  state: Exp;  lines: +2 -3
Changed AFTERWAIT behavior so that it only clears current selections
but no longer moves cursor to top of screen.
----------------------------
revision 3.160
date: 2005/01/12 08:20:05;  author: tundra;  state: Exp;  lines: +19 -10
Added ability to popup the sorting menu.
----------------------------
revision 3.159
date: 2005/01/09 01:28:03;  author: tundra;  state: Exp;  lines: +45 -16
Implemented adaptive refresh intervals and the ADAPTREFRESH option.
----------------------------
revision 3.158
date: 2005/01/08 19:48:45;  author: tundra;  state: Exp;  lines: +8 -1
Minor cleanup of Refresh recovery logic when going back to the starting directory.
----------------------------
revision 3.157
date: 2005/01/08 08:36:12;  author: tundra;  state: Exp;  lines: +17 -7
Added logic to handle removed media during a refresh cycle.
----------------------------
revision 3.156
date: 2005/01/08 07:53:35;  author: tundra;  state: Exp;  lines: +2 -2
Minor change to end a refresh after command execution so that nothing
is selected and the cursor is placed under the first item in the list.
----------------------------
revision 3.155
date: 2005/01/08 07:13:42;  author: tundra;  state: Exp;  lines: +8 -2
Added logic to reset all selections to first item only after a command
that requested Refresh after execution.
Added AFTERCLEAR option to toggle this behavior.
----------------------------
revision 3.154
date: 2005/01/08 02:08:02;  author: tundra;  state: Exp;  lines: +7 -3
Added logic to sort symlinks pointing to directories into the directory
list when doing separated sorts.  Added new SYMDIR option to toggle
this behavior.  Default is on.
----------------------------
revision 3.153
date: 2005/01/07 23:51:50;  author: tundra;  state: Exp;  lines: +3 -3
Made FORCEUNIXPATH relevant only on Windows systems.
----------------------------
revision 3.152
date: 2005/01/07 23:11:29;  author: tundra;  state: Exp;  lines: +2 -2
Fixed copyright symbol.
----------------------------
revision 3.151
date: 2005/01/07 23:07:28;  author: tundra;  state: Exp;  lines: +7 -7
Changed binding for popup Shortcut menu to Ctrl-Button3 so program
would work correctly on Windows.
----------------------------
revision 3.150
date: 2005/01/07 11:09:54;  author: tundra;  state: Exp;  lines: +33 -4
Added code to provide a Shortcut popup menu.
Added previously missing MOUSEHIST and MOUSEWILD key binding definitions.
----------------------------
revision 3.149
date: 2005/01/07 10:30:20;  author: tundra;  state: Exp;  lines: +48 -10
Removed DirSCs from Directory Menu at startup.
Added separate Shortcut menu to the menubar.
----------------------------
revision 3.148
date: 2005/01/07 07:54:44;  author: tundra;  state: Exp;  lines: +3 -3
Updated copyright.
----------------------------
revision 3.147
date: 2005/01/07 07:29:46;  author: tundra;  state: Exp;  lines: +28 -11
Added support for FORCEUNIXPATH option.
----------------------------
revision 3.146
date: 2004/03/11 09:46:08;  author: tundra;  state: Exp;  lines: +2 -2
Program was throwing an error if the user aborted a PROMPT.
Fixed in the tests for REFRESHAFER in the command execution logic.
----------------------------
revision 3.145
date: 2004/03/11 09:34:44;  author: tundra;  state: Exp;  lines: +8 -2
Modified command history slightly to store the REFRESHAFTER indicator
for all commands, regardless how they were invoked - manually or
via the configuration definition.
----------------------------
revision 3.144
date: 2004/03/11 08:17:28;  author: tundra;  state: Exp;  lines: +28 -2
Added shortcuts for many built-ins for use in the RUNCMD feature.
----------------------------
revision 3.143
date: 2004/03/11 07:24:28;  author: tundra;  state: Exp;  lines: +2 -2
Reduced max path length on titlebar to 60.
----------------------------
revision 3.142
date: 2004/03/11 07:21:18;  author: tundra;  state: Exp;  lines: +17 -7
Added feature to limit the path length displayed on titlebar to
80 characters.  This ensures that the other status information does
not disappear if the user gets very deeply nested into a filesystem.
----------------------------
revision 3.141
date: 2004/03/11 06:51:58;  author: tundra;  state: Exp;  lines: +19 -5
Added visual indication ('*') appended to Auto state on title bar to
indicate that a refresh is currently underway.
----------------------------
revision 3.140
date: 2004/03/11 03:31:33;  author: tundra;  state: Exp;  lines: +41 -7
Added ability to force a display refresh after a command is launched via
the REFRESHAFTER ('+') symbol prepended to a command definition.
(This also works for directly invoked commands via RUNCMD.)
Added REFRESHAFTER variable to set timing for this refresh.
----------------------------
revision 3.139
date: 2004/03/10 23:58:17;  author: tundra;  state: Exp;  lines: +44 -8
Added Control-o key to toggle Autorefreshing.
Added indication of current Autorefresh state to title bar.
Removed separate title bar indication of reverse sort.  This is now
indicated by a '-' symbol appended to the sort field name.
----------------------------
revision 3.138
date: 2004/03/10 10:56:08;  author: tundra;  state: Exp;  lines: +37 -20
BUGFIX: Redefined commands appeared multiple times in the Command Menu.
BUGFIX: Commands did not reliably appear in the Command Menu in the order
in which they were defined.
----------------------------
revision 3.137
date: 2004/03/10 09:37:52;  author: tundra;  state: Exp;  lines: +6 -4
Updated Copyright date.
Sorted debug/help information.
----------------------------
revision 3.136
date: 2003/03/15 15:59:46;  author: tundra;  state: Exp;  lines: +2 -2
Changed "True/False" to "TRUE/FALSE" because a user reported
that the first form was not defined on his system.
----------------------------
revision 3.135
date: 2003/03/12 00:03:07;  author: tundra;  state: Exp;  lines: +14 -6
Fixed bug which caused builtins to be returned incorrectly or inconsistently.
----------------------------
revision 3.134
date: 2003/03/11 17:46:04;  author: tundra;  state: Exp;  lines: +2 -2
Corrected spelling error in About information.
----------------------------
revision 3.133
date: 2003/03/11 17:24:22;  author: tundra;  state: Exp;  lines: +5 -4
Added information on website to About box.
Set USETHREADS to False by default.
Set default REFRESHINT to 5000.
----------------------------
revision 3.132
date: 2003/03/10 21:55:02;  author: tundra;  state: Exp;  lines: +18 -3
Added logic to display Boolean options as "True" or "False".
----------------------------
revision 3.131
date: 2003/03/10 20:51:34;  author: tundra;  state: Exp;  lines: +2 -2
Fixed minor bug which caused incorrect file name to be reported
when conf file could not be opened.
----------------------------
revision 3.130
date: 2003/03/10 19:56:00;  author: tundra;  state: Exp;  lines: +11 -2
Implemented the .include directive.
----------------------------
revision 3.129
date: 2003/03/10 19:36:02;  author: tundra;  state: Exp;  lines: +67 -64
Changed code to permit DIRSCs to be redefined in a single conf file.
Changed code to permit command definitions to be redefined in a single conf file.
Changed WrnMsg() routine to allow caller to display a file name in the title bar.
----------------------------
revision 3.128
date: 2003/03/05 23:38:14;  author: tundra;  state: Exp;  lines: +5 -4
Fixed bug which allowed the condition variable to be prepended or followed by
any string.  Instead of testing for a match anywhere in the field, the program
now makes sure the field begins and ends with a variable dereferencing.
Changed semantics of environment variable processing in existential conditionals
to match that of user-defined variables: the condition test is true if the
variable is simply defined, regardless of the value of the RHS.
----------------------------
revision 3.127
date: 2003/03/05 23:02:04;  author: tundra;  state: Exp;  lines: +73 -58
Restructured and cleaned-up the conditional beginning-of-block parsing logic.
Fixed bug in wildcard processing that returned the previously selected set
if there were no wildcard matches.  Now no matches returns no selections.
----------------------------
revision 3.126
date: 2003/03/04 21:51:44;  author: tundra;  state: Exp;  lines: +2 -2
Minor cosmetic comment change.
----------------------------
revision 3.125
date: 2003/03/04 00:31:54;  author: tundra;  state: Exp;  lines: +27 -27
Changed sort key binding names to be more meaningful.
----------------------------
revision 3.124
date: 2003/03/04 00:13:31;  author: tundra;  state: Exp;  lines: +13 -10
Fixed problem which kept indented conditional lines from being properly handled.
----------------------------
revision 3.123
date: 2003/03/03 23:39:34;  author: tundra;  state: Exp;  lines: +25 -24
Fixed problem which prevented navigating to selected drive in Drive List View.
Fixed problem in which the sort type was incorrectly displayed on first entry
into Drive List View.
Changed Drive List View sorting logic slightly to make it cleaner.
----------------------------
revision 3.122
date: 2003/03/03 22:49:08;  author: tundra;  state: Exp;  lines: +140 -79
Drive List View sorting and Sort Menu finished.
----------------------------
revision 3.121
date: 2003/03/02 00:52:06;  author: tundra;  state: Exp;  lines: +61 -10
First implementation of Sort Menu.
----------------------------
revision 3.120
date: 2003/03/01 22:03:59;  author: tundra;  state: Exp;  lines: +45 -15
Titlebar now show correct info in Drive List View - proper
sort field name is shown and the 'Sep' information is
dropped because it is not meaningful in this view.
----------------------------
revision 3.119
date: 2003/03/01 11:05:35;  author: tundra;  state: Exp;  lines: +119 -61
Implemented sorting for Drive List View
Changed format of Drive List View display
----------------------------
revision 3.118
date: 2003/03/01 08:21:28;  author: tundra;  state: Exp;  lines: +45 -13
Added ability for all conditionals to reference environment variables.
----------------------------
revision 3.117
date: 2003/03/01 07:32:43;  author: tundra;  state: Exp;  lines: +52 -19
Finished first complete implementation of conditional
processing in the Configuration File using ==, !=, and variable existence.
----------------------------
revision 3.116
date: 2003/03/01 00:04:05;  author: tundra;  state: Exp;  lines: +5 -10
Removed debugging print statement in the conditional logic.
Program now allows User-Defined Variables to be re-defined.
Conditional keywords changed to: .if and .endif.
----------------------------
revision 3.115
date: 2003/02/28 23:45:55;  author: tundra;  state: Exp;  lines: +17 -9
Now catches .ENDIF statements which are not on a line by themselves.
Added missing error message and made error messages concerning
conditionals a bit clearer and more consistent with other error message formats.
----------------------------
revision 3.114
date: 2003/02/28 23:18:55;  author: tundra;  state: Exp;  lines: +125 -19
Implemented variable existence conditional in Config File parser.
----------------------------
revision 3.113
date: 2003/02/28 20:05:18;  author: tundra;  state: Exp;  lines: +5 -4
Changed escape char for CMDSHELL and wildcard processing to use " instead of #
----------------------------
revision 3.112
date: 2003/02/28 19:46:26;  author: tundra;  state: Exp;  lines: +22 -11
Finished sorting logic.  Fixed bug with Win32 case collapse.
Changed arithmetic in poll() which sets reduced period for
next refresh if a locked mutex is encountered.
----------------------------
revision 3.111
date: 2003/02/28 01:10:24;  author: tundra;  state: Exp;  lines: +99 -63
Implemented support for fNONE - no sorting.
----------------------------
revision 3.110
date: 2003/02/28 00:19:27;  author: tundra;  state: Exp;  lines: +63 -37
Changed SORTBYFIELD to be the *name* not the number of the field desired.
Check SORTBYFIELD to see if it makes sense.  If not, it is hardwired to fNAME.
----------------------------
revision 3.109
date: 2003/02/27 00:49:39;  author: tundra;  state: Exp;  lines: +96 -83
Inlined the sort routine into BuildDirList().
Added title bar information about current sort.
----------------------------
revision 3.108
date: 2003/02/26 23:24:16;  author: tundra;  state: Exp;  lines: +192 -33
First implementation of sorting algorithm.
Keyboard support and title bar display for sorting implemented.
----------------------------
revision 3.107
date: 2003/02/26 04:39:33;  author: tundra;  state: Exp;  lines: +28 -10
More work on sorting.
----------------------------
revision 3.106
date: 2003/02/25 23:09:02;  author: tundra;  state: Exp;  lines: +200 -202
Restructured code to prepare for enabling sorting by various fields.
Added SORTBYFIELD and SORTREVERSE options.
This restructuring speeded up display calculation considerably.
----------------------------
revision 3.105
date: 2003/02/25 08:28:27;  author: tundra;  state: Exp;  lines: +102 -68
All User-Settable options can now have a blank RHS; means option set to default value.
MAXDIR, MAXDIRBUF, MAXHIST, MAXHISTBUF have been retired in favor of MAXMENU and
MAXMENUBUF which are common parameters for all dynamic menus.
Added Wildcard History menu to track all wildcard-based selections. Menu has
both accelerator key and mouse/key combo to popup that menu.
Added WILDCARD= feature to Configuration File.
----------------------------
revision 3.104
date: 2003/02/25 00:08:23;  author: tundra;  state: Exp;  lines: +135 -15
Ran program through 'flip' to ensure Unix line termination.
Program Function Key handlers now return 'break' consistently
to make sure a user key rebinding does not conflict with some Tk default.
Back to displaying full version number or Titlebar.
# character now used both to escape CMDSHELL and wildcard processing.
RHS of string options can now be blank -> leaves option as default value.
This eliminates the need for the "" construct for CMDSHELL processing.
Implemented Select Via Wildcard feature.
----------------------------
revision 3.103
date: 2003/02/23 22:50:10;  author: tundra;  state: Exp;  lines: +2 -2
Only show major/minor version number (x.x) on Title Bar.
----------------------------
revision 3.102
date: 2003/02/23 22:43:38;  author: tundra;  state: Exp;  lines: +3 -4
Switched string->num conversions from atoi to int(string,base).
This avoids an unnecessary import.
----------------------------
revision 3.101
date: 2003/02/23 22:33:50;  author: tundra;  state: Exp;  lines: +8 -5
Added code to precent FONTDECR from decrementing font sizes to less than 1.
----------------------------
revision 3.1
date: 2003/02/23 22:17:00;  author: tundra;  state: Exp;  lines: +14 -17
Changed logic so CMDSHELL processing, if enabled, is *only*
done when KeyRunCommand is invoked via the RUNCMD key - i.e,
Not when commands are played back via the Command History
Mechanism.  This is a cleaner way to prevent CMDSHELL cascading
on history invocations and also fixes a bug wherein a Command
Definition would get processes with CMDSHELL if that command
was replayed from the history.
----------------------------
revision 3.0
date: 2003/02/17 20:38:07;  author: tundra;  state: Exp;  lines: +7 -6
ExecuteCommand now properly rejects blank command requests and checks
for same as it does the various variable substitutions.
----------------------------
revision 2.94
date: 2003/02/10 23:02:51;  author: tundra;  state: Exp;  lines: +4 -4
Changed DIRSC regex for stricter enforcement of naming.
----------------------------
revision 2.93
date: 2003/02/10 17:39:47;  author: tundra;  state: Exp;  lines: +8 -2
Changed code to first check the environment for HOSTNAME
and only use socket.getfqdn() if nothing is found.  Keeps
program from taking forever to start-up on a misconfigured
or failing network.
----------------------------
revision 2.92
date: 2003/02/07 00:21:42;  author: tundra;  state: Exp;  lines: +6 -6
Minor editing of comments for clarity.
----------------------------
revision 2.91
date: 2003/02/04 18:53:18;  author: tundra;  state: Exp;  lines: +59 -30
Changed code to permit user-rebinding of Directory Shortcut key assignment.
----------------------------
revision 2.90
date: 2003/02/03 22:46:07;  author: tundra;  state: Exp;  lines: +230 -24
Cleanup Debug bit definitions so they group together more sensibly.
Implemented the Program Memory feature.
----------------------------
revision 2.89
date: 2003/01/31 23:08:14;  author: tundra;  state: Exp;  lines: +13 -3
Stopped DIRSC logic from acting if FN key modified with Alt, Ctrl, Shift, etc.
----------------------------
revision 2.88
date: 2003/01/31 19:01:05;  author: tundra;  state: Exp;  lines: +50 -13
Added check to insure that numeric options are >= 0.
Implemented CMDSHELL option and the ability to escape it.  Default is off.
Changed the "Invert Selection" and "Select All" features for the
Drive List View so that they *do* pick the first item in the list.
This entry is a legitimate drive - in the normal view this entry
is ".." and we do not want it selected with these features.
----------------------------
revision 2.87
date: 2003/01/31 00:50:13;  author: tundra;  state: Exp;  lines: +68 -15
Added code to allow either integer or hex values to be entered for -d or
as the RHS of any Numeric Option.
Fixed bug which cause the UI.NameFirst value to be incorrectly set for
any file with a failing lstat call.
----------------------------
revision 2.86
date: 2003/01/30 23:02:58;  author: tundra;  state: Exp;  lines: +26 -12
HEIGHT and WIDTH options now correctly set the initial interface
size in *pixels*.  Added STARTX and STARTY options to set initial
window position (in pixels).  -x and -y options removed from
command line interface since these are now set in the conf file.
Added CMDSHELL options with a default value of [VSHELL].
----------------------------
revision 2.85
date: 2003/01/30 01:10:03;  author: tundra;  state: Exp;  lines: +80 -45
Changed first field of Drive List View to be either the drive label
for local drives, or the share string for remote drives.  Also
added indication of local drives without labels.
Modfied built-in processing to return just drive names in every
case when in Drive List View.  [DIR] returns nothing in that case.
Generified padding of strings throughout entire program with
a new PadString() routine.
----------------------------
revision 2.84
date: 2003/01/29 17:45:38;  author: tundra;  state: Exp;  lines: +28 -16
Corrected hostname lookup for remote drives.
Inhibit toggline WIN32ALL off (^w) when in Drive List View.
----------------------------
revision 2.83
date: 2003/01/29 01:13:30;  author: tundra;  state: Exp;  lines: +107 -40
First cut of details display with Win32 Drive List View.
----------------------------
revision 2.82
date: 2003/01/28 17:37:46;  author: tundra;  state: Exp;  lines: +131 -75
Added FONTDECR and FONTINCR features.
----------------------------
revision 2.81
date: 2003/01/28 01:22:14;  author: tundra;  state: Exp;  lines: +3 -38
Removed all manual unicode <-> byte string conversions for Win32.
This issue is resolved in the Win32 Python site.py setup.
----------------------------
revision 2.80
date: 2003/01/25 00:22:45;  author: tundra;  state: Exp;  lines: +27 -5
Had to modify the promotion of filenames to unicode so that
the un-promoted names are used for detail processing and the
promoted names are used for those cases when we are running w/o
details.
----------------------------
revision 2.79
date: 2003/01/23 19:44:23;  author: tundra;  state: Exp;  lines: +35 -29
Fixed problem with file/directory name sorting on Win32.
Changed where file names get promoted to unicode so that
navigation into directories containing non-ASCII characters
will work with details on or off.
----------------------------
revision 2.78
date: 2003/01/22 21:32:08;  author: tundra;  state: Exp;  lines: +28 -17
Added bit assignment details to debug information on help screen.
Adjusted Title Bar field spacing.
Modified stat field display to conform more closely to Unix 'ls -l' output.
----------------------------
revision 2.77
date: 2003/01/22 02:27:59;  author: tundra;  state: Exp;  lines: +103 -82
Resturctured constand and literal definitions so they are
grouped together in a more rational fashion.
De-strung some literals that crept into the code in various
places.
Changed the strategy for handling win32all details where
the file/directory name contains non-ASCII characters.
Instead of coercing the owner/group names to ASCII,
the file name it promoted to unicode.
----------------------------
revision 2.76
date: 2003/01/20 07:58:10;  author: tundra;  state: Exp;  lines: +2 -2
Whoops - Had to features both mapped to Control-y (Clear History
and Toggle win32all).  Moved Clear History to Control-y.
----------------------------
revision 2.75
date: 2003/01/20 07:44:28;  author: tundra;  state: Exp;  lines: +4 -6
Fixed problem with program blowing-up if it encountered
a file with an extended character in its name when win32all
options were in force.  Cause by the way the Win32 api
returns string names for user and group.  Fixed by coercing
them with an str(...) call.
Fixed problem with each new directory causing *2* calls
to BuildDirList - leftover debugging print statement was
the problem.  Should speed up larger directories considerably.
----------------------------
revision 2.74
date: 2003/01/19 17:40:27;  author: tundra;  state: Exp;  lines: +35 -23
Changed default width to 110.
When win32all features are toggled from keyboard, the display
is refreshed so update is seen immediately.
KeyToggleWin32All() now only works if USEWIN32ALL is True.
However, a separate internal program flag (WIN32ALLON) is
used to keep track of whether or not these features are
currently requested by the user.  This way setting USEWIN32ALL
to false both inhibits these features and prevents the
toggle feature from reenabling them.  Previously, even if
USEWIN32ALL was False, the user could toggle the features
back on with the TOGWIN32 program feature.
ProcessOptions() now ends with a call to RefreshDirList()
to make sure any interface features are properly updated.
Previously, the user either had to wait for the next
scheduled autorefresh or initiate one manually.
----------------------------
revision 2.73
date: 2003/01/19 08:03:49;  author: tundra;  state: Exp;  lines: +77 -42
Added ability to display true Win32 user/group info if win32all installed.
Added USEWIN32ALL option to enable/disable this feature.
Added function TOGWIN32ALL (^w) to toggle this feature on and off.
----------------------------
revision 2.72
date: 2003/01/19 06:12:56;  author: tundra;  state: Exp;  lines: +96 -45
Where debug and help menus display common information, made titles the same.
Added code to pickup the user name from win32all if it is present.
Implemented code to display native Win32 file mode information if win32all present.
----------------------------
revision 2.71
date: 2003/01/19 04:55:29;  author: tundra;  state: Exp;  lines: +54 -19
Broke Internal Program Variables and User-Settable Options
into two separate Help menus to keep them reasonable length.
Internal Program Variables are now sorted in both debug
output and in the Help menu.
Added username to titlebar if we can get it.
Restructured win32all imports slightly to make the mechanism
more general.
----------------------------
revision 2.70
date: 2003/01/19 02:41:22;  author: tundra;  state: Exp;  lines: +20 -29
Dropped "break" from the return at the end of the accelerator handler
logic.  This was inhibiting other Alt- keys from being used as locally defined.
Removed -b, -f, -n, -w, and -s command line flags since color/font parameters
can now be set via configuration file options.
Added options MAXDIRBUF and MAXHISTBUF to bound the data storage used
by UI.AllDirs and UI.CmdHist respectively.
----------------------------
revision 2.69
date: 2003/01/18 19:13:35;  author: tundra;  state: Exp;  lines: +61 -18
Ended RIGHTS in a period.
Added option variables for setting Menubar color, and Menu/Help
item colors/font:  MBARCOL, MBCOLOR, MFCOLOR, MFNAME, MFSZ, MFWT,
HBCOLOR, HFCOLOR, HFNAME, HFSZ, HFWT.
----------------------------
revision 2.68
date: 2003/01/18 02:38:22;  author: tundra;  state: Exp;  lines: +237 -85
Added " &' to the end of the non-threaded execution command so it
does not lock up the main interface in a modal wait.
Implemented the Help Menu w/accelerator key.
----------------------------
revision 2.67
date: 2003/01/17 21:37:22;  author: tundra;  state: Exp;  lines: +10 -3
Added USETHREADS option - allows user to select traditional
process mechanics for command execution on Unix systems.
Ignored on Win32.
----------------------------
revision 2.66
date: 2003/01/17 20:58:49;  author: tundra;  state: Exp;  lines: +39 -20
Added logic to reset options to their defaults before processing
the configuration file, either initially or on a reload.
This allows the user to comment out an options statment in
the configuration file and have the program go back to
default behavior.   Also cleaned up debug output to separate
internal and user-settable options when asked to dump variable
information.
----------------------------
revision 2.65
date: 2003/01/17 06:55:46;  author: tundra;  state: Exp;  lines: +18 -7
Added NODETAILS option which prevents details from ever being
displayed.
Added NONAVIGATE option which prevents any navigation away from
starting directory
----------------------------
revision 2.64
date: 2003/01/17 06:23:01;  author: tundra;  state: Exp;  lines: +19 -11
Reassigned Command History popup to Ctrl-Shift-Button3.
Mask unneeded Mod2-Mod5 bits.  Linux reports NumLock in Mod2
which can cause the program to not respond properly if on.
Changed semantics of Command History slightly:  Commands
entered manually will be saved in the history without the
variables expanded.  All other command invocations
save the command with all variables dereferenced.
----------------------------
revision 2.63
date: 2003/01/16 23:08:02;  author: tundra;  state: Exp;  lines: +35 -28
Program now catches/warns/ignores DIRSC numbers outside
the range of 1-12.
Cleaned up and generalized the "ignore" masks needed for
the various Unix/Win32 event state variations.
Implemented Alt-Button3 as the mouse shortcut to the History Menu.
----------------------------
revision 2.62
date: 2003/01/16 18:32:33;  author: tundra;  state: Exp;  lines: +114 -85
Added ability for manually entered commands to reference environment
variables [$NAME] and User-Defined variables [NAME].  This necessitated
factoring out the variable parsing logic into a separate function
callable both by the configuration file parsing logic (for user-defined
commands) as well as the command execution logic (for manually entered
commands).
----------------------------
revision 2.61
date: 2003/01/16 17:26:03;  author: tundra;  state: Exp;  lines: +81 -66
Fixed problem which cause History Menu to be sorted.
Added ability for manually entered commands to reference
built-in variables.  To support this, the built-in
variable parser was factored out into a separate function
since it is now needed both by the keystroke command processor
and the manual command processor.
----------------------------
revision 2.60
date: 2003/01/16 01:15:08;  author: tundra;  state: Exp;  lines: +59 -50
Added [YESNO: ...] built-in variable.
Made program more forgiving by converting as many existing
errors to warnings with recovery and continued operation.
Some reformatting of warning messages for consistency.
----------------------------
revision 2.59
date: 2003/01/15 23:33:58;  author: tundra;  state: Exp;  lines: +137 -115
Fixed problem on Unix when user rapidly selected a
symlink which pointed back at itself - Tk seems to get
confused about what message box it has up, and throws
a benign error.  The Tk call is now protected by
try/except so the error is not seen on stdout.
Retructured options processing into a common routine
so that options get properly set to their defaults
even if the specified configuration file cannot
be found.
----------------------------
revision 2.58
date: 2003/01/15 21:41:48;  author: tundra;  state: Exp;  lines: +80 -52
Bit 0 of DEBUGLEVEL is now observed on reload of the config file.
Added logic to enforce rule that RHS of a String option cannot
be blank.
Undid forced case collapse of Win32 file names.  Instead, now
under Win32, both directory and file names are sorted using
a case-insensitive algorithm.
Factored menu update logic into a single, common handler
which can talk to either standard functions or event
handlers (via the 'fakeevent' option).
Both MAXDIR and MAXHIST are now observed on a config file reload.
However, they do not actually remove content from their respective
data structures.  They merely limit what is visible.  This allows
a subsequent change to restore the view of previous entries.
----------------------------
revision 2.57
date: 2003/01/14 22:05:09;  author: tundra;  state: Exp;  lines: +77 -38
Finished support for the remainining options which can
be set in the configuration file: Boolean (AUTOREFRESH, WARN) and
String (BCOLOR, FCOLOR, FNAME, FWT, QUOTECHAR, STARTDIR).
Restructured the command line processing to make sure the
environment variable and then the command line override
any options set in the configuration file and to skip
any options processing if the user just want help or
version information.  Also resturctured the debug logic
to properly display requested information if the user
reloads a configuration file from a running instance of
the program.
----------------------------
revision 2.56
date: 2003/01/13 22:06:09;  author: tundra;  state: Exp;  lines: +3 -2
Change Directory was preserving last manual entry even
when MAXDIR=0.  Fixed.
----------------------------
revision 2.55
date: 2003/01/13 21:33:27;  author: tundra;  state: Exp;  lines: +78 -16
Collapsed all Win32 file names to lower-case so that sorted display
makes more sense.  Also fixed bug in which the same Win32 directory
entered in different case would appear twice in the Directory Menu.
Added 'last entry' as default offering in the Change Directory
dialog much like the Run Command dialog already has.
The Clear History feature now additionally clears the
directory stack, the Change Directory 'last entry' buffer, as
well as the Directory Menu itself.
The directory menu logic now honors the MAXDIR option variable.
Fixed bug which left Command Menu enabled after reloading a
configuration file which had no commands defined.
All of the numeric options are now settable from within the
configuration file: DEBUGLEVEL, FSZ, HEIGHT, MAXDIR, MAXNESTING,
MAXHIST, REFRESHINT, and WIDTH.
----------------------------
revision 2.54
date: 2003/01/13 18:45:28;  author: tundra;  state: Exp;  lines: +137 -99
Added try/except protection around command execution attempts.
Set GUI options like size and fonts *after* the configuration
file is read to allow the file to override the defaults.
Changed 'Last Command' semantics to include items selected
from Command History, but only if they were manually modified.
Changed logic of MAXNESTING to operate correctly when this
variable is set to 0 - this inhibits all user-define variable substitution.
Added MAXHIST variable and supporting logic to bound the size of
the Command History.
Began adding the infrastructure to support setting options in the
configuration file.  MAXHIST, MAXNESTING, HEIGHT, WIDTH now
can be set this way.
Began implementing MAXDIR to bound size of Directory Menu
contents.
Changed semantics of how options are read at startup.
The Configuration File (if any) is read before any other
environment or command line options are processed.  This
allows the configuration file to override program defaults
via options specified by the user in that file.
----------------------------
revision 2.53
date: 2003/01/11 23:24:15;  author: tundra;  state: Exp;  lines: +46 -22
Commands selected from History Menu no longer as saved
as the 'last command'.  Only commands actually entered
manually from the RUNCMD dialog are saved as 'last'.
Added command to clear all history - CLRHIST.
----------------------------
revision 2.52
date: 2003/01/11 22:52:02;  author: tundra;  state: Exp;  lines: +83 -68
Refactored accelerator logic and menu popup logic into common
routines.
Added full Command History features and menu.
----------------------------
revision 2.51
date: 2003/01/11 07:41:07;  author: tundra;  state: Exp;  lines: +23 -4
Fixed a problem with mouse/keyboard input because different
configurations of Win32 (even of same OS) cause different
control bits to be set when the Alt key is pressed.
Changed logic in DirListHandler() slightly to only add
a trailing PSEP to a directory if it does not already have
one.  Necessitated because of the Win32 Drive List View
which already has trailing '\' for each entry.
----------------------------
revision 2.50
date: 2003/01/11 00:23:48;  author: tundra;  state: Exp;  lines: +50 -10
Consolidated all the program execution points into a single,
common routine, ExecuteCommand(), with a Command History stack added.
Changed Run Command dialog to default with last command executed,
if any, in the entry field.
----------------------------
revision 2.49
date: 2003/01/10 19:26:08;  author: tundra;  state: Exp;  lines: +128 -32
Fine-tuned the accelerator key logic.
Added the Directory Shortcut feature.
----------------------------
revision 2.48
date: 2003/01/09 18:03:07;  author: tundra;  state: Exp;  lines: +127 -57
Moved SetSelection() into GUI object where it belongs.
Fixed bug which caused program to exit on Unix if a
UID/GID was encountered which had no corresponding name.
Added logic to implemente menu accelerator keys.
----------------------------
revision 2.47
date: 2003/01/07 21:29:14;  author: tundra;  state: Exp;  lines: +78 -19
Restrutured all mouse events to go through one of two
mouse event dispatcher to make it easier to distinquish
between mouse events modified by Ctrl, Shift, etc. keys.
Implemented a single list which contains the names of
all Key/Mouse assignments which may not be rebound in
the configuration file.
Implemented a feature to popup the visited directories list
using the mouse (MOUSEDIR).
----------------------------
revision 2.46
date: 2003/01/05 23:27:25;  author: tundra;  state: Exp;  lines: +10 -1
Fixed nasty (and dangerous) bug which prevented the program from
differentiating between 'char', 'Alt-char', 'Ctrl-char' and so on.
This meant that a user entering 'Alt-d', for example, would see
the program try to exectute the command with 'd' as its command
string.
----------------------------
revision 2.45
date: 2003/01/05 16:56:23;  author: tundra;  state: Exp;  lines: +31 -21
Fixed long-standing bug in which Titlebar was not being correctly updated.
----------------------------
revision 2.44
date: 2003/01/04 22:52:13;  author: tundra;  state: Exp;  lines: +120 -32
Added capability of displaying a Drive List View while running on Win32.
This functionality is only available if the user has installed Win32all.
----------------------------
revision 2.43
date: 2003/01/04 19:00:50;  author: tundra;  state: Exp;  lines: +20 -16
Added ability to set default options via the 'TWANDER' environment variable.
Minor cosmetic cleanups.
----------------------------
revision 2.42
date: 2003/01/03 20:45:53;  author: tundra;  state: Exp;  lines: +76 -44
Slight reorganization of debug code so it picks up variables
just before GUI starts running - necessary to get correct
variable values in all cases.
Started implementing the "Drives View" for Win32 systems.
----------------------------
revision 2.41
date: 2003/01/02 22:58:36;  author: tundra;  state: Exp;  lines: +18 -20
Fixed long-standing (minor) bug.  Under certain circumstances,
(selecting ".." from root or manually changing to the same
directory as current) the top of the directory stack could
end up with the name of the currently-viewed directory.  This
meant you had to go "back" *twice* to actually get to the
previous directory.  Now fixed.
----------------------------
revision 2.40
date: 2003/01/02 21:20:40;  author: tundra;  state: Exp;  lines: +41 -26
Changed all debug points to use a common output routine, PrintDebug(),
for consistent output formatting.
----------------------------
revision 2.39
date: 2003/01/02 17:51:29;  author: tundra;  state: Exp;  lines: +4 -3
Minor cosmetic cleanup on debug output.
----------------------------
revision 2.38
date: 2003/01/02 17:19:46;  author: tundra;  state: Exp;  lines: +39 -13
Implemented multi-level debug capability.
----------------------------
revision 2.37
date: 2002/12/31 01:17:56;  author: tundra;  state: Exp;  lines: +6 -3
Inhibited display of Context Menu if no commands defined.
----------------------------
revision 2.36
date: 2002/12/31 01:09:12;  author: tundra;  state: Exp;  lines: +60 -16
Implemented context menu feature.
Added logic to inhibit rebinding of mouse button assignments.
Fixed bug which caused error when StripPSEP() was called with
an empty string.
----------------------------
revision 2.35
date: 2002/12/24 22:16:59;  author: tundra;  state: Exp;  lines: +3 -3
Minor/cosmetic corrections.
----------------------------
revision 2.34
date: 2002/12/23 22:34:54;  author: tundra;  state: Exp;  lines: +9 -9
Cosmetic edits. No functional change.
----------------------------
revision 2.33
date: 2002/12/23 21:41:37;  author: tundra;  state: Exp;  lines: +22 -4
Fixed BUG in which [SELECTIONS] was never getting populated.
Trailing path separator characters on directory names are no
STRIPPED when returned as a part of any builtin to make command
authoring more flexible.
----------------------------
revision 2.32
date: 2002/12/23 15:19:11;  author: tundra;  state: Exp;  lines: +2 -2
Changed default SELKEY to <Return> (Enter) key.
----------------------------
revision 2.31
date: 2002/12/21 22:24:12;  author: tundra;  state: Exp;  lines: +54 -5
Select All no longer include ".."
Added new feature to Invert Current Selection.
Added new feature to Goto Root Directory.
----------------------------
revision 2.30
date: 2002/12/20 06:26:39;  author: tundra;  state: Exp;  lines: +65 -58
Slight reorganization of code.
----------------------------
revision 2.29
date: 2002/12/19 16:44:47;  author: tundra;  state: Exp;  lines: +2 -1
Fixed bug which left Commands Menu enabled after a reload of
a configuration file which has all command definitions removed.
----------------------------
revision 2.28
date: 2002/12/19 01:07:54;  author: tundra;  state: Exp;  lines: +18 -6
Cleaned up debug listings a bit.  Keyboard bindings listing
now sorted and dumped before internal tables.  Symbol table
now sorted in the output.
----------------------------
revision 2.27
date: 2002/12/18 23:58:19;  author: tundra;  state: Exp;  lines: +10 -28
Went back to original simpler comment semantics, but introduced
[HASH] builtin to allow this character to be a part of a
Command String.
----------------------------
revision 2.26
date: 2002/12/18 22:38:20;  author: tundra;  state: Exp;  lines: +29 -9
Went back to using "#" as the comment introducer because
"//" did not solve the problem of emedding comment characters
in legitimate Command Definitions.  Parser modified so that
comment characters found anywhere in the Command Definition
line, except for the Command Key, are ignored.  This means
comments cannot be appended at the end of a Command Definition
line.
----------------------------
revision 2.25
date: 2002/12/18 21:44:36;  author: tundra;  state: Exp;  lines: +2 -2
Changed comment introducer from "#" to "//".
----------------------------
revision 2.24
date: 2002/12/18 21:38:55;  author: tundra;  state: Exp;  lines: +9 -4
Program now properly detects configuration files with no command
definitions as well as no commands because configuration file
not readable.  In either case, if no commands are defined,
the Commands menu is disabled (grayed out).
----------------------------
revision 2.23
date: 2002/12/18 21:01:45;  author: tundra;  state: Exp;  lines: +3 -1
Fixed vertical scrolling commands so they move the activation
into the (top) of the newly visible items.
----------------------------
revision 2.22
date: 2002/12/18 20:06:49;  author: tundra;  state: Exp;  lines: +33 -3
Added horizontal scrolling commands.
----------------------------
revision 2.21
date: 2002/12/18 19:39:41;  author: tundra;  state: Exp;  lines: +16 -5
Fixed bugs (MAO) that caused incorrect selection with
first- and last- item selection.
----------------------------
revision 2.20
date: 2002/12/17 17:19:52;  author: tundra;  state: Exp;  lines: +7 -6
Added command key display to command menu labels.
Setup menu text to track size specified on command line.
----------------------------
revision 2.19
date: 2002/12/17 00:58:23;  author: tundra;  state: Exp;  lines: +20 -3
Made sure user cannot use redefine one of the built-in variables
as a user-defined variable.
----------------------------
revision 2.18
date: 2002/12/15 23:19:23;  author: tundra;  state: Exp;  lines: +3 -3
Added several more internal variables to the debug dump.
----------------------------
revision 2.17
date: 2002/12/15 23:11:16;  author: tundra;  state: Exp;  lines: +3 -2
Fixed bug which prevent "=" from being used as a command key.
----------------------------
revision 2.16
date: 2002/12/15 22:37:49;  author: tundra;  state: Exp;  lines: +7 -7
Minor code reorganization to group selection keys more logically.
----------------------------
revision 2.15
date: 2002/12/15 22:29:56;  author: tundra;  state: Exp;  lines: +7 -7
Renamed some of the mouse binding variables for greater consistency.
----------------------------
revision 2.14
date: 2002/12/15 21:47:43;  author: tundra;  state: Exp;  lines: +3 -2
Destring debug null value indicator.
----------------------------
revision 2.13
date: 2002/12/15 21:44:57;  author: tundra;  state: Exp;  lines: +3 -3
Added QUOTECHAR to dump of internal variables.
Changed dump of internal variables to indicate null values with "None".
----------------------------
revision 2.12
date: 2002/12/15 21:38:14;  author: tundra;  state: Exp;  lines: +145 -57
Made all references to configuration file locations (HOME,
STARTDIR, or -c argument) absolute paths so the file
can always be found on a reload regardless of current
directory location.
Added ability to override default key bindings in configuration
file.
Added more debug information. Destrung debug messages.
----------------------------
revision 2.11
date: 2002/12/14 21:18:15;  author: tundra;  state: Exp;  lines: +2 -4
Fixed problem properly setting internal HOME variable if $HOME
was not actually set.
----------------------------
revision 2.10
date: 2002/12/14 20:42:48;  author: tundra;  state: Exp;  lines: +3 -5
Went back to using threading for all command invocations.
----------------------------
revision 1.100
date: 2002/12/12 17:52:55;  author: tundra;  state: Exp;  lines: +28 -2
Fixed problem with distinguishing user-defined variables from
command definitions which include the '=' symbol.
----------------------------
revision 1.99
date: 2002/12/12 16:49:44;  author: tundra;  state: Exp;  lines: +59 -3
Added Command and Directory menus with necessary supporting logic.
----------------------------
revision 1.98
date: 2002/12/11 22:50:51;  author: tundra;  state: Exp;  lines: +2 -2
Added quotation around strings generated by PROMPT:
----------------------------
revision 1.97
date: 2002/12/11 22:48:57;  author: tundra;  state: Exp;  lines: +5 -5
Fixed bug in user-defined variable parsing.
----------------------------
revision 1.96
date: 2002/12/11 21:54:54;  author: tundra;  state: Exp;  lines: +45 -16
Implemented the PROMPT: builtin.
Program context now follows directory context selected by user.
----------------------------
revision 1.95
date: 2002/12/10 02:47:31;  author: tundra;  state: Exp;  lines: +15 -12
Corrected bug in substitution of builtins.  Added quotation support
for builtin substitutions.
----------------------------
revision 1.94
date: 2002/12/09 20:16:53;  author: tundra;  state: Exp;  lines: +2 -2
Fixed bug in command invocation.
----------------------------
revision 1.93
date: 2002/12/09 20:08:16;  author: tundra;  state: Exp;  lines: +6 -3
Changed command execution to use threads only on win32 and
a simple os.system call elsewhere.
----------------------------
revision 1.92
date: 2002/12/09 18:37:39;  author: tundra;  state: Exp;  lines: +24 -8
First implementation of DSELECTION and DSELECTIONS builtins.
----------------------------
revision 1.91
date: 2002/12/09 17:35:41;  author: tundra;  state: Exp;  lines: +38 -18
Implemented debugging command line option.
----------------------------
revision 1.90
date: 2002/12/06 21:23:18;  author: tundra;  state: Exp;  lines: +161 -47
Integrated new command language parser into the program.  Still have
to rewrite the runtime interpreter for builtins.
----------------------------
revision 1.89
date: 2002/12/04 22:48:03;  author: tundra;  state: Exp;  lines: +5 -4
Changed all instances of os.system() used to run commands to
use a new thread so that the running command does not block
'twander' itself.
----------------------------
revision 1.88
date: 2002/12/01 22:16:10;  author: tundra;  state: Exp;  lines: +30 -12
Made command keys case-sensitive.
Implemented 'Run Command' option from keyboard.
Changed program exit to Ctrl-q.
----------------------------
revision 1.87
date: 2002/12/01 16:45:57;  author: tundra;  state: Exp;  lines: +25 -6
Changed time to display mtime instead of ctime.
Fixed time formatting do drop seconds and pad single-digit dates.
Changed user/group prefix on Win32 systems from 'nt' to 'win32'.
----------------------------
revision 1.86
date: 2002/11/27 03:13:09;  author: tundra;  state: Exp;  lines: +10 -3
Added ability to execute double-clicked file under Unix.
----------------------------
revision 1.85
date: 2002/11/26 21:01:04;  author: tundra;  state: Exp;  lines: +78 -3
Added keyboard support for, Select All, Select None, Page Down, and Page Up.
Added mouse support for Directory Back and Directory Up.
----------------------------
revision 1.84
date: 2002/11/26 19:28:15;  author: tundra;  state: Exp;  lines: +12 -8
Added command line option to suppress automatic display refreshing.
----------------------------
revision 1.83
date: 2002/11/26 18:58:30;  author: tundra;  state: Exp;  lines: +70 -36
Workaround problem of Tk setting activation after a
new directory selected via mouse click.
----------------------------
revision 1.82
date: 2002/11/25 23:06:48;  author: tundra;  state: Exp;  lines: +98 -84
Fixed problem which happened only when the lstat call filed
during detail collection.
----------------------------
revision 1.81
date: 2002/11/25 22:35:06;  author: tundra;  state: Exp;  lines: +82 -56
Changed detail processing code to use symbolic references to the
list returned from stat/lstat.  Also provided symbolic definitions
for each displayed field length.  Restructured the code sets
the current view and starting offset for the file name and placed
it as a method in the UI definition.
----------------------------
revision 1.80
date: 2002/11/24 22:46:18;  author: tundra;  state: Exp;  lines: +31 -9
Fixed problem in which symbolic links were not properly being noted.
Added code show expansion of each symbolic link.
Selection code modified to reflect the fact that the last item
on a detail display might not necessarily be a filename - it might
have a symlink expansion tacked on to the end.
----------------------------
revision 1.79
date: 2002/11/24 19:23:46;  author: tundra;  state: Exp;  lines: +35 -11
Allow up to 11 char user/group names for both Unix and non-unix systems.
Changed fromat string in mode processing so that it generates a 6-digit
octal result instead of doing it manually in a loop as before.
Added code to detect/process setuid, setgid, and sticky bits.
----------------------------
revision 1.78
date: 2002/11/24 18:44:51;  author: tundra;  state: Exp;  lines: +33 -30
Added total size of current directory to titlebar.
----------------------------
revision 1.77
date: 2002/11/23 10:35:44;  author: tundra;  state: Exp;  lines: +18 -10
Added logic to pickup the special file types from the mode value.
----------------------------
revision 1.76
date: 2002/11/23 10:07:27;  author: tundra;  state: Exp;  lines: +45 -5
Added logic to display file lengths in bytes, KB, or MB
depending on size.  Began implenting logic to display
Unix-style permissions.
----------------------------
revision 1.75
date: 2002/11/23 03:51:47;  author: tundra;  state: Exp;  lines: +30 -23
More work on the detailed view display.
Added total file count to titlebar.
----------------------------
revision 1.74
date: 2002/11/23 03:15:43;  author: tundra;  state: Exp;  lines: +94 -24
Partial implementation of detail view including toggle key and
basic logic to populate the detail information.
----------------------------
revision 1.73
date: 2002/11/22 22:29:00;  author: tundra;  state: Exp;  lines: +27 -19
Further cleanup of configuration file location semantics.
----------------------------
revision 1.72
date: 2002/11/22 20:53:40;  author: tundra;  state: Exp;  lines: +6 -10
Changed program to run even if it cannot find a configuration
file.  This condition warns the user that they are running
with no commands defined, but the program will run this way now.
----------------------------
revision 1.71
date: 2002/11/21 22:59:16;  author: tundra;  state: Exp;  lines: +51 -33
Implemented ability to select multiple items, both adjacent and
non-adjacent.
----------------------------
revision 1.70
date: 2002/11/21 21:06:58;  author: tundra;  state: Exp;  lines: +74 -42
Further fix to correctly init select/active after a directory change.
Changed select key to ^space.
----------------------------
revision 1.69
date: 2002/11/21 19:57:06;  author: tundra;  state: Exp;  lines: +24 -24
Switched from [] directory delimiters to traling PSEP instead.
Fixed problem where selection was not 0 after a double-click
into a directory.
----------------------------
revision 1.68
date: 2002/11/21 01:05:08;  author: tundra;  state: Exp;  lines: +12 -1
Program x,y scroll state is now preserved across RefreshDirList invocations.
----------------------------
revision 1.67
date: 2002/11/20 23:55:16;  author: tundra;  state: Exp;  lines: +11 -20
Win32 Only: Added ability to execute double clicked file
selections with Win32 associations.
----------------------------
revision 1.66
date: 2002/11/19 23:04:15;  author: tundra;  state: Exp;  lines: +21 -17
Removed display of current selection in title bar.
Changed binding to go back one directory to ^B.
Suppressed navigation of symlinks which point back to their own
directory (Unix only).
----------------------------
revision 1.65
date: 2002/11/19 10:21:23;  author: tundra;  state: Exp;  lines: +8 -2
Cleaned up selections involving form: /foo/bar/[....]
----------------------------
revision 1.64
date: 2002/11/19 10:06:07;  author: tundra;  state: Exp;  lines: +39 -49
Fixed bug which gave Tk fits if LoadDirList was called
with either a bogus directory name or a directory for
which the user does not have read permission.  This affected
both navigation into a read-protected directory or specifying
a bogus/unreadable directory in the directory change
dialog or on the command line.
----------------------------
revision 1.63
date: 2002/11/19 09:31:43;  author: tundra;  state: Exp;  lines: +26 -58
Removed all the mutex stuff introduced in previous version.
Solved long-standing bug of single-click selection of
file actually selecting '..' by using a Double-Click
as the selection event.  This works OK, because my code
forces the active and selected entries to be the same,
so a single-click will select a file and a double-click
will select a directory change.
Changed refresh rate to once every 2 seconds.
----------------------------
revision 1.62
date: 2002/11/19 01:23:15;  author: tundra;  state: Exp;  lines: +80 -70
Went back to stdout instead of GUI for -h and -v options.
Added mutex to serialize access to DirList selection value.
----------------------------
revision 1.61
date: 2002/11/18 08:00:00;  author: tundra;  state: Exp;  lines: +61 -28
Added a key assignment to manually invoke RefreshDirList.
Broke out the selection logic from RefreshDirList into a
separate SetSelection call which can then be called independently.
Added logic to finish implementing selection navigation.
----------------------------
revision 1.60
date: 2002/11/17 19:46:08;  author: tundra;  state: Exp;  lines: +6 -28
Fixed problem with RefreshDirList not picking up newly added
files in the current directory.  Instead of trying to manage
this itself, the routine now calls BuildDirList to get a
correct current snapshot of the directory.
----------------------------
revision 1.59
date: 2002/11/17 09:06:50;  author: tundra;  state: Exp;  lines: +33 -27
Fixed problem with PgUp/PgDn creating multiple selections.
Changed event bindings from root -> DirList.
----------------------------
revision 1.58
date: 2002/11/17 07:57:26;  author: tundra;  state: Exp;  lines: +247 -129
Corrected handling of attempt to enter dir which cannot be opened.
Corrected finding configuration file in $HOME.
Added skeleton code for handling addtional selections: Next, Previous,
First, and Last.
----------------------------
revision 1.57
date: 2002/11/16 22:31:51;  author: tundra;  state: Exp;  lines: +8 -1
Fixed problem under Win32 where input focus was lost if a warning message
box was displayed at startup.
----------------------------
revision 1.56
date: 2002/11/16 22:12:10;  author: tundra;  state: Exp;  lines: +87 -42
Fixed several bugs in the traversal stack logic.
Rewrote RefreshDirList so it manages the widget contents directly
rather than calling LoadDirList.  This is both cleaner and avoids
reentrant calls into LoadDirList which appear to give Tk fits.
----------------------------
revision 1.55
date: 2002/11/15 09:47:43;  author: tundra;  state: Exp;  lines: +43 -22
Further work on error/warning message display.
----------------------------
revision 1.54
date: 2002/11/14 23:26:39;  author: tundra;  state: Exp;  lines: +23 -8
Implemented message boxes for warnings and errors.
Put skeleton in place for entering new path.
----------------------------
revision 1.53
date: 2002/11/14 21:48:24;  author: tundra;  state: Exp;  lines: +4 -3
Active and Selected now track together.
----------------------------
revision 1.52
date: 2002/11/14 21:29:53;  author: tundra;  state: Exp;  lines: +22 -12
Added feature to reload configuration file.
----------------------------
revision 1.51
date: 2002/11/14 04:04:46;  author: tundra;  state: Exp;  lines: +75 -65
Stored all globals in UI object.
Added feature to move to $HOME.
----------------------------
revision 1.50
date: 2002/11/14 03:40:27;  author: tundra;  state: Exp;  lines: +34 -18
Pulled out key bindings as symbolic assignments for ease of maintenance.
Made location of config file sensitive to presence of $HOME.
----------------------------
revision 1.49
date: 2002/11/14 03:06:47;  author: tundra;  state: Exp;  lines: +178 -195
Reorganized and restructured code for readability.
Collapsed functions for simplicity.
----------------------------
revision 1.48
date: 2002/11/13 23:17:16;  author: tundra;  state: Exp;  lines: +59 -39
Finished RefreshDirList() to keep dislay in-sync with directory contents.
Eliminated global FILESELECTED by adding twanderUI.CurrentSelection() method.
New method twanderUI.UpdateTitle() now includes any selected file name.
----------------------------
revision 1.47
date: 2002/11/13 09:46:26;  author: tundra;  state: Exp;  lines: +11 -2
Added code to preserve selection and active item in refresh routine.
Changed #! invocation to use /usr/bin/env.
----------------------------
revision 1.46
date: 2002/11/13 00:41:51;  author: tundra;  state: Exp;  lines: +101 -48
Removed global tracking of INDEX value.
Collapsed DirListHandler() and ProcessSelection() back into one function.
Broke out IsDirSelected().
Put in rudiments for RefreshDirList and support for both periodic
object polling and ^L refresh requests.
----------------------------
revision 1.45
date: 2002/11/12 10:02:13;  author: tundra;  state: Exp;  lines: +24 -9
Fixed navigation with arrow keys and spacebar.
----------------------------
revision 1.44
date: 2002/11/12 01:59:02;  author: tundra;  state: Exp;  lines: +6 -33
Slight restructuring of code to allow widget handling of up/down arrows
and spacebar for item selection.
Still needs work.
----------------------------
revision 1.43
date: 2002/11/12 01:07:03;  author: tundra;  state: Exp;  lines: +20 -20
Minor changes.  Fixed subtle problem with visual navigation via ".." which
happened only when in root directory.  This is now prevented by never showing
the ".." in the root directory display.
----------------------------
revision 1.42
date: 2002/11/12 00:01:18;  author: tundra;  state: Exp;  lines: +152 -44
Added support for Backspace (move up one directory) and Left Arrow
(go to last visited directory) keys.
----------------------------
revision 1.41
date: 2002/11/11 21:00:09;  author: tundra;  state: Exp;  lines: +36 -3
Added support for Esc and Home keys.
----------------------------
revision 1.40
date: 2002/11/10 21:47:59;  author: tundra;  state: Exp;  lines: +59 -12
First cut with actual command processing and executrion.
----------------------------
revision 1.39
date: 2002/11/10 19:21:46;  author: tundra;  state: Exp;  lines: +4 -4
Back to single-click selections.  Now using the 'listbox.nearest(event.y)'
method for determining current selection correctly.
----------------------------
revision 1.38
date: 2002/11/10 00:21:25;  author: tundra;  state: Exp;  lines: +9 -29
Went back to using an event handler to deal with double-click selections
within DirList widget.
----------------------------
revision 1.37
date: 2002/11/09 20:30:49;  author: tundra;  state: Exp;  lines: +17 -9
Made sure ".." is always first directory listed regardless of sort order.
----------------------------
revision 1.36
date: 2002/11/09 19:54:29;  author: tundra;  state: Exp;  lines: +46 -14
Single-Click navigation enabled via polling of listbox because
Tkinter cannot reliably catch selection changes.
----------------------------
revision 1.35
date: 2002/11/09 06:20:15;  author: tundra;  state: Exp;  lines: +16 -7
Added -q option to suppress warnings.
----------------------------
revision 1.34
date: 2002/11/09 06:07:28;  author: tundra;  state: Exp;  lines: +19 -12
Added options to set initial window size.
----------------------------
revision 1.33
date: 2002/11/09 05:47:45;  author: tundra;  state: Exp;  lines: +161 -131
Reorganized the UI into a single class/object instance.
Pulled the defaults to top of program so user can edit if they like.
Added horizontal scroll bar.
Set initial window size to something more reasonable.
----------------------------
revision 1.32
date: 2002/11/09 00:31:08;  author: tundra;  state: Exp;  lines: +44 -5
Implemented scrolling listbox.
Added options for setting colors and font parameters.
----------------------------
revision 1.31
date: 2002/11/08 23:39:12;  author: tundra;  state: Exp;  lines: +26 -17
Installed basic Tkinter UI framwork and directory listbox
----------------------------
revision 1.30
date: 2002/11/08 21:07:32;  author: tundra;  state: Exp;  lines: +10 -43
Initial code using Tkinter for GUI
----------------------------
revision 1.24
date: 2002/11/08 20:55:14;  author: tundra;  state: Exp;  lines: +53 -32
Last attempt using 'anygui'
----------------------------
revision 1.23
date: 2002/10/30 23:28:35;  author: tundra;  state: Exp;  lines: +80 -13
Completed directory navigation logic.
----------------------------
revision 1.22
date: 2002/10/30 00:00:23;  author: tundra;  state: Exp;  lines: +10 -5
Cleanup some leftover debug print statements.  Mofified the configuration
file handling to store both the command and full name using the command
key as the index.
----------------------------
revision 1.21
date: 2002/10/29 23:12:31;  author: tundra;  state: Exp;  lines: +114 -19
Implemented support for finding, reading, and parsing a
configuration file which contains the user's desired
command definitions.
----------------------------
revision 1.2
date: 2002/10/29 00:09:22;  author: tundra;  state: Exp;  lines: +147 -49
Basic skeleton of code with argument checking and option handling.
----------------------------
revision 1.1
date: 2002/10/28 23:03:23;  author: tundra;  state: Exp;
Initial revision
----------------------------
=============================================================================
