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.

Author serhiy.storchaka
Recipients Saimadhav.Heblikar, jesstess, serhiy.storchaka, terry.reedy
Date 2014-08-24.11:06:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408878416.89.0.596728653293.issue22133@psf.upfronthosting.co.za>
In-reply-to
Content
> Grepping idlelib for 'toplevel, there are about 10. Do all of the Toplevels get put on the activity bar?  I would not expect that popups like calltip would.

I don't know how dialogs and calltip popups behave on Gnome Shell. But I think we should do this at least for more or less long-lived windows such as stack viewer. On KDE when I added ``kw["class"] = 'Idle3'`` to ListedToplevel constructor, console and editor windows are grouped on taskbar, and stack viewer is separated (without this line all three windows are in the same group).

> I expect that all ListedToplevels could be handled at once by adding the following as the first line of ListedToplevel.__init__.

May be, but this is not so simple. To be robust we should handle both 'class' and 'class_' keywords (and may be even '-class').

> What is wrong with simply adding classname to the Tk() call, as Roger suggested in #13553.

This affects only WM_CLASS of root window (which is withdrawn right after creation in IDLE).

> Does KDE display 2 windows without name='Idle' in the toplevel call?  Is this a KDE or tk bug?

``tk = Tk(className='Idle3')`` creates first (root) window and ``top = Toplevel(tk, class_='Idle3')`` creates second window. The className argument affects root window (and some other things) and the class argument affects Toplevel window.

Another example:

>>> from tkinter import *
>>> tk = Tk(className='Firefox')
>>> top = Toplevel(tk, class_='Chromium-browser')

Created two windows: one with title "firefox" and Firefox icon, and other with title "firefox" and Chromium icon.

I argue that we should add className="Idle3" to every Tk constructor and class_="Idle3" to most (iv not every) Toplevel constructor. On Python 2 it should be "Idle2" or "Idle" (not sure).
History
Date User Action Args
2014-08-24 11:06:56serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, jesstess, Saimadhav.Heblikar
2014-08-24 11:06:56serhiy.storchakasetmessageid: <1408878416.89.0.596728653293.issue22133@psf.upfronthosting.co.za>
2014-08-24 11:06:56serhiy.storchakalinkissue22133 messages
2014-08-24 11:06:56serhiy.storchakacreate