+
    Qil  c            	       sl   R t RtRtRtRtRt^ RIt^ RIt^ RIH	t	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  ]	P,                  P/                  ]	P0                  P2                  ]	P4                  P6                  RRRRR4      t ! R R4      t]! 4       tR t R#   ] d    Rt L!i ; i)zSettings backend manager.z$Id$z
$Revision$z$Date$z2Copyright (c) 2010 Consorcio Fernando de los Rios.ZLGPLN)GioGLib)debug)	orca_i18n)settings)pronunciation_dict)ACSS)AXObject)
KeyBindingzorg.a11y.Busz/org/a11y/buszorg.freedesktop.DBus.Propertiesc                   sZ  a  ] tR t^7t o RtRtR tR/R ltR tR/ 3R lt	R t
R tR	 tR
 tR tR tR tR tR tR tR0R ltR tR1R ltR tR tR tR tR tR1R ltR tR2R ltR tR t R t!R0R lt"R0R  lt#R0R! lt$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R3R) lt,R* t-R+ t.R3R, lt/R- t0R.t1V t2R# )4SettingsManagerzSettings backend managerNc                sx    R \        V 4      9  d    \        P                  ! V .VO5/ VB V n        V P                  # )Z
__instance)ZvarsZobject__new__Z_SettingsManager__instance)ZclsZargsZkwargss   &*,:/usr/lib/python3.14/site-packages/orca/settings_manager.pyr
   ZSettingsManager.__new__<   s2    tCy(#^^CA$A&ACN~~    c                s   \         P                  ! \         P                  RR4       RV n        RV n        RV n        Wn        RV n        / V n        / V n	        / V n
        / V n        / V n        / V n        / V n        / V n        / V n        / V n        RV n        / V n        / V n        / V n        V P-                  4       '       g   \/        R4      h/ V n        RV n        R.V n        \         P                  ! \         P                  RR4       R# )	zInitialize a SettingsManager Object.
If backend isn't defined then uses default backend, in this
case json-backend.
backend parameter can use the follow values:
backend='json'
zSETTINGS MANAGER: InitializingTN z%SettingsManager._load_backend failed.Fapp-settingszSETTINGS MANAGER: Initialized)r   print_message
LEVEL_INFObackend_module_backendprofilebackend_name
_prefs_dirdefault_generaldefault_pronunciationsdefault_keybindingsprofile_generalprofile_pronunciationsprofile_keybindingsgeneralpronunciationskeybindings_runtime_settings_active_app_app_general_appPronunciations_appKeybindings_load_backend	Exceptioncustomized_settings_customization_completedsettingsPackagesselfZbackend   &&r   __init__ZSettingsManager.__init__A   s    	E,,.NPTU"#
  "&(##% 
  "&(##% 
  !#"$!!!##CDD#% (-% "0 0E,,.MtTr   c                s   / pV P                   P                  4        FU  w  r#W0P                  P                  V4      8w  g   K&  W P                  9  g   K8  V P                  P                  V4      W&   KW  	  V P
                  P                  4        FC  w  r#W0P                  P                  V4      8w  g   K&  V P                  P                  V4      W&   KE  	  V# )z9Returns overridden settings for the purpose of debugging.)r   itemsr   getr&   r!   )r*   Zchangedkeyvalues   &   r   %get_overridden_settings_for_debuggingZ5SettingsManager.get_overridden_settings_for_debuggingx   s     ..446JC((--#=U=U2U#||//4 7 ++113JC((--#||//4 4 r   c                s   \         P                  ! \         P                  RR4       V P                  P	                  V4       T;'       g4    \
        P                  P                  \        P                  ! 4       R4      V n
        V P                  P                  V P                  4      V n        V P                  4        V P                  4        V P!                  4        V P"                  P%                  4       V n        V P)                  4       '       g4   V P&                  P	                  V P                  P+                  4       4       V P,                  P%                  4       V n        V P0                  P%                  4       V n        V P5                  4        \         P                  ! \         P                  RR4       RV P6                  .p\         P8                  ! \         P                  VR4       V P6                  f\   V P&                  P;                  R4      ^,          V n        RV P6                  .p\         P8                  ! \         P                  VR4       V P=                  V P6                  4       R# )	zActivates this manager.zSETTINGS MANAGER: ActivatingTorcazSETTINGS MANAGER: Activatedz$SETTINGS MANAGER: Current profile isNstartingProfilez(SETTINGS MANAGER: Current profile is now)r   r   r   r&   updateospathjoinr   Zget_user_data_dirr   r   ZBackendr   _set_default_general_set_default_pronunciations_set_default_keybindingsr   copyr   is_first_start
