Author epaine
Recipients Lance Ware, epaine, markroseman, serhiy.storchaka, terry.reedy, zach.ware
Date 2020-09-15.20:22:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600201371.14.0.794055494976.issue28694@roundup.psfhosted.org>
In-reply-to
Content
+1 I also think that the fontchooser should be wrapped. I briefly tested your wrapper, Lance, and found it worked fine on Windows but did not on my Linux setup (because it is non-modal).

I went about implementing my own wrapper based loosely around your's (see attached) and the way I overcame this problem was to use vwait (this still works on Windows where the call is modal). vwait is good because it returns once the condition is fulfilled without the need for polling or similar.

While I use the commondialog module in the wrapper, this is simply for its handling (in __init__) of the master (I don't think it would make sense to enhance the Dialog class for this wrapper).

> the awful kludge in the show method (creating a Frame widget just so that some low-level operations can be performed) is repugnant to me

You're going to moan at me then for using something similar in the attached! The reason I use it is to avoid the logic found on line 77 of your wrapper and *hopefully* make the code more readable (whether I achieve this is somewhat debatable).

> I have access only to Windows OS

Is this still the case or can you now test on a different system which is non-modal?


Do you wish to go ahead with authoring a patch for this or would you prefer me to do it? (I would appreciate you reviewing it either way and you would still get credit in the news as I took sections from your wrapper) If everything goes well, we can hopefully get this into Python 3.10 (as this is a new feature, it won't be back-ported to 3.9 and before).
History
Date User Action Args
2020-09-15 20:22:51epainesetrecipients: + epaine, terry.reedy, markroseman, zach.ware, serhiy.storchaka, Lance Ware
2020-09-15 20:22:51epainesetmessageid: <1600201371.14.0.794055494976.issue28694@roundup.psfhosted.org>
2020-09-15 20:22:51epainelinkissue28694 messages
2020-09-15 20:22:50epainecreate