diff --git a/twander.py b/twander.py index 1a61eee..7d5d12b 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.53 2002/11/14 21:48:24 tundra Exp $" +RCSID = "$Id: twander.py,v 1.54 2002/11/14 23:26:39 tundra Exp $" VERSION = RCSID.split()[2] @@ -13,6 +13,7 @@ #----------------------------------------------------------# from Tkinter import * +from tkMessageBox import * import getopt import os import sys @@ -29,6 +30,7 @@ # Key Assignments ##### +CHANGEDIR = '' GOHOME = '' GOPREV = '' GOSTART = '' @@ -184,7 +186,8 @@ ##### def ErrMsg(emsg): - print PROGNAME + " " + VERSION + " " + eERROR + ": " + emsg + + showerror(PROGNAME + " " + VERSION + " " + eERROR, eERROR + ": " + emsg) # End of 'ErrMsg()' @@ -195,7 +198,7 @@ def WrnMsg(wmsg): if WARN: - print PROGNAME + " " + VERSION + " " + wWARN + ": " + wmsg + showwarning(PROGNAME + " " + VERSION + " " + wWARN, wWARN + ": " + wmsg) # End of 'WrnMsg()' @@ -333,9 +336,10 @@ # Bind the relevant root window handlers - # Set up keystroke handler for application - # These will be checked against the command - # key definitions in the configuration file + # Bind handler for "Change Directory" + root.bind(CHANGEDIR, ChangeDir) + + # Bind handler for individual keystrokes root.bind(KEYPRESS, KeystrokeHandler) # Bind handler for "Quit Program" @@ -376,7 +380,7 @@ def poll(self): RefreshDirList() - self.DirList.after(500, self.poll) + self.DirList.after(250, self.poll) # End of method 'twanderUI.poll()' @@ -598,6 +602,17 @@ ##### +# Event Handler: Change Directory +#### + +def ChangeDir(event): + + pass + +# End of 'ChangeDir()' + + +##### # Event Handler: Goto $HOME ##### @@ -770,7 +785,7 @@ ParseConfFile() # Canonicalize UI.rootdir -UI.rootdir = os.path.abspath(UI.rootdir) + PSEP +UI.rootdir = os.path.abspath(UI.rootdir) # Initialize the UI directory listing LoadDirList(UI.rootdir)