getGeneralr   r   r   r   _create_defaultsr   print_tokensr.   set_profile)r*   ZprefsDirZcustomSettingstokenss   &&& r   activateZSettingsManager.activate   s    	E,,.LdS  ''7" > >ww||D224f= 	 ++33DOOD!!#((*%%'++002""$$LL 8 8 :;"99>>@3388: 	E,,.KTR 9$,,G5++VT:<<<<++,=>qADL@$,,OFu//>&r   c                s     RV P                    R2p\        P                  ! VR4      V n        R#   \         d     R# i ; i)z(Loads backend for managing user settingsz
.backends.r   r2   TF)r   	importlibimport_moduler   r%   r)      & r   r$   ZSettingsManager._load_backend   sF    	"4#4#4"5X>G"+"9"9'6"JD 		s   ,0 ??c                s   R pV P                   pV! V4       \        P                  P                  VR4      pV! V4       \        P                  P                  VR4      p\        P                  P	                  V4      '       g;   \        P
                  ! \        P                  ! V\        P                  R4      4       \        P                  P                  VR4      pV! V4       \        P                  P                  VR4      pV! V4       \        P                  P                  VR4      p\        P                  P	                  V4      '       g;   \        P
                  ! \        P                  ! V\        P                  R4      4       \        P                  P                  VR4      p\        P                  P	                  V4      '       g;   \        P
                  ! \        P                  ! V\        P                  R4      4       V P                  4       '       d>   V P                  P                  V P                  V P                  V P                  4       R# R# )	z?Creates the initial structure for storing the default settings.c                 s    \         P                  P                  V 4      '       g   \         P                  ! V 4       R # R # N)r5   r6   ZisdirZmakedirs)ZdirName   &r   _create_dirZ5SettingsManager._create_defaults.<locals>._create_dir   s&    77==))G$ *r   zorca-scriptsz__init__.pyi  r   Zsoundszorca-customizations.pyN)r   r5   r6   r7   ZexistsZcloseZopenZO_CREATr<   r   ZsaveDefaultSettingsr   r   r   )r*   rH   Zorca_dirZorca_script_dirZinitFileZorcaSettingsDirZorcaSoundsDirZuserCustomFile   &       r   r>   Z SettingsManager._create_defaults   s   	% ??H '',,x@O$77<<?ww~~h''HHRWWXrzz59:'',,x@O$Xx8M" 77<<-8ww~~h''HHRWWXrzz59:h0HIww~~n--HHRWW^RZZ?@  MM--d.B.B.2.I.I.2.F.FH !r   c                    / V n         R# )z4Get the pronunciations by default from orca.settingsN)r   r*   rG   r   r9   Z+SettingsManager._set_default_pronunciations   s
    &(#r   c                rJ   )z1Get the keybindings by default from orca.settingsN)r   rK   rG   r   r:   Z(SettingsManager._set_default_keybindings   s
    #% r   c                s    V P                  4        / V n        \        P                   FA  pV P                  P                  V4      pVf    \        \        V4      pW P                  V&   KC  	  R#   \         d     L!i ; i)z6Get the general settings by default from orca.settingsN)_get_customized_settingsr   r   ZuserCustomizableSettingsr&   r.   getattrr%   )r*   r/   r0      &  r   r8   Z$SettingsManager._set_default_general   sv    %%'!44C,,005E}#Hc2E ).  % 5
 ! s   A//A=<A=c                sb   V P                   '       d   V P                  # / p\        P                  P	                  4        F	  w  r#W1V&   K  	  V P                  4       V n         VP	                  4        F:  w  r#\        P                  P                  V4      pW48w  g   K,  W@P                  V&   K<  	  R # rF   )r'   r&   r   Z__dict__r-   _load_user_customizationsr.   )r*   ZoriginalSettingsr/   r0   ZcustomValue   &    r   rL   Z(SettingsManager._get_customized_settings   s    (((+++"++113JC$)S! 4 )-(F(F(H%*002JC"++//4K#0;((- 3r   c                sH   RpV P                   .pR.pV^ ,          R,           p \        P                  P                  RV4      pVeR   \        P                  P	                  V4      pVP
                  P                  V4       VP                  RVR.4       RpMVP                  RVR	.4        \        P                  ! \        P                  VR4       V#   \         d    TP                  RTR
.4        LI\         d!   pRpTP                  RTR.4        Rp?LnRp?ii ; i)zAttempt to load the user's orca-customizations. Returns a boolean
indicating our success at doing so, where success is measured by the
likelihood that the results won't be different if we keep trying.Fz5SETTINGS MANAGER: Attempt to load orca-customizationsz/orca-customizations.pyzorca-customizationsNZfromz
succeeded.Tzfailed. Spec not found.zfailed. File not found.zfailed due to:z. Not loading customizations.)r   rC   ZutilZspec_from_file_locationZmodule_from_specZloaderZexec_moduleZextendZFileNotFoundErrorr%   r   r?   Z	LEVEL_ALL)r*   ZsuccessZpathListrA   Zmodule_pathZspecmoduleZerrorrI   r   rO   Z)SettingsManager._load_user_customizations  s   
 OO$IJqk$==	V>>99:OQ\]D"88>''/v{LABv{4MNO 	5??FD9 ! 	LMM6;0IJK 	VGMM+U4STUU	Vs*   A4C C D!7D! D!DD!c                    V P                   # rF   )r   rK   rG   r   get_prefs_dirZSettingsManager.get_prefs_dir   s    r   c                sF    W P                   V&   V P                  W/4       R# )z#Updates the named setting to value.N)r   _set_settings_runtime)r*   Znamer0   s   &&&r   set_settingZSettingsManager.set_setting#  s"     (-t$""D<0r   c                s$    \        \        VR 4      # rF   )rM   r   )r*   settingNamer+   r   get_settingZSettingsManager.get_setting)  s    xd33r   c                s
   V P                  R 4      p\        VP                  V/ 4      4      pVP                  4       pVP	                  4       pV'       d/   \        \        V4      4      ^8X  d   V RVP                  4        2pV# )voicesZ_)rW   r   r.   Z	getLocaleZ
getDialectZlenstrZupper)r*   ZvoicerX   ZvZlangZdialect   &&    r   get_voice_localeZ SettingsManager.get_voice_locale,  sl    !!(+E2&'{{},,.s3w<(A-V1W]]_-.Dr   c                s\   . pV P                  R4       FX  p \        P                  ! RV 24      pVP                  V4       RV.p\        P
                  ! \        P                  VR4       KZ  	  V#   \         d/    RT.p\        P
                  ! \        P                  TR4        K  i ; i)z/Imports all known SpeechServer factory modules.ZspeechFactoryModuleszorca.z.SETTINGS MANAGER: Valid speech server factory:Tz0SETTINGS MANAGER: Invalid speech server factory:)rW   rC   rD   Zappendr   r?   r   r%   )r*   Z	factoriesZmodule_namerQ   rA   rP   r   get_speech_server_factoriesZ+SettingsManager.get_speech_server_factories5  s     	++,BCKC"0051FG  (JKX""5#3#3VTB D 	  CLkZ""5#3#3VTBCs   AA225B+*B+c                s   RVR.p\         P                  ! \         P                  VR4       Vf   V P                  pV P	                  V4      ;'       g    / V n        V P                  V4      ;'       g    / V n        V P                  V4      ;'       g    / V n	        RVR.p\         P                  ! \         P                  VR4       R# )zGet from the active backend all the settings for the current
profile and store them in the object's attributes.
A profile can be passed as a parameter. This could be useful for
change from one profile to another.z&SETTINGS MANAGER: Loading settings forr   TNSETTINGS MANAGER: Settings forzprofile loaded)
r   r?   r   r   get_general_settingsr   get_pronunciationsr   get_keybindingsr   )r*   r   rA      && r   _load_profile_settingsZ&SettingsManager._load_profile_settingsE  s     ;GYO5++VT:?llG#88AGGR&*&=&=g&F&L&L"##'#7#7#@#F#FB 2G=MN5++VT:r   c                sb   Rp\         P                  ! \         P                  VR4       V P                  P	                  V P
                  4       V P                  P	                  V P                  4       V P                  P	                  V P                  4       V P                  P	                  V P                  4       V P                  P	                  V P                  4       V P                  P	                  V P                  4       Rp\         P                  ! \         P                  VR4       R# )zVUpdate the changed values on the profile settings
over the current and active settingsz#SETTINGS MANAGER: Merging settings.Tz"SETTINGS MANAGER: Settings merged.N)r   r   r   r   r4   r!   r   r"   r   r#   r   r   r   )r*   msgrE   r   _merge_settingsZSettingsManager._merge_settingsW  s     4E,,c48##D$5$56##**4+B+BC  ''(<(<=D001""4#>#>? 8 892E,,c48r   c                sb    V P                  4       pV'       g   V P                  R4       V'       * # )zEnables the GNOME accessibility flag.  Users need to log out and
then back in for this to take effect.

