[orca] Present message when the status bar cannot be found



commit d8c0a903cd5c2ae8e49b97b21590be2b95790e92
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat May 9 16:31:35 2020 -0400

    Present message when the status bar cannot be found

 src/orca/messages.py        | 10 ++++++++++
 src/orca/scripts/default.py |  4 ++++
 2 files changed, 14 insertions(+)
---
diff --git a/src/orca/messages.py b/src/orca/messages.py
index 8e8d48f91..48f9eaa75 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -2208,6 +2208,16 @@ STOP_ORCA = _("Screen reader off.")
 # Translators: This message means speech synthesis is not installed or working.
 SPEECH_UNAVAILABLE = _("Speech is unavailable.")
 
+# Translators: Orca has a command to present the contents of the status bar.
+# This is a brief message which will be presented if Orca cannot find the
+# status bar (e.g. because there isn't one).
+STATUS_BAR_NOT_FOUND_BRIEF = C_("status bar", "Not found")
+
+# Translators: Orca has a command to present the contents of the status bar.
+# This is a detailed message which will be presented if Orca cannot find the
+# status bar (e.g. because there isn't one).
+STATUS_BAR_NOT_FOUND_FULL = _("Status bar not found")
+
 # Translators: the Orca "Find" dialog allows a user to search for text in a
 # window and then move focus to that text.  For example, they may want to find
 # the "OK" button.  This message lets them know a string they were searching
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index c8b613e43..d6bb03f1f 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1255,6 +1255,10 @@ class Script(script.Script):
                 self.pointOfReference['statusBarItems'] = None
                 self.presentObject(statusbar)
                 self.pointOfReference['statusBarItems'] = None
+            else:
+                full = messages.STATUS_BAR_NOT_FOUND_FULL
+                brief = messages.STATUS_BAR_NOT_FOUND_BRIEF
+                self.presentMessage(full, brief)
 
             infobar = self.utilities.infoBar(frame)
             if infobar:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]