extensionSystem: Add a DOWNLOADING state
https://bugzilla.gnome.org/show_bug.cgi?id=654770
This commit is contained in:
parent
a56cd3c3d6
commit
465d03ab2c
@ -16,6 +16,7 @@ const ExtensionState = {
|
|||||||
DISABLED: 2,
|
DISABLED: 2,
|
||||||
ERROR: 3,
|
ERROR: 3,
|
||||||
OUT_OF_DATE: 4,
|
OUT_OF_DATE: 4,
|
||||||
|
DOWNLOADING: 5,
|
||||||
|
|
||||||
// Used as an error state for operations on unknown extensions,
|
// Used as an error state for operations on unknown extensions,
|
||||||
// should never be in a real extensionMeta object.
|
// should never be in a real extensionMeta object.
|
||||||
@ -113,6 +114,12 @@ function installExtensionFromManifestURL(uuid, url) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let meta = extensionMeta[uuid] = { uuid: uuid,
|
||||||
|
state: ExtensionState.DOWNLOADING,
|
||||||
|
error: '' };
|
||||||
|
|
||||||
|
_signals.emit('extension-state-changed', meta);
|
||||||
|
|
||||||
installExtensionFromManifest(manifest, meta);
|
installExtensionFromManifest(manifest, meta);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -690,6 +690,8 @@ Extensions.prototype = {
|
|||||||
return _("Error");
|
return _("Error");
|
||||||
case ExtensionSystem.ExtensionState.OUT_OF_DATE:
|
case ExtensionSystem.ExtensionState.OUT_OF_DATE:
|
||||||
return _("Out of date");
|
return _("Out of date");
|
||||||
|
case ExtensionSystem.ExtensionState.DOWNLOADING:
|
||||||
|
return _("Downloading");
|
||||||
}
|
}
|
||||||
return 'Unknown'; // Not translated, shouldn't appear
|
return 'Unknown'; // Not translated, shouldn't appear
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user