[orca] Only present progress bar reaching 100% if it's a bar we should present
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Only present progress bar reaching 100% if it's a bar we should present
- Date: Sun, 22 Nov 2015 05:34:48 +0000 (UTC)
commit 2b30761a351b3102ad1457989e647482ccac1e03
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 22 00:31:09 2015 -0500
Only present progress bar reaching 100% if it's a bar we should present
src/orca/script_utilities.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 814c385..8ce4a61 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -787,18 +787,15 @@ class Utilities:
if self.hasNoSize(obj):
return False, "Has no size"
- value = obj.queryValue()
- percent = int((value.currentValue / (value.maximumValue - value.minimumValue)) * 100)
- if percent == 100:
- return True, "Percent is 100"
-
+ percent = self.getValueAsPercent(obj)
lastTime, lastValue = self.getProgressBarUpdateTimeAndValue(obj)
if percent == lastValue:
return False, "Value (%s) hasn't changed" % percent
interval = int(time.time() - lastTime)
if interval < int(_settingsManager.getSetting('progressBarUpdateInterval')):
- return False, "Last update was only %is ago" % interval
+ if percent != 100:
+ return False, "Last update was only %is ago" % interval
isStatusBar = lambda x: x and x.getRole() == pyatspi.ROLE_STATUS_BAR
if pyatspi.findAncestor(obj, isStatusBar):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]