[orca] Rename some methods to be less confusing
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Rename some methods to be less confusing
- Date: Mon, 12 Aug 2019 22:59:26 +0000 (UTC)
commit 32276208369a563d2937101691f775ba6ebee310
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Aug 12 18:59:10 2019 -0400
Rename some methods to be less confusing
src/orca/scripts/toolkits/Gecko/script.py | 2 +-
src/orca/scripts/web/script.py | 32 +++++++++++++++----------------
src/orca/scripts/web/script_utilities.py | 12 ++++++------
3 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index fe32de89c..769ba86c5 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -265,7 +265,7 @@ class Script(web.Script):
if super().onShowingChanged(event):
return
- if event.detail1 and self.utilities.isTopLevelChromeAlert(event.source):
+ if event.detail1 and self.utilities.isTopLevelBrowserUIAlert(event.source):
msg = "GECKO: Event handled: Presenting event source"
debug.println(debug.LEVEL_INFO, msg, True)
self.presentObject(event.source)
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 0de3bc35c..7fb5b3950 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1591,8 +1591,8 @@ class Script(default.Script):
def onChildrenChanged(self, event):
"""Callback for object:children-changed accessibility events."""
- if self.utilities.eventIsChromeNoise(event):
- msg = "WEB: Ignoring event believed to be chrome noise"
+ if self.utilities.eventIsBrowserUINoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
@@ -1877,8 +1877,8 @@ class Script(default.Script):
def onNameChanged(self, event):
"""Callback for object:property-change:accessible-name events."""
- if self.utilities.eventIsChromeNoise(event):
- msg = "WEB: Ignoring event believed to be chrome noise"
+ if self.utilities.eventIsBrowserUINoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
@@ -1887,13 +1887,13 @@ class Script(default.Script):
def onSelectedChanged(self, event):
"""Callback for object:state-changed:selected accessibility events."""
- if self.utilities.eventIsChromeAutocompleteNoise(event):
- msg = "WEB: Ignoring event believed to be chrome autocomplete noise"
+ if self.utilities.eventIsBrowserUIAutocompleteNoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI autocomplete noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if self.utilities.eventIsChromePageSwitchNoise(event):
- msg = "WEB: Event believed to be chrome page switch"
+ if self.utilities.eventIsBrowserUIPageSwitch(event):
+ msg = "WEB: Event believed to be browser UI page switch"
debug.println(debug.LEVEL_INFO, msg, True)
if event.detail1:
self.presentObject(event.source, priorObj=orca_state.locusOfFocus)
@@ -1914,13 +1914,13 @@ class Script(default.Script):
def onSelectionChanged(self, event):
"""Callback for object:selection-changed accessibility events."""
- if self.utilities.eventIsChromeAutocompleteNoise(event):
- msg = "WEB: Ignoring event believed to be chrome autocomplete noise"
+ if self.utilities.eventIsBrowserUIAutocompleteNoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI autocomplete noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if self.utilities.eventIsChromePageSwitchNoise(event):
- msg = "WEB: Ignoring event believed to be chrome page switch noise"
+ if self.utilities.eventIsBrowserUIPageSwitch(event):
+ msg = "WEB: Ignoring event believed to be browser UI page switch"
debug.println(debug.LEVEL_INFO, msg, True)
return True
@@ -1967,8 +1967,8 @@ class Script(default.Script):
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if self.utilities.eventIsChromeNoise(event):
- msg = "WEB: Ignoring event believed to be chrome noise"
+ if self.utilities.eventIsBrowserUINoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
@@ -2045,8 +2045,8 @@ class Script(default.Script):
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if self.utilities.eventIsChromeNoise(event):
- msg = "WEB: Ignoring event believed to be chrome noise"
+ if self.utilities.eventIsBrowserUINoise(event):
+ msg = "WEB: Ignoring event believed to be browser UI noise"
debug.println(debug.LEVEL_INFO, msg, True)
return True
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index e465cc9a8..0d9f9a0ae 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2937,7 +2937,7 @@ class Utilities(script_utilities.Utilities):
return self.queryNonEmptyText(obj) is None
- def isChromeAlert(self, obj):
+ def isBrowserUIAlert(self, obj):
if not (obj and obj.getRole() == pyatspi.ROLE_ALERT):
return False
@@ -2946,8 +2946,8 @@ class Utilities(script_utilities.Utilities):
return True
- def isTopLevelChromeAlert(self, obj):
- if not self.isChromeAlert(obj):
+ def isTopLevelBrowserUIAlert(self, obj):
+ if not self.isBrowserUIAlert(obj):
return False
parent = obj.parent
@@ -3607,7 +3607,7 @@ class Utilities(script_utilities.Utilities):
return False
- def eventIsChromeNoise(self, event):
+ def eventIsBrowserUINoise(self, event):
if self.inDocumentContent(event.source):
return False
@@ -3647,7 +3647,7 @@ class Utilities(script_utilities.Utilities):
return False
- def eventIsChromeAutocompleteNoise(self, event):
+ def eventIsBrowserUIAutocompleteNoise(self, event):
if self.inDocumentContent(event.source):
return False
@@ -3679,7 +3679,7 @@ class Utilities(script_utilities.Utilities):
return False
- def eventIsChromePageSwitchNoise(self, event):
+ def eventIsBrowserUIPageSwitch(self, event):
selection = ["object:selection-changed", "object:state-changed:selected"]
if not event.type in selection:
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]