1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 18:57:59 +01:00

Bump {max,min}version requirements for Muttator.

This commit is contained in:
Doug Kearns
2009-07-17 23:01:16 +10:00
parent 51c7f8bf70
commit bf8529d975
3 changed files with 237 additions and 229 deletions

View File

@@ -39,27 +39,7 @@ function Tabs() //{{{
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
var tabmail;
// FIXME: doesn't belong here
var getBrowser = (function () {
if (config.hostApplication == "Thunderbird")
{
return function () {
if (!tabmail)
{
tabmail = document.getElementById("tabmail");
tabmail.__defineGetter__("mTabContainer", function () this.tabContainer);
tabmail.__defineGetter__("mTabs", function () this.tabContainer.childNodes);
tabmail.__defineGetter__("mCurrentTab", function () this.tabContainer.selectedItem);
tabmail.__defineGetter__("mStrip", function () this.tabStrip);
tabmail.__defineGetter__("browsers", function () [browser for (browser in Iterator(this.mTabs))]);
}
return tabmail;
};
}
else
return window.getBrowser;
})();
var getBrowser = config.getBrowser || window.getBrowser;
var alternates = [getBrowser().mCurrentTab, null];

View File

@@ -26,10 +26,24 @@ the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
}}} ***** END LICENSE BLOCK *****/
const config = { //{{{
const config = (function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
var name = "Muttator";
var host = "Thunderbird";
var tabmail;
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
return {
/*** required options, no checks done if they really exist, so be careful ***/
name: "Muttator",
hostApplication: "Thunderbird", // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName");
name: name,
hostApplication: host, // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName");
// Yes, but it will be localized unlike all other strings. So, it's best left until we i18n liberator. --djk
get mainWindowID() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
@@ -38,7 +52,7 @@ const config = { //{{{
defaults: {
guioptions: "frb",
showtabline: 1,
titlestring: "Muttator"
titlestring: name
},
guioptions: {
@@ -57,15 +71,15 @@ const config = { //{{{
styleableChrome: "chrome://messenger/content/messenger.xul,chrome://messenger/content/messengercompose/messengercompose.xul",
autocommands: [["DOMLoad", "Triggered when a page's DOM content has fully loaded"],
["FolderLoad", "Triggered after switching folders in Thunderbird"],
["FolderLoad", "Triggered after switching folders in " + host],
["PageLoadPre", "Triggered after a page load is initiated"],
["PageLoad", "Triggered when a page gets (re)loaded/opened"],
["MuttatorEnter", "Triggered after Thunderbird starts"],
["MuttatorLeave", "Triggered before exiting Thunderbird"],
["MuttatorLeavePre", "Triggered before exiting Thunderbird"]],
[name + "Enter", "Triggered after " + host + " starts"],
[name + "Leave", "Triggered before exiting " + host],
[name + "LeavePre", "Triggered before exiting " + host]],
dialogs: [
["about", "About Thunderbird",
["about", "About " + host,
function () { window.openAboutDialog(); }],
["addons", "Manage Add-ons",
function () { window.openAddonsMgr(); }],
@@ -91,7 +105,7 @@ const config = { //{{{
function () { BrowserPageInfo(); }],
["pagesource", "View page source",
function () { BrowserViewSourceOfDocument(content.document); }],*/
["preferences", "Show Thunderbird preferences dialog",
["preferences", "Show " + host + " preferences dialog",
function () { openOptionsDialog(); }],
/*["printpreview", "Preview the page before printing",
function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/
@@ -121,6 +135,19 @@ const config = { //{{{
}
},
getBrowser: function () {
if (!tabmail)
{
tabmail = { __proto__: document.getElementById("tabmail") };
tabmail.__defineGetter__("mTabContainer", function () this.tabContainer);
tabmail.__defineGetter__("mTabs", function () this.tabContainer.childNodes);
tabmail.__defineGetter__("mCurrentTab", function () this.tabContainer.selectedItem);
tabmail.__defineGetter__("mStrip", function () this.tabStrip);
tabmail.__defineGetter__("browsers", function () [browser for (browser in Iterator(this.mTabs))]);
}
return tabmail;
},
// they are sorted by relevance, not alphabetically
helpFiles: ["intro.html", "version.html"],
@@ -240,6 +267,7 @@ const config = { //{{{
//}}}
}
}; //}}}
}; //}}}
})(); //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -18,8 +18,8 @@
<em:targetApplication>
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>3.0b3pre</em:minVersion>
<em:maxVersion>3.0b3</em:maxVersion>
<em:minVersion>3.0b4pre</em:minVersion>
<em:maxVersion>3.0b4</em:maxVersion>
</Description>
</em:targetApplication>
</Description>