diff --git a/twander.py b/twander.py index f37c2cc..1116e54 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.85 2003/01/30 01:10:03 tundra Exp $" +RCSID = "$Id: twander.py,v 2.86 2003/01/30 23:02:58 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -129,11 +129,17 @@ ##### -# GUI Default Size And Colors +# GUI Defaults ##### -HEIGHT = 25 -WIDTH = 110 +##### +# Initial Size And Postition In Pixels +##### + +HEIGHT = 600 +WIDTH = 800 +STARTX = 0 +STARTY = 0 ##### # Default Colors @@ -200,6 +206,7 @@ AUTOREFRESH = TRUE # Automatically refresh the directory display +CMDSHELL = "[VSHELL]" # Shell definition to use with manual command invocations DEBUGLEVEL = 0 # No debug output MAXDIR = 32 # Maximum number of directories to track MAXDIRBUF = 250 # Maximum size of UI.AllDirs @@ -571,8 +578,6 @@ " -r turn off automatic content refreshing (default: refresh on)", " -t no quoting when substituting Built-In Variables (default: quoting on)", " -v print detailed version information", - " -x width window width (default: 110)", - " -y height window height (default: 25)", ] @@ -1006,8 +1011,8 @@ UI.mBar.config(background=MBARCOL) UI.DirList.config(font=(FNAME, FSZ, FWT), - foreground=FCOLOR, background=BCOLOR, - height=HEIGHT, width=WIDTH) + foreground=FCOLOR, background=BCOLOR) + # Make sure menus conform to max lengths (which may have changed). @@ -1057,6 +1062,9 @@ UI.HelpBtn['menu'] = UI.HelpBtn.menu UI.HelpBtn.config(state=NORMAL) + # Size and position the display + UIroot.geometry("%sx%s+%s+%s" % (WIDTH, HEIGHT, STARTX, STARTY)) + # End of 'SetupGUI()' @@ -1941,7 +1949,12 @@ # Execute command (if any) - Blank entry means do nothing/return if cmd: - ExecuteCommand(cmd, pMANUALCMD, ResolveVars=TRUE, SaveUnresolved=TRUE) + # On Unix systems, prepend the default shell string if it is enabled + mycmd = cmd + if OSNAME == 'posix' and CMDSHELL != '[]': + mycmd = "%s '%s'" % (CMDSHELL, cmd) + + ExecuteCommand(mycmd, pMANUALCMD, ResolveVars=TRUE, SaveUnresolved=TRUE) # Save the command only if Command History is enabled (MAXHIST > 0) # AND one of two conditions exist: @@ -3122,12 +3135,13 @@ UI.OptionsNumeric = {"DEBUGLEVEL":DEBUGLEVEL, "FSZ":FSZ, "MFSZ":MFSZ, "HFSZ":HFSZ, "HEIGHT":HEIGHT, "MAXDIR":MAXDIR, "MAXDIRBUF":MAXDIRBUF, "MAXHIST":MAXHIST, "MAXHISTBUF":MAXHISTBUF, - "MAXNESTING":MAXNESTING, "REFRESHINT":REFRESHINT, "WIDTH":WIDTH} + "MAXNESTING":MAXNESTING, "REFRESHINT":REFRESHINT, "STARTX":STARTX, "STARTY":STARTY, + "WIDTH":WIDTH} UI.OptionsString = {"BCOLOR":BCOLOR, "FCOLOR":FCOLOR, "FNAME":FNAME, "FWT":FWT, # Main Font/Colors "MBCOLOR":MBCOLOR, "MFCOLOR":MFCOLOR, "MFNAME":MFNAME, "MFWT":MFWT, # Menu Font/Colors "HBCOLOR":HBCOLOR, "HFCOLOR":HFCOLOR, "HFNAME":HFNAME, "HFWT":HFWT, # Help Font/Colors - "MBARCOL":MBARCOL, "QUOTECHAR":QUOTECHAR, "STARTDIR":STARTDIR} # Other + "MBARCOL":MBARCOL, "QUOTECHAR":QUOTECHAR, "STARTDIR":STARTDIR, "CMDSHELL":CMDSHELL} # Other # Prepare storage for key bindings UI.KeyBindings = {} @@ -3180,7 +3194,7 @@ OPTIONS = envopt.split() + OPTIONS try: - opts, args = getopt.getopt(OPTIONS, '-c:d:hqrtvx:y:') + opts, args = getopt.getopt(OPTIONS, '-c:d:hqrtv') except getopt.GetoptError: Usage() sys.exit(1)