[orca] Remove whereAmI bookmark debugging(?) functionality



commit 61509e3ab9b22c9a7cc9c9009773515bbed899af
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Aug 28 22:04:45 2015 -0400

    Remove whereAmI bookmark debugging(?) functionality
    
    As proposed, discussed, and agreed upon in this Orca list thread:
    https://mail.gnome.org/archives/orca-list/2015-June/msg00167.html

 help/C/commands_bookmarks.page |   11 +----------
 help/C/howto_bookmarks.page    |    6 ------
 src/orca/bookmarks.py          |   40 ----------------------------------------
 src/orca/common_keyboardmap.py |   16 ----------------
 src/orca/messages.py           |   28 ----------------------------
 src/orca/scripts/default.py    |   12 ------------
 6 files changed, 1 insertions(+), 112 deletions(-)
---
diff --git a/help/C/commands_bookmarks.page b/help/C/commands_bookmarks.page
index 481d3fe..fb958c8 100644
--- a/help/C/commands_bookmarks.page
+++ b/help/C/commands_bookmarks.page
@@ -19,10 +19,7 @@
   <title>Bookmark Commands</title>
   <p>
     <app>Orca</app> provides several commands which can be used to "bookmark"
-    a given object for the purpose of navigating back to it later. Most of
-    these commands are "bound" to keystrokes. Please see
-    <link xref="howto_key_bindings">Modifying Keybindings</link>
-    for information on how to bind unbound commands.
+    a given object for the purpose of navigating back to it later.
   </p>
   <list>
     <item>
@@ -56,11 +53,5 @@
         <keyseq><key>Orca Modifier</key><key>B</key></keyseq>
       </p>
     </item>
-    <item>
-      <p>
-        "Where am I" information for this bookmark relative to the current
-        pointer location: (Unbound)
-      </p>
-    </item>
   </list>
 </page>
diff --git a/help/C/howto_bookmarks.page b/help/C/howto_bookmarks.page
index 5dacdfd..fae4ff2 100644
--- a/help/C/howto_bookmarks.page
+++ b/help/C/howto_bookmarks.page
@@ -46,12 +46,6 @@
         review item.
       </p>
     </item>
-    <item>
-      <p>
-        Finally, there is Where Am I information for bookmarks which lets you
-        know where the specified bookmark is relative to your current location.
-      </p>
-    </item>
   </list>
   <p>
     The specific keybindings associated with each of the above tasks can be
diff --git a/src/orca/bookmarks.py b/src/orca/bookmarks.py
index 6a1861f..4dda4d9 100644
--- a/src/orca/bookmarks.py
+++ b/src/orca/bookmarks.py
@@ -73,46 +73,6 @@ class Bookmarks:
         self._bookmarks[inputEvent.hw_code] = self._contextToBookmark(context)
         self._script.presentMessage(messages.BOOKMARK_ENTERED)
 
-    def bookmarkCurrentWhereAmI(self, inputEvent):
-        """ Report "Where am I" information for this bookmark relative to the 
-        current pointer location."""
-        try:
-            context = self._bookmarkToContext( \
-                          self._bookmarks[inputEvent.hw_code])
-        except KeyError:
-            self._script.systemBeep()
-            return   
-
-        obj = context.getCurrentAccessible()    
-        cur_obj = orca_state.locusOfFocus
-
-        # Are they the same object?
-        if self._script.utilities.isSameObject(cur_obj, obj):
-            self._script.presentMessage(messages.BOOKMARK_IS_CURRENT_OBJECT)
-            return
-        # Are their parents the same?
-        elif self._script.utilities.isSameObject(cur_obj.parent, obj.parent):
-            self._script.presentMessage(messages.BOOKMARK_PARENT_IS_SAME)
-            return
-
-        # Do they share a common ancestor?
-        # bookmark's ancestors
-        bookmark_ancestors = []
-        p = obj.parent
-        while p:
-            bookmark_ancestors.append(p)
-            p = p.parent
-        # look at current object's ancestors to compare to bookmark's ancestors
-        p = cur_obj.parent
-        while p:
-            if bookmark_ancestors.count(p) > 0:
-                msg = messages.BOOKMARK_SHARED_ANCESTOR % p.getLocalizedRoleName()
-                self._script.presentMessage(msg)
-                return
-            p = p.parent
-
-        self._script.presentMessage(messages.BOOKMARK_COMPARISON_UNKNOWN)
-
     def saveBookmarks(self, inputEvent):
         """ Save the bookmarks for this script. """        
         try:
diff --git a/src/orca/common_keyboardmap.py b/src/orca/common_keyboardmap.py
index c0d765d..b34ac91 100644
--- a/src/orca/common_keyboardmap.py
+++ b/src/orca/common_keyboardmap.py
@@ -118,22 +118,6 @@ keymap = (
     ("6", defaultModifierMask, ORCA_MODIFIER_MASK,
     "goToBookmark"),
 
-    # key binding for WhereAmI information with respect to root acc
-
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-    ("", defaultModifierMask, NO_MODIFIER_MASK,
-    "bookmarkCurrentWhereAmI"),
-
-
     ("BackSpace", defaultModifierMask, ORCA_MODIFIER_MASK,
     "bypassNextCommandHandler"),
 
diff --git a/src/orca/messages.py b/src/orca/messages.py
index 75dd64c..b3b4dec 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -55,34 +55,6 @@ BOOKMARK_ENTERED = _("bookmark entered")
 # Translators: Orca has a feature in which users can store/save a particular
 # location in an application window and return to it later by pressing a
 # keystroke. These stored/saved locations are "bookmarks". This string is 
-# presented to the user to indicate the comparative locations of the current
-# object and the bookmarked object could not be determined.
-BOOKMARK_COMPARISON_UNKNOWN = _('comparison unknown')
-
-# Translators: Orca has a feature in which users can store/save a particular
-# location in an application window and return to it later by pressing a
-# keystroke. These stored/saved locations are "bookmarks". This string is 
-# presented to the user to indicate the current object is the same object
-# pointed to by a given bookmark.
-BOOKMARK_IS_CURRENT_OBJECT = _("bookmark is current object")
-
-# Translators: Orca has a feature in which users can store/save a particular
-# location in an application window and return to it later by pressing a
-# keystroke. These stored/saved locations are "bookmarks". This string is 
-# presented to the user to indicate the current object's parent and the
-# bookmarked object's parent are the same.
-BOOKMARK_PARENT_IS_SAME = _("bookmark and current object have same parent")
-
-# Translators: Orca has a feature in which users can store/save a particular
-# location in an application window and return to it later by pressing a
-# keystroke. These stored/saved locations are "bookmarks". This string is 
-# presented to the user to indicate the current object and the bookmarked
-# object share a common ancestor.
-BOOKMARK_SHARED_ANCESTOR = _("shared ancestor %s")
-
-# Translators: Orca has a feature in which users can store/save a particular
-# location in an application window and return to it later by pressing a
-# keystroke. These stored/saved locations are "bookmarks". This string is 
 # presented to the user when the active list of bookmarks have been saved to
 # disk.
 BOOKMARKS_SAVED = _("bookmarks saved")
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index f3adf61..7d3062b 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -462,11 +462,6 @@ class Script(script.Script):
                 Script.cycleDebugLevel,
                 cmdnames.CYCLE_DEBUG_LEVEL)
 
-        self.inputEventHandlers["bookmarkCurrentWhereAmI"] = \
-            input_event.InputEventHandler(
-                Script.bookmarkCurrentWhereAmI,
-                cmdnames.BOOKMARK_CURRENT_WHERE_AM_I)
-
         self.inputEventHandlers["goToPrevBookmark"] = \
             input_event.InputEventHandler(
                 Script.goToPrevBookmark,
@@ -989,13 +984,6 @@ class Script(script.Script):
         bookmarks = self.getBookmarks()
         bookmarks.addBookmark(inputEvent)
 
-    def bookmarkCurrentWhereAmI(self, inputEvent):
-        """ Report "Where am I" information for this bookmark relative to the
-        current pointer location.  Delegates to
-        Bookmark.bookmarkCurrentWhereAmI"""
-        bookmarks = self.getBookmarks()
-        bookmarks.bookmarkCurrentWhereAmI(inputEvent)
-
     def goToBookmark(self, inputEvent):
         """ Go to the bookmark indexed by inputEvent.hw_code.  Delegates to
         Bookmark.goToBookmark """


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