mirror of
https://github.com/moparisthebest/FireTray
synced 2025-01-08 12:08:05 -05:00
refactor: rename "mozt" to "moztray"
This commit is contained in:
parent
f6f906efa7
commit
56015e3744
@ -22,7 +22,7 @@ help:
|
||||
@echo "Have fun !"
|
||||
|
||||
# The UUID of the extension.
|
||||
extension_uuid := moztray@foudil.fr
|
||||
extension_uuid := moztrayray@foudil.fr
|
||||
|
||||
# The name of the profile dir where the extension can be installed.
|
||||
profile_dir := mozilla-dev
|
||||
@ -151,7 +151,7 @@ $(build_dir)/$(chrome_source_root)/%.js: $(chrome_source_root)/%.js
|
||||
cp -f $< $@; \
|
||||
else \
|
||||
echo "Stripping comments from JS file $<"; \
|
||||
sed '/mozt\.Debug\.dump/d' $< > $@; \
|
||||
sed '/moztray\.Debug\.dump/d' $< > $@; \
|
||||
fi
|
||||
|
||||
$(build_dir)/$(modules_dir)/commons.js: $(modules_dir)/commons.js
|
||||
|
@ -1,6 +1,6 @@
|
||||
content mozt chrome/content/
|
||||
skin mozt classic/1.0 chrome/skin/
|
||||
locale mozt en-US chrome/locale/en-US/
|
||||
resource mozt modules/
|
||||
content moztray chrome/content/
|
||||
skin moztray classic/1.0 chrome/skin/
|
||||
locale moztray en-US chrome/locale/en-US/
|
||||
resource moztray modules/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://mozt/content/overlay.xul
|
||||
overlay chrome://browser/content/browser.xul chrome://moztray/content/overlay.xul
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
Components.utils.import("resource://mozt/commons.js");
|
||||
Components.utils.import("resource://moztray/commons.js");
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
mozt.UIOptions = {
|
||||
moztray.UIOptions = {
|
||||
|
||||
onLoad: function() {
|
||||
this.toggleDisable_All(mozt.Utils.prefService.getBoolPref('enabled'));
|
||||
this.toggleDisable_All(moztray.Utils.prefService.getBoolPref('enabled'));
|
||||
this.toggleCheck_BypassIssuerUnknown(
|
||||
document.getElementById('ui_bypass_self_signed').checked);
|
||||
},
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://mozt/locale/options.dtd">
|
||||
<prefwindow id="mozt-preferences"
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://moztray/locale/options.dtd">
|
||||
<prefwindow id="moztray-preferences"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&prefwindow.title;"
|
||||
onload= "mozt.UIOptions.onLoad()">
|
||||
onload= "moztray.UIOptions.onLoad()">
|
||||
|
||||
<script type="application/x-javascript" src="options.js" />
|
||||
|
||||
@ -12,15 +12,15 @@
|
||||
|
||||
<preferences>
|
||||
<preference id="pref_bool_enabled"
|
||||
name="extensions.mozt.enabled" type="bool"/>
|
||||
name="extensions.moztray.enabled" type="bool"/>
|
||||
<preference id="pref_bool_add_temporary_exceptions"
|
||||
name="extensions.mozt.add_temporary_exceptions" type="bool"/>
|
||||
name="extensions.moztray.add_temporary_exceptions" type="bool"/>
|
||||
<preference id="pref_bool_notify"
|
||||
name="extensions.mozt.notify" type="bool"/>
|
||||
name="extensions.moztray.notify" type="bool"/>
|
||||
<preference id="pref_bool_bypass_issuer_unknown"
|
||||
name="extensions.mozt.bypass_issuer_unknown" type="bool"/>
|
||||
name="extensions.moztray.bypass_issuer_unknown" type="bool"/>
|
||||
<preference id="pref_bool_bypass_self_signed"
|
||||
name="extensions.mozt.bypass_self_signed" type="bool"/>
|
||||
name="extensions.moztray.bypass_self_signed" type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<groupbox>
|
||||
@ -28,7 +28,7 @@
|
||||
<checkbox id="ui_enabled" preference="pref_bool_enabled"
|
||||
label="&bool_enabled.label;"
|
||||
accesskey="&bool_enabled.accesskey;"
|
||||
onclick="mozt.UIOptions.toggleDisable_All(!this.checked); // checked=before click"/>
|
||||
onclick="moztray.UIOptions.toggleDisable_All(!this.checked); // checked=before click"/>
|
||||
</caption>
|
||||
<checkbox id="ui_add_temporary_exceptions"
|
||||
preference="pref_bool_add_temporary_exceptions"
|
||||
@ -47,7 +47,7 @@
|
||||
preference="pref_bool_bypass_self_signed"
|
||||
label="&bool_bypass_self_signed.label;"
|
||||
accesskey="&bool_bypass_self_signed.accesskey;"
|
||||
onclick="mozt.UIOptions.toggleCheck_BypassIssuerUnknown(!this.checked);"/>
|
||||
onclick="moztray.UIOptions.toggleCheck_BypassIssuerUnknown(!this.checked);"/>
|
||||
</groupbox>
|
||||
</groupbox>
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
/* -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
Components.utils.import("resource://mozt/commons.js");
|
||||
Components.utils.import("resource://mozt/LibGtkStatusIcon.js");
|
||||
Components.utils.import("resource://moztray/commons.js");
|
||||
Components.utils.import("resource://moztray/LibGtkStatusIcon.js");
|
||||
|
||||
const MOZT_ICON_DIR = "chrome/skin/";
|
||||
const MOZT_ICON_FIREFOX = "firefox32.png";
|
||||
|
||||
mozt.Main = {
|
||||
moztray.Main = {
|
||||
|
||||
onLoad: function() {
|
||||
// initialization code
|
||||
this.initialized = null;
|
||||
this.strings = document.getElementById("mozt-strings");
|
||||
this.strings = document.getElementById("moztray-strings");
|
||||
|
||||
try {
|
||||
// Set up preference change observer
|
||||
mozt.Utils.prefService.QueryInterface(Ci.nsIPrefBranch2);
|
||||
moztray.Utils.prefService.QueryInterface(Ci.nsIPrefBranch2);
|
||||
// must stay out of _toggle()
|
||||
mozt.Utils.prefService.addObserver("", this, false);
|
||||
moztray.Utils.prefService.addObserver("", this, false);
|
||||
}
|
||||
catch (ex) {
|
||||
Components.utils.reportError(ex);
|
||||
@ -30,28 +30,28 @@ mozt.Main = {
|
||||
LibGtkStatusIcon.gtk_status_icon_set_from_file(this.tray_icon,
|
||||
icon_filename);
|
||||
|
||||
mozt.Debug.dump('Moztray LOADED !');
|
||||
moztray.Debug.dump('Moztray LOADED !');
|
||||
this.initialized = true;
|
||||
return true;
|
||||
},
|
||||
|
||||
onQuit: function() {
|
||||
// Remove observer
|
||||
mozt.Utils.prefService.removeObserver("", this);
|
||||
moztray.Utils.prefService.removeObserver("", this);
|
||||
LibGtkStatusIcon.shutdown();
|
||||
|
||||
mozt.Debug.dump('Moztray UNLOADED !');
|
||||
moztray.Debug.dump('Moztray UNLOADED !');
|
||||
this.initialized = false;
|
||||
},
|
||||
|
||||
observe: function(subject, topic, data) {
|
||||
// Observer for pref changes
|
||||
if (topic != "nsPref:changed") return;
|
||||
mozt.Debug.dump('Pref changed: '+data);
|
||||
moztray.Debug.dump('Pref changed: '+data);
|
||||
|
||||
switch(data) {
|
||||
case 'enabled':
|
||||
var enable = mozt.Utils.prefService.getBoolPref('enabled');
|
||||
var enable = moztray.Utils.prefService.getBoolPref('enabled');
|
||||
this._toggle(enable);
|
||||
break;
|
||||
}
|
||||
@ -63,5 +63,5 @@ mozt.Main = {
|
||||
// should be sufficient for a delayed Startup (no need for window.setTimeout())
|
||||
// https://developer.mozilla.org/en/Extensions/Performance_best_practices_in_extensions
|
||||
// https://developer.mozilla.org/en/XUL_School/JavaScript_Object_Management.html
|
||||
window.addEventListener("load", function (e) { mozt.Main.onLoad(); }, false);
|
||||
window.addEventListener("unload", function(e) { mozt.Main.onQuit(); }, false);
|
||||
window.addEventListener("load", function (e) { moztray.Main.onLoad(); }, false);
|
||||
window.addEventListener("unload", function(e) { moztray.Main.onQuit(); }, false);
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet href="chrome://mozt/skin/overlay.css" type="text/css"?>
|
||||
<!DOCTYPE overlay SYSTEM "chrome://mozt/locale/overlay.dtd">
|
||||
<overlay id="mozt-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<?xml-stylesheet href="chrome://moztray/skin/overlay.css" type="text/css"?>
|
||||
<!DOCTYPE overlay SYSTEM "chrome://moztray/locale/overlay.dtd">
|
||||
<overlay id="moztray-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script src="overlay.js"/>
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="mozt-strings" src="chrome://mozt/locale/overlay.properties"/>
|
||||
<stringbundle id="moztray-strings" src="chrome://moztray/locale/overlay.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
</overlay>
|
||||
|
@ -1 +1 @@
|
||||
<!ENTITY mozt.label "My localized menuitem">
|
||||
<!ENTITY moztray.label "My localized menuitem">
|
||||
|
@ -1,22 +1,22 @@
|
||||
/* This is just an example. You shouldn't do this. */
|
||||
#mozt-hello
|
||||
#moztray-hello
|
||||
{
|
||||
color: red ! important;
|
||||
}
|
||||
#mozt-toolbar-button
|
||||
#moztray-toolbar-button
|
||||
{
|
||||
list-style-image: url("chrome://mozt/skin/toolbar-button.png");
|
||||
list-style-image: url("chrome://moztray/skin/toolbar-button.png");
|
||||
-moz-image-region: rect(0px 24px 24px 0px);
|
||||
}
|
||||
#mozt-toolbar-button:hover
|
||||
#moztray-toolbar-button:hover
|
||||
{
|
||||
-moz-image-region: rect(24px 24px 48px 0px);
|
||||
}
|
||||
[iconsize="small"] #mozt-toolbar-button
|
||||
[iconsize="small"] #moztray-toolbar-button
|
||||
{
|
||||
-moz-image-region: rect( 0px 40px 16px 24px);
|
||||
}
|
||||
[iconsize="small"] #mozt-toolbar-button:hover
|
||||
[iconsize="small"] #moztray-toolbar-button:hover
|
||||
{
|
||||
-moz-image-region: rect(24px 40px 40px 24px);
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
// https://developer.mozilla.org/en/Localizing_extension_descriptions
|
||||
pref("extensions.moztray@foudil.fr.description", "chrome://mozt/locale/overlay.properties");
|
||||
pref("extensions.moztrayray@foudil.fr.description", "chrome://moztray/locale/overlay.properties");
|
||||
|
||||
// Extension prefs
|
||||
pref("extensions.mozt.enabled", true);
|
||||
pref("extensions.mozt.add_temporary_exceptions", true);
|
||||
pref("extensions.mozt.notify", true);
|
||||
pref("extensions.mozt.bypass_issuer_unknown", true);
|
||||
pref("extensions.mozt.bypass_self_signed", true);
|
||||
pref("extensions.moztray.enabled", true);
|
||||
pref("extensions.moztray.add_temporary_exceptions", true);
|
||||
pref("extensions.moztray.notify", true);
|
||||
pref("extensions.moztray.bypass_issuer_unknown", true);
|
||||
pref("extensions.moztray.bypass_self_signed", true);
|
||||
|
||||
// Set the environment settings
|
||||
pref("browser.ssl_override_behavior", 2);
|
||||
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>moztray@foudil.fr</em:id>
|
||||
<em:id>moztrayray@foudil.fr</em:id>
|
||||
<em:unpack>false</em:unpack>
|
||||
<em:type>2</em:type>
|
||||
<em:name>Mozilla Tray</em:name>
|
||||
<em:version>0.0.1</em:version>
|
||||
<em:creator>Foudil BRÉTEL</em:creator>
|
||||
<em:contributor>Hua Luo, Francesco Solero (Firetray original authors)</em:contributor>
|
||||
<em:homepageURL>https://github.com/foudfou/moztray</em:homepageURL>
|
||||
<em:homepageURL>https://github.com/foudfou/moztrayray</em:homepageURL>
|
||||
<em:description></em:description>
|
||||
<!-- <em:optionsURL>chrome://mozt/content/options.xul</em:optionsURL> -->
|
||||
<em:iconURL>chrome://mozt/skin/icon32.png</em:iconURL>
|
||||
<!-- <em:optionsURL>chrome://moztray/content/options.xul</em:optionsURL> -->
|
||||
<em:iconURL>chrome://moztray/skin/icon32.png</em:iconURL>
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- Firefox -->
|
||||
|
@ -6,21 +6,21 @@
|
||||
* http://developer.mozilla.org/en/XUL_School/JavaScript_Object_Management.html
|
||||
*/
|
||||
|
||||
var EXPORTED_SYMBOLS = [ "mozt" ];
|
||||
var EXPORTED_SYMBOLS = [ "moztray" ];
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
/**
|
||||
* mozt namespace.
|
||||
* moztray namespace.
|
||||
*/
|
||||
if ("undefined" == typeof(mozt)) {
|
||||
var mozt = {
|
||||
if ("undefined" == typeof(moztray)) {
|
||||
var moztray = {
|
||||
DEBUG_MODE: true,
|
||||
};
|
||||
};
|
||||
|
||||
mozt.Debug = {
|
||||
moztray.Debug = {
|
||||
|
||||
_initialized: false,
|
||||
|
||||
@ -43,12 +43,12 @@ mozt.Debug = {
|
||||
* IT'S IMPORTANT THAT DEBUG CALLS ARE WRITTEN ON A SINGLE LINE !
|
||||
*/
|
||||
dump: function(message) { // Debuging function -- prints to javascript console
|
||||
if(!mozt.DEBUG_MODE) return;
|
||||
if(!moztray.DEBUG_MODE) return;
|
||||
this.consoleService.logStringMessage(message);
|
||||
},
|
||||
|
||||
dumpObj: function(obj) {
|
||||
if(!mozt.DEBUG_MODE) return;
|
||||
if(!moztray.DEBUG_MODE) return;
|
||||
var str = "";
|
||||
for(i in obj) {
|
||||
try {
|
||||
@ -62,12 +62,12 @@ mozt.Debug = {
|
||||
|
||||
};
|
||||
// build it !
|
||||
mozt.Debug.init();
|
||||
moztray.Debug.init();
|
||||
|
||||
|
||||
mozt.Utils = {
|
||||
moztray.Utils = {
|
||||
|
||||
prefService: Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService)
|
||||
.getBranch("extensions.mozt."),
|
||||
.getBranch("extensions.moztray."),
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user