diff --git a/twander.py b/twander.py index e52be70..c451cf7 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.30 2002/11/08 21:07:32 tundra Exp $" +RCSID = "$Id: twander.py,v 1.31 2002/11/08 23:39:12 tundra Exp $" VERSION = RCSID.split()[2] @@ -124,22 +124,6 @@ #----------------------------------------------------------# -##### -# GUI Related Setup -##### - -class twanderUI: - - def __init__(self, master): - - frame = Frame(master) - frame.pack() - -root = Tk() -GUI = twanderUI(root) -root.mainloop() - - #---------------------------Code Begins Here----------------------------------# @@ -388,4 +372,29 @@ rootdir = os.path.abspath(rootdir) +##### +# GUI Related Setup +##### + +UIroot = Tk() + +SB = Scrollbar(UIroot, orient=VERTICAL) +DirList = Listbox(selectmode=SINGLE, exportselection=0, yscrollcommand=SB.set) + +SB.config(command=DirList.yview) +SB.pack(side=RIGHT, fill=Y) +DirList.pack(side=LEFT, fill=BOTH, expand=1) + +# Initialize the UI directory listing + +for x in BuildDirList(rootdir): + DirList.insert(END, x) + +# Set the window title +UIroot.wm_title(PROGNAME + " " + VERSION + " " + rootdir) + + +# Run the program interface +UIroot.mainloop() +