[orca] Remove the "outline" debugging tool. It was always a hack; now it causes focus loss
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove the "outline" debugging tool. It was always a hack; now it causes focus loss
- Date: Thu, 12 Sep 2013 20:58:01 +0000 (UTC)
commit b147df2a6130cc6399302f6c50111503931c02d1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Sep 12 16:50:40 2013 -0400
Remove the "outline" debugging tool. It was always a hack; now it causes focus loss
src/orca/Makefile.am | 1 -
src/orca/liveregions.py | 1 -
src/orca/outline.py | 269 -------------------------------------
src/orca/scripts/default.py | 37 -----
src/orca/settings.py | 23 ---
src/orca/structural_navigation.py | 3 -
6 files changed, 0 insertions(+), 334 deletions(-)
---
diff --git a/src/orca/Makefile.am b/src/orca/Makefile.am
index b9e497f..3c195a1 100644
--- a/src/orca/Makefile.am
+++ b/src/orca/Makefile.am
@@ -50,7 +50,6 @@ orca_python_PYTHON = \
orca_gui_profile.py \
orca_i18n.py \
orca_state.py \
- outline.py \
phonnames.py \
orca_platform.py \
pronunciation_dict.py \
diff --git a/src/orca/liveregions.py b/src/orca/liveregions.py
index 9ba816b..ec69c64 100644
--- a/src/orca/liveregions.py
+++ b/src/orca/liveregions.py
@@ -279,7 +279,6 @@ class LiveRegionManager:
contents of that object"""
if self.lastliveobj:
self._script.setCaretPosition(self.lastliveobj, 0)
- self._script.outlineAccessible(self.lastliveobj)
self._script.speakContents(self._script.getObjectContentsAtOffset(\
self.lastliveobj, 0))
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 6a04d2e..be6df2e 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -46,7 +46,6 @@ import orca.guilabels as guilabels
import orca.input_event as input_event
import orca.keybindings as keybindings
import orca.messages as messages
-import orca.outline as outline
import orca.orca as orca
import orca.orca_gui_commandlist as commandlist
import orca.orca_state as orca_state
@@ -1168,7 +1167,6 @@ class Script(script.Script):
[charString, x, y, width, height] = \
self.flatReviewContext.getCurrent(flat_review.Context.CHAR)
- self.drawOutline(x, y, width, height)
self.targetCursorCell = 1
self.updateBrailleReview(self.targetCursorCell)
@@ -1243,8 +1241,6 @@ class Script(script.Script):
[charString, x, y, width, height] = \
self.flatReviewContext.getCurrent(flat_review.Context.CHAR)
- self.drawOutline(x, y, width, height)
-
self.targetCursorCell = 1
self.updateBrailleReview(self.targetCursorCell)
elif self.isBrailleEndShowing() and orca_state.locusOfFocus \
@@ -1520,7 +1516,6 @@ class Script(script.Script):
context = self.getFlatReviewContext()
[wordString, x, y, width, height] = \
context.getCurrent(flat_review.Context.WORD)
- self.drawOutline(x, y, width, height)
# Don't announce anything from speech if the user used
# the Braille display as an input device.
@@ -1557,7 +1552,6 @@ class Script(script.Script):
context = self.getFlatReviewContext()
[zoneString, x, y, width, height] = \
context.getCurrent(flat_review.Context.ZONE)
- self.drawOutline(x, y, width, height)
# Don't announce anything from speech if the user used
# the Braille display as an input device.
@@ -1640,7 +1634,6 @@ class Script(script.Script):
[charString, x, y, width, height] = \
context.getCurrent(flat_review.Context.CHAR)
- self.drawOutline(x, y, width, height)
# Don't announce anything from speech if the user used
# the Braille display as an input device.
@@ -1774,7 +1767,6 @@ class Script(script.Script):
[lineString, x, y, width, height] = \
context.getCurrent(flat_review.Context.LINE)
- self.drawOutline(x, y, width, height)
# Don't announce anything from speech if the user used
# the Braille display as an input device.
@@ -1986,7 +1978,6 @@ class Script(script.Script):
if self.flatReviewContext:
if inputEvent and verbosity != settings.VERBOSITY_LEVEL_BRIEF:
self.presentMessage(messages.FLAT_REVIEW_STOP)
- self.drawOutline(-1, 0, 0, 0)
self.flatReviewContext = None
self.updateBraille(orca_state.locusOfFocus)
else:
@@ -1995,7 +1986,6 @@ class Script(script.Script):
context = self.getFlatReviewContext()
[wordString, x, y, width, height] = \
context.getCurrent(flat_review.Context.WORD)
- self.drawOutline(x, y, width, height)
self._reviewCurrentItem(inputEvent, self.targetCursorCell)
return True
@@ -3067,7 +3057,6 @@ class Script(script.Script):
# recreated.
#
if self.flatReviewContext:
- self.drawOutline(-1, 0, 0, 0)
self.flatReviewContext = None
self.updateBraille(orca_state.locusOfFocus)
@@ -3258,7 +3247,6 @@ class Script(script.Script):
#[x, y, width, height] = obj.text.getCharacterExtents(
# context.currentOffset, 0)
#print context.currentOffset, x, y, width, height
- #self.drawOutline(x, y, width, height)
return
elif progressType == speechserver.SayAllContext.INTERRUPTED:
#print "INTERRUPTED", context.utterance, context.currentOffset
@@ -3948,31 +3936,6 @@ class Script(script.Script):
return self.flatReviewContext
- def drawOutline(self, x, y, width, height):
- """Draws an outline around the accessible, erasing the last drawn
- outline in the process."""
-
- if (x == -1) and (y == 0) and (width == 0) and (height == 0):
- outline.erase()
- else:
- outline.draw(x, y, width, height)
-
- def outlineAccessible(self, accessible):
- """Draws a rectangular outline around the accessible, erasing the
- last drawn rectangle in the process."""
-
- try:
- component = accessible.queryComponent()
- except AttributeError:
- self.drawOutline(-1, 0, 0, 0)
- except NotImplementedError:
- pass
- else:
- visibleRectangle = \
- component.getExtents(pyatspi.DESKTOP_COORDS)
- self.drawOutline(visibleRectangle.x, visibleRectangle.y,
- visibleRectangle.width, visibleRectangle.height)
-
def updateBrailleReview(self, targetCursorCell=0):
"""Obtains the braille regions for the current flat review line
and displays them on the braille display. If the targetCursorCell
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 95a4dfb..b1778a8 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -389,29 +389,6 @@ GENERAL_KEYBOARD_LAYOUT_DESKTOP = 1
GENERAL_KEYBOARD_LAYOUT_LAPTOP = 2
keyboardLayout = GENERAL_KEYBOARD_LAYOUT_DESKTOP
-# The red, green, blue values to use to outline the current item in
-# flat review mode. They are values between 0 and 65535 (0xFFFF), with
-# 65535 (0xFFFF) indicating full intensitiy
-#
-outlineColor = [ 0xFFFF, 0x0000, 0x0000 ]
-
-# Thickness in pixels of the outline around the the current item in flat
-# review mode.
-#
-outlineThickness = 4
-
-# Margin between the object being outlined and the actual outline
-#
-outlineMargin = 1
-
-# The kind of outlining to do for flat review mode.
-#
-OUTLINE_NONE = 0
-OUTLINE_BOX = 1
-OUTLINE_LINE = 2
-OUTLINE_WEDGES = 3
-outlineStyle = OUTLINE_BOX
-
# If True, speak blank lines.
#
speakBlankLines = True
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 03cafb6..a7480d9 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -2958,9 +2958,6 @@ class StructuralNavigation:
[obj, characterOffset] = self._getCaretPosition(obj)
self._setCaretPosition(obj, characterOffset)
self._presentObject(obj, characterOffset)
- # For debugging
- #
- self._script.outlineAccessible(obj)
else:
full = messages.NO_MORE_LIVE_REGIONS
brief = messages.STRUCTURAL_NAVIGATION_NOT_FOUND
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]