extensions-tool: Rename ENABLED/DISABLED states

Follow the update terminology used by the extension system, in
particular when displaying extension details to the user.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7004

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3073>
This commit is contained in:
Florian Müllner 2023-12-21 21:03:41 +01:00 committed by Marge Bot
parent 7a9bfa2744
commit 01e9724d75
4 changed files with 15 additions and 15 deletions

View File

@ -62,7 +62,7 @@ Prints the program version.
Enables the extension identified by 'UUID'. Enables the extension identified by 'UUID'.
+ +
The command will not detect any errors from the extension itself, use the The command will not detect any errors from the extension itself, use the
*info* command to confirm that the extension state is *ENABLED*. *info* command to confirm that the extension state is *ACTIVE*.
+ +
If the extension is already enabled, the command will do nothing. If the extension is already enabled, the command will do nothing.

View File

@ -87,10 +87,10 @@ list_extensions (ListFilterFlags filter, DisplayFormat format)
if (type == TYPE_SYSTEM && (filter & LIST_FLAGS_SYSTEM) == 0) if (type == TYPE_SYSTEM && (filter & LIST_FLAGS_SYSTEM) == 0)
continue; continue;
if (state == STATE_ENABLED && (filter & LIST_FLAGS_ENABLED) == 0) if (state == STATE_ACTIVE && (filter & LIST_FLAGS_ENABLED) == 0)
continue; continue;
if (state != STATE_ENABLED && (filter & LIST_FLAGS_DISABLED) == 0) if (state != STATE_ACTIVE && (filter & LIST_FLAGS_DISABLED) == 0)
continue; continue;
if (!has_prefs && (filter & LIST_FLAGS_NO_PREFS) == 0) if (!has_prefs && (filter & LIST_FLAGS_NO_PREFS) == 0)

View File

@ -30,14 +30,14 @@ typedef enum {
} ExtensionType; } ExtensionType;
typedef enum { typedef enum {
STATE_ENABLED = 1, STATE_ACTIVE = 1,
STATE_DISABLED, STATE_INACTIVE,
STATE_ERROR, STATE_ERROR,
STATE_OUT_OF_DATE, STATE_OUT_OF_DATE,
STATE_DOWNLOADING, STATE_DOWNLOADING,
STATE_INITIALIZED, STATE_INITIALIZED,
STATE_DISABLING, STATE_DEACTIVATING,
STATE_ENABLING, STATE_ACTIVATING,
STATE_UNINSTALLED = 99 STATE_UNINSTALLED = 99
} ExtensionState; } ExtensionState;

View File

@ -31,10 +31,10 @@ extension_state_to_string (ExtensionState state)
{ {
switch (state) switch (state)
{ {
case STATE_ENABLED: case STATE_ACTIVE:
return "ENABLED"; return "ACTIVE";
case STATE_DISABLED: case STATE_INACTIVE:
return "DISABLED"; return "INACTIVE";
case STATE_ERROR: case STATE_ERROR:
return "ERROR"; return "ERROR";
case STATE_OUT_OF_DATE: case STATE_OUT_OF_DATE:
@ -43,10 +43,10 @@ extension_state_to_string (ExtensionState state)
return "DOWNLOADING"; return "DOWNLOADING";
case STATE_INITIALIZED: case STATE_INITIALIZED:
return "INITIALIZED"; return "INITIALIZED";
case STATE_DISABLING: case STATE_DEACTIVATING:
return "DISABLING"; return "DEACTIVATING";
case STATE_ENABLING: case STATE_ACTIVATING:
return "ENABLING"; return "ACTIVATING";
case STATE_UNINSTALLED: case STATE_UNINSTALLED:
return "UNINSTALLED"; return "UNINSTALLED";
} }