[ Avaa Bypassed ]




Upload:

Command:

www-data@18.218.241.211: ~ $
# Orca
#
# Copyright 2004-2009 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
# Boston MA  02110-1301 USA.

"""Manages the settings for Orca.  This will defer to user settings first, but
fallback to local settings if the user settings doesn't exist (e.g., in the
case of gdm) or doesn't have the specified attribute."""

__id__        = "$Id$"
__version__   = "$Revision$"
__date__      = "$Date$"
__copyright__ = "Copyright (c) 2004-2009 Sun Microsystems Inc."
__license__   = "LGPL"

import pyatspi

from . import messages
from .acss import ACSS

userCustomizableSettings = [
    "orcaModifierKeys",
    "enableSpeech",
    "onlySpeakDisplayedText",
    "speechServerFactory",
    "speechServerInfo",
    "voices",
    "speechVerbosityLevel",
    "readFullRowInGUITable",
    "readFullRowInDocumentTable",
    "readFullRowInSpreadSheet",
    "enableSpeechIndentation",
    "enableEchoByCharacter",
    "enableEchoByWord",
    "enableEchoBySentence",
    "enableKeyEcho",
    "enableAlphabeticKeys",
    "enableNumericKeys",
    "enablePunctuationKeys",
    "enableSpace",
    "enableModifierKeys",
    "enableFunctionKeys",
    "enableActionKeys",
    "enableNavigationKeys",
    "enableDiacriticalKeys",
    "enablePauseBreaks",
    "enableTutorialMessages",
    "enableMnemonicSpeaking",
    "enablePositionSpeaking",
    "enableBraille",
    "enableBrailleContext",
    "disableBrailleEOL",
    "brailleVerbosityLevel",
    "brailleRolenameStyle",
    "brailleSelectorIndicator",
    "brailleLinkIndicator",
    "enableSound",
    "soundVolume",
    "playSoundForRole",
    "playSoundForState",
    "playSoundForPositionInSet",
    "playSoundForValue",
    "verbalizePunctuationStyle",
    "presentToolTips",
    "sayAllStyle",
    "keyboardLayout",
    "speakBlankLines",
    "speakMultiCaseStringsAsWords",
    "speakNumbersAsDigits",
    "speakMisspelledIndicator",
    "enabledSpokenTextAttributes",
    "enabledBrailledTextAttributes",
    "textAttributesBrailleIndicator",
    "profile",
    "speakProgressBarUpdates",
    "brailleProgressBarUpdates",
    "beepProgressBarUpdates",
    "progressBarUpdateInterval",
    "progressBarVerbosity",
    "ignoreStatusBarProgressBars",
    "enableBrailleWordWrap",
    "enableContractedBraille",
    "brailleContractionTable",
    "enableMouseReview",
    "speakCellCoordinates",
    "speakSpreadsheetCoordinates",
    "alwaysSpeakSelectedSpreadsheetRange",
    "speakCellSpan",
    "speakCellHeaders",
    "skipBlankCells",
    "largeObjectTextLength",
    "structuralNavigationEnabled",
    "wrappedStructuralNavigation",
    "chatMessageVerbosity",
    "chatSpeakRoomName",
    "chatAnnounceBuddyTyping",
    "chatRoomHistories",
    "enableFlashMessages",
    "brailleFlashTime",
    "flashIsPersistent",
    "flashIsDetailed",
    "messagesAreDetailed",
    "presentDateFormat",
    "presentTimeFormat",
    "activeProfile",
    "startingProfile",
    "spellcheckSpellError",
    "spellcheckSpellSuggestion",
    "spellcheckPresentContext",
    "useColorNames",
    "capitalizationStyle",
    "findResultsVerbosity",
    "findResultsMinimumLength",
    "structNavTriggersFocusMode",
    "caretNavTriggersFocusMode",
    "layoutMode",
    "rewindAndFastForwardInSayAll",
    "structNavInSayAll",
    "speakDescription",
    "speakContextBlockquote",
    "speakContextPanel",
    "speakContextLandmark",
    "speakContextNonLandmarkForm",
    "speakContextList",
    "speakContextTable",
    "sayAllContextBlockquote",
    "sayAllContextPanel",
    "sayAllContextLandmark",
    "sayAllContextNonLandmarkForm",
    "sayAllContextList",
    "sayAllContextTable"
]

