From 9d43f129d4ad56dded752aa75c4dd2bb5af48b9e Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sun, 7 Dec 2014 09:38:55 -0500 Subject: Fix stuff. --- LICENSE.txt | 2 ++ src/bootstrap.js | 17 ++++++++++------- src/chrome.manifest | 5 +++-- src/chrome/content/options.xul | 2 +- src/chrome/skin/icon.png | Bin 0 -> 533 bytes src/chrome/skin/icon64.png | Bin 0 -> 751 bytes src/defaults/preferences/preferences.js | 1 - src/install.rdf | 2 ++ utils/create_xpi.py | 13 ++----------- 9 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 src/chrome/skin/icon.png create mode 100644 src/chrome/skin/icon64.png delete mode 100644 src/defaults/preferences/preferences.js diff --git a/LICENSE.txt b/LICENSE.txt index 191a09b..aa3628e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -20,6 +20,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The EVE logo is a registered trademark of CCP hf. This extension is not +associated with or endorsed by CCP hf. All other files unless otherwise stated are made available under the GPLv3 license or greater: diff --git a/src/bootstrap.js b/src/bootstrap.js index 2625c92..b01697f 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -103,12 +103,13 @@ var WindowListener = { } window.addEventListener("load", onWindowLoad); }, - onCloseWindow: function(xulWindow) {}, - onWindowTitleChange: function(xulWindow, newTitle) {} }; var TrustedReparser = { observe: function () { + if (!EIB.prefs.prefHasUserValue("trusted")) { + EIB.prefs.setCharPref("trusted", "[]"); + } EIB.trusted = JSON.parse(EIB.prefs.getCharPref("trusted")); } }; @@ -118,7 +119,7 @@ function startup(data, reason) { EIB.prefs = Services.prefs.getBranch("extensions.eib."); EIB.prefs.addObserver("trusted", TrustedReparser, false); - reparseTrusted(); + TrustedReparser.observe(); forEachOpenWindow(loadIntoWindow); Services.wm.addListener(WindowListener); @@ -154,10 +155,12 @@ function injectCCPEVE(e) { if (checkTrusted(window.location.href)) { var CCPEVE = Cu.createObjectIn(window, {defineAs: "CCPEVE"}); ["openEveMail", "showInfo", "showPreview", "showRouteTo", "showMap", "showFitting", "showContract", "showMarketDetails", "setDestination", "addWaypoint", "joinChannel", "joinMailingList", "createContract", "buyType", "findInContracts", "addToMarketQuickBar", "addContact", "removeContact", "addCorpContact", "removeCorpContact", "block", "addBounty", "inviteToFleet", "startConversation", "showContracts", "showOnMap", "editMember", "awardDecoration", "sendMail", "showContents", "bookmark"].forEach(function (n) { - Cu.exportFunction(function () { - EIB.pending.push('CCPEVE.' + n + '(' + Array.prototype.join.call(arguments, ',') + ');'); - return null; - }, CCPEVE, {defineAs: n}); + Object.defineProperty(CCPEVE, n, { + value: Cu.exportFunction(function () { + EIB.pending.push('CCPEVE.' + n + '(' + Array.prototype.join.call(arguments, ',') + ');'); + return null; + }, CCPEVE) + }); }); } } diff --git a/src/chrome.manifest b/src/chrome.manifest index 87c823b..1983e73 100644 --- a/src/chrome.manifest +++ b/src/chrome.manifest @@ -1,2 +1,3 @@ -content eib chrome/content/ -locale eib en chrome/locale/en/ +content eib chrome/content/ +locale eib en chrome/locale/en/ +skin eib classic/1.0 chrome/skin/ diff --git a/src/chrome/content/options.xul b/src/chrome/content/options.xul index 29543ba..5f1c6f3 100644 --- a/src/chrome/content/options.xul +++ b/src/chrome/content/options.xul @@ -3,5 +3,5 @@ - + diff --git a/src/chrome/skin/icon.png b/src/chrome/skin/icon.png new file mode 100644 index 0000000..7acfcf1 Binary files /dev/null and b/src/chrome/skin/icon.png differ diff --git a/src/chrome/skin/icon64.png b/src/chrome/skin/icon64.png new file mode 100644 index 0000000..e2f2ff4 Binary files /dev/null and b/src/chrome/skin/icon64.png differ diff --git a/src/defaults/preferences/preferences.js b/src/defaults/preferences/preferences.js deleted file mode 100644 index baa73a8..0000000 --- a/src/defaults/preferences/preferences.js +++ /dev/null @@ -1 +0,0 @@ -pref("extensions.eib.trusted", "[]"); diff --git a/src/install.rdf b/src/install.rdf index 9295bbd..eb79f3c 100644 --- a/src/install.rdf +++ b/src/install.rdf @@ -13,6 +13,8 @@ true chrome://eib/content/options.xul 2 + chrome://eib/skin/icon.png + chrome://eib/skin/icon64.png diff --git a/utils/create_xpi.py b/utils/create_xpi.py index e14cd49..f2ad8a6 100755 --- a/utils/create_xpi.py +++ b/utils/create_xpi.py @@ -4,7 +4,7 @@ # Author: Yan Zhu, yan@mit.edu """ -Usage: python create_xpi.py -x -n +Usage: python create_xpi.py -n """ import argparse @@ -14,9 +14,6 @@ import glob parser = argparse.ArgumentParser( description="Deterministic XPI file creator.") -parser.add_argument("-x", type=str, nargs="?", - dest="exclusions", metavar="File with file pattern exclusions", - default=".build_exclusions", help="Excluded file patterns.") parser.add_argument("-n", type=str, dest="xpiname", help="Name of target XPI file.") parser.add_argument("directory", type=str, @@ -24,15 +21,9 @@ parser.add_argument("directory", type=str, args = parser.parse_args() -exclusions = [] -with open(args.exclusions) as f: - for line in f: - exclusions.extend(glob.glob(line.strip())) -exclusions = map(lambda x: './'+x, exclusions) - compress = zipfile.ZIP_DEFLATED xpiFile = zipfile.ZipFile(args.xpiname, mode='w', compression=compress) -xpiFile.write_from_directory(args.directory, exclusions, compress_type=compress) +xpiFile.write_from_directory(args.directory, [], compress_type=compress) xpiFile.close() -- cgit v1.2.3-54-g00ecf