%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/orca/scripts/web/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/orca/scripts/web/__pycache__/bookmarks.cpython-312.pyc

�

g
f���Z�dZdZdZdZdZddlmZddlmZGd�d	ej�Zy
)z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.�LGPL�)�	bookmarks)�messagesc�>��eZdZ�fd�Zd�Zdd�Zd�Zd�Zd�Z�xZ	S)�	Bookmarksc�2��t�|�|�i|_y�N)�super�__init__�_currentbookmarkindex)�self�script�	__class__s  ��</usr/lib/python3/dist-packages/orca/scripts/web/bookmarks.pyrzBookmarks.__init__ s���
���� �%'��"�c��|j|j�f}|jjj	�\}}|j�}||f|j|<|jjtj�y)z?Add an in-page accessible object bookmark for this key and URI.N)
�hw_code�	getURIKey�_script�	utilities�getCaretContext�
_objToPath�
_bookmarks�presentMessager�BOOKMARK_ENTERED)r
r�
inputEvent�index�obj�characterOffset�paths       r�addBookmarkzBookmarks.addBookmark$so���#�#�T�^�^�%5�6��#�|�|�5�5�E�E�G���_���� ��!%��!6���������#�#�H�$=�$=�>rc�F�|xs|j|j�f}	|j|\}}|j
|�}|s|jj�y|jjj||�|jjj||�}|jj|�|jj|�|d|j|d<y#t$r|jj�YywxYw)z;Go to the bookmark indexed at this key and this page's URI.Nr�)
rrr�KeyErrorr�
systemBeep�	pathToObjr�setCaretPosition�getObjectContentsAtOffset�
speakContents�displayContentsr)r
rrrr �offsetr�contentss        r�goToBookmarkzBookmarks.goToBookmark-s����?�*�,�,�d�n�n�.>�?��	��?�?�5�1�L�D�&�
�n�n�T�"����L�L�#�#�%�������/�/��V�<��<�<�)�)�C�C�C��P�����"�"�8�,����$�$�X�.�/4�Q�x��"�"�5��8�,���	��L�L�#�#�%��	�s�C:�:#D �D c�|�i}|jj�D]\}}|d|df||<�	|j|�|jj	t
j�|jD]	}|��y#t$r,|jj	t
j�Y�MwxYw)z#Save the bookmarks for this script.rr#N)
r�items�saveBookmarksToDiskrrr�BOOKMARKS_SAVED�IOError�BOOKMARKS_SAVED_FAILURE�_saveObservers)r
rr�savedr�bookmark�os       r�
saveBookmarkszBookmarks.saveBookmarksBs�����#���4�4�6�	4�O�E�8�#�A�;����3�E�%�L�	4�	J��$�$�U�+��L�L�'�'��(@�(@�A��$�$�	�A�
�C�	���	J��L�L�'�'��(H�(H�I�	J�s�:B�2B;�:B;c�j�t|jj��}|j�}g}|D]}|d|k(s�|j	|d��!|j�t
|�dk(r|jj�yt
|�dk(s||jvr|jd|d|f��y	|j|j|�}|jd||dz|f��y#tttf$r|jd|d|f��YywxYw)z!Go to the next bookmark location.r#rN�r��listr�keysr�append�sort�lenrr%rr-r�
ValueErrorr$�
IndexError�r
rr�bm_keys�current_uri�thispage_hwkeys�bm_keyrs        r�goToNextBookmarkzBookmarks.goToNextBookmarkRs:���t���+�+�-�.���n�n�&�����	2�F��a�y�K�'��&�&�v�a�y�1�	2�	�������1�$��L�L�#�#�%�����1�$��4�;U�;U�(U����d�?�1�+=�{�*K��L��	M�#�)�)�$�*D�*D�[�*Q�R�E����d�?�5��7�+C�[�*Q��R���H�j�1�	M����d�?�1�+=�{�*K��L�	M���	9D�,D2�1D2c�j�t|jj��}|j�}g}|D]}|d|k(s�|j	|d��!|j�t
|�dk(r|jj�yt
|�dk(s||jvr|jd|d|f��y	|j|j|�}|jd||dz
|f��y#tttf$r|jd|d|f��YywxYw)z%Go to the previous bookmark location.r#rNr:r;rCs        r�goToPrevBookmarkzBookmarks.goToPrevBookmarkps:���t���+�+�-�.���n�n�&�����	2�F��a�y�K�'��&�&�v�a�y�1�	2�	�������1�$��L�L�#�#�%�����1�$��4�;U�;U�(U����d�?�1�+=�{�*K��L��	M�#�)�)�$�*D�*D�[�*Q�R�E����d�?�5��7�+C�[�*Q��R���H�j�1�	M����d�?�1�+=�{�*K��L�	M�rIr	)
�__name__�
__module__�__qualname__rr!r-r8rHrK�
__classcell__)rs@rrrs#���(�?�8�*� M�<MrrN)	�__id__�__version__�__date__�
__copyright__�__license__�orcarrr�rr�<module>rWs<��(������?�
�����kM�	�#�#�kMr

Zerion Mini Shell 1.0