summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-12-07 09:38:55 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-12-07 09:38:55 -0500
commit9d43f129d4ad56dded752aa75c4dd2bb5af48b9e (patch)
tree7c0e9dd7ef78eb2b122f383fc9d0c10591e76194
parent2c30652840889cd2e1c5e15574e93aefdb720fcf (diff)
downloadeib-9d43f129d4ad56dded752aa75c4dd2bb5af48b9e.tar.xz
eib-9d43f129d4ad56dded752aa75c4dd2bb5af48b9e.zip
Fix stuff.
-rw-r--r--LICENSE.txt2
-rw-r--r--src/bootstrap.js17
-rw-r--r--src/chrome.manifest5
-rw-r--r--src/chrome/content/options.xul2
-rw-r--r--src/chrome/skin/icon.pngbin0 -> 533 bytes
-rw-r--r--src/chrome/skin/icon64.pngbin0 -> 751 bytes
-rw-r--r--src/defaults/preferences/preferences.js1
-rw-r--r--src/install.rdf2
-rwxr-xr-xutils/create_xpi.py13
9 files changed, 20 insertions, 22 deletions
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 @@
<!DOCTYPE options SYSTEM "chrome://eib/locale/options.dtd">
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <setting type="string" pref="extensions.eib.trusted" title="&eib.options.trusted" desc="&eib.options.trusted" />
+ <setting type="string" pref="extensions.eib.trusted" title="&eib.options.trusted;" desc="&eib.options.trusted;" />
</vbox>
diff --git a/src/chrome/skin/icon.png b/src/chrome/skin/icon.png
new file mode 100644
index 0000000..7acfcf1
--- /dev/null
+++ b/src/chrome/skin/icon.png
Binary files differ
diff --git a/src/chrome/skin/icon64.png b/src/chrome/skin/icon64.png
new file mode 100644
index 0000000..e2f2ff4
--- /dev/null
+++ b/src/chrome/skin/icon64.png
Binary files 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 @@
<em:bootstrap>true</em:bootstrap>
<em:optionsURL>chrome://eib/content/options.xul</em:optionsURL>
<em:optionsType>2</em:optionsType>
+ <em:iconURL>chrome://eib/skin/icon.png</em:iconURL>
+ <em:icon64URL>chrome://eib/skin/icon64.png</em:icon64URL>
<!-- Mozilla Firefox -->
<em:targetApplication>
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 <exclusions> -n <name of zipped file> <directory>
+Usage: python create_xpi.py -n <name of zipped file> <directory>
"""
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()