diff options
author | Evan Welsh <contact@evanwelsh.com> | 2022-07-24 19:25:23 -0700 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-01 12:59:32 +0000 |
commit | 56beb6ff2bc6ae1999b74f18bb61f91070628298 (patch) | |
tree | 0758f8b1a20adaf205276d2c27b65cdfc4b80c71 /subprojects/extensions-tool | |
parent | b7c097ba79454dac6251ad69f28ba98f6ac6c559 (diff) | |
download | gnome-shell-56beb6ff2bc6ae1999b74f18bb61f91070628298.tar.gz |
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>
Diffstat (limited to 'subprojects/extensions-tool')
-rw-r--r-- | subprojects/extensions-tool/src/common.h | 2 | ||||
-rw-r--r-- | subprojects/extensions-tool/src/main.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/subprojects/extensions-tool/src/common.h b/subprojects/extensions-tool/src/common.h index 2b0448495..74d789e91 100644 --- a/subprojects/extensions-tool/src/common.h +++ b/subprojects/extensions-tool/src/common.h @@ -36,6 +36,8 @@ typedef enum { STATE_OUT_OF_DATE, STATE_DOWNLOADING, STATE_INITIALIZED, + STATE_DISABLING, + STATE_ENABLING, STATE_UNINSTALLED = 99 } ExtensionState; diff --git a/subprojects/extensions-tool/src/main.c b/subprojects/extensions-tool/src/main.c index 66a347626..5bf2579b7 100644 --- a/subprojects/extensions-tool/src/main.c +++ b/subprojects/extensions-tool/src/main.c @@ -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"; } |