Returns True if an action was taken (i.e., accessibility was not
set prior to this call).
T)is_accessibility_enabledset_accessibility)r*   ZalreadyEnabledrE   r   _enable_accessibilityZ%SettingsManager._enable_accessibilityi  s,     668""4(!!!r   c                s(   R p\         P                  ! \         P                  VR4       Rp\        '       g   RpVR,          pM)\        P	                  RRR4      pV\        V4      ,          p\         P                  ! \         P                  VR4       V# )z7SETTINGS MANAGER: Checking if accessibility is enabled.Tz)SETTINGS MANAGER: Accessibility enabled: FError (no proxy)(ss)org.a11y.Status	IsEnabled)r   r   r   _PROXYGetrY   r*   rc   ZrvrN   r   re   Z(SettingsManager.is_accessibility_enabledw  sv    GE,,c489vB%%CF$5{CB3r7NCE,,c48	r   c                s   R V R2p\         P                  ! \         P                  VR4       \        '       g+   Rp\         P                  ! \         P                  VR4       R# \        P
                  ! RV4      p\        P                  RRRV4       R	V R2p\         P                  ! \         P                  VR4       R
# )z5SETTINGS MANAGER: Attempting to set accessibility to Z.Tz"SETTINGS MANAGER: Error (no proxy)Fbz(ssv)rj   rk   z4SETTINGS MANAGER: Finished setting accessibility to N)r   r   r   rl   r   ZVariantZSet)r*   Zenablerc   ZvEnable   &&  r   rf   Z!SettingsManager.set_accessibility  s    EfXQOE,,c48v6C 0 0#t<,,sF+

7-{GDDVHANE,,c48r   c                s    Rp\         '       g   RpVR,          pM)\         P                  RRR4      pV\        V4      ,          p\        P                  ! \        P
                  VR4       V# )zReturns True if the screen reader service is enabled. Note that
this does not necessarily mean that Orca (or any other screen reader)
is running at the moment.z4SETTINGS MANAGER: Is screen reader service enabled? Frh   ri   rj   ZScreenReaderEnabledT)rl   rm   rY   r   r   r   rn   rN   r    is_screen_reader_service_enabledZ0SettingsManager.is_screen_reader_service_enabled  s]    
 EvB%%CF$57LMB3r7NCE,,c48	r   c                sf    Vf   \         P                  pV P                  P                  RV4       R # )Nr3   )r   r   r   Z_setProfileKeyr*   r   r+   r   set_starting_profileZ$SettingsManager.set_starting_profile  s'    ?&&G$$%6@r   c                rR   rF   )r   rK   rG   r   get_profileZSettingsManager.get_profile  s    ||r   c                s   RV.p\         P                  ! \         P                  VR4       V P                  R4      pWn        V P                  V4       V P                  4        V P                  V P                  4       V'       g   R# V P                  R4      pWE8w  dC   \        P                  ! V4       \        P                  ! V4       \        P                  ! V4       RV.p\         P                  ! \         P                  VR4       R# )zSet a specific profile as the active one.
Also the settings from that profile will be loading
and updated the current settings with them.z%SETTINGS MANAGER: Setting profile to:TdefaultNz!SETTINGS MANAGER: Profile set to:)r   r?   r   r[   r   rb   rd   rT   r   r   ZsetLocaleForNamesZsetLocaleForMessagesZsetLocaleForGUI)r*   r   ZupdateLocalerA   ZoldVoiceLocaleZnewVoiceLocales   &&&   r   r@   ZSettingsManager.set_profile  s    
 :7C5++VT:..y9##G,""4<<0..y9+''7**>:%%n55w?5++VT:r   c                s<    V P                   P                  V4       R # rF   )r   remove_profilerr   r+   r   rv   ZSettingsManager.remove_profile  s    $$W-r   c                s   R p\         P                  ! \         P                  VR4       VP                  4        F  w  r4\	        \
        \        V4      V4       K!  	  V P                  4        V P                  P                  4        F  w  r4\	        \
        \        V4      V4       K!  	  Rp\         P                  ! \         P                  VR4       R# )z+SETTINGS MANAGER: Setting runtime settings.Tz'SETTINGS MANAGER: Runtime settings set.N)	r   r   r   r-   Zsetattrr   rY   rL   r&   )r*   ZsettingsDictrc   r/   r0      &&   r   rT   Z%SettingsManager._set_settings_runtime  s    ;E,,c48&,,.JCHc#h. /%%'2288:JCHc#h. ; 8E,,c48r   c                s    / \         n         VP                  4        F/  w  r#V'       g   K  V'       g   K  \         P                  ! W#4       K1  	  R # rF   )r   ZvaluesZset_pronunciation)r*   ZpronunciationsDictr/   r0   rp   r   _set_pronunciations_runtimeZ+SettingsManager._set_pronunciations_runtime  s7    02-,335JCsuu"44S@ 6r   c                8    V P                   P                  V4      # )ztReturn the current general settings.
