[@s^ddlZddlTddljZGdddZddZedkrZendS)N)*c@seZdZddlmZddZdddZddd Zdd d Zd d Z ddZ ddZ ddZ dS)FileListr) EditorWindowcCs(||_i|_i|_i|_dS)N)rootdict inversedictvars)selfrr &/usr/lib/python3.4/idlelib/FileList.py__init__ s   zFileList.__init__NcCs|s t|j|}tjj|rQtjdd|fd|jdStjj|}||j kr|j |}|j j |S|r||S|j |||}|j r|S|jdSdS)Nz File Errorz%r is a directory.master)AssertionErrorcanonizeospathisdir tkMessageBox showerrorrnormcasertopwakeuprZ good_loadZ_close)r filenameactionkeyeditr r r opens(        z FileList.opencCs;|j|}|dk r7|dk r7|j|ndS)N)rZgotoline)r rlinenorr r r gotofileline+szFileList.gotofilelinecCs|j||S)N)r)r rr r r new0sz FileList.newcOs:x3t|jD]"}|j}|dkrPqqWdS)NZcancelbreak)listrclose)r argskwdsrZreplyr r r close_all_callback3s   zFileList.close_all_callbackc Csny|j|}Wn tk r3tddSYnX|rG|j|=n|j|=|jsj|jjndS)Nz-Don't know this EditorWindow object. (close))rKeyErrorprintrrZquit)r rrr r r unregister_maybe_terminate:s      z#FileList.unregister_maybe_terminatecCs;|jy|j|}Wn tk r=tddSYnX|jj}|st|rc|j|=nd|j|s  k