]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 27 Jan 2022 03:41:13 +0000 (19:41 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 03:41:13 +0000 (19:41 -0800)
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
(cherry picked from commit fcde0bc10ddd836b62d0a8e893d80b8c55e0ba3f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc/library/idle.rst
Lib/idlelib/help.html
Lib/idlelib/mainmenu.py
Misc/NEWS.d/next/IDLE/2022-01-26-19-33-55.bpo-45296.LzZKdU.rst [new file with mode: 0644]

index 4fa4f1e5d30b99c9b64e71f99abe89f6f030aa62..b8febb9a5b6213dc1174d4066c6e1436e0d18542 100644 (file)
@@ -96,11 +96,13 @@ Save Copy As...
 Print Window
    Print the current window to the default printer.
 
-Close
-   Close the current window (ask to save if unsaved).
+Close Window
+   Close the current window (if an unsaved editor, ask to save; if an unsaved
+   Shell, ask to quit execution).  Calling ``exit()`` or ``close()`` in the Shell
+   window also closes Shell.  If this is the only window, also exit IDLE.
 
-Exit
-   Close all windows and quit IDLE (ask to save unsaved windows).
+Exit IDLE
+   Close all windows and quit IDLE (ask to save unsaved edit windows).
 
 Edit menu (Shell and Editor)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index edc539cd62875a09f1b1d63b58860ea20772358c..d48622dbd17dab1895f18061336e972f0802fd17 100644 (file)
@@ -5,7 +5,7 @@
   <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>IDLE &#8212; Python 3.11.0a0 documentation</title>
+    <title>IDLE &#8212; Python 3.11.0a4 documentation</title>
     <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
@@ -18,7 +18,7 @@
     <script src="../_static/sidebar.js"></script>
 
     <link rel="search" type="application/opensearchdescription+xml"
-          title="Search within Python 3.11.0a0 documentation"
+          title="Search within Python 3.11.0a4 documentation"
           href="../_static/opensearch.xml"/>
     <link rel="author" title="About these documents" href="../about.html" />
     <link rel="index" title="Index" href="../genindex.html" />
@@ -71,7 +71,7 @@
 
 
     <li id="cpython-language-and-version">
-      <a href="../index.html">3.11.0a0 Documentation</a> &#187;
+      <a href="../index.html">3.11.0a4 Documentation</a> &#187;
     </li>
 
           <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
@@ -163,9 +163,11 @@ file.</p>
 </dd>
 <dt>Print Window</dt><dd><p>Print the current window to the default printer.</p>
 </dd>
-<dt>Close</dt><dd><p>Close the current window (ask to save if unsaved).</p>
+<dt>Close Window</dt><dd><p>Close the current window (if an unsaved editor, ask to save; if an unsaved
+Shell, ask to quit execution).  Calling <code class="docutils literal notranslate"><span class="pre">exit()</span></code> or <code class="docutils literal notranslate"><span class="pre">close()</span></code> in the Shell
+window also closes Shell.  If this is the only window, also exit IDLE.</p>
 </dd>
-<dt>Exit</dt><dd><p>Close all windows and quit IDLE (ask to save unsaved windows).</p>
+<dt>Exit IDLE</dt><dd><p>Close all windows and quit IDLE (ask to save unsaved edit windows).</p>
 </dd>
 </dl>
 </div>
@@ -971,7 +973,7 @@ also used for testing.</p>
 
 
     <li id="cpython-language-and-version">
-      <a href="../index.html">3.11.0a0 Documentation</a> &#187;
+      <a href="../index.html">3.11.0a4 Documentation</a> &#187;
     </li>
 
           <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
@@ -995,7 +997,7 @@ also used for testing.</p>
       </ul>
     </div>
     <div class="footer">
-    &copy; <a href="../copyright.html">Copyright</a> 2001-2021, Python Software Foundation.
+    &copy; <a href="../copyright.html">Copyright</a> 2001-2022, Python Software Foundation.
     <br />
 
     The Python Software Foundation is a non-profit corporation.
@@ -1003,8 +1005,8 @@ also used for testing.</p>
 <br />
     <br />
 
-    Last updated on Sep 06, 2021.
-    <a href="https://docs.python.org/3/bugs.html">Found a bug</a>?
+    Last updated on Jan 26, 2022.
+    <a href="/bugs.html">Found a bug</a>?
     <br />
 
     Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
index 74edce234838292859c4e5e17e5ac0f428b7dffd..a1b169176cba92fb18055a994d060642a2f16a88 100644 (file)
@@ -34,8 +34,8 @@ menudefs = [
    None,
    ('Prin_t Window', '<<print-window>>'),
    None,
-   ('_Close', '<<close-window>>'),
-   ('E_xit', '<<close-all-windows>>'),
+   ('_Close Window', '<<close-window>>'),
+   ('E_xit IDLE', '<<close-all-windows>>'),
    ]),
 
  ('edit', [
diff --git a/Misc/NEWS.d/next/IDLE/2022-01-26-19-33-55.bpo-45296.LzZKdU.rst b/Misc/NEWS.d/next/IDLE/2022-01-26-19-33-55.bpo-45296.LzZKdU.rst
new file mode 100644 (file)
index 0000000..a5b0f8b
--- /dev/null
@@ -0,0 +1,4 @@
+Clarify close, quit, and exit in IDLE.  In the File menu, 'Close' and 'Exit'
+are now 'Close Window' (the current one) and 'Exit' is now 'Exit IDLE'
+(by closing all windows).  In Shell, 'quit()' and 'exit()' mean 'close Shell'.
+If there are no other windows, this also exits IDLE.