
    faR                     6   S SK r SSKJrJr  SSKJrJrJrJr  SSK	J
r
  S SKJr  S SKJr  S SKr\
" S5      r/ r " S	 S
\R$                  5      r\" \5      r\R'                  S
5        S3S jr\ " S S\R*                  5      5       r\R'                  S5        \ " S S\R,                  5      5       r\R'                  S5        \ " S S\R.                  5      5       r\R'                  S5        \ " S S\R0                  5      5       r\R'                  S5        \ " S S\R2                  5      5       r\R'                  S5        \ " S S\R4                  5      5       r\R'                  S5        \ " S S\R6                  5      5       r\R'                  S5        \ " S S\R8                  5      5       r\R'                  S5         " S S\R:                  5      r\" \5      r\R'                  S5         " S S\R<                  5      r\" \5      r\R'                  S5         " S  S!\R>                  5      r\" \5      r\R'                  S!5         " S" S#\R@                  5      r \" \ 5      r \R'                  S#5         " S$ S%5      r! " S& S'\RD                  5      r"\" \"5      r"\R'                  S'5         " S( S)\RF                  5      r#\" \#5      r#\R'                  S)5        \RH                  \RJ                  \RL                  4S*:  a  S+ r'OS, r' " S- S.\RP                  5      r(\" \(5      r(\R'                  S.5         " S/ S0\RR                  5      r)\" \)5      r)\R'                  S05         " S1 S2\RT                  5      r*\" \*5      r*\R'                  S25        g)4    N   )register_sigint_fallbackget_event_loop)overridedeprecated_initwrap_list_store_equal_funcwrap_list_store_sort_func)get_introspection_module)PyGIWarning)GLibGioc                       \ rS rSrS rSrg)Application%   c                 t   [        U R                  5         [        [        R                  R                  5       5      R                  U R                  5         [        R                  R                  " U /UQ70 UD6sS S S 5        sS S S 5        $ ! , (       d  f       O= f S S S 5        g ! , (       d  f       g = fN)
r   quitr   r   MainContextdefaultrunningr   r   run)selfargskwargss      2/usr/lib/python3/dist-packages/gi/overrides/Gio.pyr   Application.run'   sw    %dii0 0 0 8 8 :;CCDIIN**4A$A&A ON 10NNN 100s$   AB)$B;	B)
B	B))
B7 N)__name__
__module____qualname____firstlineno__r   __static_attributes__r       r   r   r   %   s    Br#   r   c                    ^ ^ U U4S jnU$ )Nc                   > [         TU ]  " U0 UD6  TR                  R                  SS5      S   S-   TR                  -   nT(       a#  [
        R                  " U< ST< S3[        SS9  g [
        R                  " U< S3[        SS9  g )	N.   z) shouldn't be instantiated directly, use z	 instead.r   )
stacklevelz$ shouldn't be instantiated directly.)super__init__r   rsplitr   warningswarnr   )r   r   r   nameclsinsteads       r   new_init_warn_init.<locals>.new_init3   sw    c4!4262~~$$S!,R036EMM&*G5+
 MM<@B+r#   r   )r0   r1   r2   s   `` r   
