
    g
f;                         d Z dZdZdZdZdZddlZddlZddlm	Z	 d	d
l
mZ d	dl
mZ dada G d de	j                        ZddZd Zedk(  r e        yy)z$Displays the Save Profile As dialog.z$Id$z
$Revision$z$Date$z2Copyright (c) 2010 Consorcio Fernando de los Rios.LGPL    N)Gtk   )	guilabels)
orca_statec                   *    e Zd Zd Zd Zd Zd Zd Zy)OrcaProfileGUIc                    t         j                  j                  |        | j                  t        j
                         | j                  d       | j                  dt         j                  j                         | j                  dt         j                  j                         t        j                         }|j                  dd       |j                  d       |j                  d       | j                         }|j!                  |ddd       t        j"                         | _        | j$                  j                  d	d       | j$                  j'                  d       |j)                  | j$                  d
dd
d
       t        j*                  t        j,                        }|j/                  d       |j1                  | j$                         |j)                  |ddd
d
       | j3                  t         j                  j                        }|j                  dd       |j                  dd       | j5                  d| j6                         | j5                  d| j8                         d| _        d| _        d| _        y)z.Initialize the Orca profile configuration GUI.Fz
gtk-cancelzgtk-savemargin   
   Tr   hexpandr   zcan-defaultzhas-defaultresponsedestroyN) r   Dialog__init__	set_titler   PROFILE_SAVE_AS_TITLEset_has_resize_grip
add_buttonResponseTypeCANCELACCEPTGridset_propertyset_row_spacingset_column_spacingget_content_area
pack_startEntryprofileEntryset_activates_defaultattachLabelPROFILE_NAME_LABELset_use_underlineset_mnemonic_widgetget_widget_for_responseconnect
onResponse	onDestroysearchStringprofileStringprefsDialog)selfgridcontentArealabeldefaultButtons        7/usr/lib/python3/dist-packages/orca/orca_gui_profile.pyr   zOrcaProfileGUI.__init__*   s    	

D!y667  'c&6&6&=&=>
C$4$4$;$;<xxz(B'R # ++-tT43IIK&&y$7//5D%%q!Q2		)667%!!$"3"34E1aA&44S5E5E5L5LM""=$7""=$7Z1Y/ !    c                     d| _         y )N )r-   )r/   s    r4   initzOrcaProfileGUI.initS   s
    r5   c                    | j                          || _        | j                  j                  | j                         t
        j                  j                  }|dk(  rt        j                         }| j                  |       y)z Show the Save Profile As dialog.r   N)show_allr.   r!   set_textr-   r   lastInputEvent	timestampr   get_current_event_timepresent_with_time)r/   r.   tss      r4   showGUIzOrcaProfileGUI.showGUIV   sc     	&""4#5#56&&007++-Br"r5   c                    |t         j                  j                  t         j                  j                  fv r| j	                          y|t         j                  j
                  k(  r]| j                  j                         at        r| j                          | j                  r | j                  j                  t               yyy)z7Signal handler for the responses emitted by the dialog.N)r   r   r   DELETE_EVENThider   r!   get_text
newProfiler   r.   saveProfile)r/   widgetr   s      r4   r*   zOrcaProfileGUI.onResponseb   s     ((//1A1A1N1NOOIIKs''... **335J  ,,Z8   /r5   c                     da y)z6Signal handler for the 'destroy' signal of the dialog.N)OS)r/   rH   s     r4   r+   zOrcaProfileGUI.onDestroyr   s	    
 r5   N)__name__
__module____qualname__r   r8   rA   r*   r+    r5   r4   r	   r	   (   s    ' R 
#9 r5   r	   c                 z    d a t        st               at        j                          t        j	                  |        y N)rF   rJ   r	   r8   rA   )r.   s    r4   showProfileUIrQ   y   s)     J
	JJ{r5   c                      t        j                  t         j                  d       t                t	        j
                          t        j                  d       y )Nr7   r   )locale	setlocaleLC_ALLrQ   r   mainsysexitrN   r5   r4   rV   rV      s/    
V]]B'OHHJHHQKr5   __main__rP   )__doc____id____version____date____copyright____license__rS   rW   gi.repositoryr   r7   r   r   rJ   rF   r   r	   rQ   rV   rK   rN   r5   r4   <module>ra      sm   , +D  
   	
OSZZ Ob
 zF r5   