asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T  {fc@sdZddlZddlZddlmZddlZdZdZda dZ dZ dZ d Z d Zd Zd Zd ZdZdZdS(s5 A number of functions that enhance IDLE on Mac OSX. iN(tpathcCstjdtddtS(Ns/runningAsOSXApp() is deprecated, use isAquaTk()t stackleveli(twarningstwarntDeprecationWarningtisAquaTk(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pytrunningAsOSXApp s  cCstjdtddtS(Ns4isCarbonAquaTk(root) is deprecated, use isCarbonTk()Ri(RRRt isCarbonTk(troot((s-/usr/lib64/python2.7/idlelib/macosxSupport.pytisCarbonAquaTks  cCstjdkr~|jjdd}d|kr9daqd|krNdaqd|jjd d d krud aqd andadS(sl Initializes OS X Tk variant values for isAquaTk(), isCarbonTk(), isCocoaTk(), and isXQuartz(). tdarwinttktwindowingsystemtx11txquartztaquatothertAppKittwinfotservert.tcocoatcarbonN(tsystplatformR tcallt_tk_type(Rtws((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt_initializeTkVariantTestss      cCs(tdk sttdkp'tdkS(sK Returns True if IDLE is using a native OS X Tk (Cocoa or Carbon). RRN(RtNonetAssertionError(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyR*scCstdk sttdkS(sb Returns True if IDLE is using a Carbon Aqua Tk (instead of the newer Cocoa Aqua Tk). RN(RRR(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyR1scCstdk sttdkS(s8 Returns True if IDLE is using a Cocoa Aqua Tk. RN(RRR(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt isCocoaTk9scCstdk sttdkS(s7 Returns True if IDLE is using an OS X X11 Tk. RN(RRR(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt isXQuartz@scCsCtr;|jjdd}|dkr.tSdj|StSdS(s2 Returns a string warning message if the Tk version in use appears to be one known to cause problems with IDLE. 1. Apple Cocoa-based Tk 8.5.7 shipped with Mac OS X 10.6 is unusable. 2. Apple Cocoa-based Tk 8.5.9 in OS X 10.7 and 10.8 is better but can still crash unexpectedly. tinfot patchlevels8.5.7s8.5.9sWARNING: The version of Tcl/Tk ({0}) in use may be unstable.\nVisit http://www.python.org/download/mac/tcltk/ for current information.N(s8.5.7s8.5.9(RR RtFalsetformat(RR"((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyttkVersionWarningGs  cs#fd}|jd|dS(s This ensures that the application will respond to open AppleEvents, which makes is feasible to use IDLE as the default application for python files. cs"x|D]}j|qWdS(N(topen(targstfn(tflist(s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt doOpenFile`s s::tk::mac::OpenDocumentN(t createcommand(RR)R*((R)s-/usr/lib64/python2.7/idlelib/macosxSupport.pytaddOpenEventSupport[scCs2y|jjddWntjk r-nXdS(Ntconsolethide(R RtTkintertTclError(R((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt hideTkConsoleisc sddlm}ddlm}ddlm|jddd}|jddd3|jddjd ||jdddd 5|jddd=|}jd |i}||d d dd|d <}|jddd |dd|fd}j |d'fd} d'fd} d'fd} j d| j d| j d| rj dj j dj ntr`||d ddd|d<}|jddd ||jjddd(d'gfjjd} ttt| jd d)kr`|jddjd*q`ntrj d%| j d&| |jddd=nd'S(+sf Replace the Tk root menu by something that is more appropriate for IDLE with an Aqua Tk. i(tMenu(tBindings(t WindowListiiiiiitmenutnametwindowsttearofftlabeltWindowt underlinecsT|jd}|dkr$d}n|dkrC|jd|nj|dS(Ntendii(tindexRtdeletetadd_windows_to_menu(R5R<(R4(s-/usr/lib64/python2.7/idlelib/macosxSupport.pytpostwindowsmenus    cs$ddlm}|jddS(sHandle Help 'About IDLE' event.i(t aboutDialogs About IDLEN(tidlelibRAt AboutDialog(teventRA(R(s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt about_dialogscs0ddlm}j_|jddS(s&Handle Options 'Configure IDLE' event.i(t configDialogtSettingsN(RBRFt inversedictt instance_dictt ConfigDialog(RDRF(R)R(s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt config_dialogs cs!ddlm}|jdS(sHandle Help 'IDLE Help' event.i(thelpN(RBRLt show_idlehelp(RDRL(R(s-/usr/lib64/python2.7/idlelib/macosxSupport.pyt help_dialogss<>s<>s::tk::mac::ShowPreferencess<>texittapplet applicationtIDLEs About IDLEsinfo patchlevelRiiis_Preferences....t tkAboutDialogs::tk::mac::ShowHelpN(s About IDLEs<>(iii(s_Preferences....s<>(R/R2RBR3R4tmenudefstinsertt configuret add_cascadetregister_callbackRtbindR+tclose_all_callbackRR tevalttupletmaptinttsplittappendR( RR)R2R3t closeItemtmenubartmenudictR5R@RERKRNt tkversion((R4R)Rs-/usr/lib64/python2.7/idlelib/macosxSupport.pytoverrideRootMenupsP      $  cCs>t|tr:t|t||t||ndS(s Perform initial OS X customizations if needed. Called from PyShell.main() after initial calls to Tk() There are currently three major versions of Tk in use on OS X: 1. Aqua Cocoa Tk (native default since OS X 10.6) 2. Aqua Carbon Tk (original native, 32-bit only, deprecated) 3. X11 (supported by some third-party distributors, deprecated) There are various differences among the three that affect IDLE behavior, primarily with menus, mouse key events, and accelerators. Some one-time customizations are performed here. Others are dynamically tested throughout idlelib by calls to the isAquaTk(), isCarbonTk(), isCocoaTk(), isXQuartz() functions which are initialized here as well. N(RRR1ReR,(RR)((s-/usr/lib64/python2.7/idlelib/macosxSupport.pytsetupApps     (t__doc__RR/tosRRRR RRRRRRR R%R,R1ReRf(((s-/usr/lib64/python2.7/idlelib/macosxSupport.pyts"              i