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.

Title: Idle: some modal dialogs maximize, don't minimize
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.9, Python 3.8, Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: louielu, markroseman, prince09cs, roger.serwy, sanad, taleinat, terry.reedy, viv1
Priority: normal Keywords: patch

Created on 2015-04-23 17:48 by prince09cs, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13869 taleinat, 2019-06-07 00:01
Messages (10)
msg241871 - (view) Author: Prince (prince09cs) Date: 2015-04-23 17:48
I tried to search for a keyword in idle with help of search dialog box, it worked just fine however when I tried to minimize the box it didn't minimize. All other options like expand and close works as expected.

Steps To Reproduce:
1) open idle
2) press cntrl+f to open search dialog box.
3) press minimize button on the box.

expected - It should minimize
Actual - it doesn't
Tested on windows7-64bit
msg241980 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-04-24 20:12
I changed the title to generalize this issue.

The modal Options => Configure IDLE box does not have minimize or maximize buttons and cannot be resized.  (Ditto for About Idle.) This is typical of Windows dialogs, even though horizontal expansion would often be useful for path displays.  The modal Options => Configure Extensions box also does not have the button but *can* be resized. (Ditto for some other help displays.)

The Find, Find in Files, and Replace dialogs are also modal, though perhaps they should not be.  They have the buttons and can be maximized (which is useless).  They cannot be minimized because focus would have to shift to another window of the application, which would contradict being modal.  They can be resized, and this is occasionally needed and should stay.  One fix would be to make all these dialogs like Configure Extension -- no min, max buttons but resizable.

For reference, (but not part of this issue) the File menu dialogs that I checked are non-modal.  The Idle-specific Class and Path Browsers have min/max buttons and appear on the taskbar.  (Ditto for Debugger and IDLE Help.) The tk-defined Open and Save dialogs do not have the buttons and do not appear on the taskbar.  I believe the find group are the only modal dialogs with min and max buttons.
msg247533 - (view) Author: Vivek (viv1) * Date: 2015-07-28 17:47
I am trying to remove both min and max buttons while keeping the dialog box both modal and extensible. I added `top.attributes(-toolwindow,-1)` to which does what is required, but with side effects,i.e.,it changes the look of the border and close button on Search dialogs. Any suggestions?

PS: I am learning how to contribute and would like to work on this issue.
msg247541 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-07-28 20:04
We need to know whether this issue is specific to Windows or not.  (I requested a Linux user to check.)  We also need to know why the config dialogs do not have the min and max boxes.  Neither '.attributes' and '-toollevel' appear in a grep of idlelib.

The changes I see are squared corners, narrower title bar, much narrower [X] button, Idle icon omitted, and dialog omitted from taskbar. None of these apply to the config dialogs.  (I do not see a change in the close button, but this does not matter.)

Vivek, welcome to the tracker (2nd comment, I see).  When reporting a patch in a comment box, please cut and paste the actual added code, and on a separate line. You omitted the needed quotes when retyping ;-). Unlike StackOverflow, for instance, these comment boxes do not recognize markup such as ``.
msg247562 - (view) Author: sanad (sanad) * Date: 2015-07-29 08:15
I have tested all the cases mentioned in the comments on Linux Mint 17.1 Rebecca 64 bit with Python 3.6.0a0 build version.

1.I reproduced the issue mentioned in #msg241871 the minimize button works perfectly fine and the search dialog box does minimizes(Which implies that this is a windows only issue).The maximize/expand also works and the dialog window can be resized both horizontally and vertically.

2.Similarly, 'Find in Files' and 'Replace' dialogs can also be resized and have both maximize and minimize buttons which too work fine.

3.The 'Options' => 'Configure Extensions' dialog does not have the maximize/minimize buttons but it can be resized.

4.The 'Options' => 'Configure IDLE' dialog can neither be resized nor does it have maximize/minimize buttons.
msg247564 - (view) Author: Vivek (viv1) * Date: 2015-07-29 11:01
The bug is also not reproducible in my Ubuntu 14.04 64 bit system with python 3.4.But can be reproduced on my Windows7 and Windows8 systems.This seems to be a Windows specific issue.

Terry, thanks for the advice. I will take care next time :).
msg247712 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-07-30 23:44
Another solution to this issue is to not make things modal. See #24760.
msg297147 - (view) Author: Louie Lu (louielu) * Date: 2017-06-28 03:44
The bugs can be reproduce on MacOS, when click the minimize button, the search dialog will be minimize, then pop up to front again. 

The preference dialog have the same behavior on MacOS, but debugger dialog won't.

And, Goto dialog will minimize with IDLE shell disappear, then both pop out again.
msg344852 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-06-06 18:43
Dialogs attached to a particular window should be 'transient' to that window.
It is an oversight that the window search and replace windows are not.
Modal windows, including the current Find in Files might just as well be.  

PR 13869 for #37177 (aimed at a different symption) makes search windows transient, fixing this issue also.

If Find in Files were not modal, then it need not be transient to a particular window, and minimizing could be sensible.  But this is a separate issue.
msg344903 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-06-07 06:56
The search dialog windows are now made transient relative to the editor window.  Among other things, they no longer have minimize/maximize buttons on Windows, resolving this issue.
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68227
2019-06-07 09:14:06terry.reedysetversions: - Python 2.7
2019-06-07 06:56:48taleinatsetstatus: open -> closed

nosy: + taleinat
messages: + msg344903

resolution: fixed
stage: patch review -> resolved
2019-06-07 06:09:51taleinatsetversions: + Python 2.7
2019-06-07 00:01:12taleinatsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13754
2019-06-06 18:43:06terry.reedysetstage: needs patch -> (no value)
messages: + msg344852
versions: + Python 3.8, Python 3.9, - Python 3.6
2017-06-29 23:23:09terry.reedysetassignee: terry.reedy
versions: + Python 3.7, - Python 2.7, Python 3.4, Python 3.5
2017-06-28 03:44:33louielusetnosy: + louielu
messages: + msg297147
2015-08-12 15:48:47markrosemansetnosy: + markroseman
2015-07-30 23:44:03terry.reedysetmessages: + msg247712
2015-07-29 11:01:22viv1setmessages: + msg247564
2015-07-29 08:15:54sanadsetnosy: + sanad
messages: + msg247562
2015-07-28 20:04:02terry.reedysetmessages: + msg247541
versions: + Python 3.6
2015-07-28 17:47:35viv1setnosy: + viv1
messages: + msg247533
2015-04-24 20:12:49terry.reedysettitle: Minimize option doesn't work on Search Dialog box for idle -> Idle: some modal dialogs maximize, don't minimize
stage: needs patch
messages: + msg241980
versions: + Python 2.7, Python 3.5
2015-04-24 08:40:29prince09cssetnosy: + terry.reedy, roger.serwy
2015-04-23 17:56:37prince09cssettype: behavior
2015-04-23 17:48:57prince09cscreate