Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/gi/overrides/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyc

ó
,£´Oc@spddlZddlZddlmZdZdefd„ƒYZdefd„ƒYZ	eƒZd„Z
dS(iÿÿÿÿN(t_gobjectt	_RegistrycBseZd„Zd„ZRS(cCsæ||kstdƒ‚nt|dƒ}|dkrLtd|jƒ‚n|jjdƒsmtdƒ‚n|jƒ}|tjksŽt	‚|tj
krâ||_|jd}d||jf}tt
|ƒj||ƒndS(	ssWe do checks here to make sure only submodules of the override 
        module are added.  Key and value should be the same object and come
        from the gi.override module.  

        We add the override to the dict as "override_module.name".  For instance
        if we were overriding Gtk.Button you would retrive it as such:
        registry['Gtk.Button']
        sZYou have tried to modify the registry.  This should only be done by the override decoratort__info__sKCan not override a type %s, which is not in a gobject introspection typelibsgi.overridess[You have tried to modify the registry outside of the overrides module.  This is not allowedi
s%s.%sN(tKeyErrortgetattrtNonet__name__t
__module__t
startswitht
get_g_typeRt	TYPE_NONEtAssertionErrortTYPE_INVALIDtpytypetsuperRt__setitem__(tselftkeytvaluetinfotg_typetmodule((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyRs		
cCs|||<dS(N((Rtoverride_class((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pytregister%s(RRRR(((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyRs	toverridefunccBs eZdZd„Zd„ZRS(s#decorator for overriding a functioncCsEt|dƒstdƒ‚nddlm}||jj|_dS(NRsfunc must be an gi functioni(tmodules(thasattrt	TypeErrortimporterRRt_introspection_moduleR(RtfuncR((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyt__init__+scs5‡fd†}ˆj|_t|jˆj|ƒ|S(Ncs
ˆ||ŽS(N((targstkwargs(R(s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pytwrapper2s(RtsetattrR(RRR"((Rs9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyt__call__1s(RRt__doc__RR$(((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyR)s	cCs4t|ƒtjkrt|ƒStj|ƒ|SdS(s%Decorator for registering an overrideN(ttypettypestFunctionTypeRtregistryR(ttype_((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pytoverride:s

(tsysR'tgiRRR)tdictRtobjectRR+(((s9/usr/lib/python2.7/dist-packages/gi/overrides/__init__.pyt<module>s"