[gnome-software] Use AsIdKind from libappstream-glib



commit 6df1e0c5a550c1f25aae4f18f7a778d6756b619a
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jul 1 10:41:35 2014 +0100

    Use AsIdKind from libappstream-glib

 src/gs-app-row.c                          |    4 +-
 src/gs-app.c                              |   31 ++++----------------------
 src/gs-app.h                              |   16 +------------
 src/gs-plugin-loader.c                    |    2 +-
 src/gs-shell-details.c                    |   19 ++++++++--------
 src/gs-shell-installed.c                  |   13 ++++++-----
 src/gs-sources-dialog.c                   |   10 ++++----
 src/gs-update-list.c                      |    9 ++++---
 src/gs-utils.c                            |    2 +-
 src/plugins/gs-plugin-appstream.c         |   33 +---------------------------
 src/plugins/gs-plugin-desktopdb.c         |    4 +-
 src/plugins/gs-plugin-dummy.c             |   12 +++++-----
 src/plugins/gs-plugin-epiphany.c          |    4 +-
 src/plugins/gs-plugin-packagekit-refine.c |    4 +-
 14 files changed, 52 insertions(+), 111 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 3abfd5a..900e457 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -242,8 +242,8 @@ gs_app_row_refresh (GsAppRow *app_row)
        gtk_widget_set_visible (priv->button_box, !priv->show_update);
 
        if (priv->selectable) {
-               if (gs_app_get_id_kind (priv->app) == GS_APP_ID_KIND_DESKTOP ||
-                   gs_app_get_id_kind (priv->app) == GS_APP_ID_KIND_WEBAPP)
+               if (gs_app_get_id_kind (priv->app) == AS_ID_KIND_DESKTOP ||
+                   gs_app_get_id_kind (priv->app) == AS_ID_KIND_WEB_APP)
                        gtk_widget_set_visible (priv->checkbox, TRUE);
                gtk_widget_set_sensitive (priv->button, FALSE);
        } else {
diff --git a/src/gs-app.c b/src/gs-app.c
index fb8618f..eb36763 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -84,7 +84,7 @@ struct GsAppPrivate
        GsAppRatingKind          rating_kind;
        guint64                  size;
        GsAppKind                kind;
-       GsAppIdKind              id_kind;
+       AsIdKind                 id_kind;
        GsAppState               state;
        GHashTable              *metadata;
        GdkPixbuf               *pixbuf;
@@ -181,27 +181,6 @@ gs_app_state_to_string (GsAppState state)
 }
 
 /**
- * gs_app_id_kind_to_string:
- **/
-const gchar *
-gs_app_id_kind_to_string (GsAppIdKind id_kind)
-{
-       if (id_kind == GS_APP_ID_KIND_UNKNOWN)
-               return "unknown";
-       if (id_kind == GS_APP_ID_KIND_DESKTOP)
-               return "desktop";
-       if (id_kind == GS_APP_ID_KIND_INPUT_METHOD)
-               return "input-method";
-       if (id_kind == GS_APP_ID_KIND_FONT)
-               return "font";
-       if (id_kind == GS_APP_ID_KIND_CODEC)
-               return "codec";
-       if (id_kind == GS_APP_ID_KIND_WEBAPP)
-               return "webapp";
-       return NULL;
-}
-
-/**
  * gs_app_to_string:
  **/
 gchar *
@@ -221,9 +200,9 @@ gs_app_to_string (GsApp *app)
        str = g_string_new ("GsApp:\n");
        g_string_append_printf (str, "\tkind:\t%s\n",
                                gs_app_kind_to_string (priv->kind));
-       if (priv->id_kind != GS_APP_ID_KIND_UNKNOWN) {
+       if (priv->id_kind != AS_ID_KIND_UNKNOWN) {
                g_string_append_printf (str, "\tid-kind:\t%s\n",
-                                       gs_app_id_kind_to_string (priv->id_kind));
+                                       as_id_kind_to_string (priv->id_kind));
        }
        g_string_append_printf (str, "\tstate:\t%s\n",
                                gs_app_state_to_string (priv->state));
@@ -636,7 +615,7 @@ gs_app_set_kind (GsApp *app, GsAppKind kind)
 /**
  * gs_app_get_id_kind:
  */
