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, configdialog, General tab: re-arrange, test user entries
Type: behavior Stage: patch review
Components: IDLE Versions: Python 3.7, Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, louielu, terry.reedy, wohlganger
Priority: normal Keywords:

Created on 2017-07-26 20:26 by terry.reedy, last changed 2022-04-11 14:58 by admin.

Pull Requests
URL Status Linked Edit
PR 3239 merged terry.reedy, 2017-08-30 04:05
PR 3240 merged terry.reedy, 2017-08-30 05:00
Messages (11)
msg299262 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-26 20:26
Fix bugs and enhance the page.

The three little frames are too much, and in the wrong order. Proposal:

Window to open at startup:   O Shell     O Editor
Initial size:                Width [_]   Height []
When run code in editor: ... (see bpo-19042 for possible change)

This compression will make room for former extension options (#27099). 

Tk variable startup_editor should be BooleanVar.

Size vars should be IntVars.  Accepting *and saving* 'nonsense' as a size is a bug (idlfConf issues a warning when reading).  Sizes should be at least 1.  Changing to spinbox would ensure this.  Or validate entry on each char (only accept ascii digits).

For helplist, Up and Down keys move selection indicator but *do not move the internal selection*.  Delete key deletes the internal selection, not the item highlighted.  Fix should be similar to fix for fontlist.
msg299263 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-26 20:50
In comment for 31003, Cheryl pointed to

That prompted me to grep for 'validatecommand'.  "validatecommand=is_int" is used on the extension tab.  The function is at the end of the file. We just need to modify to is_pos_int and use it the same way.

is_int allows blanks. That should mean to accept the default, whatever is it.  A blank should be turned back to the default.  is_int checks that int(entry) does not raise value error.  I believe int now accept non-ascii digits.  We should check that that such pass through configparser okay. (I believe they should, as I believe it just calls int on the string read.)  Or only store the ascii version.  I suspect that tk wants ascii digits, 

The confusion of converting between strings and non-string objects is exacerbated by tk wanting strings (which it converts to C byte encodings) and tkinter doing automatic conversions.
msg299264 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-26 20:55
In 31003, Cheryl pointed out that loading helplist could use enumerate.
msg299265 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-26 21:41
Common code in tests: test_helplist_item_actions functions have common code that could be factored out into a non-test_ method (especially if settings not needed for one of them is added, like setting anchor).

The listbox simulated click code in test_source_selected is copied from FontTest.test_fontlist_mouse.  Make global click_listbox(item-to-add).
msg299606 - (view) Author: Louie Lu (louielu) * Date: 2017-08-01 06:34
This may relate to #31050, I would like to propose to change the name `GenTab` to `GeneralTab`. `GenTab` is ambiguous to `GenerateTab` in the first glimpse. How do you think, Terry and Cheryl ?
msg299631 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-01 19:01
Given that I picked the page names without discussion, as part of quickly writing and merging the switch to Notebook (PR (to unblock the FontPage and GenPage conversion), I considered them subject to possible revision.  I expect to review both the internal names and the tab labels *after* adding options from the 'extensions'.

I have considered calling the class MainPage, as it governs the options in config-main other than the font, highlight, and keys choices.  (As noted before, the tab space setting would fit better on this page.)

Given that you have seen and used the dialog and its five tabs, is 'genpage' in the sequence 'fontpage, highpage, keyspage, genpage, extpage', which occurs 3 times in create_widgets(), really ambiguous to *you*?  Or do you just not like it? Would you prefer MainPage?
msg299683 - (view) Author: Louie Lu (louielu) * Date: 2017-08-03 05:46
I don't like the name "gentab". There is a "genobject.c" in source code but stand for "generator object". In the code, both docstring and the name didn't mention "General", it only mention at `note.add(self.genpage, 'General')`. That is why I got ambiguous when I look back to the code. 

Or maybe it just because I'm not familiar for the abbr., I take a search and found that in US Army that General abbr. is Gen.


I'm a +0 of MainPage, since in the page, it used for general setting. I'm not sure about this changed.
msg301006 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-30 04:12
It does not matter for users what we call the class.  MainPage reads a bit smoother than GenPage.  I have also considered renaming HighPage as ColorPage and relabeling the tab 'Colors'.

The above covers at least 2 issues.  #31306 covers changing Vars and testing user entries.

PR3239 Splits the General tab into 3 sections: (shell and editor) window preferences, editor preferences, and the help sources.  Charles: the autocomple and parenmatch options go in window preferences, as they apply to Shell also.  The reformat and context options are editor only and go in that section.
msg301007 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-30 04:14
'autocomplete and parenmatch' (in that order).  Code context should be last in the editor section.
msg301009 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-30 04:59
New changeset 390eadd6d041611511dc761bc7d4581530dbd287 by Terry Jan Reedy in branch 'master':
bpo-31051:  Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (#3239)
msg301013 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-30 06:47
New changeset 87c50245b1ba21469cc2e4e84cd5e5cd54ff954d by Terry Jan Reedy in branch '3.6':
[3.6] bpo-31051:  Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (GH-3239) (#3240)
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75234
2017-08-30 06:47:29terry.reedysetmessages: + msg301013
2017-08-30 05:00:29terry.reedysetpull_requests: + pull_request3283
2017-08-30 04:59:16terry.reedysetmessages: + msg301009
2017-08-30 04:14:38terry.reedysetmessages: + msg301007
2017-08-30 04:12:53terry.reedysetstage: needs patch -> patch review
2017-08-30 04:12:44terry.reedysetnosy: + wohlganger
messages: + msg301006
2017-08-30 04:05:56terry.reedysetpull_requests: + pull_request3282
2017-08-03 05:46:17louielusetmessages: + msg299683
2017-08-01 19:01:33terry.reedysetmessages: + msg299631
2017-08-01 06:34:09louielusetmessages: + msg299606
2017-07-26 21:41:32terry.reedysetmessages: + msg299265
2017-07-26 20:55:28terry.reedysetmessages: + msg299264
2017-07-26 20:50:58terry.reedysetnosy: + louielu, cheryl.sabella
messages: + msg299263
2017-07-26 20:26:38terry.reedycreate