; (Bc@sdkZdkZdkZdkZdkZdkZdkZdkZdkZdkl Z dk l Z dZ dZ ei dZdZeidZdZd d Zd Zd Zd eifdYZedZdZdZdZd dddZdZdZdZ dZ!e!Z"dZ#dZ$ei%ei&de'ei&Z(dZ)dei*fdYZ+d d!Z,d"Z-d#Z.hZ/dd$Z0d%Z1dk2Zei3Z4ei5e4Z6d&ei7fd'YZ8d(ei9i:fd)YZ;d*Z<d+Z=dk>Z>dk?Z?d,fZ@d-fZAd.ZBd/ZCd0ZDd1ZEd2ZFd3ZGeGdZHd4fd5YZId6eIfd7YZJd8eIfd9YZKd:eKfd;YZLd<eKfd=YZMd>ZNd?ZOd@ZPdAZQdBfdCYZRdDZSdEZTdFZUdGZVdHfdIYZWdJeiXeWfdKYZYdLZZdMei*fdNYZ[ei\ei]BZ^dOZ_ei\dPZ`dQfdRYZadSZbdTZcedUZdfd d dVZedWZfeigdXZhdYZidZZjd[Zkeild\Zmd]Znd^Zod_fd`YZpdaZqdbfdcYZrddeserfdeYZtdfeuerfdgYZvdhZwdS(iN(sIS(s ConfigParsercCstiiti|SdS(N(sosspathsjoins PreferencesspyPathsfilename(sfilename((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pystoPyPathscCsQti||iid| |titiB}z|i Wd|i XdS(Ns: ( swxs MessageDialogsparentsmesss __class__s__name__scaptionsOKsICON_EXCLAMATIONsdlgs ShowModalsDestroy(sparentscaptionsmesssdlg((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysShowErrorMessages cCs?ti|||ti|B}z|iWd|i XdS(N( swxs MessageDialogsparentsmessagescaptionsOKsmsgTpesdlgs ShowModalsDestroy(sparentscaptionsmessagesmsgTpesdlg((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys ShowMessagescCsKti|||titiB}z|iti jSWd|i XdS(N( swxs MessageDialogsparentsquestionstitlesYES_NOs ICON_QUESTIONsdlgs ShowModalsID_YESsDestroy(sparentstitlesquestionsdlg((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys yesNoDialog"s"cCsFti}|i|||d||i ti |d||SdS(NsshortHelpStringsid( swxsNewIdsnIdstoolbarsAddTools thebitmapstheToggleBitmapshintsframesBindsEVT_TOOLs triggermeth(sframestoolbars thebitmapshints triggermethstheToggleBitmapsnId((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysAddToolButtonBmpObject's cCs#t||ti|||SdS(N(sAddToolButtonBmpObjectsframestoolbarsISsloadsfilenameshints triggermeth(sframestoolbarsfilenameshints triggermeth((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysAddToolButtonBmpFile.sscCsU|o't||ti||d |Sn$t ||ti||d |SdS(NiU( s toggleBmpsAddToggleToolButtonBmpObjectsframestoolbarsISsloadsnameshints triggermethsAddToolButtonBmpObject(sframestoolbarsnameshints triggermeths toggleBmp((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysAddToolButtonBmpIS2s'cCsLti}|i|||d|dt|i ti |d||SdS(NsshortHelpStringsisTogglesid( swxsNewIdsnIdstoolbarsAddTools thebitmapshintsTruesframesBindsEVT_TOOLs triggermeth(sframestoolbars thebitmapshints triggermethsnId((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysAddToggleToolButtonBmpObject8s cCsd|i|iSdS(NswxID_(s frameNamesuppersctrlName(s frameNamesctrlName((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswindowIdentifier?ssBoaFileDropTargetcBstZdZdZRS(NcCstii|||_dS(N(swxsFileDropTargets__init__sselfseditor(sselfseditor((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__DscCsAtiz%x|D]}|ii|qWWdtiXdS(N(swxsBeginBusyCursors filenamessfilenamesselfseditorsopenOrGotoModules EndBusyCursor(sselfsxsys filenamessfilename((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys OnDropFilesHs (s__name__s __module__s__init__s OnDropFiles(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysBoaFileDropTargetCs cCs}g}g}xY|D]Q}|o|||jp ||jo|i|g}q|i|qW|i||SdS(N(sresultscur_sectsseqsitms transformFuncspivotsappend(sseqspivots transformFuncsitmscur_sectsresult((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys split_seqPs'   iNcCs|i|i}|id}x0tt|dD]}||d||scCsTd}x4t|||||d|o|d}q W||||SdS(NcCs d|||od|fSdS(Ns%s%d%ss.(sbaseNamesnsext(sbaseNamesextsn((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pystryNamescCs|||jS(N(sitemCBskeysname(skeysnamesitemCB((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyssi(stryNamesfiltersbaseNamesextsnsitemCBs usedNames(s usedNamessbaseNamesextsnsitemCBstryName((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys getValidNames   cCs|od|pdSdS(Nsself.sself(sctrlName(sctrlName((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyssrcRefFromCtrlNamescCs |djodp|dSdS(Nsselfsi(ssrcRef(ssrcRef((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysctrlNameFromSrcRefscCsc|iid|ig}digi}|D]%}|ddjo||q0q0~SdS(s0 Strips away _modules from the class identifier s.is_N( sClasss __module__ssplits__name__s classPathSegssjoinsappends_[1]spathSeg(sClasss_[1]s classPathSegsspathSeg((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetWxPyNameForClassscCs5gi}t|D]}|tiq~SdS(N(sappends_[1]srangescountsxswxsNewId(scounts_[1]sx((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys winIdRangescCs9t|djo"|d djo|dtijSdS(NiisOn(slensmethodsstrings uppercase(smethod((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysmethodLooksLikeEventscCs1t|t|jo|t| |jSdS(N(slensstrssubstr(sstrssubstr((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys startswithss cCs|itSdS(N(sstrs translatesws2s(sstr((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswhitespacetospacessPaintEventHandlercBs;tZdZdZdZdZdZdZRS(s This class is used to merge paint requests. Each paint is captured and saved. Later on the idle event, the non-duplicated paints are executed. The code attempts to be efficient by determining the enclosing rectangle where multiple rectangles intersect. This is required only on GTK systems. Note: there is an assumption here that event handling is synchronous i.e. the paints called from the idle event handler are processed before the Refresh() call returns. cCshtii|d|_g|_||_|i||iti |i |iti |i dS(Ni( swxs EvtHandlers__init__sselfspaintingsupdatesswindowsPushEventHandlersBinds EVT_PAINTsOnPaintsEVT_IDLEsOnIdle(sselfswindow((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__s    cCs|idjo|idSn|iii}g}xG|i D]<}|i ||o|i ||}qG|i |qGW||_ |i i ||idS(Ni(sselfspaintingseventsSkipswindowsGetUpdateRegionsGetBoxsnewRectsnewListsupdatessrectsRectanglesOverlapsMergeRectanglessappend(sselfseventsnewListsnewRectsrect((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysOnPaints   cCst|idjo6|it|idjo|indSnd|_x$|iD]}|ii d|q_Wg|_d|_|idS(Nii( slensselfsupdatesseventsSkips RequestMorespaintingsrectswindowsRefresh(sselfseventsrect((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysOnIdles     cCs|i|i|ijodSn|i|i|ijodSn|i|i|ijodSn|i|i|ijodSndSdS(s. Returns 1 if Rectangles overlap, 0 otherwise iiN(srect1sxsrect2swidthsysheight(sselfsrect1srect2((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysRectanglesOverlapscCsz|i|ijoO|i}||i|i|ijo |i}q|i|i|i}nL|i}||i|i|ijo |i}n|i|i|i}|i|ijoO|i}||i|i|ijo |i}qZ|i|i|i}nL|i}||i|i|ijo |i}n|i|i|i}ti||||}|SdS(s4 Returns a rectangle containing both rect1 and rect2N( srect1sxsrect2swidthsysheightswxsRectsrv(sselfsrect1srect2srvsheightswidthsxsy((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysMergeRectangless*        (s__name__s __module__s__doc__s__init__sOnPaintsOnIdlesRectanglesOverlapsMergeRectangles(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysPaintEventHandlers    icCsytd}Wn+tj ot}ddf\}}n&X|idd}|idd}|p|oti t d|}ti |||}|i}|oa|iddt||idd|yt|Wqtj otidqXqnd S( sG Displays tip of the day. Driven from and updates config file sExploreriistipss showonstartupstipindexs Docs/tips.txtsCould not edit tips settings, please make sure that the Explorer.*.cfg file is not read only and you have sufficient priviledges to write to this file.N(screateAndReadConfigsconfsIOErrorsNonesshowTipsindexsgetints forceShowswxsCreateFileTipProviderstoPyPathstpsShowTipsframes GetCurrentTipssetsints writeConfigsLogError(sframes forceShowsindexsshowTipstpsconf((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysshowTips& cCsLti}|iz'ti}|i||iSWd|iXdS(N( swxs TheClipboardsclipsOpensTextDataObjectsdatasGetDatasGetTextsClose(sdatasclip((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysreadTextFromClipboards    cCs?ti}|iz|iti|Wd|iXdS(N(swxs TheClipboardsclipsOpensSetDatasTextDataObjectstextsClose(stextsclip((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswriteTextToClipboard!s   cCstiitid||o dtipdf}t i | o-t }|i |||_|t |tii| p*ti|ti ti|ti jo!dG|G|GHt i ||qndS(Niscopying( sosspathsisdirssrcssplitextsdofilessexistssdstsstatsST_MTIMEsshutilscopy2(ssrcsdst((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys updateFileqs^ cCs tii|t||fdS(s1 Traverse src and assures that dst is up to date N(sosspathswalkssrcs visit_updatesdst(ssrcsdst((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys updateDirzsc Cs|\}}|t|d} | otii|| }n|}tii |t jodSntii | odG|GHti |nxE|D]=}tii||}tii||}t||qWdS(Niscreating(spathsssrcsdstsdirnameslensreldirsosspathsjoins dstdirnamesbasenamesskipdirssexistssmakedirssnamessnamessrcnamesdstnames updateFile( spathssdirnamesnamessnamessrcsdstsdstnamessrcnames dstdirnamesreldir((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys visit_update~s  cCs,y dWntidiiSnXdS(Ns get_exc_infoi(ssyssexc_infostb_framesf_back(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysget_current_frames cCsH|o9dtii|ii|i|iit|fSndSdS(NssNone( sframesosspathsbasenamesf_codes co_filenamesf_linenosco_namesid(sframe((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys descr_frames9iPs PseudoFilecBs>tZdZedZdZdZdZdZRS(sE Base class for file like objects to facilitate StdOut for the Shell.cCs$|tjo g}n||_dS(N(soutputsNonesself(sselfsoutput((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__s cCst|i|dS(N(smapsselfswritesl(sselfsl((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys writelinesscCsdS(N((sselfss((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswritescCsdS(N((sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysflushscCstSdS(N(sFalse(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysisattys( s__name__s __module__s__doc__sNones__init__s writelinesswritesflushsisatty(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys PseudoFiles     sPseudoFileOutStorecBs tZdZdZdZRS(s! File like obj with list storage cCs|ii|dS(N(sselfsoutputsappendss(sselfss((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswritescCsdi|iSdS(Ns(sjoinsselfsoutput(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysreads(s__name__s __module__s__doc__swritesread(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysPseudoFileOutStores  sLoggerPFcBstZdZdZRS(s* Base class for logging file like objects cCs$|t}|t |tiSdS(N(ssspadspaddedspadWidthsstrip(sselfssspadded((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyspads (s__name__s __module__s__doc__spad(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysLoggerPFs sOutputLoggerPFcBstZdZdZRS(s Logs stdout to wxLog functionscCs|ioltio6t}|id|iii|ii f}n|}t i |i|iddntii|dS(Ns : <<%s, %d>>s%s%%(sssstrips PreferencessrecordModuleCallPointsget_current_framesframesf_backsf_codes co_filenamesf_linenosssswxs LogMessagesselfspadsreplacessyss __stdout__swrite(sselfssssssframe((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswrites   -&(s__name__s __module__s__doc__swrite(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysOutputLoggerPFs s ErrorLoggerPFcBstZdZdZRS(s Logs stderr to wxLog functionscCst|d o d|_n|djo ||_nS|ddjo|i||_n.ti|i|i|d iddti i |dS(Nsbufferss is s%s%%( shasattrsselfsbufferssswxsLogErrorspadsreplacessyss __stderr__swrite(sselfss((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyswrites   -(s__name__s __module__s__doc__swrite(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys ErrorLoggerPFs cCstt_tt_dS(N(sOutputLoggerPFssyssstdouts ErrorLoggerPFsstderr(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysinstallErrOutLoggerss cCstit_tit_dS(N(ssyss __stdout__sstdouts __stderr__sstderr(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysuninstallErrOutLoggerss cCst|d|iSdS(s{ Returns children of given class from dialog. This is useful for standard dialogs that does not expose their children cCs|ii|jS(N(sds __class__s__name__scn(sdscn((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyssN(sfilters classNamesdlgs GetChildren(sdlgs className((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetCtrlsFromDialogs cCsxdk}dk}dk}|id}|i|}|i|}|i|}|i ||i i SdS(Ns(shtmllibs formattersStringIOsss DumbWriterswsAbstractFormattersfs HTMLParserspsfeeds htmlblocksgetvaluesstrip(s htmlblocksStringIOsfspssshtmllibsws formatter((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyshtml2txts sFrameRestorerMixincBsYtZdZdZdZhZdZdZdZdZ fdZ dZ RS( s Used by top level windows to restore from gidden or iconised state and to load and persist window dimensions Classes using the mixin must define self.setDefaultDimensions() To be able to save, a winConfOption attr must be defined. sExplorers windowdimscCs6|i|io|itn|idS(N(sselfsShows IsIconizedsIconizesFalsesRaise(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysrestores  cCszt|jo\|dtjo0|dtj o|it|dqeqv|it|d n|i|dS(Niii(sNonesdimssselfs SetClientSizestuples SetPositions SetDimensions(sselfsdims((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys setDimensionss  cCs0|ii}|ii}||SdS(N(sselfs GetPositionsGetspossGetSizessize(sselfsposssize((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys getDimensionsscCst|i}|i|i|i o t}n[t |i |i|ihdt i <dt i <dt i<dt i<dt <}|o|i|n |i||i|i) Add in destructor: .PopEventHandler(True) cCsUtii|t|_||_|iti|i d|i |i |dS(Nsid( swxs EvtHandlers__init__sselfsFalses_blockMouseEditslistCtrlsBindsEVT_LIST_BEGIN_LABEL_EDITsOnBeginLabelEditsGetIdsPushEventHandler(sselfslistCtrl((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__s   "cCsY|i o tidjo'|iti|i|in t |_|i dS(Ns __WXMSW__( sselfs_blockMouseEditswxsPlatformseventsVetos CallAfters ctrlLabelEditsGetIndexsFalsesSkip(sselfsevent((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysOnBeginLabelEdits   cCst|_|ii|dS(N(sTruesselfs_blockMouseEditslistCtrls EditLabelsidx(sselfsidx((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys ctrlLabelEdits ( s__name__s __module__s__doc__swxsNewIdswxEVT_CTRLEDITs__init__sOnBeginLabelEdits ctrlLabelEdit(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysListCtrlLabelEditFixEHs    cCs|i}t|tio|i|i\}}|djo{|i |ti  o`|i ti @ o4x1t|iD]}|i|dtqWn|i|ttqqndS(sEnsures the item the mouse is pointing at is selected before a popup. Works with both single-select and multi-select lists.iN(seventsGetEventObjectsctrls isinstanceswxsListCtrlsHitTests GetPositionsnsflagss GetItemStatesLIST_STATE_SELECTEDsGetWindowStyleFlags LC_SINGLE_SELsranges GetItemCountsis SetItemStatesSEL_FOC(seventsctrlsisnsflags((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysselectBeforePopups  cCsZg}d}xCno;|i|ti|}|djoPn|i|qW|SdS(s- Returns list of item indexes of given state iiN(sressidxslistctrls GetNextItemswxs LIST_NEXT_ALLsstatesappend(slistctrlsstatesressidx((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetListCtrlSelections sListCtrlSelectionManagerMixcBs_tZdZeiZeZdZdZ dZ dZ dZ dZ dZRS(sMixin that defines a platform independent selection policy As selection single and multi-select list return the item index or a list of item indexes respectively. cCs6|iti|i|idd|i|idS(Ni(sselfsBindswxsEVT_RIGHT_DOWNsOnLCSMRightDownsConnectswxEVT_DOPOPUPMENUs OnLCSMDoPopup(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__scCs |iSdS(s. Override to implement dynamic menus (create) N(sselfs_menu(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys getPopupMenuscCs ||_dS(s# Must be set for default behaviour N(smenusselfs_menu(sselfsmenu((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys setPopupMenuscCsdS(s/ Override to implement dynamic menus (destroy) N((sselfsmenu((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysafterPopupMenuscCsCt|}|iti@o|o |dSq?dSn|SdS(Nii(sgetListCtrlSelectionsselfsressGetWindowStyleFlagswxs LC_SINGLE_SEL(sselfsres((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys getSelections   cCst||i}|oo|i||i|i|dSti }|i |i ||_|i|_ ti||ndS(N(sselectBeforePopupseventsselfs getPopupMenusmenus PopupMenus GetPositionsafterPopupMenuswxsPyEventsevts SetEventTypeswxEVT_DOPOPUPMENUsposs PostEvent(sselfseventsmenusevt((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysOnLCSMRightDowns     cCs*|i|i|i|i|idS(N(sselfs PopupMenuseventsmenuspossafterPopupMenu(sselfsevent((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys OnLCSMDoPopups(s__name__s __module__s__doc__swxsNewIdswxEVT_DOPOPUPMENUsNones_menus__init__s getPopupMenus setPopupMenusafterPopupMenus getSelectionsOnLCSMRightDowns OnLCSMDoPopup(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysListCtrlSelectionManagerMixs       cCs!tiodSn tidSdS(Ns s (s Preferencess STCUseTabss STCIndent(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetIndentBlock%s cCs3y|iSWntj o|i SnXdS(N(sstreamsCanReadsAttributeErrorseof(sstream((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys canReadStream-scCsdk}|id}t}xP|oH|o|in|i|d|\}}}|d=|g}q!W|||fSdS(Ns.i( simpsnamessplitssegssNonesfilescloses find_modulespathsfilenamesdesc(snamespathssegssfilenamesimpsfilesdesc((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysfind_dotted_module3s cCs||o d|dpd}ti||||}t i o|o |djoZti djoti dddfjp ti djo|it ii|qn|i|dS(Ns iss-s __WXGTK__is __WXMSW__(slabelscodestextswxsMenuItemsmenuswIdshelpsmenuItems PreferencesseditorMenuImagessbmpsPlatformsVERSIONs SetBitmapsISsloads AppendItem(smenuswIdslabelscodesbmpshelpstextsmenuItem((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysappendMenuItem>s  9!cCsCx8t|iD]$}|i||jo|SqqWdSdS(Ni(srangesnotebooks GetPageCountsis GetPageTextsname(snotebooksnamesi((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetNotebookPageHs  scoding[:=]\s*([-\w_.]+)cCs|iddd }di|}ti|}| otSn|id}dk }y|i |Wn t j ot d|nX|SdS(szReturn the encoding declaration according to PEP 263. Raise LookupError if the encoding is declared but unknown. s iiNsUnknown encoding ( sstrssplitsjoins coding_ressearchsmatchsNonesgroupsnamescodecsslookups LookupError(sstrsnamescodecssmatch((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys coding_specSs cCsytitfWnttfj o |SnXtioryt|SWqtj oQ}yt|}|i |SWqtj o}t dt|qXqXn|SdS(NsUnable to encode unicode string, please change the defaultencoding in sitecustomize.py to handle this encoding. Error message %s( swxs USE_UNICODEs UnicodeErrorsAttributeErrors NameErrorsusstrserrs coding_specsspecsencodes Exception(suserrsspec((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysstringFromControlis   !cCsytitfWnttfj o |SnXtioryt|SWqtj oQ}yt|}|i |SWqtj o}t dt |qXqXn|SdS(NsUnable to decode unicode string, please change the defaultencoding in sitecustomize.py to handle this encoding. Error message %s( swxs USE_UNICODEs UnicodeErrorsAttributeErrors NameErrorsssunicodeserrs coding_specsspecsdecodes Exceptionsstr(ssserrsspec((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysstringToControl{s   !cCsb|iddjodSnA|iddjodSn#|iddjodSn|SdS(Ns is s (stextsfindsdefault(stextsdefault((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys getEOLModescCs |iddiddSdS(Ns s s (stextsreplace(stext((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys toUnixEOLModescCs||id}|id}|id}|o||jp ||jotSn#| o |o|otSntSdS(s Returns False for mixed EOLs s s s N(stextscountscrlfslfscrsTruesFalse(stextslfscrlfscr((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyscheckMixedEOLss!sInspectorSessionMixcBs,tZdZdZdZdZRS(NcCsdS(N((sselfs inspector((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysdoPostscCsdS(N((sselfs inspector((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysdoCancelscCsdS(N((sselfs inspector((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pyspromptPostOrCancelscCsdS(N((sselfs inspector((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysdoUps(s__name__s __module__sdoPostsdoCancelspromptPostOrCancelsdoUp(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysInspectorSessionMixs   cCsJ|i}tidjptid dddfjo|Sn| SdS(Ns __WXGTK__iii(sevents IsCheckedscheckedswxsPlatformsVERSION(seventschecked((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysgetEventCheckeds -s I18nStringcBs#tZdZdZdZRS(NcCs ||_dS(N(sstringsselfs_string(sselfsstring((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__init__scCs |iSdS(N(sselfs_string(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__str__scCsd|iSdS(Ns_(%r)(sselfs_string(sself((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys__repr__s(s__name__s __module__s__init__s__str__s__repr__(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys I18nStrings  s I18nStringScBstZRS(N(s__name__s __module__(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys I18nStringSss I18nStringUcBstZRS(N(s__name__s __module__(((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys I18nStringUscCsFt|tjot|Sn"t|tjot|SndS(N(stypesvaluesstrs I18nStringSsunicodes I18nStringU(svalue((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pysI18nStringFactorys(xsstringsosssyssglobspprintstypessreswxs PreferencessISs ConfigParserstoPyPathsShowErrorMessagesICON_INFORMATIONs ShowMessages yesNoDialogs NullBitmapsAddToolButtonBmpObjectsAddToolButtonBmpFilesAddToolButtonBmpISsAddToggleToolButtonBmpObjectswindowIdentifiersFileDropTargetsBoaFileDropTargetsNones split_seqs allowed_widths human_splits duplicateMenus getValidNamessrcRefFromCtrlNamesctrlNameFromSrcRefsgetWxPyNameForClasss winIdRangeswxNewIdssmethodLooksLikeEvents startswiths maketranss whitespaceslensws2sswhitespacetospaces EvtHandlersPaintEventHandlersshowTipsreadTextFromClipboardswriteTextToClipboards _sharedConfsscreateAndReadConfigs writeConfigswx.htmlsNewIdswxEVT_HTML_URL_CLICKs PyEventBindersEVT_HTML_URL_CLICKsPyEventswxHtmlWindowUrlClickshtmls HtmlWindowswxUrlClickHtmlWindows wxProxyPanels IsComEnabledsstatsshutilsskipdirssdofiless updateFiles updateDirs visit_updatesget_current_frames descr_framespadWidthspads PseudoFilesPseudoFileOutStoresLoggerPFsOutputLoggerPFs ErrorLoggerPFsinstallErrOutLoggerssuninstallErrOutLoggerssgetCtrlsFromDialogshtml2txtsFrameRestorerMixinscallOnFrameRestorersssetupCloseWindowOnEscapesgetModelBaseDirspathRelativeToModelsBottomAligningSplitterMixsSplitterWindowsBottomAligningSplitterWindowstraverseTreeCtrlsListCtrlLabelEditFixEHsLIST_STATE_SELECTEDsLIST_STATE_FOCUSEDsSEL_FOCsselectBeforePopupsgetListCtrlSelectionsListCtrlSelectionManagerMixsgetIndentBlocks canReadStreamsfind_dotted_modulesappendMenuItemsgetNotebookPagescompiles coding_res coding_specsstringFromControlsstringToControlslineseps getEOLModes toUnixEOLModescheckMixedEOLssInspectorSessionMixsgetEventCheckeds I18nStringsstrs I18nStringSsunicodes I18nStringUsI18nStringFactory(cstraverseTreeCtrlsFrameRestorerMixinspprints I18nStringsAddToolButtonBmpISsgetModelBaseDirssrcRefFromCtrlNames toUnixEOLModes startswiths PseudoFiles split_seqs updateFilesskipdirss allowed_widthsfind_dotted_modulesEVT_HTML_URL_CLICKs canReadStreams ConfigParsersgetEventCheckedsgetListCtrlSelections I18nStringSsPseudoFileOutStoresListCtrlLabelEditFixEHs IsComEnabledsctrlNameFromSrcRefs coding_res I18nStringUs Preferencess winIdRangeswxEVT_HTML_URL_CLICKswxUrlClickHtmlWindowsmethodLooksLikeEventsuninstallErrOutLoggerss coding_specswriteTextToClipboardsBottomAligningSplitterWindowsI18nStringFactorys duplicateMenusgetCtrlsFromDialogsrespathRelativeToModelswxHtmlWindowUrlClickshtml2txtsstatsgetWxPyNameForClasssglobsPaintEventHandlers human_splitswxswxNewIdssws2ssreadTextFromClipboardsBoaFileDropTargetsgetIndentBlockscheckMixedEOLssossAddToggleToolButtonBmpObjectsAddToolButtonBmpFiles getValidNamesInspectorSessionMixsBottomAligningSplitterMixsget_current_frames _sharedConfssinstallErrOutLoggersscallOnFrameRestorerssselectBeforePopups getEOLModeswindowIdentifiersstringFromControlscreateAndReadConfigsOutputLoggerPFs visit_updates writeConfigs yesNoDialogsListCtrlSelectionManagerMixsshowTips wxProxyPanels descr_frames ShowMessagespadWidthsstringsshutilswhitespacetospacessetupCloseWindowOnEscapespadsSEL_FOCsLoggerPFsISssysstoPyPathsdofilesstypessAddToolButtonBmpObjectsstringToControlsShowErrorMessagesgetNotebookPagesappendMenuItems updateDirs ErrorLoggerPF((sK/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Utils.pys? s?                    " T                   =    +    R