_warn_initr4   1   s    + Or#   c                   :    \ rS rSr\" \R                  S5      rSrg)VolumeMonitorC   zGio.VolumeMonitor.get()r   N)	r   r   r    r!   r4   r   r6   r+   r"   r   r#   r   r6   r6   C   s     #++-FGHr#   r6   c                   8    \ rS rSr\" \R                  5      rSrg)DBusAnnotationInfoL   r   N)	r   r   r    r!   r4   r   r9   r+   r"   r   r#   r   r9   r9   L   s    #001Hr#   r9   c                   8    \ rS rSr\" \R                  5      rSrg)DBusArgInfoT   r   N)	r   r   r    r!   r4   r   r<   r+   r"   r   r#   r   r<   r<   T   s    #//*Hr#   r<   c                   V   ^  \ rS rSr\" \R                  5      r   SU 4S jjrSr	U =r
$ )DBusConnection\   c                 D   >^ Tb  U4S jnOS n[         TU ]  UUUUU5      $ )Nc           	      >   > T" XUX4UU5        UR                  5         g r   )_unref)
connectionsenderobject_pathinterface_namemethod_name
parameters
invocationmethod_call_closures          r   wrapped_method_call_closureCDBusConnection.register_object.<locals>.wrapped_method_call_closureg   s'     $J$2$.0 !!#r#   )r*   register_object)r   rF   interface_inforK   get_property_closureset_property_closurerL   	__class__s      `   r   rN   DBusConnection.register_object`   s8     *$ +/'w&{'5'B';';	= 	=r#   r   )NNN)r   r   r    r!   r4   r   r?   r+   rN   r"   __classcell__rR   s   @r   r?   r?   \   s(    #,,-H
 -1-1-1= =r#   r?   c                   8    \ rS rSr\" \R                  5      rSrg)DBusMethodInfo{   r   N)	r   r   r    r!   r4   r   rW   r+   r"   r   r#   r   rW   rW   {       #,,-Hr#   rW   c                   8    \ rS rSr\" \R                  5      rSrg)DBusSignalInfo   r   N)	r   r   r    r!   r4   r   r[   r+   r"   r   r#   r   r[   r[      rY   r#   r[   c                   8    \ rS rSr\" \R                  5      rSrg)DBusInterfaceInfo   r   N)	r   r   r    r!   r4   r   r^   r+   r"   r   r#   r   r^   r^      s    #//0Hr#   r^   c                   8    \ rS rSr\" \R                  5      rSrg)DBusNodeInfo   r   N)	r   r   r    r!   r4   r   ra   r+   r"   r   r#   r   ra   ra      s    #**+Hr#   ra   c                       \ rS rSrSS jrSrg)	ActionMap   Nc                    ^ ^  [        U5          SU U4S jjnU H  nU" U6   M
     g! [         a    [        S5      ef = f)a  
The add_action_entries() method is a convenience function for creating
multiple Gio.SimpleAction instances and adding them to a Gio.ActionMap.
Each action is constructed as per one entry.

:param list entries:
    List of entry tuples for add_action() method. The entry tuple can
    vary in size with the following information:

        * The name of the action. Must be specified.
        * The callback to connect to the "activate" signal of the
          action. Since GLib 2.40, this can be None for stateful
          actions, in which case the default handler is used. For
          boolean-stated actions with no parameter, this is a toggle.
          For other state types (and parameter type equal to the state
          type) this will be a function that just calls change_state
          (which you should provide).
        * The type of the parameter that must be passed to the activate
          function for this action, given as a single GLib.Variant type
          string (or None for no parameter)
        * The initial state for this action, given in GLib.Variant text
          format. The state is parsed with no extra type information, so
          type tags must be added to the string if they are necessary.
          Stateless actions should give None here.
        * The callback to connect to the "change-state" signal of the
          action. All stateful actions should provide a handler here;
          stateless actions should not.

:param user_data:
    The user data for signal connections, or None
zentries must be iterableNc                 "  > U(       aX  [         R                  R                  U5      (       d  [        SU< SU < S35      e[         R                  R	                  U5      nOS nUbY  [         R
                  R                  S US S 5      n[        R                  R                  XU5      nUb  UR                  SUT	5        O*Ub  [        SU < SU< S35      e[        R                  XS9nUb  UR                  S	UT	5        TR                  U5        g )
NzThe type string 'z*' given as the parameter type for action 'z'' is not a valid GVariant type string. zchange-statezStateless action 'z,' should give None for 'change_state', not 'z'.)r/   parameter_typeactivate)r   VariantTypestring_is_valid	TypeErrornewVariantparser   SimpleActionnew_statefulconnect
ValueError
add_action)
r/   ri   rh   statechange_statevariant_parametervariant_stateactionr   	user_datas
           r   _process_action5ActionMap.add_action_entries.<locals>._process_action   s    ''77GG# &4T%; < < %)$4$4$8$8$H!$(!  $ 2 24d K))66t7DF+NN><K  +$&*L&: ; ; ))t)V#z8Y?OOF#r#   )NNNN)iterrl   )r   entriesrz   r{   entrys   ` `  r   add_action_entriesActionMap.add_action_entries   sV    @	8M AE59	$ 	$> EU# E  	8677	8s   ) ?r   r   )r   r   r    r!   r   r"   r   r#   r   rd   rd      s    F$r#   rd   c                        \ rS rSrS rS rSrg)FileEnumerator   c                     U $ r   r   r   s    r   __iter__FileEnumerator.__iter__       r#   c                 :    U R                  S 5      nUb  U$ [        er   )	next_fileStopIteration)r   	file_infos     r   __next__FileEnumerator.__next__   s"    NN4(	 r#   r   Nr   r   r    r!   r   r   r"   r   r#   r   r   r      s     r#   r   c                       \ rS rSrS rSrg)MenuItem   c                 h    U H,  u  p#nU R                  U[        R                  " X45      5        M.     g r   )set_attribute_valuer   rn   )r   
attributesr/   format_stringvalues        r   set_attributeMenuItem.set_attribute   s*    ,6(T%$$T4<<+MN -7r#   r   N)r   r   r    r!   r   r"   r   r#   r   r   r      s    Or#   r   c                   x    \ rS rSrSr\" \R                  R                  SS9rS r	S r
S rS rS	 rS
 rS rSrg)Settingsi  z0Provide dictionary-like access to GLib.Settings.)schemapathbackend)	arg_namesc                 &    XR                  5       ;   $ r   	list_keysr   keys     r   __contains__Settings.__contains__
  s    nn&&&r#   c                 4    [        U R                  5       5      $ r   )lenr   r   s    r   __len__Settings.__len__  s    4>>#$$r#   c              #   B   #    U R                  5        H  nUv   M	     g 7fr   r   r   s     r   r   Settings.__iter__  s     >>#CI $s   c                     g)NTr   r   s    r   __bool__Settings.__bool__  s     r#   c                 h    X;  a  [        SU< 35      eU R                  U5      R                  5       $ )Nunknown key: )KeyError	get_valueunpackr   s     r   __getitem__Settings.__getitem__  s-    ?566~~c"))++r#   c           	         X;  a  [        SU< 35      eU R                  U5      nUR                  S5      R                  5       nUR                  S5      nUS:X  a>  UR                  S5      R	                  5       nUR                  S5      (       d   eUSS  nGOUS:X  a  UR                  S5      R	                  5       R                  S5      (       d   eUR                  S5      R                  S5      R	                  5       nUR                  5       nX';  a  [        SU< SU< S	35      eOUS
:X  ae  UR                  S5      nUR                  S5      R	                  5       nUR                  5       u  pX):  d  X*:  a  [        SU< SU	< SU
< S	35      eO[        S[        U5      -   5      eU R                  U[        R                  " Xb5      5        g )Nr   r   r'   typeaenumzvalue z is not an allowed enum ()rangez not in range (z - z'Cannot handle allowed type range class )r   	get_rangeget_child_value
get_stringget_type_string
startswithr   rs   NotImplementedErrorstr	set_valuer   rn   )r   r   r   r   type_vtype_strallowedtuple_min_max_s              r   __setitem__Settings.__setitem__   s   ?566 s#%%a(335!!!$F?((+;;=H&&s++++|Hf_$$Q'779DDSIIII((+;;A>NNPHhhjG# 5RY!Z[[ $g&&q)F--a0@@BHJD|u| 9>dKM M  , &&ORUV[R\&\]]sDLL9:r#   c                 "    U R                  5       $ r   r   r   s    r   keysSettings.keysA  s    ~~r#   r   N)r   r   r    r!   __doc__r   r   r   r+   r   r   r   r   r   r   r   r"   r   r#   r   r   r     sC    :s||44)FHH'%
,;B r#   r   c                   :    \ rS rSrSrS rS rS r\S 5       r	Sr
g)	_DBusProxyMethodCalliI  z1Helper class to implement DBusProxy method calls.c                     Xl         X l        g r   
dbus_proxyrH   )r   r   rH   s      r   r+   _DBusProxyMethodCall.__init__L  s    $&r#   c                     Uu  pEn UR                  U5      nU" XR	                  U5      U5        g ! [         a7    [        R                  " 5       S S u  pU(       a
  U" XU5        O	U" XU5         g f = f)Nr   )call_finish	Exceptionsysexc_info_unpack_result)
