cpython: 2b841adbae81 (original) (raw)

--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -63,6 +63,50 @@ def _find_module(fullname, path=None): descr = os.path.splitext(filename)[1], None, imp.PY_SOURCE return file, filename, descr + +class HelpDialog(object): +

+

+

+

+

+

+

+ +helpDialog = HelpDialog() # singleton instance + + class EditorWindow(object): from idlelib.Percolator import Percolator from idlelib.ColorDelegator import ColorDelegator @@ -453,8 +497,11 @@ class EditorWindow(object): configDialog.ConfigDialog(self.top,'Settings') def help_dialog(self, event=None):

def python_docs(self, event=None): if sys.platform[:3] == 'win':

--- a/Lib/idlelib/textView.py +++ b/Lib/idlelib/textView.py @@ -9,7 +9,7 @@ class TextViewer(Toplevel): """A simple text viewer dialog for IDLE """

""" @@ -24,8 +24,6 @@ class TextViewer(Toplevel): self.CreateWidgets() self.title(title)

@@ -34,7 +32,11 @@ class TextViewer(Toplevel): self.bind('',self.Ok) #dismiss dialog self.textView.insert(0.0, text) self.textView.config(state=DISABLED)

+

def CreateWidgets(self): frameText = Frame(self, relief=SUNKEN, height=700) @@ -57,10 +59,10 @@ class TextViewer(Toplevel): self.destroy() -def view_text(parent, title, text):

+def view_text(parent, title, text, modal=True):

-def view_file(parent, title, filename, encoding=None): +def view_file(parent, title, filename, encoding=None, modal=True): try: with open(filename, 'r', encoding=encoding) as file: contents = file.read() @@ -70,7 +72,7 @@ def view_file(parent, title, filename, e message='Unable to load file %r .' % filename, parent=parent) else:

if name == 'main': @@ -80,11 +82,15 @@ if name == 'main': filename = './textView.py' text = file(filename, 'r').read() btn1 = Button(root, text='view_text',

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -466,6 +466,9 @@ Core and Builtins Library ------- +- Issue #964437 Make IDLE help window non-modal.