Better feedback when components of a page do not download
This commit is contained in:
cbiesinger%web.de 2006-09-14 06:04:52 +00:00
Родитель 9df38c87f8
Коммит edd2d935de
2 изменённых файлов: 17 добавлений и 4 удалений

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

@ -256,11 +256,22 @@ nsBrowserStatusHandler.prototype =
var location = aRequest.QueryInterface(nsIChannel).URI.spec; var location = aRequest.QueryInterface(nsIChannel).URI.spec;
var msg = ""; var msg = "";
if (location != "about:blank") { if (location != "about:blank") {
const kErrorBindingAborted = 2152398850;
const kErrorNetTimeout = 2152398862;
switch (aStatus) {
case kErrorBindingAborted:
msg = gNavigatorBundle.getString("nv_stopped");
break;
case kErrorNetTimeout:
msg = gNavigatorBundle.getString("nv_timeout");
break;
default:
// Record page loading time. // Record page loading time.
var elapsed = ((new Date()).getTime() - this.startTime) / 1000; var elapsed = ((new Date()).getTime() - this.startTime) / 1000;
msg = gNavigatorBundle.getString("nv_done"); msg = gNavigatorBundle.getString("nv_done");
msg = msg.replace(/%elapsed%/, elapsed); msg = msg.replace(/%elapsed%/, elapsed);
} }
}
this.status = ""; this.status = "";
this.setDefaultStatus(msg); this.setDefaultStatus(msg);
try { try {

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

@ -1,4 +1,6 @@
nv_done=Document: Done (%elapsed% secs) nv_done=Document: Done (%elapsed% secs)
nv_timeout=Timed Out
nv_stopped=Stopped
openFile=Open File openFile=Open File
defaultStatus= defaultStatus=