HOME


Mini Shell 1.0
DIR: /usr/lib/python3/dist-packages/gi/overrides/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/gi/overrides/__pycache__/Gio.cpython-312.pyc
�

��fYI�� �ddlZddlmZmZddlmZmZmZddlm	Z	ddl
mZddlm
Z
ddlZe	d�ZgZGd	�d
ej"�Zee�Zej%d
�d-d�ZeGd�d
ej(��Zej%d
�eGd�dej*��Zej%d�eGd�dej,��Zej%d�eGd�dej.��Zej%d�eGd�dej0��Zej%d�eGd�dej2��Zej%d�eGd�dej4��Zej%d�Gd�dej6�Zee�Zej%d�Gd�dej8�Zee�Zej%d�Gd�dej:�Zee�Zej%d�Gd �d!ej<�Zee�Zej%d!�Gd"�d#�ZGd$�d%ej@�Z ee �Z ej%d%�Gd&�d'ejB�Z!ee!�Z!ej%d'�e
jDe
jFe
jHfd(krd)�Z%nd*�Z%Gd+�d,ejL�Z&ee&�Z&ej%d,�y).�N�)�wakeup_on_signal�register_sigint_fallback)�override�deprecated_init�wrap_list_store_sort_func)�get_introspection_module)�PyGIWarning)�GLib�Gioc��eZdZd�Zy)�Applicationc���t|j�5t�5tjj
|g|��i|��cddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw�N)r�quitrrr�run)�self�args�kwargss   �2/usr/lib/python3/dist-packages/gi/overrides/Gio.pyrzApplication.run'sz��
%�d�i�i�
0�	B�!�#�
B����*�*�4�A�$�A�&�A�
B�
B�	B�	B�
B�
B��
B�	B�	B�	B�s"�A-�#A�	A-�A 	�A-�-A6N)�__name__�
__module__�__qualname__r��rrr%s��Brrc������fd�}|S)Nc�
��t�|�|i|���jjdd�ddz�jz}�r#tj|�d��d�td��ytj|�d�td��y)	N�.����z) shouldn't be instantiated directly, use z	 instead.r)�
stacklevelz$ shouldn't be instantiated directly.)�super�__init__r�rsplitr�warnings�warnr
)rrr�name�cls�insteads    ��r�new_initz_warn_init.<locals>.new_init3sw���
�c�4�!�4�2�6�2��~�~�$�$�S�!�,�R�0�3�6����E����M�M�&*�G�5���
+�

�M�M�<@�B���
+rr)r(r)r*s`` r�
_warn_initr+1s���+��Orc�2�eZdZeej
d�Zy)�
VolumeMonitorzGio.VolumeMonitor.get()N)rrrr+rr-r#rrrr-r-Cs���#�+�+�-F�G�Hrr-c�0�eZdZeej
�Zy)�DBusAnnotationInfoN)rrrr+rr/r#rrrr/r/Ls���#�0�0�1�Hrr/c�0�eZdZeej
�Zy)�DBusArgInfoN)rrrr+rr1r#rrrr1r1Ts���#�/�/�*�Hrr1c�0�eZdZeej
�Zy)�DBusMethodInfoN)rrrr+rr3r#rrrr3r3\����#�,�,�-�Hrr3c�0�eZdZeej
�Zy)�DBusSignalInfoN)rrrr+rr6r#rrrr6r6dr4rr6c�0�eZdZeej
�Zy)�DBusInterfaceInfoN)rrrr+rr8r#rrrr8r8ls���#�/�/�0�Hrr8c�0�eZdZeej
�Zy)�DBusNodeInfoN)rrrr+rr:r#rrrr:r:ts���#�*�*�+�Hrr:c��eZdZdd�Zy)�	ActionMapNc�z���	t|�		d��fd�	}|D]}||��	y#t$rtd��wxYw)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
        zentries must be iterableNc���|rQtjj|�std|�d|�d���tjj	|�}nd}|�Ytj
