+
    Qi= c                   s|   R t RtRtRtRtRt^ RIt]P                  ! RR4       ]P                  ! R	R
4       ]P                  ! RR
4       ^ RIH	t	 ^ RI
t
^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIt^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^R IH t  ^R!IH!t! ^R"IH"t" ^R#IH#t# ^R$IH$t$ ^R%I%H&t& ^R&I'H(t(H)t)  ^ RI*t*^R'IH,t, ]*'       d   ],'       g   Rt*]-! ].! ^
4      4      w
  t/t0t1t2t3t4t5t6t7t8]-! ].! ^4      4      w  t9t:t;t<]-! ].! ^4      4      w  t=t>]-! ].! ^4      4      w  t?t@tAtB]-! ].! ^4      4      w  tCtDtEtFtGtHtI]-! ].! ^4      4      w  tJtKtLtMtNtOtPtQtRtStTtUtVtWtXtY ! R( R)]P                  4      t[R#   ]+ d    Rt* Li ; i)*z4Displays a GUI for the user to set Orca preferences.z$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2009 Sun Microsystems Inc.ZLGPLNAtspiz2.0Gdkz3.0Gtk)r    )r   )GLib)r   )GObject)Pango)acss)debug)event_manager)	guilabels)messages)orca)orca_gtkbuilder)orca_gui_profile)orca_platform)script_manager)settings)settings_manager)input_event)input_event_manager)keybindings)pronunciation_dict)braille)speech_and_verbosity_manager)speechserver)AXObject)AXTextAXTextAttribute)	tablesdirc                   s  a  ] tR t^bt o RtR tR tR tR tRxR lt	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRyR ltR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/RzR- lt0R. t1RxR/ lt2R0 t3R1 t4R2 t5R3 t6RyR4 lt7R5 t8R6 t9R7 t:R{R8 lt;R{R9 lt<R: t=R; t>RxR< lt?R= t@R> tAR? tBR@ tCRA tDRB tERC tFRD tGRE tHRF tIRG tJRH tKRI tLRJ tMRK tNRL tORM tPRN tQRO tRRP tSRQ tTRR tURS tVRT tWRU tXRV tYRW tZRX t[RY t\RZ t]R[ t^R\ t_R] t`R^ taR_ tbR` tcRa tdRb teRc tfRd tgRe thRf tiRg tjRh tkRi tlRj tmRk tnR|Rl ltoRm tpRn tqRo trRp tsRq ttRr tuRs tvRt twRu txRv tyRwtzV t{R# )}OrcaSetupGUINc                s   \         P                  e   R# \        P                  P	                  \
        P                  \
        P                  RR4      p\        P                  P                  WR4       W n        RR.V n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n        RV n         RV n!        RV n"        RV n#        . V n$        RV n%        RV n&        RV n'        RV n(        RV n)        RV n*        RV n+        RV n,        RV n-        RV n.        RV n/        RV n0        RV n1        RV n2        / V n3        / V n4        RV n5        RV n6        RV n7        . V n8        Wn9        V Pu                  4        RV n;        R# )z&Initialize the Orca configuration GUI.NZuizorca-setup.uiorcaSetupWindowZDefaultdefaultF)<r   DIALOGospathjoinr   ZdatadirZpackager   GtkBuilderWrapper__init__	prefsDict_defaultProfile	bbindingscellRendererTextdefaultVoicedisableKeyGrabPrefgetTextAttributesViewhyperlinkVoiceinitializingSpeech	kbindingskeyBindingsModelkeyBindView
newBindingpendingKeyBindingsplaneCellRendererTextpronunciationModelpronunciationViewscreenHeightscreenWidthspeechFamiliesChoicespeechFamiliesChoicesspeechFamiliesModelspeechLanguagesChoicespeechLanguagesChoicesspeechLanguagesModelspeechFamiliesspeechServersChoicespeechServersChoicesspeechServersModelspeechSystemsChoicespeechSystemsChoicesspeechSystemsModelsystemVoiceuppercaseVoicewindowworkingFactories	savedGain
savedPitch	savedRate_isInitialSetupselectedFamilyChoicesselectedLanguageChoicesprofilesComboprofilesComboModelstartingProfileCombo_capturedKeyscriptinit!_pending_already_bound_message_id)selfrT   r&   ZfileName   &&& 8/usr/lib/python3.14/site-packages/orca/orca_gui_prefs.pyr%   ZOrcaSetupGUI.__init__f   s    *77<< 5 5}7L7LdSbc))224CTU" )95 $ "&%)"""& $"&%)""&!% $(!%)"#' %)"&*#$(! #' $(!"&#' $(!"&" $$%'"')$!"&$(!		15.    c                s(   \         P                  e   R#  \        P                  ! 4       P	                  R4      pV\
        P                  ,          p V\        P                  P                  ,          V n         V\        P                  P                  ,          V n         V\        P                  P                  ,          V n        V P!                  R4      V n        V P"                  P%                  4       '       d=   V P"                  P%                  4        F  pV P"                  P'                  V4       K   	  \(        P*                  ! \,        P.                  \,        P.                  \,        P.                  \,        P.                  \,        P.                  \,        P.                  \,        P.                  \,        P.                  \,        P0                  \,        P0                  4
      V n        \(        P4                  ! 4       V n        \(        P4                  ! 4       V n        V P8                  P;                  R\<        P>                  P@                  4       \(        PB                  ! RV P6                  \D        R	7      pVPG                  R
4       VPI                  R4       VPK                  \D        4       V P"                  PM                  V4       \(        PB                  ! \N        PP                  V P8                  \R        R	7      pVPG                  R
4       VPU                  R4       VPK                  \R        4       V P"                  PM                  V4       \(        PB                  ! RV P6                  \V        R	7      pVPI                  R4       VPG                  R
4       VPK                  \V        4       V P"                  PM                  V4       \(        PB                  ! RV P6                  \X        R	7      pVPI                  R4       VPG                  R
4       VPK                  \X        4       V P"                  PM                  V4       \(        PB                  ! RV P6                  \Z        R	7      pVPG                  R
4       VPI                  R4       VPK                  \Z        4       V P"                  PM                  V4       \(        PB                  ! RV P6                  \\        R	7      pVPG                  R
4       VPI                  R4       VPK                  \\        4       V P"                  PM                  V4       \(        PB                  ! RV P6                  \^        R	7      pVPG                  R
4       VPI                  R4       VPK                  \^        4       V P"                  PM                  V4       \(        P4                  ! 4       pVPa                  RV Pb                  V P2                  4       VPa                  RV Pd                  4       VPa                  RV Pf                  V P2                  \V        \X        \Z        \\        \h        4       \(        PB                  ! \N        Pj                  V\h        \l        R7      pVPG                  R
4       VPK                  \^        4       V P"                  PM                  V4       \(        Pn                  ! 4       pVPa                  RV Pp                  V P2                  \r        4       \(        PB                  ! \N        Pt                  V\r        \l        R7      pVPG                  R
4       VPK                  \r        4       V P"                  PM                  V4       \(        Pn                  ! 4       pVP;                  RR4       \(        PB                  ! RV\l        R7      pVPI                  R4       VPG                  R
4       VPK                  \l        4       V P"                  PM                  V4       V Pw                  4        V P!                  R4      V n<        V P{                  4        V P}                  V P!                  R4      4      V n?        V P}                  V P!                  R4      4      V n@        V P}                  V P!                  R4      4      V nA        V P}                  V P!                  R4      4      V nB        V P                  4        \        P                  P                  \        P                  ! 4       P                  4       4      '       * V nH        V P                  P                  4       pV'       d`   \(        P                  ! \        P                  ! V P                  P                  4      R 7      pV P!                  R!4      P                  Wg4       V P                  4        R#   \         d    / p E	Lti ; i  \         d    RT n         E	Lfi ; i  \         d    RT n         E	LXi ; i  \         d    RT n         E	LJi ; i)"zInitialize the Orca configuration GUI. Read the users current
set of preferences and set the GUI state to match. Setup speech
support and populate the combo box lists on the Speech Tab pane
accordingly.
Nvoices      $@      @      I@ZkeyBindingsTreeviewZ	ellipsizeZHandler)textTFi|  z
Mod.Mask 1z	Use Mod.1ZKey1ZClickCount1ZOldText1zediting-startedzediting-cancelededited)r_   editabletoggled)activeactivatablerd   ZModified)rc   r   speechSystemsspeechServersspeechLanguagesr?   )labelZnotebook)Qr   r    r   get_managerget_settingr   DEFAULT_VOICEZKeyErrorr   ACSSGAINrJ   AVERAGE_PITCHrK   RATErL   
get_widgetr1   get_columnsremove_columnr   Z	TreeStorer   TYPE_STRINGTYPE_BOOLEANr0   CellRendererTextr4   r)   set_propertyr   ZEllipsizeModeZENDTreeViewColumnHANDLERset_resizableZset_visibleset_sort_column_idZappend_columnr	   ZKB_HEADER_FUNCTIONDESCRIPset_min_width	MOD_MASK1	MOD_USED1KEY1CLICK_COUNT1OLDTEXT1connect
editingKeyeditingCanceledKey	editedKeyTEXT1ZKB_HEADER_KEY_BINDINGEDITABLECellRendererTogglekeyModifiedToggleMODIFZKB_MODIFIED_populateKeyBindingsrH   _setKeyEchoItems_initComboBoxrE   rB   r>   r;   _initSpeechStater!   r"   ZexistsZget_prefs_dirrM   rT   Zget_app_preferences_guiZLabelr   get_nameappZappend_page_initGUIState)rW   r[   r*   columnZrendererTextZrendererToggleZappPagerh   s   &       rY   rU   ZOrcaSetupGUI.init   s    *
	%113??IF!("8"89L	")$))..9DN	"*499+B+BCDO	")$))..9DN  ??+@A''))**668  ..v6 9 !$    
!" &)%9%9%;" # 4 4 6**;8K8K8O8OP ##I$($>$>)02 	T"5!!!'*&&v. ##I$@$@$($9$9)02 	T"S!!!'*&&v. ##L$($>$>)24 	5!T"!!),&&v. ##K$($>$>)24 	5!T"!!),&&v. ##F$($>$>)-/ 	T"5!!!$'&&v. ##M$($>$>)57 	T"5!!!,/&&v. ##J$($>$>)13 	T"5!!!(+&&v. ++-.!__!22	4 	/!44	6X!^^!22&	4u	N
 ##I$C$C$0).-57
 	T"!!(+&&v. //1y#55#44$	& ##I$9$9$2+008:
 	T"!!%(&&v. //1##M59##J$2+35 	5!T"!!(+&&v. 	!!#oo&78 **4???+KL 	 **4???+KL 	 **4??;L+MN 	! **4??;K+LM 	  /;;=KKMNN 	 ++557IIH$5$5dkkoo$FGEOOJ'33GC}  	L	  	"!DN	"  	"!DO	"  	"!DN	"sG   ;f5 &g	 9&g"  &g; 5gg	gg"g87g8;hhc                s    V\         8X  d   V P                  pV# V\        8X  d   V P                  pV# V\        8X  d   V P
                  pV# V\        8X  d   V P                  pV# V P                  pV# )zReturn the ACSS value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM

Returns the voice dictionary for the given voice type.
DEFAULTr*   	UPPERCASErG   	HYPERLINKr-   SYSTEMrF   )rW   	voiceType	voiceACSS   && rY   _getACSSForVoiceTypeZ!OrcaSetupGUI._getACSSForVoiceTypeq  s     ))I  )#++I  )#++I  & ((I  ))IrZ   c                sb   R\         n        V P                  V P                  4      pV P	                  V P
                  4      pV P                  P                  V P                  P                  4       4       \        P                  ! 4       P                  V P                  V P                  W4       R# )z7Write out the user's generic Orca preferences.
        N)r   speechSystemOverridegetModelDictr5   getKeyBindingsModelDictr0   r&   ZupdaterT   Zget_preferences_from_guir   ri   Zsave_settings)rW   ZpronunciationDictZkeyBindingsDict   &  rY   writeUserPreferencesZ!OrcaSetupGUI.writeUserPreferences  s     )-% --d.E.EF66t7L7LMdkkBBDE$$&44KK):	MrZ   c                s   V\         8X  d   V P                  pMV\        8X  d*   V P                  pW$9  d   V'       g   R# V P                  pMtV\        8X  d*   V P
                  pW$9  d   V'       g   R# V P                  pM@V\        8X  d*   V P                  pW$9  d   V'       g   R# V P                  pMV P                  pW$9   d	   WB,          # R# )a  Look for the value of the given key in the voice dictionary
   for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- key: the key to look for in the voice dictionary.
- useDefault: if True, and the key isn't found for the given voice
              type, the look for it in the default voice dictionary
              as well.

Returns the value of the given key, or None if it's not set.
Nr   )rW   r   keyZ
useDefaultZvoice   &&&& rY   _getKeyValueForVoiceTypeZ%OrcaSetupGUI._getKeyValueForVoiceType  s     %%E)#''E!)))#''E!))& $$E!))%%E<:rZ   c                s    RpV P                  V\        P                  P                  4      pV'       dA   \        P
                  P                  V9   d"   V\        P
                  P                  ,          pV# )zGets the name of the voice family for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM

Returns the name of the voice family for the given voice type,
or None if not set.
N)r   r   rl   FAMILYr   VoiceFamilyNAME)rW   r   
familyNamefamily   &&  rY   _getFamilyNameForVoiceTypeZ'OrcaSetupGUI._getFamilyNameForVoiceType  sW     
..y$)):J:JKl..33v= 8 8 = =>JrZ   c                s   V P                  V\        P                  P                  R4      pV P	                  V4      pV'       ds   W&\
        P                  P                  &   W6\
        P                  P                  &   WF\
        P                  P                  &   WV\
        P                  P                  &   EM	/ V\        P                  P                  &   W'\        P                  P                  ,          \
        P                  P                  &   W7\        P                  P                  ,          \
        P                  P                  &   WG\        P                  P                  ,          \
        P                  P                  &   WW\        P                  P                  ,          \
        P                  P                  &   RVR&   R# )a  Sets the name of the voice family for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- name: the name of the voice family to set.
- language: the locale of the voice family to set.
- dialect: the dialect of the voice family to set.
FTestablishedN)r   r   rl   r   r   r   r   r   LANGDIALECTVARIANT)rW   r   namelanguagedialectvariantr   r      &&&&&&  rY   _setFamilyNameForVoiceTypeZ'OrcaSetupGUI._setFamilyNameForVoiceType  s5    ..y/3yy/?/?/46 --i8	48<++0014<<++0017><++3347><++334*,Idii&&'IMdii&&'(@(@(E(EFIQdii&&'(@(@(E(EFLSdii&&'(@(@(H(HILSdii&&'(@(@(H(HI#'	- rZ   c                V    V P                  V\        P                  P                  4      # )zGets the speaking rate value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM

Returns the rate value for the given voice type, or None if
not set.
)r   r   rl   ro   rW   r      &&rY   _getRateForVoiceTypeZ!OrcaSetupGUI._getRateForVoiceType       ,,Y		GGrZ   c                j    V P                  V4      pW#\        P                  P                  &   RVR&   R# )zSets the speaking rate value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the rate value to set.
Tr   N)r   r   rl   ro   rW   r   valuer   rX   rY   _setRateForVoiceTypeZ!OrcaSetupGUI._setRateForVoiceType  .     --i8	$)$))..!#'	- rZ   c                r   )zGets the pitch value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM

Returns the pitch value for the given voice type, or None if
not set.
)r   r   rl   rn   r   r   rY   _getPitchForVoiceTypeZ"OrcaSetupGUI._getPitchForVoiceType  s(     ,,Y-1YY-D-DF 	FrZ   c                r   )zSets the pitch value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the pitch value to set.
Tr   N)r   r   rl   rn   r   rX   rY   _setPitchForVoiceTypeZ"OrcaSetupGUI._setPitchForVoiceType  s0     --i8	-2$))))*#'	- rZ   c                r   )zGets the volume (gain) value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM

Returns the volume (gain) value for the given voice type, or
None if not set.
)r   r   rl   rm   r   r   rY   _getVolumeForVoiceTypeZ#OrcaSetupGUI._getVolumeForVoiceType  r   rZ   c                r   )zSets the volume (gain) value for the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
- value: the volume (gain) value to set.
Tr   N)r   r   rl   rm   r   rX   rY   _setVolumeForVoiceTypeZ#OrcaSetupGUI._setVolumeForVoiceType+  r   rZ   c                sP   V P                  V4      pV P                  V4       V P                  V4      pVe"   V P                  R4      P	                  V4       M V P                  R4      P	                  R4       V P                  V4      pVe"   V P                  R4      P	                  V4       M V P                  R4      P	                  R4       V P                  V4      pVe#   V P                  R4      P	                  V4       R# V P                  R4      P	                  R4       R# )zSets the family, rate, pitch and volume GUI components based
on the given voice type.

Arguments:
- voiceType: one of DEFAULT, UPPERCASE, HYPERLINK, SYSTEM
NZ	rateScaler^   Z
pitchScaler]   ZvolumeScaler\   )r   _setSpeechFamiliesChoicer   rp   	set_valuer   r   )rW   r   r   ratepitchvolume   &&    rY   _setVoiceSettingsForVoiceTypeZ*OrcaSetupGUI._setVoiceSettingsForVoiceType8  s     44Y?
%%j1((3OOK(2248OOK(2248**95OOL)33E:OOL)33C8,,Y7OOM*44V<OOM*44T:rZ   c                s   \        V P                  4      ^ 8X  d   R# RpRpV P                   EFz  pV\        P                  P                  ,          pWQ8X  g   K-  V\        P                  P
                  ,          pV\        P                  P                  ,          pV'       d   VR,           V,           pMTp^ p	V P                   F  p
W8X  d   V P                  R4      P                  V	4       V P                  V	,          V n
        RpV P                  4        ^ p	V P                   Fo  pV\        P                  P                  ,          pWQ8X  d=   V P                  R4      P                  V	4       V P                  V	,          V n        Rp MV	^,          p	Kq  	   MV	^,          p	K  	   M	  V'       gc   RV.p\        P                  ! \        P                   VR4       V P                  R4      P                  ^ 4       V P                  ^ ,          V n
        V'       d   X	V P"                  V P$                  &   V'       gc   RV.p\        P                  ! \        P                   VR4       V P                  R4      P                  ^ 4       V P                  ^ ,          V n        V'       d(   X	V P&                  V P$                  V P                  3&   R# R# )	zSets the active item in the families ("Person:") combo box
to the given family name.

Arguments:
- familyName: the family name to use to set the active combo box item.
NF-rg   Tr?   <PREFERENCES DIALOG: Could not find speech language match forz:PREFERENCES DIALOG: Could not find speech family match for)lenr?   r   r   r   r   r   r=   rp   
set_activer<   _setupFamiliesr:   r9   r   print_tokens
LEVEL_INFOrO   r@   rN   )rW   r   ZlanguageSetZ	familySetr   r   langr   r   iZlanguageChoiceZfamilyChoicetokenss   &&           rY   r   Z%OrcaSetupGUI._setSpeechFamiliesChoiceU  s]    t""#q(	))F,22778D!l66;;< !9!9!A!AB#czG3H#H&*&A&AN%1(9:EEaH595P5PQR5S2&*++-,0,F,FL#/0H0H0M0M#ND#1 $0@ A L LQ O<@<V<VWX<Y 9,0	 %FA -G FA) 'B, E *H TV`aFu//>OO-.99!<)-)D)DQ)GD&EFD(()A)ABRT^_Fu//>OO,-88;(,(B(B1(ED%23 &&t'?'?..(/ 0 rZ   c                sb   V P                  R4      pVP                  R4       V P                  P                  4        V P                  p^ p. V n        V P                   F  pV\        P                  P                  ,          pV\        P                  P                  ,          pV'       d   VR,           V,           pMTpWr8w  d   Kh  V\        P                  P                  ,          pV\        P                  P                  ,          p	V	'       d
   V	R9  d   T	pV P
                  P                  V4       V P                  P                  W834       V^,          pK  	  VP                  V P                  4       V^ 8X  d?   R\        V4      R.p
\        P                   ! \        P"                  V
RR4       RV n        R# ^ pV P&                  V P                  3V P(                  9   d*   V P(                  V P&                  V P                  3,          pV P                  R4      P+                  V4       R# )zGets the list of voice variants for the current speech server and
current language.
If there are variants, get the information associated with
each voice variant and add an entry for it to the variants
GtkComboBox list.
r?   Nr   z"No speech family was available forZ.T)noneNone)rp   	set_modelr;   clearr<   r:   r?   r   r   r   r   r   r   appendstrr   r   LEVEL_SEVEREr9   r@   rN   r   )rW   comboboxZcurrentLanguager   r   r   r   r   r   r   r   selectedIndexs   &           rY   r   ZOrcaSetupGUI._setupFamilies  s    ??#344   &&(44%'"))F,22778D\55==>G#:/*,22778D\55==>G7*::&&--f5$$++QI6FA' ** 	43346:C<PRUVFu1164F(,D% $$d&@&@A--. 66t7O7O..8/ 0M 	()44]CrZ   c                s6   \        V P                  4      ^ 8X  d   R# Rp^ pV P                   FN  pWA8X  d=   V P                  R4      P                  V4       V P                  V,          V n        Rp MV^,          pKP  	  V'       gc   RV.p\
        P                  ! \
        P                  VR4       V P                  R4      P                  ^ 4       V P                  ^ ,          V n        V'       d   W0P                  V P                  &   V P                  4        R# )zSets the active item in the languages ("Language:") combo box
to the given language name.

Arguments:
- languageName: the language name to use to set the active combo box item.
NFrg   Tr   )r   r=   rp   r   r<   r   r   r   rO   r@   r   )rW   ZlanguageNamevalueSetr   r   r   r   rY   _setSpeechLanguagesChoiceZ&OrcaSetupGUI._setSpeechLanguagesChoice  s     t**+q033H' 12==a@-1-H-H-K*FA 4 TVbcFu//>OO-.99!<)-)D)DQ)GD&EF(()A)ABrZ   c                s   V P                  R4      pVP                  R4       V P                  P                  4        V P                  P                  4       V n        R pV P                  P                  VR7       . V n        \        V P                  4      ^ 8X  dR   \        P                  \        P                  8  p\        P                  ! \        P                  RRV4       RV n        R# / p^ pV P                   F  pV\         P"                  P$                  ,          pV\         P"                  P&                  ,          pWx3V9   d   KO  RWGV3&   V'       d   VR,           V,           p	MTp	T	p
V
R8X  d   R	p
V P                  P)                  V	4       V P                  P)                  WZ34       V^,          pK  	  ^ pV P                  V P*                  9   d   V P*                  V P                  ,          pVP                  V P                  4       V P                  R4      P-                  V4       V P.                  '       d   V P                  V,          V n        V P1                  4        V P                  R
4      p\2        P4                  \2        P6                  \2        P8                  \2        P:                  .pV P=                  W4       VP-                  \>        4       VPA                  4       pV PC                  V4       R# )zGets the list of voices for the current speech server.
If there are families, get the information associated with
each voice family and add an entry for it to the families
GtkComboBox list.
rg   Nc                 s,   V P                  \        P                  P                  4      pV P                  \        P                  P                  R 4      pRVP                  4       9   d   R# VR9  d   ^VP                  4       3# ^VP                  4       3# ) r   )    r   )Nr   r   )getr   r   r   r   lower)r   r   r   r   rY   _get_sort_keyZ0OrcaSetupGUI._setupVoices.<locals>._get_sort_key  sv    jj!9!9!A!ABG::l66;;R@DDJJL(447==?++tzz|$$rZ   )r   zNo voice available.Tr   r   zdefault languagevoiceTypesCombo)"rp   r   r>   r   r@   Zget_voice_familiesr?   Zsortr=   r   r   
debugLevelr   print_messager   r<   r   r   r   r   r   rO   r   r.   r   r	   ZSPEECH_VOICE_TYPE_DEFAULTZSPEECH_VOICE_TYPE_UPPERCASEZSPEECH_VOICE_TYPE_HYPERLINKZSPEECH_VOICE_TYPE_SYSTEMpopulateComboBoxr   
get_activer   )rW   r   r   include_stackZdoner   r   r   r   r   msgr   comboBoxZtypesr   s   &              rY   _setupVoicesZOrcaSetupGUI._setupVoices  sy    ??#454 !!'')"66IIK	% 	  ] 3&(#t""#q(!,,0@0@@M 2 24I4Q^_)-D&))F,22778D\55==>G~%!%Dg#:/ Cby(''..x8%%,,aX6FA) *4 ##t'C'CC 889Q9QRM4445)*55mD""")-)D)D])SD& ??#45446666335 	h.G$'')	**95rZ   c                sb   \        V P                  4      ^ 8X  d   R# V'       d   V^ ,          '       g$   \        P                  ! 4       P	                  4       pRp^ pV P                   FJ  pWP                  4       8X  d+   V P                  R4      P                  V4       W@n        Rp MV^,          pKL  	  V'       gc   RV.p\        P                  ! \        P                  VR4       V P                  R4      P                  ^ 4       V P                  ^ ,          V n        V P                  4        R# )zSets the active item in the speech servers combo box to the
given server.