GENERAL_KEYBOARD_LAYOUT_DESKTOP = 1
GENERAL_KEYBOARD_LAYOUT_LAPTOP  = 2

DESKTOP_MODIFIER_KEYS = ["Insert", "KP_Insert"]
LAPTOP_MODIFIER_KEYS  = ["Caps_Lock", "Shift_Lock"]

VERBOSITY_LEVEL_BRIEF   = 0
VERBOSITY_LEVEL_VERBOSE = 1

BRAILLE_UNDERLINE_NONE = 0x00 # 00000000
BRAILLE_UNDERLINE_7    = 0x40 # 01000000
BRAILLE_UNDERLINE_8    = 0x80 # 10000000
BRAILLE_UNDERLINE_BOTH = 0xc0 # 11000000

BRAILLE_ROLENAME_STYLE_SHORT = 0 # three letter abbreviations
BRAILLE_ROLENAME_STYLE_LONG  = 1 # full rolename

PUNCTUATION_STYLE_NONE = 3
PUNCTUATION_STYLE_SOME = 2
PUNCTUATION_STYLE_MOST = 1
PUNCTUATION_STYLE_ALL  = 0

CAPITALIZATION_STYLE_NONE  = "none"
CAPITALIZATION_STYLE_SPELL = "spell"
CAPITALIZATION_STYLE_ICON = "icon"

SAYALL_STYLE_LINE     = 0
SAYALL_STYLE_SENTENCE = 1

PROGRESS_BAR_ALL         = 0
PROGRESS_BAR_APPLICATION = 1
PROGRESS_BAR_WINDOW      = 2

CHAT_SPEAK_ALL             = 0
CHAT_SPEAK_ALL_IF_FOCUSED  = 1
CHAT_SPEAK_FOCUSED_CHANNEL = 2

DEFAULT_VOICE           = "default"
UPPERCASE_VOICE         = "uppercase"
HYPERLINK_VOICE         = "hyperlink"
SYSTEM_VOICE            = "system"

voicesKeys = {
"DEFAULT_VOICE"     : "default",
"UPPERCASE_VOICE"   : "uppercase",
"HYPERLINK_VOICE"   : "hyperlink",
"SYSTEM_VOICE"      : "system"
}


voices = {
    DEFAULT_VOICE: ACSS({}),
    UPPERCASE_VOICE: ACSS({ACSS.AVERAGE_PITCH : 7.0}),
    HYPERLINK_VOICE: ACSS({}),
    SYSTEM_VOICE: ACSS({}),
}

# Profiles
startingProfile = ['Default', 'default']
activeProfile   = ['Default', 'default']
profile         = ['Default', 'default']

# Speech
speechFactoryModules         = ["speechdispatcherfactory"]
speechServerFactory          = "speechdispatcherfactory"
speechServerInfo             = None # None means let the factory decide.
enableSpeech                 = True
silenceSpeech                = False
enableTutorialMessages       = False
enableMnemonicSpeaking       = False
enablePositionSpeaking       = False
enableSpeechIndentation      = False
onlySpeakDisplayedText       = False
presentToolTips              = False
speakBlankLines              = True
repeatCharacterLimit         = 4
readFullRowInGUITable        = True
readFullRowInDocumentTable   = True
readFullRowInSpreadSheet     = False
speakCellCoordinates         = True
speakCellSpan                = True
speakCellHeaders             = True
speakSpreadsheetCoordinates  = True
alwaysSpeakSelectedSpreadsheetRange = False
speakMultiCaseStringsAsWords = False
speakNumbersAsDigits         = False
speakMisspelledIndicator     = True
useColorNames                = True
usePronunciationDictionary   = True
sayAllStyle                  = SAYALL_STYLE_SENTENCE
capitalizationStyle          = CAPITALIZATION_STYLE_NONE
verbalizePunctuationStyle    = PUNCTUATION_STYLE_MOST
speechVerbosityLevel         = VERBOSITY_LEVEL_VERBOSE
messagesAreDetailed          = True
enablePauseBreaks            = True
speakDescription             = True
speakContextBlockquote       = True
speakContextPanel            = True
speakContextNonLandmarkForm  = True
speakContextLandmark         = True
speakContextList             = True
speakContextTable            = True
sayAllContextBlockquote      = True
sayAllContextPanel           = True
sayAllContextNonLandmarkForm = True
sayAllContextLandmark        = True
sayAllContextList            = True
sayAllContextTable           = True

