Fix bug 35233, Stop on the context menu needs to be disabled at the appropriate times. r=jrgm a=brendan

This commit is contained in:
BlakeR1234%aol.com 2000-08-24 23:51:44 +00:00
Родитель 1cb6380993
Коммит a5d6d0c110
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -60,6 +60,7 @@ catch (ex)
var throbberElement = null;
var stopButton = null;
var stopMenu = null;
var stopContext = null;
var locationFld = null;
var backButton = null;
var forwardButton = null;
@ -286,6 +287,8 @@ nsXULBrowserWindow.prototype =
stopButton = document.getElementById("stop-button");
if(!stopMenu)
stopMenu = document.getElementById("menuitem-stop");
if(!stopContext)
stopContext = document.getElementById("context-stop");
if (state & Components.interfaces.nsIWebProgressListener.flag_start) {
if(state & Components.interfaces.nsIWebProgressListener.flag_is_network) {
@ -298,6 +301,7 @@ nsXULBrowserWindow.prototype =
// XXX: These need to be based on window activity...
stopButton.setAttribute("disabled", false);
stopMenu.setAttribute("disabled", false);
stopContext.setAttribute("disabled", false);
// Initialize the progress stuff...
statusMeter.setAttribute("mode","undetermined");
@ -336,6 +340,7 @@ nsXULBrowserWindow.prototype =
// XXX: These need to be based on window activity...
stopButton.setAttribute("disabled", true);
stopMenu.setAttribute("disabled", true);
stopContext.setAttribute("disabled", true);
EnableBusyCursor(false);
}

Просмотреть файл

@ -95,8 +95,8 @@ nsContextMenu.prototype = {
this.showItem( "context-reload", !this.inFrame );
this.showItem( "context-reload-frame", this.inFrame );
// Stop determined by canStop broadcaster.
this.setItemAttrFromNode( "context-stop", "disabled", "canStop" );
// XXX: Stop is determined in navigator.js; the canStop broadcaster is broken
//this.setItemAttrFromNode( "context-stop", "disabled", "canStop" );
},
initSaveItems : function () {
// Save page is always OK, unless in directory listing.