Your IP : 3.141.32.252


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/WindowList.cpython-35.opt-1.pyc



��Yf�	�@s[ddlTGdd�d�Ze�ZejZejZejZGdd�de�ZdS)�)�*c@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�
WindowListcCsi|_g|_dS)N)�dict�	callbacks)�self�r�7/opt/alt/python35/lib64/python3.5/idlelib/WindowList.py�__init__s	zWindowList.__init__cCs'|j|j�||jt|�<dS)N)Z
after_idle�call_callbacksr�str)r�windowrrr�add	szWindowList.addcCs7y|jt|�=Wntk
r(YnX|j�dS)N)rr�KeyErrorr
)rrrrr�delete
s

zWindowList.deletec
Cs�g}x\|jD]Q}|j|}y|j�}Wntk
rJwYnX|j|||f�qW|j�x0|D](\}}}|jd|d|j�qvWdS)NZlabelZcommand)r�	get_title�TclError�append�sortZadd_command�wakeup)rZmenu�list�keyr�titlerrr�add_windows_to_menus


zWindowList.add_windows_to_menucCs|jj|�dS)N)rr)r�callbackrrr�register_callback"szWindowList.register_callbackcCs-y|jj|�Wntk
r(YnXdS)N)r�remove�
ValueError)rrrrr�unregister_callback%s
zWindowList.unregister_callbackcCsVxO|jD]D}y|�Wq
tj�\}}}td|d|�Yq
Xq
WdS)Nz&warning: callback failed in WindowList�:)r�sys�exc_info�print)rr�t�v�tbrrrr
+szWindowList.call_callbacksN)
�__name__�
__module__�__qualname__r	r
rrrrr
rrrrrs
rc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�ListedToplevelcKs-tj|||�tj|�||_dS)N)�Toplevelr	�registryr
�focused_widget)rZmaster�kwrrrr	<s
zListedToplevel.__init__cCs1tj|�tj|�tjs-|j�dS)N)r*rr)�destroyr�quit)rrrrr-As

	zListedToplevel.destroycCstj�dS)N)r*r
)rrrrr�update_windowlist_registryIsz)ListedToplevel.update_windowlist_registrycCs
|j�S)N)Zwm_title)rrrrrLszListedToplevel.get_titlecCsZyA|j�dkr)|j�|j�|j�|jj�Wntk
rUYnXdS)NZiconic)Zwm_stateZwm_withdrawZwm_deiconifyZtkraiser+Z	focus_setr)rrrrrPs



zListedToplevel.wakeupN)r%r&r'r	r-r/rrrrrrr(:s
r(N)Ztkinterrr*rrrr)r(rrrr�<module>s
0				

?>