[orca] Add option to speak 12-hour time without seconds
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add option to speak 12-hour time without seconds
- Date: Fri, 21 Aug 2015 18:28:26 +0000 (UTC)
commit 0928219705c47f05d182471bbcb0f922d64e966e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Aug 21 14:27:45 2015 -0400
Add option to speak 12-hour time without seconds
src/orca/messages.py | 1 +
src/orca/orca_gui_prefs.py | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/messages.py b/src/orca/messages.py
index 1198bd4..75dd64c 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -1963,6 +1963,7 @@ TEXT_UNSELECTED = C_("text", "unselected")
TIME_FORMAT_LOCALE = "%X"
TIME_FORMAT_24_HMS = "%H:%M:%S"
TIME_FORMAT_24_HM = "%H:%M"
+TIME_FORMAT_12_HM = "%I:%M %p"
# Translators: Orca has a feature to speak the time when the user presses a
# shortcut key. This is one of the alternative formats that the user may wish
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 06c98ac..76fae16 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -76,9 +76,9 @@ if louis and not tablesdir:
# Must match the order that the timeFormatCombo is populated.
#
-(TIME_FORMAT_LOCALE, TIME_FORMAT_24_HMS,
+(TIME_FORMAT_LOCALE, TIME_FORMAT_12_HM, TIME_FORMAT_24_HMS,
TIME_FORMAT_24_HMS_WITH_WORDS, TIME_FORMAT_24_HM,
- TIME_FORMAT_24_HM_WITH_WORDS) = list(range(5))
+ TIME_FORMAT_24_HM_WITH_WORDS) = list(range(6))
# Must match the order that the dateFormatCombo is populated.
#
@@ -1387,6 +1387,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
combobox3 = self.get_widget("timeFormatCombo")
self.populateComboBox(combobox3,
[sdtime(messages.TIME_FORMAT_LOCALE, ltime()),
+ sdtime(messages.TIME_FORMAT_12_HM, ltime()),
sdtime(messages.TIME_FORMAT_24_HMS, ltime()),
sdtime(messages.TIME_FORMAT_24_HMS_WITH_WORDS, ltime()),
sdtime(messages.TIME_FORMAT_24_HM, ltime()),
@@ -1395,6 +1396,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
timeFormat = self.prefsDict["presentTimeFormat"]
if timeFormat == messages.TIME_FORMAT_LOCALE:
indextime = TIME_FORMAT_LOCALE
+ elif timeFormat == messages.TIME_FORMAT_12_HM:
+ indextime = TIME_FORMAT_12_HM
elif timeFormat == messages.TIME_FORMAT_24_HMS:
indextime = TIME_FORMAT_24_HMS
elif timeFormat == messages.TIME_FORMAT_24_HMS_WITH_WORDS:
@@ -2409,6 +2412,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
timeFormatCombo = widget.get_active()
if timeFormatCombo == TIME_FORMAT_LOCALE:
newFormat = messages.TIME_FORMAT_LOCALE
+ elif timeFormatCombo == TIME_FORMAT_12_HM:
+ newFormat = messages.TIME_FORMAT_12_HM
elif timeFormatCombo == TIME_FORMAT_24_HMS:
newFormat = messages.TIME_FORMAT_24_HMS
elif timeFormatCombo == TIME_FORMAT_24_HMS_WITH_WORDS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]