Ñò §ÚêLc@sOdZddkZddkZd„Zd„Zd„Zd„Zd„ZdS(s A number of function that enhance IDLE on MacOSX when it used as a normal GUI application (as opposed to an X11 application). iÿÿÿÿNcCstidjo dtijS(s› Returns True if Python is running from within an app on OSX. If so, assume that Python was built with Aqua Tcl/Tk rather than X11 Tck/Tk. tdarwins.app(tsystplatformt executable(((s-/usr/lib64/python2.6/idlelib/macosxSupport.pytrunningAsOSXAppscs#‡fd†}|id|ƒdS(s£ This ensures that the application will respont to open AppleEvents, which makes is feaseable to use IDLE as the default application for python files. cs"x|D]}ˆi|ƒqWdS(N(topen(targstfn(tflist(s-/usr/lib64/python2.6/idlelib/macosxSupport.pyt doOpenFiless::tk::mac::OpenDocumentN(t createcommand(trootRR ((Rs-/usr/lib64/python2.6/idlelib/macosxSupport.pytaddOpenEventSupportscCs4y|iiddƒWntij onXdS(Ntconsolethide(ttktcalltTkintertTclError(R ((s-/usr/lib64/python2.6/idlelib/macosxSupport.pyt hideTkConsolescs”ddkl}l}l}ddkl}l}ddkl}ddkl‰ddk l }|ˆƒ}ˆi d|ƒh} ||dd ƒ| d <} |i d d d| d d ƒ| ‡fd†} ˆi | ƒ||ddƒ| d<} |i d dd| ƒd!‡fd†} d!‡‡fd†} ˆid| ƒˆid| ƒˆoˆidˆiƒnˆiidƒ}ttt|idƒƒƒd"jo-dd#d!gf|id <ˆid| ƒn¿x»|iD]°\}}| i|ƒ} | pqÜqÜx„|D]|}|p| iƒq |\}}||ƒ\}}||i|ƒ}ˆ|d„}| id |d |d|d |ƒq WqÜWd!S($sU Replace the Tk root menu by something that's more appropriate for IDLE. iÿÿÿÿ(tMenutTextR(tprepstrtget_accelerator(tBindings(t WindowList(tMultiCallCreatortmenutnametwindowstlabeltWindowt underlineicsX|idƒ}|djo d}n|djo|id|ƒnˆi|ƒdS(Ntendiÿÿÿÿi(tindextNonetdeletetadd_windows_to_menu(RR!(R(s-/usr/lib64/python2.6/idlelib/macosxSupport.pytpostwindowsmenuBs    tapplet applicationtIDLEcs$ddkl}|iˆdƒdS(Niÿÿÿÿ(t aboutDialogs About IDLE(tidlelibR*t AboutDialog(teventR*(R (s-/usr/lib64/python2.6/idlelib/macosxSupport.pyt about_dialogOscs0ddkl}ˆiˆ_|iˆdƒdS(Niÿÿÿÿ(t configDialogtSettings(R+R/t inversedictt instance_dictt ConfigDialog(R-R/(R R(s-/usr/lib64/python2.6/idlelib/macosxSupport.pyt config_dialogSs s<>s<>s<>sinfo patchlevelt.iiis About IDLEs::tk::mac::ShowPreferencescSs|i|ƒdS(N(tevent_generate(ttextt eventname((s-/usr/lib64/python2.6/idlelib/macosxSupport.pytcommandwsR9t acceleratorN(iii(s About IDLEs<>(RRRtidlelib.EditorWindowRRR+RRtidlelib.MultiCallRt configuret add_cascadetregister_callbackR#tbindtclose_all_callbackRtevalttupletmaptinttsplittmenudefsR tgett add_separatortdefault_keydefst add_command(R RRRRRRRtmenubartmenudictRR&R.R4t tkversiontmnamet entrylisttentryRR8R R:R9((RRR s-/usr/lib64/python2.6/idlelib/macosxSupport.pytoverrideRootMenu%sT  %    cCs7tƒpdSt|ƒt||ƒt||ƒdS(s7 Perform setup for the OSX application bundle. N(RRRRR (R R((s-/usr/lib64/python2.6/idlelib/macosxSupport.pytsetupApp|s    (t__doc__RRRR RRRRS(((s-/usr/lib64/python2.6/idlelib/macosxSupport.pyts      W