Those settings comes from updating the default settings
with the profiles' ones)r   r=   rr   r+   r   r^   Z$SettingsManager.get_general_settings  s     }}''00r   c                ry   )z{Return the current pronunciations settings.
Those settings comes from updating the default settings
with the profiles' ones)r   r_   rr   r+   r   r_   Z"SettingsManager.get_pronunciations  s     }}//88r   c                ry   )zxReturn the current keybindings settings.
Those settings comes from updating the default settings
with the profiles' ones)r   r`   rr   r+   r   r`   ZSettingsManager.get_keybindings  s     }},,W55r   c                s   Rp\         P                  ! \         P                  VR4       / V n        VP	                  4        F  w  r4VR9   d   K  VR8X  d   W@P                  V&   K%  W@P
                  P                  V4      8w  d   W@P                  V&   KT  V P                  P                  V4      V8w  g   Kv  W@P                  V&   K  	  Rp\         P                  ! \         P                  VR4       R# )zJSet the changed general settings from the defaults' ones
as the profile's.z6SETTINGS MANAGER: Setting general settings for profileTr   z2SETTINGS MANAGER: General settings for profile setN)r3   ZactiveProfile)r   r   r   r   r-   r   r.   r   )r*   r   rc   r/   r0   rw   r   _set_profile_generalZ$SettingsManager._set_profile_general  s     GE,,c48!!--/JC::	!,1$$S)..22377,1$$S)!!#&%/,1$$S) * CE,,c48r   c                   Rp\         P                  ! \         P                  VR4       V P                  P	                  4       V n        V P
                  P                  V4       Rp\         P                  ! \         P                  VR4       R# )zQSet the changed pronunciations settings from the defaults' ones
