Skip to content

Ensure toolkit is initialized before use#921

Merged
corranwebster merged 5 commits into
mainfrom
enh/better-toolkit-lookup
Apr 5, 2022
Merged

Ensure toolkit is initialized before use#921
corranwebster merged 5 commits into
mainfrom
enh/better-toolkit-lookup

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

In a number of places the code used ETSConfig.toolkit to determine the backend at import time. However it is possible that that value was being checked before ETSConfig.toolkit was properly set. This changes the code to get the appropriate Pyface or TraitsUI toolkit object and gets the name of the toolkit from that.

This fixes #913.

This doesn't attempt to fix #904.

In a number of places the code used ETSConfig.toolkit to determine the backend
at import time.  However it is possible that that value was being checked
before ETSConfig.toolkit was properly set.  This changes the code to get the
appropriate Pyface or TraitsUI toolkit object and gets the name of the toolkit
from that.

This fixes #913.
Also fix a couple more uses of ETSConfig.toolkit.
Comment thread kiva/fonttools/app_font.py Outdated
Copy link
Copy Markdown
Member

@jwiggins jwiggins left a comment

Choose a reason for hiding this comment

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

I think the enable bits are OK, but I think we need to keep in mind that kiva should work in places where no GUI is available.

Comment thread kiva/trait_defs/kiva_font_trait.py Outdated
@corranwebster corranwebster requested a review from jwiggins April 5, 2022 10:30
Copy link
Copy Markdown
Member

@jwiggins jwiggins left a comment

Choose a reason for hiding this comment

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

LGTM

@corranwebster corranwebster merged commit 996ebae into main Apr 5, 2022
@jwiggins jwiggins deleted the enh/better-toolkit-lookup branch April 5, 2022 12:02
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.

RGBAColorEditor import doesn't force toolkit selection Enable Savage toolkit objects don't use entrypoints

2 participants