diff --git a/twander.py b/twander.py index 42c16d7..3f9b245 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.36 2002/12/31 01:09:12 tundra Exp $" +RCSID = "$Id: twander.py,v 2.37 2002/12/31 01:17:56 tundra Exp $" VERSION = RCSID.split()[2] @@ -1032,8 +1032,11 @@ if event.state & ControlMask: return - # Popup a menu of available commands near the current mouse pointer - UI.CmdBtn.menu.tk_popup(UI.DirList.winfo_pointerx(), UI.DirList.winfo_pointery()) + # Popup a menu of available commands near the current mouse pointer, + # but only if there are commands defined. + + if UI.CmdBtn.menu.index(END): + UI.CmdBtn.menu.tk_popup(UI.DirList.winfo_pointerx(), UI.DirList.winfo_pointery()) # End of 'ContextMenu()'