[gnome-software/wip/ubuntu-xenial: 1/3] Add shout snap as featured
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-xenial: 1/3] Add shout snap as featured
- Date: Tue, 14 Jun 2016 16:55:43 +0000 (UTC)
commit fcd5a7f436dbb3c60b7b39b809031f165e030e28
Author: William Hua <william hua canonical com>
Date: Tue Jun 14 11:24:23 2016 -0400
Add shout snap as featured
data/Makefile.am | 1 +
data/featured-shout.svg | 7 +++++++
src/plugins/gs-plugin-snappy.c | 33 +++++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 4158c3c..e2cacf6 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -19,6 +19,7 @@ dist_resources_DATA = \
featured-maps-bg.png \
featured-mypaint.png \
featured-polari.svg \
+ featured-shout.svg \
featured-transmission.png \
featured-weather.png \
featured-weather-bg.png
diff --git a/data/featured-shout.svg b/data/featured-shout.svg
new file mode 100644
index 0000000..8e2d552
--- /dev/null
+++ b/data/featured-shout.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512"
width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g id="chat_x5F_support">
+ <path
d="M170.542,357.786c-15.944-2.444-31.341-6.704-46.024-12.779l-5.493-2.272l-44.78,16.973l15.091-33.515
l-8.914-7.281C48.552,292.879,31,258.503,31,222.119C31,145.96,108.141,84,202.96,84c66.491,0,124.284,30.47,152.885,74.937
c6.45,0.715,12.819,1.716,19.08,3.013C346.379,107.298,280.133,69,202.96,69C99.705,69,16,137.554,16,222.119
c0,42.354,20.999,80.691,54.934,108.411l-25.235,56.04l73.085-27.701c18.762,7.762,39.34,13.007,61.07,15.203
C176.34,368.804,173.231,363.368,170.542,357.786z" fill="#818B9E"/>
+ <path
d="M492,303.273c0-72.144-71.411-130.629-159.5-130.629S173,231.128,173,303.273s71.411,130.629,159.5,130.629
c25.834,0,50.229-5.036,71.813-13.965l62.35,23.633l-21.528-47.809C474.085,372.112,492,339.406,492,303.273z
M253.5,334.606
c-14.636,0-26.5-11.864-26.5-26.5s11.864-26.5,26.5-26.5c14.636,0,26.5,11.864,26.5,26.5S268.136,334.606,253.5,334.606z
M332.5,334.606c-14.636,0-26.5-11.864-26.5-26.5s11.864-26.5,26.5-26.5s26.5,11.864,26.5,26.5S347.136,334.606,332.5,334.606z
M411.5,334.606c-14.636,0-26.5-11.864-26.5-26.5s11.864-26.5,26.5-26.5s26.5,11.864,26.5,26.5S426.136,334.606,411.5,334.606z"
fill="#f2f3f5"/>
+ </g>
+</svg>
\ No newline at end of file
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index c0f30b1..e6dafea 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -46,6 +46,7 @@ gs_plugin_order_after (GsPlugin *plugin)
static const gchar *deps[] = {
"moduleset",
"ubuntu-reviews",
+ "hardcoded-featured",
NULL
};
@@ -530,6 +531,38 @@ gs_plugin_app_remove (GsPlugin *plugin,
}
gboolean
+gs_plugin_add_featured (GsPlugin *plugin,
+ GList **list,
+ GCancellable *cancellable,
+ GError **error)
+{
+ const gchar *snap = "shout";
+ GsApp *app = gs_app_new (snap);
+ g_autofree gchar *background;
+
+ background = g_strdup_printf ("url('%s/gnome-software/featured-shout.svg') "
+ "10%% center / 40%% auto no-repeat, "
+ "linear-gradient(to bottom, #455164, #6a7c99)", DATADIR);
+
+ gs_app_set_management_plugin (app, "snappy");
+ gs_app_set_origin (app, _("Ubuntu Snappy Store"));
+ gs_app_set_kind (app, AS_APP_KIND_DESKTOP);
+ gs_app_add_quirk (app, AS_APP_QUIRK_NOT_REVIEWABLE);
+ gs_app_add_quirk (app, AS_APP_QUIRK_NOT_LAUNCHABLE);
+ gs_app_add_kudo (app, GS_APP_KUDO_FEATURED_RECOMMENDED);
+ gs_app_set_metadata (app, "Featured::background", background);
+ gs_app_set_metadata (app, "Featured::stroke-color", "#000000");
+ gs_app_set_metadata (app, "Featured::text-color", "#ffffff");
+ gs_app_set_metadata (app, "Featured::text-shadow", "0 1px 1px rgba(0,0,0,0.5)");
+
+ get_app (plugin, app, NULL);
+ g_list_free_full (*list, g_object_unref);
+ *list = g_list_append (NULL, app);
+
+ return TRUE;
+}
+
+gboolean
gs_plugin_add_popular (GsPlugin *plugin,
GList **list,
GCancellable *cancellable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]