# Braille
tty = 7
enableBraille                  = True
enableBrailleMonitor           = False
enableBrailleContext           = True
enableFlashMessages            = True
brailleFlashTime               = 5000
flashIsPersistent              = False
flashIsDetailed                = True
enableBrailleWordWrap          = False
enableContractedBraille        = False
brailleContractionTable        = ''
disableBrailleEOL              = False
brailleRolenameStyle           = BRAILLE_ROLENAME_STYLE_LONG
brailleSelectorIndicator       = BRAILLE_UNDERLINE_BOTH
brailleLinkIndicator           = BRAILLE_UNDERLINE_BOTH
textAttributesBrailleIndicator = BRAILLE_UNDERLINE_NONE
brailleVerbosityLevel          = VERBOSITY_LEVEL_VERBOSE

# Sound
enableSound = True
soundVolume = 0.5
playSoundForRole = False
playSoundForState = False
playSoundForPositionInSet = False
playSoundForValue = False

# Keyboard and Echo
keyboardLayout               = GENERAL_KEYBOARD_LAYOUT_DESKTOP
orcaModifierKeys             = DESKTOP_MODIFIER_KEYS
doubleClickTimeout           = 0.5
enableKeyEcho                = True
enableAlphabeticKeys         = True
enableNumericKeys            = True
enablePunctuationKeys        = True
enableSpace                  = True
enableModifierKeys           = True
enableFunctionKeys           = True
enableActionKeys             = True
enableNavigationKeys         = False
enableDiacriticalKeys        = False
enableEchoByCharacter        = False
enableEchoByWord             = False
enableEchoBySentence         = False
presentLockingKeys           = None

# Mouse review
enableMouseReview          = False

# Progressbars
speakProgressBarUpdates    = True
brailleProgressBarUpdates  = False
beepProgressBarUpdates     = False
progressBarUpdateInterval  = 10
progressBarSpeechInterval  = None
progressBarBrailleInterval = None
progressBarBeepInterval    = 0
progressBarVerbosity       = PROGRESS_BAR_APPLICATION
ignoreStatusBarProgressBars = True

# Structural navigation
structuralNavigationEnabled = True
skipBlankCells              = False
largeObjectTextLength       = 75
wrappedStructuralNavigation = True
inferLiveRegions            = True

# Chat
chatMessageVerbosity       = CHAT_SPEAK_ALL
chatSpeakRoomName          = False
chatAnnounceBuddyTyping    = False
chatRoomHistories          = False

# Spellcheck
spellcheckSpellError = True
spellcheckSpellSuggestion = True
spellcheckPresentContext = True

# Day and time
presentDateFormat = messages.DATE_FORMAT_LOCALE
presentTimeFormat = messages.TIME_FORMAT_LOCALE

# App search support
FIND_SPEAK_NONE = 0
FIND_SPEAK_IF_LINE_CHANGED  = 1
FIND_SPEAK_ALL = 2
findResultsVerbosity = FIND_SPEAK_ALL
findResultsMinimumLength = 4

# The complete list of possible text attributes.
allTextAttributes = \
    "bg-color:; bg-full-height:; bg-stipple:; direction:; editable:; " \
    "family-name:; fg-color:; fg-stipple:; font-effect:none; indent:0; " \
    "invisible:; justification:left; language:; left-margin:; " \
    "line-height:100%; paragraph-style:Default; pixels-above-lines:; " \
    "pixels-below-lines:; pixels-inside-wrap:; right-margin:; rise:; " \
    "scale:; size:; stretch:; strikethrough:false; style:normal; " \
    "text-decoration:none; text-rotation:0; text-shadow:none; " \
    "text-spelling:none; underline:none; variant:; " \
    "vertical-align:baseline; weight:400; wrap-mode:; writing-mode:lr-tb;"

# The default set of text attributes to speak to the user. Specific
# application scripts (or individual users can override these values if
# so desired. Each of these text attributes is of the form <key>:<value>;
# The <value> part will be the "default" value for that attribute. In
# other words, if the attribute for a given piece of text has that value,
# it won't be spoken. If no value part is given, then that attribute will
# always be spoken.
enabledSpokenTextAttributes = \
    "size:; family-name:; weight:400; indent:0; underline:none; " \
    "strikethrough:false; justification:left; style:normal; " \
    "paragraph-style:; text-spelling:none; fg-color:; bg-color:;"