r   objresultrz   result_callbackerror_callbackreal_user_dataretetypees
             r   __async_result_handler+_DBusProxyMethodCall.__async_result_handlerP  su    <E9.		//&)C 	005~F  	||~bq)HEs~67	s   1 >A21A2c           	      h   U(       a.  US   nUSS  n[        U[        5      (       d  [        SU-  5      eOSn[        R                  " U[        U5      5      nSU;   a|  US   UR                  S5      UR                  S5      4nU R                  R                  U R                  UUR                  SS5      UR                  S	S
5      S U R                  U5        g U R                  R                  U R                  UUR                  SS5      UR                  S	S
5      S 5      nU R                  U5      $ )Nr   r'   z6first argument must be the method signature string: %rz()result_handlererror_handlerrz   flagstimeoutr(   )
isinstancer   rl   r   rn   tuplegetr   callrH   *_DBusProxyMethodCall__async_result_handler	call_syncr   )r   r   r   	signaturearg_variantrz   r   s          r   __call___DBusProxyMethodCall.__call___  s$    QI8Di-- X[d dee . Ill9eDk:v% 01O4K02I OO  !1!1;!'GQ!7Ir9RTX!%!<!<iI
 __..t/?/?/5zz'1/E/5zz)R/H/35F &&v..r#   c                 t    UR                  5       n[        U5      S:X  a  US   nU$ [        U5      S:X  a  SnU$ )z?Convert a D-BUS return variant into an appropriate return valuer'   r   N)r   r   )klassr   s     r   r   #_DBusProxyMethodCall._unpack_result|  sE      v;!AYF  [AFr#   r   N)r   r   r    r!   r   r+   r   r   classmethodr   r"   r   r#   r   r   r   I  s)    ;'G/:  r#   r   c                       \ rS rSrSrS rSrg)	DBusProxyi  a  Provide comfortable and pythonic method calls.

