[gnome-software] trivial: Add more information about distro upgrade



commit 96be0883a981c57e2e369d097600a40b496481ee
Author: Richard Hughes <richard hughsie com>
Date:   Wed Apr 20 21:45:00 2016 +0100

    trivial: Add more information about distro upgrade

 src/plugins/gs-plugin-dummy.c                  |   20 ++++++++++++++++++++
 src/plugins/gs-plugin-fedora-distro-upgrades.c |   22 ++++++++++++++++++++++
 2 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-dummy.c b/src/plugins/gs-plugin-dummy.c
index 4eb1572..d6528aa 100644
--- a/src/plugins/gs-plugin-dummy.c
+++ b/src/plugins/gs-plugin-dummy.c
@@ -536,19 +536,39 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
                               GError **error)
 {
        g_autoptr(GsApp) app = NULL;
+       g_autoptr(AsIcon) ic = NULL;
+
+       /* use stock icon */
+       ic = as_icon_new ();
+       as_icon_set_kind (ic, AS_ICON_KIND_STOCK);
+       as_icon_set_name (ic, "application-x-addon");
+
        app = gs_app_new ("org.fedoraproject.release-rawhide.upgrade");
        gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
        gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
        gs_app_set_name (app, GS_APP_QUALITY_LOWEST, "Fedora");
        gs_app_set_summary (app, GS_APP_QUALITY_NORMAL,
                            "A major upgrade, with new features and added polish.");
+       gs_app_set_description (app, GS_APP_QUALITY_LOWEST,
+                               "Dummy Core is a unfinished, overdesigned, "
+                               "hard to use operating system unikernel for "
+                               "Apollo industrial flight computers, with an "
+                               "incomplete set of tools for almost everyone "
+                               "including idiots of all kinds.");
        gs_app_set_url (app, AS_URL_KIND_HOMEPAGE,
                        "https://fedoraproject.org/wiki/Releases/24/Schedule";);
+       gs_app_add_quirk (app, AS_APP_QUIRK_NEEDS_REBOOT);
+       gs_app_add_quirk (app, AS_APP_QUIRK_PROVENANCE);
+       gs_app_add_quirk (app, AS_APP_QUIRK_NOT_REVIEWABLE);
        gs_app_set_version (app, "25");
+       gs_app_set_size (app, 1024 * 1024 * 1024);
+       gs_app_set_license (app, GS_APP_QUALITY_LOWEST, "LicenseRef-free");
+       gs_app_set_origin_ui (app, "Dummy");
        gs_app_set_management_plugin (app, plugin->name);
        gs_app_set_metadata (app, "GnomeSoftware::UpgradeBanner-css",
                             "background: url('" DATADIR "/gnome-software/upgrade-bg.png');"
                             "background-size: 100% 100%;");
+       gs_app_set_icon (app, ic);
        gs_app_list_add (list, app);
        return TRUE;
 }
diff --git a/src/plugins/gs-plugin-fedora-distro-upgrades.c b/src/plugins/gs-plugin-fedora-distro-upgrades.c
index c1a80ea..5738cb1 100644
--- a/src/plugins/gs-plugin-fedora-distro-upgrades.c
+++ b/src/plugins/gs-plugin-fedora-distro-upgrades.c
@@ -343,6 +343,7 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
                g_autofree gchar *url = NULL;
                g_autofree gchar *css = NULL;
                g_autoptr(GsApp) app = NULL;
+               g_autoptr(AsIcon) ic = NULL;
 
                /* only interested in upgrades to the same distro */
                if (g_strcmp0 (distro_info->name, priv->os_name) != 0)
@@ -360,12 +361,33 @@ gs_plugin_add_distro_upgrades (GsPlugin *plugin,
                                          distro_info->version);
                app_version = g_strdup_printf ("%d", distro_info->version);
 
+               /* icon from disk */
+               ic = as_icon_new ();
+               as_icon_set_kind (ic, AS_ICON_KIND_LOCAL);
+               as_icon_set_filename (ic, "/usr/share/pixmaps/fedora-logo-sprite.png");
+
                /* create */
                app = gs_app_new (app_id);
                gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE);
                gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
                gs_app_set_name (app, GS_APP_QUALITY_LOWEST, distro_info->name);
+               gs_app_set_summary (app, GS_APP_QUALITY_LOWEST,
+                                   "A major upgrade, with new features "
+                                   "and added polish.");
+               gs_app_set_description (app, GS_APP_QUALITY_LOWEST,
+                                       "Fedora Workstation is a polished, "
+                                       "easy to use operating system for "
+                                       "laptop and desktop computers, with a "
+                                       "complete set of tools for developers "
+                                       "and makers of all kinds.");
                gs_app_set_version (app, app_version);
+               gs_app_set_size (app, 1024 * 1024 * 1024); /* estimate */
+               gs_app_set_license (app, GS_APP_QUALITY_LOWEST, "LicenseRef-free");
+               gs_app_add_quirk (app, AS_APP_QUIRK_NEEDS_REBOOT);
+               gs_app_add_quirk (app, AS_APP_QUIRK_PROVENANCE);
+               gs_app_add_quirk (app, AS_APP_QUIRK_NOT_REVIEWABLE);
+               gs_app_set_origin_ui (app, distro_info->name);
+               gs_app_set_icon (app, ic);
                gs_app_set_management_plugin (app, "packagekit");
 
                /* just use the release notes */


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