
    g
f                         d Z dZdZdZdZdZddlZ ej                  dd	       dd
lm	Z	 ddl
mZ ddlmc mZ ddlmZ  G d dej"                        Zy)zCustom script for Gajim.z$Id$z
$Revision$z$Date$z#Copyright (c) 2010 Joanmarie Diggs.LGPL    NAtspiz2.0)r   )AXUtilitiesc                   <    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
y	)
Scriptc                    t         j                  j                  t         j                  j                  t         j                  j                  t         j                  j
                  t         j                  j                  t         j                  j                  gg| _        t        j                  j                  | |       y)z/Creates a new script for the given application.N)r   RoleTABLESCROLL_PANEFILLER
SPLIT_PANEFRAME_buddyListAncestriesdefaultr   __init__)selfapps     @/usr/lib/python3/dist-packages/orca/scripts/apps/gajim/script.pyr   zScript.__init__,   sw    
 ',jj&6&6&+jj&<&<&+jj&7&7&+jj&;&;&+jj&7&7&+jj&6&6&8 %9! 	c*    c                 B    t        j                  | | j                        S )z)Returns the 'chat' class for this script.)chatChatr   r   s    r   getChatzScript.getChat:   s     yyt8899r   c                     t         j                  j                  |        | j                  j	                  | j
                  j                         y)zDefines InputEventHandler fields for this script that can be
        called by the key and braille bindings. Here we need to add the
        handlers for chat functionality.
        N)r   r   setupInputEventHandlersinputEventHandlersupdater   r   s    r   r   zScript.setupInputEventHandlers?   s4     	..t4&&tyy'C'CDr   c                 .    | j                   j                  S )z=Returns the application-specific keybindings for this script.)r   keyBindingsr   s    r   getAppKeyBindingszScript.getAppKeyBindingsH   s     yy$$$r   c                 6    | j                   j                         S )zReturn a GtkGrid containing the application unique configuration
        GUI items for the current application. The chat-related options get
        created by the chat module.)r   getAppPreferencesGUIr   s    r   r#   zScript.getAppPreferencesGUIM   s    
 yy--//r   c                 6    | j                   j                         S )z7Returns a dictionary with the app-specific preferences.)r   getPreferencesFromGUIr   s    r   r%   zScript.getPreferencesFromGUIT   s     yy..00r   c                 |    | j                   j                  |      ryt        j                  j	                  | |       y)z+Called whenever text is added to an object.N)r   presentInsertedTextr   r   onTextInsertedr   events     r   r(   zScript.onTextInsertedY   s-     99((/%%dE2r   c                     t        j                  |j                         t        j                  j                  | |       y)z/Called whenever a toplevel window is activated.N)r   find_all_page_tabssourcer   r   onWindowActivatedr)   s     r   r.   zScript.onWindowActivateda   s*     	&&u||4((u5r   N)__name__
__module____qualname__r   r   r   r!   r#   r%   r(   r.    r   r   r   r   *   s+    +:
E%
01
36r   r   )__doc____id____version____date____copyright____license__girequire_versiongi.repositoryr   	orca.chatr   orca.scripts.defaultscriptsr   orca.ax_utilitiesr   r   r2   r   r   <module>r@      sW   ( 5 	   7E "   & & )>6W^^ >6r   