# The default set of text attributes to be brailled for the user. Specific
# application scripts (or individual users can override these values if
# so desired. Each of these text attributes is of the form <key>:<value>;
# The <value> part will be the "default" value for that attribute. In
# other words, if the attribute for a given piece of text has that value,
# it won't be spoken. If no value part is given, then that attribute will
# always be brailled.
enabledBrailledTextAttributes = \
    "size:; family-name:; weight:400; indent:0; underline:none; " \
    "strikethrough:false; justification:left; style:normal; " \
    "text-spelling:none;"

# Latent support to allow the user to override/define keybindings
# and braille bindings. Unsupported and undocumented for now.
# Use at your own risk.
#
keyBindingsMap          = {}
brailleBindingsMap      = {}

# TODO - JD: Is this still needed now that AT-SPI has its own timeout?
timeoutTime             = 10   # a value of 0 means don't do hang checking
timeoutCallback         = None # Set by orca.py:init to orca.timeout

structNavTriggersFocusMode = False
caretNavTriggersFocusMode = False

layoutMode = True

rewindAndFastForwardInSayAll = False
structNavInSayAll = False

# N.B. The following are experimental and may change or go away at any time.
enableSadPidginHack = False
presentChatRoomLast = False
presentLiveRegionFromInactiveTab = False

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
backends Folder 0755
scripts Folder 0755
__init__.py File 115 B 0644
acss.py File 3.49 KB 0644
bookmarks.py File 8.37 KB 0644
braille.py File 59.87 KB 0644
braille_generator.py File 20.5 KB 0644
braille_rolenames.py File 10.33 KB 0644
brlmon.py File 6.45 KB 0644
brltablenames.py File 7.15 KB 0644
caret_navigation.py File 13.67 KB 0644
chat.py File 33.63 KB 0644
chnames.py File 23.03 KB 0644
cmdnames.py File 55.65 KB 0644
colornames.py File 38.13 KB 0644
common_keyboardmap.py File 6.64 KB 0644
debug.py File 17.16 KB 0644
desktop_keyboardmap.py File 4.62 KB 0644
event_manager.py File 31.81 KB 0644
eventsynthesizer.py File 17.82 KB 0644
find.py File 12.77 KB 0644
flat_review.py File 51.84 KB 0644
formatting.py File 53.94 KB 0644
generator.py File 59.09 KB 0644
guilabels.py File 45.78 KB 0644
input_event.py File 36.41 KB 0644
keybindings.py File 16.39 KB 0644
keynames.py File 9.71 KB 0644
label_inference.py File 19.38 KB 0644
laptop_keyboardmap.py File 4.61 KB 0644
liveregions.py File 21.55 KB 0644
logger.py File 1.97 KB 0644
mathsymbols.py File 88.14 KB 0644
messages.py File 140.32 KB 0644
mouse_review.py File 18.91 KB 0644
notification_messages.py File 6.18 KB 0644
object_properties.py File 32.74 KB 0644
orca.py File 25 KB 0644
orca_gtkbuilder.py File 5.35 KB 0644
orca_gui_commandlist.py File 4.19 KB 0644
orca_gui_find.py File 8.12 KB 0644
orca_gui_navlist.py File 6.66 KB 0644
orca_gui_prefs.py File 139.07 KB 0644
orca_gui_profile.py File 4.06 KB 0644
orca_i18n.py File 3.18 KB 0644
orca_platform.py File 1.41 KB 0644
orca_state.py File 2.1 KB 0644
phonnames.py File 2.76 KB 0644
pronunciation_dict.py File 2.61 KB 0644
punctuation_settings.py File 13.64 KB 0644
script.py File 19.04 KB 0644
script_manager.py File 13.31 KB 0644
script_utilities.py File 183.59 KB 0644
settings.py File 12.82 KB 0644
settings_manager.py File 20.73 KB 0644
sound.py File 5.17 KB 0644
sound_generator.py File 11.99 KB 0644
speech.py File 11.4 KB 0644
speech_generator.py File 108.24 KB 0644
speechdispatcherfactory.py File 24.54 KB 0644
speechserver.py File 7.41 KB 0644
spellcheck.py File 10.07 KB 0644
structural_navigation.py File 122.53 KB 0644
text_attribute_names.py File 28.62 KB 0644
tutorialgenerator.py File 30.41 KB 0644