diff --git a/twander.py b/twander.py index aada2cb..e52be70 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.24 2002/11/08 20:55:14 tundra Exp $" +RCSID = "$Id: twander.py,v 1.30 2002/11/08 21:07:32 tundra Exp $" VERSION = RCSID.split()[2] @@ -21,7 +21,7 @@ # Imports # #----------------------------------------------------------# -import anygui as gui +from Tkinter import * import getopt import os import sys @@ -128,25 +128,16 @@ # GUI Related Setup ##### -MainApp = gui.Application() -MainWin = gui.Window(height=300, - width=500, - ) +class twanderUI: -DirList = gui.ListBox() + def __init__(self, master): -MainWin.add(DirList, - hstretch=1, - vstretch=1, - top=1, - bottom=1, - left= 1, - right=1 - ) + frame = Frame(master) + frame.pack() - - -MainApp.add(MainWin) +root = Tk() +GUI = twanderUI(root) +root.mainloop() @@ -163,6 +154,7 @@ #----------------------------------------------------------# + ##### # Event Handler For Directory Listing ListBox ##### @@ -211,17 +203,6 @@ # End of 'DirList_Handler()' -##### -# Main Message Handler -##### - -def Message_Handler(**kwargs): - print kwargs - -# End of 'Message_Handler()' - - - #----------------------------------------------------------# # Supporting Function Definitions # #----------------------------------------------------------# @@ -406,19 +387,5 @@ # Canonicalize the rootdir rootdir = os.path.abspath(rootdir) -# Initialize ListBox with info for starting directory -DirList.items = BuildDirList(rootdir) -# Initialize the title for the main window -MainWin.set(title= PROGNAME + " " + VERSION + " " + rootdir) - - -# Link to message monitoring handler -gui.link(gui.any, gui.any, Message_Handler) - -# Link to ListBox handler -gui.link(DirList, DirList_Handler) - - -MainApp.run()