-GsAppIdKind
+AsIdKind
 gs_app_get_id_kind (GsApp *app)
 {
        g_return_val_if_fail (GS_IS_APP (app), GS_APP_KIND_UNKNOWN);
@@ -647,7 +626,7 @@ gs_app_get_id_kind (GsApp *app)
  * gs_app_set_id_kind:
  */
 void
-gs_app_set_id_kind (GsApp *app, GsAppIdKind id_kind)
+gs_app_set_id_kind (GsApp *app, AsIdKind id_kind)
 {
        g_return_if_fail (GS_IS_APP (app));
        app->priv->id_kind = id_kind;
diff --git a/src/gs-app.h b/src/gs-app.h
index 6ebebb2..54de9a0 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -80,17 +80,6 @@ typedef enum {
 } GsAppState;
 
 typedef enum {
-       GS_APP_ID_KIND_UNKNOWN,
-       GS_APP_ID_KIND_DESKTOP,
-       GS_APP_ID_KIND_INPUT_METHOD,
-       GS_APP_ID_KIND_FONT,
-       GS_APP_ID_KIND_CODEC,
-       GS_APP_ID_KIND_WEBAPP,
-       GS_APP_ID_KIND_ADDON,
-       GS_APP_ID_KIND_LAST
-} GsAppIdKind;
-
-typedef enum {
        GS_APP_RATING_KIND_UNKNOWN,
        GS_APP_RATING_KIND_USER,
        GS_APP_RATING_KIND_SYSTEM,
@@ -138,7 +127,6 @@ GType                gs_app_get_type                (void);
 GsApp          *gs_app_new                     (const gchar    *id);
 gchar          *gs_app_to_string               (GsApp          *app);
 const gchar    *gs_app_kind_to_string          (GsAppKind       kind);
-const gchar    *gs_app_id_kind_to_string       (GsAppIdKind     id_kind);
 const gchar    *gs_app_state_to_string         (GsAppState      state);
 
 void            gs_app_subsume                 (GsApp          *app,
@@ -151,9 +139,9 @@ void                 gs_app_set_id                  (GsApp          *app,
 GsAppKind       gs_app_get_kind                (GsApp          *app);
 void            gs_app_set_kind                (GsApp          *app,
                                                 GsAppKind       kind);
-GsAppIdKind     gs_app_get_id_kind             (GsApp          *app);
+AsIdKind        gs_app_get_id_kind             (GsApp          *app);
 void            gs_app_set_id_kind             (GsApp          *app,
-                                                GsAppIdKind     id_kind);
+                                                AsIdKind        id_kind);
 GsAppState      gs_app_get_state               (GsApp          *app);
 void            gs_app_set_state               (GsApp          *app,
                                                 GsAppState      state);
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 3f4b952..ee71be3 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1368,7 +1368,7 @@ gs_plugin_loader_convert_unavailable (GList *list, const gchar *search)
                        continue;
                if (gs_app_get_state (app) != GS_APP_STATE_UNAVAILABLE)
                        continue;
-               if (gs_app_get_id_kind (app) != GS_APP_ID_KIND_CODEC)
+               if (gs_app_get_id_kind (app) != AS_ID_KIND_CODEC)
                        continue;
                if (gs_app_get_url (app, GS_APP_URL_KIND_MISSING) == NULL)
                        continue;
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 3137f57..930ee01 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <glib/gi18n.h>
 #include <gio/gdesktopappinfo.h>
+#include <appstream-glib.h>
 
 #include "gs-utils.h"
 
@@ -331,7 +332,7 @@ gs_shell_details_refresh_screenshots (GsShellDetails *shell_details)
        guint i;
 
        /* treat screenshots differently */
-       if (gs_app_get_id_kind (priv->app) == GS_APP_ID_KIND_FONT) {
+       if (gs_app_get_id_kind (priv->app) == AS_ID_KIND_FONT) {
                gs_container_remove_all (GTK_CONTAINER (priv->box_details_screenshot_thumbnails));
                gs_container_remove_all (GTK_CONTAINER (priv->box_details_screenshot_main));
                screenshots = gs_app_get_screenshots (priv->app);
@@ -493,11 +494,11 @@ out:
 static gboolean
 gs_shell_details_is_addon_id_kind (GsApp *app)
 {
-        GsAppIdKind id_kind;
+        AsIdKind id_kind;
         id_kind = gs_app_get_id_kind (app);
-        if (id_kind == GS_APP_ID_KIND_DESKTOP)
+        if (id_kind == AS_ID_KIND_DESKTOP)
                 return FALSE;
-        if (id_kind == GS_APP_ID_KIND_WEBAPP)
+        if (id_kind == AS_ID_KIND_WEB_APP)
                 return FALSE;
         return TRUE;
 }
@@ -662,7 +663,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
 
        /* set the rating */
        switch (gs_app_get_id_kind (priv->app)) {
-       case GS_APP_ID_KIND_WEBAPP:
+       case AS_ID_KIND_WEB_APP:
                gtk_widget_set_visible (priv->star, FALSE);
                break;
        default:
@@ -692,8 +693,8 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        switch (gs_app_get_state (priv->app)) {
        case GS_APP_STATE_INSTALLED:
        case GS_APP_STATE_UPDATABLE:
-               if (gs_app_get_id_kind (priv->app) == GS_APP_ID_KIND_DESKTOP ||
-                   gs_app_get_id_kind (priv->app) == GS_APP_ID_KIND_WEBAPP) {
+               if (gs_app_get_id_kind (priv->app) == AS_ID_KIND_DESKTOP ||
+                   gs_app_get_id_kind (priv->app) == AS_ID_KIND_WEB_APP) {
                        gtk_widget_set_visible (priv->button_details_launch, TRUE);
                } else {
                        gtk_widget_set_visible (priv->button_details_launch, FALSE);
@@ -707,7 +708,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
        /* make history button insensitive if there is none */
        history = gs_app_get_history (priv->app);
        switch (gs_app_get_id_kind (priv->app)) {
-       case GS_APP_ID_KIND_WEBAPP:
+       case AS_ID_KIND_WEB_APP:
                gtk_widget_set_visible (priv->button_history, FALSE);
                break;
        default:
@@ -766,7 +767,7 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
 
        /* installing a webapp */
        switch (gs_app_get_id_kind (priv->app)) {
-       case GS_APP_ID_KIND_WEBAPP:
+       case AS_ID_KIND_WEB_APP:
                gtk_widget_set_visible (priv->infobar_details_webapp, TRUE);
                break;
        default:
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 7a07a1f..5c004a4 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -24,6 +24,7 @@
 
 #include <string.h>
 #include <glib/gi18n.h>
+#include <appstream-glib.h>
 
 #include "gs-shell.h"
 #include "gs-shell-installed.h"
@@ -375,8 +376,8 @@ gs_shell_installed_get_app_sort_key (GsApp *app)
 
        /* sort desktop files, then addons */
        switch (gs_app_get_id_kind (app)) {
-       case GS_APP_ID_KIND_DESKTOP:
-       case GS_APP_ID_KIND_WEBAPP:
+       case AS_ID_KIND_DESKTOP:
+       case AS_ID_KIND_WEB_APP:
                g_string_append (key, "1:");
                break;
        default:
@@ -443,11 +444,11 @@ out:
 static gboolean
 gs_shell_installed_is_addon_id_kind (GsApp *app)
 {
-       GsAppIdKind id_kind;
+       AsIdKind id_kind;
        id_kind = gs_app_get_id_kind (app);
-       if (id_kind == GS_APP_ID_KIND_DESKTOP)
+       if (id_kind == AS_ID_KIND_DESKTOP)
                return FALSE;
-       if (id_kind == GS_APP_ID_KIND_WEBAPP)
+       if (id_kind == AS_ID_KIND_WEB_APP)
                return FALSE;
        return TRUE;
 }
@@ -455,7 +456,7 @@ gs_shell_installed_is_addon_id_kind (GsApp *app)
 static gboolean
 gs_shell_installed_is_system_application (GsApp *app)
 {
-       if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_DESKTOP &&
+       if (gs_app_get_id_kind (app) == AS_ID_KIND_DESKTOP &&
            gs_app_get_kind (app) == GS_APP_KIND_SYSTEM)
                return TRUE;
        return FALSE;
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index eec7e6c..ca75244 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -73,13 +73,13 @@ add_source (GtkListBox *listbox, GsApp *app)
        for (i = 0; i < related->len; i++) {
                app_tmp = g_ptr_array_index (related, i);
                switch (gs_app_get_id_kind (app_tmp)) {
-               case GS_APP_ID_KIND_WEBAPP:
-               case GS_APP_ID_KIND_DESKTOP:
+               case AS_ID_KIND_WEB_APP:
+               case AS_ID_KIND_DESKTOP:
                        cnt_apps++;
                        break;
-               case GS_APP_ID_KIND_FONT:
-               case GS_APP_ID_KIND_CODEC:
-               case GS_APP_ID_KIND_INPUT_METHOD:
+               case AS_ID_KIND_FONT:
+               case AS_ID_KIND_CODEC:
+               case AS_ID_KIND_INPUT_METHOD:
                        cnt_addon++;
                        break;
                default:
diff --git a/src/gs-update-list.c b/src/gs-update-list.c
index ab92eba..2008ec1 100644
--- a/src/gs-update-list.c
+++ b/src/gs-update-list.c
@@ -23,6 +23,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <appstream-glib.h>
 
 #include "gs-update-list.h"
 
@@ -57,11 +58,11 @@ gs_update_list_add_app (GsUpdateList *update_list,
 static gboolean
 is_addon_id_kind (GsApp *app)
 {
-       GsAppIdKind id_kind;
+       AsIdKind id_kind;
        id_kind = gs_app_get_id_kind (app);
-       if (id_kind == GS_APP_ID_KIND_DESKTOP)
+       if (id_kind == AS_ID_KIND_DESKTOP)
                return FALSE;
-       if (id_kind == GS_APP_ID_KIND_WEBAPP)
+       if (id_kind == AS_ID_KIND_WEB_APP)
                return FALSE;
        return TRUE;
 }
@@ -115,7 +116,7 @@ get_app_sort_key (GsApp *app)
 
        /* sort desktop files, then addons */
        switch (gs_app_get_id_kind (app)) {
-       case GS_APP_ID_KIND_DESKTOP:
+       case AS_ID_KIND_DESKTOP:
                g_string_append (key, "1:");
                break;
        default:
diff --git a/src/gs-utils.c b/src/gs-utils.c
index 4b4edee..781f924 100644
--- a/src/gs-utils.c
+++ b/src/gs-utils.c
@@ -130,7 +130,7 @@ gs_app_notify_installed (GsApp *app)
         * has been successfully installed */
        summary = g_strdup_printf (_("%s is now installed"), gs_app_get_name (app));
        n = g_notification_new (summary);
-       if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_DESKTOP) {
+       if (gs_app_get_id_kind (app) == AS_ID_KIND_DESKTOP) {
                /* TRANSLATORS: this is button that opens the newly installed application */
                g_notification_add_button_with_target (n, _("Launch"),
                                                       "app.launch", "s",
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 1278cbb..8983e4b 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -535,37 +535,8 @@ gs_plugin_refine_item (GsPlugin *plugin,
                gs_app_set_kind (app, GS_APP_KIND_SYSTEM);
 
        /* set id kind */
-       if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_UNKNOWN) {
-               switch (as_app_get_id_kind (item)) {
-               case AS_ID_KIND_UNKNOWN:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_UNKNOWN);
-                       break;
-               case AS_ID_KIND_DESKTOP:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
-                       break;
-               case AS_ID_KIND_FONT:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_FONT);
-                       break;
-               case AS_ID_KIND_CODEC:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_CODEC);
-                       break;
-               case AS_ID_KIND_INPUT_METHOD:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_INPUT_METHOD);
-                       break;
-               case AS_ID_KIND_WEB_APP:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_WEBAPP);
-                       break;
-               case AS_ID_KIND_SOURCE:
-                       /* handled above */
-                       break;
-               case AS_ID_KIND_ADDON:
-                       gs_app_set_id_kind (app, GS_APP_ID_KIND_ADDON);
-                       break;
-               default:
-                       g_warning ("Unhandled AsIdKind '%s'", as_id_kind_to_string (as_app_get_id_kind 
(item)));
-                       break;
-               }
-       }
+       if (gs_app_get_id_kind (app) == AS_ID_KIND_UNKNOWN)
+               gs_app_set_id_kind (app, as_app_get_id_kind (item));
 
        /* set package names */
        pkgnames = as_app_get_pkgnames (item);
diff --git a/src/plugins/gs-plugin-desktopdb.c b/src/plugins/gs-plugin-desktopdb.c
index 3d9e68b..dfa5205 100644
--- a/src/plugins/gs-plugin-desktopdb.c
+++ b/src/plugins/gs-plugin-desktopdb.c
@@ -129,8 +129,8 @@ gs_plugin_desktopdb_set_metadata (GsPlugin *plugin,
                gs_app_set_kind (app, GS_APP_KIND_NORMAL);
 
        /* promote to a desktop type */
-       if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_UNKNOWN)
-               gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       if (gs_app_get_id_kind (app) == AS_ID_KIND_UNKNOWN)
+               gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
 
        gs_app_set_metadata (app,
                             "DataDir::desktop-filename",
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index ebc426d..1d9b921 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -96,7 +96,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "Boxes");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Do not segfault when using newer versons of 
libvirt.");
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
 
        /* add an OS update */
@@ -104,7 +104,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "libvirt-glib-devel");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Fix several memory leaks.");
        gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
 
        /* add a second OS update */
@@ -112,7 +112,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
        gs_app_set_name (app, GS_APP_QUALITY_NORMAL, "gnome-boxes-libs");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL, "Do not segfault when using newer versons of 
libvirt.");
        gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
 
        return TRUE;
@@ -135,7 +135,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
        gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        gs_plugin_add_app (list, app);
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
 
        return TRUE;
 }
@@ -157,7 +157,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
        gs_app_set_state (app, GS_APP_STATE_AVAILABLE);
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        gs_plugin_add_app (list, app);
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
 
        return TRUE;
 }
@@ -205,7 +205,7 @@ gs_plugin_add_category_apps (GsPlugin *plugin,
        gs_app_set_kind (app, GS_APP_KIND_NORMAL);
        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/gnome-boxes.png", NULL));
-       gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
+       gs_app_set_id_kind (app, AS_ID_KIND_DESKTOP);
        gs_plugin_add_app (list, app);
        return TRUE;
 }
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index eaa9d1e..924a446 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -152,7 +152,7 @@ gs_plugin_add_installed_file (GsPlugin *plugin,
        gs_app_set_state (*app, no_display ? GS_APP_STATE_AVAILABLE :
                                             GS_APP_STATE_INSTALLED);
        gs_app_set_kind (*app, GS_APP_KIND_NORMAL);
-       gs_app_set_id_kind (*app, GS_APP_ID_KIND_WEBAPP);
+       gs_app_set_id_kind (*app, AS_ID_KIND_WEB_APP);
        gs_app_add_source_id (*app, path);
        gs_app_set_icon (*app, icon);
        ret = gs_app_load_icon (*app, error);
@@ -700,7 +700,7 @@ gs_plugin_refine (GsPlugin *plugin,
 
        for (l = *list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               if (gs_app_get_id_kind (app) != GS_APP_ID_KIND_WEBAPP)
+               if (gs_app_get_id_kind (app) != AS_ID_KIND_WEB_APP)
                        continue;
                gs_app_set_size (app, 4096);
                tmp = gs_app_get_source_id_default (app);
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index ff6a0f7..8c1cb38 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -599,7 +599,7 @@ gs_plugin_refine_require_details (GsPlugin *plugin,
        gs_profile_start (plugin->profile, "packagekit-refine[source->licence]");
        for (l = list; l != NULL; l = l->next) {
                app = GS_APP (l->data);
-               if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_WEBAPP)
+               if (gs_app_get_id_kind (app) == AS_ID_KIND_WEB_APP)
                        continue;
                if (gs_app_get_source_id_default (app) == NULL)
                        continue;
@@ -751,7 +751,7 @@ gs_plugin_refine (GsPlugin *plugin,
                app = GS_APP (l->data);
                if (gs_app_get_source_id_default (app) != NULL)
                        continue;
-               if (gs_app_get_id_kind (app) == GS_APP_ID_KIND_WEBAPP)
+               if (gs_app_get_id_kind (app) == AS_ID_KIND_WEB_APP)
                        continue;
                sources = gs_app_get_sources (app);
                if (sources->len == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]