%PDF- %PDF-
Mini Shell

Mini Shell

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

�

g
ft ����dZdZdZdZdZdZddlZddlZddlm	Z	ddl
Z
d	d
lmZd	dlm
Z
d	dlmZd	d
lmZd	dlmZd	dlmZdaGd�dej&�Zd�Zd�Zedk(re�yy)z'Displays a GUI for the Orca Find windowz$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2009 Sun Microsystems Inc.�LGPL�N)�Gtk�)�find)�	guilabels)�orca_gtkbuilder)�
orca_state)�
orca_platform)�script_managerc�T�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�OrcaFindGUIc��tjj|||�d|_d|_d|_d|_d|_d|_d|_	y)z�Initialize the Orca configuration GUI.

        Arguments:
        - fileName: name of the GtkBuilder file.
        - windowName: name of the component to get from the GtkBuilder file.
        N)
r�GtkBuilderWrapper�__init__�activeScript�
caseSensitive�matchEntireWord�searchBackwards�searchString�
startAtTop�
windowWrap)�self�fileName�
windowNames   �4/usr/lib/python3/dist-packages/orca/orca_gui_find.pyrzOrcaFindGUI.__init__,sR��	�)�)�2�2�4��:�N� ���!���#���#��� ���������c��d|_d|_d|_d|_d|_d|_t
j�j�|_	y)N�FT)
rrrrrrr�
getManager�getActiveScriptr)rs r�initzOrcaFindGUI.init=sJ�����$���"���$���������*�5�5�7�G�G�I��rc���|jd�}tjj}|dk(rt	j
�}|j
|�	|jd�}|jtjj�|jdt|j���tjjr |jd�jd�|jd�jtjj�|jd�jtjj �|jd�jtjj"�|jd	�jtjj$�y
#t&$rYy
wxYw)z_Show the Orca Find dialog. This assumes that the GUI has
        already been created.
        �
findDialogr�searchForEntry�topRadioButtonT�matchCaseCheckbox�matchEntireWordCheckbox�wrapAroundCheckbox�searchBackwardsCheckboxN)�
get_widgetr	�lastInputEvent�	timestampr�get_current_event_time�present_with_time�set_text�searchQueryr�
select_region�len�get_textr�
set_activerrrr�	Exception)rr#�tsr$s    r�showGUIzOrcaFindGUI.showGUIHsg��
�_�_�\�2�
�
�
&�
&�
0�
0��
��7��+�+�-�B��$�$�R�(�	�!�_�_�-=�>�N��#�#�J�$:�$:�$G�$G�H��(�(��C��0G�0G�0I�,J�K��%�%�0�0���� 0�1�<�<�T�B��O�O�/�0�;�;��&�&�4�4�
6��O�O�5�6�A�A��&�&�6�6�
8��O�O�0�1�<�<��&�&�1�1�
3��O�O�5�6�A�A��&�&�6�6�
8���	��	�s�E=G�	G!� G!c���|j�|_|jd�}t|j�dkDr|j	d�y|j	d�y)z�Signal handler for the "changed" signal for the
           searchForEntry GtkEntry widget. The user has changed
           the string to be searched for.

        Arguments:
        - widget: the component that generated the signal.
        �
findButtonrTFN)r3rr*r2�
set_sensitive)r�widgetr9s   r�searchForEntryChangedz!OrcaFindGUI.searchForEntryChangedisP��#�O�O�-����_�_�\�2�
��t� � �!�A�%��$�$�T�*��$�$�U�+rc��|j�r1|j�tjk(rd|_yd|_yy)aSignal handler for the "toggled" signal for the
           currentLocationRadioButton or topRadioButton GtkRadioButton
           widgets. The user has toggled the starting point for the search.

        Arguments:
        - widget: the component that generated the signal.
        FTN)�
get_active�	get_labelr�FIND_START_AT_CURRENT_LOCATIONr�rr;s  r�startingPointChangedz OrcaFindGUI.startingPointChangedys:���������!�Y�%M�%M�M�"'���"&���	rc�.�|j�|_y)z�Signal handler for the "toggled" signal for the
           matchCaseCheckbox GtkCheckButton widget. The user has
           [un]checked the "Match Case" checkbox.

        Arguments:
        - widget: the component that generated the signal.
        N)r>rrAs  r�matchCaseCheckedzOrcaFindGUI.matchCaseChecked�s��$�.�.�0��rc�.�|j�|_y)aSignal handler for the "toggled" signal for the
           matchEntireWordCheckbox GtkCheckButton widget.
           The user has [un]checked the "Match entire word"
           checkbox.

        Arguments:
        - widget: the component that generated the signal.
        N)r>rrAs  r�matchEntireWordCheckedz"OrcaFindGUI.matchEntireWordChecked���� &�0�0�2��rc�.�|j�|_y)aSignal handler for the "toggled" signal for the
           searchBackwardsCheckbox GtkCheckButton widget.
           The user has [un]checked the "Search backwards"
           checkbox.

        Arguments:
        - widget: the component that generated the signal.
        N)r>rrAs  r�searchBackwardsCheckedz"OrcaFindGUI.searchBackwardsChecked�rGrc�.�|j�|_y)z�Signal handler for the "toggled" signal for the
           wrapAroundCheckbox GtkCheckButton widget. The user has
           [un]checked the "Wrap around" checkbox.

        Arguments:
        - widget: the component that generated the signal.
        N)r>rrAs  r�wrapAroundCheckedzOrcaFindGUI.wrapAroundChecked�s��!�+�+�-��rc�B�|jd�j�y)z�Signal handler for the "clicked" signal for the cancelButton
           GtkButton widget. The user has clicked the Cancel button.
           Hide the dialog.

        Arguments:
        - widget: the component that generated the signal.
        r#N)r*�hiderAs  r�closeButtonClickedzOrcaFindGUI.closeButtonClicked�s��	
����%�*�*�,rc��tj�t_|jtj_|j
tj_|jtj_|jtj_|jtj_|jtj_	d|j_|jd�j�y)aSignal handler for the "clicked" signal for the findButton
           GtkButton widget. The user has clicked the Find button.
           Call the method to begin the search.

        Arguments:
        - widget: the component that generated the signal.
        Tr#N)r�SearchQueryr	r0rrrrrrr�findCommandRunr*�destroyrAs  r�findButtonClickedzOrcaFindGUI.findButtonClicked�s���"&�!1�!1�!3�
��.2�.?�.?�
���+�15�1E�1E�
���.�/3�/A�/A�
���,�15�1E�1E�
���.�,0�O�O�
���)�,0�O�O�
���)�+/����(�	
����%�-�-�/rc��day)z�Signal handler for the "destroyed" signal for the findDialog
           GtkWindow widget. Reset OS to None.

        Arguments:
        - widget: the component that generated the signal.
        N)�OSrAs  r�findDialogDestroyedzOrcaFindGUI.findDialogDestroyed�s	���rN)�__name__�
__module__�__qualname__rr!r7r<rBrDrFrIrKrNrSrV�rrr
r
*s@���"	J��B,� 
'�	1�
3�
3�	.�	-�0�0
rr
c���ts^tjjtj
tjdd�}t|d�atj�tj�y)N�uizorca-find.uir#)
rU�os�path�joinr
�datadir�packager
r!r7)�uiFiles r�
showFindUIrc�sP��������m�3�3�+�3�3�"�,�.�����
.��
���	��J�J�Lrc��tjtjd�t�t	j
�t
jd�y)Nrr)�locale�	setlocale�LC_ALLrcr�main�sys�exitrZrrrhrh�s/��
���V�]�]�B�'��L��H�H�J��H�H�Q�Kr�__main__)�__doc__�__id__�__version__�__date__�
__copyright__�__license__r]ri�
gi.repositoryrrerrrrr	r
rrUrr
rcrhrWrZrr�<module>rssy��(.�������?�
���	�
��
�������	��y�/�3�3�y�v���z���F�r

Zerion Mini Shell 1.0