Skip to content

Commit

Permalink
Enable the show script button exactly when the source is available.
Browse files Browse the repository at this point in the history
Fixes #1640
  • Loading branch information
arantius committed Sep 27, 2012
1 parent 452f33a commit f530dbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/install.js
Expand Up @@ -28,6 +28,7 @@ function init() {
gAcceptButton.baseLabel = gAcceptButton.label; gAcceptButton.baseLabel = gAcceptButton.label;


startTimer(); startTimer();
gShowScriptButton.disabled = true;


var bundle = document.getElementById('gm-browser-bundle'); var bundle = document.getElementById('gm-browser-bundle');


Expand Down Expand Up @@ -81,6 +82,8 @@ function onProgress(aRemoteScript, aEventType, aData) {
if (!document) return; // lingering download after window cancel if (!document) return; // lingering download after window cancel
gProgress = Math.floor(100 * aData); gProgress = Math.floor(100 * aData);
if (gRemoteScript.done) { if (gRemoteScript.done) {
gShowScriptButton.disabled = false;

document.getElementById('loading').style.display = 'none'; document.getElementById('loading').style.display = 'none';
if (gRemoteScript.errorMessage) { if (gRemoteScript.errorMessage) {
document.documentElement.getButton('extra1').disabled = true; document.documentElement.getButton('extra1').disabled = true;
Expand Down Expand Up @@ -149,7 +152,6 @@ function updateLabel(aOkAllowed) {
? ((gCurrentDelay > 0) || (gProgress < 100)) ? ((gCurrentDelay > 0) || (gProgress < 100))
: true; : true;
gAcceptButton.disabled = disabled; gAcceptButton.disabled = disabled;
gShowScriptButton.disabled = disabled;
} }


// See: closewindow.xul . // See: closewindow.xul .
Expand Down

0 comments on commit f530dbf

Please sign in to comment.