1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 17:17:58 +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 ///////////////////////////////////////// ////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
var tabmail; var getBrowser = config.getBrowser || window.getBrowser;
// 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 alternates = [getBrowser().mCurrentTab, null]; 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. the terms of any one of the MPL, the GPL or the LGPL.
}}} ***** END LICENSE BLOCK *****/ }}} ***** 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 ***/ /*** required options, no checks done if they really exist, so be careful ***/
name: "Muttator", name: name,
hostApplication: "Thunderbird", // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName"); 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 // 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", get mainWindowID() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
@@ -38,7 +52,7 @@ const config = { //{{{
defaults: { defaults: {
guioptions: "frb", guioptions: "frb",
showtabline: 1, showtabline: 1,
titlestring: "Muttator" titlestring: name
}, },
guioptions: { guioptions: {
@@ -57,15 +71,15 @@ const config = { //{{{
styleableChrome: "chrome://messenger/content/messenger.xul,chrome://messenger/content/messengercompose/messengercompose.xul", styleableChrome: "chrome://messenger/content/messenger.xul,chrome://messenger/content/messengercompose/messengercompose.xul",
autocommands: [["DOMLoad", "Triggered when a page's DOM content has fully loaded"], 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"], ["PageLoadPre", "Triggered after a page load is initiated"],
["PageLoad", "Triggered when a page gets (re)loaded/opened"], ["PageLoad", "Triggered when a page gets (re)loaded/opened"],
["MuttatorEnter", "Triggered after Thunderbird starts"], [name + "Enter", "Triggered after " + host + " starts"],
["MuttatorLeave", "Triggered before exiting Thunderbird"], [name + "Leave", "Triggered before exiting " + host],
["MuttatorLeavePre", "Triggered before exiting Thunderbird"]], [name + "LeavePre", "Triggered before exiting " + host]],
dialogs: [ dialogs: [
["about", "About Thunderbird", ["about", "About " + host,
function () { window.openAboutDialog(); }], function () { window.openAboutDialog(); }],
["addons", "Manage Add-ons", ["addons", "Manage Add-ons",
function () { window.openAddonsMgr(); }], function () { window.openAddonsMgr(); }],
@@ -91,7 +105,7 @@ const config = { //{{{
function () { BrowserPageInfo(); }], function () { BrowserPageInfo(); }],
["pagesource", "View page source", ["pagesource", "View page source",
function () { BrowserViewSourceOfDocument(content.document); }],*/ function () { BrowserViewSourceOfDocument(content.document); }],*/
["preferences", "Show Thunderbird preferences dialog", ["preferences", "Show " + host + " preferences dialog",
function () { openOptionsDialog(); }], function () { openOptionsDialog(); }],
/*["printpreview", "Preview the page before printing", /*["printpreview", "Preview the page before printing",
function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/ 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 // they are sorted by relevance, not alphabetically
helpFiles: ["intro.html", "version.html"], helpFiles: ["intro.html", "version.html"],
@@ -240,6 +267,7 @@ const config = { //{{{
//}}} //}}}
} }
}; //}}} }; //}}}
})(); //}}}
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

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