as the profile's.z=SETTINGS MANAGER: Setting pronunciation settings for profile.Tz9SETTINGS MANAGER: Pronunciation settings for profile set.N)r   r   r   r   r;   r   r4   )r*   r   rc   ra   r   _set_profile_pronunciationsZ+SettingsManager._set_profile_pronunciations  sj     NE,,c48&*&A&A&F&F&H###**>:IE,,c48r   c                r{   )zNSet the changed keybindings settings from the defaults' ones
as the profile's.z;SETTINGS MANAGER: Setting keybindings settings for profile.Tz7SETTINGS MANAGER: Keybindings settings for profile set.N)r   r   r   r   r;   r   r4   )r*   r   rc   ra   r   _set_profile_keybindingsZ(SettingsManager._set_profile_keybindings  sj     LE,,c48#'#;#;#@#@#B   ''4GE,,c48r   c                s>   / pV P                  V P                  4      pVP                  4        F   w  rxWP                  V4      8w  g   K  WV&   K"  	  / p	V P	                  V P                  4      p
VP                  4        F   w  rxWP                  V4      8w  g   K  WV&   K"  	  / pV P                  V P                  4      pVP                  4        F   w  rxWP                  V4      8w  g   K  WV&   K"  	  V P                  P                  VV P                  VV	V4       R # rF   )r^   r   r-   r.   r_   r`   r   ZsaveAppSettings)r*   ZappNamer   r   r   Z
appGeneralr   r/   r0   ZappPronunciationsr   ZappKeybindingsr   s   &&&&&        r   _save_app_settingsZ"SettingsManager._save_app_settings   s    
33DLLA!--/JC++C00"'3 * !%!8!8!F(..0JC22377).#& 1 "224<<@%++-JC//44&+s# . 	%%g&*ll&0&7&4		6r   c                rR   )z6Returns a dictionary with settings toggled at runtime.)r   rK   rG   r   get_runtime_settingsZ$SettingsManager.get_runtime_settings9  s     %%%r   c                sn   RVRVP                   R.p\        P                  ! \        P                  VR4       VP                   pV'       d*   V P	                  \
        P                  ! V4      W#V4       R# VP                  R\        P                  4      pV^,          pWn	        VP                  RV4      V P                  R&   V P                  V4       V P                  V4       V P                  V4       RV P                  .p\        P                  ! \        P                  VR4       V P                  P                  V P                  V P                   V P"                  V P$                  4       R	VRVP                   R
.p\        P                  ! \        P                  VR4       V P'                  4       # )z3Save the settings provided for the script provided.z%SETTINGS MANAGER: Saving settings forz(app:Z)TNr   r3   z$SETTINGS MANAGER: Saving for backendr]   z) saved)appr   r?   r   r~   r   get_namer.   r   r   r   rz   r|   r}   r   ZsaveProfileSettingsr   r   r   rg   )	r*   scriptr   r   r   rA   r   Z_profileZcurrentProfiles	   &&&&&    r   save_settingsZSettingsManager.save_settings>  sk    :67FJJX[\5++VT:jj##H$5$5c$:GU`a ;;y(*:*:;!!% 3:++>O>F3H./ 	!!'*((8%%k28$--H5++VT:))$,,*.*>*>*.*E*E*.*B*B	D
 3FGVZZQZ[5++VT:))++r   c                sj    Vw  r#rEV'       g   RpV# V\        V4      \        V4      \        V4      3pV# )zAConverts the values of bindingTuple into KeyBinding-ready values.)r       r   r   )Zint)r*   bindingTuplekeysymmaskmodsclicksrZ   r   _adjust_binding_tuple_valuesZ,SettingsManager._adjust_binding_tuple_valuesb  s@     &2"d(L  #CIs4y#f+FLr   c                s   V P                   pVP                  4        EF  w  rVVP                  V4      pV'       g   K!  V'       d   VP                  V4      '       g.   R VR.p\        P
                  ! \        P                  VR4       Km  VP                  V4      '       g8   R VP                  R.p\        P
                  ! \        P                  VR4       K  VP                  V4      p	Rp
V	 F  pRV.p\        P
                  ! \        P                  VR4       V
e>   VP                  4       V
8w  d)   Rp\        P                  ! \        P                  VR4       VP                  4       p
VP                  VR4       K  	  V Fi  pV P                  V4      pVw  rpp\        WVVVV
R7      pVP                  V4       R VRV 2.p\        P
                  ! \        P                  VR4       Kk  	  EK  	  V# )	zSETTINGS MANAGER:z is not in the bindings provided.Tzis not enabled. Not overriding.Nz*SETTINGS MANAGER: Removing old binding forzESETTINGS MANAGER: Warning, different enabled values found for binding)Zenabledzis rebound to )r   r-   r.   Zhas_handlerr   r?   r   Zhas_enabled_handlerZfunctionZget_bindings_for_handlerZ
