diff --git a/mozilla/extensions/vixen/resources/content/history/history.js b/mozilla/extensions/vixen/resources/content/history/history.js new file mode 100644 index 00000000000..be23c70b837 --- /dev/null +++ b/mozilla/extensions/vixen/resources/content/history/history.js @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Mozilla Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 2000 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Ben Goodger (Original Author) + */ + diff --git a/mozilla/extensions/vixen/resources/content/history/history.xul b/mozilla/extensions/vixen/resources/content/history/history.xul new file mode 100644 index 00000000000..967bac83656 --- /dev/null +++ b/mozilla/extensions/vixen/resources/content/history/history.xul @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mozilla/extensions/vixen/resources/content/palette/vxPalette.js b/mozilla/extensions/vixen/resources/content/palette/vxPalette.js index 0f0cdf75544..64d248bb8b0 100644 --- a/mozilla/extensions/vixen/resources/content/palette/vxPalette.js +++ b/mozilla/extensions/vixen/resources/content/palette/vxPalette.js @@ -67,15 +67,19 @@ var vxPalette = radiogroupAttributes, radiogroupValues, false); radiogroupAttrTxn.init(); + radiogroupTxn.addListener(radiogroupAttrTxn); var radioTxn = new vxCreateElementTxn(vfdDocument, "radio", radiogroupTxn.mID, insertionPoint.index); radioTxn.init(); + radiogroupTxn.addListener(radioTxn); + var radioAttributes = ["value", "group", "id"]; var radioValues = ["Radio " + nRadios, "radiogroup_" + nRadiogroups, "radio_" + nRadios]; var radioAttrTxn = new vxChangeAttributeTxn(radioTxn.mID, radioAttributes, radioValues, false); radioAttrTxn.init(); + radioTxn.addListener(radioAttrTxn); // batch the transactions var txns = [radiogroupTxn, radiogroupAttrTxn, radioTxn, radioAttrTxn]; @@ -83,9 +87,7 @@ var vxPalette = aggregateTxn.init(); var txmgr = focusedWindow.vxVFD.mTxMgrShell; - aggregateTxn.addListener([radiogroupAttrTxn, radioTxn, radioAttrTxn]); txmgr.doTransaction(aggregateTxn); - aggregateTxn.removeListener([radiogroupAttrTxn, radioTxn, radioAttrTxn]); }, incrementElementCount: function (aNodeName) @@ -110,15 +112,14 @@ var vxPalette = elementTxn.init(); var elementAttrTxn = new vxChangeAttributeTxn(elementTxn.mID, aAttributes, aValues, false); elementAttrTxn.init(); - + elementTxn.addListener(elementAttrTxn); + // batch the transactions var aggregateTxn = new vxAggregateTxn([elementTxn, elementAttrTxn]); aggregateTxn.init(); - + var txmgr = focusedWindow.vxVFD.mTxMgrShell; - txmgr.addListener(elementAttrTxn); txmgr.doTransaction(aggregateTxn); - txmgr.removeListener(elementAttrTxn); }, /** diff --git a/mozilla/extensions/vixen/resources/content/vfd/vfd.js b/mozilla/extensions/vixen/resources/content/vfd/vfd.js index b67fb78b0d2..4fea3597a8e 100644 --- a/mozilla/extensions/vixen/resources/content/vfd/vfd.js +++ b/mozilla/extensions/vixen/resources/content/vfd/vfd.js @@ -59,7 +59,17 @@ var vxVFD = // for a focused vfd, send "vfd,url" // vixenMain.vxShell.mFocusObserver.Notify({ }, "window_focus", ("vfd," + this.mParams.documentURL)); vixenMain.vxShell.mFocusedWindow = window; - _ddf("focused window, according to our parent, is", vixenMain.vxShell.mFocusedWindow); + + // XXX-HACK until we set up observers + var history = vxUtils.getWindow("vixen:history"); + if (history) { + var doc = history.document; + var historyTree = doc.getElementById("historyTree"); + if (historyTree) { + historyTree.database.AddDataSource(vxVFDTransactionDS); + historyTree.builder.rebuild(); + } + } }, get vfdDocumentWindowNode() @@ -79,7 +89,7 @@ var vxVFD = getInsertionPoint: function () { - if (this.mSelection && this.mSelection.selectionExists) { + if (this.mSelection && this.mSelection.selectionExists) { // && this.mSelection.selectionExists) { // compute the insertion point based on selection // XXX - TODO } diff --git a/mozilla/extensions/vixen/resources/content/vfd/vfd.xul b/mozilla/extensions/vixen/resources/content/vfd/vfd.xul index 25f6bb86a1e..02f2fb1c0b3 100644 --- a/mozilla/extensions/vixen/resources/content/vfd/vfd.xul +++ b/mozilla/extensions/vixen/resources/content/vfd/vfd.xul @@ -20,16 +20,7 @@ - - - - - - -