%PDF- %PDF-
Direktori : /lib/python3/dist-packages/orca/__pycache__/ |
Current File : //lib/python3/dist-packages/orca/__pycache__/spellcheck.cpython-312.pyc |
� g f�* � � � d Z dZdZdZdZdZddlZddlmZ dd lm Z dd lm Z ddlmZ ddlmZ dd lm Z ddlmZ ddlmZ ddlmZ G d� d� Zy)z:Script-customizable support for application spellcheckers.z$Id$z $Revision$z$Date$zCopyright (c) 2014 Igalia, S.L.�LGPL� N)�debug)� focus_manager)� guilabels)�messages)�object_properties)�settings_manager)�AXObject)�AXText)�AXUtilitiesc �� � e Zd Zdd�Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� Zd� Zd� Zd� Zd d�Zd d�Zd d�Zd!d�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zy)"� SpellCheckc � � || _ || _ d | _ d | _ d | _ d | _ d| _ d| _ d | _ d | _ d | _ y )NF)N���)�_script�_hasChangeToEntry�_window�_errorWidget�_changeToEntry�_suggestionsList� _activated�_documentPosition�spellErrorCheckButton�spellSuggestionCheckButton�presentContextCheckButton)�self�script�hasChangeToEntrys �1/usr/lib/python3/dist-packages/orca/spellcheck.py�__init__zSpellCheck.__init__- sW � ����!1������ ���"��� $������!)���%)��"�*.��'�)-��&� c � � d|g}t j t j |d� | j |� s+d|dg}t j t j |d� y| j rJ| j |� | _ | j s(d}t j t j |d� y| j |� | _ | j s(d}t j t j |d� y| j |� | _ | j s(d}t j t j |d� y|| _ d| _ d }t j t j |d� y) Nz&SPELL CHECK: Attempting activation forTzSPELL CHECK:zis not spellcheck windowFz&SPELL CHECK: Change-to entry not foundz#SPELL CHECK: Error widget not foundz'SPELL CHECK: Suggestions list not foundz SPELL CHECK: Activation complete)r �printTokens� LEVEL_INFO�_isCandidateWindowr �_findChangeToEntryr �printMessage�_findErrorWidgetr �_findSuggestionsListr r r )r �window�tokens�msgs r �activatezSpellCheck.activate; sE � �:�F�C�� ���%�*�*�F�D�9��&�&�v�.�$�f�.H�I�F����e�.�.���=���!�!�"&�"9�"9�&�"A�D���&�&�>���"�"�5�#3�#3�S�$�?�� �1�1�&�9���� � �7�C����u�/�/��d�;�� $� 9� 9�&� A����$�$�;�C����u�/�/��d�;��������0�� ���5�+�+�S�$�7�r! c �$ � | j � y �N)�_clearState�r s r � deactivatezSpellCheck.deactivate\ s � ����r! c � � | j S r/ �r r1 s r �getDocumentPositionzSpellCheck.getDocumentPosition_ s � ��%�%�%r! c � � ||f| _ y r/ r4 )r �obj�offsets r �setDocumentPositionzSpellCheck.setDocumentPositionb s � �!$�f���r! c � � | j S r/ )r r1 s r �getErrorWidgetzSpellCheck.getErrorWidgete s � �� � � r! c �z � | j sy| j j j | j � S �N� �r r � utilities� displayedTextr1 s r �getMisspelledWordzSpellCheck.getMisspelledWordh �/ � �� � ���|�|�%�%�3�3�D�4E�4E�F�Fr! c �z � | j sy| j j j | j � S r= r? r1 s r �getCompletionMessagezSpellCheck.getCompletionMessagen rC r! c � � | j S r/ )r r1 s r �getChangeToEntryzSpellCheck.getChangeToEntryt s � ��"�"�"r! c � � | j S r/ )r r1 s r �getSuggestionsListzSpellCheck.getSuggestionsListw s � ��$�$�$r! c � � | j S r/ )r r1 s r �isActivezSpellCheck.isActivez s � ����r! c �H � |r|| j k( ry| j |� S )NT)r r- �r r* s r � isCheckWindowzSpellCheck.isCheckWindow} s"