Bug 856451 - Make the New Mail alert show time easy adjustable. r=mconley, ui-r=bwinton
authorRichard Marti <richard.marti@gmail.com>
Wed, 03 Apr 2013 18:02:02 +0200
changeset 15366 505edc73c23a1ec5c17baf653319402c1a1a4a90
parent 15365 a3df3ce94ea83218dc78d7f7b3b8a5ebdcf80800
child 15367 b30782c12707f70ef590e5389f5dcaadfcc183d3
push id920
push userbugzilla@standard8.plus.com
push dateMon, 24 Jun 2013 19:03:14 +0000
treeherdercomm-beta@936bfe9d120b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, bwinton
bugs856451
Bug 856451 - Make the New Mail alert show time easy adjustable. r=mconley, ui-r=bwinton
mail/components/preferences/notifications.xul
mail/locales/en-US/chrome/messenger/preferences/notifications.dtd
--- a/mail/components/preferences/notifications.xul
+++ b/mail/components/preferences/notifications.xul
@@ -18,18 +18,32 @@
             dlgbuttons="accept,cancel"
             title="&notificationsDialog2.title;">
 
   <prefpane id="NotificationsDialogPane">
     <preferences id="NotificationsPreferences">
       <preference id="mail.biff.alert.show_preview" name="mail.biff.alert.show_preview" type="bool"/>
       <preference id="mail.biff.alert.show_subject" name="mail.biff.alert.show_subject" type="bool"/>
       <preference id="mail.biff.alert.show_sender" name="mail.biff.alert.show_sender" type="bool"/>
+      <preference id="alerts.totalOpenTime" name="alerts.totalOpenTime" type="int"/>
     </preferences>
 
     <description>&alertCustomization.intro;</description>
     <checkbox id="previewText" class="indent" label="&previewText.label;" accesskey="&previewText.accesskey;" preference="mail.biff.alert.show_preview"/>
     <checkbox id="subject" class="indent" label="&subject.label;" accesskey="&subject.accesskey;" preference="mail.biff.alert.show_subject"/>
     <checkbox id="sender"  class="indent" label="&sender.label;" accesskey="&sender.accesskey;" preference="mail.biff.alert.show_sender"/>
 
     <separator/>
+    <hbox align="center">
+      <label id="totalOpenTimeBefore"
+             control="totalOpenTime"
+             value="&totalOpenTimeBefore.label;"
+             accesskey="&totalOpenTimeBefore.accesskey;"/>
+      <textbox id="totalOpenTime" type="number" decimalplaces="1" size="3" min="1" max="3600" increment="0.5"
+               preference="alerts.totalOpenTime"
+               onsyncfrompreference="return document.getElementById(this.getAttribute('preference')).value / 1000;"
+               onsynctopreference="return this.value * 1000;"/>
+      <label id="totalOpenTimeEnd" value="&totalOpenTimeEnd.label;"/>
+    </hbox>
+    <separator/>
+
   </prefpane>
 </prefwindow>
--- a/mail/locales/en-US/chrome/messenger/preferences/notifications.dtd
+++ b/mail/locales/en-US/chrome/messenger/preferences/notifications.dtd
@@ -8,8 +8,17 @@
 <!ENTITY alertCustomization.intro         "Choose which fields to show in the alert notification:">
 <!ENTITY previewText.label                "Message Preview Text">
 <!ENTITY previewText.accesskey            "M">
 <!ENTITY subject.label                    "Subject">
 <!ENTITY subject.accesskey                "S">
 <!ENTITY sender.label                     "Sender">
 <!ENTITY sender.accesskey                 "e">
 
+<!-- LOCALIZATION NOTE: totalOpenTimeBefore.label is displayed first, then
+there's a field where the user can enter a number, and totalOpenTimeEnd.label
+is displayed at the end of the line. The translations of the
+totalOpenTimeBefore.label and totalOpenTimeEnd.label parts don't have to mean
+the exact same thing as in English; please try instead to translate the whole
+sentence. -->
+<!ENTITY  totalOpenTimeBefore.label       "Show New Mail Alert for">
+<!ENTITY  totalOpenTimeBefore.accesskey   "N">
+<!ENTITY  totalOpenTimeEnd.label          "seconds">