[Pkg-mozext-commits] [firetray] 145/399: fix version change handling
David Prévot
taffit at alioth.debian.org
Tue Oct 29 18:23:31 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 d0b9d9e45f586ce9e99cca51db92bfd3338eab7c
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Thu Jan 19 00:13:40 2012 +0100
fix version change handling
---
src/modules/FiretrayVersionChange.jsm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/modules/FiretrayVersionChange.jsm b/src/modules/FiretrayVersionChange.jsm
index 4f1a710..d87ff0f 100644
--- a/src/modules/FiretrayVersionChange.jsm
+++ b/src/modules/FiretrayVersionChange.jsm
@@ -81,6 +81,12 @@ firetray.VersionChange = {
ERROR("unsupported application");
},
+ initPrefs: function(version) {
+ firetray.Utils.prefService.setBoolPref("firstrun", false);
+ firetray.Utils.prefService.setCharPref("installedVersion", version);
+ this.openTab();
+ },
+
onVersionChange: function(addon) {
LOG("VERSION: "+addon.version);
@@ -88,10 +94,8 @@ firetray.VersionChange = {
var firstrun = firetray.Utils.prefService.getBoolPref("firstrun");
if (firstrun) {
- firetray.Utils.prefService.setBoolPref("firstrun", false);
- firetray.Utils.prefService.setCharPref("installedVersion", curVersion);
WARN("FIRST RUN");
- this.openTab();
+ this.initPrefs(curVersion);
} else {
try {
@@ -103,9 +107,10 @@ firetray.VersionChange = {
WARN("UPGRADE");
this.openTab();
}
+
} catch (ex) {
WARN("REINSTALL");
- this.openTab();
+ this.initPrefs(curVersion);
}
}
}
--
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