diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-05-30 01:59:42 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-05-30 01:59:42 -0400 |
commit | 5a0c278ad4a8c09fd725fe255a0ba210daca5ffb (patch) | |
tree | 202fa2bf40eafbed1affb627215bb9a4782fad84 /Lib/idlelib/editor.py | |
parent | dd780e442343cd8eda7b7ece16288f07eece6b52 (diff) | |
download | cpython-git-5a0c278ad4a8c09fd725fe255a0ba210daca5ffb.tar.gz |
Issue #27156: Remove obsolete code not used by IDLE.
help.txt, replaced by help.html, is out-of-date and should not be used.
Its dedicated viewer has be replaced by the html viewer in help.py.
'import idlever; I = idlever.IDLE_VERSION' is the same as
'import sys; I = version[:version.index(' ')]'
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r-- | Lib/idlelib/editor.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index d7d1d16502..b214c6ab9b 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -40,54 +40,6 @@ def _sphinx_version(): return release -class HelpDialog(object): - - def __init__(self): - self.parent = None # parent of help window - self.dlg = None # the help window iteself - - def display(self, parent, near=None): - """ Display the help dialog. - - parent - parent widget for the help window - - near - a Toplevel widget (e.g. EditorWindow or PyShell) - to use as a reference for placing the help window - """ - import warnings as w - w.warn("EditorWindow.HelpDialog is no longer used by Idle.\n" - "It will be removed in 3.6 or later.\n" - "It has been replaced by private help.HelpWindow\n", - DeprecationWarning, stacklevel=2) - if self.dlg is None: - self.show_dialog(parent) - if near: - self.nearwindow(near) - - def show_dialog(self, parent): - self.parent = parent - fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') - self.dlg = dlg = textview.view_file(parent,'Help',fn, modal=False) - dlg.bind('<Destroy>', self.destroy, '+') - - def nearwindow(self, near): - # Place the help dialog near the window specified by parent. - # Note - this may not reposition the window in Metacity - # if "/apps/metacity/general/disable_workarounds" is enabled - dlg = self.dlg - geom = (near.winfo_rootx() + 10, near.winfo_rooty() + 10) - dlg.withdraw() - dlg.geometry("=+%d+%d" % geom) - dlg.deiconify() - dlg.lift() - - def destroy(self, ev=None): - self.dlg = None - self.parent = None - -helpDialog = HelpDialog() # singleton instance, no longer used - - class EditorWindow(object): from idlelib.percolator import Percolator from idlelib.colorizer import ColorDelegator, color_config |