This marshalls the method arguments into a GVariant, invokes the
call_sync() method on the DBusProxy object, and unmarshalls the result
GVariant back into a Python tuple.

The first argument always needs to be the D-Bus signature tuple of the
method call. Example:

  proxy = Gio.DBusProxy.new_sync(...)
  result = proxy.MyMethod('(is)', 42, 'hello')

The exception are methods which take no arguments, like
proxy.MyMethod('()'). For these you can omit the signature and just write
proxy.MyMethod().

Optional keyword arguments:

- timeout: timeout for the call in milliseconds (default to D-Bus timeout)

- flags: Combination of Gio.DBusCallFlags.*

- result_handler: Do an asynchronous method call and invoke
     result_handler(proxy_object, result, user_data) when it finishes.

- error_handler: If the asynchronous call raises an exception,
  error_handler(proxy_object, exception, user_data) is called when it
  finishes. If error_handler is not given, result_handler is called with
  the exception object as result instead.

- user_data: Optional user data to pass to result_handler for
  asynchronous calls.

Example for asynchronous calls:

  def mymethod_done(proxy, result, user_data):
      if isinstance(result, Exception):
          # handle error
      else:
          # do something with result

  proxy.MyMethod('(is)', 42, 'hello',
      result_handler=mymethod_done, user_data='data')
