[orca] Fix for bgo#618303 - orca needs a custom script for eclipse
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#618303 - orca needs a custom script for eclipse
- Date: Mon, 10 May 2010 20:59:15 +0000 (UTC)
commit dca4eff2f77b158f6b51910d141e54ce17609acc
Author: José Vilmar Estácio de Souza <vilmar informal com br>
Date: Mon May 10 17:36:32 2010 -0300
Fix for bgo#618303 - orca needs a custom script for eclipse
Now when debugging a program with eclipse, orca reads the line when a
breakpoint is reached. However in some circumstances the line is read twice.
needs to be fixed.
configure.in | 1 +
src/orca/scripts/apps/Eclipse/Makefile.am | 8 ++++
src/orca/scripts/apps/Eclipse/__init__.py | 1 +
src/orca/scripts/apps/Eclipse/script.py | 57 +++++++++++++++++++++++++++++
src/orca/scripts/apps/Makefile.am | 1 +
5 files changed, 68 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index 2df5c3b..f4f08d6 100644
--- a/configure.in
+++ b/configure.in
@@ -78,6 +78,7 @@ src/orca/scripts/apps/Makefile
src/orca/scripts/apps/acroread/Makefile
src/orca/scripts/apps/Banshee/Makefile
src/orca/scripts/apps/ddu/Makefile
+src/orca/scripts/apps/Eclipse/Makefile
src/orca/scripts/apps/ekiga/Makefile
src/orca/scripts/apps/empathy/Makefile
src/orca/scripts/apps/evolution/Makefile
diff --git a/src/orca/scripts/apps/Eclipse/Makefile.am b/src/orca/scripts/apps/Eclipse/Makefile.am
new file mode 100644
index 0000000..cbfb0b5
--- /dev/null
+++ b/src/orca/scripts/apps/Eclipse/Makefile.am
@@ -0,0 +1,8 @@
+orca_pathdir=$(pyexecdir)
+
+orca_python_PYTHON = \
+ __init__.py \
+ script.py
+
+orca_pythondir=$(pyexecdir)/orca/scripts/apps/Eclipse
+
diff --git a/src/orca/scripts/apps/Eclipse/__init__.py b/src/orca/scripts/apps/Eclipse/__init__.py
new file mode 100644
index 0000000..1d50af9
--- /dev/null
+++ b/src/orca/scripts/apps/Eclipse/__init__.py
@@ -0,0 +1 @@
+from script import Script
diff --git a/src/orca/scripts/apps/Eclipse/script.py b/src/orca/scripts/apps/Eclipse/script.py
new file mode 100644
index 0000000..aa666a2
--- /dev/null
+++ b/src/orca/scripts/apps/Eclipse/script.py
@@ -0,0 +1,57 @@
+# Orca
+#
+# Copyright 2010 Informal Informatica LTDA.
+# Author: Jose Vilmar <vilmar informal com br>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
+# Boston MA 02110-1301 USA.
+
+"""Custom script for Eclipse."""
+__id__ = "$Id$"
+__version__ = "$Revision$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 2010 Informal Informatica LTDA."
+__license__ = "LGPL"
+
+import orca.default as default
+import orca.orca_state as orca_state
+
+########################################################################
+# #
+# The Eclipse script class. #
+# #
+########################################################################
+
+class Script(default.Script):
+
+ def __init__(self, app):
+ """Creates a new script for the given application."""
+ default.Script.__init__(self, app)
+
+ def _presentTextAtNewCaretPosition(self, event, otherObj=None):
+ """Updates braille, magnification, and outputs speech for the
+ event.source or the otherObj. Overridden here so that we can
+ speak the line when a breakpoint is reached."""
+
+ # Let the default script's normal behavior do its thing
+ #
+ default.Script._presentTextAtNewCaretPosition(self, event, otherObj)
+ debugKeys = ["F5", "F6", "F7", "F8", "F11"]
+ #
+ if orca_state.lastNonModifierKeyEvent \
+ and orca_state.lastNonModifierKeyEvent.event_string in debugKeys:
+ obj = otherObj or event.source
+ self.sayLine(obj)
+
diff --git a/src/orca/scripts/apps/Makefile.am b/src/orca/scripts/apps/Makefile.am
index b2796c7..1b9c86f 100644
--- a/src/orca/scripts/apps/Makefile.am
+++ b/src/orca/scripts/apps/Makefile.am
@@ -2,6 +2,7 @@ SUBDIRS = \
acroread \
Banshee \
ddu \
+ Eclipse \
ekiga \
empathy \
evolution \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]