[issue1207589] Right Click Context Menu
Nashev
report at bugs.python.org
Thu Jan 10 13:31:45 CET 2008
Nashev added the comment:
1) in file EditorWindow.py 2 editings:
a) remove selection-killer command on popup
def right_menu_event(self, event):
-- self.text.tag_remove("sel", "1.0", "end")
b) add ability to make separators in popup menu
def make_rmenu(self):
rmenu = Menu(self.text, tearoff=0)
for label, eventname in self.rmenu_specs:
++ if label != "-":
def command(text=self.text, eventname=eventname):
text.event_generate(eventname)
rmenu.add_command(label=label, command=command)
++ else:
++ rmenu.add_separator()
self.rmenu = rmenu
2) in PyShell.py extend rmenu_specs
rmenu_specs = [
++ ("Cut", "<<Cut>>"),
++ ("Copy", "<<Copy>>"),
++ ("Paste", "<<Paste>>"),
++ ("-", ""),
("Set Breakpoint", "<<set-breakpoint-here>>"),
("Clear Breakpoint", "<<clear-breakpoint-here>>")
]
done...
And now I can't find easy way to next two desired features:
1) disable cut/copy commands in case no selection (but it is not
exists in main menu too)
2) display assigned hot keys in popup menu
----------
nosy: +Nashev
_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1207589>
_____________________________________
More information about the Python-bugs-list
mailing list