mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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:
parent
b7c097ba79
commit
56beb6ff2b
6 changed files with 25 additions and 5 deletions
|
|
@ -36,6 +36,8 @@ typedef enum {
|
|||
STATE_OUT_OF_DATE,
|
||||
STATE_DOWNLOADING,
|
||||
STATE_INITIALIZED,
|
||||
STATE_DISABLING,
|
||||
STATE_ENABLING,
|
||||
|
||||
STATE_UNINSTALLED = 99
|
||||
} ExtensionState;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ extension_state_to_string (ExtensionState state)
|
|||
return "DOWNLOADING";
|
||||
case STATE_INITIALIZED:
|
||||
return "INITIALIZED";
|
||||
case STATE_DISABLING:
|
||||
return "DISABLING";
|
||||
case STATE_ENABLING:
|
||||
return "ENABLING";
|
||||
case STATE_UNINSTALLED:
|
||||
return "UNINSTALLED";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue