From 4f6e1230f7f3d7df873d85d5be5c1a404c3787e5 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 6 Jun 2014 11:02:07 +0100 Subject: Do not write a screenshot type of 'normal' as it's the default value --- libappstream-glib/as-screenshot.c | 7 ++++++- libappstream-glib/as-self-test.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'libappstream-glib') diff --git a/libappstream-glib/as-screenshot.c b/libappstream-glib/as-screenshot.c index 87547cf..454c241 100644 --- a/libappstream-glib/as-screenshot.c +++ b/libappstream-glib/as-screenshot.c @@ -288,8 +288,13 @@ as_screenshot_node_insert (AsScreenshot *screenshot, n = as_node_insert (parent, "screenshot", NULL, AS_NODE_INSERT_FLAG_NONE, - "type", as_screenshot_kind_to_string (priv->kind), NULL); + if (priv->kind != AS_SCREENSHOT_KIND_NORMAL) { + as_node_add_attribute (n, + "type", + as_screenshot_kind_to_string (priv->kind), + -1); + } if (api_version >= 0.41) { as_node_insert_localized (n, "caption", diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c index 9859646..90c3a12 100644 --- a/libappstream-glib/as-self-test.c +++ b/libappstream-glib/as-self-test.c @@ -271,7 +271,7 @@ ch_test_screenshot_func (void) GNode *root; GString *xml; const gchar *src = - "" + "" "Hello" "http://1.png" "http://2.png" @@ -346,7 +346,7 @@ ch_test_app_func (void) "" "http://a.png" "" - "" + "" "http://b.png" "" "" -- cgit v1.2.1