[Pkg-mozext-commits] [firetray] 245/399: added default values and prefs are stored and restored

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:51 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit 496dce296cc7400a4bd4e10bee4b5a1e99f98f1e
Author: David Wille <david.wille at ewetel.net>
Date:   Sun May 13 20:15:08 2012 +0200

    added default values and prefs are stored and restored
---
 src/chrome/content/options.js     |   18 ++++++++++++++++--
 src/defaults/preferences/prefs.js |    2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/chrome/content/options.js b/src/chrome/content/options.js
index eb86dde..8b715b6 100644
--- a/src/chrome/content/options.js
+++ b/src/chrome/content/options.js
@@ -31,6 +31,8 @@ var firetrayUIOptions = {
     this.updateScrollOptions();
     this.initAppIconType();
     this.initAppIconNames();
+    this.initNewMailScript();
+    this.initNoNewMailScript();
     if (firetray.Handler.inMailApp)
       this.initNewMailIconNames();
   },
@@ -207,12 +209,24 @@ var firetrayUIOptions = {
     return -1;
   },
   
+  initNewMailScript : function() {
+    document.getElementById("ui_new_mail_script").value =
+    firetray.Utils.prefService.getCharPref("new_mail_script");
+  },
+  
+  initNoNewMailScript : function() {
+    document.getElementById("ui_no_new_mail_script").value =
+    firetray.Utils.prefService.getCharPref("no_new_mail_script");
+  },
+  
   updateNewMailScript : function() {
-    
+    let newMailScript = document.getElementById("ui_new_mail_script").value;
+    firetray.Utils.prefService.setCharPref("new_mail_script", newMailScript);
   },
   
   updateNoNewMailScript : function() {
-    
+    let noNewMailScript = document.getElementById("ui_no_new_mail_script").value;
+    firetray.Utils.prefService.setCharPref("no_new_mail_script", noNewMailScript);
   },
 
   updateNotificationSettings: function() {
diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js
index dcafd7d..3e28d02 100644
--- a/src/defaults/preferences/prefs.js
+++ b/src/defaults/preferences/prefs.js
@@ -27,6 +27,8 @@ pref("extensions.firetray.mail_notification_enabled", true);
 pref("extensions.firetray.mail_notification_type", 0);
 pref("extensions.firetray.icon_text_color", "#000000");
 pref("extensions.firetray.custom_mail_icon", "");
+pref("extensions.firetray.new_mail_script", "");
+pref("extensions.firetray.no_new_mail_script", "");
 // Ci.nsMsgFolderFlags.Archive|Drafts|Junk|Queue|SentMail|Trash|Virtual
 pref("extensions.firetray.excluded_folders_flags", 1077956384);
 // exposed in 1 tree, hence 2 branches: serverTypes, excludedAccounts

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list