is_enabledr   Zremover   r   Zadd)r*   ZhandlersZbindingsZenabled_onlyZkeybindingsSettingsZhandlerStringZbindingTuplesZhandlerrA   ZoldBindingsZ
wasEnabledro   rc   r   r   r   r   r   Z
newBindings   &&&&               r   override_key_bindingsZ%SettingsManager.override_key_bindingsm  s    #66,?,E,E,G(Mll=1G++G4417<^_F&&u'7'7F33G<<173C3C?AF&&u'7'7F";;GDKJ FJ""5#3#3VTB)alln
.JaC''(8(8#tD\\^
4( ! !.#@@N-9*dF'dGVU_`
Z(-w.8WX""5#3#3VTB !.= -HL r   c                6    V P                   P                  4       # )z,Check if the firstStart key is True or false)r   r<   rK   rG   r   r<   ZSettingsManager.is_first_start  s    }}++--r   c                r   )z*Get available profiles from active backend)r   available_profilesrK   rG   r   r   Z"SettingsManager.available_profiles  s     }}//11r   c                s   V'       g   R# V P                   P                  \        P                  ! V4      4      pVP	                  R/ 4      pVP	                  V P
                  / 4      pVP	                  R/ 4      pVP	                  V4      pVf?   V'       d7   V P                   P                  V P
                  4      pVP	                  V4      pV# )z&Returns the specified setting for app.Nprofilesr   )r   get_app_settingsr   r   r.   r   r=   )	r*   r   rV   ZfallbackOnDefaultZappPrefsr   profilePrefsr   Z
appSettings	   &&&&     r   get_app_settingZSettingsManager.get_app_setting  s     ==11(2C2CC2HI<<
B/||DLL"5""9b1[[-
"3mm..t||<G [1Jr   c                s   V'       d   VP                   '       g   R# / V n        V P                  P                  4        F  pV P                  P                  V4       K   	  V P                  P                  \        P                  ! VP                   4      4      pVP                  R/ 4      pVP                  V P                  / 4      pVP                  R/ 4      V n        VP                  R/ 4      V n        VP                  R/ 4      V n        \        P                  ! VP                   4      V n        V P                  4        V P!                  4        V P#                  V P$                  4       V P'                  V P                  4       R# )z8Load the users application specific settings for an app.Nr   r   r   r   )r   r   r"   Zkeysr   Zpopr   r   r   r   r.   r   r!   r#   r    rb   rd   rT   r   rx   )r*   r   r/   Zprefsr   r   rZ   r   load_app_settingsZ!SettingsManager.load_app_settings  s%    6:::!#**//1C##C( 2 ..x/@/@/LM99Z,||DLL"5(,,Y;+//rB"."2"23CR"H#,,VZZ8##%""4<<0(()<)<=r   )r    r#   r"   r!   r   r'   r   r   r   r   r&   r   r   r   r   r   r   r   r   r   r   r(   )Zjson)ru   rF   )ru   F)T)3Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z	_instancer
   r,   r1   rB   r$   r>   r9   r:   r8   rL   rO   rS   rU   rW   r[   r\   rb   rd   rg   re   rf   rq   rs   rt   r@   rv   rT   rx   r^   r_   r`   rz   r|   r}   r~   r   r   r   r   r<   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r	   r	   7   s     "I
5Un
 !%R %'N(HT)&.<:14 ;$9$"9"A
;4.9A1969,9962&
",H	+Z.2
"> >r   r	   c                 s    \         # )z'Returns the Settings Manager singleton.)_manager r   r   get_managerr     s    Or   )!r   Z__id__Z__version__Z__date__Z__copyright__Z__license__rC   r5   Zgi.repositoryr    r   r   r   r   r   r   Zacssr   Z	ax_objectr   r   r   Z	DBusProxyZnew_for_bus_syncZBusTypeZSESSIONZDBusProxyFlagsZNONErl   r%   r	   r   r   r   r   r   <module>r      s   ,  D  	 #        #
]]++)FT
> T
>l y  Fs   A	B' '	B32B3