Arguments:
- serversChoices: the list of available speech servers.
- serverInfo: the speech server to use to set the active combo
box item.
NFrf   Tz:PREFERENCES DIALOG: Could not find speech server match for)r   rA   r   ri   Zget_current_speech_server_infoget_inforp   r   r@   r   r   r   r   )rW   Z
serverInfor   r   serverr   r   rY   _setSpeechServersChoiceZ$OrcaSetupGUI._setSpeechServersChoiceE  s     t(()Q.
 z!}}5AACbbdJ//F__..0;;A>+1(FA 0 RT^_Fu//>OOO,77:'+'@'@'CD$rZ   c                s   V P                  R4      pVP                  R4       V P                  P                  4        V P                  P
                  P                  4       V n        \        V P                  4      ^ 8X  d   \        P                  \        P                  8  p\        P                  ! \        P                  RRV4       RV n        . V n        RV n        . V n        RV n        VP                  V P                  4       R# ^ pV P                   F?  pVP'                  4       ^ ,          pV P                  P)                  W534       V^,          pKA  	  VP                  V P                  4       \*        P,                  '       d$   V P/                  \0        P2                  R.4       R# V P/                  V P4                  R,          4       R# )zGets the list of speech servers for the current speech factory.
If there are servers, get the information associated with each
speech server and add an entry for it to the speechServers
GtkComboBox list.  Set the current choice to be the first item.
rf   NSpeech not available.Tr   speechServerInfo)rp   r   rB   r   rC   SpeechServerget_speech_serversrA   r   r   r   r   r   r   r@   r=   r<   r:   r9   r   r   r   r   r   r	   ZDEFAULT_SYNTHESIZERr&   )rW   r   r   r   r   r      &     rY   _setupSpeechServersZ OrcaSetupGUI._setupSpeechServersj  sn    ???34 %%'((55HHJ 	!t(()Q.!,,0@0@@M 2 24KTS`a'+D$*,D')-D&)+D&(,D%t667//F??$Q'D##**A95FA 0
 	4223((((()*G*G)ST((8J)KLrZ   c                s`   VP                  R4      p\        V P                  4      ^ 8X  d
   RV n        R# Rp^ pV P                   Fk  pVP                  pVP                  V4      '       d=   V P                  R4      P                  V4       V P                  V,          V n        Rp MV^,          pKm  	  V'       gc   RV.p\        P                  ! \        P                  VR4       V P                  R4      P                  ^ 4       V P                  ^ ,          V n        V P                  4        R# )zSet the active item in the speech systems combo box to the
given system name.

Arguments:
- factoryChoices: the list of available speech factories (systems).
- systemName: the speech system name to use to set the active combo
box item.
Z'NFre   Tz:PREFERENCES DIALOG: Could not find speech system match for)Zstripr   rD   rC   __name__Zendswithrp   r   r   r   r   r   )rW   Z
systemNamer   r   ZspeechSystemr   r      &&     rY   _setSpeechSystemsChoiceZ$OrcaSetupGUI._setSpeechSystemsChoice  s      %%c*
t(()Q.'+D$ 55L((D}}Z((0;;A>+/+D+DQ+G(FA 6 RT^_Fu//>OOO,77:'+'@'@'CD$  "rZ   c                s   V P                  R4      pVP                  R4       V P                  P                  4        . V n        V FL  p VP
                  P                  4       p\        V4      '       d   V P                  P                  V4       KL  KN  	  . V n        \        V P                  4      ^ 8X  d   \        P                  \        P                  8  p\        P                  ! \        P                   RRV4       RV n        . V n        RV n        . V n        RV n        . V n        RV n        VP                  V P                  4       R# ^ pV P                   F]  pV P                  P                  V4       VP
                  P1                  4       pV P                  P                  Wh34       V^,          pK_  	  VP                  V P                  4       \2        P4                  '       d"   V P7                  \2        P4                  4       R# V P8                  R,          '       d%   V P7                  V P8                  R,          4       R# RV n        R#   \         d*    \        P                  ! \        P                  4        EKA  i ; i)zSets up the speech systems combo box and sets the selection
to the preferred speech system.

Arguments:
-factories: the list of known speech factories (working or not)
re   Nr   TspeechServerFactory)rp   r   rE   r   rI   r   r   r   r   	Exceptionr   print_exceptionr   rD   r   r   r   rC   rA   r@   r=   r<   r:   r9   Zget_factory_namer   r   r   r&   )	rW   	factoriesr   factoryserversr   r   workingFactoryr   	   &&       rY   _setupSpeechSystemsZ OrcaSetupGUI._setupSpeechSystems  s    ???34 %%' " G8!..AACw<<))009   ! %'!t$$%*!,,0@0@@M 2 24KTS`a'+D$(*D%'+D$*,D')-D&)+D&(,D%t667"33N%%,,^<!..??AD##**A95FA	 4 	4223((((()F)FG^^122((8M)NO'+D$=  8%%e&6&6778s   
AI/JJc                s   V P                   R,          p\        P                  ! VP                  \        P
                  4      4      V n        \        P                  ! VP                  \        P                  4      4      V n        \        P                  ! VP                  \        P                  4      4      V n
        \        P                  ! VP                  \        P                  4      4      V n        \        P                  ! 4       P                  4       p\!        V4      ^ 8X  g#   V P                   P                  RR4      '       g;   . V n        RV n        . V n        RV n        . V n        RV n        . V n        RV n        R# \2        P                  ! 4       P5                  4        RV n        V P9                  V4       RV n        R# )z2Initialize the various speech components.
        r[   enableSpeechTNF)r&   r   rl   r   r   rk   r*   UPPERCASE_VOICErG   HYPERLINK_VOICEr-   SYSTEM_VOICErF   r   ri   Zget_speech_server_factoriesr   rI   rC   rA   r@   r=   r<   r:   r9   r   Zstart_speechr.   r  )rW   r[   r   r   rY   r   ZOrcaSetupGUI._initSpeechState  sE    )"ii

83I3I(JK"ii

83K3K(LM"ii

83K3K(LM"ii

83H3H(IJ %002NNP	y>Qdnn&8&8&N&N$&D!'+D$(*D%'+D$*,D')-D&)+D&(,D%$002??A #'  +"'rZ   c                s   VP                  4       pVP                  R4       \        P                  ! 4       p\	        V4       F  w  rx\        \        V4      4       F  p	\        P                  ! V4      p
V
f   K  V
P                  4       pWV	,          \        ,          8X  g   KI  VP                  V	4      pVP                  V\        V4       VP                  V\        V4       V'       d5    VP                  V	4      pVP                  V4      pVP                  W4        K  	  K  	  VP                  V4       R#   \         d     L)i ; i)aV  Given a set of spoken text attributes, update the model used by the
text attribute tree view.

Arguments:
- view: the text attribute tree view.
- setAttributes: the list of spoken text attributes to update.
- state: the state (True or False) that they all should be set to.
- moveToTop: if True, move these attributes to the top of the list.
N)	get_modelr   r   !get_all_supported_text_attributesZ	enumerateranger   r   from_stringget_localized_namer   get_iterr   	IS_SPOKENmove_beforeZ
ValueError)rW   viewsetAttributesstateZ	moveToTopmodelallAttrListr   r   r"   	attributelocalizedKeythisIter	otherIters   &&&&&         rY   _setSpokenTextAttributesZ%OrcaSetupGUI._setSpokenTextAttributes  s     t>>@.FAc+./+77<	$(;;=;t#44$~~d3HOOHdLAOOHi? C',~~d';H(-q(9I "--hB# 0 /( 	u  * ! !s   ,"D;;E	E	c                s   VP                  4       pVP                  R4       \        P                  ! 4       pV F  p\	        \        V4      4       Fr  p\        P                  ! V4      pVf   K  VP                  4       p	WV,          \        ,          8X  g   KI  VP                  V4      p
VP                  V
\        V4        K  	  K  	  VP                  V4       R# )a  Given a set of brailled text attributes, update the model used
by the text attribute tree view.

Arguments:
- view: the text attribute tree view.
- setAttributes: the list of brailled text attributes to update.
- state: the state (True or False) that they all should be set to.
N)r  r   r   r  r  r   r   r	  r
  r   r  r   IS_BRAILLED)rW   r  r  r  r  r  r   r"   r  r  r  s   &&&&       rY   _setBrailledTextAttributesZ'OrcaSetupGUI._setBrailledTextAttributes,  s      t>>@ Cc+./+77<	$(;;=;t#44$~~d3HOOHk5A 0 ! 	urZ   c                s   V P                   P                  4       p. p. pVP                  R4      p\        ^ V4       F  pW,          \        ,          p\
        P                  ! V4      pVf   K2  VP                  4       pW,          \        ,          '       d   VP                  V4       W,          \        ,          '       g   K  VP                  V4       K  	  W P                  R&   W0P                  R&   R# )zThe user has updated the text attribute list in some way. Update
the preferences to reflect the current state of the corresponding
text attribute lists.
NtextAttributesToSpeaktextAttributesToBraille)r,   r  iter_n_childrenr  r   r   Zfrom_localized_stringget_attribute_namer  r   r  r&   )	rW   r  Zspoken_attributesZbrailled_attributesnoRowsr"   r  r  r   s	   &        rY   _updateTextDictEntryZ!OrcaSetupGUI._updateTextDictEntryF  s     **446 &&t,!V$D ;t,L'==lKI ..0C{9%%!((-{;''#**3/ % 3D./4G01rZ   c                s    V P                  R 4      pVP                  VP                  4       4       VP                  4       V P                  R&   R# )ZcontractionTableGridenableContractedBrailleNrp   set_sensitiver   r&   rW   ZcheckboxZgridr   rY   contractedBrailleToggledZ%OrcaSetupGUI.contractedBrailleToggled^  s@    568..014<4G4G4I01rZ   c                s~    VP                  4       pVP                  4       pW#,          ^,          V P                  R&   R# )i   brailleContractionTableN)r  get_active_iterr&   )rW   r   r  myIterr   rY   contractionTableComboChangedZ)OrcaSetupGUI.contractionTableComboChangedc  s4    ""$))+49M!4D01rZ   c                s    V P                  R 4      pVP                  VP                  4       '       * 4       VP                  4       V P                  R&   R# )ZflashMessageDurationGridflashIsPersistentNr!  r#  r   rY   flashPersistenceToggledZ$OrcaSetupGUI.flashPersistenceToggledh  sC    9:x22445.6.A.A.C*+rZ   c                    VP                  V4      pVP                  V\        W2,          \        ,          '       * 4       V P                  4        R# )a
  The user has toggled the state of one of the text attribute
checkboxes to be spoken. Update our model to reflect this, then
update the preference.

Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- model: the model that the cell is part of.
N)r  setr  r  rW   cellr"   r  r  r   rY   textAttributeSpokenToggledZ'OrcaSetupGUI.textAttributeSpokenToggledm  s8     >>$'		(I5;y+A'AB!!#rZ   c                r+  )a  The user has toggled the state of one of the text attribute
checkboxes to be brailled. Update our model to reflect this,
then update the preference.

Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- model: the model that the cell is part of.
N)r  r,  r  r  r-  r   rY   textAttributeBrailledToggledZ)OrcaSetupGUI.textAttributeBrailledToggled|  s8     >>$'		(KU[-E)EF!!#rZ   c                <   V P                   P                  4       w  r#V'       dx   \        V P                   P                  4       4      p\	        ^ V4       FB  pV P                   P                  V4      pW68X  g   K&  V P                   P                  V4        R# 	  R# R# )zxSet the search column in the text attribute tree view
depending upon which column the user currently has the cursor in.
N)r,   
get_cursorr   rq   r  
get_columnset_search_columnrW   widgetr"   ZfocusColumnZ	noColumnsr   colr   rY   textAttrCursorChangedZ"OrcaSetupGUI.textAttrCursorChanged  s    
 #88CCED66BBDEI1i(00;;A>%..@@C	 ) rZ   c                s   V P                  R4      V n        V P                  P                  4       '       d=   V P                  P                  4        F  pV P                  P                  V4       K   	  \        P
                  ! \        P                  \        P                  \        P                  \        P                  4      p\        P                  ! 4        Ff  pVP                  4       pVP                  V\        VP                  4       4       VP                  V\        R4       VP                  V\         R4       Kh  	  V P                  P#                  V4       \        P$                  ! \&        P(                  4      pVP+                  ^4       VP-                  R4       \        P.                  ! 4       pVP1                  VR4       VP3                  VR\        4       V P                  P5                  V^ 4       \&        P6                  p\        P$                  ! V4      p\        P8                  ! 4       pVP;                  VR4       VP3                  VR\        4       VP=                  RV P>                  V4       V P                  P5                  V^4       VPA                  4        \&        PB                  p\        P$                  ! V4      p\        P8                  ! 4       pVP;                  VR4       VP3                  VR\         4       VP=                  RV PD                  V4       V P                  P5                  V^4       VPA                  4        \F        PH                  ! 4       PK                  R4      pV'       gK   \        P                  ! 4        U	u. uF+  p	V	PM                  4       '       g   K  V	PO                  4       NK-  	  pp	V PQ                  V P                  VRR4       \F        PH                  ! 4       PK                  R4      pV PS                  V P                  VR4       V P                  P=                  R	V PT                  4       R
