[gnome-software] Do not show a warning when parsing AppStream metadata with icon type 'remote'
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show a warning when parsing AppStream metadata with icon type 'remote'
- Date: Thu, 17 Oct 2013 21:16:25 +0000 (UTC)
commit 0af3e63cbbe75eb9da8dd18abd59913dce6f9520
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 2ebde1f..ecd0da1 100644
--- a/src/plugins/appstream-app.h
+++ b/src/plugins/appstream-app.h
@@ -29,9 +29,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 d0119fa..fd7ba6d 100644
--- a/src/plugins/appstream-cache.c
+++ b/src/plugins/appstream-cache.c
@@ -102,6 +102,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 e76412e..2af87a1 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -322,6 +322,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:
ret = gs_app_set_icon (app, icon, &error);
if (!ret) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]