j
d|dd�}tjj|||�}|�?|jd|�	�n+|�td|�d|�d���tj||��}|�|jd	|�	��j|�y)
NzThe type string 'z*' given as the parameter type for action 'z'' is not a valid GVariant type string. zchange-statezStateless 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'r@r?�state�change_state�variant_parameter�
variant_state�actionr�	user_datas
        ��r�_process_actionz5ActionMap.add_action_entries.<locals>._process_action�s�����'�'�7�7��G�#�&4�T�%;�<�<�%)�$4�$4�$8�$8��$H�!�$(�!�� � $��� 2� 2�4���d� K�
��)�)�6�6�t�=N�7D�F���+��N�N�>�<��K� �+�$�&*�L�&:�;�;��)�)�t�DU�)�V���#����z�8�Y�?��O�O�F�#r)NNNN)�iterrC)r�entriesrQrR�entrys` `  r�add_action_entrieszActionMap.add_action_entries}sV���@	8���M�AE�59�	$�>�	$�E��U�#�	$��E�	8��6�7�7�	8�s�%�:r)rrrrVrrrr<r<|s��F$rr<c��eZdZd�Zd�ZeZy)�FileEnumeratorc��|Srr�rs r�__iter__zFileEnumerator.__iter__�s���rc�8�|jd�}|�|St�r)�	next_file�
StopIteration)r�	file_infos  r�__next__zFileEnumerator.__next__�s"���N�N�4�(�	�� ����rN)rrrr[r`�nextrrrrXrX�s��� ��DrrXc��eZdZd�Zy)�MenuItemc�f�|D],\}}}|j|tj||���.yr)�set_attribute_valuerrE)r�
attributesr'�
format_string�values     r�
set_attributezMenuItem.set_attribute�s5��,6�	O�(�T�=�%��$�$�T�4�<�<�
�u�+M�N�	OrN)rrrrirrrrcrc�s��Orrcc�z�eZdZdZeejjd��Zd�Zd�Z	d�Z
d�ZeZd�Z
d	�Zd
�Zy)�Settingsz0Provide dictionary-like access to GLib.Settings.)�schema�path�backend)�	arg_namesc�&�||j�vSr��	list_keys�r�keys  r�__contains__zSettings.__contains__�s���d�n�n�&�&�&rc�4�t|j��Sr)�lenrrrZs r�__len__zSettings.__len__�s���4�>�>�#�$�$rc#�>K�|j�D]}|���y�wrrqrss  rr[zSettings.__iter__�s!�����>�>�#�	�C��I�	�s�c��y)NTrrZs r�__bool__zSettings.__bool__�s��rc�d�||vrtd|����|j|�j�S)N�
unknown key: )�KeyError�	get_value�unpackrss  r�__getitem__zSettings.__getitem__s/���d�?���5�6�6��~�~�c�"�)�)�+�+rc	��||vrtd|����|j|�}|jd�j�}|jd�}|dk(r9|jd�j	�}|jd�sJ�|dd}�n|dk(r�|jd�j	�jd�sJ�|jd�jd�j	�}|j
�}||vr�td|�d|�d	���|d
k(rb|jd�}|jd�j	�}|j
�\}	}
||	ks||
kDr,td|�d|	�d|
�d	���td
t|�z��|j|tj||��y)Nr}rr�type�a�enumzvalue 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�rJ�NotImplementedError�str�	set_valuerrE)rrtrhr��type_�v�type_str�allowed�tuple_�min_�max_s           r�__setitem__zSettings.__setitem__s����d�?���5�6�6����s�#���%�%�a�(�3�3�5���!�!�!�$���F�?��(�(��+�;�;�=�H��&�&�s�+�+�+����|�H�
�f�_��$�$�Q�'�7�7�9�D�D�S�I�I�I��(�(��+�;�;�A�>�N�N�P�H��h�h�j�G��G�#� �5�RY�!Z�[�[�
�g�
��&�&�q�)�F��-�-�a�0�@�@�B�H�����J�D�$��t�|�u�t�|� �9>��d�K�M�M�&�&O�RU�V[�R\�&\�]�]����s�D�L�L��5�9�:rc�"�|j�SrrqrZs r�keysz
Settings.keys(s���~�~��rN)rrr�__doc__rrrkr#rurxr[r{�__nonzero__r�r�r�rrrrkrk�sJ��:��s�|�|�4�4�)F�H�H�'�%����K�,�;�B rrkc�2�eZdZdZd�Zd�Zd�Zed��Zy)�_DBusProxyMethodCallz1Helper class to implement DBusProxy method calls.c� �||_||_yr)�
dbus_proxy�method_name)rr�r�s   rr#z_DBusProxyMethodCall.__init__3s��$���&��rc���|\}}}	|j|�}|||j	|�|�y#t$r5tj�dd\}}	|r|||	|�Yy|||	|�YywxYw)Nr)�call_finish�	Exception�sys�exc_info�_unpack_result)
r�obj�resultrQ�result_callback�error_callback�real_user_data�ret�etype�es
          r�__async_result_handlerz+_DBusProxyMethodCall.__async_result_handler7s���<E�9��.�.�		��/�/�&�)�C�	��T�0�0��5�~�F���	��|�|�~�b�q�)�H�E�1���s�A�~�6�
