%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/orca/scripts/apps/gcalctool/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/orca/scripts/apps/gcalctool/__pycache__/script.cpython-312.pyc |
� g f � � � d Z dZdZdZdZdZddlZ ej dd � dd lm Z ddl mc mc m Z ddlmZ ddlmZ ddlmZ G d � de j( � Zy)z'Provides a custom script for gcalctool.z$Id$z $Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.�LGPL� N�Atspiz2.0)r )�AXObject)�AXUtilitiesc � � e Zd Zd� Zd� Zd� Zy)�Scriptc �` � t j j | |� d| _ d| _ y)z�Creates a new script for the given application. Callers should use the getScript factory method instead of calling this constructor directly. Arguments: - app: the application to create a script for. N)�gtkr �__init__�_resultsDisplay�_statusLine)�self�apps �D/usr/lib/python3/dist-packages/orca/scripts/apps/gcalctool/script.pyr zScript.__init__- s( � � � � ���D�#�&�#������ c �x � | j r-| j r!t j j | |� yt j |j � t j j k7 r!t j j | |� yt j |j t j � | _ | j s| j t j � d� }t j |j |� | _ t j j | |� y)z�Called whenever one of gcalctool's toplevel windows is activated. Arguments: - event: the window activated Event Nc � � t j | � t j j k( xr t j | � S )N)r �get_roler �Role�TEXTr �is_editable)�xs r �isStatusLinez.Script.onWindowActivated.<locals>.isStatusLineN s4 � ��$�$�Q�'�5�:�:�?�?�:�]�;�CZ�CZ�[\�C]�?]�]r )r r r r �onWindowActivatedr r �sourcer r �FRAME�find_descendantr � is_editbar�presentMessage�messages�CALCULATOR_DISPLAY_NOT_FOUND)r �eventr s r r zScript.onWindowActivated; s� � � ���D�$4�$4��J�J�(�(��u�5�����U�\�\�*�e�j�j�.>�.>�>��J�J�(�(��u�5��'�7�7����k�F\�F\�]����#�#����� E� E�F� ^� $�3�3�E�L�L�,�O���� � �$�$�T�5�1r c � � | j j |j | j � r5| j | j j | j � � yt j j | |� y)z�Called whenever text is inserted into gcalctool's text display. Arguments: - event: the text inserted Event N) � utilities�isSameObjectr r r � displayedTextr r �onTextInserted)r r"