# u up	i )a  Create the text attributes tree view. The view is the
textAttributesTreeView GtkTreeView widget. The view will consist
of a list containing three columns:
  IS_SPOKEN - a checkbox whose state indicates whether this text
              attribute will be spoken or not.
  NAME      - the text attribute name.
  VALUE     - if set, (and this attributes is enabled for speaking),
              then this attribute will be spoken unless it equals
              this value.
ZtextAttributesTreeViewFTr_   rc   rb   r  r  cursor_changedN)+rp   r,   rq   rr   r   	ListStorer   rs   rt   r   r  r   r   r   r
  r  r  r   rw   r	   ZTEXT_ATTRIBUTE_NAMEr|   ry   ru   pack_endadd_attributeinsert_columnZPRESENTATION_SPEAKr   
pack_startr   r/  clickedZPRESENTATION_MARK_IN_BRAILLEr0  r   ri   rj   Zshould_present_by_defaultr  r  r  r8  )
rW   r   r  r  r  rendererZspeakAttrColumnLabelZmarkAttrColumnLabelZ	attr_listZattr
   &         rY   _createTextAttributesTreeViewZ*OrcaSetupGUI._createTextAttributesTreeView  sd    &*__5M%N"%%113344@@B**88@ C g11%22%22%113  AACI||~HOOHdI,H,H,JKOOHi7OOHk59	 D 	"",,U3 ##I$A$ABS!T"'')$'Xvt4""00;  );;##$89))+(E*Xx;88	  	""00; (DD##$78))+(E*Xx=::	  	""00; %002>>?VW	 #DDFFD113 *'')F  
 	%%d&@&@)TSWX %002>>?XY	''(B(BItT 	""**+;T=W=WXs   Q8Qc                V    VP                  V4      pVP                  V\        V4       R# )a1  The user has edited the value of one of the actual strings in
the pronunciation dictionary. Update our model to reflect this.

Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- new_text: the new pronunciation dictionary actual string.
- model: the model that the cell is part of.
N)r  r,  ACTUALrW   r.  r"   new_textr  r     &&&&& rY   pronActualValueEditedZ"OrcaSetupGUI.pronActualValueEdited  s"     >>$'		(FH-rZ   c                rC  )a;  The user has edited the value of one of the replacement strings
in the pronunciation dictionary. Update our model to reflect this.

Arguments:
- cell: the cell that changed.
- path: the path of that cell.
- new_text: the new pronunciation dictionary replacement string.
- model: the model that the cell is part of.
N)r  r,  REPLACEMENTrE  rG  rY   pronReplacementValueEditedZ'OrcaSetupGUI.pronReplacementValueEdited  s"     >>$'		(K2rZ   c                sZ    \         P                  ! 4       P                  RV'       * 4       R# )zBCallback for the pronunciation tree's focus-{in,out}-event signal.ZusePronunciationDictionaryN)r   ri   set_setting)rW   r6  eventZ	isFocuseds   &&&&rY   pronunciationFocusChangeZ%OrcaSetupGUI.pronunciationFocusChange	  s"     	$$&223OU^Q^_rZ   c                r1  )zSet the search column in the pronunciation dictionary tree view
depending upon which column the user currently has the cursor in.
N)r6   r2  r   rq   r  r3  r4  r5  r   rY   pronunciationCursorChangedZ'OrcaSetupGUI.pronunciationCursorChanged  s    
 #44??AD22>>@AI1i(,,77:%**<<Q?	 ) rZ   c                s@   V P                  R4      V n        V P                  P                  4       '       d=   V P                  P                  4        F  pV P                  P                  V4       K   	  \        P
                  ! \        P                  \        P                  4      pV P                  P                  '       gH   V P                  P                  R4      ^,          p\        P                  ! 4       P                  V4      pM\        P                  p\!        VP#                  4       4       F;  pVP%                  4       p WE,          w  rxVP)                  V\*        V\,        V4       K=  	  V P                  P/                  V4       \        P0                  ! \2        P4                  4      pVP7                  ^4       VP9                  R4       \        P:                  ! 4       p	V	P=                  RR4       VP?                  V	R4       VPA                  V	R\*        4       V	PC                  RV PD                  V4       V P                  PG                  V^ 4       \        P0                  ! \2        PH                  4      p\        P:                  ! 4       p	V	P=                  RR4       VP?                  V	R4       VPA                  V	R\,        4       V	PC                  RV PJ                  V4       V P                  PG                  V^4       W n&        V P                  PC                  RV PN                  4       V P                  PC                  RV PP                  R4       V P                  PC                  R	V PP                  R
4       R#   \&         d    TpYE,          p ELLi ; i)a  Create the pronunciation dictionary tree view. The view is the
pronunciationTreeView GtkTreeView widget. The view will consist
of a list containing two columns:
  ACTUAL      - the actual text string (word).
  REPLACEMENT - the string that is used to pronounce that word.
