diff --git a/twander.py b/twander.py index 6c0625d..de7446d 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ # For Updates See: http://www.tundraware.com/Software/twander PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.29 2002/12/19 16:44:47 tundra Exp $" +RCSID = "$Id: twander.py,v 2.30 2002/12/20 06:26:39 tundra Exp $" VERSION = RCSID.split()[2] @@ -826,7 +826,7 @@ # Bind handler for "Last Item" self.DirList.bind(self.KeyBindings["SELEND"], KeySelEnd) - # Scrolling + # Scrolling Keys # Bind Handler for "Move Page Down self.DirList.bind(self.KeyBindings["PGDN"], KeyPageDown) @@ -1047,20 +1047,6 @@ ##### -# Event Handler: Run Command -#### - -def KeyRunCommand(event): - - cmd = askstring(pRUNCMD, pENCMD) - if cmd: - thread.start_new_thread(os.system, (cmd,)) - UI.DirList.focus() - -# End of 'KeyRunCommand()' - - -##### # Event Handler: Toggle Detail View ##### @@ -1226,6 +1212,69 @@ # End of 'KeySelTop()' +#---------------------- Scrolling Keys ---------------------# + + +##### +# Event Handler: Move Down A Page +##### + +def KeyPageDown(event): + UI.DirList.yview_scroll(1, "pages") + UI.DirList.activate("@0,0") + +# End of 'KeyPageDown()' + + +##### +# Event Handler: Move Up A Page +##### + +def KeyPageUp(event): + UI.DirList.yview_scroll(-1, "pages") + UI.DirList.activate("@0,0") + +# End of 'KeyPageUp()' + + +##### +# Event Handler: Move Page Right +##### + +def KeyPageRight(event): + UI.DirList.xview_scroll(1, "pages") + +# End of 'KeyPageRight()' + + +##### +# Event Handler: Move Page Left +##### + +def KeyPageLeft(event): + UI.DirList.xview_scroll(-1, "pages") + +# End of 'KeyPageLeft()' + + +#---------------------- Execute Commands -------------------# + + + +##### +# Event Handler: Run Command +#### + +def KeyRunCommand(event): + + cmd = askstring(pRUNCMD, pENCMD) + if cmd: + thread.start_new_thread(os.system, (cmd,)) + UI.DirList.focus() + +# End of 'KeyRunCommand()' + + ##### # Process Current Selection ##### @@ -1573,48 +1622,6 @@ # End of 'BuildDirList()' -##### -# Event Handler: Move Down A Page -##### - -def KeyPageDown(event): - UI.DirList.yview_scroll(1, "pages") - UI.DirList.activate("@0,0") - -# End of 'KeyPageDown()' - - -##### -# Event Handler: Move Up A Page -##### - -def KeyPageUp(event): - UI.DirList.yview_scroll(-1, "pages") - UI.DirList.activate("@0,0") - -# End of 'KeyPageUp()' - - -##### -# Event Handler: Move Page Right -##### - -def KeyPageRight(event): - UI.DirList.xview_scroll(1, "pages") - -# End of 'KeyPageRight()' - - -##### -# Event Handler: Move Page Left -##### - -def KeyPageLeft(event): - UI.DirList.xview_scroll(-1, "pages") - -# End of 'KeyPageLeft()' - - #-------------- Handler Utility Functions -----------------#