[gnome-software/wip/mak/gsappstate] Migrate AsAppState to GsAppState
- From: Matthias Klumpp <mak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mak/gsappstate] Migrate AsAppState to GsAppState
- Date: Thu, 7 Jan 2021 20:07:44 +0000 (UTC)
commit 6c9a16b0632bb7da88fcdf86fe030a0528e4610a
Author: Matthias Klumpp <matthias tenstral net>
Date: Thu Jan 7 21:07:24 2021 +0100
Migrate AsAppState to GsAppState
This is preparing GNOME Software for migrating to libappstream, which
does not provide AsAppState as libappstream does not handle software
component state.
State is handled by GsApp though, so it makes a lot of sense to make
this enum belong to GsApp.
doc/api/gnome-software-docs.xml | 2 +-
lib/gs-app-list-private.h | 2 +-
lib/gs-app-list.c | 22 +--
lib/gs-app.c | 202 ++++++++++++---------
lib/gs-app.h | 40 +++-
lib/gs-plugin-loader.c | 32 ++--
lib/gs-plugin-vfuncs.h | 6 +-
lib/gs-self-test.c | 36 ++--
plugins/core/gs-plugin-appstream.c | 6 +-
plugins/core/gs-plugin-generic-updates.c | 2 +-
plugins/core/gs-plugin-os-release.c | 2 +-
plugins/core/gs-self-test.c | 8 +-
plugins/dpkg/gs-plugin-dpkg.c | 2 +-
plugins/dummy/gs-plugin-dummy.c | 48 ++---
plugins/dummy/gs-self-test.c | 40 ++--
plugins/eos-updater/gs-plugin-eos-updater.c | 50 ++---
.../gs-plugin-fedora-pkgdb-collections.c | 6 +-
plugins/flatpak/gs-flatpak-transaction.c | 38 ++--
plugins/flatpak/gs-flatpak-utils.c | 4 +-
plugins/flatpak/gs-flatpak.c | 72 ++++----
plugins/flatpak/gs-plugin-flatpak.c | 10 +-
plugins/flatpak/gs-self-test.c | 146 +++++++--------
plugins/fwupd/gs-fwupd-app.c | 2 +-
plugins/fwupd/gs-plugin-fwupd.c | 20 +-
plugins/fwupd/gs-self-test.c | 2 +-
plugins/packagekit/gs-plugin-packagekit-history.c | 10 +-
plugins/packagekit/gs-plugin-packagekit-local.c | 6 +-
plugins/packagekit/gs-plugin-packagekit-offline.c | 4 +-
plugins/packagekit/gs-plugin-packagekit-refine.c | 10 +-
plugins/packagekit/gs-plugin-packagekit-upgrade.c | 4 +-
plugins/packagekit/gs-plugin-packagekit.c | 44 ++---
plugins/packagekit/gs-plugin-systemd-updates.c | 2 +-
plugins/packagekit/packagekit-common.c | 26 +--
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 50 ++---
plugins/snap/gs-plugin-snap.c | 22 +--
plugins/snap/gs-self-test.c | 4 +-
src/gs-app-addon-row.c | 28 +--
src/gs-app-row.c | 70 +++----
src/gs-details-page.c | 120 ++++++------
src/gs-extras-page.c | 16 +-
src/gs-feature-tile.c | 12 +-
src/gs-history-dialog.c | 12 +-
src/gs-installed-page.c | 10 +-
src/gs-origin-popover-row.c | 2 +-
src/gs-overview-page.c | 4 +-
src/gs-page.c | 4 +-
src/gs-popular-tile.c | 12 +-
src/gs-removal-dialog.c | 2 +-
src/gs-repo-row.c | 16 +-
src/gs-repos-dialog.c | 36 ++--
src/gs-search-page.c | 8 +-
src/gs-shell-search-provider.c | 4 +-
src/gs-summary-tile.c | 14 +-
src/gs-third-party-repo-row.c | 26 +--
src/gs-update-dialog.c | 14 +-
src/gs-update-list.c | 2 +-
src/gs-update-monitor.c | 4 +-
src/gs-updates-page.c | 16 +-
src/gs-updates-section.c | 12 +-
src/gs-upgrade-banner.c | 24 +--
60 files changed, 762 insertions(+), 688 deletions(-)
---
diff --git a/doc/api/gnome-software-docs.xml b/doc/api/gnome-software-docs.xml
index fb43ff23..5c660055 100644
--- a/doc/api/gnome-software-docs.xml
+++ b/doc/api/gnome-software-docs.xml
@@ -204,7 +204,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
app = gs_app_new ("chiron.desktop");
gs_app_set_management_plugin (app, "example");
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Chiron");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A teaching application");
gs_app_set_description (app, GS_APP_QUALITY_NORMAL,
diff --git a/lib/gs-app-list-private.h b/lib/gs-app-list-private.h
index ea92b131..ab357f41 100644
--- a/lib/gs-app-list-private.h
+++ b/lib/gs-app-list-private.h
@@ -73,7 +73,7 @@ gboolean gs_app_list_has_flag (GsAppList *list,
GsAppListFlags flag);
void gs_app_list_add_flag (GsAppList *list,
GsAppListFlags flag);
-AsAppState gs_app_list_get_state (GsAppList *list);
+GsAppState gs_app_list_get_state (GsAppList *list);
guint gs_app_list_get_progress (GsAppList *list);
G_END_DECLS
diff --git a/lib/gs-app-list.c b/lib/gs-app-list.c
index b459492e..f2ceff40 100644
--- a/lib/gs-app-list.c
+++ b/lib/gs-app-list.c
@@ -32,7 +32,7 @@ struct _GsAppList
GMutex mutex;
guint size_peak;
GsAppListFlags flags;
- AsAppState state;
+ GsAppState state;
guint progress; /* 0–100 inclusive, or %GS_APP_PROGRESS_UNKNOWN */
};
@@ -60,14 +60,14 @@ static guint signals [SIGNAL_LAST] = { 0 };
* This method will only return a valid result if gs_app_list_add_flag() has
* been called with %GS_APP_LIST_FLAG_WATCH_APPS.
*
- * Returns: the #AsAppState, e.g. %AS_APP_STATE_INSTALLED
+ * Returns: the #GsAppState, e.g. %GS_APP_STATE_INSTALLED
*
* Since: 3.30
**/
-AsAppState
+GsAppState
gs_app_list_get_state (GsAppList *list)
{
- g_return_val_if_fail (GS_IS_APP_LIST (list), AS_APP_STATE_UNKNOWN);
+ g_return_val_if_fail (GS_IS_APP_LIST (list), GS_APP_STATE_UNKNOWN);
return list->state;
}
@@ -169,15 +169,15 @@ gs_app_list_invalidate_progress (GsAppList *self)
static void
gs_app_list_invalidate_state (GsAppList *self)
{
- AsAppState state = AS_APP_STATE_UNKNOWN;
+ GsAppState state = GS_APP_STATE_UNKNOWN;
g_autoptr(GPtrArray) apps = gs_app_list_get_watched (self);
/* find any action state of the list */
for (guint i = 0; i < apps->len; i++) {
GsApp *app_tmp = g_ptr_array_index (apps, i);
- AsAppState state_tmp = gs_app_get_state (app_tmp);
- if (state_tmp == AS_APP_STATE_INSTALLING ||
- state_tmp == AS_APP_STATE_REMOVING) {
+ GsAppState state_tmp = gs_app_get_state (app_tmp);
+ if (state_tmp == GS_APP_STATE_INSTALLING ||
+ state_tmp == GS_APP_STATE_REMOVING) {
state = state_tmp;
break;
}
@@ -927,9 +927,9 @@ gs_app_list_class_init (GsAppListClass *klass)
* GsAppList:state:
*/
pspec = g_param_spec_uint ("state", NULL, NULL,
- AS_APP_STATE_UNKNOWN,
- AS_APP_STATE_LAST,
- AS_APP_STATE_UNKNOWN,
+ GS_APP_STATE_UNKNOWN,
+ GS_APP_STATE_LAST,
+ GS_APP_STATE_UNKNOWN,
G_PARAM_READABLE);
g_object_class_install_property (object_class, PROP_STATE, pspec);
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 95a59229..c9f02ca7 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -95,8 +95,8 @@ typedef struct
guint64 size_installed;
guint64 size_download;
AsAppKind kind;
- AsAppState state;
- AsAppState state_recover;
+ GsAppState state;
+ GsAppState state_recover;
AsAppScope scope;
AsBundleKind bundle_kind;
guint progress; /* integer 0–100 (inclusive), or %GS_APP_PROGRESS_UNKNOWN */
@@ -189,6 +189,44 @@ _g_set_array (GArray **array_ptr, GArray *new_array)
return TRUE;
}
+/**
+ * gs_app_state_to_string:
+ * @state: the #GsAppState.
+ *
+ * Converts the enumerated value to an text representation.
+ *
+ * Returns: string version of @state, or %NULL for unknown
+ **/
+const gchar *
+gs_app_state_to_string (GsAppState state)
+{
+ if (state == GS_APP_STATE_UNKNOWN)
+ return "unknown";
+ if (state == GS_APP_STATE_INSTALLED)
+ return "installed";
+ if (state == GS_APP_STATE_AVAILABLE)
+ return "available";
+ if (state == GS_APP_STATE_PURCHASABLE)
+ return "purchasable";
+ if (state == GS_APP_STATE_PURCHASING)
+ return "purchasing";
+ if (state == GS_APP_STATE_AVAILABLE_LOCAL)
+ return "local";
+ if (state == GS_APP_STATE_QUEUED_FOR_INSTALL)
+ return "queued";
+ if (state == GS_APP_STATE_INSTALLING)
+ return "installing";
+ if (state == GS_APP_STATE_REMOVING)
+ return "removing";
+ if (state == GS_APP_STATE_UPDATABLE)
+ return "updatable";
+ if (state == GS_APP_STATE_UPDATABLE_LIVE)
+ return "updatable-live";
+ if (state == GS_APP_STATE_UNAVAILABLE)
+ return "unavailable";
+ return NULL;
+}
+
static void
gs_app_kv_lpad (GString *str, const gchar *key, const gchar *value)
{
@@ -450,7 +488,7 @@ gs_app_to_string_append (GsApp *app, GString *str)
g_string_append_printf (str, " [%p]\n", app);
gs_app_kv_lpad (str, "kind", as_app_kind_to_string (priv->kind));
- gs_app_kv_lpad (str, "state", as_app_state_to_string (priv->state));
+ gs_app_kv_lpad (str, "state", gs_app_state_to_string (priv->state));
if (priv->quirk > 0) {
g_autofree gchar *qstr = gs_app_quirk_to_string (priv->quirk);
gs_app_kv_lpad (str, "quirk", qstr);
@@ -841,15 +879,15 @@ gs_app_set_bundle_kind (GsApp *app, AsBundleKind bundle_kind)
*
* Gets the state of the application.
*
- * Returns: the #AsAppState, e.g. %AS_APP_STATE_INSTALLED
+ * Returns: the #GsAppState, e.g. %GS_APP_STATE_INSTALLED
*
* Since: 3.22
**/
-AsAppState
+GsAppState
gs_app_get_state (GsApp *app)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
- g_return_val_if_fail (GS_IS_APP (app), AS_APP_STATE_UNKNOWN);
+ g_return_val_if_fail (GS_IS_APP (app), GS_APP_STATE_UNKNOWN);
return priv->state;
}
@@ -905,15 +943,15 @@ gs_app_set_state_recover (GsApp *app)
g_return_if_fail (GS_IS_APP (app));
- if (priv->state_recover == AS_APP_STATE_UNKNOWN)
+ if (priv->state_recover == GS_APP_STATE_UNKNOWN)
return;
if (priv->state_recover == priv->state)
return;
g_debug ("recovering state on %s from %s to %s",
priv->id,
- as_app_state_to_string (priv->state),
- as_app_state_to_string (priv->state_recover));
+ gs_app_state_to_string (priv->state),
+ gs_app_state_to_string (priv->state_recover));
/* make sure progress gets reset when recovering state, to prevent
* confusing initial states when going through more than one attempt */
@@ -925,7 +963,7 @@ gs_app_set_state_recover (GsApp *app)
/* mutex must be held */
static gboolean
-gs_app_set_state_internal (GsApp *app, AsAppState state)
+gs_app_set_state_internal (GsApp *app, GsAppState state)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
gboolean state_change_ok = FALSE;
@@ -936,84 +974,84 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
/* check the state change is allowed */
switch (priv->state) {
- case AS_APP_STATE_UNKNOWN:
+ case GS_APP_STATE_UNKNOWN:
/* unknown has to go into one of the stable states */
- if (state == AS_APP_STATE_INSTALLED ||
- state == AS_APP_STATE_QUEUED_FOR_INSTALL ||
- state == AS_APP_STATE_AVAILABLE ||
- state == AS_APP_STATE_AVAILABLE_LOCAL ||
- state == AS_APP_STATE_UPDATABLE ||
- state == AS_APP_STATE_UPDATABLE_LIVE ||
- state == AS_APP_STATE_UNAVAILABLE)
+ if (state == GS_APP_STATE_INSTALLED ||
+ state == GS_APP_STATE_QUEUED_FOR_INSTALL ||
+ state == GS_APP_STATE_AVAILABLE ||
+ state == GS_APP_STATE_AVAILABLE_LOCAL ||
+ state == GS_APP_STATE_UPDATABLE ||
+ state == GS_APP_STATE_UPDATABLE_LIVE ||
+ state == GS_APP_STATE_UNAVAILABLE)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_INSTALLED:
/* installed has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_REMOVING ||
- state == AS_APP_STATE_UNAVAILABLE ||
- state == AS_APP_STATE_UPDATABLE ||
- state == AS_APP_STATE_UPDATABLE_LIVE)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_REMOVING ||
+ state == GS_APP_STATE_UNAVAILABLE ||
+ state == GS_APP_STATE_UPDATABLE ||
+ state == GS_APP_STATE_UPDATABLE_LIVE)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_INSTALLING ||
- state == AS_APP_STATE_AVAILABLE)
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_INSTALLING ||
+ state == GS_APP_STATE_AVAILABLE)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
/* available has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_QUEUED_FOR_INSTALL ||
- state == AS_APP_STATE_INSTALLING)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_QUEUED_FOR_INSTALL ||
+ state == GS_APP_STATE_INSTALLING)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
/* installing has to go into an stable state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_INSTALLED ||
- state == AS_APP_STATE_UPDATABLE ||
- state == AS_APP_STATE_UPDATABLE_LIVE ||
- state == AS_APP_STATE_AVAILABLE)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_INSTALLED ||
+ state == GS_APP_STATE_UPDATABLE ||
+ state == GS_APP_STATE_UPDATABLE_LIVE ||
+ state == GS_APP_STATE_AVAILABLE)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
/* removing has to go into an stable state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_AVAILABLE ||
- state == AS_APP_STATE_INSTALLED)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_AVAILABLE ||
+ state == GS_APP_STATE_INSTALLED)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE:
/* updatable has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_REMOVING ||
- state == AS_APP_STATE_INSTALLING)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_REMOVING ||
+ state == GS_APP_STATE_INSTALLING)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
/* updatable-live has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_REMOVING ||
- state == AS_APP_STATE_INSTALLING)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_REMOVING ||
+ state == GS_APP_STATE_INSTALLING)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
/* updatable has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_AVAILABLE)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_AVAILABLE)
state_change_ok = TRUE;
break;
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
/* local has to go into an action state */
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_INSTALLING)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_INSTALLING)
state_change_ok = TRUE;
break;
default:
g_warning ("state %s unhandled",
- as_app_state_to_string (priv->state));
+ gs_app_state_to_string (priv->state));
g_assert_not_reached ();
}
@@ -1021,22 +1059,22 @@ gs_app_set_state_internal (GsApp *app, AsAppState state)
if (!state_change_ok) {
g_warning ("State change on %s from %s to %s is not OK",
gs_app_get_unique_id_unlocked (app),
- as_app_state_to_string (priv->state),
- as_app_state_to_string (state));
+ gs_app_state_to_string (priv->state),
+ gs_app_state_to_string (state));
}
priv->state = state;
- if (state == AS_APP_STATE_UNKNOWN ||
- state == AS_APP_STATE_AVAILABLE_LOCAL ||
- state == AS_APP_STATE_AVAILABLE)
+ if (state == GS_APP_STATE_UNKNOWN ||
+ state == GS_APP_STATE_AVAILABLE_LOCAL ||
+ state == GS_APP_STATE_AVAILABLE)
priv->install_date = 0;
/* save this to simplify error handling in the plugins */
switch (state) {
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
/* transient, so ignore */
break;
default:
@@ -1119,11 +1157,11 @@ gs_app_set_pending_action_internal (GsApp *app,
/**
* gs_app_set_state:
* @app: a #GsApp
- * @state: a #AsAppState, e.g. AS_APP_STATE_UPDATABLE_LIVE
+ * @state: a #GsAppState, e.g. GS_APP_STATE_UPDATABLE_LIVE
*
* This sets the state of the application.
* The following state diagram explains the typical states.
- * All applications start in state %AS_APP_STATE_UNKNOWN,
+ * All applications start in state %GS_APP_STATE_UNKNOWN,
* but the frontend is not supposed to see GsApps with this state.
*
* Plugins are responsible for changing the state to one of the other
@@ -1141,7 +1179,7 @@ gs_app_set_pending_action_internal (GsApp *app,
* Since: 3.22
**/
void
-gs_app_set_state (GsApp *app, AsAppState state)
+gs_app_set_state (GsApp *app, GsAppState state)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_autoptr(GMutexLocker) locker = NULL;
@@ -1154,7 +1192,7 @@ gs_app_set_state (GsApp *app, AsAppState state)
* actions that usually change the state, we assign it to the
* appropriate action here */
GsPluginAction action = GS_PLUGIN_ACTION_UNKNOWN;
- if (priv->state == AS_APP_STATE_QUEUED_FOR_INSTALL)
+ if (priv->state == GS_APP_STATE_QUEUED_FOR_INSTALL)
action = GS_PLUGIN_ACTION_INSTALL;
gs_app_set_pending_action_internal (app, action);
@@ -3139,7 +3177,7 @@ gs_app_get_size_download (GsApp *app)
/* add the runtime if this is not installed */
if (priv->runtime != NULL) {
- if (gs_app_get_state (priv->runtime) == AS_APP_STATE_AVAILABLE)
+ if (gs_app_get_state (priv->runtime) == GS_APP_STATE_AVAILABLE)
sz += gs_app_get_size_installed (priv->runtime);
}
@@ -3442,8 +3480,8 @@ gs_app_add_related (GsApp *app, GsApp *app2)
/* if the app is updatable-live and any related app is not then
* degrade to the offline state */
- if (priv->state == AS_APP_STATE_UPDATABLE_LIVE &&
- priv2->state == AS_APP_STATE_UPDATABLE)
+ if (priv->state == GS_APP_STATE_UPDATABLE_LIVE &&
+ priv2->state == GS_APP_STATE_UPDATABLE)
priv->state = priv2->state;
gs_app_list_add (priv->related, app2);
@@ -3578,10 +3616,10 @@ gs_app_is_installed (GsApp *app)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
g_return_val_if_fail (GS_IS_APP (app), FALSE);
- return (priv->state == AS_APP_STATE_INSTALLED) ||
- (priv->state == AS_APP_STATE_UPDATABLE) ||
- (priv->state == AS_APP_STATE_UPDATABLE_LIVE) ||
- (priv->state == AS_APP_STATE_REMOVING);
+ return (priv->state == GS_APP_STATE_INSTALLED) ||
+ (priv->state == GS_APP_STATE_UPDATABLE) ||
+ (priv->state == GS_APP_STATE_UPDATABLE_LIVE) ||
+ (priv->state == GS_APP_STATE_REMOVING);
}
/**
@@ -3601,8 +3639,8 @@ gs_app_is_updatable (GsApp *app)
g_return_val_if_fail (GS_IS_APP (app), FALSE);
if (priv->kind == AS_APP_KIND_OS_UPGRADE)
return TRUE;
- return (priv->state == AS_APP_STATE_UPDATABLE) ||
- (priv->state == AS_APP_STATE_UPDATABLE_LIVE);
+ return (priv->state == GS_APP_STATE_UPDATABLE) ||
+ (priv->state == GS_APP_STATE_UPDATABLE_LIVE);
}
/**
@@ -4460,9 +4498,9 @@ gs_app_class_init (GsAppClass *klass)
* GsApp:state:
*/
obj_props[PROP_STATE] = g_param_spec_uint ("state", NULL, NULL,
- AS_APP_STATE_UNKNOWN,
- AS_APP_STATE_LAST,
- AS_APP_STATE_UNKNOWN,
+ GS_APP_STATE_UNKNOWN,
+ GS_APP_STATE_LAST,
+ GS_APP_STATE_UNKNOWN,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
@@ -4682,7 +4720,7 @@ gs_app_get_origin_ui (GsApp *app)
}
/* use "Local file" rather than the filename for local files */
- if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL) {
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL) {
/* TRANSLATORS: this is a locally downloaded package */
return g_strdup (_("Local file"));
}
diff --git a/lib/gs-app.h b/lib/gs-app.h
index d099b772..d5cc8779 100644
--- a/lib/gs-app.h
+++ b/lib/gs-app.h
@@ -28,6 +28,40 @@ struct _GsAppClass
gpointer padding[30];
};
+/**
+ * GsAppState:
+ * @GS_APP_STATE_UNKNOWN: Unknown state
+ * @GS_APP_STATE_INSTALLED: Application is installed
+ * @GS_APP_STATE_AVAILABLE: Application is available
+ * @GS_APP_STATE_AVAILABLE_LOCAL: Application is locally available as a file
+ * @GS_APP_STATE_UPDATABLE: Application is installed and updatable
+ * @GS_APP_STATE_UNAVAILABLE: Application is referenced, but not available
+ * @GS_APP_STATE_QUEUED_FOR_INSTALL: Application is queued for install
+ * @GS_APP_STATE_INSTALLING: Application is being installed
+ * @GS_APP_STATE_REMOVING: Application is being removed
+ * @GS_APP_STATE_UPDATABLE_LIVE: Application is installed and updatable live
+ * @GS_APP_STATE_PURCHASABLE: Application is available for purchasing
+ * @GS_APP_STATE_PURCHASING: Application is being purchased
+ *
+ * The application state.
+ **/
+typedef enum {
+ GS_APP_STATE_UNKNOWN, /* Since: 0.2.2 */
+ GS_APP_STATE_INSTALLED, /* Since: 0.2.2 */
+ GS_APP_STATE_AVAILABLE, /* Since: 0.2.2 */
+ GS_APP_STATE_AVAILABLE_LOCAL, /* Since: 0.2.2 */
+ GS_APP_STATE_UPDATABLE, /* Since: 0.2.2 */
+ GS_APP_STATE_UNAVAILABLE, /* Since: 0.2.2 */
+ GS_APP_STATE_QUEUED_FOR_INSTALL, /* Since: 0.2.2 */
+ GS_APP_STATE_INSTALLING, /* Since: 0.2.2 */
+ GS_APP_STATE_REMOVING, /* Since: 0.2.2 */
+ GS_APP_STATE_UPDATABLE_LIVE, /* Since: 0.5.4 */
+ GS_APP_STATE_PURCHASABLE, /* Since: 0.5.17 */
+ GS_APP_STATE_PURCHASING, /* Since: 0.5.17 */
+ /*< private >*/
+ GS_APP_STATE_LAST
+} GsAppState;
+
/**
* GsAppKudo:
* @GS_APP_KUDO_MY_LANGUAGE: Localised in my language
@@ -174,6 +208,8 @@ typedef enum {
*/
#define GS_APP_PROGRESS_UNKNOWN G_MAXUINT
+const gchar *gs_app_state_to_string (GsAppState state);
+
GsApp *gs_app_new (const gchar *id);
G_DEPRECATED_FOR(gs_app_set_from_unique_id)
GsApp *gs_app_new_from_unique_id (const gchar *unique_id);
@@ -189,9 +225,9 @@ void gs_app_set_id (GsApp *app,
AsAppKind gs_app_get_kind (GsApp *app);
void gs_app_set_kind (GsApp *app,
AsAppKind kind);
-AsAppState gs_app_get_state (GsApp *app);
+GsAppState gs_app_get_state (GsApp *app);
void gs_app_set_state (GsApp *app,
- AsAppState state);
+ GsAppState state);
AsAppScope gs_app_get_scope (GsApp *app);
void gs_app_set_scope (GsApp *app,
AsAppScope scope);
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 9394cea6..067b6a04 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -754,7 +754,7 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
/* add app to the pending installation queue if necessary */
if (action == GS_PLUGIN_ACTION_INSTALL &&
- app != NULL && gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+ app != NULL && gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
add_app_to_install_queue (helper->plugin_loader, app);
}
@@ -1200,8 +1200,8 @@ gs_plugin_loader_app_is_valid_installed (GsApp *app, gpointer user_data)
{
/* even without AppData, show things in progress */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
return TRUE;
break;
default:
@@ -1251,7 +1251,7 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
}
/* don't show unknown state */
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
g_debug ("app invalid as state unknown %s",
gs_plugin_loader_get_app_str (app));
return FALSE;
@@ -1259,7 +1259,7 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
/* don't show unconverted unavailables */
if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN &&
- gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+ gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
g_debug ("app invalid as unconverted unavailable %s",
gs_plugin_loader_get_app_str (app));
return FALSE;
@@ -1735,12 +1735,12 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader,
/* check the app is not still in an action helper */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
g_warning ("application %s left in %s helper",
gs_app_get_unique_id (app),
- as_app_state_to_string (gs_app_get_state (app)));
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_state_to_string (gs_app_get_state (app)));
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
break;
default:
break;
@@ -1778,7 +1778,7 @@ load_install_queue (GsPluginLoader *plugin_loader, GError **error)
if (strlen (names[i]) == 0)
continue;
app = gs_app_new (names[i]);
- gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+ gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
gs_app_list_add (list, app);
}
@@ -1820,7 +1820,7 @@ save_install_queue (GsPluginLoader *plugin_loader)
for (i = (gint) pending_apps->len - 1; i >= 0; i--) {
GsApp *app;
app = g_ptr_array_index (pending_apps, i);
- if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
g_string_append (s, gs_app_get_id (app));
g_string_append_c (s, '\n');
}
@@ -1856,7 +1856,7 @@ add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app)
g_ptr_array_add (priv->pending_apps, g_object_ref (app));
g_mutex_unlock (&priv->pending_apps_mutex);
- gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+ gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader));
g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle");
save_install_queue (plugin_loader);
@@ -1884,7 +1884,7 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app)
g_mutex_unlock (&priv->pending_apps_mutex);
if (ret) {
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader));
g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle");
save_install_queue (plugin_loader);
@@ -3046,8 +3046,8 @@ gs_plugin_loader_network_changed_cb (GNetworkMonitor *monitor,
queue = gs_app_list_new ();
for (guint i = 0; i < priv->pending_apps->len; i++) {
GsApp *app = g_ptr_array_index (priv->pending_apps, i);
- if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_list_add (queue, app);
}
}
@@ -3171,7 +3171,7 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader,
return FALSE;
/* already installed? */
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED)
continue;
/* make sure that the app update is cancelled when the whole op is cancelled */
diff --git a/lib/gs-plugin-vfuncs.h b/lib/gs-plugin-vfuncs.h
index 05772f2a..a88f9819 100644
--- a/lib/gs-plugin-vfuncs.h
+++ b/lib/gs-plugin-vfuncs.h
@@ -537,7 +537,7 @@ gboolean gs_plugin_update_cancel (GsPlugin *plugin,
* console, but they can also be retrieved using gs_plugin_loader_get_events().
*
* NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_INSTALLED.
+ * to %GS_APP_STATE_INSTALLED.
*
* Returns: %TRUE for success or if not relevant
**/
@@ -566,7 +566,7 @@ gboolean gs_plugin_app_install (GsPlugin *plugin,
* console, but they can also be retrieved using gs_plugin_loader_get_events().
*
* NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_AVAILABLE or %AS_APP_STATE_UNKNOWN if not known.
+ * to %GS_APP_STATE_AVAILABLE or %GS_APP_STATE_UNKNOWN if not known.
*
* Returns: %TRUE for success or if not relevant
**/
@@ -613,7 +613,7 @@ gboolean gs_plugin_app_set_rating (GsPlugin *plugin,
* console, but they can also be retrieved using gs_plugin_loader_get_events().
*
* NOTE: Once the action is complete, the plugin must set the new state of @app
- * to %AS_APP_STATE_INSTALLED or %AS_APP_STATE_UNKNOWN if not known.
+ * to %GS_APP_STATE_INSTALLED or %GS_APP_STATE_UNKNOWN if not known.
*
* If %GS_APP_QUIRK_IS_PROXY is set on the application then the actual #GsApp
* set in @app will be the related application of the parent. Plugins do not
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index c6c20eda..5c353987 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -428,13 +428,13 @@ gs_plugin_func (void)
/* prefer installed applications */
list = gs_app_list_new ();
app = gs_app_new ("e");
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_unique_id (app, "user/foo/*/*/e/*");
gs_app_set_priority (app, 0);
gs_app_list_add (list, app);
g_object_unref (app);
app = gs_app_new ("e");
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_set_unique_id (app, "user/bar/*/*/e/*");
gs_app_set_priority (app, 100);
gs_app_list_add (list, app);
@@ -657,18 +657,18 @@ gs_app_func (void)
g_assert_cmpstr (gs_app_get_name (app), ==, "hugh");
/* check non-transient state saving */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_REMOVING);
gs_app_set_state_recover (app); // simulate an error
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
/* try again */
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_REMOVING);
gs_app_set_state_recover (app); // simulate an error
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
/* correctly parse URL */
gs_app_set_origin_hostname (app, "https://mirrors.fedoraproject.org/metalink");
@@ -687,10 +687,10 @@ gs_app_func (void)
/* check pending action */
g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UNKNOWN);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_pending_action (app, GS_PLUGIN_ACTION_UPDATE);
g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UPDATE);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
g_assert_cmpuint (gs_app_get_pending_action (app), ==, GS_PLUGIN_ACTION_UNKNOWN);
gs_app_set_state_recover (app);
}
@@ -736,24 +736,24 @@ gs_app_list_func (void)
gs_app_list_add_flag (list, GS_APP_LIST_FLAG_WATCH_APPS);
g_assert_cmpint (gs_app_list_get_progress (list), ==, 0);
- g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_UNKNOWN);
+ g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_UNKNOWN);
gs_app_list_add (list, app1);
gs_app_set_progress (app1, 75);
- gs_app_set_state (app1, AS_APP_STATE_AVAILABLE);
- gs_app_set_state (app1, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app1, GS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app1, GS_APP_STATE_INSTALLING);
gs_test_flush_main_context ();
g_assert_cmpint (gs_app_list_get_progress (list), ==, 75);
- g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_INSTALLING);
+ g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_INSTALLING);
gs_app_list_add (list, app2);
gs_app_set_progress (app2, 25);
gs_test_flush_main_context ();
g_assert_cmpint (gs_app_list_get_progress (list), ==, 50);
- g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_INSTALLING);
+ g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_INSTALLING);
gs_app_list_remove (list, app1);
g_assert_cmpint (gs_app_list_get_progress (list), ==, 25);
- g_assert_cmpint (gs_app_list_get_state (list), ==, AS_APP_STATE_UNKNOWN);
+ g_assert_cmpint (gs_app_list_get_state (list), ==, GS_APP_STATE_UNKNOWN);
}
static void
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index de420bb7..f8fa1864 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -726,7 +726,7 @@ gs_plugin_appstream_refine_state (GsPlugin *plugin, GsApp *app, GError **error)
g_propagate_error (error, g_steal_pointer (&error_local));
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
return TRUE;
}
@@ -773,7 +773,7 @@ gs_plugin_refine_from_id (GsPlugin *plugin,
}
/* if an installed desktop or appdata file exists set to installed */
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
if (!gs_plugin_appstream_refine_state (plugin, app, error))
return FALSE;
}
@@ -989,7 +989,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
g_autoptr(GsApp) app = gs_appstream_create_app (plugin, priv->silo, component, error);
if (app == NULL)
return FALSE;
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
gs_app_list_add (list, app);
}
diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c
index 8ca56e15..c42cddc1 100644
--- a/plugins/core/gs-plugin-generic-updates.c
+++ b/plugins/core/gs-plugin-generic-updates.c
@@ -48,7 +48,7 @@ gs_plugin_generic_updates_get_os_update (GsPlugin *plugin)
gs_app_add_quirk (app, GS_APP_QUIRK_IS_PROXY);
gs_app_set_management_plugin (app, "");
gs_app_set_kind (app, AS_APP_KIND_OS_UPDATE);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_name (app,
GS_APP_QUALITY_NORMAL,
/* TRANSLATORS: this is a group of updates that are not
diff --git a/plugins/core/gs-plugin-os-release.c b/plugins/core/gs-plugin-os-release.c
index 3ae902fa..37874804 100644
--- a/plugins/core/gs-plugin-os-release.c
+++ b/plugins/core/gs-plugin-os-release.c
@@ -20,7 +20,7 @@ gs_plugin_initialize (GsPlugin *plugin)
GsPluginData *priv = gs_plugin_alloc_data (plugin, sizeof(GsPluginData));
priv->app_system = gs_app_new ("system");
gs_app_set_kind (priv->app_system, AS_APP_KIND_OS_UPGRADE);
- gs_app_set_state (priv->app_system, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (priv->app_system, GS_APP_STATE_INSTALLED);
}
void
diff --git a/plugins/core/gs-self-test.c b/plugins/core/gs-self-test.c
index 5aabbdfd..364c6c20 100644
--- a/plugins/core/gs-self-test.c
+++ b/plugins/core/gs-self-test.c
@@ -30,7 +30,7 @@ gs_plugins_core_search_repo_name_func (GsPluginLoader *plugin_loader)
/* force this app to be installed */
app_tmp = gs_plugin_loader_app_create (plugin_loader, "*/*/yellow/desktop/arachne.desktop/*");
- gs_app_set_state (app_tmp, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app_tmp, GS_APP_STATE_INSTALLED);
/* get search result based on addon keyword */
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
@@ -77,7 +77,7 @@ gs_plugins_core_os_release_func (GsPluginLoader *plugin_loader)
/* make sure there is valid content */
g_assert_cmpstr (gs_app_get_id (app), ==, "org.fedoraproject.Fedora-25");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPGRADE);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_name (app), ==, "Fedora");
g_assert_cmpstr (gs_app_get_version (app), ==, "25");
g_assert_cmpstr (gs_app_get_url (app, AS_URL_KIND_HOMEPAGE), ==,
@@ -123,8 +123,8 @@ gs_plugins_core_generic_updates_func (GsPluginLoader *plugin_loader)
gs_app_set_bundle_kind (app2, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app1, AS_APP_SCOPE_SYSTEM);
gs_app_set_scope (app2, AS_APP_SCOPE_SYSTEM);
- gs_app_set_state (app1, AS_APP_STATE_UPDATABLE);
- gs_app_set_state (app2, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app1, GS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app2, GS_APP_STATE_UPDATABLE);
gs_app_add_source (app1, "package1");
gs_app_add_source (app2, "package2");
gs_app_list_add (list, app1);
diff --git a/plugins/dpkg/gs-plugin-dpkg.c b/plugins/dpkg/gs-plugin-dpkg.c
index 48fb72a2..a41c7c93 100644
--- a/plugins/dpkg/gs-plugin-dpkg.c
+++ b/plugins/dpkg/gs-plugin-dpkg.c
@@ -77,7 +77,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
/* create app */
app = gs_app_new (NULL);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
gs_app_add_source (app, tokens[0]);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, tokens[0]);
gs_app_set_version (app, tokens[1]);
diff --git a/plugins/dummy/gs-plugin-dummy.c b/plugins/dummy/gs-plugin-dummy.c
index 824baaeb..87d3401c 100644
--- a/plugins/dummy/gs-plugin-dummy.c
+++ b/plugins/dummy/gs-plugin-dummy.c
@@ -317,7 +317,7 @@ gs_plugin_add_search (GsPlugin *plugin,
gs_app_set_size_installed (app, 42 * 1024 * 1024);
gs_app_set_size_download (app, 50 * 1024 * 1024);
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_set_metadata (app, "GnomeSoftware::Creator",
gs_plugin_get_name (plugin));
@@ -359,7 +359,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_set_update_urgency (app, AS_URGENCY_KIND_HIGH);
gs_app_add_icon (app, ic);
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_list_add (list, app);
g_object_unref (app);
@@ -373,7 +373,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
gs_app_add_source (app, "libvirt-glib-devel");
gs_app_add_source_id (app, "libvirt-glib-devel;0.0.1;noarch;fedora");
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -389,7 +389,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_add_source (app, "chiron-libs");
gs_app_add_source_id (app, "chiron-libs;0.0.1;i386;updates-testing");
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -405,7 +405,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_add_icon (proxy, ic);
gs_app_set_kind (proxy, AS_APP_KIND_DESKTOP);
gs_app_add_quirk (proxy, GS_APP_QUIRK_IS_PROXY);
- gs_app_set_state (proxy, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (proxy, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_management_plugin (proxy, gs_plugin_get_name (plugin));
gs_app_list_add (list, proxy);
g_object_unref (proxy);
@@ -415,7 +415,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Related app");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A related app");
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_add_related (proxy, app);
g_object_unref (app);
@@ -425,7 +425,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Another Related app");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "A related app");
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_add_related (proxy, app);
g_object_unref (app);
@@ -447,7 +447,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
for (i = 0; packages[i] != NULL; i++) {
g_autoptr(GsApp) app = gs_app_new (NULL);
gs_app_add_source (app, packages[i]);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_origin (app, "london-west");
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -457,7 +457,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
/* add all app-ids */
for (i = 0; app_ids[i] != NULL; i++) {
g_autoptr(GsApp) app = gs_app_new (app_ids[i]);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
gs_app_list_add (list, app);
@@ -507,12 +507,12 @@ gs_plugin_app_remove (GsPlugin *plugin,
/* remove app */
if (g_strcmp0 (gs_app_get_id (app), "chiron.desktop") == 0) {
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
if (!gs_plugin_dummy_delay (plugin, app, 500, cancellable, error)) {
gs_app_set_state_recover (app);
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
}
/* keep track */
@@ -539,12 +539,12 @@ gs_plugin_app_install (GsPlugin *plugin,
/* install app */
if (g_strcmp0 (gs_app_get_id (app), "chiron.desktop") == 0 ||
g_strcmp0 (gs_app_get_id (app), "zeus.desktop") == 0) {
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!gs_plugin_dummy_delay (plugin, app, 500, cancellable, error)) {
gs_app_set_state_recover (app);
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
}
/* keep track */
@@ -580,12 +580,12 @@ gs_plugin_update_app (GsPlugin *plugin,
}
/* simulate an update for 4 seconds */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
for (guint i = 1; i <= 4; ++i) {
gs_app_set_progress (app, 25 * i);
sleep (1);
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
return TRUE;
}
@@ -601,16 +601,16 @@ refine_app (GsPlugin *plugin,
/* make the local system EOL */
if (gs_app_get_metadata_item (app, "GnomeSoftware::CpeName") != NULL)
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
/* state */
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN) {
if (g_hash_table_lookup (priv->installed_apps,
gs_app_get_id (app)) != NULL)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
if (g_hash_table_lookup (priv->available_apps,
gs_app_get_id (app)) != NULL)
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
}
/* kind */
@@ -742,7 +742,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "View and use virtual machines");
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, "http://www.box.org");
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_set_pixbuf (app, gdk_pixbuf_new_from_file
("/usr/share/icons/hicolor/48x48/apps/chiron.desktop.png", NULL));
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -762,7 +762,7 @@ gs_plugin_add_recent (GsPlugin *plugin,
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "View and use virtual machines");
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, "http://www.box.org");
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_set_pixbuf (app, gdk_pixbuf_new_from_file
("/usr/share/icons/hicolor/48x48/apps/chiron.desktop.png", NULL));
gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
@@ -795,7 +795,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
gs_app_set_scope (app, AS_APP_SCOPE_USER);
gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, "Fedora");
gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
"A major upgrade, with new features and added polish.");
@@ -849,12 +849,12 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, GsApp *app,
return TRUE;
g_debug ("starting download");
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!gs_plugin_dummy_delay (plugin, app, 5000, cancellable, error)) {
gs_app_set_state_recover (app);
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
return TRUE;
}
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 30360ccd..bc8da501 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -59,7 +59,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
/* install */
app = gs_app_new ("chiron.desktop");
gs_app_set_management_plugin (app, "dummy");
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
"app", app,
NULL);
@@ -67,7 +67,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
/* remove */
g_object_unref (plugin_job);
@@ -78,7 +78,7 @@ gs_plugins_dummy_install_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
}
static void
@@ -99,7 +99,7 @@ gs_plugins_dummy_error_func (GsPluginLoader *plugin_loader)
/* update, which should cause an error to be emitted */
app = gs_app_new ("chiron.desktop");
gs_app_set_management_plugin (app, "dummy");
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_UPDATE,
"app", app,
NULL);
@@ -268,7 +268,7 @@ gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "chiron.desktop");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
g_assert_cmpstr (gs_app_get_update_details (app), ==, "Do not crash when using libvirt.");
g_assert_cmpint (gs_app_get_update_urgency (app), ==, AS_URGENCY_KIND_HIGH);
@@ -278,14 +278,14 @@ gs_plugins_dummy_updates_func (GsPluginLoader *plugin_loader)
g_assert_cmpstr (gs_app_get_name (app), ==, "OS Updates");
g_assert_cmpstr (gs_app_get_summary (app), ==, "Includes performance, stability and security
improvements.");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPDATE);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
g_assert_cmpint (gs_app_list_length (gs_app_get_related (app)), ==, 2);
/* get the virtual non-apps OS update */
app = gs_app_list_index (list, 1);
g_assert_cmpstr (gs_app_get_id (app), ==, "proxy.desktop");
g_assert (gs_app_has_quirk (app, GS_APP_QUIRK_IS_PROXY));
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
g_assert_cmpint (gs_app_list_length (gs_app_get_related (app)), ==, 2);
}
@@ -310,7 +310,7 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.fedoraproject.release-rawhide.upgrade");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_OS_UPGRADE);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
/* this should be set with a higher priority by AppStream */
g_assert_cmpstr (gs_app_get_summary (app), ==, "Release specific tagline");
@@ -324,7 +324,7 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
/* trigger the update */
g_object_unref (plugin_job);
@@ -335,7 +335,7 @@ gs_plugins_dummy_distro_upgrades_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE);
}
static void
@@ -370,7 +370,7 @@ gs_plugins_dummy_installed_func (GsPluginLoader *plugin_loader)
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "zeus.desktop");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_name (app), ==, "Zeus");
g_assert_cmpstr (gs_app_get_source_default (app), ==, "zeus");
g_assert (gs_app_get_pixbuf (app) != NULL);
@@ -397,7 +397,7 @@ gs_plugins_dummy_installed_func (GsPluginLoader *plugin_loader)
addon = gs_app_list_index (addons, 0);
g_assert_cmpstr (gs_app_get_id (addon), ==, "zeus-spell.addon");
g_assert_cmpint (gs_app_get_kind (addon), ==, AS_APP_KIND_ADDON);
- g_assert_cmpint (gs_app_get_state (addon), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (addon), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpstr (gs_app_get_name (addon), ==, "Spell Check");
g_assert_cmpstr (gs_app_get_source_default (addon), ==, "zeus-spell");
g_assert_cmpstr (gs_app_get_license (addon), ==,
@@ -634,19 +634,19 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
app1 = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app1), ==, "org.fedoraproject.release-rawhide.upgrade");
g_assert_cmpint (gs_app_get_kind (app1), ==, AS_APP_KIND_OS_UPGRADE);
- g_assert_cmpint (gs_app_get_state (app1), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app1), ==, GS_APP_STATE_AVAILABLE);
/* allow only one operation at a time */
gs_plugin_loader_set_max_parallel_ops (plugin_loader, 1);
app2 = gs_app_new ("chiron.desktop");
gs_app_set_management_plugin (app2, "dummy");
- gs_app_set_state (app2, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app2, GS_APP_STATE_AVAILABLE);
/* use "proxy" prefix so the update function succeeds... */
app3 = gs_app_new ("proxy-zeus.desktop");
gs_app_set_management_plugin (app3, "dummy");
- gs_app_set_state (app3, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app3, GS_APP_STATE_UPDATABLE_LIVE);
context = g_main_context_new ();
helper3->loop = g_main_loop_new (context, FALSE);
@@ -687,9 +687,9 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
/* since we have only 1 parallel installation op possible,
* verify the last operations are pending */
- g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpint (gs_app_get_pending_action (app2), ==, GS_PLUGIN_ACTION_INSTALL);
- g_assert_cmpint (gs_app_get_state (app3), ==, AS_APP_STATE_UPDATABLE_LIVE);
+ g_assert_cmpint (gs_app_get_state (app3), ==, GS_APP_STATE_UPDATABLE_LIVE);
g_assert_cmpint (gs_app_get_pending_action (app3), ==, GS_PLUGIN_ACTION_UPDATE);
/* wait for the 2nd installation to finish, it means the 1st should have been
@@ -702,9 +702,9 @@ gs_plugins_dummy_limit_parallel_ops_func (GsPluginLoader *plugin_loader)
g_assert_no_error (helper2->error);
g_assert_no_error (helper3->error);
- g_assert_cmpint (gs_app_get_state (app1), ==, AS_APP_STATE_UPDATABLE);
- g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
- g_assert_cmpint (gs_app_get_state (app3), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app1), ==, GS_APP_STATE_UPDATABLE);
+ g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app3), ==, GS_APP_STATE_INSTALLED);
/* set the default max parallel ops */
gs_plugin_loader_set_max_parallel_ops (plugin_loader, 0);
diff --git a/plugins/eos-updater/gs-plugin-eos-updater.c b/plugins/eos-updater/gs-plugin-eos-updater.c
index a8aba16f..903a2528 100644
--- a/plugins/eos-updater/gs-plugin-eos-updater.c
+++ b/plugins/eos-updater/gs-plugin-eos-updater.c
@@ -221,20 +221,20 @@ os_upgrade_cancelled_cb (GCancellable *cancellable,
}
static gboolean
-should_add_os_upgrade (AsAppState state)
+should_add_os_upgrade (GsAppState state)
{
switch (state) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_UPDATABLE_LIVE:
return TRUE;
- case AS_APP_STATE_UNKNOWN:
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UNAVAILABLE:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UNKNOWN:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_REMOVING:
default:
return FALSE;
}
@@ -246,9 +246,9 @@ should_add_os_upgrade (AsAppState state)
static void
app_set_state (GsPlugin *plugin,
GsApp *app,
- AsAppState new_state)
+ GsAppState new_state)
{
- AsAppState old_state = gs_app_get_state (app);
+ GsAppState old_state = gs_app_get_state (app);
if (new_state == old_state)
return;
@@ -355,8 +355,8 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
GsPluginData *priv = gs_plugin_get_data (plugin);
GsApp *app = priv->os_upgrade;
EosUpdaterState state;
- AsAppState previous_app_state = gs_app_get_state (app);
- AsAppState current_app_state;
+ GsAppState previous_app_state = gs_app_get_state (app);
+ GsAppState current_app_state;
/* in case the OS upgrade has been disabled */
if (priv->updater_proxy == NULL) {
@@ -370,7 +370,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
switch (state) {
case EOS_UPDATER_STATE_NONE:
case EOS_UPDATER_STATE_READY: {
- app_set_state (plugin, app, AS_APP_STATE_UNKNOWN);
+ app_set_state (plugin, app, GS_APP_STATE_UNKNOWN);
break;
} case EOS_UPDATER_STATE_POLLING: {
/* Nothing to do here. */
@@ -378,7 +378,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
} case EOS_UPDATER_STATE_UPDATE_AVAILABLE: {
guint64 total_size;
- app_set_state (plugin, app, AS_APP_STATE_AVAILABLE);
+ app_set_state (plugin, app, GS_APP_STATE_AVAILABLE);
total_size = gs_eos_updater_get_download_size (priv->updater_proxy);
gs_app_set_size_download (app, total_size);
@@ -392,7 +392,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
/* FIXME: Set to QUEUED_FOR_INSTALL if we’re waiting for metered
* data permission. */
- app_set_state (plugin, app, AS_APP_STATE_INSTALLING);
+ app_set_state (plugin, app, GS_APP_STATE_INSTALLING);
downloaded = gs_eos_updater_get_downloaded_bytes (priv->updater_proxy);
total_size = gs_eos_updater_get_download_size (priv->updater_proxy);
@@ -411,13 +411,13 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
break;
}
case EOS_UPDATER_STATE_UPDATE_READY: {
- app_set_state (plugin, app, AS_APP_STATE_UPDATABLE);
+ app_set_state (plugin, app, GS_APP_STATE_UPDATABLE);
break;
}
case EOS_UPDATER_STATE_APPLYING_UPDATE: {
/* set as 'installing' because if it is applying the update, we
* want to show the progress bar */
- app_set_state (plugin, app, AS_APP_STATE_INSTALLING);
+ app_set_state (plugin, app, GS_APP_STATE_INSTALLING);
/* set up the fake progress to inform the user that something
* is still being done (we don't get progress reports from
@@ -433,7 +433,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
break;
}
case EOS_UPDATER_STATE_UPDATE_APPLIED: {
- app_set_state (plugin, app, AS_APP_STATE_UPDATABLE);
+ app_set_state (plugin, app, GS_APP_STATE_UPDATABLE);
break;
}
@@ -453,7 +453,7 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
/* We can’t recover the app state since eos-updater needs to
* go through the ready → poll → fetch → apply loop again in
* order to recover its state. So go back to ‘unknown’. */
- app_set_state (plugin, app, AS_APP_STATE_UNKNOWN);
+ app_set_state (plugin, app, GS_APP_STATE_UNKNOWN);
/* Cancelling anything in the updater will result in a
* transition to the Error state. Use that as a cue to reset
@@ -470,8 +470,8 @@ sync_state_from_updater_unlocked (GsPlugin *plugin)
current_app_state = gs_app_get_state (app);
g_debug ("%s: Old app state: %s; new app state: %s",
- G_STRFUNC, as_app_state_to_string (previous_app_state),
- as_app_state_to_string (current_app_state));
+ G_STRFUNC, gs_app_state_to_string (previous_app_state),
+ gs_app_state_to_string (current_app_state));
/* if the state changed from or to 'unknown', we need to notify that a
* new update should be shown */
@@ -683,7 +683,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
/* if we are testing the plugin, then always add the OS upgrade */
if (g_getenv ("GS_PLUGIN_EOS_TEST") != NULL) {
- gs_app_set_state (priv->os_upgrade, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (priv->os_upgrade, GS_APP_STATE_AVAILABLE);
gs_app_list_add (list, priv->os_upgrade);
return TRUE;
}
diff --git a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
index a103f7fb..e5abbd1d 100644
--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
+++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c
@@ -274,7 +274,7 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item)
/* create */
app = gs_app_new (app_id);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, item->name);
@@ -533,10 +533,10 @@ refine_app_locked (GsPlugin *plugin,
switch (item->status) {
case PKGDB_ITEM_STATUS_ACTIVE:
case PKGDB_ITEM_STATUS_DEVEL:
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
break;
case PKGDB_ITEM_STATUS_EOL:
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
break;
default:
break;
diff --git a/plugins/flatpak/gs-flatpak-transaction.c b/plugins/flatpak/gs-flatpak-transaction.c
index e1c74725..28dd912b 100644
--- a/plugins/flatpak/gs-flatpak-transaction.c
+++ b/plugins/flatpak/gs-flatpak-transaction.c
@@ -177,7 +177,7 @@ _transaction_ready (FlatpakTransaction *transaction)
* involved to ensure updating the button state */
if (flatpak_transaction_operation_get_operation_type (op) ==
FLATPAK_TRANSACTION_OPERATION_UPDATE)
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
}
#if FLATPAK_CHECK_VERSION(1, 7, 3)
@@ -297,8 +297,8 @@ update_progress_for_op (GsFlatpakTransaction *self,
flatpak_transaction_operation_get_ref (root_op));
return;
}
- if (gs_app_get_state (root_app) != AS_APP_STATE_INSTALLING &&
- gs_app_get_state (root_app) != AS_APP_STATE_REMOVING)
+ if (gs_app_get_state (root_app) != GS_APP_STATE_INSTALLING &&
+ gs_app_get_state (root_app) != GS_APP_STATE_REMOVING)
return;
} else {
GsApp *unskipped_root_app = _transaction_operation_get_app (root_op);
@@ -506,22 +506,22 @@ _transaction_new_operation (FlatpakTransaction *transaction,
/* set app status */
switch (flatpak_transaction_operation_get_operation_type (operation)) {
case FLATPAK_TRANSACTION_OPERATION_INSTALL:
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
break;
case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
break;
case FLATPAK_TRANSACTION_OPERATION_UPDATE:
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
break;
case FLATPAK_TRANSACTION_OPERATION_UNINSTALL:
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
break;
default:
break;
@@ -592,7 +592,7 @@ set_skipped_related_apps_to_installed (GsFlatpakTransaction *self,
ref = flatpak_transaction_operation_get_ref (related_to_op);
related_to_app = _ref_to_app (self, ref);
if (related_to_app != NULL)
- gs_app_set_state (related_to_app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (related_to_app, GS_APP_STATE_INSTALLED);
}
}
}
@@ -617,7 +617,7 @@ _transaction_operation_done (FlatpakTransaction *transaction,
switch (flatpak_transaction_operation_get_operation_type (operation)) {
case FLATPAK_TRANSACTION_OPERATION_INSTALL:
case FLATPAK_TRANSACTION_OPERATION_INSTALL_BUNDLE:
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
#if FLATPAK_CHECK_VERSION(1,7,3)
set_skipped_related_apps_to_installed (self, transaction, operation);
@@ -636,9 +636,9 @@ _transaction_operation_done (FlatpakTransaction *transaction,
#else
if (flatpak_transaction_get_no_deploy (transaction))
#endif
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
else
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
#if FLATPAK_CHECK_VERSION(1,7,3)
set_skipped_related_apps_to_installed (self, transaction, operation);
@@ -647,10 +647,10 @@ _transaction_operation_done (FlatpakTransaction *transaction,
case FLATPAK_TRANSACTION_OPERATION_UNINSTALL:
/* we don't actually know if this app is re-installable */
gs_flatpak_app_set_commit (app, NULL);
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
break;
default:
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
break;
}
}
diff --git a/plugins/flatpak/gs-flatpak-utils.c b/plugins/flatpak/gs-flatpak-utils.c
index 4dee1041..ce530bd3 100644
--- a/plugins/flatpak/gs-flatpak-utils.c
+++ b/plugins/flatpak/gs-flatpak-utils.c
@@ -68,7 +68,7 @@ gs_flatpak_app_new_from_remote (FlatpakRemote *xremote)
app = gs_flatpak_app_new (flatpak_remote_get_name (xremote));
gs_app_set_kind (app, AS_APP_KIND_SOURCE);
gs_app_set_state (app, flatpak_remote_get_disabled (xremote) ?
- AS_APP_STATE_AVAILABLE : AS_APP_STATE_INSTALLED);
+ GS_APP_STATE_AVAILABLE : GS_APP_STATE_INSTALLED);
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
flatpak_remote_get_name (xremote));
@@ -165,7 +165,7 @@ gs_flatpak_app_new_from_repo_file (GFile *file,
app = gs_flatpak_app_new (repo_id);
gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_REPO);
gs_app_set_kind (app, AS_APP_KIND_SOURCE);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, repo_title);
gs_app_set_size_download (app, GS_APP_SIZE_UNKNOWABLE);
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 507ad305..52027d78 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -873,10 +873,10 @@ gs_flatpak_progress_cb (const gchar *status,
gs_app_set_progress (phelper->app, progress);
switch (gs_app_get_state (phelper->app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
plugin_status = GS_PLUGIN_STATUS_INSTALLING;
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
plugin_status = GS_PLUGIN_STATUS_REMOVING;
break;
default:
@@ -1109,8 +1109,8 @@ gs_flatpak_create_installed (GsFlatpak *self,
/* create new object */
origin = flatpak_installed_ref_get_origin (xref);
app = gs_flatpak_create_app (self, origin, FLATPAK_REF (xref));
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_flatpak_set_metadata_installed (self, app, xref);
return g_steal_pointer (&app);
}
@@ -1351,7 +1351,7 @@ gs_flatpak_app_install_source (GsFlatpak *self, GsApp *app,
}
/* install it */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!flatpak_installation_modify_remote (self->installation,
xremote,
cancellable,
@@ -1369,7 +1369,7 @@ gs_flatpak_app_install_source (GsFlatpak *self, GsApp *app,
g_rw_lock_reader_unlock (&self->silo_lock);
/* success */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
return TRUE;
}
@@ -1447,7 +1447,7 @@ get_real_app_for_update (GsFlatpak *self,
g_debug ("Related extension app %s of main app %s is updatable, so "
"setting the latter's state instead.", gs_app_get_unique_id (app),
gs_app_get_unique_id (main_app));
- gs_app_set_state (main_app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (main_app, GS_APP_STATE_UPDATABLE_LIVE);
}
return main_app;
@@ -1503,13 +1503,13 @@ gs_flatpak_add_updates (GsFlatpak *self, GsAppList *list,
/* if for some reason the app is already getting updated, then
* don't change its state */
- if (gs_app_get_state (main_app) != AS_APP_STATE_INSTALLING)
- gs_app_set_state (main_app, AS_APP_STATE_UPDATABLE_LIVE);
+ if (gs_app_get_state (main_app) != GS_APP_STATE_INSTALLING)
+ gs_app_set_state (main_app, GS_APP_STATE_UPDATABLE_LIVE);
/* set updatable state on the extension too, as it will have
* its state updated to installing then installed later on */
- if (gs_app_get_state (app) != AS_APP_STATE_INSTALLING)
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ if (gs_app_get_state (app) != GS_APP_STATE_INSTALLING)
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
/* already downloaded */
if (g_strcmp0 (commit, latest_commit) != 0) {
@@ -1697,7 +1697,7 @@ gs_plugin_refine_item_origin (GsFlatpak *self,
return TRUE;
/* not applicable */
- if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL)
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL)
return TRUE;
/* ensure metadata exists */
@@ -1784,7 +1784,7 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
g_autoptr(GPtrArray) installed_refs = NULL;
/* already found */
- if (gs_app_get_state (app) != AS_APP_STATE_UNKNOWN)
+ if (gs_app_get_state (app) != GS_APP_STATE_UNKNOWN)
return TRUE;
/* need broken out metadata */
@@ -1826,8 +1826,8 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
g_debug ("marking %s as installed with flatpak",
gs_app_get_unique_id (app));
gs_flatpak_set_metadata_installed (self, app, ref);
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
/* flatpak only allows one installed app to be launchable */
if (flatpak_installed_ref_get_is_current (ref)) {
@@ -1845,7 +1845,7 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
return FALSE;
/* anything not installed just check the remote is still present */
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN &&
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN &&
gs_app_get_origin (app) != NULL) {
g_autoptr(FlatpakRemote) xremote = NULL;
xremote = flatpak_installation_get_remote_by_name (self->installation,
@@ -1857,14 +1857,14 @@ gs_flatpak_refine_app_state_unlocked (GsFlatpak *self,
"but %s is disabled",
gs_app_get_unique_id (app),
flatpak_remote_get_name (xremote));
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
} else {
g_debug ("marking %s as available with flatpak",
gs_app_get_unique_id (app));
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
}
} else {
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
g_debug ("failed to find %s remote %s for %s",
self->id,
gs_app_get_origin (app),
@@ -2127,7 +2127,7 @@ gs_plugin_refine_item_size (GsFlatpak *self,
guint64 installed_size = GS_APP_SIZE_UNKNOWABLE;
/* not applicable */
- if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL)
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL)
return TRUE;
if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
return TRUE;
@@ -2148,7 +2148,7 @@ gs_plugin_refine_item_size (GsFlatpak *self,
return FALSE;
/* calculate the platform size too if the app is not installed */
- if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE &&
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE &&
gs_flatpak_app_get_ref_kind (app) == FLATPAK_REF_KIND_APP) {
GsApp *app_runtime;
@@ -2159,7 +2159,7 @@ gs_plugin_refine_item_size (GsFlatpak *self,
cancellable,
error))
return FALSE;
- if (gs_app_get_state (app_runtime) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app_runtime) == GS_APP_STATE_INSTALLED) {
g_debug ("runtime %s is already installed, so not adding size",
gs_app_get_unique_id (app_runtime));
} else {
@@ -2233,13 +2233,13 @@ gs_flatpak_refine_appstream_release (XbNode *component, GsApp *app)
if (version == NULL)
return;
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
gs_app_set_version (app, version);
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
gs_app_set_update_version (app, version);
break;
default:
@@ -2524,7 +2524,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self,
GCancellable *cancellable,
GError **error)
{
- AsAppState old_state = gs_app_get_state (app);
+ GsAppState old_state = gs_app_get_state (app);
g_autoptr(GRWLockReaderLocker) locker = NULL;
/* not us */
@@ -2550,7 +2550,7 @@ gs_flatpak_refine_app_unlocked (GsFlatpak *self,
}
/* scope is fast, do unconditionally */
- if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE_LOCAL)
+ if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE_LOCAL)
gs_plugin_refine_item_scope (self, app);
/* if the state was changed, perhaps set the version from the release */
@@ -2727,7 +2727,7 @@ gs_flatpak_app_remove_source (GsFlatpak *self,
}
/* remove */
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
if (!flatpak_installation_remove_remote (self->installation,
gs_app_get_id (app),
cancellable,
@@ -2743,7 +2743,7 @@ gs_flatpak_app_remove_source (GsFlatpak *self,
xb_silo_invalidate (self->silo);
g_rw_lock_reader_unlock (&self->silo_lock);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -2782,13 +2782,13 @@ gs_flatpak_file_to_app_bundle (GsFlatpak *self,
/* load metadata */
app = gs_flatpak_create_app (self, origin, FLATPAK_REF (xref_bundle));
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
if (gs_flatpak_app_get_ref_name (app) == NULL)
gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref_bundle));
return g_steal_pointer (&app);
}
gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_BUNDLE);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
gs_app_set_size_installed (app, flatpak_bundle_ref_get_installed_size (xref_bundle));
gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref_bundle));
metadata = flatpak_bundle_ref_get_metadata (xref_bundle);
@@ -2927,14 +2927,14 @@ gs_flatpak_file_to_app_ref (GsFlatpak *self,
/* load metadata */
app = gs_flatpak_create_app (self, NULL /* origin */, FLATPAK_REF (xref));
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
if (gs_flatpak_app_get_ref_name (app) == NULL)
gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref));
return g_steal_pointer (&app);
}
gs_app_add_quirk (app, GS_APP_QUIRK_HAS_SOURCE);
gs_flatpak_app_set_file_kind (app, GS_FLATPAK_APP_FILE_KIND_REF);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
gs_flatpak_set_metadata (self, app, FLATPAK_REF (xref));
/* use the data from the flatpakref file as a fallback */
@@ -2999,7 +2999,7 @@ gs_flatpak_file_to_app_ref (GsFlatpak *self,
/* the new runtime is available from the RuntimeRepo */
runtime = gs_app_get_runtime (app);
- if (runtime != NULL && gs_app_get_state (runtime) == AS_APP_STATE_UNKNOWN) {
+ if (runtime != NULL && gs_app_get_state (runtime) == GS_APP_STATE_UNKNOWN) {
g_autofree gchar *uri = NULL;
uri = g_key_file_get_string (kf, "Flatpak Ref", "RuntimeRepo", NULL);
gs_flatpak_app_set_runtime_url (runtime, uri);
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 77552e00..fd862b80 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -754,7 +754,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
}
/* run transaction */
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
gs_flatpak_error_convert (error);
gs_app_set_state_recover (app);
@@ -804,7 +804,7 @@ gs_plugin_app_install (GsPlugin *plugin,
/* queue for install if installation needs the network */
if (!app_has_local_source (app) &&
!gs_plugin_get_network_available (plugin)) {
- gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+ gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
return TRUE;
}
@@ -909,7 +909,7 @@ gs_plugin_app_install (GsPlugin *plugin,
}
/* run transaction */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
gs_flatpak_error_convert (error);
gs_app_set_state_recover (app);
@@ -985,7 +985,7 @@ gs_plugin_flatpak_update (GsPlugin *plugin,
/* run transaction */
for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
GsApp *app = gs_app_list_index (list_tmp, i);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
/* If all apps' update are previously downloaded and available locally,
* FlatpakTransaction should run with no-pull flag. This is the case
@@ -1199,7 +1199,7 @@ gs_plugin_flatpak_file_to_app_ref (GsPlugin *plugin,
} else {
/* the new runtime is available from the RuntimeRepo */
if (gs_flatpak_app_get_runtime_url (runtime) != NULL)
- gs_app_set_state (runtime, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (runtime, GS_APP_STATE_AVAILABLE_LOCAL);
}
}
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 1f50e4ca..f07dc65f 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -140,7 +140,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
g_assert_no_error (error);
g_assert_true (app != NULL);
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_SOURCE);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app), ==, "example");
g_assert_cmpstr (gs_app_get_management_plugin (app), ==, "flatpak");
g_assert_cmpstr (gs_app_get_origin_hostname (app), ==, "localhost");
@@ -161,7 +161,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
/* check config file was updated */
root = g_getenv ("GS_SELF_TEST_FLATPAK_DATADIR");
@@ -189,7 +189,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (app2 != NULL);
- g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
/* remove it */
g_object_unref (plugin_job);
@@ -200,7 +200,7 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpint (gs_app_get_progress (app), ==, GS_APP_PROGRESS_UNKNOWN);
}
@@ -280,7 +280,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
"app", app_source,
@@ -289,7 +289,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* check remote was set up */
ret = g_key_file_load_from_file (kf2, config_fn, G_KEY_FILE_NONE, &error);
@@ -350,7 +350,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpint ((gint64) gs_app_get_kudos (app), ==,
GS_APP_KUDO_MY_LANGUAGE |
GS_APP_KUDO_HAS_KEYWORDS |
@@ -367,7 +367,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
runtime = gs_app_get_runtime (app);
g_assert_true (runtime != NULL);
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/test/runtime/org.test.Runtime/master");
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* install, also installing runtime */
g_object_unref (plugin_job);
@@ -378,11 +378,11 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
g_assert_true (gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN ||
gs_app_get_progress (app) == 100);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
/* check the application exists in the right places */
metadata_fn = g_build_filename (root,
@@ -430,8 +430,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
@@ -454,7 +454,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
g_assert_true (seen_unknown);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
g_assert_true (gs_app_get_progress (app) == GS_APP_PROGRESS_UNKNOWN ||
gs_app_get_progress (app) == 100);
@@ -468,8 +468,8 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
g_assert_true (!g_file_test (metadata_fn, G_FILE_TEST_IS_REGULAR));
g_assert_true (!g_file_test (desktop_fn, G_FILE_TEST_IS_REGULAR));
@@ -482,7 +482,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_FAILED);
g_assert_true (!ret);
g_clear_error (&error);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* remove the runtime */
g_object_unref (plugin_job);
@@ -493,7 +493,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* remove the remote */
g_object_unref (plugin_job);
@@ -504,7 +504,7 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
}
static void
@@ -544,7 +544,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
"app", app_source,
@@ -553,7 +553,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* refresh the appstream metadata */
g_object_unref (plugin_job);
@@ -579,7 +579,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
g_assert_cmpint (gs_app_list_length (list), ==, 1);
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
/* install, also installing runtime */
g_object_unref (plugin_job);
@@ -590,7 +590,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_NOT_SUPPORTED);
g_assert_true (!ret);
g_clear_error (&error);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpint (gs_app_get_progress (app), ==, GS_APP_PROGRESS_UNKNOWN);
/* remove the remote */
@@ -602,7 +602,7 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
}
static void
@@ -618,9 +618,9 @@ update_app_progress_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data
static void
update_app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
{
- AsAppState state = gs_app_get_state (app);
- g_debug ("state now %s", as_app_state_to_string (state));
- if (state == AS_APP_STATE_INSTALLING) {
+ GsAppState state = gs_app_get_state (app);
+ g_debug ("state now %s", gs_app_state_to_string (state));
+ if (state == GS_APP_STATE_INSTALLING) {
gboolean *tmp = (gboolean *) user_data;
*tmp = TRUE;
}
@@ -701,7 +701,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
g_assert_no_error (error);
g_assert_true (app != NULL);
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
"user/flatpak/*/desktop/org.test.Chiron/master"));
@@ -710,7 +710,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
/* get runtime */
runtime = gs_app_get_runtime (app);
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/*/runtime/org.test.Runtime/master");
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE_LOCAL);
/* check the number of sources */
g_object_unref (plugin_job);
@@ -732,8 +732,8 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
loop);
g_main_loop_run (loop);
gs_test_flush_main_context ();
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
/* check the number of sources */
g_object_unref (plugin_job);
@@ -752,7 +752,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
/* remove the runtime */
g_object_unref (plugin_job);
@@ -763,7 +763,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* remove the remote */
app_source = gs_app_list_index (sources2, 0);
@@ -777,7 +777,7 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
}
/* same as gs_plugins_flatpak_runtime_repo_func, but this time manually
@@ -826,7 +826,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
g_assert_no_error (error);
g_assert_true (app_src != NULL);
g_assert_cmpint (gs_app_get_kind (app_src), ==, AS_APP_KIND_SOURCE);
- g_assert_cmpint (gs_app_get_state (app_src), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app_src), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app_src), ==, "test");
g_assert_cmpstr (gs_app_get_unique_id (app_src), ==, "*/*/*/source/test/master");
g_assert_true (gs_app_get_local_file (app_src) != NULL);
@@ -840,7 +840,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_src), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_src), ==, GS_APP_STATE_INSTALLED);
/* write a flatpakref file */
fn_repourl = g_file_get_uri (file_repo);
@@ -864,7 +864,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
g_assert_no_error (error);
g_assert_true (app != NULL);
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
"user/flatpak/*/desktop/org.test.Chiron/master"));
@@ -873,7 +873,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
/* get runtime */
runtime = gs_app_get_runtime (app);
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/test/runtime/org.test.Runtime/master");
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* check the number of sources */
g_object_unref (plugin_job);
@@ -894,8 +894,8 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
/* check the number of sources */
g_object_unref (plugin_job);
@@ -913,7 +913,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
/* remove the runtime */
g_object_unref (plugin_job);
@@ -924,7 +924,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* remove the remote */
app_source = gs_app_list_index (sources2, 0);
@@ -938,7 +938,7 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
}
static void
@@ -973,7 +973,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
return;
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
gs_flatpak_app_set_repo_url (app_source, "file:///wont/work");
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
"app", app_source,
@@ -981,7 +981,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* write a flatpakrepo file (the flatpakref below must have a RuntimeRepo=
* to avoid a warning) */
@@ -1009,7 +1009,7 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
g_assert_no_error (error);
g_assert_true (app != NULL);
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
#if FLATPAK_CHECK_VERSION(1,1,2)
g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app),
@@ -1073,7 +1073,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
testdir_repourl = g_strdup_printf ("file://%s/repo", testdir);
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
"app", app_source,
@@ -1081,7 +1081,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* refresh the appstream metadata */
g_object_unref (plugin_job);
@@ -1107,7 +1107,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
runtime = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (runtime), ==, "org.test.Runtime");
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/test/runtime/org.test.Runtime/master");
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* install the runtime ahead of time */
g_object_unref (plugin_job);
@@ -1117,7 +1117,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
if (is_bundle) {
/* find the flatpak bundle file */
@@ -1165,7 +1165,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
g_assert_no_error (error);
g_assert_true (app != NULL);
g_assert_cmpint (gs_app_get_kind (app), ==, AS_APP_KIND_DESKTOP);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE_LOCAL);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE_LOCAL);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
g_assert_cmpstr (gs_app_get_name (app), ==, "Chiron");
g_assert_cmpstr (gs_app_get_summary (app), ==, "Single line synopsis");
@@ -1194,7 +1194,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
/* get runtime */
runtime = gs_app_get_runtime (app);
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/test/runtime/org.test.Runtime/master");
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_INSTALLED);
/* install */
g_object_unref (plugin_job);
@@ -1204,7 +1204,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1233,7 +1233,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
app2 = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (app2 != NULL);
- g_assert_cmpint (gs_app_get_state (app2), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app2), ==, GS_APP_STATE_INSTALLED);
if (is_bundle) {
#if FLATPAK_CHECK_VERSION(1,1,2)
g_assert_true (as_utils_unique_id_equal (gs_app_get_unique_id (app2),
@@ -1282,7 +1282,7 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
g_autoptr(GsApp) runtime_source = gs_flatpak_app_new ("test-1");
gs_app_set_kind (runtime_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (runtime_source, "flatpak");
- gs_app_set_state (runtime_source, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (runtime_source, GS_APP_STATE_INSTALLED);
g_object_unref (plugin_job);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
"app", runtime_source,
@@ -1390,7 +1390,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
app_source = gs_flatpak_app_new ("test");
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
repo_url = g_strdup_printf ("file://%s", repo_path);
gs_flatpak_app_set_repo_url (app_source, repo_url);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
@@ -1400,7 +1400,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* refresh the appstream metadata */
g_object_unref (plugin_job);
@@ -1428,7 +1428,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
g_assert_cmpint (gs_app_list_length (list), ==, 1);
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
/* install, also installing runtime */
g_object_unref (plugin_job);
@@ -1439,7 +1439,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1478,7 +1478,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
/* check they are the same GObject */
app_tmp = gs_app_list_lookup (list_updates, "*/flatpak/test/*/org.test.Chiron/*");
g_assert_true (app_tmp == app);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
g_assert_cmpstr (gs_app_get_update_details (app), ==, "Version 1.2.4:\nThis is best.\n\nVersion
1.2.3:\nThis is better.");
g_assert_cmpstr (gs_app_get_update_version (app), ==, "1.2.4");
@@ -1516,7 +1516,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
loop);
g_main_loop_run (loop);
gs_test_flush_main_context ();
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.4");
g_assert_cmpstr (gs_app_get_update_version (app), ==, NULL);
g_assert_cmpstr (gs_app_get_update_details (app), ==, NULL);
@@ -1533,7 +1533,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
g_assert_cmpstr (gs_app_get_unique_id (runtime), ==,
"user/flatpak/test/runtime/org.test.Runtime/new_master");
g_assert_true (old_runtime != runtime);
g_assert_cmpstr (gs_app_get_branch (runtime), ==, "new_master");
- g_assert_true (gs_app_get_state (runtime) == AS_APP_STATE_INSTALLED);
+ g_assert_true (gs_app_get_state (runtime) == GS_APP_STATE_INSTALLED);
/* no longer care */
g_signal_handler_disconnect (plugin_loader, pending_apps_changed_id);
@@ -1581,7 +1581,7 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
}
static void
@@ -1640,7 +1640,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
app_source = gs_flatpak_app_new ("test");
gs_app_set_kind (app_source, AS_APP_KIND_SOURCE);
gs_app_set_management_plugin (app_source, "flatpak");
- gs_app_set_state (app_source, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
repo_url = g_strdup_printf ("file://%s", repo_path);
gs_flatpak_app_set_repo_url (app_source, repo_url);
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL,
@@ -1650,7 +1650,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_INSTALLED);
/* refresh the appstream metadata */
g_object_unref (plugin_job);
@@ -1677,7 +1677,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
g_assert_cmpint (gs_app_list_length (list), ==, 1);
app = gs_app_list_index (list, 0);
g_assert_cmpstr (gs_app_get_id (app), ==, "org.test.Chiron");
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
/* install, also installing runtime and suggested extensions */
g_object_unref (plugin_job);
@@ -1688,14 +1688,14 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
/* check if the extension was installed */
extension = gs_plugin_loader_app_create (plugin_loader,
"user/flatpak/*/runtime/org.test.Chiron.Extension/master");
g_assert_nonnull (extension);
- g_assert_cmpint (gs_app_get_state (extension), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (extension), ==, GS_APP_STATE_INSTALLED);
/* switch to the new repo (to get the update) */
g_assert_cmpint (unlink (repo_path), ==, 0);
@@ -1734,7 +1734,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
/* check that the app has an update (it's affected by the extension's update) */
app_tmp = gs_app_list_lookup (list_updates, "*/flatpak/test/*/org.test.Chiron/*");
g_assert_true (app_tmp == app);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UPDATABLE_LIVE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UPDATABLE_LIVE);
/* care about signals */
pending_apps_changed_id =
@@ -1769,16 +1769,16 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
/* Older flatpak versions don't have the API we use to propagate state
* between extension and app
*/
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
#else
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
#endif
g_assert_cmpstr (gs_app_get_version (app), ==, "1.2.3");
g_assert_true (got_progress_installing);
g_assert_cmpint (pending_app_changed_cnt, ==, 0);
/* check the extension's state after the update */
- g_assert_cmpint (gs_app_get_state (extension), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (extension), ==, GS_APP_STATE_INSTALLED);
/* no longer care */
g_signal_handler_disconnect (plugin_loader, pending_apps_changed_id);
@@ -1807,7 +1807,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (runtime), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (runtime), ==, GS_APP_STATE_AVAILABLE);
/* remove the remote */
g_object_unref (plugin_job);
@@ -1818,7 +1818,7 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert_true (ret);
- g_assert_cmpint (gs_app_get_state (app_source), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app_source), ==, GS_APP_STATE_AVAILABLE);
/* verify that the extension has been removed by the app's removal */
g_assert_false (gs_app_is_installed (extension));
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index df6505b0..670f580b 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -60,7 +60,7 @@ gs_fwupd_app_set_from_device (GsApp *app, FwupdDevice *dev)
/* something can be done */
if (fwupd_device_has_flag (dev, FWUPD_DEVICE_FLAG_UPDATABLE))
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
/* only can be applied in systemd-offline */
if (fwupd_device_has_flag (dev, FWUPD_DEVICE_FLAG_ONLY_OFFLINE))
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index fe3f689c..3b2fc387 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -182,7 +182,7 @@ gs_plugin_fwupd_notify_status_cb (GObject *object,
case FWUPD_STATUS_DEVICE_RESTART:
case FWUPD_STATUS_DEVICE_WRITE:
case FWUPD_STATUS_DEVICE_VERIFY:
- gs_app_set_state (priv->app_current, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (priv->app_current, GS_APP_STATE_INSTALLING);
break;
case FWUPD_STATUS_IDLE:
g_clear_object (&priv->app_current);
@@ -346,7 +346,7 @@ gs_plugin_fwupd_new_app_from_device_raw (GsPlugin *plugin, FwupdDevice *device)
app = gs_app_new (id);
gs_app_set_kind (app, AS_APP_KIND_FIRMWARE);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
gs_app_set_version (app, fwupd_device_get_version (device));
@@ -387,7 +387,7 @@ gs_plugin_fwupd_new_app (GsPlugin *plugin, FwupdDevice *dev, GError **error)
/* update unsupported */
app = gs_plugin_fwupd_new_app_from_device (plugin, dev);
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE) {
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE) {
g_set_error (error,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
@@ -837,7 +837,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
const gchar *uri = gs_fwupd_app_get_update_uri (app);
#if FWUPD_CHECK_VERSION(1,5,2)
g_autoptr(GFile) file = g_file_new_for_path (filename);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!fwupd_client_download_file (priv->client,
uri, file,
FWUPD_CLIENT_DOWNLOAD_FLAG_NONE,
@@ -847,7 +847,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
return FALSE;
}
#else
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!gs_plugin_download_file (plugin, app, uri, filename,
cancellable, error))
return FALSE;
@@ -867,7 +867,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
if (gs_app_get_metadata_item (app, "fwupd::OnlyOffline") != NULL)
install_flags |= FWUPD_INSTALL_FLAG_OFFLINE;
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!fwupd_client_install (priv->client, device_id,
filename, install_flags,
cancellable, error)) {
@@ -877,7 +877,7 @@ gs_plugin_fwupd_install (GsPlugin *plugin,
}
/* delete the file from the cache */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
if (downloaded_to_cache) {
if (!g_file_delete (local_file, cancellable, error))
return FALSE;
@@ -935,7 +935,7 @@ gs_plugin_fwupd_modify_source (GsPlugin *plugin, GsApp *app, gboolean enabled,
return FALSE;
}
gs_app_set_state (app, enabled ?
- AS_APP_STATE_INSTALLING : AS_APP_STATE_REMOVING);
+ GS_APP_STATE_INSTALLING : GS_APP_STATE_REMOVING);
if (!fwupd_client_modify_remote (priv->client,
remote_id,
"Enabled",
@@ -946,7 +946,7 @@ gs_plugin_fwupd_modify_source (GsPlugin *plugin, GsApp *app, gboolean enabled,
return FALSE;
}
gs_app_set_state (app, enabled ?
- AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+ GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -1164,7 +1164,7 @@ gs_plugin_add_sources (GsPlugin *plugin,
gs_app_set_kind (app, AS_APP_KIND_SOURCE);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
gs_app_set_state (app, fwupd_remote_get_enabled (remote) ?
- AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+ GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
fwupd_remote_get_title (remote));
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index ca5fcb8a..ffd30849 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -54,7 +54,7 @@ gs_plugins_fwupd_func (GsPluginLoader *plugin_loader)
"Latest firmware release.");
/* seems wrong, but this is only set if the update is available */
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_UNKNOWN);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
}
int
diff --git a/plugins/packagekit/gs-plugin-packagekit-history.c
b/plugins/packagekit/gs-plugin-packagekit-history.c
index 61753166..3a8e32cb 100644
--- a/plugins/packagekit/gs-plugin-packagekit-history.c
+++ b/plugins/packagekit/gs-plugin-packagekit-history.c
@@ -64,13 +64,13 @@ gs_plugin_packagekit_refine_add_history (GsApp *app, GVariant *dict)
g_assert (ret);
switch (info_enum) {
case PK_INFO_ENUM_INSTALLING:
- gs_app_set_state (history, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (history, GS_APP_STATE_INSTALLED);
break;
case PK_INFO_ENUM_REMOVING:
- gs_app_set_state (history, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (history, GS_APP_STATE_AVAILABLE);
break;
case PK_INFO_ENUM_UPDATING:
- gs_app_set_state (history, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (history, GS_APP_STATE_UPDATABLE);
break;
default:
g_debug ("ignoring history kind: %s",
@@ -194,7 +194,7 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
if (!ret) {
/* make up a fake entry as we know this package was at
* least installed at some point in time */
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
g_autoptr(GsApp) app_dummy = NULL;
app_dummy = gs_app_new (gs_app_get_id (app));
gs_plugin_packagekit_set_packaging_format (plugin, app);
@@ -202,7 +202,7 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
gs_plugin_get_name (plugin));
gs_app_set_install_date (app_dummy, GS_APP_INSTALL_DATE_UNKNOWN);
gs_app_set_kind (app_dummy, AS_APP_KIND_GENERIC);
- gs_app_set_state (app_dummy, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app_dummy, GS_APP_STATE_INSTALLED);
gs_app_set_version (app_dummy, gs_app_get_version (app));
gs_app_add_history (app, app_dummy);
}
diff --git a/plugins/packagekit/gs-plugin-packagekit-local.c b/plugins/packagekit/gs-plugin-packagekit-local.c
index 53b51acf..dec1c89a 100644
--- a/plugins/packagekit/gs-plugin-packagekit-local.c
+++ b/plugins/packagekit/gs-plugin-packagekit-local.c
@@ -141,8 +141,8 @@ gs_plugin_packagekit_local_check_installed (GsPlugin *plugin,
return FALSE;
packages = pk_results_get_package_array (results);
if (packages->len > 0) {
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
for (guint i = 0; i < packages->len; i++){
PkPackage *pkg = g_ptr_array_index (packages, i);
gs_app_add_source_id (app, pk_package_get_id (pkg));
@@ -235,7 +235,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
gs_app_set_management_plugin (app, "packagekit");
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
pk_details_get_summary (item));
diff --git a/plugins/packagekit/gs-plugin-packagekit-offline.c
b/plugins/packagekit/gs-plugin-packagekit-offline.c
index 7e157203..b9fda86d 100644
--- a/plugins/packagekit/gs-plugin-packagekit-offline.c
+++ b/plugins/packagekit/gs-plugin-packagekit-offline.c
@@ -142,7 +142,7 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
gs_app_set_from_unique_id (app, "*/*/*/*/system/*");
gs_app_set_management_plugin (app, "packagekit");
gs_app_add_quirk (app, GS_APP_QUIRK_IS_WILDCARD);
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_install_date (app, mtime);
@@ -169,7 +169,7 @@ gs_plugin_add_updates_historical (GsPlugin *plugin,
gs_app_set_update_version (app, split[1]);
gs_app_set_management_plugin (app, "packagekit");
gs_app_add_source_id (app, package_id);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_install_date (app, mtime);
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine.c
b/plugins/packagekit/gs-plugin-packagekit-refine.c
index 68f7eb64..5e09c5d0 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine.c
@@ -179,7 +179,7 @@ gs_plugin_packagekit_resolve_packages (GsPlugin *plugin,
resolve2_list = gs_app_list_new ();
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
gs_app_list_add (resolve2_list, app);
}
filter = pk_bitfield_from_enums (PK_FILTER_ENUM_NEWEST,
@@ -617,7 +617,7 @@ gs_plugin_packagekit_refine_distro_upgrade (GsPlugin *plugin,
/* add each of these as related applications */
for (i = 0; i < gs_app_list_length (list); i++) {
app2 = gs_app_list_index (list, i);
- if (gs_app_get_state (app2) != AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (app2) != GS_APP_STATE_UNAVAILABLE)
continue;
gs_app_add_related (app, app2);
}
@@ -655,7 +655,7 @@ gs_plugin_packagekit_refine_name_to_id (GsPlugin *plugin,
tmp = g_ptr_array_index (sources, 0);
if (!gs_plugin_packagekit_refine_valid_package_name (tmp))
continue;
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN ||
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN ||
gs_plugin_refine_requires_package_id (app, flags) ||
gs_plugin_refine_requires_origin (app, flags) ||
gs_plugin_refine_requires_version (app, flags)) {
@@ -740,7 +740,7 @@ gs_plugin_packagekit_refine_update_details (GsPlugin *plugin,
const gchar *tmp;
if (gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD))
continue;
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
continue;
if (gs_app_get_source_id_default (app) == NULL)
continue;
@@ -769,7 +769,7 @@ gs_plugin_refine (GsPlugin *plugin,
{
/* when we need the cannot-be-upgraded applications, we implement this
* by doing a UpgradeSystem(SIMULATE) which adds the removed packages
- * to the related-apps list with a state of %AS_APP_STATE_UNAVAILABLE */
+ * to the related-apps list with a state of %GS_APP_STATE_UNAVAILABLE */
if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPGRADE_REMOVED) {
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
diff --git a/plugins/packagekit/gs-plugin-packagekit-upgrade.c
b/plugins/packagekit/gs-plugin-packagekit-upgrade.c
index 6442dd71..012f7d4a 100644
--- a/plugins/packagekit/gs-plugin-packagekit-upgrade.c
+++ b/plugins/packagekit/gs-plugin-packagekit-upgrade.c
@@ -67,7 +67,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
return TRUE;
/* ask PK to download enough packages to upgrade the system */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
gs_packagekit_helper_set_progress_app (helper, app);
g_mutex_lock (&priv->task_mutex);
results = pk_task_upgrade_system_sync (priv->task,
@@ -83,6 +83,6 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
return TRUE;
}
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 813e38b2..7f158ed2 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -155,7 +155,7 @@ gs_plugin_add_sources (GsPlugin *plugin,
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
gs_app_set_state (app, pk_repo_detail_get_enabled (rd) ?
- AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+ GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
gs_app_set_name (app,
GS_APP_QUALITY_LOWEST,
pk_repo_detail_get_description (rd));
@@ -217,7 +217,7 @@ gs_plugin_app_origin_repo_enable (GsPlugin *plugin,
/* now that the repo is enabled, the app (not the repo!) moves from
* UNAVAILABLE state to AVAILABLE */
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -235,7 +235,7 @@ gs_plugin_repo_enable (GsPlugin *plugin,
/* do sync call */
gs_plugin_status_update (plugin, app, GS_PLUGIN_STATUS_WAITING);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
gs_packagekit_helper_add_app (helper, app);
g_mutex_lock (&priv->task_mutex);
results = pk_client_repo_enable (PK_CLIENT (priv->task),
@@ -258,7 +258,7 @@ gs_plugin_repo_enable (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
return TRUE;
}
@@ -291,11 +291,11 @@ gs_plugin_app_install (GsPlugin *plugin,
/* queue for install if installation needs the network */
if (!gs_plugin_get_network_available (plugin)) {
- gs_app_set_state (app, AS_APP_STATE_QUEUED_FOR_INSTALL);
+ gs_app_set_state (app, GS_APP_STATE_QUEUED_FOR_INSTALL);
return TRUE;
}
- if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
/* get everything up front we need */
source_ids = gs_app_get_source_ids (app);
if (source_ids->len == 0) {
@@ -312,7 +312,7 @@ gs_plugin_app_install (GsPlugin *plugin,
if (!gs_plugin_app_origin_repo_enable (plugin, app, cancellable, error))
return FALSE;
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
/* FIXME: this is a hack, to allow PK time to re-initialize
* everything in order to match an actual result. The root cause
@@ -334,7 +334,7 @@ gs_plugin_app_install (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
/* if we remove the app again later, we should be able to
* cancel the installation if we'd never installed it */
@@ -347,8 +347,8 @@ gs_plugin_app_install (GsPlugin *plugin,
/* get the list of available package ids to install */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_UPDATABLE:
source_ids = gs_app_get_source_ids (app);
if (source_ids->len == 0) {
g_set_error_literal (error,
@@ -390,12 +390,12 @@ gs_plugin_app_install (GsPlugin *plugin,
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
addons = gs_app_get_addons (app);
for (i = 0; i < gs_app_list_length (addons); i++) {
GsApp *addon = gs_app_list_index (addons, i);
if (gs_app_get_to_be_installed (addon))
- gs_app_set_state (addon, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (addon, GS_APP_STATE_INSTALLING);
}
gs_packagekit_helper_add_app (helper, app);
g_mutex_lock (&priv->task_mutex);
@@ -411,10 +411,10 @@ gs_plugin_app_install (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
break;
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
if (gs_app_get_local_file (app) == NULL) {
g_set_error_literal (error,
GS_PLUGIN_ERROR,
@@ -425,7 +425,7 @@ gs_plugin_app_install (GsPlugin *plugin,
local_filename = g_file_get_path (gs_app_get_local_file (app));
package_ids = g_strsplit (local_filename, "\t", -1);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
gs_packagekit_helper_add_app (helper, app);
g_mutex_lock (&priv->task_mutex);
results = pk_task_install_files_sync (priv->task,
@@ -440,7 +440,7 @@ gs_plugin_app_install (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
/* get the new icon from the package */
gs_app_set_local_file (app, NULL);
@@ -452,7 +452,7 @@ gs_plugin_app_install (GsPlugin *plugin,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
"do not know how to install app in state %s",
- as_app_state_to_string (gs_app_get_state (app)));
+ gs_app_state_to_string (gs_app_get_state (app)));
return FALSE;
}
@@ -475,7 +475,7 @@ gs_plugin_repo_disable (GsPlugin *plugin,
/* do sync call */
gs_plugin_status_update (plugin, app, GS_PLUGIN_STATUS_WAITING);
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
gs_packagekit_helper_add_app (helper, app);
g_mutex_lock (&priv->task_mutex);
results = pk_client_repo_enable (PK_CLIENT (priv->task),
@@ -498,7 +498,7 @@ gs_plugin_repo_disable (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -552,7 +552,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
}
/* do the action */
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
gs_packagekit_helper_add_app (helper, app);
g_mutex_lock (&priv->task_mutex);
results = pk_task_remove_packages_sync (priv->task,
@@ -568,7 +568,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
}
/* state is not known: we don't know if we can re-install this app */
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
/* no longer valid */
gs_app_clear_source_ids (app);
@@ -597,7 +597,7 @@ gs_plugin_packagekit_build_update_app (GsPlugin *plugin, PkPackage *package)
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
gs_plugin_cache_add (plugin, pk_package_get_id (package), app);
return app;
}
diff --git a/plugins/packagekit/gs-plugin-systemd-updates.c b/plugins/packagekit/gs-plugin-systemd-updates.c
index ea8ff1a9..02dbdf23 100644
--- a/plugins/packagekit/gs-plugin-systemd-updates.c
+++ b/plugins/packagekit/gs-plugin-systemd-updates.c
@@ -235,7 +235,7 @@ _systemd_trigger_app (GsPlugin *plugin,
GsPluginData *priv = gs_plugin_get_data (plugin);
/* if we can process this online do not require a trigger */
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
return TRUE;
/* only process this app if was created by this plugin */
diff --git a/plugins/packagekit/packagekit-common.c b/plugins/packagekit/packagekit-common.c
index db86bd84..d55a610c 100644
--- a/plugins/packagekit/packagekit-common.c
+++ b/plugins/packagekit/packagekit-common.c
@@ -260,10 +260,10 @@ gs_plugin_packagekit_add_results (GsPlugin *plugin,
gs_app_set_version (app, pk_package_get_version (package));
switch (pk_package_get_info (package)) {
case PK_INFO_ENUM_INSTALLED:
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
break;
case PK_INFO_ENUM_AVAILABLE:
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
break;
case PK_INFO_ENUM_INSTALLING:
case PK_INFO_ENUM_UPDATING:
@@ -273,10 +273,10 @@ gs_plugin_packagekit_add_results (GsPlugin *plugin,
break;
case PK_INFO_ENUM_UNAVAILABLE:
case PK_INFO_ENUM_REMOVING:
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
break;
default:
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
g_warning ("unknown info state of %s",
pk_info_enum_to_string (pk_package_get_info (package)));
}
@@ -330,23 +330,23 @@ gs_plugin_packagekit_resolve_packages_app (GsPlugin *plugin,
/* if *all* the source packages for the app are installed then the
* application is considered completely installed */
if (number_installed == sources->len && number_available == 0) {
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
} else if (number_installed + number_available == sources->len) {
/* if all the source packages are installed and all the rest
* of the packages are available then the app is available */
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
} else if (number_installed + number_available > sources->len) {
/* we have more packages returned than source packages */
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
} else if (number_installed + number_available < sources->len) {
g_autofree gchar *tmp = NULL;
/* we have less packages returned than source packages */
tmp = gs_app_to_string (app);
g_debug ("Failed to find all packages for:\n%s", tmp);
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
}
}
@@ -372,7 +372,7 @@ gs_plugin_packagekit_set_metadata_from_package (GsPlugin *plugin,
/* set unavailable state */
if (pk_package_get_info (package) == PK_INFO_ENUM_UNAVAILABLE) {
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
if (gs_app_get_size_installed (app) == 0)
gs_app_set_size_installed (app, GS_APP_SIZE_UNKNOWABLE);
if (gs_app_get_size_download (app) == 0)
@@ -512,7 +512,7 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
}
/* the size is the size of all sources */
- if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE) {
if (size > 0 && gs_app_get_size_installed (app) == 0)
gs_app_set_size_installed (app, size);
if (size > 0 && gs_app_get_size_download (app) == 0)
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index e7bde90e..38c3d990 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -296,10 +296,10 @@ on_transaction_progress (GDBusProxy *proxy,
GsPluginStatus plugin_status;
switch (gs_app_get_state (tp->app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
plugin_status = GS_PLUGIN_STATUS_INSTALLING;
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
plugin_status = GS_PLUGIN_STATUS_REMOVING;
break;
default:
@@ -462,7 +462,7 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant)
gs_app_add_source (app, name);
gs_app_set_version (app, old_evr);
gs_app_set_update_version (app, new_evr);
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
g_debug ("!%s\n", old_nevra);
g_debug ("=%s\n", new_nevra);
@@ -501,14 +501,14 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit
/* addition */
gs_app_add_source (app, name);
gs_app_set_version (app, evr);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
g_debug ("+%s\n", nevra);
} else {
/* removal */
gs_app_add_source (app, name);
gs_app_set_version (app, evr);
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
g_debug ("-%s\n", nevra);
}
@@ -924,7 +924,7 @@ trigger_rpmostree_update (GsPlugin *plugin,
g_autoptr(TransactionProgress) tp = transaction_progress_new ();
/* if we can process this online do not require a trigger */
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
return TRUE;
/* only process this app if was created by this plugin */
@@ -1074,9 +1074,9 @@ gs_plugin_repo_enable (GsPlugin *plugin,
g_autoptr(TransactionProgress) tp = NULL;
if (enable)
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
else
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
options_builder = g_variant_builder_new (G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (options_builder, "{ss}", "enabled", enable ? "1" : "0");
@@ -1108,9 +1108,9 @@ gs_plugin_repo_enable (GsPlugin *plugin,
/* state is known */
if (enable)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
else
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -1137,7 +1137,7 @@ gs_plugin_app_install (GsPlugin *plugin,
return gs_plugin_repo_enable (plugin, app, TRUE, cancellable, error);
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
if (gs_app_get_source_default (app) == NULL) {
g_set_error_literal (error,
GS_PLUGIN_ERROR,
@@ -1148,7 +1148,7 @@ gs_plugin_app_install (GsPlugin *plugin,
install_package = gs_app_get_source_default (app);
break;
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
if (gs_app_get_local_file (app) == NULL) {
g_set_error_literal (error,
GS_PLUGIN_ERROR,
@@ -1164,11 +1164,11 @@ gs_plugin_app_install (GsPlugin *plugin,
GS_PLUGIN_ERROR,
GS_PLUGIN_ERROR_NOT_SUPPORTED,
"do not know how to install app in state %s",
- as_app_state_to_string (gs_app_get_state (app)));
+ gs_app_state_to_string (gs_app_get_state (app)));
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
tp->app = g_object_ref (app);
options = make_rpmostree_options_variant (FALSE, /* reboot */
@@ -1204,7 +1204,7 @@ gs_plugin_app_install (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
/* get the new icon from the package */
gs_app_set_local_file (app, NULL);
@@ -1236,7 +1236,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
return gs_plugin_repo_enable (plugin, app, FALSE, cancellable, error);
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
tp->app = g_object_ref (app);
options = make_rpmostree_options_variant (FALSE, /* reboot */
@@ -1272,7 +1272,7 @@ gs_plugin_app_remove (GsPlugin *plugin,
}
/* state is not known: we don't know if we can re-install this app */
- gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN);
return TRUE;
}
@@ -1320,8 +1320,8 @@ resolve_installed_packages_app (GsPlugin *plugin,
RpmOstreePackage *pkg = g_ptr_array_index (pkglist, i);
if (g_strcmp0 (rpm_ostree_package_get_name (pkg), gs_app_get_source_default (app)) == 0) {
gs_app_set_version (app, rpm_ostree_package_get_evr (pkg));
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
if (g_strv_contains ((const gchar * const *) layered_packages,
rpm_ostree_package_get_name (pkg)) ||
g_strv_contains ((const gchar * const *) layered_local_packages,
@@ -1351,8 +1351,8 @@ resolve_available_packages_app (GsPlugin *plugin,
pkg = find_package_by_name (sack, gs_app_get_source_default (app));
if (pkg != NULL) {
gs_app_set_version (app, dnf_package_get_evr (pkg));
- if (gs_app_get_state (app) == AS_APP_STATE_UNKNOWN)
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
/* anything not part of the base system can be removed */
gs_app_remove_quirk (app, GS_APP_QUIRK_COMPULSORY);
@@ -1560,7 +1560,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
FALSE, /* dry-run */
FALSE); /* no-overrides */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
tp->app = g_object_ref (app);
if (!gs_rpmostree_os_call_rebase_sync (priv->os_proxy,
@@ -1595,7 +1595,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin,
}
/* state is known */
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE);
return TRUE;
}
@@ -1697,7 +1697,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE);
gs_app_set_scope (app, AS_APP_SCOPE_SYSTEM);
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE_LOCAL);
/* add default source */
name = headerGetString (h, RPMTAG_NAME);
@@ -1845,7 +1845,7 @@ gs_plugin_add_sources (GsPlugin *plugin,
gs_app_add_quirk (app, GS_APP_QUIRK_NOT_LAUNCHABLE);
enabled = (dnf_repo_get_enabled (repo) & DNF_REPO_ENABLED_PACKAGES) > 0;
- gs_app_set_state (app, enabled ? AS_APP_STATE_INSTALLED : AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, enabled ? GS_APP_STATE_INSTALLED : GS_APP_STATE_AVAILABLE);
description = dnf_repo_get_description (repo);
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, description);
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index d4831e18..b24ed844 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -974,11 +974,11 @@ refine_app_with_client (GsPlugin *plugin,
if (local_snap != NULL && g_strcmp0 (tracking_channel, channel) == 0) {
/* Do not set to installed state if app is updatable */
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE) {
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE) {
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
}
} else
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
gs_app_add_quirk (app, GS_APP_QUIRK_DO_NOT_AUTO_UPDATE);
/* use store information for basic metadata over local information */
@@ -1151,7 +1151,7 @@ gs_plugin_app_install (GsPlugin *plugin,
name = gs_app_get_metadata_item (app, "snap::name");
channel = gs_app_get_branch (app);
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (g_strcmp0 (gs_app_get_metadata_item (app, "snap::confinement"), "classic") == 0)
flags |= SNAPD_INSTALL_FLAGS_CLASSIC;
@@ -1170,7 +1170,7 @@ gs_plugin_app_install (GsPlugin *plugin,
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
return TRUE;
}
@@ -1274,13 +1274,13 @@ gs_plugin_app_remove (GsPlugin *plugin,
if (client == NULL)
return FALSE;
- gs_app_set_state (app, AS_APP_STATE_REMOVING);
+ gs_app_set_state (app, GS_APP_STATE_REMOVING);
if (!snapd_client_remove2_sync (client, SNAPD_REMOVE_FLAGS_NONE, gs_app_get_metadata_item (app,
"snap::name"), progress_cb, app, cancellable, error)) {
gs_app_set_state_recover (app);
snapd_error_convert (error);
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
return TRUE;
}
@@ -1314,8 +1314,8 @@ gs_plugin_add_updates (GsPlugin *plugin,
/* If for some reason the app is already getting updated, then
* don't change its state */
- if (gs_app_get_state (app) != AS_APP_STATE_INSTALLING)
- gs_app_set_state (app, AS_APP_STATE_UPDATABLE_LIVE);
+ if (gs_app_get_state (app) != GS_APP_STATE_INSTALLING)
+ gs_app_set_state (app, GS_APP_STATE_UPDATABLE_LIVE);
/* Add GsApp to updatable GsAppList */
gs_app_list_add (list, app);
@@ -1342,7 +1342,7 @@ gs_plugin_update (GsPlugin *plugin,
gchar *name = gs_app_get_metadata_item (app, "snap::name");
/* Refresh the snap */
- gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLING);
if (!snapd_client_refresh_sync (client, name, NULL, progress_cb, app, cancellable, error)) {
gs_app_set_state_recover (app);
@@ -1350,7 +1350,7 @@ gs_plugin_update (GsPlugin *plugin,
return FALSE;
}
- gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
}
return TRUE;
diff --git a/plugins/snap/gs-self-test.c b/plugins/snap/gs-self-test.c
index f10de87b..d3aa69e1 100644
--- a/plugins/snap/gs-self-test.c
+++ b/plugins/snap/gs-self-test.c
@@ -279,7 +279,7 @@ gs_plugins_snap_test_func (GsPluginLoader *plugin_loader)
g_assert (apps != NULL);
g_assert_cmpint (gs_app_list_length (apps), ==, 1);
app = gs_app_list_index (apps, 0);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_AVAILABLE);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_AVAILABLE);
g_assert_cmpstr (gs_app_get_name (app), ==, "snap");
g_assert_cmpstr (gs_app_get_version (app), ==, "VERSION");
g_assert_cmpstr (gs_app_get_summary (app), ==, "SUMMARY");
@@ -315,7 +315,7 @@ gs_plugins_snap_test_func (GsPluginLoader *plugin_loader)
gs_test_flush_main_context ();
g_assert_no_error (error);
g_assert (ret);
- g_assert_cmpint (gs_app_get_state (app), ==, AS_APP_STATE_INSTALLED);
+ g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_INSTALLED);
g_assert_cmpint (gs_app_get_size_installed (app), ==, 1000);
g_assert_cmpint (gs_app_get_install_date (app), ==, g_date_time_to_unix (g_date_time_new_utc (2017,
1, 2, 11, 23, 58)));
diff --git a/src/gs-app-addon-row.c b/src/gs-app-addon-row.c
index 30fb4d6f..9763e22a 100644
--- a/src/gs-app-addon-row.c
+++ b/src/gs-app-addon-row.c
@@ -50,7 +50,7 @@ gs_app_addon_row_get_summary (GsAppAddonRow *row)
g_autofree gchar *escaped = NULL;
/* try all these things in order */
- if (gs_app_get_state (row->app) == AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (row->app) == GS_APP_STATE_UNAVAILABLE)
tmp = gs_app_get_summary_missing (row->app);
if (tmp == NULL || (tmp != NULL && tmp[0] == '\0'))
tmp = gs_app_get_summary (row->app);
@@ -78,21 +78,21 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
/* update the state label */
switch (gs_app_get_state (row->app)) {
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (row->label, TRUE);
gtk_label_set_label (GTK_LABEL (row->label), _("Pending"));
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
gtk_widget_set_visible (row->label, TRUE);
gtk_label_set_label (GTK_LABEL (row->label), _("Installed"));
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (row->label, TRUE);
gtk_label_set_label (GTK_LABEL (row->label), _("Installing"));
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_visible (row->label, TRUE);
gtk_label_set_label (GTK_LABEL (row->label), _("Removing"));
break;
@@ -104,25 +104,25 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
/* update the checkbox */
g_signal_handlers_block_by_func (row->checkbox, checkbox_toggled, row);
switch (gs_app_get_state (row->app)) {
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_sensitive (row->checkbox, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
gtk_widget_set_sensitive (row->checkbox, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_INSTALLED:
gtk_widget_set_sensitive (row->checkbox, TRUE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_sensitive (row->checkbox, FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_sensitive (row->checkbox, FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
break;
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 15cfe0bc..b523f1be 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -87,7 +87,7 @@ gs_app_row_get_description (GsAppRow *app_row)
/* if missing summary is set, return it without escaping in order to
* correctly show hyperlinks */
- if (gs_app_get_state (priv->app) == AS_APP_STATE_UNAVAILABLE) {
+ if (gs_app_get_state (priv->app) == GS_APP_STATE_UNAVAILABLE) {
tmp = gs_app_get_summary_missing (priv->app);
if (tmp != NULL && tmp[0] != '\0')
return g_string_new (tmp);
@@ -119,7 +119,7 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
/* label */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
gtk_widget_set_visible (priv->button, TRUE);
if (missing_search_result) {
/* TRANSLATORS: this is a button next to the search results that
@@ -132,20 +132,20 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
gtk_button_set_label (GTK_BUTTON (priv->button), _("Install…"));
}
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* allows to cancel a queued install of the application */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Cancel"));
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Install"));
break;
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
gtk_widget_set_visible (priv->button, TRUE);
if (priv->show_update) {
/* TRANSLATORS: this is a button in the updates panel
@@ -157,21 +157,21 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
}
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_INSTALLED:
if (!gs_app_has_quirk (priv->app, GS_APP_QUIRK_COMPULSORY))
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily removed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* shows the status of an application being installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* shows the status of an application being erased */
@@ -183,17 +183,17 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
/* visible */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UNAVAILABLE:
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_visible (priv->button, TRUE);
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_INSTALLED:
gtk_widget_set_visible (priv->button,
!gs_app_has_quirk (priv->app,
GS_APP_QUIRK_COMPULSORY));
@@ -209,11 +209,11 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
gtk_style_context_remove_class (context, "destructive-action");
} else {
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_INSTALLED:
gtk_style_context_add_class (context, "destructive-action");
break;
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
if (priv->show_update)
gtk_style_context_remove_class (context, "destructive-action");
else
@@ -227,8 +227,8 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
/* always insensitive when in selection mode */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_sensitive (priv->button, FALSE);
break;
default:
@@ -251,12 +251,12 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
return;
/* is this a missing search result from the extras page? */
- missing_search_result = (gs_app_get_state (priv->app) == AS_APP_STATE_UNAVAILABLE &&
+ missing_search_result = (gs_app_get_state (priv->app) == GS_APP_STATE_UNAVAILABLE &&
gs_app_get_url (priv->app, AS_URL_KIND_MISSING) != NULL);
/* do a fill bar for the current progress */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gs_progress_button_set_progress (GS_PROGRESS_BUTTON (priv->button),
gs_app_get_progress (priv->app));
gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (priv->button), TRUE);
@@ -302,9 +302,9 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
/* installed tag */
if (!priv->show_buttons) {
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
gtk_widget_set_visible (priv->label_installed, TRUE);
break;
default:
@@ -410,7 +410,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
/* pending label */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (priv->label, TRUE);
gtk_label_set_label (GTK_LABEL (priv->label), _("Pending"));
break;
@@ -421,7 +421,7 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
/* spinner */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
gtk_spinner_start (GTK_SPINNER (priv->spinner));
gtk_widget_set_visible (priv->spinner, TRUE);
break;
@@ -435,8 +435,8 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
/* hide buttons in the update list, unless the app is live updatable */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (priv->button_box, TRUE);
break;
default:
@@ -449,8 +449,8 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
size = gs_app_get_size_installed (priv->app);
} else if (priv->show_update) {
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLING:
size = gs_app_get_size_download (priv->app);
break;
default:
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 7d5a1171..b6d332f8 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -216,9 +216,9 @@ gs_details_page_update_shortcut_button (GsDetailsPage *self)
/* only consider the shortcut button if the app is installed */
switch (gs_app_get_state (self->app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
break;
default:
return;
@@ -253,14 +253,14 @@ app_has_pending_action (GsApp *app)
{
/* sanitize the pending state change by verifying we're in one of the
* expected states */
- if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE &&
- gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE &&
- gs_app_get_state (app) != AS_APP_STATE_UPDATABLE &&
- gs_app_get_state (app) != AS_APP_STATE_QUEUED_FOR_INSTALL)
+ if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE &&
+ gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE &&
+ gs_app_get_state (app) != GS_APP_STATE_UPDATABLE &&
+ gs_app_get_state (app) != GS_APP_STATE_QUEUED_FOR_INSTALL)
return FALSE;
return (gs_app_get_pending_action (app) != GS_PLUGIN_ACTION_UNKNOWN) ||
- (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL);
+ (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL);
}
static void
@@ -321,12 +321,12 @@ static void
gs_details_page_refresh_progress (GsDetailsPage *self)
{
guint percentage;
- AsAppState state;
+ GsAppState state;
/* cancel button */
state = gs_app_get_state (self->app);
switch (state) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (self->button_cancel, TRUE);
/* If the app is installing, the user can only cancel it if
* 1) They haven't already, and
@@ -350,12 +350,12 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
/* progress status label */
switch (state) {
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
gtk_widget_set_visible (self->label_progress_status, TRUE);
gtk_label_set_label (GTK_LABEL (self->label_progress_status),
_("Removing…"));
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (self->label_progress_status, TRUE);
gtk_label_set_label (GTK_LABEL (self->label_progress_status),
_("Installing"));
@@ -389,7 +389,7 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
/* percentage bar */
switch (state) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
percentage = gs_app_get_progress (self->app);
if (percentage == GS_APP_PROGRESS_UNKNOWN) {
/* Translators: This string is shown when preparing to download and install an app. */
@@ -426,7 +426,7 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
/* spinner */
switch (state) {
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
if (!gtk_widget_get_visible (self->spinner_remove)) {
gtk_spinner_start (GTK_SPINNER (self->spinner_remove));
gtk_widget_set_visible (self->spinner_remove, TRUE);
@@ -443,8 +443,8 @@ gs_details_page_refresh_progress (GsDetailsPage *self)
/* progress box */
switch (state) {
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (self->box_progress, TRUE);
break;
default:
@@ -900,9 +900,9 @@ gs_details_page_can_launch_app (GsDetailsPage *self)
return FALSE;
switch (gs_app_get_state (self->app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
break;
default:
return FALSE;
@@ -930,30 +930,30 @@ gs_details_page_can_launch_app (GsDetailsPage *self)
static void
gs_details_page_refresh_buttons (GsDetailsPage *self)
{
- AsAppState state;
+ GsAppState state;
state = gs_app_get_state (self->app);
/* install button */
switch (state) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
gtk_widget_set_visible (self->button_install, TRUE);
/* TRANSLATORS: button text in the header when an application
* can be installed */
gtk_button_set_label (GTK_BUTTON (self->button_install), _("_Install"));
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_set_visible (self->button_install, FALSE);
break;
- case AS_APP_STATE_UNKNOWN:
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_UNKNOWN:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (self->button_install, FALSE);
break;
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
gtk_widget_set_visible (self->button_install, TRUE);
/* TRANSLATORS: button text in the header when firmware
@@ -963,7 +963,7 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
gtk_widget_set_visible (self->button_install, FALSE);
}
break;
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
if (gs_app_get_url (self->app, AS_URL_KIND_MISSING) != NULL) {
gtk_widget_set_visible (self->button_install, FALSE);
} else {
@@ -977,13 +977,13 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
break;
default:
g_warning ("App unexpectedly in state %s",
- as_app_state_to_string (state));
+ gs_app_state_to_string (state));
g_assert_not_reached ();
}
/* update button */
switch (state) {
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
if (gs_app_get_kind (self->app) == AS_APP_KIND_FIRMWARE) {
gtk_widget_set_visible (self->button_update, FALSE);
} else {
@@ -1013,9 +1013,9 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
gtk_widget_set_visible (self->button_remove, FALSE);
} else {
switch (state) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
gtk_widget_set_visible (self->button_remove, TRUE);
gtk_widget_set_sensitive (self->button_remove, TRUE);
/* Mark the button as destructive only if Launch is not visible */
@@ -1026,18 +1026,18 @@ gs_details_page_refresh_buttons (GsDetailsPage *self)
/* TRANSLATORS: button text in the header when an application can be erased */
gtk_button_set_label (GTK_BUTTON (self->button_remove), _("_Remove"));
break;
- case AS_APP_STATE_AVAILABLE_LOCAL:
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_UNAVAILABLE:
- case AS_APP_STATE_UNKNOWN:
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNKNOWN:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (self->button_remove, FALSE);
break;
default:
g_warning ("App unexpectedly in state %s",
- as_app_state_to_string (state));
+ gs_app_state_to_string (state));
g_assert_not_reached ();
}
}
@@ -1402,7 +1402,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
/* are we trying to replace something in the baseos */
gtk_widget_set_visible (self->infobar_details_package_baseos,
gs_app_has_quirk (self->app, GS_APP_QUIRK_COMPULSORY) &&
- gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
switch (gs_app_get_kind (self->app)) {
case AS_APP_KIND_DESKTOP:
@@ -1410,7 +1410,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
gtk_widget_set_visible (self->infobar_details_app_repo,
gs_app_has_quirk (self->app,
GS_APP_QUIRK_HAS_SOURCE) &&
- gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
gtk_widget_set_visible (self->infobar_details_repo, FALSE);
break;
case AS_APP_KIND_GENERIC:
@@ -1419,7 +1419,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
gtk_widget_set_visible (self->infobar_details_repo,
gs_app_has_quirk (self->app,
GS_APP_QUIRK_HAS_SOURCE) &&
- gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
break;
default:
gtk_widget_set_visible (self->infobar_details_app_repo, FALSE);
@@ -1436,7 +1436,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
gtk_widget_set_visible (self->infobar_details_app_norepo,
!gs_app_has_quirk (self->app,
GS_APP_QUIRK_HAS_SOURCE) &&
- gs_app_get_state (self->app) == AS_APP_STATE_AVAILABLE_LOCAL);
+ gs_app_get_state (self->app) == GS_APP_STATE_AVAILABLE_LOCAL);
}
break;
default:
@@ -1446,9 +1446,9 @@ gs_details_page_refresh_all (GsDetailsPage *self)
/* only show the "select addons" string if the app isn't yet installed */
switch (gs_app_get_state (self->app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
gtk_widget_set_visible (self->label_addons_uninstalled_app, FALSE);
break;
default:
@@ -1521,8 +1521,8 @@ gs_details_page_refresh_addons (GsDetailsPage *self)
GtkWidget *row;
addon = gs_app_list_index (addons, i);
- if (gs_app_get_state (addon) == AS_APP_STATE_UNKNOWN ||
- gs_app_get_state (addon) == AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (addon) == GS_APP_STATE_UNKNOWN ||
+ gs_app_get_state (addon) == GS_APP_STATE_UNAVAILABLE)
continue;
row = gs_app_addon_row_new (addon);
@@ -1630,7 +1630,7 @@ gs_details_page_refresh_reviews (GsDetailsPage *self)
case AS_APP_KIND_WEB_APP:
case AS_APP_KIND_SHELL_EXTENSION:
/* don't show a missing rating on a local file */
- if (gs_app_get_state (self->app) != AS_APP_STATE_AVAILABLE_LOCAL &&
+ if (gs_app_get_state (self->app) != GS_APP_STATE_AVAILABLE_LOCAL &&
self->enable_reviews)
show_reviews = TRUE;
break;
@@ -1923,7 +1923,7 @@ gs_details_page_load_stage1_cb (GObject *source,
error->message);
}
if (gs_app_get_kind (self->app) == AS_APP_KIND_UNKNOWN ||
- gs_app_get_state (self->app) == AS_APP_STATE_UNKNOWN) {
+ gs_app_get_state (self->app) == GS_APP_STATE_UNKNOWN) {
g_autofree gchar *str = NULL;
const gchar *id = gs_app_get_id (self->app);
str = g_strdup_printf (_("Unable to find “%s”"), id == NULL ? gs_app_get_source_default
(self->app) : id);
@@ -2209,7 +2209,7 @@ gs_details_page_app_cancel_button_cb (GtkWidget *widget, GsDetailsPage *self)
/* FIXME: We should be able to revert the QUEUED_FOR_INSTALL without
* having to pretend to remove the app */
- if (gs_app_get_state (self->app) == AS_APP_STATE_QUEUED_FOR_INSTALL)
+ if (gs_app_get_state (self->app) == GS_APP_STATE_QUEUED_FOR_INSTALL)
gs_details_page_remove_app (self);
}
@@ -2224,14 +2224,14 @@ gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
if (gs_app_addon_row_get_selected (l->data)) {
GsApp *addon = gs_app_addon_row_get_addon (l->data);
- if (gs_app_get_state (addon) == AS_APP_STATE_AVAILABLE)
+ if (gs_app_get_state (addon) == GS_APP_STATE_AVAILABLE)
gs_app_set_to_be_installed (addon, TRUE);
}
}
g_set_object (&self->app_cancellable, gs_app_get_cancellable (self->app));
- if (gs_app_get_state (self->app) == AS_APP_STATE_UPDATABLE_LIVE) {
+ if (gs_app_get_state (self->app) == GS_APP_STATE_UPDATABLE_LIVE) {
gs_page_update_app (GS_PAGE (self), self->app, self->app_cancellable);
return;
}
@@ -2260,9 +2260,9 @@ gs_details_page_addon_selected_cb (GsAppAddonRow *row,
* triggers an immediate install. Otherwise we'll install the addon
* together with the main app. */
switch (gs_app_get_state (self->app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
if (gs_app_addon_row_get_selected (row)) {
g_set_object (&self->app_cancellable, gs_app_get_cancellable (addon));
gs_page_install_app (GS_PAGE (self), addon, GS_SHELL_INTERACTION_FULL,
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 13970335..4e723aa9 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -281,16 +281,16 @@ app_row_button_clicked_cb (GsAppRow *app_row,
{
GsApp *app = gs_app_row_get_app (app_row);
- if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE &&
+ if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE &&
gs_app_get_url (app, AS_URL_KIND_MISSING) != NULL) {
gs_shell_show_uri (self->shell,
gs_app_get_url (app, AS_URL_KIND_MISSING));
- } else if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE ||
- gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL ||
- gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+ } else if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE ||
+ gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL ||
+ gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
self->search_cancellable);
- } else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ } else if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
gs_page_remove_app (GS_PAGE (self), app, self->search_cancellable);
} else {
g_critical ("extras: app in unexpected state %u", gs_app_get_state (app));
@@ -449,7 +449,7 @@ create_missing_app (SearchData *search_data)
gs_app_set_summary_missing (app, g_string_free (summary_missing, FALSE));
gs_app_set_kind (app, AS_APP_KIND_GENERIC);
- gs_app_set_state (app, AS_APP_STATE_UNAVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_UNAVAILABLE);
gs_app_set_url (app, AS_URL_KIND_MISSING, search_data->url_not_found);
return app;
@@ -1109,7 +1109,7 @@ row_activated_cb (GtkListBox *list_box,
app = gs_app_row_get_app (GS_APP_ROW (row));
- if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE &&
+ if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE &&
gs_app_get_url (app, AS_URL_KIND_MISSING) != NULL) {
gs_shell_show_uri (self->shell,
gs_app_get_url (app, AS_URL_KIND_MISSING));
@@ -1128,7 +1128,7 @@ get_app_sort_key (GsApp *app)
/* sort missing applications as last */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
g_string_append (key, "9:");
break;
default:
diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c
index 9cc5f7ce..7eca36f5 100644
--- a/src/gs-feature-tile.c
+++ b/src/gs-feature-tile.c
@@ -79,16 +79,16 @@ gs_feature_tile_refresh (GsAppTile *self)
accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
name = g_strdup_printf ("%s (%s)",
gs_app_get_name (app),
_("Installed"));
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_INSTALLING:
default:
name = g_strdup (gs_app_get_name (app));
break;
diff --git a/src/gs-history-dialog.c b/src/gs-history-dialog.c
index 7863e61e..bdee1d9f 100644
--- a/src/gs-history-dialog.c
+++ b/src/gs-history-dialog.c
@@ -63,20 +63,20 @@ gs_history_dialog_set_app (GsHistoryDialog *dialog, GsApp *app)
/* add the action */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_REMOVING:
/* TRANSLATORS: this is the status in the history UI,
* where we are showing the application was removed */
tmp = C_("app status", "Removed");
break;
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_INSTALLING:
/* TRANSLATORS: this is the status in the history UI,
* where we are showing the application was installed */
tmp = C_("app status", "Installed");
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
/* TRANSLATORS: this is the status in the history UI,
* where we are showing the application was updated */
tmp = C_("app status", "Updated");
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 3688be44..1fd8a843 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -111,13 +111,13 @@ gs_installed_page_invalidate_sort_idle (gpointer user_data)
{
GsAppRow *app_row = user_data;
GsApp *app = gs_app_row_get_app (app_row);
- AsAppState state = gs_app_get_state (app);
+ GsAppState state = gs_app_get_state (app);
gtk_list_box_row_changed (GTK_LIST_BOX_ROW (app_row));
/* if the app has been uninstalled (which can happen from another view)
* we should removed it from the installed view */
- if (state == AS_APP_STATE_AVAILABLE || state == AS_APP_STATE_UNKNOWN)
+ if (state == GS_APP_STATE_AVAILABLE || state == GS_APP_STATE_UNKNOWN)
gs_installed_page_unreveal_row (app_row);
g_object_unref (app_row);
@@ -320,13 +320,13 @@ gs_installed_page_get_app_sort_key (GsApp *app)
/* sort installed, removing, other */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
g_string_append (key, "1:");
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
g_string_append (key, "2:");
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
g_string_append (key, "3:");
break;
default:
diff --git a/src/gs-origin-popover-row.c b/src/gs-origin-popover-row.c
index 43e11938..f5ee8c5a 100644
--- a/src/gs-origin-popover-row.c
+++ b/src/gs-origin-popover-row.c
@@ -52,7 +52,7 @@ refresh_ui (GsOriginPopoverRow *row)
gtk_label_set_text (GTK_LABEL (priv->name_label), origin_ui);
}
- if (gs_app_get_state (priv->app) == AS_APP_STATE_AVAILABLE_LOCAL) {
+ if (gs_app_get_state (priv->app) == GS_APP_STATE_AVAILABLE_LOCAL) {
GFile *local_file = gs_app_get_local_file (priv->app);
url = g_file_get_basename (local_file);
/* TRANSLATORS: This is followed by a file name, e.g. "Name: gedit.rpm" */
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 36b66104..b9dee947 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -623,7 +623,7 @@ refresh_third_party_repo (GsOverviewPage *self)
/* only show if never prompted and third party repo is available */
if (g_settings_get_boolean (priv->settings, "show-nonfree-prompt") &&
priv->third_party_repo != NULL &&
- gs_app_get_state (priv->third_party_repo) == AS_APP_STATE_AVAILABLE) {
+ gs_app_get_state (priv->third_party_repo) == GS_APP_STATE_AVAILABLE) {
gtk_widget_set_visible (priv->infobar_third_party, TRUE);
} else {
gtk_widget_set_visible (priv->infobar_third_party, FALSE);
@@ -889,7 +889,7 @@ third_party_response_cb (GtkInfoBar *info_bar,
if (response_id != GTK_RESPONSE_YES)
return;
- if (gs_app_get_state (priv->third_party_repo) == AS_APP_STATE_AVAILABLE) {
+ if (gs_app_get_state (priv->third_party_repo) == GS_APP_STATE_AVAILABLE) {
gs_page_install_app (GS_PAGE (self), priv->third_party_repo,
GS_SHELL_INTERACTION_FULL,
priv->cancellable);
diff --git a/src/gs-page.c b/src/gs-page.c
index e299354d..1bcd27c7 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -246,7 +246,7 @@ gs_page_install_app (GsPage *page,
g_autoptr(GsPluginJob) plugin_job = NULL;
/* probably non-free */
- if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
GtkResponseType response;
response = gs_app_notify_unavailable (app, gs_shell_get_window (priv->shell));
@@ -443,7 +443,7 @@ gs_page_remove_app (GsPage *page, GsApp *app, GCancellable *cancellable)
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
- if (gs_app_get_state (app) == AS_APP_STATE_QUEUED_FOR_INSTALL) {
+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) {
g_autoptr(GsPluginJob) plugin_job = NULL;
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE,
"interactive", TRUE,
diff --git a/src/gs-popular-tile.c b/src/gs-popular-tile.c
index 0a7cb986..4ed0f9d4 100644
--- a/src/gs-popular-tile.c
+++ b/src/gs-popular-tile.c
@@ -55,17 +55,17 @@ gs_popular_tile_refresh (GsAppTile *self)
accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_REMOVING:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_REMOVING:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
installed = TRUE;
/* TRANSLATORS: this refers to an app (by name) that is installed */
name = g_strdup_printf (_("%s (Installed)"),
gs_app_get_name (app));
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_INSTALLING:
default:
installed = FALSE;
name = g_strdup (gs_app_get_name (app));
diff --git a/src/gs-removal-dialog.c b/src/gs-removal-dialog.c
index 61b5cbd6..0d946c71 100644
--- a/src/gs-removal-dialog.c
+++ b/src/gs-removal-dialog.c
@@ -126,7 +126,7 @@ gs_removal_dialog_show_upgrade_removals (GsRemovalDialog *self,
GsApp *app = gs_app_list_index (removals, i);
g_autofree gchar *tmp = NULL;
- if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
continue;
tmp = gs_app_to_string (app);
g_debug ("removal %u: %s", i, tmp);
diff --git a/src/gs-repo-row.c b/src/gs-repo-row.c
index 72f0416a..9dda6c7b 100644
--- a/src/gs-repo-row.c
+++ b/src/gs-repo-row.c
@@ -89,15 +89,15 @@ refresh_ui (GsRepoRow *row)
/* set button text */
switch (gs_app_get_state (priv->repo)) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
/* TRANSLATORS: this is a button in the software repositories
dialog for enabling a repo */
gtk_button_set_label (GTK_BUTTON (priv->button), _("_Enable"));
/* enable button */
gtk_widget_set_sensitive (priv->button, TRUE);
break;
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_INSTALLED:
if (repo_supports_removal (priv->repo)) {
/* TRANSLATORS: this is a button in the software repositories dialog
for removing a repo. The ellipsis indicates that further
@@ -112,14 +112,14 @@ refresh_ui (GsRepoRow *row)
/* enable button */
gtk_widget_set_sensitive (priv->button, TRUE);
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
/* TRANSLATORS: this is a button in the software repositories dialog
that shows the status of a repo being enabled */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Enabling"));
/* disable button */
gtk_widget_set_sensitive (priv->button, FALSE);
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
if (repo_supports_removal (priv->repo)) {
/* TRANSLATORS: this is a button in the software repositories dialog
that shows the status of a repo being removed */
@@ -138,13 +138,13 @@ refresh_ui (GsRepoRow *row)
/* set enabled/disabled label */
switch (gs_app_get_state (priv->repo)) {
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_INSTALLED:
/* TRANSLATORS: this is a label in the software repositories
dialog that indicates that a repo is enabled. */
gtk_label_set_text (GTK_LABEL (priv->status_label), _("Enabled"));
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
/* TRANSLATORS: this is a label in the software repositories
dialog that indicates that a repo is disabled. */
gtk_label_set_text (GTK_LABEL (priv->status_label), _("Disabled"));
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index f1c766be..f4dbb46f 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -350,17 +350,17 @@ repo_button_clicked_cb (GsRepoRow *row,
repo = gs_repo_row_get_repo (row);
switch (gs_app_get_state (repo)) {
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
enable_repo (dialog, repo);
break;
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_INSTALLED:
remove_confirm_repo (dialog, repo);
break;
default:
g_warning ("repo %s button clicked in unexpected state %s",
gs_app_get_id (repo),
- as_app_state_to_string (gs_app_get_state (repo)));
+ gs_app_state_to_string (gs_app_get_state (repo)));
break;
}
}
@@ -388,17 +388,17 @@ add_repo (GsReposDialog *dialog, GsApp *repo)
{
GtkWidget *row;
g_autofree gchar *text = NULL;
- AsAppState state;
+ GsAppState state;
state = gs_app_get_state (repo);
- if (!(state == AS_APP_STATE_AVAILABLE ||
- state == AS_APP_STATE_AVAILABLE_LOCAL ||
- state == AS_APP_STATE_INSTALLED ||
- state == AS_APP_STATE_INSTALLING ||
- state == AS_APP_STATE_REMOVING)) {
+ if (!(state == GS_APP_STATE_AVAILABLE ||
+ state == GS_APP_STATE_AVAILABLE_LOCAL ||
+ state == GS_APP_STATE_INSTALLED ||
+ state == GS_APP_STATE_INSTALLING ||
+ state == GS_APP_STATE_REMOVING)) {
g_warning ("repo %s in invalid state %s",
gs_app_get_id (repo),
- as_app_state_to_string (state));
+ gs_app_state_to_string (state));
return;
}
@@ -474,20 +474,20 @@ third_party_repo_button_clicked_cb (GsThirdPartyRepoRow *row,
app = gs_third_party_repo_row_get_app (row);
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_UNAVAILABLE:
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
install_third_party_repo (dialog, TRUE);
break;
- case AS_APP_STATE_UPDATABLE_LIVE:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_INSTALLED:
install_third_party_repo (dialog, FALSE);
break;
default:
g_warning ("third party repo %s button clicked in unexpected state %s",
gs_app_get_id (app),
- as_app_state_to_string (gs_app_get_state (app)));
+ gs_app_state_to_string (gs_app_get_state (app)));
break;
}
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 8b7b6c19..ef79c85b 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -51,12 +51,12 @@ gs_search_page_app_row_clicked_cb (GsAppRow *app_row,
{
GsApp *app;
app = gs_app_row_get_app (app_row);
- if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
+ if (gs_app_get_state (app) == GS_APP_STATE_AVAILABLE)
gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
self->cancellable);
- else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
+ else if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED)
gs_page_remove_app (GS_PAGE (self), app, self->cancellable);
- else if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
+ else if (gs_app_get_state (app) == GS_APP_STATE_UNAVAILABLE) {
if (gs_app_get_url (app, AS_URL_KIND_MISSING) == NULL) {
gs_page_install_app (GS_PAGE (self), app,
GS_SHELL_INTERACTION_FULL,
@@ -201,7 +201,7 @@ gs_search_page_get_app_sort_key (GsApp *app)
/* sort missing codecs before applications */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
g_string_append (key, "9:");
break;
default:
diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
index 715f70f3..806ec3d3 100644
--- a/src/gs-shell-search-provider.c
+++ b/src/gs-shell-search-provider.c
@@ -87,7 +87,7 @@ search_done_cb (GObject *source,
g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
for (i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
- if (gs_app_get_state (app) != AS_APP_STATE_AVAILABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_AVAILABLE)
continue;
g_variant_builder_add (&builder, "s", gs_app_get_unique_id (app));
@@ -107,7 +107,7 @@ gs_shell_search_provider_get_app_sort_key (GsApp *app)
/* sort available apps before installed ones */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
g_string_append (key, "9:");
break;
default:
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index c2ed8f93..69b46557 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -80,25 +80,25 @@ gs_summary_tile_refresh (GsAppTile *self)
accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
installed = TRUE;
name = g_strdup_printf (_("%s (Installed)"),
gs_app_get_name (app));
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
installed = FALSE;
name = g_strdup_printf (_("%s (Installing)"),
gs_app_get_name (app));
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
installed = TRUE;
name = g_strdup_printf (_("%s (Removing)"),
gs_app_get_name (app));
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_AVAILABLE:
default:
installed = FALSE;
name = g_strdup (gs_app_get_name (app));
diff --git a/src/gs-third-party-repo-row.c b/src/gs-third-party-repo-row.c
index e1da3fc6..c39487bc 100644
--- a/src/gs-third-party-repo-row.c
+++ b/src/gs-third-party-repo-row.c
@@ -57,7 +57,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
/* do a fill bar for the current progress */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
gs_progress_button_set_progress (GS_PROGRESS_BUTTON (priv->button),
gs_app_get_progress (priv->app));
gs_progress_button_set_show_progress (GS_PROGRESS_BUTTON (priv->button), TRUE);
@@ -69,7 +69,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
/* set button text */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
/* TRANSLATORS: this is a button in the software repositories
dialog for installing a repo.
The ellipsis indicates that further steps are required */
@@ -77,31 +77,31 @@ refresh_ui (GsThirdPartyRepoRow *row)
/* enable button */
gtk_widget_set_sensitive (priv->button, TRUE);
break;
- case AS_APP_STATE_AVAILABLE:
- case AS_APP_STATE_AVAILABLE_LOCAL:
+ case GS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE_LOCAL:
/* TRANSLATORS: this is a button in the software repositories
dialog for installing a repo */
gtk_button_set_label (GTK_BUTTON (priv->button), _("_Install"));
/* enable button */
gtk_widget_set_sensitive (priv->button, TRUE);
break;
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
/* TRANSLATORS: this is a button in the software repositories
dialog for removing multiple repos */
gtk_button_set_label (GTK_BUTTON (priv->button), _("_Remove All"));
/* enable button */
gtk_widget_set_sensitive (priv->button, TRUE);
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
/* TRANSLATORS: this is a button in the software repositories dialog
that shows the status of a repo being installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
/* disable button */
gtk_widget_set_sensitive (priv->button, FALSE);
break;
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_REMOVING:
/* TRANSLATORS: this is a button in the software repositories dialog
that shows the status of a repo being removed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Removing"));
@@ -113,7 +113,7 @@ refresh_ui (GsThirdPartyRepoRow *row)
}
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
gtk_widget_set_visible (priv->button, FALSE);
break;
default:
@@ -123,9 +123,9 @@ refresh_ui (GsThirdPartyRepoRow *row)
context = gtk_widget_get_style_context (priv->button);
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_INSTALLED:
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_INSTALLED:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
gtk_style_context_add_class (context, "destructive-action");
break;
default:
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index c64eaa58..2ff50ea0 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -409,8 +409,8 @@ create_app_row (GsApp *app)
gtk_widget_set_hexpand (label, TRUE);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_container_add (GTK_CONTAINER (row), label);
- if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE ||
- gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE ||
+ gs_app_get_state (app) == GS_APP_STATE_UPDATABLE_LIVE) {
g_autofree gchar *verstr = format_version_update (app, gtk_widget_get_direction (row));
label = gtk_label_new (verstr);
} else {
@@ -490,14 +490,14 @@ get_app_section (GsApp *app)
* 3. updates
* 4. downgrades */
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
section = GS_UPDATE_DIALOG_SECTION_ADDITIONS;
break;
- case AS_APP_STATE_UNAVAILABLE:
+ case GS_APP_STATE_UNAVAILABLE:
section = GS_UPDATE_DIALOG_SECTION_REMOVALS;
break;
- case AS_APP_STATE_UPDATABLE:
- case AS_APP_STATE_UPDATABLE_LIVE:
+ case GS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE_LIVE:
if (is_downgrade (gs_app_get_version (app),
gs_app_get_update_version (app)))
section = GS_UPDATE_DIALOG_SECTION_DOWNGRADES;
@@ -506,7 +506,7 @@ get_app_section (GsApp *app)
break;
default:
g_warning ("get_app_section: unhandled state %s for %s",
- as_app_state_to_string (gs_app_get_state (app)),
+ gs_app_state_to_string (gs_app_get_state (app)),
gs_app_get_unique_id (app));
section = GS_UPDATE_DIALOG_SECTION_UPDATES;
break;
diff --git a/src/gs-update-list.c b/src/gs-update-list.c
index 5122329a..85cabe8f 100644
--- a/src/gs-update-list.c
+++ b/src/gs-update-list.c
@@ -28,7 +28,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GsUpdateList, gs_update_list, GTK_TYPE_LIST_BOX)
static void
gs_update_list_app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
{
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
GsAppRow *app_row = GS_APP_ROW (user_data);
gs_app_row_unreveal (app_row);
}
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 7a4b3c92..56a52d92 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -337,7 +337,7 @@ update_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
static gboolean
_should_auto_update (GsApp *app)
{
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE)
return FALSE;
if (gs_app_has_quirk (app, GS_APP_QUIRK_NEW_PERMISSIONS))
return FALSE;
@@ -522,7 +522,7 @@ get_system_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
/* is not EOL */
app = gs_plugin_loader_get_system_app (plugin_loader);
- if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
return;
/* TRANSLATORS: this is when the current OS version goes end-of-life */
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 96529296..9c04975d 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -140,7 +140,7 @@ gs_updates_page_invalidate (GsUpdatesPage *self)
static GsUpdatesSectionKind
_get_app_section (GsApp *app)
{
- if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
+ if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE_LIVE) {
if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
return GS_UPDATES_SECTION_KIND_ONLINE_FIRMWARE;
return GS_UPDATES_SECTION_KIND_ONLINE;
@@ -170,7 +170,7 @@ _get_num_updates (GsUpdatesPage *self)
for (guint i = 0; i < gs_app_list_length (apps); ++i) {
GsApp *app = gs_app_list_index (apps, i);
if (gs_app_is_updatable (app) ||
- gs_app_get_state (app) == AS_APP_STATE_INSTALLING)
+ gs_app_get_state (app) == GS_APP_STATE_INSTALLING)
++count;
}
return count;
@@ -606,7 +606,7 @@ gs_updates_page_get_system_finished_cb (GObject *source_object,
gtk_widget_set_visible (self->box_end_of_life, FALSE);
return;
}
- if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE) {
+ if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE) {
gtk_widget_set_visible (self->box_end_of_life, FALSE);
return;
}
@@ -1140,7 +1140,7 @@ gs_updates_page_upgrade_install_cb (GsUpgradeBanner *upgrade_banner,
removals = gs_app_get_related (upgrade);
for (i = 0; i < gs_app_list_length (removals); i++) {
GsApp *app = gs_app_list_index (removals, i);
- if (gs_app_get_state (app) != AS_APP_STATE_UNAVAILABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
continue;
cnt++;
}
@@ -1185,9 +1185,9 @@ gs_updates_page_invalidate_downloaded_upgrade (GsUpdatesPage *self)
app = gs_upgrade_banner_get_app (GS_UPGRADE_BANNER (self->upgrade_banner));
if (app == NULL)
return;
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE)
return;
- gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
g_debug ("resetting %s to AVAILABLE as the updates have changed",
gs_app_get_id (app));
}
@@ -1199,8 +1199,8 @@ gs_shell_update_are_updates_in_progress (GsUpdatesPage *self)
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
switch (gs_app_get_state (app)) {
- case AS_APP_STATE_INSTALLING:
- case AS_APP_STATE_REMOVING:
+ case GS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_REMOVING:
return TRUE;
break;
default:
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index 16cfe436..16c99331 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -53,7 +53,7 @@ static void
_app_row_button_clicked_cb (GsAppRow *app_row, GsUpdatesSection *self)
{
GsApp *app = gs_app_row_get_app (app_row);
- if (gs_app_get_state (app) != AS_APP_STATE_UPDATABLE_LIVE)
+ if (gs_app_get_state (app) != GS_APP_STATE_UPDATABLE_LIVE)
return;
gs_page_update_app (GS_PAGE (self->page), app, gs_app_get_cancellable (app));
}
@@ -80,7 +80,7 @@ _unreveal_row (GsAppRow *app_row)
static void
_app_state_notify_cb (GsApp *app, GParamSpec *pspec, gpointer user_data)
{
- if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
+ if (gs_app_get_state (app) == GS_APP_STATE_INSTALLED) {
GsAppRow *app_row = GS_APP_ROW (user_data);
_unreveal_row (app_row);
}
@@ -389,7 +389,7 @@ _button_update_all_clicked_cb (GtkButton *button, GsUpdatesSection *self)
/* look at each app in turn */
for (guint i = 0; i < gs_app_list_length (self->list); i++) {
GsApp *app = gs_app_list_index (self->list, i);
- if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE)
+ if (gs_app_get_state (app) == GS_APP_STATE_UPDATABLE)
helper->do_reboot = TRUE;
if (gs_app_has_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT))
helper->do_reboot_notification = TRUE;
@@ -611,10 +611,10 @@ gs_updates_section_app_state_changed_cb (GsAppList *list,
for (ii = 0; ii < len; ii++) {
GsApp *app = gs_app_list_index (list, ii);
- AsAppState state = gs_app_get_state (app);
+ GsAppState state = gs_app_get_state (app);
- if (state == AS_APP_STATE_INSTALLING ||
- state == AS_APP_STATE_REMOVING) {
+ if (state == GS_APP_STATE_INSTALLING ||
+ state == GS_APP_STATE_REMOVING) {
busy++;
}
}
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index b38a353d..7971d597 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -105,7 +105,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
* UPDATABLE (packages are downloaded and upgrade is ready to go)
*/
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
/* TRANSLATORS: This is the text displayed when a distro
* upgrade is available. First %s is the distro name and the
* 2nd %s is the version, e.g. "Fedora 23 Now Available" */
@@ -115,7 +115,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
gtk_widget_set_visible (priv->button_upgrades_cancel, FALSE);
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
/* TRANSLATORS: This is the text displayed while waiting to
* download a distro upgrade. First %s is the distro name and
* the 2nd %s is the version, e.g. "Waiting to Download Fedora 23" */
@@ -125,7 +125,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
gtk_widget_set_visible (priv->button_upgrades_cancel, TRUE);
break;
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
/* TRANSLATORS: This is the text displayed while downloading a
* distro upgrade. First %s is the distro name and the 2nd %s
* is the version, e.g. "Downloading Fedora 23" */
@@ -135,7 +135,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
gtk_widget_set_visible (priv->label_upgrades_warning, FALSE);
gtk_widget_set_visible (priv->button_upgrades_cancel, TRUE);
break;
- case AS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE:
/* TRANSLATORS: This is the text displayed when a distro
* upgrade has been downloaded and is ready to be installed.
* First %s is the distro name and the 2nd %s is the version,
@@ -148,14 +148,14 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
break;
default:
g_critical ("Unexpected app state ‘%s’ of app ‘%s’",
- as_app_state_to_string (gs_app_get_state (priv->app)),
+ gs_app_state_to_string (gs_app_get_state (priv->app)),
gs_app_get_unique_id (priv->app));
break;
}
/* Hide the upgrade box until the app state is known. */
gtk_widget_set_visible (priv->box_upgrades,
- (gs_app_get_state (priv->app) != AS_APP_STATE_UNKNOWN));
+ (gs_app_get_state (priv->app) != GS_APP_STATE_UNKNOWN));
/* Refresh the summary if we got anything better than the default blurb */
if (gs_app_get_summary (priv->app) != NULL)
@@ -164,22 +164,22 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
/* Show the right buttons for the current state */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_AVAILABLE:
+ case GS_APP_STATE_AVAILABLE:
gtk_widget_show (priv->button_upgrades_download);
gtk_widget_hide (priv->button_upgrades_install);
break;
- case AS_APP_STATE_QUEUED_FOR_INSTALL:
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_QUEUED_FOR_INSTALL:
+ case GS_APP_STATE_INSTALLING:
gtk_widget_hide (priv->button_upgrades_download);
gtk_widget_hide (priv->button_upgrades_install);
break;
- case AS_APP_STATE_UPDATABLE:
+ case GS_APP_STATE_UPDATABLE:
gtk_widget_hide (priv->button_upgrades_download);
gtk_widget_show (priv->button_upgrades_install);
break;
default:
g_critical ("Unexpected app state ‘%s’ of app ‘%s’",
- as_app_state_to_string (gs_app_get_state (priv->app)),
+ gs_app_state_to_string (gs_app_get_state (priv->app)),
gs_app_get_unique_id (priv->app));
break;
}
@@ -190,7 +190,7 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
/* do a fill bar for the current progress */
switch (gs_app_get_state (priv->app)) {
- case AS_APP_STATE_INSTALLING:
+ case GS_APP_STATE_INSTALLING:
percentage = gs_app_get_progress (priv->app);
if (percentage == GS_APP_PROGRESS_UNKNOWN) {
if (priv->progress_pulse_id == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]