ZpronunciationTreeViewactiveProfileTra   r_   r`   r9  Zfocus_in_eventZfocus_out_eventFN))rp   r6   rq   rr   r   r:  r   rs   rT   r   r&   r   r   ri   Zget_pronunciationsr   sortedkeysr   r   r,  rD  rI  r   rw   r	   ZDICTIONARY_ACTUAL_STRINGr|   ry   ru   rv   r;  r<  r   rH  r=  ZDICTIONARY_REPLACEMENT_STRINGrJ  r5   rN  rM  )
rW   r   r  Z_profileZpronDictZpronKeyr  ZactualZreplacementr@  rA  rY   _createPronunciationTreeViewZ)OrcaSetupGUI._createPronunciationTreeView  s    "&1H!I!!--//00<<>&&44V< ? g11%113 {{~~))/:1=H'335HHRH)<<Hhmmo.G||~H0&.&7# IIhf!;0 / 	((/ ##I$F$FGS!T"'')j$/$'Xvv64#=#=uE,,VQ7 ##I$K$KL'')j$/$'Xv{;4#B#BEJ,,VQ7"'
 	&&'7'+'F'F	H 	&&d;;T	C&&t<<e	EW  0
 !&/0s   
NNNc                s7   V P                   pVP                  R\        P                  4      pV P	                  R4      P                  V4       V P	                  R4      P                  V4       VP                  R\        P                  4      pV P	                  R4      P                  V4       V P	                  R4      P                  V'       * 4       VP                  R\        P                  4      pV\        P                  8X  d"   V P	                  R4      P                  R	4       MV\        P                  8X  d"   V P	                  R
4      P                  R	4       MVV\        P                  8X  d"   V P	                  R4      P                  R	4       M V P	                  R4      P                  R	4       VP                  R\        P                  4      pV\        P                  8X  d"   V P	                  R4      P                  R	4       M V P	                  R4      P                  R	4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                   4      4       V P	                  R4      P                  VP                  R\        P"                  4      4       V P	                  R4      P                  VP                  R\        P$                  4      4       V P	                  R4      P                  VP                  R\        P&                  4      4       V P	                  R4      P                  VP                  R\        P(                  4      4       V P	                  R4      P                  VP                  R\        P*                  4      4       V P	                  R 4      P                  VP                  R!\        P,                  4      4       V P	                  R"4      P                  VP                  R#\        P.                  4      4       V P	                  R$4      P                  VP                  R%\        P0                  4      4       V P	                  R&4      P                  VP                  R'\        P2                  4      4       V P	                  R(4      P                  VP                  R)\        P.                  4      4       V P	                  R*4      P                  VP                  R+\        P4                  4      4       V P	                  R,4      P                  VP                  R-\        P6                  4      4       VP                  R.\        P8                  4      pV P	                  R/4      P                  V4       VP                  R0\        P:                  4      pV P	                  R14      P                  V4       VP                  R2\        P<                  4      pV P	                  R34      P                  V4       VP                  R4\        P>                  4      pV P	                  R54      P                  V4       VP                  R6\        P@                  4      pV P	                  R74      P                  V4       VP                  R8\        PB                  4      pV P	                  R84      p\D        PF                  \D        PH                  \D        PJ                  .pV PM                  WV4       V\        PH                  8X  d   \D        PH                  pM6V\        PJ                  8X  d   \D        PJ                  pM\D        PF                  pVP                  VPO                  V4      4       V P	                  R94      p\P        PR                  p	\P        PT                  p
V PM                  VV	! \V        PX                  V
! 4       4      V	! \V        PZ                  V
! 4       4      V	! \V        P\                  V
! 4       4      V	! \V        P^                  V
! 4       4      V	! \V        P`                  V
! 4       4      V	! \V        Pb                  V
! 4       4      V	! \V        Pd                  V
! 4       4      V	! \V        Pf                  V
! 4       4      V	! \V        Ph                  V
! 4       4      V	! \V        Pj                  V
! 4       4      V	! \V        Pl                  V
! 4       4      V	! \V        Pn                  V
! 4       4      V	! \V        Pp                  V
! 4       4      V	! \V        Pr                  V
! 4       4      V	! \V        Pt                  V
! 4       4      V	! \V        Pv                  V
! 4       4      .4       \X        pV P                   P                  R:\        Px                  4      pV\V        PX                  8X  d	   \X        pEMV\V        PZ                  8X  d	   \Z        pEMV\V        P\                  8X  d	   \\        pEMnV\V        P^                  8X  d	   \^        pEMQV\V        P`                  8X  d	   \`        pEM4V\V        Pb                  8X  d	   \b        pEMV\V        Pd                  8X  d   \d        pMV\V        Pf                  8X  d   \f        pMV\V        Ph                  8X  d   \h        pMV\V        Pj                  8X  d   \j        pMV\V        Pl                  8X  d   \l        pMV\V        Pn                  8X  d   \n        pMoV\V        Pp                  8X  d   \p        pMSV\V        Pr                  8X  d   \r        pM7V\V        Pt                  8X  d   \t        pMV\V        Pv                  8X  d   \v        pVP                  V4       V P	                  R;4      pV PM                  VV	! \V        Pz                  V
! 4       4      V	! \V        P|                  V
! 4       4      V	! \V        P~                  V
! 4       4      V	! \V        P                  V
! 4       4      V	! \V        P                  V
! 4       4      V	! \V        P                  V
! 4       4      V	! \V        P                  V
! 4       4      .4       \z        pV P                   R<,          pV\V        Pz                  8X  d   \z        pMV\V        P|                  8X  d   \|        pMV\V        P~                  8X  d   \~        pMoV\V        P                  8X  d   \        pMSV\V        P                  8X  d   \        pM7V\V        P                  8X  d   \        pMV\V        P                  8X  d   \        pVP                  V4       V P	                  R=4      P                  VP                  R>\        P                  4      4       V P	                  R?4      P                  VP                  R@\        P                  4      4       V P	                  RA4      P                  VP                  RB\        P                  4      4       VRC,          pV P	                  RD4      P                  V4       V P	                  RE4      p\D        P                  \D        P                  \D        P                  .pV PM                  VV4       VP                  VRE,          4       VRF,          pV P	                  RG4      P                  V4       V P	                  RH4      P                  VRI,          4       VRJ,          \        P                  8H  pV P	                  RK4      P                  V4       V P	                  RL4      P                  VRM,          4       \        f#   V P	                  RO4      P                  RP4       EMV P	                  RO4      P                  VRQ,          4       V P	                  RR4      p\        P                  ! 4       pRNpVRS,          ;'       g    \        P                  ! 4       pV'       Ed   \        P                  ! \        \        4      p\        VP                  4       4      pV FV  pVV,          pVP                  VV.4      p\        P                  P                  \        P                  V4      V8X  g   KT  TpKX  	  V P                  pVP                  4        VP                  VR	4       VP                  VRT^ 4       VP                  V4       V'       d   VP                  V4       M#VP                  ^ 4       MVP                  RP4       VRU,          \        P                  8X  d"   V P	                  RV4      P                  R	4       M V P	                  RW4      P                  R	4       V P	                  RX4      P                  VP                  RY\        P                  4      4       VRZ,          pV\        P                  8X  d"   V P	                  R[4      P                  R	4       MV\        P                  8X  d"   V P	                  R\4      P                  R	4       MVV\        P                  8X  d"   V P	                  R]4      P                  R	4       M V P	                  R^4      P                  R	4       VR_,          pV\        P                  8X  d"   V P	                  R`4      P                  R	4       MV\        P                  8X  d"   V P	                  Ra4      P                  R	4       MVV\        P                  8X  d"   V P	                  Rb4      P                  R	4       M V P	                  Rc4      P                  R	4       VP                  Rd\        P                  4      pV P	                  Re4      P                  V4       VP                  Rf\        P                  4      pV P	                  Rg4      P                  V4       VP                  Rh\        P                  4      pV P	                  Ri4      P                  V4       VRj,          p V P	                  Rk4      P                  V Rl,          4       V P	                  Rm4      P                  VRn,          4       V P	                  Ro4      P                  VP                  Rp\        P                  4      4       V P	                  Rq4      P                  VP                  Rr\        P                  4      4       V P	                  Rs4      P                  VP                  Rt\        P                  4      4       V P	                  Ru4      P                  VP                  Rv\        P                  4      4       V P	                  Rw4      P                  VRx,          4       V P	                  Ry4      P                  VRz,          4       V P	                  R{4      P                  VR|,          4       V P	                  R}4      P                  VR~,          4       V P	                  R4      P                  VR,          4       V P	                  R4      P                  VR,          4       V P	                  R4      P                  VR,          4       V P	                  R4      P                  VR,          4       V P                  4        VR,          p!V!\        P                  8X  d"   V P	                  R4      P                  R	4       MV!\        P                  8X  d"   V P	                  R4      P                  R	4       MVV!\        P                  8X  d"   V P	                  R4      P                  R	4       M V P	                  R4      P                  R	4       V P                  4        V P	                  R4      P                  VR,          4       VR,          \        P                  8X  d"   V P	                  R4      P                  R	4       M V P	                  R4      P                  R	4       V P	                  R4      pV PM                  V\D        P                  \D        P                  .4       VP                  VR,          4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      P                  VP                  R\        P                  4      4       V P	                  R4      V nx        V P	                  R4      V ny        V P	                  R4      V nz        V P                  4        V P                  P                  '       d#   V P	                  R4      P                  RP4       RN# RN# )zmAdjust the settings of the various components on the
configuration GUI depending upon the users preferences.
r  speechSupportCheckButtonspeechOptionsGridonlySpeakDisplayedTextZ!onlySpeakDisplayedTextCheckButtoncontextOptionsGridverbalizePunctuationStyleZ
noneButtonTZ
someButtonZ
mostButtonZ	allButtonspeechVerbosityLevelZspeechBriefButtonZspeechVerboseButtonZ"enableSpeechIndentationCheckButtonenableSpeechIndentationZspeakBlankLinesCheckButtonspeakBlankLinesZspeakNumbersAsDigitsCheckButtonspeakNumbersAsDigitsZ!enableTutorialMessagesCheckButtonenableTutorialMessagesZenablePauseBreaksCheckButtonenablePauseBreaksZ!enablePositionSpeakingCheckButtonenablePositionSpeakingZ!enableMnemonicSpeakingCheckButtonenableMnemonicSpeakingZ#speakMisspelledIndicatorCheckButtonspeakMisspelledIndicatorZspeakDescriptionCheckButtonspeakDescriptionZ!speakContextBlockquoteCheckButtonZspeakContextBlockquoteZspeakContextLandmarkCheckButtonspeakContextLandmarkZ&speakContextNonLandmarkFormCheckButtonspeakContextNonLandmarkFormZspeakContextListCheckButtonspeakContextListZspeakContextPanelCheckButtonspeakContextPanelZspeakContextTableCheckButtonspeakContextTablemessagesAreDetailedZmessagesAreDetailedCheckButtonuseColorNamesZuseColorNamesCheckButtonreadFullRowInGUITableZ readFullRowInGUITableCheckButtonreadFullRowInDocumentTableZ%readFullRowInDocumentTableCheckButtonreadFullRowInSpreadSheetZ#readFullRowInSpreadSheetCheckButtoncapitalizationStyledateFormatCombopresentDateFormattimeFormatCombopresentTimeFormatZ"speakProgressBarUpdatesCheckButtonspeakProgressBarUpdatesZ$brailleProgressBarUpdatesCheckButtonbrailleProgressBarUpdatesZ!beepProgressBarUpdatesCheckButtonbeepProgressBarUpdatesprogressBarUpdateIntervalZ#progressBarUpdateIntervalSpinButtonprogressBarVerbosityZenableMouseReviewZenableMouseReviewCheckButtonZenableBrailleCheckButtonZenableBraillebrailleRolenameStyleZabbrevRolenamesZdisableBrailleEOLCheckButtonZdisableBrailleEOLNZcontractedBrailleCheckButtonFr   ZcontractionTableCombor%  r_   brailleVerbosityLevelZbrailleBriefButtonZbrailleVerboseButtonZ enableBrailleWordWrapCheckButtonenableBrailleWordWrapbrailleSelectorIndicatorZbrailleSelection7ButtonZbrailleSelection8ButtonZbrailleSelectionBothButtonZbrailleSelectionNoneButtonbrailleLinkIndicatorZbrailleLink7ButtonZbrailleLink8ButtonZbrailleLinkBothButtonZbrailleLinkNoneButtonenableFlashMessagesZenableFlashMessagesCheckButtonr)  ZflashIsPersistentCheckButtonflashIsDetailedZflashIsDetailedCheckButtonbrailleFlashTimeZbrailleFlashTimeSpinButton  keyEchoCheckButtonenableKeyEchoenableAlphabeticKeysCheckButtonenableAlphabeticKeysenableNumericKeysCheckButtonenableNumericKeys enablePunctuationKeysCheckButtonenablePunctuationKeysenableSpaceCheckButtonenableSpaceenableModifierKeysCheckButtonZenableModifierKeysenableFunctionKeysCheckButtonZenableFunctionKeysenableActionKeysCheckButtonZenableActionKeysenableNavigationKeysCheckButtonZenableNavigationKeys enableDiacriticalKeysCheckButtonZenableDiacriticalKeysZ enableEchoByCharacterCheckButtonZenableEchoByCharacterZenableEchoByWordCheckButtonZenableEchoByWordZenableEchoBySentenceCheckButtonZenableEchoBySentencetextAttributesBrailleIndicatorZtextBraille7ButtonZtextBraille8ButtonZtextBrailleBothButtonZtextBrailleNoneButtonZpresentToolTipsCheckButtonpresentToolTipskeyboardLayoutZgeneralDesktopButtonZgeneralLaptopButtonsayAllStyleZ'rewindAndFastForwardInSayAllCheckButtonrewindAndFastForwardInSayAllZstructNavInSayAllCheckButtonstructNavInSayAllZ"sayAllContextBlockquoteCheckButtonsayAllContextBlockquoteZ sayAllContextLandmarkCheckButtonsayAllContextLandmarkZ'sayAllContextNonLandmarkFormCheckButtonsayAllContextNonLandmarkFormZsayAllContextListCheckButtonsayAllContextListZsayAllContextPanelCheckButtonsayAllContextPanelZsayAllContextTableCheckButtonsayAllContextTableZavailableProfilesComboBox1ZavailableProfilesComboBox2Zmodel9ZprofilesFrame)~r&   r   r   r  rp   r   r"  rU  rW  PUNCTUATION_STYLE_NONEPUNCTUATION_STYLE_SOMEPUNCTUATION_STYLE_MOSTrX  VERBOSITY_LEVEL_BRIEFrY  rZ  r[  r\  r]  r^  r_  r`  ra  rd  rb  rc  re  rf  rg  rh  ri  rj  rk  rl  r	   CAPITALIZATION_STYLE_NONECAPITALIZATION_STYLE_ICONCAPITALIZATION_STYLE_SPELLr   ZindextimeZstrftimeZ	localtimer
   DATE_FORMAT_LOCALEDATE_FORMAT_NUMBERS_DMDATE_FORMAT_NUMBERS_MDDATE_FORMAT_NUMBERS_DMYDATE_FORMAT_NUMBERS_MDYDATE_FORMAT_NUMBERS_YMDDATE_FORMAT_FULL_DMDATE_FORMAT_FULL_MDDATE_FORMAT_FULL_DMYDATE_FORMAT_FULL_MDYDATE_FORMAT_FULL_YMDDATE_FORMAT_ABBREVIATED_DMDATE_FORMAT_ABBREVIATED_MDDATE_FORMAT_ABBREVIATED_DMYDATE_FORMAT_ABBREVIATED_MDYDATE_FORMAT_ABBREVIATED_YMDrn  TIME_FORMAT_LOCALETIME_FORMAT_12_HMTIME_FORMAT_12_HMSTIME_FORMAT_24_HMSTIME_FORMAT_24_HMS_WITH_WORDSTIME_FORMAT_24_HMTIME_FORMAT_24_HM_WITH_WORDSrq  rr  rs  r   PROGRESS_BAR_ALLPROGRESS_BAR_APPLICATIONPROGRESS_BAR_WINDOWBRAILLE_ROLENAME_STYLE_SHORTlouisr   Zlist_tablesZget_default_tabler   r:  r   rP  rQ  r   r!   r"   r#   r   r4   r   r>  r<  r   set_active_iterrx  BRAILLE_UNDERLINE_7BRAILLE_UNDERLINE_8BRAILLE_UNDERLINE_BOTHr{  r)  r|  r  r  r  r  rB  rR  GENERAL_KEYBOARD_LAYOUT_DESKTOPSAY_ALL_STYLE_LINESAY_ALL_STYLE_SENTENCEr  r  r  r  r  r  r  r  rP   rR   rQ   _OrcaSetupGUI__initProfileComborT   r   )"rW   ZprefsenableZstyleZlevelr   Zoptionsr   Z	combobox2ZsdtimeZltimeZ	indexdateZ
dateFormatZ	combobox3Z	indextimeZ
timeFormatZintervalr   Zlevelsr  ZtablesComboZ	tableDictZselectedTableIterZselectedTableZtablesModelZnamesr   ZfnameZitr.  ZselectionIndicatorZlinkIndicatorZdurationZbrailleIndicators"   &                                 rY   r   ZOrcaSetupGUI._initGUIStateh  s   
  >8+@+@A23>>vF+,::6B3X5T5TU;<GGO,-;;JG		5x7Y7YZH333OOL)44T:h555OOL)44T:h555OOL)44T:OOK(33D9		0(2O2OPH222OO/0;;DAOO12==dC;<GGII.0O0OP	R<=HHII/1Q1QR	T45@@II')A)AB	D9:EEII,h.K.KL	N;<GGII.0O0OP	R67BBII)8+E+EF	H;<GGII.0O0OP	R;<GGII.0O0OP	R=>IIII0(2S2ST	V56AAII((*C*CD	F;<GGII.0I0IJ	L9:EEII,h.K.KL	N@ALLII3X5Y5YZ	\56AAII((*C*CD	F67BBII)8+E+EF	H67BBII)8+E+EF	H 0(2N2NO89DDVL?H,B,BC23>>vF2H4R4RS:;FFvN79\9\]?@KKFS5x7X7XY=>II&Q		/1M1MN??#896666779 	h0H66677Eh99988E77EGMM%01OO$56	i(--uw7(1157;(1157;(22EG<(22EG<(22EG<(..8(..8(//9(//9(//9(55uw?(55uw?(66@(66@(66@	& '	^^''(;X=W=WX
444*I8:::.I8:::.I8;;;/I8;;;/I8;;;/I8777+I8777+I8888,I8888,I8888,I8>>>2I8>>>2I8???3I8???3I8???3Ii(OO$56	i(--uw7(,,eg6(--uw7(--uw7(88%'B(,,eg6(77AC	D '	^^$78
444*I8555)I8666*I8666*I8AAA5I8555)I8@@@4Ii(<=HHII/1Q1QR	T>?JJII183U3UV	X;<GGII.0O0OP	R 45=>HHR??#9:,,44//1 	h/E"89:*+67BB6J 	23>>o.	0,-$AAB)*55e<67BB%&	( =OO.00=e0DOO:;FF/02
 //*ABK++-I $!";<[[@Y@Y@[My!mmC5y~~/0!D%dOE$++T5M:Bww||G$5$5u=)*,.) " 11!!#&&tT2))$:%%k2$//0AB**1-))%0()X-K-KKOO01<<TBOO23>>tD:;FFII-x/M/MN	P ##=>!=!==OO56AA$G8#?#??OO56AA$G8#B#BBOO89DDTJOO89DDTJ45H888OO01<<TBh:::OO01<<TBh===OO34??EOO34??E0(2N2NO89DDVL.0J0JK67BB6J,h.F.FG45@@H+,45??4P 	,-88o.	09:EE		"8(:W:WX	Z67BB		"5x7Q7QR	T:;FF		"98;Y;YZ	\01<<		-1E1EF	H78CC23	578CC23	556AA01	39:EE45	7:;FF56	8:;FF56	856AA01	39:EE45	7
 	**, !ABx;;;OO01<<TB!=!==OO01<<TB!@!@@OO34??EOO34??E 	))+ 	45@@#$	& !"h&N&NNOO23>>tDOO12==dC??=1h)E)E)2)I)I)K 	LE-01ABMMII4h6[6[\	^67BBII)8+E+EF	H<=HHII/1Q1QR	T:;FFII-x/M/MN	PABMMII4h6[6[\	^67BBII)8+E+EF	H78CCII*H,G,GH	J78CCII*H,G,GH	J
 "__-IJ$(OO4P$Q!"&//(";!;;???OOO,::5A rZ   c                s   V P                  4       pV P                  P                  4        \        V4      '       g'   V P                  P	                  V P
                  4       M$V F  pV P                  P	                  V4       K   	  V P                  P                  R4      ;'       g    V P
                  pV P                  P                  R4      ;'       g    V P
                  pV P                  V P                  V^ ,          4      pV P                  V P                  V^ ,          4      pV P                  P                  V4       V P                  P                  V4       R# )z>Adding available profiles and setting active as the active onerO  startingProfileN)#_OrcaSetupGUI__getAvailableProfilesrQ   r   r   r   r'   r&   r   getComboBoxIndexrP   rR   r   )rW   available_profilesprofilerO  r  activeProfileIterZstartingProfileIter   &      rY   Z__initProfileComboZOrcaSetupGUI.__initProfileCombo  s    "88:%%'%&&##**4+?+?@-''..w7 . **?;SSt?S?S..,,->?WW4CWCW 11$2D2D2?2BD"33D4M4M2A!2DF%%&78!!,,-@ArZ   c                sH    \         P                  ! 4       P                  4       # )zGet available user profiles.)r   ri   r  )rW   s   &rY   Z__getAvailableProfilesZ#OrcaSetupGUI.__getAvailableProfiles  s    ++-@@BBrZ   c                s    V P                  R 4      pRP                  V P                  R,          4      pVP                  V P	                  W4      4       R# )ZorcaModifierComboBox, orcaModifierKeysN)rp   r#   r&   r   r  )rW   r   Z	keystringr   rY   _updateOrcaModifierZ OrcaSetupGUI._updateOrcaModifier  sB    ??#9:IIdnn-?@A	D11(FGrZ   c                s    \         P                  ! \        4      pV F  pVP                  V.4       K  	  VP	                  V4       R# )zPopulates the combobox with the items provided.

Arguments:
- combobox: the GtkComboBox to populate
- items: the list of strings with which to populate it
N)r   r:  r   r   r   )rW   r   itemsr  Zitems   &&&  rY   r   ZOrcaSetupGUI.populateComboBox  s8     c"DLL$  5!rZ   c                s    VP                  4       pVP                  4       p\        ^ \        V4      4       F/  pVP	                  WS4      pWr8X  d   Vu # VP                  V4      pK1  	  ^ # )a,  For each of the entries in the given combo box, look for searchStr.
    Return the index of the entry if searchStr is found.

Arguments:
- combobox: the GtkComboBox to search.
- searchStr: the string to search for.

Returns the index of the first entry in combobox with searchStr, or
0 if not found.
)r  get_iter_firstr  r   	get_value	iter_next)rW   r   Z	searchStrr7  r  myiterr   r   s   &&&&    rY   r  ZOrcaSetupGUI.getComboBoxIndex  sa     ""$%%'q#e*%A??6/D __V,F	 & rZ   c                s    VP                  4       pVP                  4       pVP                  V4      pVP                  V^ 4      pVP                  V^4      pWV.# )z6Get the list of values from the active combox
        )r   r  r  r  )rW   r   rc   r  Z
