[orca] Delete methods which are no longer used or needed as a result of the refactor
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Delete methods which are no longer used or needed as a result of the refactor
- Date: Wed, 4 Jan 2012 23:23:59 +0000 (UTC)
commit afd97678d75a0de9832882b34e9b560fcfecc120
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 4 18:23:11 2012 -0500
Delete methods which are no longer used or needed as a result of the refactor
src/orca/orca.py | 52 +-----------------------
src/orca/script.py | 15 -------
src/orca/scripts/apps/gnome-terminal/script.py | 20 ---------
3 files changed, 1 insertions(+), 86 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index ed90a59..f18d3b9 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -540,7 +540,6 @@ if settings.useDBus:
import braille
import httpserver
-import keynames
import keybindings
import orca_state
import speech
@@ -721,55 +720,6 @@ def exitListShortcutsMode(self, inputEvent=None):
_orcaModifierPressed = False
-def keyEcho(event):
- """If the keyEcho setting is enabled, check to see what type of key
- event it is and echo it via speech, if the user wants that type of
- key echoed.
-
- Uppercase keys will be spoken using the "uppercase" voice style,
- whereas lowercase keys will be spoken using the "default" voice style.
-
- Arguments:
- - event: an AT-SPI DeviceEvent
- """
-
- if not event.shouldEcho:
- return False
-
- event_string = event.event_string
- modifiers = event.modifiers
- eventType = event.keyType
- debug.println(debug.LEVEL_FINEST,
- "orca.keyEcho: string to echo: %s" % event_string)
-
- if event.event_string == "Caps_Lock":
- if event.getLockingState():
- brailleMessage = keynames.getKeyName(event_string) + " " + _("off")
- else:
- brailleMessage = keynames.getKeyName(event_string) + " " + _("on")
- braille.displayMessage(brailleMessage,
- flashTime=settings.brailleFlashTime)
-
- # We keep track of the time as means to let others know that
- # we are probably echoing a key and should not be interrupted.
- #
- orca_state.lastKeyEchoTime = time.time()
-
- # Before we echo printable keys, let's try to make sure the
- # character echo isn't going to also echo something.
- #
- characterEcho = event.isCharacterEchoable() and not _orcaModifierPressed
- if not characterEcho:
- debug.println(debug.LEVEL_FINEST,
- "orca.keyEcho: speaking: %s" % event_string)
- speech.speakKeyEvent(event)
- return True
-
- debug.println(debug.LEVEL_FINEST,
- "orca.keyEcho: letting character echo handle: %s" \
- % event_string)
- return False
-
def _processKeyCaptured(event):
"""Called when a new key event arrives and orca_state.capturingKeys=True.
(used for key bindings redefinition)
@@ -806,7 +756,7 @@ def _processKeyCaptured(event):
def _processKeyboardEvent(event):
"""The primary key event handler for Orca. Keeps track of various
- attributes, such as the lastInputEvent. Also calls keyEcho as well
+ attributes, such as the lastInputEvent. Also does key echo as well
as any local keybindings before passing the event on to the active
script. This method is called synchronously from the AT-SPI registry
and should be performant. In addition, it must return True if it has
diff --git a/src/orca/script.py b/src/orca/script.py
index 79a15eb..d3b9d85 100644
--- a/src/orca/script.py
+++ b/src/orca/script.py
@@ -254,21 +254,6 @@ class Script:
"""
return where_am_I.WhereAmI(self)
- def echoKey(self, keyEvent):
- """Determine whether this script should echo the current key event.
- Note that the keyEcho() method in orca.py will still take into
- account whatever the user's various preferences for key echoing
- are, which may override what is return by this echoKey() method.
-
- Arguments:
- - keyEvent - the key event
-
- Returns an indication of whether a key echo event should be
- allowed to happen for this script.
- """
-
- return True
-
def getBookmarks(self):
"""Returns the "bookmarks" class for this script.
"""
diff --git a/src/orca/scripts/apps/gnome-terminal/script.py b/src/orca/scripts/apps/gnome-terminal/script.py
index 2ff9c82..b530caa 100644
--- a/src/orca/scripts/apps/gnome-terminal/script.py
+++ b/src/orca/scripts/apps/gnome-terminal/script.py
@@ -60,26 +60,6 @@ class Script(default.Script):
#
self.presentIfInactive = False
- def echoKey(self, keyEvent):
- """Determine whether this script should echo the current key event.
- If this is a printable key, then return False.
-
- Note that the keyEcho() method in orca.py will still take into
- account whatever the user's various preferences for key echoing
- are, which may override what is return by this echoKey() method.
-
- Arguments:
- - keyEvent - the key event
-
- Returns an indication of whether a key echo event should be
- allowed to happen for this script.
- """
-
- if keyEvent.isPrintableKey():
- return False
-
- return True
-
def locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus):
"""Called when the visual object with focus changes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]