Skip to content

Idle: some modal dialogs maximize, don't minimize #68227

Closed

Description

@prince09cs
BPO 24039
Nosy @terryjreedy, @taleinat, @serwy, @roseman, @mlouielu
PRs
  • bpo-37177: make IDLE's search dialogs transient #13869
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2019-06-07.06:56:48.606>
    created_at = <Date 2015-04-23.17:48:57.686>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7', '3.9']
    title = "Idle: some modal dialogs maximize, don't minimize"
    updated_at = <Date 2019-06-07.09:14:06.536>
    user = 'https://bugs.python.org/prince09cs'

    bugs.python.org fields:

    activity = <Date 2019-06-07.09:14:06.536>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2019-06-07.06:56:48.606>
    closer = 'taleinat'
    components = ['IDLE']
    creation = <Date 2015-04-23.17:48:57.686>
    creator = 'prince09cs'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 24039
    keywords = ['patch']
    message_count = 10.0
    messages = ['241871', '241980', '247533', '247541', '247562', '247564', '247712', '297147', '344852', '344903']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'taleinat', 'roger.serwy', 'markroseman', 'prince09cs', 'viv1', 'sanad', 'louielu']
    pr_nums = ['13869']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24039'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    Activity

    1. prince09cs commented on Apr 23, 2015

      prince09csmannequin
      MannequinAuthor

      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

    2. added
      type-bug
      on Apr 23, 2015
    3. terryjreedy commented on Apr 24, 2015

      @terryjreedy
      Member

      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.

    4. changed the title [-]Minimize option doesn't work on Search Dialog box for idle[/-] [+]Idle: some modal dialogs maximize, don't minimize[/+] on Apr 24, 2015
    5. viv1 commented on Jul 28, 2015

      viv1mannequin
      Mannequin

      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 SearchDialogBase.py(create_widget) 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.

    6. terryjreedy commented on Jul 28, 2015

      @terryjreedy
      Member

      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 ``.

    7. sanad commented on Jul 29, 2015

      sanadmannequin
      Mannequin

      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.

    8. viv1 commented on Jul 29, 2015

      viv1mannequin
      Mannequin

      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 :).

    9. terryjreedy commented on Jul 30, 2015

      @terryjreedy
      Member

      Another solution to this issue is to not make things modal. See bpo-24760.

    10. mlouielu commented on Jun 28, 2017

      mlouielumannequin
      Mannequin

      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.

    11. self-assigned this
      on Jun 29, 2017
    12. terryjreedy commented on Jun 6, 2019

      @terryjreedy
      Member

      Dialogs attached to a particular window should be 'transient' to that window. https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M64
      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 bpo-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.

    13. added
      3.8 (EOL)
      3.9 (EOL)
      on Jun 6, 2019
    14. taleinat commented on Jun 7, 2019

      @taleinat
      Contributor

      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.

    15. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)3.8 (EOL)3.9 (EOL)topic-IDLEtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions