[accerciser] Prevent accerciser from exploring itself
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accerciser] Prevent accerciser from exploring itself
- Date: Fri, 26 Apr 2019 14:54:29 +0000 (UTC)
commit 4b983ec6708daa90db1f426eb4044b2c5cee5043
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Fri Apr 26 16:34:09 2019 +0200
Prevent accerciser from exploring itself
src/lib/accerciser/accessible_treeview.py | 11 ++++++++---
src/lib/accerciser/plugin/base_plugin.py | 5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/lib/accerciser/accessible_treeview.py b/src/lib/accerciser/accessible_treeview.py
index 4607c7d..bf6795c 100644
--- a/src/lib/accerciser/accessible_treeview.py
+++ b/src/lib/accerciser/accessible_treeview.py
@@ -450,9 +450,14 @@ class AccessibleModel(gtk.TreeStore, ToolsAccessor):
'''
if accessible is not None:
icon = getIcon(accessible)
- name = accessible.name
- role = accessible.getLocalizedRoleName()
- count = str(accessible.childCount)
+ if self.isMyApp(accessible):
+ name = "Accerciser"
+ role = "accerciser"
+ count = "0"
+ else:
+ name = accessible.name
+ role = accessible.getLocalizedRoleName()
+ count = str(accessible.childCount)
else:
icon = None
if not dummy:
diff --git a/src/lib/accerciser/plugin/base_plugin.py b/src/lib/accerciser/plugin/base_plugin.py
index 681aa64..ac9e03a 100644
--- a/src/lib/accerciser/plugin/base_plugin.py
+++ b/src/lib/accerciser/plugin/base_plugin.py
@@ -95,8 +95,9 @@ class Plugin(ToolsAccessor):
@param acc: The new accessibility object.
@type acc: Accessibility.Accessible
'''
- self.acc = acc
- self.onAccChanged(acc)
+ if not self.isMyApp(acc):
+ self.acc = acc
+ self.onAccChanged(acc)
def onAccChanged(self, acc):
'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]