[gnome-software] trivial: Just use AsAppScope in flatpak
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Just use AsAppScope in flatpak
- Date: Tue, 13 Sep 2016 14:55:19 +0000 (UTC)
commit 8fd8da0e7ac54e35c1951d40b1b38a5c07e34fd1
Author: Richard Hughes <richard hughsie com>
Date: Tue Sep 13 15:54:54 2016 +0100
trivial: Just use AsAppScope in flatpak
src/plugins/gs-flatpak.c | 8 ++++----
src/plugins/gs-flatpak.h | 7 +------
src/plugins/gs-plugin-flatpak-system.c | 2 +-
src/plugins/gs-plugin-flatpak-user.c | 2 +-
4 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 06ef951..6f9fc4d 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -40,7 +40,7 @@ struct _GsFlatpak {
FlatpakInstallation *installation;
GHashTable *broken_remotes;
GFileMonitor *monitor;
- GsFlatpakScope scope;
+ AsAppScope scope;
GsPlugin *plugin;
};
@@ -130,10 +130,10 @@ gs_flatpak_setup (GsFlatpak *self, GCancellable *cancellable, GError **error)
self->installation = flatpak_installation_new_for_path (file, TRUE,
cancellable,
error);
- } else if (self->scope == GS_FLATPAK_SCOPE_SYSTEM) {
+ } else if (self->scope == AS_APP_SCOPE_SYSTEM) {
self->installation = flatpak_installation_new_system (cancellable,
error);
- } else if (self->scope == GS_FLATPAK_SCOPE_USER) {
+ } else if (self->scope == AS_APP_SCOPE_USER) {
self->installation = flatpak_installation_new_user (cancellable,
error);
}
@@ -2078,7 +2078,7 @@ gs_flatpak_init (GsFlatpak *self)
}
GsFlatpak *
-gs_flatpak_new (GsPlugin *plugin, GsFlatpakScope scope)
+gs_flatpak_new (GsPlugin *plugin, AsAppScope scope)
{
GsFlatpak *self;
self = g_object_new (GS_TYPE_FLATPAK, NULL);
diff --git a/src/plugins/gs-flatpak.h b/src/plugins/gs-flatpak.h
index b58f292..980270b 100644
--- a/src/plugins/gs-flatpak.h
+++ b/src/plugins/gs-flatpak.h
@@ -42,13 +42,8 @@ G_DECLARE_FINAL_TYPE (GsFlatpak, gs_flatpak, GS, FLATPAK, GObject)
#define gs_app_set_flatpak_branch(app,val) gs_app_set_metadata(app,"flatpak::branch",val)
#define gs_app_set_flatpak_commit(app,val) gs_app_set_metadata(app,"flatpak::commit",val)
-typedef enum {
- GS_FLATPAK_SCOPE_SYSTEM,
- GS_FLATPAK_SCOPE_USER
-} GsFlatpakScope;
-
GsFlatpak *gs_flatpak_new (GsPlugin *plugin,
- GsFlatpakScope scope);
+ AsAppScope scope);
gboolean gs_flatpak_setup (GsFlatpak *self,
GCancellable *cancellable,
GError **error);
diff --git a/src/plugins/gs-plugin-flatpak-system.c b/src/plugins/gs-plugin-flatpak-system.c
index 0c4b993..2f1ea84 100644
--- a/src/plugins/gs-plugin-flatpak-system.c
+++ b/src/plugins/gs-plugin-flatpak-system.c
@@ -43,7 +43,7 @@ void
gs_plugin_initialize (GsPlugin *plugin)
{
GsPluginData *priv = gs_plugin_alloc_data (plugin, sizeof(GsPluginData));
- priv->flatpak = gs_flatpak_new (plugin, GS_FLATPAK_SCOPE_SYSTEM);
+ priv->flatpak = gs_flatpak_new (plugin, AS_APP_SCOPE_SYSTEM);
priv->settings = g_settings_new ("org.gnome.software");
/* set plugin flags */
diff --git a/src/plugins/gs-plugin-flatpak-user.c b/src/plugins/gs-plugin-flatpak-user.c
index 97b0421..3ad59a6 100644
--- a/src/plugins/gs-plugin-flatpak-user.c
+++ b/src/plugins/gs-plugin-flatpak-user.c
@@ -43,7 +43,7 @@ void
gs_plugin_initialize (GsPlugin *plugin)
{
GsPluginData *priv = gs_plugin_alloc_data (plugin, sizeof(GsPluginData));
- priv->flatpak = gs_flatpak_new (plugin, GS_FLATPAK_SCOPE_USER);
+ priv->flatpak = gs_flatpak_new (plugin, AS_APP_SCOPE_USER);
priv->settings = g_settings_new ("org.gnome.software");
/* set plugin flags */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]