[orca] Remove clickCount from orca_state.py
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Remove clickCount from orca_state.py
- Date: Mon, 2 Mar 2015 20:18:52 +0000 (UTC)
commit 77faaddcdc6224a103fae092a9180347c53a2cbf
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Mar 2 15:16:16 2015 -0500
Remove clickCount from orca_state.py
src/orca/input_event.py | 14 ++++++++------
src/orca/orca_state.py | 5 -----
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index 0eb283d..0c9f3b8 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -44,6 +44,8 @@ MOUSE_BUTTON_EVENT = "mouse:button"
class InputEvent:
+ _clickCount = 0
+
def __init__(self, eventType):
"""Creates a new input event of the given type.
@@ -59,7 +61,7 @@ class InputEvent:
# TODO - JD: I relocated this out of script.py, because it seems
# to belong there even less than here. Need to revisit how this
# functionality is used and where.
- return orca_state.clickCount
+ return InputEvent._clickCount
def setClickCount(self):
"""Sets the count of the number of clicks a user has made to one
@@ -80,21 +82,21 @@ class InputEvent:
return
if not isinstance(self, KeyboardEvent):
- orca_state.clickCount = 0
+ InputEvent._clickCount = 0
return
if not isinstance(lastInputEvent, KeyboardEvent):
- orca_state.clickCount = 1
+ InputEvent._clickCount = 1
return
if self.time - lastInputEvent.time < settings.doubleClickTimeout \
and lastInputEvent.event_string == self.event_string:
# Cap the possible number of clicks at 3.
- if orca_state.clickCount < 3:
- orca_state.clickCount += 1
+ if InputEvent._clickCount < 3:
+ InputEvent._clickCount += 1
return
- orca_state.clickCount = 1
+ InputEvent._clickCount = 1
class KeyboardEvent(InputEvent):
diff --git a/src/orca/orca_state.py b/src/orca/orca_state.py
index df9dcdd..30dcb58 100644
--- a/src/orca/orca_state.py
+++ b/src/orca/orca_state.py
@@ -44,11 +44,6 @@ activeWindow = None
#
activeScript = None
-# The "click" count. Used to determine if the user has double or triple
-# "clicked" a key.
-#
-clickCount = 0
-
# Used to capture keys to redefine key bindings by the user.
#
capturingKeys = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]