activeIterZactiveLabelZ
activeNamer   rY   getComboBoxListZOrcaSetupGUI.getComboBoxList  sW     $$&""$^^F+
ooj!4__Z3
((rZ   c                s   / pVP                  4       pV'       d   VP                  V4      pV'       d   VP                  V\        \        4      w  rgV'       g	   V'       gD   . pVP                  \        VP                  V\        \        \        \        4      4      4       WV&   VP                  V4      pK  VP                  V4      pK  V# N)r  iter_childrenr   rx   r   r   listr   r}   r~   r   r  )	rW   r  ZmodifiedOnly	modelDictZnodeZchildr   modifiedr   s	   &&&      rY   r   Z$OrcaSetupGUI.getKeyBindingsModelDict&  s    	##%''-E %		%% @<ELLeii!4I|'M "N O%*cN.??4(DrZ   c                s   / \         n         VP                  4       pVeW   VP                  V\        \        4      w  r4V'       d   V'       d   \         P
                  ! W44       VP                  V4      pKZ  \         P                   pV# )z:Get the list of values from a list[str,str] model
        )r   r  r   rD  rI  Zset_pronunciationr  )rW   r  ZcurrentIterr   r   r  r   rY   r   ZOrcaSetupGUI.getModelDict7  sg     13-**,%;DJCu"44S@//+6K&99	rZ   c                s   \         P                  e!   \         P                  P                  4        R# V P                  R4      \         n        \        P
                  ! 4       p\         P                  P                  V4       V P                  R4      p\        P                  ! R4      w  r4VP                  RWV^ 4       V P                  V P                  \        P                  ! 4       P                  R4      RR4       V P                  P                  '       d_   \         P"                  \$        P&                  ! V P                  P                  4      ,          p\         P                  P)                  V4       \         P                  P+                  4        \         P                  P-                  \.        P.                  ! 4       4       R# )z\Show the Orca configuration GUI window. This assumes that
the GUI has already been created.
Nr   
helpButtonZF1r?  r  T)r   r    Zpresentrp   r   Z
AccelGroupZadd_accel_groupZaccelerator_parseZadd_acceleratorr  r,   r   ri   rj   rT   r   r	   ZPREFERENCES_APPLICATION_TITLEr   r   	set_titleZshow_allZpresent_with_timer  )rW   Z
accelGroupr  ZkeyValZmodifierMaskZtitler   rY   showGUIZOrcaSetupGUI.showGUID  s:   
 *'')"oo.?@^^%
++J7__\2
!$!6!6t!<""9j,PQR 	%%** ,,.::;RSd	
 ;;???;;h>O>OPTP[P[P_P_>``E))%0$$&--diik:rZ   c                s   \         P                  ! 4       pVP                  VR4        VP                  4       ^ ,          pVP	                  VR^4       \         P                  ! \        \        4      pVP                  V4       \        V\         P                  4      '       d1   VP                  4       pVP                  V^ ,          ^,
          R4       V#   \
         d    TP	                  TR^4        Li ; i)zwInitialize the given combo box to take a list of int/str pairs.

Arguments:
- combobox: the GtkComboBox to initialize.
Tr_   )r   ru   r>  Z	get_cellsr<  r   r:  intr   r   
isinstanceZComboBoxTextZsize_requestZset_fixed_size)rW   r   r.  ZcolumnToDisplayr  Zsizer   rY   r   ZOrcaSetupGUI._initComboBoxb  s     ##%D$'	4&00215O""?FA> c3'5! h 0 011((*DQ"b1  	4""43	4s   *C C65C6c                s   V P                  R4      P                  4       pV P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R4      P                  V4       V P                  R	4      P                  V4       V P                  R
4      P                  V4       R# )z[In]sensitize the checkboxes for the various types of key echo,
depending upon whether the value of the key echo check button is set.
r  r  r  r  r  r  r  r  r  r  N)rp   r   r"  rW   r     & rY   r   ZOrcaSetupGUI._setKeyEchoItems}  s    
 !56AAC9:HHP67EEfM:;II&Q01??G78FFvN78FFvN56DDVL9:HHP:;II
	rZ   c                sx    V P                   P                  WR7       V P                   P                  VRR7       R# )zIf the text field is not None, presents the given text, optionally
interrupting anything currently being spoken.

Arguments:
- text: the text to present
- interrupt: if True, interrupt any speech currently being spoken
)	interrupt)Z
flash_timeNr  )rT   Zspeak_messageZdisplay_message)rW   r_   r  s   &&&rY   _presentMessageZOrcaSetupGUI._presentMessage  s0     	!!$!<##DR#8rZ   c                s    V P                   pVP                  R4      pVP                  V\        V4       VP                  V\        R4       V# )zCreate a new root node in the TreeStore model with the name of the
    application.

Arguments:
- appName: the name of the TreeStore Node (the same of the application)
NF)r0   r   r   r{   r   )rW   appNamer  r  r   rY   _createNodeZOrcaSetupGUI._createNode  sB     %%d#1u-rZ   c                s    V P                   pV FE  pVP                  VP                  4      ^ 8X  g   K%  V\        ,          V8X  g   K9  VP                  u # 	  R# )a  Returns the Gtk.TreeIter of the TreeStore model
that matches the application name passed as argument

Arguments:
- appName: a string with the name of the application of the node wanted
            it's the same that the field DESCRIP of the model treeStore
N)r0   Z
iter_depthZiterr{   )rW   r  r  rowr   rY   
_getIterOfZOrcaSetupGUI._getIterOf  sJ     %%C!!#((+q0\W,xx 
 rZ   c                sz    RpV^8X  d   R\         P                   R2pV# V^8X  d   R\         P                   R2pV# )zGiven a numeric clickCount, returns a string for inclusion
in the list of keybindings.

Argument:
- clickCount: the number of clicks associated with the keybinding.
r   z (Z))r	   ZCLICK_COUNT_DOUBLEZCLICK_COUNT_TRIPLE)rW   
clickCountclickCountStringr   rY   _clickCountToStringZ OrcaSetupGUI._clickCountToString  sT     ?!#I$@$@#AC   1_!#I$@$@#ACrZ   c                s   V P                   pVP                  '       g   R# Vf    V P                  \        P                  4      pVEe   VP                  V4      pVP                  '       g   RpMUV P                  VP                  4      pVP                  p	\        P                  ! VP                  4      V	,           V,           pVP                  V\        V4       VP                  V\        VP                  P                  4       VP                  V\         \#        VP$                  4      4       VP                  V\&        \#        VP                  4      4       VP                  V\(        VP                  4       VP                  V\*        \#        VP                  4      4       Ve/   VP                  V\,        V4       VP                  V\.        V4       VP                  V\0        V4       VP                  V\2        R4       V# R# )aQ  Appends a new row with the new keybinding data to the treeview

Arguments:
- handl:  the name of the handler associated to the keyBinding
- kb:     the new keybinding.
- parent: the parent node of the treeview, where to append the kb
- modif:  whether to check the modified field or not.

Returns a Gtk.TreeIter pointing at the new row.
NT)r0   handlerr  r	   KB_GROUP_DEFAULTr   keysymstringr  click_countr   get_modifier_names	modifiersr   rx   r{   descriptionr}   r   Zmodifier_maskr~   r   r   r   r   r   r   )
rW   handlkbparentmodifr  r  r_   r  r  s
   &&&&&     rY   
_insertRowZOrcaSetupGUI._insertRow  sr    %%zzz>__Y%?%?@F\\&)F???!55bnnE
!"55bllC%&#$ OOFGU3OOFGRZZ-C-CDOOFIs23C3C/DEOOFIs2<</@AOOFD"//:OOFL#bnn2EF$7t4OOFE51OOFHd3MrZ   c                s   V P                   pVf    V P                  \        P                  4      pVe   VP	                  V4      pVP                  V\        V4       VP                  V\        VP                  4       VP                  V\        \        V4      4       VP                  V\        \        P                  V,          4       VP                  V\        V4       VP                  V\        R4       V# R# )a  Appends a new row with the new braille binding data to the treeview

Arguments:
- handl:       the name of the handler associated to the brailleBinding
- com:         the BrlTTY command
- inputEvHand: the inputEventHandler with the new brailleBinding
- parent:      the parent node of the treeview, where to append the kb
- modif:       whether to check the modified field or not.

Returns a Gtk.TreeIter pointing at the new row.
NF)r0   r  r	   KB_GROUP_BRAILLEr   r   rx   r{   r  r   r   r   r   Zcommand_namer   r   )rW   r  cominputEvHandr  r  r  r  r   rY   _insertRowBrailleZOrcaSetupGUI._insertRowBraille  s     %%>__Y%?%?@F\\&)FOOFGU3OOFG[-D-DEOOFD#c(3OOFE7+?+?+DEOOFE51OOFHe4MrZ   c                s    V P                   P                  4        \        P                  ! 4       p\        P
                  ! 4       P                  V P                   P                  VRR7      p\        P                  ! RRRR4      pV P                  pVP                  4       pVe   VP                  V4      pVev   VP                  V\        4      p\        P                  ! RV4      Vn        VP#                  VRR7      '       d   VP%                  V\&        R4       VP)                  V4      pKy  VP)                  V4      pK  R#   \*         d)    \,        P.                  ! \,        P0                  4        R# i ; i)z7Mark as modified the user custom key bindings:
        F)Zenabled_onlyNr  )Ztype_of_searchT)rT   setup_input_event_handlersr   KeyBindingsr   ri   Zoverride_key_bindingsinput_event_handlers
KeyBindingr0   r  r  r  r{   r   ZInputEventHandlerr  has_key_bindingr   r   r  r   r   r   r   )rW   ZkeyBindsZkeyBind	treeModelr  Z	iterChildZdescripr  rY   _markModifiedZOrcaSetupGUI._markModified  sE   	6KK224"..0H'335KK00( L PH!,,T4tDG--I--/F$%33F;	+'11)WEG#55dGD O//=J 0 L L!++IudC ) 3 3I >I",,V4 %  	6!!%"4"45	6s   DE =E /E76E7c                st    V P                   P                  P                  4        F  w  r#W18X  g   K  Vu # 	  R # r  )rT   r  r  )rW   Zevent_handlerZkey_namer  r   rY   _get_input_event_handler_keyZ)OrcaSetupGUI._get_input_event_handler_key7  s3    !%!A!A!G!G!IH' "J rZ   c                s   V P                   P                  R4       V P                   P                  R4       V P                   P                  4        V'       d"   V P                  P                  4        RV n        \        P                  ! V P                  P                  4      pV P                  V4      pV P                  \        P                  4      pV P                  \        P                  4      pV P                  \        P                  4      pV P                  \        P                   4      pV P                  \        P"                  4      pV P                  \        P$                  4      p	V P                  \        P&                  4      p
V P                  \        P(                  4      pV P                  \        P*                  4      pV P                  \        P,                  4      pV P                  \        P.                  4      pV P                  \        P0                  4      pV P                  \        P2                  4      pV P                  \        P4                  4      pV P                  \        P6                  4      pV P                  \        P8                  4      pV P                  \        P:                  4      pV P                  \        P<                  4      pV P                  '       Eg   \>        P@                  ! 4       PC                  R4      pV\D        PF                  8H  p\H        PJ                  ! 4       V n        V P                  PM                  4        V P                  PO                  R4      pV P                  PQ                  4       pV P                  PS                  4       PU                  VR7      pV P                  PW                  4       PU                  VR7      pV P                  PY                  4       PU                  VR7      pV P                  P[                  4       PU                  VR7      pV P                  P]                  4       PU                  VR7      pV P                  P_                  4       PU                  VR7      pV P                  Pa                  4       PU                  VR7      p V P                  Pc                  4       PU                  VR7      p!V P                  Pe                  4       PU                  VR7      p"V P                  Pg                  4       PU                  VR7      p#V P                  Pi                  4       PU                  VR7      p$V P                  Pk                  4       PU                  VR7      p%V P                  Pm                  4       PU                  VR7      p&V P                  Po                  4       PU                  VR7      p'V P                  Pq                  4       PU                  VR7      p(V P                  Ps                  4       PU                  VR7      p)V P                  Pu                  4       PU                  VR7      p*VPv                   EF  p+V P                  Py                  V+R4      '       d   K(  V P{                  V+P|                  4      p,VPy                  V+R4      '       d   V P                  V,V+V4       EM
VPy                  V+R4      '       d   V P                  V,V+V4       EMV Py                  V+R4      '       d   V P                  V,V+V4       EMV!Py                  V+R4      '       d   V P                  V,V+V4       EMV"Py                  V+R4      '       d   V P                  V,V+V4       EMVV#Py                  V+R4      '       d   V P                  V,V+V4       EM)V'Py                  V+R4      '       d   V P                  V,V+V4       EMV(Py                  V+R4      '       d   V P                  V,V+V4       EMV)Py                  V+R4      '       d   V P                  V,V+V4       EMVPy                  V+R4      '       d   V P                  V,V+V	4       EMuVPy                  V+R4      '       d   V P                  V,V+V
4       EMHVPy                  V+R4      '       d   V P                  V,V+V4       EMVPy                  V+R4      '       d   V P                  V,V+V4       MV$Py                  V+R4      '       d   V P                  V,V+V4       MV&Py                  V+R4      '       d   V P                  V,V+V4       MV%Py                  V+R4      '       d   V P                  V,V+V4       MkV*Py                  V+R4      '       d   V P                  V,V+V4       M?VPy                  V+R4      '       g   V P                  V,V+V4       MV P                  V,V+V4       V P                  P                  V+4       EK  	  V P                  P                  V4      '       g   V P                  P                  V4       V P                  4        V P                  4        V P                  \        P                  4      p-V P                  P                  4       V nG        V P                  P                  4        F+  w  p.p/V P{                  V/4      p,V P                  V,V.V/V-4       K-  	  V P                   P                  V P                  4       V P                   P                  R4       V P                  P                  \        \        P                  P                  4       V P                   P                  4        / V nP        R# )zFills the TreeView with the list of Orca keybindings

Arguments:
- clearModel: if True, initially clear out the key bindings model.
NFr  )Z
is_desktopZstrictr  T)Qr1   r   set_headers_visiblehider0   r   r/   r   r   rT   r   r  r	   r  ZKB_GROUP_NOTIFICATIONSZKB_GROUP_CLIPBOARDZKB_GROUP_FLAT_REVIEWZKB_GROUP_FINDZKB_GROUP_SPEECH_VERBOSITYZKB_GROUP_SYSTEM_INFORMATIONZKB_GROUP_SLEEP_MODEZKB_GROUP_BOOKMARKSZKB_GROUP_OBJECT_NAVIGATIONZKB_GROUP_CARET_NAVIGATIONZKB_GROUP_STRUCTURAL_NAVIGATIONZKB_GROUP_TABLE_NAVIGATIONZKB_GROUP_WHERE_AM_IZKB_GROUP_LEARN_MODEZKB_GROUP_MOUSE_REVIEWZKB_GROUP_ACTIONSZKB_GROUP_DEBUGGING_TOOLSr   ri   rj   r   r  r   r  r  Zget_key_bindingsZ"get_default_keybindings_deprecatedZget_notification_presenterZget_bindingsZget_clipboard_presenter get_speech_and_verbosity_managerZ get_system_information_presenterZget_sleep_mode_managerZget_bookmarksZget_object_navigatorZget_caret_navigatorZget_structural_navigatorZget_table_navigatorget_learn_mode_presenterZget_mouse_reviewerZget_action_presenterZget_flat_review_presenterZget_flat_review_finderZget_where_am_i_presenterZget_debugging_tools_managerkey_bindingsr  r  r  r  ZaddZiter_has_childremover  r  r  Zget_braille_bindingsr(   r  r  rz   r   r   ZSortTypeZ	ASCENDINGZshowr3   )0rW   Z
clearModelr  ZiterAppZiterOrcaZiterNotificationPresenterZiterClipboardPresenterZiterFlatReviewPresenterZiterFindZiterSpeechAndVerbosityZiterSystemInfoZiterSleepModeZiterBookmarksZiterObjectNavZiterCaretNavZiterStructNavZiterTableNavZiterWhereAmIPresenterZiterLearnModeZiterMouseReviewerZiterActionPresenterZiterDebuggingToolsZlayoutZ	isDesktopZallKeyBindingsZdefKeyBindingsZnpKeyBindingsZcbKeyBindingsZsvKeyBindingsZsysKeyBindingsZsmKeyBindingsZbmKeyBindingsZonKeyBindingsZcnKeyBindingsZsnKeyBindingsZtnKeyBindingsZlmKeyBindingsZmrKeyBindingsZacKeyBindingsZfrKeyBindingsZfindKeyBindingsZwaiKeyBindingsZdebuggingKeyBindingsr  r  ZiterBBr  r  s0   &&                                              rY   r   Z!OrcaSetupGUI._populateKeyBindings>  s	    	""4(,,U3!!'')!DN##DKKOO4""7+##I$>$>?$($4$4Y5U5U$V!!%!1!1)2N2N!O"&"2"293Q3Q"R##I$;$;<!%!1!1)2U2U!V)))*O*OP(()F)FG(()E)EF(()M)MN''	(K(KL(()Q)QR''	(K(KL $ 0 01N1N O(()F)FG ,,Y-L-LM"..y/I/IJ!--i.P.PQ~~~%113??@PQF("J"JJI(446DNKK224![[99%@N![[KKMN KKBBDQQ$ R &M KK??ANN$ O &M KKHHJWW$ X &M![[IIKXX$ Y &N KK>>@MM$ N &M KK557DD$ E &M KK<<>KK$ L &M KK;;=JJ$ K &M KK@@BOO$ P &M KK;;=JJ$ K &M KK@@BOO$ P &M KK::<II$ J &M KK<<>KK$ L &M KKAACPP$ Q &M"kk@@BOO$ P &O![[AACPP$ Q &N#';;#J#J#L#Y#Y$ $Z $&  %11~~55b(CC ==bjjIE$44RGGr3LM&66r=IIr3IJ&66r=IIr=A&66r=IIr<@&66r=IIr=A&66r=IIr<@&66r=IIr3JK(88]KKr8<'77MJJr3HI&66r=IIr3IJ'77MJJr>B&66r=IIr=A&66r=IIr=A&66r=IIr=A&66r=IIr3FG&66r=IIr3DE-==b-PPr3EF+;;BNNr7;r8<NN&&r*S 2V $$33G<<!!((1  "!!)"<"<=99; $ 4 4 6C55kBE""5#{FC !7 	""4#8#89,,T2003<<;Q;QR #%rZ   c                s   V P                    Ft  pWP                  8X  g   VP                  P                  4        K/  VP                  P	                  4       pV F%  pW0P
                  8X  d   K  VP                  4        K'  	  Kv  	  R# )zzRemove unwanted factories and drivers for the current active
