[gnome-software/gnome-3-10] Do not show a warning when parsing AppStream metadata with icon type 'remote'



commit 06506ee543c3002e451e4c7bec879ce5cc11187e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 17 21:03:28 2013 +0100

    Do not show a warning when parsing AppStream metadata with icon type 'remote'

 src/plugins/appstream-app.h       |    3 ++-
 src/plugins/appstream-cache.c     |    2 ++
 src/plugins/gs-plugin-appstream.c |    1 +
 3 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/appstream-app.h b/src/plugins/appstream-app.h
index e845233..e9b0af9 100644
--- a/src/plugins/appstream-app.h
+++ b/src/plugins/appstream-app.h
@@ -27,9 +27,10 @@
 G_BEGIN_DECLS
 
 typedef enum {
+       APPSTREAM_APP_ICON_KIND_UNKNOWN,
        APPSTREAM_APP_ICON_KIND_STOCK,
        APPSTREAM_APP_ICON_KIND_CACHED,
-       APPSTREAM_APP_ICON_KIND_UNKNOWN,
+       APPSTREAM_APP_ICON_KIND_REMOTE,
        APPSTREAM_APP_ICON_KIND_LAST
 } AppstreamAppIconKind;
 
diff --git a/src/plugins/appstream-cache.c b/src/plugins/appstream-cache.c
index 63e8827..a4e3682 100644
--- a/src/plugins/appstream-cache.c
+++ b/src/plugins/appstream-cache.c
@@ -191,6 +191,8 @@ appstream_cache_icon_kind_from_string (const gchar *kind_str)
 {
        if (g_strcmp0 (kind_str, "stock") == 0)
                return APPSTREAM_APP_ICON_KIND_STOCK;
+       if (g_strcmp0 (kind_str, "remote") == 0)
+               return APPSTREAM_APP_ICON_KIND_REMOTE;
        if (g_strcmp0 (kind_str, "local") == 0 ||
            g_strcmp0 (kind_str, "cached") == 0)
                return APPSTREAM_APP_ICON_KIND_CACHED;
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 171062e..31e6740 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -328,6 +328,7 @@ gs_plugin_refine_item_pixbuf (GsPlugin *plugin, GsApp *app, AppstreamApp *item)
 
        icon = appstream_app_get_icon (item);
        switch (appstream_app_get_icon_kind (item)) {
+       case APPSTREAM_APP_ICON_KIND_REMOTE:
        case APPSTREAM_APP_ICON_KIND_STOCK:
                pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
                                                   icon,


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