� ��Q��7��	�s�3�/A1�$
A1�0A1c	�L�|r(|d}|dd}t|t�std|z��d}tj|t|��}d|vr||d|j
d�|j
d�f}|jj|j||j
dd�|j
d	d
�d|j|�y|jj|j||j
dd�|j
d	d
�d�}|j|�S)Nrrz6first argument must be the method signature string: %rz()�result_handler�
error_handlerrQ�flags�timeoutr )
�
isinstancer�rCrrE�tuple�getr��callr��*_DBusProxyMethodCall__async_result_handler�	call_syncr�)rrr�	signature�arg_variantrQr�s       r�__call__z_DBusProxyMethodCall.__call__Fs����Q��I����8�D��i��-�� X�[d� d�e�e��I��l�l�9�e�D�k�:���v�%�� 0�1����O�4����K�0�2�I�
�O�O� � ��!1�!1�;�!'���G�Q�!7����I�r�9R�TX�!%�!<�!<�i�
I�
�_�_�.�.�t�/?�/?��/5�z�z�'�1�/E�/5�z�z�)�R�/H�/3�5�F��&�&�v�.�.rc�p�|j�}t|�dk(r|d}|St|�dk(rd}|S)z?Convert a D-BUS return variant into an appropriate return valuerrN)r�rw)�klassr�s  rr�z#_DBusProxyMethodCall._unpack_resultcsE��������v�;�!���A�Y�F��
���[�A�
��F��
rN)	rrrr�r#r�r��classmethodr�rrrr�r�0s)��;�'�
G�/�:���rr�c��eZdZdZd�Zy)�	DBusProxya$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��t||�Sr)r�)rr's  r�__getattr__zDBusProxy.__getattr__�s��#�D�$�/�/rN)rrrr�r�rrrr�r�ss
��+�X0rr�c�$�eZdZd�Zd�Zd�Zd�Zy)�	ListModelc�D�t|t�r=t|jt	|���D�cgc]}|j|���c}St|t�r9|dkr|t	|�z
}|dkrt�|j|�}|�t�|St�cc}w)Nr)	r��slicer��indicesrw�get_item�int�
IndexErrorrC)rrt�ir�s    rr�zListModel.__getitem__�s����c�5�!�.3�S�[�[��T��5K�.L�M��D�M�M�!�$�M�M�
��S�
!��Q�w��s�4�y� ���Q�w� � ��-�-��$�C��{� � ��J��O��Ns�Bc��|j�j}t||�s%td|j�d|j
����|D]	}||k(s�	yy)N�Expected type rTF)�
get_item_type�pytyper�rCrr)r�itemr�r�s    rruzListModel.__contains__�s_���#�#�%�,�,���$��'��)/�):�):�F�O�O�L�N�
N��	�A��D�y��	�rc�"�|j�Sr)�get_n_itemsrZs rrxzListModel.__len__�s�����!�!rc#�dK�tt|��D]}|j|����y�wr)r�rwr�)rr�s  rr[zListModel.__iter__�s-�����s�4�y�!�	#�A��-�-��"�"�	#�s�.0N)rrrr�rurxr[rrrr�r��s��
��"�#rr�)r�9rc�n�|j||g�t|�D]}|j||��yr)�splice�reversed�insert)r�position�
n_removals�	additionsr�s     r�_list_store_splicer��s4�����H�j�"�-��)�$�	%�A��K�K��!�$�	%rc�*�|j|||�yr)r�)rr�r�r�s    rr�r��s�����H�j�)�4rc�4��eZdZ�fd�Z�fd�Zd�Zd�Z�xZS)�	ListStorec�B��t|�}tt|�|g|���Sr)rr"r��sort)r�compare_funcrQ�	__class__s   �rr�zListStore.sort�s$���0��>���Y��*�<�D�)�D�Drc�D��t|�}tt|�||g|���Sr)rr"r��
insert_sorted)rr�r�rQr�s    �rr�zListStore.insert_sorted�s.���0��>���Y��3��,�,�!*�,�	,rc���t|t�r�|jt|��\}}}|dk(rt	||t||z
d�g�y|dk(rt	||dzt||z
d�g�yt
t|||�d��D]}|j|��yt|t�r>|dkr|t|�z
}|dks|t|�k\rt�|j|�yt�)Nrrr T)�reverse)r�r�r�rwr��max�sortedr��remover�r�rC)rrt�start�stop�stepr�s      r�__delitem__zListStore.__delitem__�s����c�5�!� #���C��I� 6��E�4���q�y�"�4���D�5�L�!�0D�b�I����"�4����3�u�t�|�Q�3G��L���e�T�4� 8�$�G�#�A��K�K��N�#�
��S�
!��Q�w��s�4�y� ���Q�w�#��T��*� � ��K�K����Orc	��t|t��r%|j�j}g}|D]D}t||�s%t	d|j
�d|j����|j|��F|jt|��\}}}|dk(rt||t||z
d�|�ytt|||��}	t|	�t|�k7rt�|dk(r%t||dzt||z
d�|ddd��yt|	|�D]\}
}t||
d|g��yt|t �r�|dkr|t|�z
}|dks|t|�k\rt"�|j�j}t||�s%t	d|j
�d|j����t||d|g�yt�)Nr�rrrr )r�r�r�r�rCrr�appendr�rwr�r��listr�rJ�zipr�r�)rrtrhr��	valuelistr�r�r�r�r�r�s           rr�zListStore.__setitem__�s����c�5�!��'�'�)�0�0�F��I��
$��!�!�V�,�#�"�-�-�v���@�A�A�� � ��#�
$�!$���C��I� 6��E�4���q�y�"��%��T�E�\�1�!5�y�B��u�U�D�$�7�8���w�<�3�y�>�1�$�$��2�:�&��d�Q�h��E�D�L�!�(<�i��"��o�O�!$�G�Y� 7�<���1�*�4��A��s�;�<�
��S�
!��Q�w��s�4�y� ���Q�w�#��T��*� � ��'�'�)�0�0�F��e�V�,���)�)�6�?�?�<�=�=�
�t�S�!�e�W�5��Or)rrrr�r�r�r��
__classcell__)r�s@rr�r��s���E�,�
�&(rr�r)'r%�_ossighelperrr�	overridesrrr�moduler	�gir
�
gi.repositoryrr�r�__all__rr�r+r-r/r1r3r6r8r:r<rXrcrkr�r�r��
MAJOR_VERSION�
MINOR_VERSION�
MICRO_VERSIONr�r�rrr�<module>rs
��*�E�L�L�-���
��u�%��
��B�#�/�/�B��{�#�����}���$
�H�C�%�%�H�
�H�
�����
�2��/�/�2�
�2����#�$�
�+�#�/�/�+�
�+����}��
�.�S�'�'�.�
�.����� �
�.�S�'�'�.�
�.����� �
�1��-�-�1�
�1����"�#�
�,�3�#�#�,�
�,����~��G$��
�
�G$�T
�Y��	����{��
�S�'�'�
� �.�)������ �O�s�|�|�O��H������z��A �s�|�|�A �H�H������z��@�@�F.0��
�
�.0�b
�Y��	����{�� #��
�
� #�F
�Y��	����{��	����*�*�D�,>�,>�?�*�L�%�
5�F��
�
�F�R
�Y��	����{�r