RetroZilla/extensions/wallet/resources/content/walletNavigatorOverlay.xul
2015-10-20 23:03:22 -04:00

193 lines
6.9 KiB
XML

<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
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 ***** -->
<!DOCTYPE overlay SYSTEM "chrome://wallet/locale/walletNavigatorOverlay.dtd">
<overlay id="walletNavigatorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://wallet/content/walletOverlay.js"/>
<script type="application/x-javascript">
<![CDATA[
function initWalletMenuItems() {
// Determine if capture/prefill should be enabled.
var state = getState(0);
setDisabledAttr("cmd_walletCapture", (state.capture != enable));
setDisabledAttr("cmd_walletPrefill", (state.prefill != enable));
}
/* form toolbar is out
// Can't use generic goToggleToolbar (see utilityOverlay.js) for form menu because
// form toolbar could be hidden even when the checkbox in the view menu is checked
function goToggleFormToolbar(id, elementID) {
var element = document.getElementById(elementID);
if (element) {
var checkValue = element.getAttribute("checked");
if (checkValue == "false") {
element.setAttribute("checked","true")
initToolbarItems();
} else {
element.setAttribute("checked","false")
showItem("formToolbar", false);
}
document.persist(id, 'hidden');
document.persist(elementID, 'checked');
}
}
function navObserver() {
}
navObserver.prototype.observe = function (subject, message, contextUrl) {
if (message == 'EndDocumentLoad') {
initToolbarItems()
}
}
function addEndDocumentLoadListener() {
if (window.content) {
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService();
observerService = observerService.QueryInterface(Components.interfaces.nsIObserverService);
var observer = new navObserver();
if (observerService && observer) {
observerService.addObserver(observer, "EndDocumentLoad", PR_FALSE);
} else {
dump("FAILURE to get observer service\n");
}
}
}
window.addEventListener("load", addEndDocumentLoadListener, false);
*/
]]>
</script>
<commandset id="commands">
<commandset id="walletMenuItems">
<command id="cmd_walletPrefill" label="&prefillCmd.label;"
accesskey="&prefillCmd.accesskey;" oncommand="formPrefill();"/>
<command id="cmd_walletCapture" label="&captureCmd.label;"
accesskey="&captureCmd.accesskey;" oncommand="formCapture();"/>
</commandset>
</commandset>
<!-- menu items -->
<!-- form toolbar is out
<broadcasterset id="broadcasterset">
<broadcaster id="cmd_viewformtoolbar" label="&formbarCmd.label;"
accesskey="&formbarCmd.accesskey;" class="menuitem-iconic"
type="checkbox" checked="true"
oncommand="goToggleFormToolbar('formToolbar','cmd_viewformtoolbar');"/>
</broadcasterset>
-->
<!-- view menu -->
<!-- form toolbar is out
<menupopup id="view_toolbars_popup">
<menuitem insertafter="cmd_viewpersonaltoolbar"
observes="cmd_viewformtoolbar"/>
</menupopup>
-->
<!-- edit menu -->
<menupopup id="menu_Edit_Popup" onpopupshowing="initWalletMenuItems();">
<menuseparator insertbefore="menu_PrefsSeparator"/>
<menuitem command="cmd_walletPrefill"
insertbefore="menu_PrefsSeparator"/>
<menuitem command="cmd_walletCapture"
insertbefore="menu_PrefsSeparator"/>
</menupopup>
<!-- Form toolbar items -->
<!-- form toolbar is out
<hbox id="appcontent">
<toolbar id="formToolbar"
class="chromeclass-directories"
tbalign="stretch"
insertafter="browser"
persist="collapsed"
style="display:none;">
<button class="button-toolbar-4"
id="formPrefill"
oncommand="formPrefill();"
label=" &formPrefill.label; "
tooltiptext="&formPrefill.tooltip;"/>
<toolbarseparator/>
<button class="button-toolbar-4"
id="formCapture"
oncommand="formCapture();"
label=" &formCapture.label; "
tooltiptext="&formCapture.tooltip;"/>
<toolbarseparator/>
<button class="button-toolbar-4"
id="formShow"
oncommand="formShow(); initToolbarItems();"
label=" &formView.label; "
tooltiptext="&formView.tooltip;"/>
<toolbarseparator/>
</toolbar>
</hbox>
-->
<menupopup id="taskPopup">
<menu label="&walletFormManager.label;"
accesskey="&walletFormManager.accesskey;"
id="wallet"
insertbefore="navBeginGlobalItems">
<menupopup onpopupshowing="initWalletMenuItems();">
<menuitem command="cmd_walletPrefill"/>
<menuitem command="cmd_walletCapture"/>
<menuseparator/>
<menuitem label="&walletContentsCmd.label;"
accesskey="&walletContentsCmd.accesskey;"
id="walleteditor"
oncommand="WalletDialog('wallet');"/>
<menuitem label="&walletSitesCmd.label;"
accesskey="&walletSitesCmd.accesskey;"
id="walletsites"
oncommand="WalletDialog('walletsites');"/>
</menupopup>
</menu>
</menupopup>
</overlay>