From cc75246fe63fb4c3e57fcfe18c06a3860ce36ebf Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Tue, 6 Jan 2009 16:19:24 -0800 Subject: [PATCH] Replaced the ubiquity-modules, ubiquity-tests, ubiquity-standard-feeds, etc. resources with a single resource at the root of the extension. Thanks to Myk Melez for showing me the secret code to do this. --- systemtests.py | 2 +- ubiquity/chrome.manifest | 6 +-- ubiquity/chrome/content/about.html | 4 +- ubiquity/chrome/content/about.js | 2 +- ubiquity/chrome/content/browser.js | 16 ++++---- ubiquity/chrome/content/browser.xul | 2 +- ubiquity/chrome/content/cmdlist.html | 2 +- ubiquity/chrome/content/cmdlist.js | 2 +- .../chrome/content/confirm-add-command.html | 2 +- .../chrome/content/confirm-add-command.js | 6 +-- ubiquity/chrome/content/docs/docs-chrome.html | 4 +- ubiquity/chrome/content/docs/docs.js | 4 +- ubiquity/chrome/content/editor.html | 12 +++--- ubiquity/chrome/content/editor.js | 6 +-- ubiquity/chrome/content/preferences.xul | 2 +- ubiquity/chrome/content/reset.html | 2 +- ubiquity/chrome/content/skinlist.html | 4 +- ubiquity/chrome/content/skinlist.js | 6 +-- ubiquity/chrome/content/test.html | 6 +-- ubiquity/components/protocol.js | 2 +- ubiquity/feed-parts/header/cmdutils.js | 10 ++--- ubiquity/feed-parts/header/utils.js | 2 +- ubiquity/modules/cmdmanager.js | 2 +- ubiquity/modules/codesource.js | 4 +- ubiquity/modules/default_feed_plugin.js | 16 ++++---- ubiquity/modules/feedaggregator.js | 2 +- ubiquity/modules/feedmanager.js | 4 +- ubiquity/modules/locked_down_feed_plugin.js | 10 ++--- ubiquity/modules/msgservice.js | 2 +- ubiquity/modules/parser/locale_en.js | 2 +- ubiquity/modules/parser/locale_jp.js | 6 +-- ubiquity/modules/parser/parser.js | 8 ++-- ubiquity/modules/prefcommands.js | 2 +- ubiquity/modules/sandboxfactory.js | 4 +- ubiquity/modules/setup.js | 16 ++++---- ubiquity/modules/skinsvc.js | 4 +- ubiquity/modules/ubiquity_protocol.js | 2 +- .../modules/xml_script_commands_parser.js | 2 +- ubiquity/standard-feeds/image.xhtml | 2 +- ubiquity/standard-feeds/templates/map.html | 4 +- ubiquity/tests/framework.js | 2 +- ubiquity/tests/systemtests.js | 6 +-- ubiquity/tests/test_all.js | 38 +++++++++---------- ubiquity/tests/test_annotation_memory.js | 6 +-- ubiquity/tests/test_eventhub.js | 4 +- ubiquity/tests/test_locale_jp.js | 4 +- ubiquity/tests/test_safebox.js | 4 +- ubiquity/tests/test_suggestion_memory.js | 4 +- ubiquity/tests/test_tag_command.js | 10 ++--- xpcshell_tests.js | 8 ++-- 50 files changed, 139 insertions(+), 143 deletions(-) diff --git a/systemtests.py b/systemtests.py index 516151ca..f262d880 100644 --- a/systemtests.py +++ b/systemtests.py @@ -37,7 +37,7 @@ if __name__ == '__main__': moz = jsbridge.start_from_settings(settings) - uri = 'resource://ubiquity-tests/systemtests.js'; + uri = 'resource://ubiquity/tests/systemtests.js'; tests = jsbridge.JSObject( jsbridge.network.bridge, "Components.utils.import('%s')" % uri diff --git a/ubiquity/chrome.manifest b/ubiquity/chrome.manifest index 299b258e..f31c1ab8 100644 --- a/ubiquity/chrome.manifest +++ b/ubiquity/chrome.manifest @@ -1,8 +1,4 @@ -resource ubiquity-modules modules/ -resource ubiquity-scripts scripts/ -resource ubiquity-tests tests/ -resource ubiquity-standard-feeds standard-feeds/ -resource ubiquity-feed-parts feed-parts/ +resource ubiquity ./ content ubiquity chrome/content/ skin ubiquity skin chrome/skin/ overlay chrome://browser/content/browser.xul chrome://ubiquity/content/browser.xul diff --git a/ubiquity/chrome/content/about.html b/ubiquity/chrome/content/about.html index 07eef40f..a02dc1bd 100644 --- a/ubiquity/chrome/content/about.html +++ b/ubiquity/chrome/content/about.html @@ -9,9 +9,9 @@ + src="resource://ubiquity/scripts/jsparser.js"> + src="resource://ubiquity/scripts/jquery.js"> About Ubiquity diff --git a/ubiquity/chrome/content/about.js b/ubiquity/chrome/content/about.js index fc24d9cc..f79685f7 100644 --- a/ubiquity/chrome/content/about.js +++ b/ubiquity/chrome/content/about.js @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -Components.utils.import("resource://ubiquity-modules/setup.js"); +Components.utils.import("resource://ubiquity/modules/setup.js"); function makeRemover(element, info) { function onSlideDown() { diff --git a/ubiquity/chrome/content/browser.js b/ubiquity/chrome/content/browser.js index 5b34e3f9..2526295d 100755 --- a/ubiquity/chrome/content/browser.js +++ b/ubiquity/chrome/content/browser.js @@ -41,7 +41,7 @@ var gUbiquity = null; -Components.utils.import("resource://ubiquity-modules/utils.js"); +Components.utils.import("resource://ubiquity/modules/utils.js"); function ubiquitySetup() { @@ -69,17 +69,17 @@ function ubiquitySetup() } var jsm = {}; - Components.utils.import("resource://ubiquity-modules/setup.js", + Components.utils.import("resource://ubiquity/modules/setup.js", jsm); - Components.utils.import("resource://ubiquity-modules/parser/parser.js", + Components.utils.import("resource://ubiquity/modules/parser/parser.js", jsm); - Components.utils.import("resource://ubiquity-modules/parser/locale_en.js", + Components.utils.import("resource://ubiquity/modules/parser/locale_en.js", jsm); - Components.utils.import("resource://ubiquity-modules/parser/locale_jp.js", + Components.utils.import("resource://ubiquity/modules/parser/locale_jp.js", jsm); - Components.utils.import("resource://ubiquity-modules/cmdmanager.js", + Components.utils.import("resource://ubiquity/modules/cmdmanager.js", jsm); - Components.utils.import("resource://ubiquity-modules/skinsvc.js", + Components.utils.import("resource://ubiquity/modules/skinsvc.js", jsm); var services = jsm.UbiquitySetup.createServices(); jsm.UbiquitySetup.setupWindow(window); @@ -224,7 +224,7 @@ window.addEventListener( "load", function() { var jsm = {}; - Components.utils.import("resource://ubiquity-modules/setup.js", + Components.utils.import("resource://ubiquity/modules/setup.js", jsm); jsm.UbiquitySetup.preload(ubiquitySetup); }, diff --git a/ubiquity/chrome/content/browser.xul b/ubiquity/chrome/content/browser.xul index 903cafd6..6d21d592 100644 --- a/ubiquity/chrome/content/browser.xul +++ b/ubiquity/chrome/content/browser.xul @@ -5,7 +5,7 @@ xmlns:svg="http://www.w3.org/2000/svg"> + diff --git a/ubiquity/chrome/content/cmdlist.js b/ubiquity/chrome/content/cmdlist.js index d7e60165..8626d085 100644 --- a/ubiquity/chrome/content/cmdlist.js +++ b/ubiquity/chrome/content/cmdlist.js @@ -37,7 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ -Components.utils.import("resource://ubiquity-modules/setup.js"); +Components.utils.import("resource://ubiquity/modules/setup.js"); function onDocumentLoad() { function updateCommands() { diff --git a/ubiquity/chrome/content/confirm-add-command.html b/ubiquity/chrome/content/confirm-add-command.html index 68e17ca8..e4c80b25 100644 --- a/ubiquity/chrome/content/confirm-add-command.html +++ b/ubiquity/chrome/content/confirm-add-command.html @@ -96,7 +96,7 @@ - + diff --git a/ubiquity/chrome/content/confirm-add-command.js b/ubiquity/chrome/content/confirm-add-command.js index f3d504ec..fe0417fa 100644 --- a/ubiquity/chrome/content/confirm-add-command.js +++ b/ubiquity/chrome/content/confirm-add-command.js @@ -36,9 +36,9 @@ * * ***** END LICENSE BLOCK ***** */ -Components.utils.import("resource://ubiquity-modules/utils.js"); -Components.utils.import("resource://ubiquity-modules/codesource.js"); -Components.utils.import("resource://ubiquity-modules/setup.js"); +Components.utils.import("resource://ubiquity/modules/utils.js"); +Components.utils.import("resource://ubiquity/modules/codesource.js"); +Components.utils.import("resource://ubiquity/modules/setup.js"); function getUrlParams() { var urlFragments = document.URL.split("?")[1]; diff --git a/ubiquity/chrome/content/docs/docs-chrome.html b/ubiquity/chrome/content/docs/docs-chrome.html index bb3acf15..74ad6c7d 100644 --- a/ubiquity/chrome/content/docs/docs-chrome.html +++ b/ubiquity/chrome/content/docs/docs-chrome.html @@ -9,7 +9,7 @@
- - + + diff --git a/ubiquity/chrome/content/docs/docs.js b/ubiquity/chrome/content/docs/docs.js index bafdbddc..2272808e 100644 --- a/ubiquity/chrome/content/docs/docs.js +++ b/ubiquity/chrome/content/docs/docs.js @@ -6,7 +6,7 @@ App.trim = function trim(str) { App.getLocalUrlData = function getLocalUrlData(url) { var jsm = {}; - Components.utils.import("resource://ubiquity-modules/codesource.js", + Components.utils.import("resource://ubiquity/modules/codesource.js", jsm); var lcs = new jsm.LocalUriCodeSource(url); return lcs.getCode(); @@ -84,7 +84,7 @@ App.processCode = function processCode(code) { $(window).ready( function() { if (window.location.protocol == "chrome:") { - var code = App.getLocalUrlData("resource://ubiquity-modules/utils.js"); + var code = App.getLocalUrlData("resource://ubiquity/modules/utils.js"); App.processCode(code); } else jQuery.get("../../../modules/utils.js", diff --git a/ubiquity/chrome/content/editor.html b/ubiquity/chrome/content/editor.html index c0d4d025..9caae2e3 100755 --- a/ubiquity/chrome/content/editor.html +++ b/ubiquity/chrome/content/editor.html @@ -7,11 +7,11 @@ + src="resource://ubiquity/scripts/jquery.js"> + src="resource://ubiquity/scripts/codemirror/js/codemirror.js"> diff --git a/ubiquity/chrome/content/reset.html b/ubiquity/chrome/content/reset.html index 8f6991b9..b6910038 100644 --- a/ubiquity/chrome/content/reset.html +++ b/ubiquity/chrome/content/reset.html @@ -22,7 +22,7 @@ made to Ubiquity, including but not limited to:

value="Yes, I know what I'm doing. Reset Ubiquity and restart Firefox." onclick="confirmReset();"> +
@@ -60,7 +60,7 @@ diff --git a/ubiquity/chrome/content/skinlist.js b/ubiquity/chrome/content/skinlist.js index 76bc9254..c91147d1 100755 --- a/ubiquity/chrome/content/skinlist.js +++ b/ubiquity/chrome/content/skinlist.js @@ -39,9 +39,9 @@ var Cc = Components.classes; var Ci = Components.interfaces; -Components.utils.import("resource://ubiquity-modules/skinsvc.js"); -Components.utils.import("resource://ubiquity-modules/msgservice.js"); -Components.utils.import("resource://ubiquity-modules/utils.js"); +Components.utils.import("resource://ubiquity/modules/skinsvc.js"); +Components.utils.import("resource://ubiquity/modules/msgservice.js"); +Components.utils.import("resource://ubiquity/modules/utils.js"); var skinService = new SkinSvc(); diff --git a/ubiquity/chrome/content/test.html b/ubiquity/chrome/content/test.html index 9b0b5c32..ec8d370f 100644 --- a/ubiquity/chrome/content/test.html +++ b/ubiquity/chrome/content/test.html @@ -7,11 +7,11 @@ Ubiquity Test Suite - + - - + +