Skip to content

Conversation

@csabella
Copy link
Contributor

@csabella csabella commented Jul 11, 2017

First set of commits for converting constants to string literals.

https://bugs.python.org/issue30781

@mention-bot
Copy link

@csabella, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terryjreedy, @kbkaiser and @mlouielu to be potential reviewers.

@mlouielu
Copy link
Contributor

Maybe I'm not on the date, does this a new policy to changed tkinter constant to string?

@csabella
Copy link
Contributor Author

On the last file that was converted to use ttk widgets, I also changed the constants to literal strings at the same time because Terry prefers the literal strings. I was applying the same steps here.

@csabella csabella force-pushed the bpo30781 branch 2 times, most recently from c008c06 to 3ed0cc5 Compare July 11, 2017 23:40
@csabella
Copy link
Contributor Author

csabella commented Jul 11, 2017

The latest commit converts to ttk widgets. Some comments about the changes:

  1. In order to show the color changes for the themes, I needed to use a Frame background. The only way to do this in ttk is with a style, but I tried to minimize the impact of adding Style since we don't want to convert to using that yet.
  2. The Checkbutton no longer has an indicatoron option, so they look a lot different on the extensions tab.
  3. I didn't convert Scale because the ttk version didn't have a tickinterval. I believe this is being changed anyway, so I left it as is for now.

@csabella csabella force-pushed the bpo30781 branch 2 times, most recently from 5d794ae to 759370a Compare July 21, 2017 12:31
@terryjreedy
Copy link
Member

I am thinking that having NORMAL and DISABLED stand out is ok. Don't change though yet.
The change of from .config to subscripting created conflicts. We may introduce others before we get to this.

@csabella
Copy link
Contributor Author

Yes, I had been keeping up with resolving the conflicts, but haven't done it in a few days, since the restructuring to the classes got the momentum. Once you're ready for this, I'll just do it all then.

@csabella csabella force-pushed the bpo30781 branch 2 times, most recently from 8148041 to b607cc7 Compare August 24, 2017 23:18
Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the ttk issue, I want a minimal patch that only does what is needed to make the switch, or to be consistent about state ('disabled' instead of DISABLED with '!disabled', and 'normal'). I noted most but perhaps not all of these.

I believe everything other that the one note in the tests is needed. For configdialog, 80% is extraneous, so I presume it would be easier to start fresh.

I definitely want to switch to True, False, and widget['option'] = value, but in a separate style issue, at least after disposing of existing patches.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this 'disabled' to be consistent with '!disabled'.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave these imports.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep block.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep.

@bedevere-bot
Copy link

bedevere-bot commented Aug 25, 2017

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I didn't expect the Spanish Inquisition!. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

From Terry. Please don't unless I ignore new commits for a couple of days. Just continue with decent commit messages.

@csabella
Copy link
Contributor Author

I didn't expect the Spanish Inquisition!

@bedevere-bot
Copy link

Nobody expects the Spanish Inquisition!

@terryjreedy: please review the changes made to this pull request.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending a 'human test', looks good.

In title of existing news blurb, Misc/NEWS.d/next/IDLE/2017-07-28-18-59-06.bpo-30781.ud5m18.rst, change 'Notebook' to 'widgets'. Add 'Patches by Terry Jan Reedy and Cheryl Sabella.

Notebook, Radiobutton, Scrollbar, Style)
import tkinter.colorchooser as tkColorChooser
import tkinter.font as tkFont
import tkinter.messagebox as tkMessageBox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to change these in a subsequent 'style' patch, either with other style changes for this file or a separate patch for all files. Probably

from tkinter import colorchooser
from tkinter import messagebox
import tkinter.font as tkfont

I think tkfont may be necessary to not conflict with local font names. Will check with grep first.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I didn't expect the Spanish Inquisition!. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@csabella
Copy link
Contributor Author

I didn't expect the Spanish Inquisition!

@bedevere-bot
Copy link

Nobody expects the Spanish Inquisition!

@terryjreedy: please review the changes made to this pull request.

@terryjreedy terryjreedy changed the title bpo-30781: IDLE: configdialog - switch to ttk widgets bpo-30781: IDLE - use ttk widget in configdialog Aug 26, 2017
@terryjreedy terryjreedy changed the title bpo-30781: IDLE - use ttk widget in configdialog bpo-30781: IDLE - use ttk widgets in configdialog Aug 26, 2017
@terryjreedy terryjreedy merged commit 7028e59 into python:master Aug 26, 2017
terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Aug 26, 2017
Patch by Cheryl Sabella.
(cherry picked from commit 7028e59)
terryjreedy added a commit that referenced this pull request Aug 26, 2017
)

Patch by Cheryl Sabella.
(cherry picked from commit 7028e59)
@csabella csabella deleted the bpo30781 branch August 26, 2017 21:54
GadgetSteve pushed a commit to GadgetSteve/cpython that referenced this pull request Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants