extensionUtils: Add DISABLING and ENABLING extension states
Extensions can export asynchronous enable() and disable() functions. To guard against re-entrancy when enabling or disabling an extension, this commit adds two new states: ENABLING and DISABLING which are set immediately prior to calling enable() and disable() respectively. This commit updates the extensions CLI and Extensions app with new strings for these states. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2364>
This commit is contained in:
@ -790,16 +790,20 @@ var Extensions = GObject.registerClass({
|
||||
_stateToString(extensionState) {
|
||||
switch (extensionState) {
|
||||
case ExtensionState.ENABLED:
|
||||
return _("Enabled");
|
||||
return _('Enabled');
|
||||
case ExtensionState.DISABLED:
|
||||
case ExtensionState.INITIALIZED:
|
||||
return _("Disabled");
|
||||
return _('Disabled');
|
||||
case ExtensionState.ERROR:
|
||||
return _("Error");
|
||||
return _('Error');
|
||||
case ExtensionState.OUT_OF_DATE:
|
||||
return _("Out of date");
|
||||
return _('Out of date');
|
||||
case ExtensionState.DOWNLOADING:
|
||||
return _("Downloading");
|
||||
return _('Downloading');
|
||||
case ExtensionState.DISABLING:
|
||||
return _('Disabling');
|
||||
case ExtensionState.ENABLING:
|
||||
return _('Enabling');
|
||||
}
|
||||
return 'Unknown'; // Not translated, shouldn't appear
|
||||
}
|
||||
|
Reference in New Issue
Block a user