[orca] Fix for bug 653514 - The ONLY magnification work Orca should be doing is handling caret and focus tr



commit 30aa34db93a82291e69b4ae0fe28c838fe9e22b4
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Mon Jun 27 03:58:26 2011 -0400

    Fix for bug 653514 - The ONLY magnification work Orca should be doing is handling caret and focus tracking

 src/orca/gsmag.py            |  314 ++++--------------------------------------
 src/orca/mag.py              |   53 -------
 src/orca/orca_state.py       |   11 --
 src/orca/settings.py         |  157 ---------------------
 src/orca/settings_manager.py |    8 +-
 5 files changed, 29 insertions(+), 514 deletions(-)
---
diff --git a/src/orca/gsmag.py b/src/orca/gsmag.py
index 6830f1d..c9b4417 100644
--- a/src/orca/gsmag.py
+++ b/src/orca/gsmag.py
@@ -20,9 +20,7 @@
 # Free Software Foundation, Inc., Franklin Street, Fifth Floor,
 # Boston MA  02110-1301 USA.
 
-"""Manages the GNOME Shell magnifier interface for orca.  [[[TODO: WDW
-- this is very very early in development.  One might even say it is
-pre-prototype.]]]"""
+"""Implements cursor and focus tracking for gnome-shell mag."""
 
 __id__        = "$Id$"
 __version__   = "$Revision$"
@@ -41,23 +39,11 @@ _magnifier = dbus.Interface(_proxy_obj, "org.gnome.Magnifier")
 _zoomer = None
 
 import debug
-import eventsynthesizer
-import settings
-import orca_state
 
 # If True, the magnifier is active
 #
 _isActive = False
 
-# The current modes of tracking, for use with "live update" changes.
-#
-_controlTracking = None
-_edgeMargin = None
-_mouseTracking = None
-_pointerFollowsZoomer = None
-_pointerFollowsFocus = None
-_textTracking = None
-
 import gtk
 _display = gtk.gdk.display_get_default()
 _screen = _display.get_default_screen()
@@ -67,29 +53,12 @@ _screenHeight = _screen.get_height()
 # If True, this module has been initialized.
 #
 _initialized = False
-_fullScreenCapable = False
 _wasActiveOnInit = False
 
-# The width and height, in unzoomed system coordinates of the rectangle that,
-# when magnified, will fill the viewport of the magnifier - this needs to be
-# sync'd with the magnification factors of the zoom area.
-#
-_roiWidth = 0
-_roiHeight = 0
-
 # The current region of interest as specified by the upper left corner.
 #
 _roi = None
 
-# Minimum/maximum values for the center of the ROI
-# in source screen coordinates.
-#
-_minROIX = 0
-_maxROIX = 0
-_minROIY = 0
-_maxROIY = 0
-
-
 ########################################################################
 #                                                                      #
 # D-Bus callbacks                                                      #
@@ -221,7 +190,7 @@ def _setROICenter(x, y):
     """
     _zoomer.shiftContentsTo(x, y, ignore_reply=True)
 
-def _setROICursorPush(x, y, width, height, edgeMargin = 0):
+def _setROICursorPush(x, y, width, height):
     """Nudges the ROI if the caret or control is not visible.
 
     Arguments:
@@ -229,24 +198,13 @@ def _setROICursorPush(x, y, width, height, edgeMargin = 0):
     - y: integer in unzoomed system coordinates representing y component
     - width: integer in unzoomed system coordinates representing the width
     - height: integer in unzoomed system coordinates representing the height
-    - edgeMargin: a percentage representing how close to the edge we can get
-                  before we need to push
     """
 
-    # The edge margin should not exceed 50%. (50% is a centered alignment).
-    # [[[WDW - probably should not make a D-Bus call each time.]]]
-    #
-    edgeMargin = min(edgeMargin, 50)/100.00
-    edgeMarginX = edgeMargin * _screenWidth/settings.magZoomFactor
-    edgeMarginY = edgeMargin * _screenHeight/settings.magZoomFactor
-
     # Determine if the accessible is partially to the left, right,
     # above, or below the current region of interest (ROI).
     # [[[WDW - probably should not make a D-Bus call each time.]]]
     #
-    roiPushHandler = RoiHandler(x, y, width, height,
-                                edgeMarginX=edgeMarginX,
-                                edgeMarginY=edgeMarginY)
+    roiPushHandler = RoiHandler(x, y, width, height)
     _zoomer.getRoi(reply_handler=roiPushHandler.setRoiCursorPush,
                    error_handler=roiPushHandler.setRoiCursorPushErr)
 
@@ -281,10 +239,13 @@ def magnifyAccessible(event, obj, extents=None):
             haveSomethingToMagnify = False
 
         if haveSomethingToMagnify:
-            if _textTracking == settings.MAG_TRACKING_MODE_CENTERED:
-                _setROICenter(x, y)
-            elif _textTracking == settings.MAG_TRACKING_MODE_PUSH:
-                _setROICursorPush(x, y, width, height, _edgeMargin)
+            # Orca no longer has settings related to magnification. For settings
+            # not (or not yet) implemented by gnome-shell mag, we'll just do the
+            # equivalent of Orca's default behavior.
+            #
+            # For tracking with respect to text/caret, Orca's default was push.
+            # The default "edge margin" was 0, so we'll eliminate edge margin.
+            _setROICursorPush(x, y, width, height)
             return
 
     if not haveSomethingToMagnify:
@@ -297,239 +258,13 @@ def magnifyAccessible(event, obj, extents=None):
             haveSomethingToMagnify = False
 
     if haveSomethingToMagnify:
-        if _pointerFollowsFocus:
-            _lastMouseEventWasRoute = True
-            eventsynthesizer.generateMouseEvent(x, y + height - 1, "abs")
-
-        if _controlTracking == settings.MAG_TRACKING_MODE_CENTERED:
-            centerX = x + width/2
-            centerY = y + height/2
-
-            # Be sure that the upper-left corner of the object will still
-            # be visible on the screen.
-            # [[[WDW - probably should not make a getRoi call each time]]]
-            #
-            roiCenterHandler = RoiHandler(x, y, width, height, centerX, centerY)
-            _zoomer.getRoi(reply_handler=roiCenterHandler.setRoiCenter,
-                           error_handler=roiCenterHandler.magnifyAccessibleErr)
-
-        elif _controlTracking == settings.MAG_TRACKING_MODE_PUSH:
-            _setROICursorPush(x, y, width, height)
-
-########################################################################
-#                                                                      #
-# Methods for updating appearance settings                             #
-#                                                                      #
-########################################################################
-
-def applySettings():
-    """Looks at the user settings and applies them to the magnifier."""
-    global _mouseTracking
-    global _controlTracking
-    global _textTracking
-    global _edgeMargin
-    global _pointerFollowsZoomer
-    global _pointerFollowsFocus
-
-    __setupMagnifier(settings.magZoomerType)
-    __setupZoomer(settings.magZoomerType)
-
-    _mouseTracking = settings.magMouseTrackingMode
-    _controlTracking = settings.magControlTrackingMode
-    _textTracking = settings.magTextTrackingMode
-    _edgeMargin = settings.magEdgeMargin
-    _pointerFollowsZoomer = settings.magPointerFollowsZoomer
-    _pointerFollowsFocus = settings.magPointerFollowsFocus
-
-def hideSystemPointer(hidePointer):
-    """Hide or show the system pointer.
-
-    Arguments:
-    -hidePointer: If True, hide the system pointer, otherwise show it.
-    """
-    try:
-        if hidePointer:
-            _magnifier.hideCursor(ignore_reply=True)
-        else:
-            _magnifier.showCursor(ignore_reply=True)
-    except:
-        debug.printException(debug.LEVEL_FINEST)
-
-def __setupMagnifier(position, restore=None):
-    """Creates the magnifier in the position specified.
-
-    Arguments:
-    - position: the position/type of zoomer (full, left half, etc.)
-    - restore:  a dictionary of all of the settings which should be restored
-    """
-
-    global _fullScreenCapable
-
-    if not restore:
-        restore = {}
-
-    # Find out if we're using composite.
-    #
-    try:
-        _fullScreenCapable = _magnifier.fullScreenCapable()
-    except:
-        debug.printException(debug.LEVEL_WARNING)
-
-    # If we are running in full screen mode, try to hide the original cursor
-    # (assuming the user wants to). See bug #533095 for more details.
-    # Depends upon new functionality in gnome-mag, so just catch the
-    # exception if this functionality isn't there.
-    #
-    hideCursor = restore.get('magHideCursor', settings.magHideCursor)
-    if hideCursor \
-       and _fullScreenCapable \
-       and position == settings.MAG_ZOOMER_TYPE_FULL_SCREEN:
-        hideSystemPointer(True)
-    else:
-        hideSystemPointer(False)
-
-    orca_state.zoomerType = position
-    updateTarget = True
-
-    enableCrossHair = restore.get('enableMagCrossHair',
-                                  settings.enableMagCrossHair)
-
-    orca_state.mouseEnhancementsEnabled = enableCrossHair
-
-def __setupZoomer(position, left=None, top=None, right=None, bottom=None,
-                  restore=None):
-    """Creates a zoomer in the magnifier.
-    The position of the zoomer onscreen is based on the given arguments.  If
-    none are supplied, defaults to the settings for the given zoomer position.
-
-    Arguments:
-    - position: position of the zoomer view port (top half, left half, custom)
-    - left:     left edge of zoomer's viewport (for custom -- optional)
-    - top:      top edge of zoomer's viewport (for custom -- optional)
-    - right:    right edge of zoomer's viewport (for custom -- optional)
-    - bottom:   bottom edge of zoomer's viewport (for custom -- optional)
-    - restore:  dictionary of the settings; used for zoom factor (optional)
-    """
-
-    global _zoomer
-    global _roiWidth
-    global _roiHeight
-
-    if not restore:
-        restore = {}
-
-    # full screen is the default.
-    #
-    prefLeft = 0
-    prefTop = 0
-    prefRight = prefLeft + _screenWidth
-    prefBottom = prefTop + _screenHeight
-
-    if position == settings.MAG_ZOOMER_TYPE_TOP_HALF:
-        prefBottom = prefTop + _screenHeight/2
-    elif position == settings.MAG_ZOOMER_TYPE_BOTTOM_HALF:
-        prefTop = _screenHeight/2
-        prefBottom = prefTop + _screenHeight/2
-    elif position == settings.MAG_ZOOMER_TYPE_LEFT_HALF:
-        prefRight = prefLeft + _screenWidth/2
-    elif position == settings.MAG_ZOOMER_TYPE_RIGHT_HALF:
-        prefLeft = _screenWidth/2
-        prefRight = prefLeft + _screenWidth/2
-    elif position == settings.MAG_ZOOMER_TYPE_CUSTOM:
-        prefLeft = settings.magZoomerLeft if left == None else left
-        prefTop = settings.magZoomerTop if top == None else top
-        prefRight = settings.magZoomerRight if right == None else right
-        prefBottom = settings.magZoomerBottom if bottom == None else bottom
-
-    magFactor = restore.get('magZoomFactor', settings.magZoomFactor)
-    viewWidth = prefRight - prefLeft
-    viewHeight = prefBottom - prefTop
-    _roiWidth = viewWidth / magFactor
-    _roiHeight = viewHeight / magFactor
-
-    debug.println(debug.LEVEL_ALL,
-                  "Magnifier zoomer ROI size desired: width=%d, height=%d)" \
-                  % (_roiWidth, _roiHeight))
-
-    # If there are zoom regions, use the first one; otherwise create one.
-    #
-    zoomerPaths = _magnifier.getZoomRegions()
-    if len(zoomerPaths) > 0:
-        zoomProxy = _bus.get_object('org.gnome.Magnifier', zoomerPaths[0])
-        _zoomer = dbus.Interface(zoomProxy,
-                                dbus_interface='org.gnome.Magnifier.ZoomRegion')
-        _zoomer.setMagFactor(magFactor, magFactor)
-        _zoomer.moveResize([prefLeft, prefTop, prefRight, prefBottom])
-    else:
-        zoomerPath = _magnifier.createZoomRegion(
-            magFactor, magFactor,
-	        [0, 0, _roiWidth, _roiHeight],
-	        [prefLeft, prefTop, prefRight, prefBottom])
-        zoomProxy = _bus.get_object('org.gnome.Magnifier', zoomerPath)
-        _zoomer = dbus.Interface(zoomProxy,
-                                dbus_interface='org.gnome.Magnifier.ZoomRegion')
-        _magnifier.addZoomRegion(zoomerPath)
-
-    __updateROIDimensions()
-
-def __updateROIDimensions():
-    """Updates the ROI width, height, and maximum and minimum values.
-    """
-    global _roiWidth
-    global _roiHeight
-    global _minROIX
-    global _minROIY
-    global _maxROIX
-    global _maxROIY
-
-    roi = _zoomer.getRoi()
-    _roiWidth = roi[2] - roi[0]
-    _roiHeight = roi[3] - roi[1]
-
-    _minROIX = _roiWidth / 2
-    _minROIY = _roiHeight / 2
-
-    _maxROIX = _screenWidth - (_roiWidth / 2)
-    _maxROIY = _screenHeight - (_roiHeight / 2)
-
-    debug.println(debug.LEVEL_ALL,
-                  "Magnifier ROI min/max center: (%d, %d), (%d, %d)" \
-                  % (_minROIX, _minROIY, _maxROIX, _maxROIY))
-
-def setupMagnifier(position, left=None, top=None, right=None, bottom=None,
-                   restore=None):
-    """Creates the magnifier in the position specified.
-
-    Arguments:
-    - position: the position/type of zoomer (full, left half, etc.)
-    - left:     the left edge of the zoomer (only applicable for custom)
-    - top:      the top edge of the zoomer (only applicable for custom)
-    - right:    the right edge of the zoomer (only applicable for custom)
-    - bottom:   the top edge of the zoomer (only applicable for custom)
-    - restore:  a dictionary of all of the settings that should be restored
-    """
-
-    __setupMagnifier(position, restore)
-    __setupZoomer(position, left, top, right, bottom, restore)
-
-########################################################################
-#                                                                      #
-# Methods for obtaining magnifier capabilities                         #
-#                                                                      #
-########################################################################
-
-def isFilteringCapable():
-    """Returns True if we're able to take advantage of libcolorblind's color
-    filtering.
-    """
-    # [[[WDW - To be implemented]]]
-    return False
-
-def isFullScreenCapable():
-    """Returns True if we are capable of doing full screen (i.e. whether
-    composite is being used.
-    """
-    return True
+        # Orca no longer has settings related to magnification. For settings
+        # not (or not yet) implemented by gnome-shell mag, we'll just do the
+        # equivalent of Orca's default behavior.
+        #
+        # For tracking with respect to controls/widgets, Orca's default was
+        # push.
+        _setROICursorPush(x, y, width, height)
 
 ########################################################################
 #                                                                      #
@@ -538,8 +273,8 @@ def isFullScreenCapable():
 ########################################################################
 
 def init():
-    """Initializes the magnifier, bringing the magnifier up on the
-    display.
+    """Initializes the magnifier with respect to Orca so that Orca can
+    handle caret and focus tracking.
 
     Returns True if the initialization procedure was run or False if this
     module has already been initialized.
@@ -547,6 +282,7 @@ def init():
     global _initialized
     global _isActive
     global _wasActiveOnInit
+    global _zoomer
 
     if _initialized:
         return False
@@ -554,7 +290,13 @@ def init():
     try:
         _initialized = True
         _wasActiveOnInit = _magnifier.isActive()
-        applySettings()
+
+        zoomerPaths = _magnifier.getZoomRegions()
+        if len(zoomerPaths) > 0:
+            zoomProxy = _bus.get_object('org.gnome.Magnifier', zoomerPaths[0])
+            _zoomer = dbus.Interface(
+                zoomProxy, dbus_interface='org.gnome.Magnifier.ZoomRegion')
+
         _magnifier.setActive(True)
         _isActive = _magnifier.isActive()
         return True
@@ -577,8 +319,6 @@ def shutdown():
 
     _magnifier.setActive(_wasActiveOnInit)
     _isActive = _magnifier.isActive()
-    if not _isActive:
-        hideSystemPointer(False)
 
     _initialized = False
     return True
diff --git a/src/orca/mag.py b/src/orca/mag.py
index aec8e7c..b878f20 100644
--- a/src/orca/mag.py
+++ b/src/orca/mag.py
@@ -30,9 +30,6 @@ __license__   = "LGPL"
 # unavailable. And in a GNOME 3 environment, there are no other
 # magnification solutions. Hence the lack of functionality. ;-)
 
-def applySettings():
-    pass
-
 def magnifyAccessible(event, obj, extents=None):
     pass
 
@@ -42,57 +39,7 @@ def init():
 def shutdown():
     return False
 
-def setupMagnifier(position, left=None, top=None, right=None, bottom=None,
-                   restore=None):
-    pass
-
-def setMagnifierCursor(enabled, customEnabled, size, updateScreen=True):
-    pass
-
-def setMagnifierCrossHair(enabled, updateScreen=True):
-    pass
-
-def setMagnifierCrossHairClip(enabled, updateScreen=True):
-    pass
-
-def setZoomerColorInversion(enabled, updateScreen=True):
-    pass
-
-def setZoomerBrightness(red=0, green=0, blue=0, updateScreen=True):
-    pass
-
-def setZoomerContrast(red=0, green=0, blue=0, updateScreen=True):
-    pass
-
-def setMagnifierObjectSize(magProperty, size, updateScreen=True):
-    pass
-
-def setZoomerObjectSize(magProperty, size, updateScreen=True):
-    pass
 
-def setZoomerObjectColor(magProperty, colorSetting, updateScreen=True):
-    pass
-
-def setMagnifierObjectColor(magProperty, colorSetting, updateScreen=True):
-    pass
-
-def setZoomerMagFactor(x, y, updateScreen=True):
-    pass
-
-def setZoomerSmoothingType(smoothingType, updateScreen=True):
-    pass
-
-def setZoomerColorFilter(colorFilter, updateScreen=True):
-    pass
-
-def hideSystemPointer(hidePointer):
-    pass
-
-def isFullScreenCapable():
-    return False
-
-def isFilteringCapable():
-    return False
 
 
 
diff --git a/src/orca/orca_state.py b/src/orca/orca_state.py
index 384db21..9e27701 100644
--- a/src/orca/orca_state.py
+++ b/src/orca/orca_state.py
@@ -125,14 +125,3 @@ orcaWD = None
 #
 prefsGladeFile = None
 
-# Whether magnification "color enhancements" are currently enabled.
-#
-colorEnhancementsEnabled = True
-
-# Whether magnification "mouse enhancements" are currently enabled.
-#
-mouseEnhancementsEnabled = True
-
-# The current zoomer type.
-#
-zoomerType = None
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 365dbbb..2a0e7d0 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -29,8 +29,6 @@ __license__   = "LGPL"
 
 import os
 
-screenWidth = 640
-screenHeight = 480
 tty = 7
 
 # Whether tool tips can be presented.
@@ -408,161 +406,6 @@ enableBrailleMonitor    = False
 #
 enableMagnifier                  = False
 
-# If True, show the magnification cursor.
-#
-enableMagCursor                  = True
-
-# If True, allow an explicit size for the magnification cursor.
-#
-enableMagCursorExplicitSize      = False
-
-# If True, hide the system cursor.
-#
-magHideCursor                    = False
-
-# Size of the magnification cursor (in pixels).
-#
-magCursorSize                    = 32
-
-# Magnification cursor color value (hex color spec).
-#
-magCursorColor                   = '#000000'
-
-# If True, show the magnification cross-hairs.
-#
-enableMagCrossHair               = True
-
-# If True, enable magnification cross-hair clipping.
-#
-enableMagCrossHairClip           = False
-
-# Size of the magnification cross-hairs (in pixels).
-#
-magCrossHairSize                 = 16
-
-# Magnification cross-hair color value (hex color spec).
-#
-magCrossHairColor                   = '#000000'
-
-# Magnification Zoomer type.
-#
-MAG_ZOOMER_TYPE_FULL_SCREEN      = 0
-MAG_ZOOMER_TYPE_TOP_HALF         = 1
-MAG_ZOOMER_TYPE_BOTTOM_HALF      = 2
-MAG_ZOOMER_TYPE_LEFT_HALF        = 3
-MAG_ZOOMER_TYPE_RIGHT_HALF       = 4
-MAG_ZOOMER_TYPE_CUSTOM           = 5
-magZoomerType                    = MAG_ZOOMER_TYPE_FULL_SCREEN
-
-# Magnification zoomer region placement.
-#
-magZoomerLeft                    = screenWidth / 2
-magZoomerRight                   = screenWidth
-magZoomerTop                     = 0
-magZoomerBottom                  = screenHeight
-
-# Magnification zoom factor.
-#
-magZoomFactor                    = 4.0
-
-# If True, display a border around the magnification zoomer region.
-#
-enableMagZoomerBorder           = False
-
-# The color and size of the border which separates the target
-# display from the source display.
-#
-magZoomerBorderSize              = 1
-magZoomerBorderColor             = '#000000'
-
-# If True, invert the magnification zoomer colors.
-#
-enableMagZoomerColorInversion    = False
-
-# The brightness levels.  The range is from -1 to 1, with 0
-# being "normal"/no change.
-#
-magBrightnessLevel               = 0
-magBrightnessLevelRed            = 0
-magBrightnessLevelGreen          = 0
-magBrightnessLevelBlue           = 0
-
-# The contrast levels.  The range is from -1 to 1, with 0
-# being "normal"/no change.
-#
-magContrastLevel                 = 0
-magContrastLevelRed              = 0
-magContrastLevelGreen            = 0
-magContrastLevelBlue             = 0
-
-# Magnification libcolorblind color filtering mode (see magColorFilteringMode).
-#
-MAG_COLOR_FILTERING_MODE_NONE                 = 0
-MAG_COLOR_FILTERING_MODE_SATURATE_RED         = 1
-MAG_COLOR_FILTERING_MODE_SATURATE_GREEN       = 2
-MAG_COLOR_FILTERING_MODE_SATURATE_BLUE        = 3
-MAG_COLOR_FILTERING_MODE_DESATURATE_RED       = 4
-MAG_COLOR_FILTERING_MODE_DESATURATE_GREEN     = 5
-MAG_COLOR_FILTERING_MODE_DESATURATE_BLUE      = 6
-MAG_COLOR_FILTERING_MODE_POSITIVE_HUE_SHIFT   = 7
-MAG_COLOR_FILTERING_MODE_NEGATIVE_HUE_SHIFT   = 8
-magColorFilteringMode = MAG_COLOR_FILTERING_MODE_NONE
-
-# Magnification smoothing mode (see magSmoothingMode).
-#
-MAG_SMOOTHING_MODE_BILINEAR      = 0
-MAG_SMOOTHING_MODE_NONE          = 1
-magSmoothingMode                 = MAG_SMOOTHING_MODE_BILINEAR
-
-# Magnification tracking mode styles (see magMouseTrackingMode,
-# magControlTrackingMode and magTextTrackingMode).
-#
-MAG_TRACKING_MODE_CENTERED     = 0
-MAG_TRACKING_MODE_PROPORTIONAL = 1
-MAG_TRACKING_MODE_PUSH         = 2
-MAG_TRACKING_MODE_NONE         = 3
-
-# To retain backward compatibility with previous versions of Orca.
-#
-MAG_MOUSE_TRACKING_MODE_CENTERED = MAG_TRACKING_MODE_CENTERED
-MAG_MOUSE_TRACKING_MODE_PROPORTIONAL = MAG_TRACKING_MODE_PROPORTIONAL
-MAG_MOUSE_TRACKING_MODE_PUSH = MAG_TRACKING_MODE_PUSH
-MAG_MOUSE_TRACKING_MODE_NONE = MAG_TRACKING_MODE_NONE
-
-# Magnification mouse tracking mode.
-#
-magMouseTrackingMode           = MAG_TRACKING_MODE_CENTERED
-
-# Magnification control and menu item tracking mode.
-#
-magControlTrackingMode         = MAG_TRACKING_MODE_PUSH
-
-# Magnification text cursor tracking mode.
-#
-magTextTrackingMode            = MAG_TRACKING_MODE_PUSH
-
-# Magnification edge margin (percentage of screen).
-#
-magEdgeMargin                  = 0
-
-# If enabled, automatically repositions the mouse pointer to the
-# menu item or control with focus.
-#
-magPointerFollowsFocus         = False
-
-# If enabled, automatically repositions the mouse pointer into the
-# zoomer if it's not visible when initially moved.
-#
-magPointerFollowsZoomer        = True
-
-# Magnification source display
-#
-magSourceDisplay                 = ':0.0'
-
-# Magnification target display
-#
-magTargetDisplay                 = ':0.0'
-
 # if True, enable character echo.
 # Note that it is allowable for both enableEchoByCharacter and enableKeyEcho
 # to be True
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index ae82412..cba7e09 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -544,18 +544,14 @@ def getVoiceKey(voice):
 def getValueForKey(prefsDict, key):
     need2repr = ['brailleEOLIndicator', 'brailleContractionTable',
                  'brailleRequiredStateString', 'enabledBrailledTextAttributes',
-                 'enabledSpokenTextAttributes', 'magZoomerBorderColor',
-                 'magCursorColor', 'magCrossHairColor', 'magTargetDisplay',
-                 'magSourceDisplay', 'speechRequiredStateString',
+                 'enabledSpokenTextAttributes', 'speechRequiredStateString',
                  'speechServerFactory', 'presentDateFormat',
                  'presentTimeFormat']
 
     value = None
     if key in prefsDict:
         if type(prefsDict[key]) is str:
-            if key == 'magZoomerLeft':
-                value = eval('settings.%s' % prefsDict[key])
-            elif key in need2repr:
+            if key in need2repr:
                 value = "\'%s\'" % prefsDict[key]
             elif key  == 'voices':
                 key = getVoiceKey(key)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]