This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2004年06月01日 18:05 by doko, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| help_nonmodal.diff | gpolo, 2008年03月22日 21:35 | review | ||
| help_nonmodal_updated.patch | roger.serwy, 2012年02月04日 19:28 | review | ||
| help_nonmodal_updated2.patch | roger.serwy, 2012年02月04日 22:39 | review | ||
| help_nonmodal_revision.patch | roger.serwy, 2012年02月05日 04:24 | review | ||
| Messages (16) | |||
|---|---|---|---|
| msg54173 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2004年06月01日 18:05 | |
[forwarded from http://bugs.debian.org/252130] the idle online help is unfortunately modal so that one cannot have the help window open and read it, and at the same time work in idle. One must close the help window before continuing in idle which is a nuisance. |
|||
| msg54174 - (view) | Author: Kurt B. Kaiser (kbk) * (Python committer) | Date: 2004年06月04日 05:19 | |
Logged In: YES user_id=149084 Making this an RFE. If you have time to work up a patch, that would be a big help. |
|||
| msg54175 - (view) | Author: Kurt B. Kaiser (kbk) * (Python committer) | Date: 2004年06月17日 23:58 | |
Logged In: YES user_id=149084 Raymond, I'm not planning on working on this now. Please don't assign it to me again. |
|||
| msg64340 - (view) | Author: Guilherme Polo (gpolo) * (Python committer) | Date: 2008年03月22日 21:35 | |
Hi, This patch makes Help dialog executes as nonmodal. I added a new button at textView.py to demonstrate the behavior, also, I created a decorator called _singledialog at EditorWindow so just one Help window executes at a time, trying to start a new brings the current one to the front. I hope this issue is not totally dead, so someone could review and possible apply. |
|||
| msg122631 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月28日 05:18 | |
Making the help window non-modal sounds like a great change to me. |
|||
| msg151425 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年01月17日 02:46 | |
I agree that modal is a nuisance. Another problem with the help text window is that, on my system, it opens too narrow -- about 2/3rds the width of a shell or edit window. So many line are wrapped. Is this easy to fix and include with this patch, or does it need a new issue? This patch fails to apply to 2.7 or 3.2: (t)hg messages are: applying F:\Python\dev\help_nonmodal.diff unable to find 'idlelib/textView.py' for patching patching file idlelib/textView.py 6 out of 6 hunks FAILED -- saving rejects to file idlelib/textView.py.rej abort: patch failed to apply I redownloaded and tried again with same result. |
|||
| msg152641 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年02月04日 19:28 | |
Attached is an updated version of Guilherme's patch against 3.3a0. It does make the help window non-modal. |
|||
| msg152646 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2012年02月04日 22:16 | |
Thanks, Roger. I did a quick smoke test of the patch on OS X 10.7 with Cocoa Tk. I didn't see any obvious problems. Of course, it needs to be tested on Windows and with X11 on a Unix platform. Note, that there are some spurious spaces at a few ends-of-lines. The main repositories on hg.python.org have whitespace prehooks that check for and reject patches with extra whitespace. There's a script (reindent.py) included in Tools/scripts that will check for this and other problems. http://docs.python.org/devguide/committing.html |
|||
| msg152647 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年02月04日 22:39 | |
I ran reindent and resubmitted the patch. The patch works fine on Ubuntu 11.04. One very subtle design issue with the patch is that the help window is tied to the calling EditorWindow instance. If the editor (or shell) closes, so does the help window, even if other editors are open. |
|||
| msg152651 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年02月05日 01:06 | |
Download, tested on W7, 3.2.2. Started help, brought to front, stopped, restarted, in both shell and edit window and all fine *except* when I closed edit window with help attached, which closes help also, and tried to open help in shell, idle 'silently' crashes. Reproduced same after restart idle. If I reopen an edit window, and reopen help from an edit window, it works ok. So the side-effect close seems to leave something behind that is a problem for reopening from shell but not from another edit window. I am also still curious why window opens too narrow and if that can be fixed. |
|||
| msg152659 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年02月05日 04:24 | |
Attached is a reworked patch to handle the nonmodal help dialog. It replaces the decorator _singledialog with a call to a singleton HelpDialog class. The class creates the textView widget using as its parent the root Tk window instance instead of the EditorWindow's Toplevel. Any EditorWindow instance calling "help_dialog" will cause the existing help dialog to be repositioned on top of it. |
|||
| msg152663 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年02月05日 07:04 | |
I retried and get same behavior: help closes with closing of edit window and trying to reopen from shell closes idle with about 2 second delay. Does this + if self.root: + parent = self.root + else: + parent = self.top really do what you claimed? (always attach to root rather than toplevel)? |
|||
| msg152695 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年02月05日 16:35 | |
Those four lines are present just in case self.root is not initialized. Even if you short-circuit the behavior and set parent=self.top, the patch still works, only that closing the calling EditorWindow instance also closes the help dialog. I tested the patch against 3.3a0 on Ubuntu and 3.2.2 on Vista and it does attach to root, not self.top. It sounds like remnants of "_singledialog" are present in EditorWindow.py. Did you back out of the previous patch before applying help_nonmodal_revision.patch? |
|||
| msg152704 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年02月05日 20:25 | |
New changeset 5452c881bd2d by Terry Jan Reedy in branch '2.7': Issue 964437 Make IDLE help window non-modal. http://hg.python.org/cpython/rev/5452c881bd2d New changeset a949956a80cc by Terry Jan Reedy in branch '3.2': Issue 964437 Make IDLE help window non-modal. http://hg.python.org/cpython/rev/a949956a80cc New changeset 2b841adbae81 by Terry Jan Reedy in branch 'default': Merge with 3.2 #964437 http://hg.python.org/cpython/rev/2b841adbae81 |
|||
| msg152705 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年02月05日 20:33 | |
I was sure I had reverted, but did again, redownloaded, applied, and tested, and all well, so committed and pushed. 2.7 required hand-patching of ', modal' for chunk 5 due to 3rd argument being 'textFile.read()' instead of 'contents'. I presume I got it right, though could not test. |
|||
| msg152708 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年02月05日 20:48 | |
I pulled the latest repo with the patch for 2.7. It works. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:04 | admin | set | github: 40321 |
| 2012年02月05日 20:48:44 | roger.serwy | set | messages: + msg152708 |
| 2012年02月05日 20:33:49 | terry.reedy | set | status: open -> closed versions: + Python 2.7, Python 3.2 messages: + msg152705 resolution: fixed stage: patch review -> resolved |
| 2012年02月05日 20:25:58 | python-dev | set | nosy:
+ python-dev messages: + msg152704 |
| 2012年02月05日 16:35:26 | roger.serwy | set | messages: + msg152695 |
| 2012年02月05日 07:04:51 | terry.reedy | set | messages: + msg152663 |
| 2012年02月05日 04:24:01 | roger.serwy | set | files:
+ help_nonmodal_revision.patch messages: + msg152659 |
| 2012年02月05日 01:06:52 | terry.reedy | set | messages: + msg152651 |
| 2012年02月04日 22:39:48 | roger.serwy | set | files:
+ help_nonmodal_updated2.patch messages: + msg152647 |
| 2012年02月04日 22:16:51 | ned.deily | set | nosy:
+ ned.deily messages: + msg152646 |
| 2012年02月04日 19:28:42 | roger.serwy | set | files:
+ help_nonmodal_updated.patch messages: + msg152641 |
| 2012年01月17日 02:46:24 | terry.reedy | set | priority: low -> normal nosy: + roger.serwy messages: + msg151425 |
| 2011年11月15日 19:41:49 | ezio.melotti | set | nosy:
+ terry.reedy stage: patch review versions: + Python 3.3, - Python 3.2 |
| 2010年11月28日 05:18:39 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg122631 versions: + Python 3.2 |
| 2008年03月22日 21:35:53 | gpolo | set | files:
+ help_nonmodal.diff keywords: + patch messages: + msg64340 nosy: + gpolo |
| 2004年06月01日 18:05:03 | doko | create | |