c                     [        X5      $ r   )r   )r   r/   s     r   __getattr__DBusProxy.__getattr__  s    #D//r#   r   N)r   r   r    r!   r   r   r"   r   r#   r   r   r     s    +X0r#   r   c                   ,    \ rS rSrS rS rS rS rSrg)	ListModeli  c                 b   [        U[        5      (       a?  [        UR                  [	        U 5      5      6  Vs/ s H  o R                  U5      PM     sn$ [        U[        5      (       a<  US:  a  U[	        U 5      -  nUS:  a  [        eU R                  U5      nUc  [        eU$ [        es  snf Nr   )	r   slicer   indicesr   get_itemint
IndexErrorrl   )r   r   ir   s       r   r   ListModel.__getitem__  s    c5!!.3S[[T5K.LM.LMM!$.LMMS!!Qws4y Qw  --$C{  JO Ns   B,c                     U R                  5       R                  n[        X5      (       d'  [        SUR                  < SUR
                  < 35      eU  H
  nX1:X  d  M
    g   g)NExpected type r&   TF)get_item_typepytyper   rl   r   r   )r   itemr  r
  s       r   r   ListModel.__contains__  sY    ##%,,$'')/):):FOOLN NAy  r#   c                 "    U R                  5       $ r   )get_n_itemsr   s    r   r   ListModel.__len__  s    !!r#   c              #   h   #    [        [        U 5      5       H  nU R                  U5      v   M     g 7fr   )r   r   r  )r   r
  s     r   r   ListModel.__iter__  s'     s4y!A--"" "s   02r   N)	r   r   r    r!   r   r   r   r   r"   r   r#   r   r  r    s    "#r#   r  )r   9   r'   c                 n    U R                  X/ 5        [        U5       H  nU R                  X5        M     g r   )splicereversedinsert)r   position
n_removals	additionsr   s        r   _list_store_splicer    s+    H"-)$AKK$ %r#   c                 (    U R                  XU5        g r   )r  )r   r  r  r  s       r   r  r    s    H)4r#   c                   F   ^  \ rS rSrU 4S jrU 4S jrS rS rS rSr	U =r
$ )	ListStorei  c                 D   > [        U5      n[        [        U ]  " U/UQ76 $ r   )r	   r*   r"  sort)r   compare_funcrz   rR   s      r   r$  ListStore.sort  s$    0>Y*<D)DDr#   c                 D   > [        U5      n[        [        U ]  " X/UQ76 $ r   )r	   r*   r"  insert_sorted)r   r  r%  rz   rR   s       r   r(  ListStore.insert_sorted  s,    0>Y3,!*, 	,r#   c                    [        U[        5      (       a  UR                  [        U 5      5      u  p#nUS:X  a  [	        X[        X2-
  S5      / 5        g US:X  a  [	        XS-   [        X#-
  S5      / 5        g [        [        X#U5      SS9 H  nU R                  U5        M     g [        U[        5      (       aA  US:  a  U[        U 5      -  nUS:  d  U[        U 5      :  a  [        eU R                  U5        g [        e)Nr'   r   r(   T)reverse)r   r  r  r   r  maxsortedr   remover  r	  rl   )r   r   startstopstepr
  s         r   __delitem__ListStore.__delitem__   s    c5!! #CI 6Eqy"4DL!0DbI"43u|Q3GLe4 8$GAKKN HS!!Qws4y Qw#T*  KKOr#   c           	         [        U[        5      (       Ga)  U R                  5       R                  n/ nU HK  n[        XS5      (       d'  [	        SUR
                  < SUR                  < 35      eUR                  U5        MM     UR                  [        U 5      5      u  pgnUS:X  a  [        X[        Xv-
  S5      U5        g [        [        XgU5      5      n	[        U	5      [        U5      :w  a  [        eUS:X  a#  [        XS-   [        Xg-
  S5      US S S2   5        g [        X5       H  u  p[        X
SU/5        M     g [        U[         5      (       a  US:  a  U[        U 5      -  nUS:  d  U[        U 5      :  a  ["        eU R                  5       R                  n[        X#5      (       d'  [	        SUR
                  < SUR                  < 35      e[        XSU/5        g [        e)Nr  r&   r'   r   r(   )r   r  r  r  rl   r   r   appendr  r   r  r,  listr   rs   zipr  r	  )r   r   r   r  	valuelistr   r/  r0  r1  r  r
  s              r   r   ListStore.__setitem__  s   c5!!'')00FI!!,,#"--v@A A   #  !$CI 6Eqy"T\1!5yB uU$78w<3y>1$$2:&QhEL!(<i"oO !$G 7*4As; !8S!!Qws4y Qw#T*  '')00Fe,,))6??<= = t!eW5Or#   c                 >    [        U5      nU R                  " X/UQ76 $ r   )r   find_with_equal_func_full)r   r  
equal_funcrz   s       r   find_with_equal_funcListStore.find_with_equal_func=  s$     0
;
--dKKKr#   r   )r   r   r    r!   r$  r(  r2  r   r=  r"   rT   rU   s   @r   r"  r"    s%    E,
&(TL Lr#   r"  c                        \ rS rSrS rS rSrg)DataInputStreamiI  c                     U $ r   r   r   s    r   r   DataInputStream.__iter__K  r   r#   c                 @    U R                  S 5      S   nUb  U$ [        er  )read_line_utf8r   )r   lines     r   r   DataInputStream.__next__N  s(    ""4(+Kr#   r   Nr   r   r#   r   r@  r@  I  s     r#   r@  c                       \ rS rSrS rSrg)Filei[  c                 N    U R                  5       nUb  US:X  a  [        S5      eU$ )N zFile has no associated path.)	peek_pathrl   )r   r   s     r   
__fspath__File.__fspath__]  s,    ~~ <42::;;r#   r   N)r   r   r    r!   rL  r"   r   r#   r   rH  rH  [  s    r#   rH  r   )+r-   _ossighelperr   r   	overridesr   r   r   r	   moduler
   gir   gi.repositoryr   r   r   __all__r   r5  r4   r6   r9   r<   r?   rW   r[   r^   ra   rd   r   r   r   r   r   r  MAJOR_VERSIONMINOR_VERSIONMICRO_VERSIONr  r"  r@  rH  r   r#   r   <module>rW     s  *  C h h -   
u%
B#// B {# } $ 
HC%% H 
H
   
2// 2 
2 # $ 
+#// + 
+ }  
=S'' = 
=6    
.S'' . 
.    
.S'' . 
.    
1-- 1 
1 " # 
,3## , 
, ~ G$ G$T Y	 { 
 S'' 
  .)   Os|| O H z > s|| > B H z @ @F.0 .0b Y	 {  #  #F Y	 {  	**D,>,>?*L%
5ML ML` Y	 {  c))   ?+   !388  ~ v r#   