|
From: <dwa...@us...> - 2012-07-10 11:13:40
|
Revision: 10951
http://zaf.svn.sourceforge.net/zaf/?rev=10951&view=rev
Author: dwaynebailey
Date: 2012-07-10 11:13:28 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
Changes to pass Mozilla review
Add a lot of $LANG $REGION bits to file names and code
Change build rules to manage that.
Remove some observer code which seemed to make an Error disappear
Modified Paths:
--------------
trunk/dict/utils/Makefile.language
trunk/dict/utils/mozilla/chrome/content/dict.js.in
Added Paths:
-----------
trunk/dict/utils/mozilla/chrome/content/dict.xul.in
trunk/dict/utils/mozilla/chrome.manifest.in
Removed Paths:
-------------
trunk/dict/utils/mozilla/chrome/content/dict.xul
trunk/dict/utils/mozilla/chrome.manifest
Modified: trunk/dict/utils/Makefile.language
===================================================================
--- trunk/dict/utils/Makefile.language 2012-07-10 10:11:53 UTC (rev 10950)
+++ trunk/dict/utils/Makefile.language 2012-07-10 11:13:28 UTC (rev 10951)
@@ -236,10 +236,10 @@
hunspell/chrome/content:
mkdir -p hunspell/chrome/content
-hunspell/chrome/content/dict.xul: ../utils/mozilla/chrome/content/dict.xul
- cp $^ $@
+hunspell/chrome/content/dict-$(LANG)-$(REGION).js: ../utils/mozilla/chrome/content/dict.js.in
+ sed "s/{LANG}/$(LANG)/; s/{REGION}/$(REGION)/; s/{LANGNAME}/$(LANGNAME)/; s/{REGIONNAME}/$(REGIONNAME)/; s/{VERSION}/$(VERSION)/" < $< > $@
-hunspell/chrome/content/dict.js: ../utils/mozilla/chrome/content/dict.js.in
+hunspell/chrome/content/dict-$(LANG)-$(REGION).xul: ../utils/mozilla/chrome/content/dict.xul.in
sed "s/{LANG}/$(LANG)/; s/{REGION}/$(REGION)/; s/{LANGNAME}/$(LANGNAME)/; s/{REGIONNAME}/$(REGIONNAME)/; s/{VERSION}/$(VERSION)/" < $< > $@
hunspell/defaults/preferences:
@@ -248,10 +248,10 @@
hunspell/defaults/preferences/defaults.js: ../utils/mozilla/defaults/preferences/defaults.js
sed "s/{LANG}/$(LANG)/; s/{REGION}/$(REGION)/; s/{LANGNAME}/$(LANGNAME)/; s/{REGIONNAME}/$(REGIONNAME)/; s/{VERSION}/$(VERSION)/" < $< > $@
-hunspell/chrome.manifest: ../utils/mozilla/chrome.manifest
- cp $^ $@
+hunspell/chrome.manifest: ../utils/mozilla/chrome.manifest.in
+ sed "s/{LANG}/$(LANG)/; s/{REGION}/$(REGION)/; s/{LANGNAME}/$(LANGNAME)/; s/{REGIONNAME}/$(REGIONNAME)/; s/{VERSION}/$(VERSION)/" < $< > $@
-hunspell/spell-$(LANG)-$(REGION)-$(VERSION).xpi: hunspell/install.js hunspell/install.rdf hunspell/README-$(LANG)-$(REGION).txt hunspell/dictionaries hunspell/dictionaries/$(LANG)-$(REGION).dic hunspell/dictionaries/$(LANG)-$(REGION).aff hunspell/defaults/preferences hunspell/defaults/preferences/defaults.js hunspell/chrome/content hunspell/chrome/content/dict.js hunspell/chrome/content hunspell/chrome/content/dict.xul hunspell/chrome.manifest
+hunspell/spell-$(LANG)-$(REGION)-$(VERSION).xpi: hunspell/install.js hunspell/install.rdf hunspell/README-$(LANG)-$(REGION).txt hunspell/dictionaries hunspell/dictionaries/$(LANG)-$(REGION).dic hunspell/dictionaries/$(LANG)-$(REGION).aff hunspell/defaults/preferences hunspell/defaults/preferences/defaults.js hunspell/chrome/content hunspell/chrome/content/dict-$(LANG)-$(REGION).js hunspell/chrome/content hunspell/chrome/content/dict-$(LANG)-$(REGION).xul hunspell/chrome.manifest
cd hunspell/ ;\
ls ;\
rm -f spell-$(LANG)-$(REGION)-$(VERSION).xpi ;\
Modified: trunk/dict/utils/mozilla/chrome/content/dict.js.in
===================================================================
--- trunk/dict/utils/mozilla/chrome/content/dict.js.in 2012-07-10 10:11:53 UTC (rev 10950)
+++ trunk/dict/utils/mozilla/chrome/content/dict.js.in 2012-07-10 11:13:28 UTC (rev 10951)
@@ -1,6 +1,6 @@
Components.utils.import("resource://gre/modules/Services.jsm");
-dict = {
+dict_{LANG}_{REGION} = {
curVersion: "{VERSION}",
@@ -12,28 +12,25 @@
init: function () {
- // Register to receive notifications of preference changes
- Services.prefs.addObserver("extensions.{LANG}-{REGION}@dictionaries.addons.mozilla.org.", this, false);
-
- var firstrun = dict.prefs.getBoolPref("firstrun");
+ var firstrun = dict_{LANG}_{REGION}.prefs.getBoolPref("firstrun");
var infoURL, openInfo = false;
if (firstrun) {
- dict.prefs.setBoolPref("firstrun", false);
- dict.prefs.setCharPref("installedVersion", this.curVersion);
+ dict_{LANG}_{REGION}.prefs.setBoolPref("firstrun", false);
+ dict_{LANG}_{REGION}.prefs.setCharPref("installedVersion", this.curVersion);
openInfo = true;
- infoURL = dict.firstrunURL;
+ infoURL = dict_{LANG}_{REGION}.firstrunURL;
} else {
try {
- var installedVersion = dict.prefs.getCharPref("installedVersion");
+ var installedVersion = dict_{LANG}_{REGION}.prefs.getCharPref("installedVersion");
/* We are in the middle of an upgrade */
if (this.curVersion != installedVersion) {
- dict.prefs.setCharPref("installedVersion", this.curVersion);
+ dict_{LANG}_{REGION}.prefs.setCharPref("installedVersion", this.curVersion);
openInfo = true;
- infoURL = dict.versionBaseURL +
+ infoURL = dict_{LANG}_{REGION}.versionBaseURL +
this.curVersion.replace(/\./g, '');
}
} catch (ex) { /* Reinstall: do we need to do something in this situation? */
@@ -48,4 +45,4 @@
},
};
-window.addEventListener("load", function(e) { dict.init(); }, false);
+window.addEventListener("load", function(e) { dict_{LANG}_{REGION}.init(); }, false);
Deleted: trunk/dict/utils/mozilla/chrome/content/dict.xul
===================================================================
--- trunk/dict/utils/mozilla/chrome/content/dict.xul 2012-07-10 10:11:53 UTC (rev 10950)
+++ trunk/dict/utils/mozilla/chrome/content/dict.xul 2012-07-10 11:13:28 UTC (rev 10951)
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-
-<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/x-javascript" src="dict.js"/>
-</overlay>
Copied: trunk/dict/utils/mozilla/chrome/content/dict.xul.in (from rev 10834, trunk/dict/utils/mozilla/chrome/content/dict.xul)
===================================================================
--- trunk/dict/utils/mozilla/chrome/content/dict.xul.in (rev 0)
+++ trunk/dict/utils/mozilla/chrome/content/dict.xul.in 2012-07-10 11:13:28 UTC (rev 10951)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <script type="application/x-javascript" src="dict-{LANG}-{REGION}.js"/>
+</overlay>
Deleted: trunk/dict/utils/mozilla/chrome.manifest
===================================================================
--- trunk/dict/utils/mozilla/chrome.manifest 2012-07-10 10:11:53 UTC (rev 10950)
+++ trunk/dict/utils/mozilla/chrome.manifest 2012-07-10 11:13:28 UTC (rev 10951)
@@ -1,3 +0,0 @@
-content dict chrome/content/
-
-overlay chrome://browser/content/browser.xul chrome://dict/content/dict.xul
Copied: trunk/dict/utils/mozilla/chrome.manifest.in (from rev 10834, trunk/dict/utils/mozilla/chrome.manifest)
===================================================================
--- trunk/dict/utils/mozilla/chrome.manifest.in (rev 0)
+++ trunk/dict/utils/mozilla/chrome.manifest.in 2012-07-10 11:13:28 UTC (rev 10951)
@@ -0,0 +1,3 @@
+content dict chrome/content/
+
+overlay chrome://browser/content/browser.xul chrome://dict/content/dict-{LANG}-{REGION}.xul
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|