mirror of
https://github.com/moparisthebest/FireTray
synced 2024-12-21 21:48:47 -05:00
cleaning
This commit is contained in:
parent
6daf73fe44
commit
ba674bf1e1
@ -12,7 +12,7 @@ Cu.import("resource://firetray/ctypes/linux/gobject.jsm");
|
||||
Cu.import("resource://firetray/ctypes/linux/gtk.jsm");
|
||||
Cu.import("resource://firetray/commons.js");
|
||||
Cu.import("resource://firetray/PrefListener.jsm");
|
||||
Cu.import("resource://firetray/FiretrayVersionChange.jsm");
|
||||
Cu.import("resource://firetray/VersionChange.jsm");
|
||||
|
||||
/**
|
||||
* firetray namespace.
|
||||
@ -100,18 +100,14 @@ firetray.Handler = {
|
||||
Services.obs.addObserver(this, this.getAppStartupTopic(this.appId), false);
|
||||
Services.obs.addObserver(this, "xpcom-will-shutdown", false);
|
||||
|
||||
firetray.VersionChange.setInstallHook(function(ver) {
|
||||
let welcome = function(ver) {
|
||||
firetray.Handler.openTab(FIRETRAY_SPLASH_PAGE+"#"+ver);
|
||||
firetray.Handler.tryEraseOldOptions();
|
||||
});
|
||||
firetray.VersionChange.setUpgradeHook(function(ver) {
|
||||
firetray.Handler.openTab(FIRETRAY_SPLASH_PAGE+"#"+ver);
|
||||
firetray.Handler.tryEraseOldOptions();
|
||||
});
|
||||
firetray.VersionChange.setReinstallHook(function(ver) {
|
||||
firetray.Handler.openTab(FIRETRAY_SPLASH_PAGE+"#"+ver);
|
||||
});
|
||||
firetray.VersionChange.watch();
|
||||
};
|
||||
VersionChange.setInstallHook(welcome);
|
||||
VersionChange.setUpgradeHook(welcome);
|
||||
VersionChange.setReinstallHook(welcome);
|
||||
VersionChange.watch();
|
||||
|
||||
this.initialized = true;
|
||||
return true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
var EXPORTED_SYMBOLS = [ "firetray" ];
|
||||
var EXPORTED_SYMBOLS = [ "VersionChange" ];
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
@ -13,7 +13,8 @@ Cu.import("resource://firetray/commons.js");
|
||||
* use setInstallHook(), setUpgradeHook(), setReinstallHook()
|
||||
* http://mike.kaply.com/2011/02/02/running-add-on-code-at-first-run-and-upgrade/
|
||||
*/
|
||||
firetray.VersionChange = {
|
||||
var VersionChange = {
|
||||
|
||||
curVersion: null,
|
||||
|
||||
versionComparator: Cc["@mozilla.org/xpcom/version-comparator;1"]
|
Loading…
Reference in New Issue
Block a user