factory, when the user dismisses the Orca Preferences dialog.N)rI   rC   r   Zshutdown_active_serversr   r@   Zshutdown)rW   r   r   r   s   &   rY   _cleanupSpeechServersZ"OrcaSetupGUI._cleanupSpeechServers  sf     #33N"&>&>>++CCE(55HHJ%F"&>&>>) & 4rZ   c                s    VP                  4       pW P                  R&   V P                  R4      P                  V4       R# )a~  Signal handler for the "toggled" signal for the
   speechSupportCheckButton GtkCheckButton widget. The user has
   [un]checked the 'Enable Speech' checkbox. Set the 'enableSpeech'
   preference to the new value. Set the rest of the speech pane items
   [in]sensensitive depending upon whether this checkbox is checked.

Arguments:
- widget: the component that generated the signal.
r  rT  Nr   r&   rp   r"  rW   r6  r  r   rY   speechSupportCheckedZ!OrcaSetupGUI.speechSupportChecked  s6     ""$)/~&+,::6BrZ   c                s    VP                  4       pW P                  R&   V P                  R4      P                  V'       * 4       R# )zSignal handler for the "toggled" signal for the GtkCheckButton
onlySpeakDisplayedText. In addition to updating the preferences,
set the sensitivity of the contextOptionsGrid.

Arguments:
- widget: the component that generated the signal.
rU  rV  Nr  r  r   rY   onlySpeakDisplayedTextToggledZ*OrcaSetupGUI.onlySpeakDisplayedTextToggled  s9     ""$39/0,-;;JGrZ   c                s    V P                   '       d   R# VP                  4       pV P                  V,          V n        V P	                  4        R# )a}  Signal handler for the "changed" signal for the speechSystems
   GtkComboBox widget. The user has selected a different speech
   system. Clear the existing list of speech servers, and setup
   a new list of speech servers based on the new choice. Setup a
   new list of voices for the first speech server in the list.

Arguments:
- widget: the component that generated the signal.
N)r.   r   rD   rC   r   rW   r6  r   r   rY   speechSystemsChangedZ!OrcaSetupGUI.speechSystemsChanged  s@     """))+#'#<#<]#K   "rZ   c                s   V P                   '       d   R# VP                  4       pV P                  V,          V n         V P                  \
        P                  P                   V P                  \
        P                  P                   V P                  \
        P                  P                   V P                  \
        P                  P                   V P                  4        R#   \         d     Li ; i)a&  Signal handler for the "changed" signal for the speechServers
   GtkComboBox widget. The user has selected a different speech
   server. Clear the existing list of voices, and setup a new
   list of voices based on the new choice.

Arguments:
- widget: the component that generated the signal.
N)r.   r   rA   r@   r*   r   rl   r   rG   r-   rF   r   r   r  r   rY   speechServersChangedZ!OrcaSetupGUI.speechServersChanged	  s     """))+#'#<#<]#K 	!!$))"2"23##DII$4$45##DII$4$45  !1!12 	  		s   BC$ $C21C2c                sz   V P                   '       d   R# VP                  4       p V P                  V,          V n        V P                  V P                  3V P
                  9   d   V P
                  V P                  V P                  3,          pV P                  V,          pV\        P                  P                  ,          pV\        P                  P                  ,          pV\        P                  P                  ,          pV\        P                  P                  ,          pV P                  R4      P                  4       p	V P                  WWgV4       TR8X  g   Y P&                  T P                  &   T P)                  4        R#   \         d(    \         P"                  ! \         P$                  4        Lbi ; i)a  Signal handler for the "value_changed" signal for the languages
   GtkComboBox widget. The user has selected a different voice
   language. Save the new voice language name based on the new choice.

Arguments:
- widget: the component that generated the signal.
Nr   r  )r.   r   r=   r<   r@   rN   r:   r   r   r   r   r   r   rp   r   r   r   r   r   rO   r   )
rW   r6  r   r   r   r   r   r   r   r   
   &&        rY   speechLanguagesChangedZ#OrcaSetupGUI.speechLanguagesChanged&	  sc    """))+	6)-)D)D])SD&(($*D*DE../..t/G/G2203 433A6l66;;<!,":":"?"?@ !9!9!A!AB !9!9!A!AB OO,=>IIK	//	T[\ "ER(()A)AB  	6!!%"4"45	6s   D1F /F:9F:c                s   V P                   '       d   R# VP                  4       p V P                  V,          pV\        P                  P
                  ,          pV\        P                  P                  ,          pV\        P                  P                  ,          pV\        P                  P                  ,          pV P                  R4      P                  4       pV P                  WWVV4       VR8X  g(   VV P                  V P                   V P"                  3&   R# R#   \         d(    \        P                  ! \        P                  4        Lai ; i)a   Signal handler for the "value_changed" signal for the families
   GtkComboBox widget. The user has selected a different voice
   family. Save the new voice family name based on the new choice.

Arguments:
- widget: the component that generated the signal.
Nr   r  )r.   r   r:   r   r   r   r   r   r   rp   r   r   r   r   r   rN   r@   r<   )	rW   r6  r   r   r   r   r   r   r   r   rY   speechFamiliesChangedZ"OrcaSetupGUI.speechFamiliesChangedK	  s    """))+		6//>F,22778Dl66;;<H\55==>G\55==>G(9:EEGI++IXPWX "2? &&t'?'?..(/ 0 #  	6!!%"4"45	6s   C	D /EEc                sp    V P                   '       d   R# VP                  4       pV P                  V4       R# )a  Signal handler for the "changed" signal for the voiceTypes
   GtkComboBox widget. The user has selected a different voice
   type. Setup the new family, rate, pitch and volume component
   values based on the new choice.

