[gnome-software] Recognise the HiDpiIcon kudo type
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Recognise the HiDpiIcon kudo type
- Date: Mon, 28 Sep 2015 12:23:05 +0000 (UTC)
commit 083868090ec25174aaf9a1ae85c484c1d2ac29b3
Author: Richard Hughes <richard hughsie com>
Date: Mon Sep 28 13:14:39 2015 +0100
Recognise the HiDpiIcon kudo type
src/gs-app.c | 4 ++++
src/gs-app.h | 1 +
src/plugins/gs-plugin-appstream.c | 3 +++
3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 57cf84b..1fb2f84 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -214,6 +214,8 @@ gs_app_to_string (GsApp *app)
g_string_append (str, "\tkudo:\tperfect-screenshots\n");
if ((app->kudos & GS_APP_KUDO_HIGH_CONTRAST) > 0)
g_string_append (str, "\tkudo:\thigh-contrast\n");
+ if ((app->kudos & GS_APP_KUDO_HI_DPI_ICON) > 0)
+ g_string_append (str, "\tkudo:\thi-dpi-icon\n");
g_string_append_printf (str, "\tkudo-percentage:\t%i\n",
gs_app_get_kudos_percentage (app));
if (app->name != NULL)
@@ -1934,6 +1936,8 @@ gs_app_get_kudos_percentage (GsApp *app)
percentage += 20;
if ((app->kudos & GS_APP_KUDO_HIGH_CONTRAST) > 0)
percentage += 20;
+ if ((app->kudos & GS_APP_KUDO_HI_DPI_ICON) > 0)
+ percentage += 20;
/* popular apps should be at *least* 50% */
if ((app->kudos & GS_APP_KUDO_POPULAR) > 0)
diff --git a/src/gs-app.h b/src/gs-app.h
index 9b3d42e..233d252 100644
--- a/src/gs-app.h
+++ b/src/gs-app.h
@@ -72,6 +72,7 @@ typedef enum {
GS_APP_KUDO_IBUS_HAS_SYMBOL = 1 << 11,
GS_APP_KUDO_PERFECT_SCREENSHOTS = 1 << 12,
GS_APP_KUDO_HIGH_CONTRAST = 1 << 13,
+ GS_APP_KUDO_HI_DPI_ICON = 1 << 14,
GS_APP_KUDO_LAST
} GsAppKudo;
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 095e2e7..7de4cc7 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -657,6 +657,9 @@ gs_plugin_refine_item (GsPlugin *plugin,
case AS_KUDO_KIND_HIGH_CONTRAST:
gs_app_add_kudo (app, GS_APP_KUDO_HIGH_CONTRAST);
break;
+ case AS_KUDO_KIND_HI_DPI_ICON:
+ gs_app_add_kudo (app, GS_APP_KUDO_HI_DPI_ICON);
+ break;
default:
g_debug ("no idea how to handle kudo '%s'", tmp);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]