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

Finish the Great Opening Brace Correction.

This commit is contained in:
Doug Kearns
2009-11-09 16:03:00 +11:00
parent 8ef1674c6e
commit a7925705d7
22 changed files with 334 additions and 656 deletions

View File

@@ -3,8 +3,7 @@
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
function Compose() //{{{
{
function Compose() { //{{{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
@@ -12,19 +11,16 @@ function Compose() //{{{
config.features = ["addressbook"]; // the composer has no special features
var stateListener = {
QueryInterface: function (id)
{
QueryInterface: function (id) {
if (id.equals(Ci.nsIDocumentStateListener))
return this;
throw Cr.NS_NOINTERFACE;
},
// this is (also) fired once the new compose window loaded the message for the first time
NotifyDocumentStateChanged: function (nowDirty)
{
NotifyDocumentStateChanged: function (nowDirty) {
// only edit with external editor if this window was not cached!
if (options["autoexternal"] && !window.messageWasEditedExternally/* && !gMsgCompose.recycledWindow*/)
{
if (options["autoexternal"] && !window.messageWasEditedExternally/* && !gMsgCompose.recycledWindow*/) {
window.messageWasEditedExternally = true;
editor.editFieldExternally();
}
@@ -36,8 +32,7 @@ function Compose() //{{{
// XXX: Hack!
window.document.addEventListener("load", function () {
if (window.messageWasEditedExternally === undefined)
{
if (window.messageWasEditedExternally === undefined) {
window.messageWasEditedExternally = false;
GetCurrentEditor().addDocumentStateListener(stateListener);
}