Arguments:
- widget: the component that generated the signal.
N)r.   r   r   )rW   r6  r   r   rY   voiceTypesChangedZOrcaSetupGUI.voiceTypesChangedj	  s/     """%%'	**95rZ   c                   VP                  4       pV P                  R4      P                  4       pV P                  W24       \        P
                  ! 4       P                  R4      pW$P                  \        P                  / 4      \        P                  P                  &   \        P
                  ! 4       P                  RV4       R# )a
  Signal handler for the "value_changed" signal for the rateScale
   GtkScale widget. The user has changed the current rate value.
   Save the new rate value based on the currently selected voice
   type.

Arguments:
- widget: the component that generated the signal.
r   r[   N)r  rp   r   r   r   ri   rj   r   r   rk   r   rl   ro   rK  )rW   r6  r   r   r[      &&   rY   rateValueChangedZOrcaSetupGUI.rateValueChangedz	  s     !OO$56AAC	!!)2!--/;;HEAE

8))2.tyy~~>$$&228VDrZ   c                r  )a  Signal handler for the "value_changed" signal for the pitchScale
   GtkScale widget. The user has changed the current pitch value.
   Save the new pitch value based on the currently selected voice
   type.

Arguments:
- widget: the component that generated the signal.
r   r[   N)r  rp   r   r   r   ri   rj   r   r   rk   r   rl   rn   rK  )rW   r6  r   r   r[   r  rY   pitchValueChangedZOrcaSetupGUI.pitchValueChanged	  s       "OO$56AAC	""94!--/;;HEJO

8))2.tyy/F/FG$$&228VDrZ   c                r  )a  Signal handler for the "value_changed" signal for the voiceScale
   GtkScale widget. The user has changed the current volume value.
   Save the new volume value based on the currently selected voice
   type.

Arguments:
- widget: the component that generated the signal.
r   r[   N)r  rp   r   r   r   ri   rj   r   r   rk   r   rl   rm   rK  )rW   r6  r   r   r[   r  rY   volumeValueChangedZOrcaSetupGUI.volumeValueChanged	  s     !!#OO$56AAC	##I6!--/;;HEAG

8))2.tyy~~>$$&228VDrZ   c                s    \         P                  P                  V4      pVRR pVP                  4       V P                  V&   R# )zSignal handler for "toggled" signal for basic GtkCheckButton
   widgets. The user has altered the state of the checkbox.
   Set the preference to the new value.

Arguments:
- widget: the component that generated the signal.
Ni)r   Z	Buildabler   r   r&   )rW   r6  ZsettingNamer   rY   checkButtonToggledZOrcaSetupGUI.checkButtonToggled	  s;     mm,,V4!$3'&,&7&7&9{#rZ   c                s`    VP                  4       V P                  R&   V P                  4        R# )a  Signal handler for the "toggled" signal for the
   keyEchoCheckbutton GtkCheckButton widget. The user has
   [un]checked the 'Enable Key Echo' checkbox. Set the
   'enableKeyEcho' preference to the new value. [In]sensitize
   the checkboxes for the various types of key echo, depending
   upon whether this value is checked or unchecked.

Arguments:
- widget: the component that generated the signal.
r  N)r   r&   r   rW   r6  r   rY   keyEchoCheckedZOrcaSetupGUI.keyEchoChecked	  s'     +1*;*;*='rZ   c                   VP                  4       '       d   VP                  4       \        P                  8X  d    \        P
                  V P                  R&   R# VP                  4       \        P                  8X  d    \        P                  V P                  R&   R# VP                  4       \        P                  8X  d    \        P                  V P                  R&   R# \        P                  V P                  R&   R# R# )a  Signal handler for the "toggled" signal for the
   brailleSelectionNoneButton, brailleSelection7Button,
   brailleSelection8Button or brailleSelectionBothButton
   GtkRadioButton widgets. The user has toggled the braille
   selection indicator value. If this signal was generated
   as the result of a radio button getting selected (as
   opposed to a radio button losing the selection), set the
   'brailleSelectorIndicator' preference to the new value.

Arguments:
- widget: the component that generated the signal.
ry  Nr   	get_labelr	   ZBRAILLE_DOT_7r   r  r&   ZBRAILLE_DOT_8r  ZBRAILLE_DOT_7_8r  ZBRAILLE_UNDERLINE_NONEr  r   rY   brailleSelectionChangedZ$OrcaSetupGUI.brailleSelectionChanged	  s     !Y%<%<<00 9:!!#y'>'>>00 9:!!#y'@'@@33 9: 33 9: rZ   c                r  )a  Signal handler for the "toggled" signal for the
   brailleLinkNoneButton, brailleLink7Button,
   brailleLink8Button or brailleLinkBothButton
   GtkRadioButton widgets. The user has toggled the braille
   link indicator value. If this signal was generated
   as the result of a radio button getting selected (as
   opposed to a radio button losing the selection), set the
   'brailleLinkIndicator' preference to the new value.

Arguments:
- widget: the component that generated the signal.
rz  Nr   r  r   rY   brailleLinkChangedZOrcaSetupGUI.brailleLinkChanged	  s     !Y%<%<<00 56!!#y'>'>>00 56!!#y'@'@@33 56 33 56 rZ   c                r  )a  Signal handler for the "toggled" signal for the
   textBrailleNoneButton, textBraille7Button, textBraille8Button
   or textBrailleBothButton GtkRadioButton widgets. The user has
   toggled the text attributes braille indicator value. If this signal
   was generated as the result of a radio button getting selected
   (as opposed to a radio button losing the selection), set the
   'textAttributesBrailleIndicator' preference to the new value.

Arguments:
- widget: the component that generated the signal.
r  Nr   r  r   rY   brailleIndicatorChangedZ$OrcaSetupGUI.brailleIndicatorChanged
  s     !Y%<%<<00 ?@!!#y'>'>>00 ?@!!#y'@'@@33 ?@ 33 ?@ rZ   c                s   VP                  4       '       d   VP                  4       \        P                  8X  d    \        P                  V P
                  R&   R# VP                  4       \        P                  8X  d    \        P                  V P
                  R&   R# VP                  4       \        P                  8X  d    \        P                  V P
                  R&   R# \        P                  V P
                  R&   R# R# )a  Signal handler for the "toggled" signal for the noneButton,
   someButton or allButton GtkRadioButton widgets. The user has
   toggled the speech punctuation level value. If this signal
   was generated as the result of a radio button getting selected
   (as opposed to a radio button losing the selection), set the
   'verbalizePunctuationStyle' preference to the new value.

Arguments:
- widget: the component that generated the signal.
rW  N)	r   r!  r	   r  r   r&   r  r  ZPUNCTUATION_STYLE_ALLr  r   rY   punctuationLevelChangedZ$OrcaSetupGUI.punctuationLevelChanged!
  s     !Y%E%EE33 :;!!#y'G'GG33 :;!!#y'G'GG33 :; 22 :; rZ   c                s    VP                  4       pVP                  4       pW#,          ^ ,          pVP                  R4      V P                  R&   R# )zSignal handler for the changed signal for the orcaModifierComboBox
   Set the 'orcaModifierKeys' preference to the new value.

Arguments:
- widget: the component that generated the signal.
r  r  N)r  r&  Zsplitr&   )rW   r6  r  r'  ZorcaModifierr  rY   orcaModifierChangedZ OrcaSetupGUI.orcaModifierChanged;
  sF       "'')}Q'-9-?-?-E)*rZ   c                sn   VP                  4       pVP                  4       pW#,          ^ ,          pV\        P                  8X  d    \        P                  V P
                  R&   R# V\        P                  8X  d    \        P                  V P
                  R&   R# \        P                  V P
                  R&   R# )zSignal handler for the changed signal for the progressBarVerbosity
   GtkComboBox widget. Set the 'progressBarVerbosity' preference to
   the new value.

Arguments:
- widget: the component that generated the signal.
ru  N)r  r&  r	   r  r   r&   r  r  )rW   r6  r  r'  ru  r  rY   progressBarVerbosityChangedZ(OrcaSetupGUI.progressBarVerbosityChangedH
  s       "'')$}Q/9#=#==)) NN12!Y%B%BB,, NN12 11 NN12rZ   c                s   VP                  4       pVP                  4       pW#,          ^ ,          pV\        P                  8X  d   \        P                  V P
                  R&   MPV\        P                  8X  d   \        P                  V P
                  R&   M\        P                  V P
                  R&   V P                  P                  4       P                  4        R# )r   rl  N)r  r&  r	   r  r   r&   r  r  rT   r  Zupdate_capitalization_style)rW   r6  r  r'  rl  r  rY   capitalizationStyleChangedZ'OrcaSetupGUI.capitalizationStyleChanged^
  s      "'')#mA.)"E"EE4<4V4VDNN01 I$H$HH4<4W4WDNN014<4V4VDNN01446RRTrZ   c                s4   VP                  4       pVP                  4       pW#,          ^ ,          pV\        P                  8X  d    \        P
                  V P                  R&   R# V\        P                  8X  d    \        P                  V P                  R&   R# R# )zSignal handler for the "changed" signal for the sayAllStyle
   GtkComboBox widget. Set the 'sayAllStyle' preference to the
   new value.

Arguments:
- widget: the component that generated the signal.
r  N)	r  r&  r	   r  r   ZSAYALL_STYLE_LINEr&   r  ZSAYALL_STYLE_SENTENCE)rW   r6  r  r'  r  r  rY   sayAllStyleChangedZOrcaSetupGUI.sayAllStyleChangedj
  su       "'')mA&)666,4,F,FDNN=)I<<<,4,J,JDNN=) =rZ   c                s   VP                  4       p\        P                  pV\        8X  d   \        P                  pEMV\        8X  d   \        P                  pEMnV\
        8X  d   \        P
                  pEMQV\        8X  d   \        P                  pEM4V\        8X  d   \        P                  pEMV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMoV\        8X  d   \        P                  pMSV\        8X  d   \        P                  pM7V\         8X  d   \        P                   pMV\"        8X  d   \        P"                  pW0P$                  R&   R# )zSignal handler for the "changed" signal for the dateFormat
   GtkComboBox widget. Set the 'dateFormat' preference to the
   new value.

Arguments:
- widget: the component that generated the signal.
rn  N)r   r
   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&   )rW   r6  rm  	newFormatr   rY   dateFormatChangedZOrcaSetupGUI.dateFormatChanged{
  sV    !++-//	44 77I 66 77I 77 88I 77 88I 77 88I 33 44I 33 44I 44 55I 44 55I 44 55I :: ;;I :: ;;I ;; <<I ;; <<I ;; <<I.7*+rZ   c                s   VP                  4       p\        P                  pV\        8X  d   \        P                  pMV\        8X  d   \        P                  pMoV\
        8X  d   \        P
                  pMSV\        8X  d   \        P                  pM7V\        8X  d   \        P                  pMV\        8X  d   \        P                  pW0P                  R&   R# )zSignal handler for the "changed" signal for the timeFormat
   GtkComboBox widget. Set the 'timeFormat' preference to the
   new value.

Arguments:
- widget: the component that generated the signal.
rp  N)
r   r
   r  r  r  r  r  r  r  r&   )rW   r6  ro  r*  r   rY   timeFormatChangedZOrcaSetupGUI.timeFormatChanged
  s     !++-//	// 22I 22 33I 22 33I == >>I 11 22I <<!>>I/8*+rZ   c                    VP                  4       '       db   VP                  4       \        P                  8X  d    \        P                  V P
                  R&   R# \        P                  V P
                  R&   R# R# )a  Signal handler for the "toggled" signal for the speechBriefButton,
   or speechVerboseButton GtkRadioButton widgets. The user has
   toggled the speech verbosity level value. If this signal was
   generated as the result of a radio button getting selected
   (as opposed to a radio button losing the selection), set the
   'speechVerbosityLevel' preference to the new value.

Arguments:
- widget: the component that generated the signal.
rX  Nr   r!  r	   r  r   r&   ZVERBOSITY_LEVEL_VERBOSEr  r   rY   speechVerbosityChangedZ#OrcaSetupGUI.speechVerbosityChanged
  sa     !Y%D%DD22 56 44 56 rZ   c                @    VP                  4       V P                  R&   R# )zSignal handler for the "value_changed" signal for the
   progressBarUpdateIntervalSpinButton GtkSpinButton widget.

Arguments:
- widget: the component that generated the signal.
rt  NZget_value_as_intr&   r  r   rY   %progressBarUpdateIntervalValueChangedZ2OrcaSetupGUI.progressBarUpdateIntervalValueChanged
  s     7=6M6M6O23rZ   c                sN    VP                  4       R ,          V P                  R&   R# )r~  r}  Nr1  r  r   rY   brailleFlashTimeValueChangedZ)OrcaSetupGUI.brailleFlashTimeValueChanged
  s    -3-D-D-F-M)*rZ   c                s    VP                  4       '       d    \        P                  V P                  R&   R# \        P                  V P                  R&   R# )a  Signal handler for the "toggled" signal for the abbrevRolenames
   GtkCheckButton widget. The user has [un]checked the 'Abbreviated
   Rolenames' checkbox. Set the 'brailleRolenameStyle' preference
   to the new value.

Arguments:
- widget: the component that generated the signal.
rv  N)r   r   r  r&   ZBRAILLE_ROLENAME_STYLE_LONGr  r   rY   abbrevRolenamesCheckedZ#OrcaSetupGUI.abbrevRolenamesChecked
  sE     55 NN12 44 NN12rZ   c                r-  )a  Signal handler for the "toggled" signal for the brailleBriefButton,
   or brailleVerboseButton GtkRadioButton widgets. The user has
   toggled the braille verbosity level value. If this signal was
   generated as the result of a radio button getting selected
   (as opposed to a radio button losing the selection), set the
   'brailleVerbosityLevel' preference to the new value.

Arguments:
- widget: the component that generated the signal.
rw  Nr.  r  r   rY   brailleVerbosityChangedZ$OrcaSetupGUI.brailleVerbosityChanged
  sa     !Y%D%DD22 67 44 67 rZ   c                s@    W2,          V,          '       * W2,          V&   R# )z6When the user changes a checkbox field (boolean field)N )rW   r.  r"   r  r7     &&&&&rY   r   ZOrcaSetupGUI.keyModifiedToggle  s      %{3//CrZ   c                s&   V P                  \        P                  4       \        P                  ! 4       P                  4       P                  R4       \        P                  ! 4       P                  4        VP                  RV P                  4       R# )z5Starts user input of a Key for a selected key bindingzCapturing keyszkey-press-eventN)r  r
   ZKB_ENTER_NEW_KEYr   ri   get_active_scriptZremove_key_grabsr   Zunmap_all_modifiersr   kbKeyPressed)rW   r.  ra   r"   r  r7  rY   r   ZOrcaSetupGUI.editingKey  sh     	X667""$668IIJZ['')==?*D,=,=>rZ   c                sx    . V n         \        P                  ! 4       P                  4       P	                  R4       R# )z4Stops user input of a Key for a selected key bindingDone capturing keysN)rS   r   ri   r8  refresh_key_grabs)rW   ra   r   rY   r   ZOrcaSetupGUI.editingCanceledKey  s0     ""$668JJK`arZ   c                s   VP                   p\        P                  P                  4       pVP	                  V4      pVR,          p\        P
                  ! V^ ,          4      pVP                  p\        P                  pWh9   d   R\        P                  ^ .V n        R# . ROp	Wi9   d   R# V\        P                  ! 4       ,          pV P                  '       d   VR9   d   Wg^.V n        R# V P                  w  rpV\        P                  ,          pV'       d(   V\        P                  ,          pWgV^,           .V n        R# )zdCalled when a new key event arrives and we are capturing keys.
(used for key bindings redefinition)
r   FTr  )ZAlt_LZAlt_RZ	Control_LZ	Control_RZShift_LZShift_RZMeta_LZMeta_RZNum_LockZ	Caps_LockZ
Shift_LockZReturnZEscape)Zhardware_keycoder   ZKeymapZget_defaultZget_entries_for_keycodeZkeyval_namer  r   r  r   ORCA_MODIFIER_MASKrS   r   Z accelerator_get_default_mod_mask)rW   ZkeyPressedEventZkeycodeZkeymapZentries_for_keycodeZentriesZeventStringZ
eventStateZorcaModsZmodifierKeysstringr  r  is_orca_modifiers   &&            rY   _processKeyCapturedZ OrcaSetupGUI._processKeyCaptured  s    "22'')$<<WE%b)oogaj1$**
,,"!#[%C%CQ GD@ &#"F"F"HH
   11!,! <D(,(9(9%:${'E'EE+888J!,*q. IDrZ   c                s  aaa V P                  V4      pV'       g   R# V P                  '       g   R# V P                  w  oooS'       d   SR9   d   R# S\        P                  ,          pSR9   dI   V'       gA   VP	                  R4       V P                  \        P                  4       . V n        RV n        R# \        P                  ! S\        P                  SRS4      V n        \        P                  ! S4      pV P                  S4      pVS,           V,           pV P                  P                  V4      pVfV   VVV3R lp	\        \!        WP"                  P$                  4      4      p
V
'       d   V
^ ,          P&                  P(                  pV'       d`   \        P*                  V,          p\-        R\.        P0                  ,          4      p\2        P4                  ! WP
                  V4      V n        R# V P6                  e(   \2        P8                  ! V P6                  4       RV n        \        P:                  V,          pVP	                  V4       V P                  V4       R# )	zSpecial handler for the key_pressed events when editing the
keybindings.  This lets us control what gets inserted into the
entry.
TFr   Nc                 s   < V P                   S8H  ;'       d;    V P                  S8H  ;'       d$    V P                  S8H  ;'       d    V P                  # r  )r  r  r  r  )Zxr  keyNamer  s   &rY   matchZ(OrcaSetupGUI.kbKeyPressed.<locals>.matchi  sW    ~~0 B BQ[[I5M B B3B B89		BrZ   r~  r<  )ZDeleteZ	BackSpace)r@  rS   r   r=  Zset_textr  r
   Z
KB_DELETEDr2   r   DEFAULT_MODIFIER_MASKr  r  r3   r   r  Zfilterr/   r	  r  r  ZKB_ALREADY_BOUNDr  r   ZdoubleClickTimeoutr   timeout_addrV   Zsource_removeZKB_CAPTURED)rW   ra   rL  ZkeyProcessedr?  ZmodifierNamesr  Z	newStringr  rB  Zmatchesr   Zdelayr  rA  r  s   &&&          @@@rY   r9  ZOrcaSetupGUI.kbKeyPressedD  s    //6   )-):):&J'%99${'E'EE--6Fb!  !4!45 "D"DO%001<1R1R1:151;	=
 $66yA33J?!G+.>>	--11)<B 6%)D)DEFG%aj00<<++k9Cx:::;E595E5E++S62D2  55A""4#I#IJ9=6&&2Ci(  %rZ   c
                sh   . V n         \        P                  ! 4       P                  4       P	                  R4       VP                  V4      p
 VP                  W4      pW8g  p V P                  P                  pV P                  P                  pV P                  P                  pV\        P                  P                  ,          pV^\        P                  P                   ,          ,          '       dF   V\"        P$                  ,          '       d)   V^\        P                  P                   ,          ,          pVP'                  V
V\)        \"        P*                  4      V\)        \-        V4      4      W}WV\)        V4      \.        V4       V'       d>   \0        P2                  V,          pVP                  V
\4        4      pVV P6                  V&   M\0        P8                  pV'       d!   V P;                  V4       RV P6                  V&   R#   \         d    Rp ELi ; i  \         d    Rp^ p^p ELi ; i)zMThe user changed the key for a Keybinding: update the model of
the treeview.
r:  r   N)rS   r   ri   r8  r;  Zget_iter_from_stringr  r   r2   r  r  r  r   ZModifierTypeZMODIFIER_MASKr    Z	SHIFTLOCKr   r=  r,  r   rC  r  r   r
   ZKB_CAPTURED_CONFIRMATIONr{   r3   ZKB_DELETED_CONFIRMATIONr  )rW   r.  r"   rF  r  ZmodMaskZmodUsedr   r  r_   r  ZoriginalBindingr  r>  Zmodsr  messager  s   &&&&&&&&&&        rY   r   ZOrcaSetupGUI.editedKey  s    ""$668JJK`a//5	!'11&?O $/	__11F??,,D44J c&&4441**44455k4444Q%,,6667Dfs;#D#DEs3t9~!3z?X	' 77(BG#--fg>K0;D##H-66G  )79D##O4I  	! O	!  	FDJ	s%   H "AH HHH10H1c                r0  )a?  Signal handler for the "toggled" signal for the
   presentToolTipsCheckButton GtkCheckButton widget.
   The user has [un]checked the 'Present ToolTips'
   checkbox. Set the 'presentToolTips'
   preference to the new value if the user can present tooltips.

Arguments:
- widget: the component that generated the signal.
r  N)r   r&   r  r   rY   presentToolTipsCheckedZ#OrcaSetupGUI.presentToolTipsChecked  s     -3,=,=,?()rZ   c                sh   VP                  4       '       d   VP                  4       \        P                  8X  d=   \        P
                  V P                  R&   \        P                  V P                  R&   R# \        P                  V P                  R&   \        P                  V P                  R&   R# R# )a  Signal handler for the "toggled" signal for the generalDesktopButton,
   or generalLaptopButton GtkRadioButton widgets. The user has
   toggled the keyboard layout value. If this signal was
   generated as the result of a radio button getting selected
   (as opposed to a radio button losing the selection), set the
   'keyboardLayout' preference to the new value. Also set the
   matching list of Orca modifier keys

Arguments:
- widget: the component that generated the signal.
r  r  N)
r   r!  r	   ZKEYBOARD_LAYOUT_DESKTOPr   r  r&   ZDESKTOP_MODIFIER_KEYSZGENERAL_KEYBOARD_LAYOUT_LAPTOPZLAPTOP_MODIFIER_KEYSr  r   rY   keyboardLayoutChangedZ"OrcaSetupGUI.keyboardLayoutChanged  s     !Y%F%FF<< /0 22 12 ;; /0 11 12 rZ   c                sX   V P                   P                  4       pVP                  4       pVP                  V\        R\
        R4       VP                  V4      pV P                   P                  ^ 4      pV P                   P                  4        V P                   P                  WER4       R# )a  Signal handler for the "clicked" signal for the
pronunciationAddButton GtkButton widget. The user has clicked
the Add button on the Pronunciation pane. A new row will be
added to the end of the pronunciation dictionary list. Both the
actual and replacement strings will initially be set to an empty
string. Focus will be moved to that row.

Arguments:
- widget: the component that generated the signal.
r   TN)
r6   r  r   r,  rD  rI  Zget_pathr3  Z
grab_focusZ
set_cursor)rW   r6  r  r  r"   r7  r   rY   pronunciationAddButtonClickedZ*OrcaSetupGUI.pronunciationAddButtonClicked  s     &&002<<>		(FBR8~~h'$$//2))+))$T:rZ   c                s|    V P                   P                  4       P                  4       w  r#VP                  V4       R# )a&  Signal handler for the "clicked" signal for the
pronunciationDeleteButton GtkButton widget. The user has clicked
the Delete button on the Pronunciation pane. The row in the
pronunciation dictionary list with focus will be deleted.

Arguments:
- widget: the component that generated the signal.
N)r6   get_selectionZget_selectedr
  )rW   r6  r  ZoldIterr   rY    pronunciationDeleteButtonClickedZ-OrcaSetupGUI.pronunciationDeleteButtonClicked  s/     //==?LLNWrZ   c                    V P                   P                  4       pVP                  4       w  r4V F&  pVP                  V4      pVP	                  VR4       K(  	  V P                  4        R# )a1  Signal handler for the "clicked" signal for the
textMoveToTopButton GtkButton widget. The user has clicked
the Move to top button. Move the selected rows in the text
attribute view to the very top of the list and then update
the preferences.

Arguments:
- widget: the component that generated the signal.
N)r,   rI  get_selected_rowsr  Z
move_afterr  rW   r6  textSelectionr  pathsr"   r  r   rY   textMoveToTopButtonClickedZ'OrcaSetupGUI.textMoveToTopButtonClicked  s^     22@@B&88:D~~d+HXt,  	!!#rZ   c                sV   V P                   P                  4       pVP                  4       w  r4V Ff  pVP                  V4      pVP	                  4       pV^ ,          '       g   K5  VP                  RV^ ,          ^,
          4      pVP                  Wh4       Kh  	  V P                  4        R# )a,  Signal handler for the "clicked" signal for the
textMoveUpOneButton GtkButton widget. The user has clicked
the Move up one button. Move the selected rows in the text
attribute view up one row in the list and then update the
preferences.

Arguments:
- widget: the component that generated the signal.
N)r,   rI  rL  r  get_indicesZiter_nth_childswapr  )	rW   r6  rN  r  rO  r"   r  indicesr  r   rY   textMoveUpOneButtonClickedZ'OrcaSetupGUI.textMoveUpOneButtonClicked  s     22@@B&88:D~~d+H&&(Gqzz!00wqz!|D	

8/  	!!#rZ   c                sf   V P                   P                  4       pVP                  4       w  r4VP                  R4      pV F]  pVP	                  V4      pVP                  4       pV^ ,          V^,
          8  g   K;  VP                  V4      p	VP                  Wy4       K_  	  V P                  4        R# )a2  Signal handler for the "clicked" signal for the
textMoveDownOneButton GtkButton widget. The user has clicked
the Move down one button. Move the selected rows in the text
attribute view down one row in the list and then update the
preferences.

Arguments:
- widget: the component that generated the signal.
N)	r,   rI  rL  r  r  rQ  r  rR  r  )
rW   r6  rN  r  rO  r  r"   r  rS  r  r  rY   textMoveDownOneButtonClickedZ)OrcaSetupGUI.textMoveDownOneButtonClicked   s     22@@B&88:&&t,D~~d+H&&(GqzF1H$!OOH5	

8/  	!!#rZ   c                rK  )a5  Signal handler for the "clicked" signal for the
textMoveToBottomButton GtkButton widget. The user has clicked
the Move to bottom button. Move the selected rows in the text
attribute view to the bottom of the list and then update the
preferences.

Arguments:
- widget: the component that generated the signal.
N)r,   rI  rL  r  r  r  rM  r   rY   textMoveToBottomButtonClickedZ*OrcaSetupGUI.textMoveToBottomButtonClicked6  s^     22@@B&88:D~~d+Hh-  	!!#rZ   c                sZ    V P                   P                  4       P                  RR7       R# )zSignal handler for the "clicked" signal for the helpButton
   GtkButton widget. The user has clicked the Help button.

Arguments:
- widget: the component that generated the signal.
Zpreferences)ZpageN)rT   r  Z	show_helpr  r   rY   helpButtonClickedZOrcaSetupGUI.helpButtonClickedH  s"     	,,.88m8LrZ   c                s   \         P                  ! 4       P                  R4      pVP                  \        P
                  4      pVex   V P                  V\        P                  P                  &   V P                  V\        P                  P                  &   V P                  V\        P                  P                  &   R# R# )zGRestore the settings we saved away when opening the preferences
dialog.r[   N)r   ri   rj   r   r   rk   rJ   r   rl   rm   rK   rn   rL   ro   )rW   r[   r*   r   rY   restoreSettingsZOrcaSetupGUI.restoreSettingsR  s     "--/;;HEzz("8"89#+/>>L(48OOL001+/>>L( $rZ   c           
     s.   V P                   '       g   V P                  4        V P                  R 4      P                  4       pWP                  R&   V P
                  '       d$   V P
                  P                  V P                  R&   V P                  '       d(   V P                  P                  4       V P                  R&   V P                  e   \        P                  \        P                  ! V P                  4      \        P                  \        P                  ! V P                  4      \        P                   \        P                  ! V P"                  4      \        P$                  \        P                  ! V P&                  4      /V P                  R&   R# R# )rS  r  r   r   Nr[   )rM   rX  rp   r   r&   rC   r   r@   r   r*   r   rk   r   rl   r  rG   r  r-   r  rF   r  r  rY   saveBasicSettingsZOrcaSetupGUI.saveBasicSettings_  s"   ###  "!;<GGI)/~&###((11 NN01 ###((113 NN-. (&&		$2C2C(D(($))D4G4G*H(($))D4G4G*H%%tyy1A1A'B	(DNN8$ )rZ   c                s   Rp\         P                  ! \         P                  VR4       V P                  4        V P	                  V P
                  4      pV P	                  V P                  4      pW0P                  R&   W0P                  R&   W@P                  R&   \        P                  ! 4       P                  V4       V P                  4        \        P                  ! V P                  4       \        P                   ! 4        V P#                  4        V P%                  4        V P'                  4        Rp\         P                  ! \         P                  VR4       R# )a  Signal handler for the "clicked" signal for the applyButton
   GtkButton widget. The user has clicked the Apply button.
   Write out the users preferences. If GNOME accessibility hadn't
   previously been enabled, warn the user that they will need to
   log out. Shut down any active speech servers that were started.
   Reload the users preferences to get the new speech, braille and
   key echo value to take effect. Do not dismiss the configuration
   window.

Arguments:
- widget: the component that generated the signal.
z(PREFERENCES DIALOG: Apply button clickedTr  rO  r  z8PREFERENCES DIALOG: Handling Apply button click completeN)r   r   	LEVEL_ALLrY  r  rP   rR   r&   r   ri   set_starting_profiler   r   load_user_settingsrT   r   checkBrailleSettingr   r   r  )rW   r6  r   rO  r  r  rY   applyButtonClickedZOrcaSetupGUI.applyButtonClickedv  s     9EOOS$7 ,,T-?-?@..t/H/HI$1y!*7',;()$$&;;OL!!#,##%!!#!HEOOS$7rZ   c                s   Rp\         P                  ! \         P                  VR4       V P                  V4       V P	                  R4      P                  4        Rp\         P                  ! \         P                  VR4       R# )zSignal handler for the "clicked" signal for the cancelButton
   GtkButton widget. The user has clicked the Cancel button.
   Don't write out the preferences. Destroy the configuration window.

Arguments:
- widget: the component that generated the signal.
z)PREFERENCES DIALOG: Cancel button clickedTr   z9PREFERENCES DIALOG: Handling Cancel button click completeN)r   r   rZ  windowClosedrp   destroyrW   r6  r   r   rY   cancelButtonClickedZ OrcaSetupGUI.cancelButtonClicked  s^     :EOOS$7&!)*224IEOOS$7rZ   c                s&   Rp\         P                  ! \         P                  VR4       V P                  V4       V P	                  4        V P                  R4      P                  4        Rp\         P                  ! \         P                  VR4       R# )a  Signal handler for the "clicked" signal for the okButton
   GtkButton widget. The user has clicked the OK button.
   Write out the users preferences. If GNOME accessibility hadn't
   previously been enabled, warn the user that they will need to
   log out. Shut down any active speech servers that were started.
   Reload the users preferences to get the new speech, braille and
   key echo value to take effect. Hide the configuration window.

Arguments:
- widget: the component that generated the signal.
z%PREFERENCES DIALOG: OK button clickedTr   z5PREFERENCES DIALOG: Handling OK button click completeN)r   r   rZ  r^  r  rp   r`  ra  r   rY   okButtonClickedZOrcaSetupGUI.okButtonClicked  sj     6EOOS$7'""$)*224EEOOS$7rZ   c                sh   Rp\         P                  ! \         P                  VR4       V P                  4        \        P
                  '       g{   \        P                  ! 4       P                  R4      pV'       d   V P                  V4       \        P                  ! 4       P                  R4      pV'       d   V P                  V4       V P                  4        V P                  4        \        P                  ! RV P                  4       Rp\         P                  ! \         P                  VR4       R# )zSignal handler for the "closed" signal for the orcaSetupWindow
   GtkWindow widget. This is effectively the same as pressing the
   cancel button, except the window is destroyed for us.

Arguments:
- widget: the component that generated the signal.
z*PREFERENCES DIALOG: Window is being closedTr   r   r~  z+PREFERENCES DIALOG: Window closure completeN)r   r   rZ  suspendEventsr   r   r   ri   rj   r   r   r  rX  r   rD  resumeEvents)rW   r6  r   r   r   r  rY   r_  ZOrcaSetupGUI.windowClosed  s     ;EOOS$7,,,&224@@AVWG,,W5%113??@RSF,,V4""$D$"3"34;EOOS$7rZ   c                s   Rp\         P                  ! \         P                  VR4       V P                  P	                  R4       V P
                  P	                  R4       V P                  P	                  R4       V P                  P                  R4       V P
                  P                  R4       V P                  P                  R4       V P                  P                  4        V P
                  P                  4        V P                  P                  4        R\        n
        Rp\         P                  ! \         P                  VR4       R# )zESignal handler for the "destroyed" signal for the Preferences dialog.z-PREFERENCES DIALOG: Window is being destroyedTNFz/PREFERENCES DIALOG: Window destruction complete)r   r   rZ  r1   r   r,   r6   r  r  r   r    ra  r   rY   windowDestroyedZOrcaSetupGUI.windowDestroyed  s     >EOOS$7""4("",,T2((.,,U3""66u=2259""'')##%"?EOOS$7rZ   c                   R p\         P                  ! \         P                  VR4       \        P                  ! 4       pVP                  R4       VP                  R4       VP                  R4       VP                  R4       R# )z1PREFERENCES DIALOG: Re-registering floody events.Tobject:state-changed:showingobject:children-changed:removeobject:selection-changed&object:property-change:accessible-nameN)r   r   rZ  r   ri   Zregister_listenerrW   r   Zmanagerr   rY   re  ZOrcaSetupGUI.resumeEvents  sg    AEOOS$7++-!!"@A!!"BC!!"<=!!"JKrZ   c                rg  )z0PREFERENCES DIALOG: Deregistering floody events.Trh  ri  rj  rk  N)r   r   rZ  r   ri   Zderegister_listenerrl  r   rY   rd  ZOrcaSetupGUI.suspendEvents   sg    @EOOS$7++-##$BC##$DE##$>?##$LMrZ   c                s2    \         P                  ! V 4       R# )z$Show profile Dialog to add a new oneN)r   ZshowProfileUIr  r   rY   showProfileGUIZOrcaSetupGUI.showProfileGUI
  s     	&&t,rZ   c                s  a a	 V'       g   R# VP                  RR4      P                  4       pW.o	R
V	V 3R llpS P                  4        Uu. uF  qD^,          NK  	  pp\        V\        4      '       d/   VR8w  d(   W%9  d"   VS P
                  ^,          8w  d
   V! 4        R# VEe@   \        P                  R\        P                  ! V4       R2,          p\        P                  ! R\        P                  P                  \        P                  P                  \        P                   P"                  R7      pVP%                  R\        P&                   R24       VP)                  V4       VP+                  \        P,                  4       VP/                  4       pV\        P0                  P2                  8X  d   VP5                  4        V! R	4       R# VP5                  4        R# R# u upi )zvCreates a new profile based on the name profileToSaveLabel and
updates the Preferences dialog combo boxes accordingly.NZ Z_c                 s   < V '       d7   SP                   P                  S4      pSP                  P                  V4       SSP                  R &   SSP                  R&   SP                  4        SP                  4        R# )r  rO  N)rQ   r   rP   r  r&   rY  r   )
newProfiler  r  rW   s   & rY   saveActiveProfileZ3OrcaSetupGUI.saveProfile.<locals>.saveActiveProfile  sf    $($;$;$B$B7$K!""223DE(/DNN9%.5DNN?+""$%%'rZ   r   <b></b>ZtypeZbuttonsFT)Zreplacer   r  r  r   r'   r	   ZPROFILE_CONFLICT_MESSAGEr   markup_escape_textr   MessageDialogDialogFlagsMODALMessageTypeINFOButtonsTypeYES_NO
set_markupZPROFILE_CONFLICT_LABELformat_secondary_markupr  ZPROFILE_CONFLICT_TITLErunResponseTypeYESr`  )
rW   ZprofileToSaveLabelZprofileToSavero  Zpr  rE  dialogresponser  s
   f&       @rY   saveProfileZOrcaSetupGUI.saveProfile  s    "*223<BBD%5	( 	( -1,G,G,IJ,Iqdd,IJmS))!R'!;!T%9%9!%<<(#<<$112DEFdKL**4-- __11 # 6 68 !!C	(H(H'I"NO..w7  !A!AB!::<s//333NN$%e,NN$ ) Ks   G(c                s   V P                  V P                  4      p\        P                  R\        P
                  ! V^ ,          4       R2,          p\        P                  ! V P                  \        P                  P                  \        P                  P                  \        P                  P                  R7      pVP                  R\        P                    R24       VP#                  V4       VP%                  4       \        P&                  P(                  8X  Ed.   V P*                  P-                  R4      pV'       d   WR8X  d3   V P.                  pV P0                   F  pVR,          pWr8w  g   K  Tp M	  V P*                  P-                  R4      pV'       d   W8X  d   Tp\2        P4                  ! 4       P7                  V^,          4       V P9                  V4       V P*                  P-                  R4      p	V	'       d   W8X  dC   WPP*                  R&   \2        P4                  ! 4       P;                  V4       V P=                  4        VP?                  4        R# )zRemove profile button clicked handler

If we removed the last profile, a default one will automatically get
added back by the settings manager.
rp  rq  rr  r  :NNNrO  N) r  rP   r	   ZPROFILE_REMOVE_MESSAGEr   rt  r   ru  rH   rv  rw  rx  ry  rz  r{  r|  ZPROFILE_REMOVE_LABELr}  r~  r  r  r&   r   r'   rQ   r   ri   Zremove_profileloadProfiler[  r   r`  )
rW   r6  Z
oldProfilerE  r  ZnewStartingProfiler  Z
rowProfilern  r  r  rY   removeProfileButtonClickedZ'OrcaSetupGUI.removeProfileButtonClicked;  s    ))$*<*<=
22$))*Q-89>?""4;;0E0E(+(<(<+.??+A+AC 	C	 > >?tDE&&w/::<3++/// "&!3!34E!F%);)I%)%9%9"22C!$QJ!/-7*	 3 ++O<J!9/
((*99*Q-HZ( #nn001BCO"o&C4F01 ,,.CCDVW))+rZ   c                s8   V P                   '       d   R# \        P                  ! R\        P                  P                  \        P
                  P                  \        P                  P                  R7      pVP                  R\        P                   R24       VP                  \        P                  4       VP                  4       pV\        P                  P                   8X  d#   VP#                  4        V P%                  4        R# VP#                  4        R# )z#Load profile button clicked handlerNrr  rp  rq  )rM   r   ru  rv  rw  rx  ry  rz  r{  r|  r	   ZPROFILE_LOAD_LABELr}  ZPROFILE_LOAD_MESSAGEr~  r  r  r`  loadSelectedProfile)rW   r6  r  r  r   rY   loadProfileButtonClickedZ%OrcaSetupGUI.loadProfileButtonClickedj  s     ""4%%__))..0
 	C	 < <=TBC&&y'E'EF::<s''+++NN$$&NNrZ   c                s^    V P                  V P                  4      pV P                  V4       R# )zLoad selected profileN)r  rP   r  )rW   rO  r  rY   r  Z OrcaSetupGUI.loadSelectedProfile~  s(     ,,T-?-?@'rZ   c                s   V P                  4        WP                  R&   \        P                  ! 4       P	                  V^,          4       \        P                  ! 4       P                  V^,          4      V n        \        P                  ! RR7       V P                  4        \        P                  ! 4        V P                  4        V P                  4        V P                  4        R# )zLoad profilerO  T)Zskip_reload_messageN)rY  r&   r   ri   Zset_profileZget_general_settingsr   r\  r   r   r]  r   r   r  )rW   r  r   rY   r  ZOrcaSetupGUI.loadProfile  s     	 *1'$$&2271:>)557LLWUVZXD9##%!!#!rZ   )0rS   r'   rM   rV   r(   r)   r*   r+   r,   r-   r.   r/   r1   r0   r2   r3   r4   r&   rP   rQ   r5   r6   rJ   rK   rL   r7   r8   rT   rN   rO   r?   r9   r:   r;   r<   r=   r>   r@   rA   rB   rC   rD   rE   rR   rF   rG   rH   rI   rs  )F)r   )NFr  )|r   Z
__module__Z__qualname__Z__firstlineno__r    r%   rU   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r  r  r  r$  r(  r*  r/  r0  r8  rB  rH  rJ  rM  rN  rR  r   r  r  r  r   r  r  r   r   r  r   r   r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r#  r$  r%  r&  r'  r(  r)  r+  r,  r/  r2  r3  r4  r5  r   r   r   r@  r9  r   rF  rG  rH  rJ  rP  rT  rU  rV  rW  rX  rY  r^  rb  rc  r_  rf  re  rd  rm  r  r  r  r  r  Z__static_attributes__Z__classdictcell__)Z__classdict__s   @rY   r   r   b   s    F96vN`,	M(T$(<
H
(F
(
H
(;:B4H6Dp@R6h#J!MF!#F/,b%(N"H4H0J
E
D
$$RYh.3`
JEXpBdB,CH
",)";<6"9 $  -^>66K%Z*CH#$@#J@>6 E"E"E":$ 48484634F2,
UK")8V925(PN5"5('R;z/b@22;($$$*$,$$M:."8H8$8.8>8(LN-
)%X-^((" "rZ   r   )\Z__doc__Z__id__Z__version__Z__date__Z__copyright__Z__license__ZgiZrequire_versionZgi.repositoryr    r!   r   r   r   r   r   r  r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Z	ax_objectr   Zax_textr   r   r  ZImportErrorr   r  r  rx   r{   r}   r~   r   r   r   r   r   r   r   r  r  ZVALUErD  rI  r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r$   r   r6  rZ   rY   <module>r     s  ( ;? 	   7E "   5%     5%    	    !                !     *   , %E  b	?'9i|Xx(,U1X %y+uU1X  +/uQx. ')Y "&eAh&(:<N 1 >B%)_;+-C13J)+?+-G89u4"?44 u4"A  Es   7F/ /	F;:F;