[orca] Add explicit time format option for 12-hour time with seconds



commit 60a8c3253c75667d0369e12c09193f70a071a166
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Nov 10 20:09:40 2015 -0500

    Add explicit time format option for 12-hour time with 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 3207391..52ca354 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -1979,6 +1979,7 @@ TIME_FORMAT_LOCALE = "%X"
 TIME_FORMAT_24_HMS = "%H:%M:%S"
 TIME_FORMAT_24_HM  = "%H:%M"
 TIME_FORMAT_12_HM  = "%I:%M %p"
+TIME_FORMAT_12_HMS = "%I:%M:%S %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 d8b5826..0f3716d 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_12_HM, TIME_FORMAT_24_HMS,
+(TIME_FORMAT_LOCALE, TIME_FORMAT_12_HM, TIME_FORMAT_12_HMS, TIME_FORMAT_24_HMS,
  TIME_FORMAT_24_HMS_WITH_WORDS, TIME_FORMAT_24_HM,
- TIME_FORMAT_24_HM_WITH_WORDS) = list(range(6))
+ TIME_FORMAT_24_HM_WITH_WORDS) = list(range(7))
 
 # Must match the order that the dateFormatCombo is populated.
 #
@@ -1390,6 +1390,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.populateComboBox(combobox3,
           [sdtime(messages.TIME_FORMAT_LOCALE, ltime()),
            sdtime(messages.TIME_FORMAT_12_HM, ltime()),
+           sdtime(messages.TIME_FORMAT_12_HMS, ltime()),
            sdtime(messages.TIME_FORMAT_24_HMS, ltime()),
            sdtime(messages.TIME_FORMAT_24_HMS_WITH_WORDS, ltime()),
            sdtime(messages.TIME_FORMAT_24_HM, ltime()),
@@ -1400,6 +1401,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             indextime = TIME_FORMAT_LOCALE
         elif timeFormat == messages.TIME_FORMAT_12_HM:
             indextime = TIME_FORMAT_12_HM
+        elif timeFormat == messages.TIME_FORMAT_12_HMS:
+            indextime = TIME_FORMAT_12_HMS
         elif timeFormat == messages.TIME_FORMAT_24_HMS:
             indextime = TIME_FORMAT_24_HMS
         elif timeFormat == messages.TIME_FORMAT_24_HMS_WITH_WORDS:
@@ -2425,6 +2428,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             newFormat = messages.TIME_FORMAT_LOCALE
         elif timeFormatCombo == TIME_FORMAT_12_HM:
             newFormat = messages.TIME_FORMAT_12_HM
+        elif timeFormatCombo == TIME_FORMAT_12_HMS:
+            newFormat = messages.TIME_FORMAT_12_HMS
         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]