cpython: 66643fcf6ee9 (original) (raw)

Mercurial > cpython

changeset 80173:66643fcf6ee9 3.2

Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu Patch by Todd Rovito. [#1207589]

Andrew Svetlov andrew.svetlov@gmail.com
date Thu, 01 Nov 2012 22:41:19 +0200
parents fa7311caa203
children 3f3b72ab9d65 cf62fbf2171a
files Doc/library/idle.rst Lib/idlelib/EditorWindow.py Lib/idlelib/OutputWindow.py Lib/idlelib/PyShell.py Lib/idlelib/help.txt Misc/NEWS
diffstat 6 files changed, 98 insertions(+), 13 deletions(-)[+] [-] Doc/library/idle.rst 21 Lib/idlelib/EditorWindow.py 43 Lib/idlelib/OutputWindow.py 6 Lib/idlelib/PyShell.py 23 Lib/idlelib/help.txt 15 Misc/NEWS 3

line wrap: on

line diff

--- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -183,6 +183,15 @@ Edit context menu

+Copy

+Paste

Set Breakpoint Sets a breakpoint. Breakpoints are only enabled when the debugger is open. @@ -190,6 +199,9 @@ Clear Breakpoint Clears the breakpoint on that line. .. index::

+Copy

+Paste

Go to file/line Same as in Debug menu.

--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -464,7 +464,6 @@ class EditorWindow(object): rmenu = None def right_menu_event(self, event):

@@ -473,23 +472,53 @@ class EditorWindow(object): iswin = sys.platform[:3] == 'win' if iswin: self.text.config(cursor="arrow") +

+ + rmenu.tk_popup(event.x_root, event.y_root) if iswin: self.text.config(cursor="ibeam") rmenu_specs = [

+

+

+ def about_dialog(self, event=None): aboutDialog.AboutDialog(self.top,'About IDLE')

--- a/Lib/idlelib/OutputWindow.py +++ b/Lib/idlelib/OutputWindow.py @@ -52,7 +52,11 @@ class OutputWindow(EditorWindow): # Our own right-button menu rmenu_specs = [

--- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -117,8 +117,14 @@ class PyShellEditorWindow(EditorWindow): old_hook() self.io.set_filename_change_hook(filename_changed_hook)

def set_breakpoint(self, lineno): text = self.text @@ -1240,6 +1246,19 @@ class PyShell(OutputWindow): raise KeyboardInterrupt return count

+

+ class PseudoFile(object): def init(self, shell, tags, encoding=None):

--- a/Lib/idlelib/help.txt +++ b/Lib/idlelib/help.txt @@ -120,14 +120,23 @@ Help Menu: --- (Additional Help Sources may be added here) -Edit context menu (Right-click / Control-click in Edit window): +Edit context menu (Right-click / Control-click on OS X in Edit window): + Cut -- Copy a selection into system-wide clipboard,

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -143,6 +143,9 @@ Core and Builtins Library ------- +- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu